I want to control the mouse pan and zoom capability. I have found that I can control mouse button pan and double click zooming by using the track mode of the EditOverlay layer. This is a bit ackward but does seem to work. Is there a better way to do this? Is there a way to turn off or dsable mouse wheel zooming?
Mouse Pan and Zoom
Charles,
We cannot disable mouse wheel zooming in the current version, we are now working on that though to provide the ability to turn on/off mouse operations and then you can customize your own. It will be available in the next version. Thanks for reminding,
Ben
I have been looking through the class structure to find the elusive property to disable it! this has answered my question.
Cheers
Great. We are working on this feature now and any good advices are appreciated.
Ben
Ultimately what I am after is being able to control what the user will do when they click.
You already have the code there for the panning it would be silly to re-invent the wheel.
I would like to see a property like MouseMode with a enum of (Pan, TrackZoom, ZoomIn, ZoomOut, None) with an Event MouseModeChanged (to allow the dev to handle change of Cursors and toolbar buttons etc)
As a dev we can implement the ZoomIn and ZoomOut easily with MapClick event but reckon having a "inbuilt" tool for it would be good.
Having the None option would allow the Dev to take complete control or handle other actions on the map such as drag select of features etc.
You would also need 2 other properties AllowMouseWheelZoom as Boolean and AllowDblClickZoom as Boolean to disable those two features.
The other thing I would mention is when someone sets the Map.Cursor it seems that the Map changes the cursor after a Pan.
Your thoughts?
Michael,
We added a couple APIs to enable/disable the mouse operations but removed them after reading your message, as that reminds us to consider this part thoroughly before adding any simple APIs. Thanks for your advices and we will definitely think them over when come to this part.
Ben.
I agree with the suggestion to control the "MouseMode".
Our app (only released in ver 2.0) uses tablet PC's where the only UI is the pen. If the user wants to zoom in they tap and draw a rectangle.
Releasing the app using ver 3.0 means we would loose that capability because using a combination of shift+click+drag is not possible because there is no access to the "Shift" key unless they "unfold" the tablet to gain access to the keyboard.
Alan
Alan,
Thanks for reminding, we didn’t thought too much about the tablet PC. I will raise it in our discussion when come to this part. Let me know if there is any other special requirements on tablet PC so we can put it in during the design.
Thanks,
Ben
Hi.
Is there some way to override current version map panning. I'd like to do some dragging on the map, but don't have any idea how to disable paning. I'd like to do some old fashioned map zoom and pan from my toolbar (zooming with click on the map or dragging a rectangle, but with m custom tool, not the automatic, like it happens now(wtih 'Shift' + click + drag)).
Do you have some workaround or still working on this? When the next version will be released, some time range, circa, maybe? ;)
Łukasz
Łukasz,
I am afraid you can’t override map panning in current version. We are working on this now and you will have more control on these mouse operations, like enable / disable mouse panning etc in upcoming version.
We plan to release the next Beta around middle next month.
Thanks,
ThinkGeo Support
Using the Tablet PC for our application - The "shift" + click/drag means we have to stay on version 2.x
Alan,
You will have more control on the mouse operations with upcoming version and your Tablet PC can migrate from V2.0 to V3.0 then.
Please wait for the next Beta which might be out middle next month.
Thanks,
ThinkGeo Support
I was hoping that the new version was going to have a property such as MouseMode but it doesn’t (unless I really am blind).
I would like to get the mouse zooming and panning functions to work similar to the version 2.x and cannot find sample code or figure it out on my own.
It appears as though the new version has the ability to do this but it doesn’t look like it is very simple.
Sample code would be very helpful… Again noting that using this with a tablet PC means no access to the keyboard.
Thanks
Alan
Alan,
1, We have the "MouseMode" in WinformsMap1.ExtentOverlay, as following.
winformsMap1.ExtentOverlay.PanMode
winformsMap1.ExtentOverlay.DoubleLeftClickMode
winformsMap1.ExtentOverlay.DoubleRightClickMode
winformsMap1.ExtentOverlay.MouseWheelMode
winformsMap1.ExtentOverlay.LeftClickDragMode
winformsMap1.ExtentOverlay.RightClickDragMode
2, as you can customize your mouse/keyboard operations with this version, that will not be difficult to create a series of operations for tablet PC yourself. We used to create a couple customized operations (i.e. Ctrl + LeftMouse to pan, Ctrl + Shift + LeftMouse to TrackZoomIn) and that’s not difficult by creating our own InteractiveOverlays. Have a try to and let us know if you need any help.
Thanks,
Ben