I've a map with a few layers from the class OpenLayers.Layer.Image. I was wondering if it is possible to enable dragging on each of this images/layers individually. L开发者_开发问答ike the dragFeature, where you can drag each feature individually.
Thanks!
I think it's the wrong approach to accomplish this with an image layer. The layers are supposed NOT to be moved with respect to the other images/layers. I would suggest you draw the movable images as features instead. A feature is designed to be able to be dragged.
What kind of images is it, and why do you want to drag them?
Yes it is, see [1]. You just have to add a DragPan control to your map (there’s one by default).
HTH,
1 - http://openlayers.org/dev/examples/image-layer.html
精彩评论