[OpenLayers-Users] DragFeature - how to prevent dragging of
features??
plen
peteralen at earthlink.net
Fri Apr 24 22:48:57 EDT 2009
Hello,
I am using the drawing controls from OpenLayers 2.5 and am using the "drag"
control:
drag: new OpenLayers.Control.DragFeature(getFeaturesLayer())
I put all of my features (points, lines, polygons) in the layer that the
drag control is looking at. There are some features, however, which I do
not want the user to actually be able to drag and am looking for a way to
prevent the drag control from dragging it. I am putting the features which
I don't want to drag into the same layer as the features that I do want to
drag because I also use the "select" control on that same layer. If I were
to separate the draggable and non-draggable features into separate layers, I
will not be able to activate the "select" control and be able to select
features in both layers.
So, the question is, can a feature that is added to a layer that the drag
control is looking at somehow have a "do not drag" flag?
Thanks for any thoughts - Peter
--
View this message in context: http://n2.nabble.com/DragFeature---how-to-prevent-dragging-of-features---tp2701287p2701287.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list