RE: [OpenMap Users] How can I move the map with a mouse drag event?

From: Chris Allport <callport_at_dtiweb.net>
Date: Tue, 2 Dec 2008 12:15:28 -0500

First, create a mouse delegator that you add to the map handler (you
probably already have this).

In your layer that you wish to use for panning, you need to return the
PanMouseMode.modeID in your getMouseModeServiceList. If you wish to
retain select mouse mode, you return both. If you wish to just pan, you
can eliminate select mouse mode.

We have a condition in which a drag is not necessarily a pan command, so
we do a little shuffling with the current mouse mode. I am not sure how
much of this would be necessary without our special needs.

So, if you are doing both in the layer, you need to set which mouse mode
is currently active. When we detect our panning "condition," we:

* get the mouse delegator
* call setActiveMouseModeWithID( PanMouseMode.modeID );

~Chris


-----Original Message-----
From: owner-openmap-users_at_bbn.com [mailto:owner-openmap-users_at_bbn.com]
On Behalf Of SlikWilly
Sent: Tuesday, December 02, 2008 11:33 AM
To: openmap-users_at_bbn.com
Subject: [OpenMap Users] How can I move the map with a mouse drag event?


Hi,
  
   How can I move the map by clicking down and dragging the mouse? I
have a
Layer that displays on the map and I can navigate using the navigation
bar,
but I would prefer to be able to click and drag my mouse over the map
similar to Google Maps.

Thanks!
-- 
View this message in context:
http://www.nabble.com/How-can-I-move-the-map-with-a-mouse-drag-event--tp
20794413p20794413.html
Sent from the OpenMap mailing list archive at Nabble.com.
--
[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 Tue Dec 02 2008 - 12:16:26 EST

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