开发者

Is it possible to drag an OpenLayers.Layer.Image individually

开发者 https://www.devze.com 2023-03-11 21:54 出处:网络
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 dragFeatur

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

0

精彩评论

暂无评论...
验证码 换一张
取 消