I have a checkbox control that the user uses to activate and deactivate
feature dragging within a vector layer. This works for activating the drag
control but I can't seem to get it to work when deactivating the control:

 

I setup the drag control after I load the vector layer as  follows:

 

                dragItControl = 

{ 

drag: new OpenLayers.Control.DragFeature

(

userMarkers, 

                                                {

 
'onComplete': onCompleteMove

} 

                                )

};

                map.addControl(dragItControl['drag']);

                dragItControl['drag'].activate();

 

When trying to deactivate the control, I have tried all of the following
separately and collectively with no luck:

 

dragItControl['drag'].destroy();

                dragItControl['drag'].deactivate();

                map.removeControl(dragItControl); 

                dragItControl = null;

 

The only way I can deactivate the control is to reload the data again and I
would prefer not to have to do this.

 

Any ideas?

 

Cheers,

 



Merry Xmas

Brad Spencer

 

 

<<image001.png>>

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

Reply via email to