Hello,
 
I manage to deactivate drag and zooming events by using this code:
 
for (var i = 0; i< map.controls.length; i++) {
     if (map.controls[i].displayClass == "olControlNavigation") {
          map.controls[i].deactivate();
     }
}
 
Hope this can be helpful.
 
Regards.

 

Un saludo,

 

··················································································


David Alda Fernández de Lezea

Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad

 

IKT

Granja Modelo s/n · 01192 · Arkaute (Araba)


··················································································
Tlfnos.: 945-00-32-95                         Fax: 945-00.32.90
··················································································
email: [email protected]                                web: www.ikt.es 
<http://www.ikt.es/> 
··················································································

 

________________________________

De: [email protected] [mailto:[email protected]] En 
nombre de David Alda Fernandez de Lezea
Enviado el: miércoles, 04 de noviembre de 2009 9:29
Para: [email protected]
Asunto: [OpenLayers-Users] How to deactivate drag event in OpenLayers Map


Hello,
 
I want to deactivate the drag event in the following scenario. I've a tool that 
selects features from a WFS server, and I want to deactivate the drag event 
while you are selecting features, because if you move the mouse a bit while 
trying to select a feature, the feature is not selected and the map is moved to 
the draggd zone. I hope I've explained the problem properly. Is this possible??
 
In my selecting tool 'Select event' I tried something like this but it didn't 
work:
 
map.events.unregister('drag', map, stopDragEvent);
 
Does anybody know how to achieve this goal??
 
Thanks.
 

 

 

Un saludo,

 

··················································································


David Alda Fernández de Lezea

Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad

 

IKT

Granja Modelo s/n · 01192 · Arkaute (Araba)


··················································································
Tlfnos.: 945-00-32-95                         Fax: 945-00.32.90
··················································································
email: [email protected]                                web: www.ikt.es 
<http://www.ikt.es/> 
··················································································

<<logo.gif>>

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to