Change mouse controls (or add option for alternate controls)

Feb 20, 2009 at 3:03 PM
Edited Feb 20, 2009 at 3:03 PM
First, great project. My question is can the mouse controls be changed or at least an option for an alternate control scheme added? I would like the left mouse button to drag the map instead of the right mouse button. This is for 2 reasons:

1) The online maps, such as Google Maps do it this way, so users will expect this.
2) This is a desktop app, so right-clicking should be for bringing up a context menu.

I know that left-clicking currently sets the "current location" on the map, but this could be achieved another way, possibly by double-clicking or even a left click that was not part of a drag operation (that is, a mousebuttondown followed by a mousebuttonup where the x & y values between the two are not greater than SystemParameters.MinimumHorizontalDragDistance and SystemParameters.MinimumVerticalDragDistance, respectively.

By the way, I am using the WPF control.
Feb 20, 2009 at 4:25 PM
this is not google maps, and users expectation is not top priority, you allways can add this functionality self, and upload patch ;}
Feb 20, 2009 at 6:15 PM
I have uploaded the patch.

I realize this is not Google Maps, but that was just an example. I have not used a mapping service that does not drag/scroll with the left mouse button. Google Maps only scrolls with the left mouse button. allows left and right mouse scrolling. Not sure about others. My point is that these sites allow left scrolling because it is the most intuitive for the user - the average user is not accustomed to using the right mouse button for many operations.

As for user functionality - that should always be a top priority. It is not always the determining factor - maybe the way users expect or are used to doing it is the wrong way - but it should always be a major focus of designing a user interface control. Otherwise, what are you designing a user interface control for?

I realize that people ask for features all the time, some of them quite fringe, and you only have so much time and your own goals for the control. I have no problem with making any changes myself - my main reason for the original post was to bounce the idea off you and get any possible suggestions you may have for how to implement it.

Thanks again for writing this great control. It has enormous potential if you and others can continue to develop it.
Feb 20, 2009 at 6:35 PM
..i'l try to add option to switch mouse buttons ;}
Jun 29, 2010 at 7:12 AM

use MouseWheelZoomType

Jul 15, 2010 at 2:16 PM
I searched the contribs and forks, and couldn't find anything like this. Is there a way to switch mouse drag to Mouse button 1? Thanks
Jul 16, 2010 at 1:59 AM

MainMap.DragButton = MouseButtons.Left;

Jul 16, 2010 at 9:42 AM
Sorry to waste your time radioman. Much appreciated.
Jul 16, 2010 at 9:43 AM
Edited Jul 16, 2010 at 9:44 AM
Feature request: can you expose dragbutton to the GmapControl VS properties explorer? Thx!
Jul 16, 2010 at 12:13 PM

done ;}

Aug 28, 2010 at 10:54 AM
Edited Aug 28, 2010 at 11:16 AM

I don't see it in the properties explorer... ;)

But thanks for implementing this.