[OpenLayers-Users] Two layers with drag enable

Thomas PAPIN thomas.papin at gmail.com
Wed Aug 18 08:52:15 EDT 2010


I found finally a solution.
I don't know why it's working but it's working so :)

selectControl = new OpenLayers.Control.SelectFeature(dragableLayers);
map.addControl(selectControl);
selectControl.activate();

for (i=0; i<dragableLayers.length; i++)
{
            drag = new OpenLayers.Control.DragFeature(dragableLayers[i]);
            map.addControl(drag);
            drag.activate();
}

Like this all my dragable layers have drag ability. The select ability is no
more available

Thomas

2010/8/18 Thomas PAPIN <thomas.papin at gmail.com>

> Hello,
>
> I would like to be able to drag features of two vector layers in the same
> time, is it possible ?
> Currently when I add a DragFeature on a layer this will remove the
> dragfeature on another layer
>
> :-(
>
> Thomas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100818/3a780b7b/attachment.html


More information about the Users mailing list