[OpenLayers-Users] Mouse Drag Coordinates

Eric Lemoine eric.lemoine at camptocamp.com
Mon Nov 2 04:22:40 EST 2009


On Fri, Oct 30, 2009 at 1:27 PM, Dave Thomas <davidt at integeo.com> wrote:
>
>
>
> 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();

what if you activate your drag control *after* you activate the
navigation control?

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Users mailing list