[OpenLayers-Users] Mouse Drag Coordinates
Dave Thomas
davidt at integeo.com
Fri Oct 30 08:27:37 EDT 2009
Eric Lemoine-2-2 wrote:
>
> implementing a specific control based on a Drag handler is what I'd go
> with. You can look at the DragPan control to know how to use the Drag
> handler - I tend to think that you could rely on the "move" and "done"
> callbacks only. Now regarding the conflict with the Navigation
> control: have you tried making sure your control is activated *before*
> the Navigation control?
>
Thanks for the response Eric. Based on your suggestion we'll go with the
Drag handler method.
I actually deactivate the navigation on initialisation and only activate at
run time when a button is clicked.
To be sure though, I removed it from the controls property object that was
being passed to the Map constructor via options and constructed it the same
was as the drag handler so I had this...
var drag = new OpenLayers.Control.Drag();
map.addControl(drag);
drag.activate();
var nav = new OpenLayers.Control.Navigation();
map.addControl(nav);
nav.deactivate();
Still however, if I activate the navigation control, the callbacks aren't
received by my drag handler.
Many thanks
Dave
--
View this message in context: http://n2.nabble.com/Mouse-Drag-Coordinates-tp3916580p3918595.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list