Re: [OpenMap Users] mouse modes

From: Piotr Kamiński <Piotr.Kaminski_at_ctm.gdynia.pl>
Date: Wed, 11 Jan 2006 23:01:00 +0100

Hi Maria,

If you wish to just switch between mouse modes you have to:
   - extends GesturesMouseMode, detect right-click and call method
MouseDelegator.setActiveMouseModeWithID(NavigationMouseMode.ID)
   - do similar thing with NavMouseMode: detect left-click and call
MouseDelegator.

It should work like this: first click changes mouse mode, subsequent
clicks are interpreted by new mouse mode.

If you wish to have both Gestures and Navigation functionality in one
mouse mode (no switching), than you have to write your own MouseMode
class (possibly extending one of standard mouse modes) and implement
your logic. The problem is that standard layers respond to mouse modes
of specific IDs. You cannot assign two different IDs to one mouse mode.
So you have to change Layer.getMouseModeServiceList method in each layer
you are going to use with your new mouse mode.

Hope this helps a little,
Regards,
Piotr Kaminski

Maria Harmening napisał(a):
> hello, all,
>
> can anyone tell me if it's possible to set the MapMouseMode
> to "Gestures" if the user left-clicks and "Navigation" if the user
> right-clicks"?
>
> thanks,
> maria
>
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe openmap-users"]

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Jan 11 2006 - 17:02:26 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT