Hi Francesco, Out of my head it think it is possible to create the modifyFeature controle with an array of layers.
something like v_control = new ModifyFeature([poin, polygon, line]) Cheers Kris Met vriendelijke groet, Kind regards, Kristiaan Geusebroek Consultant [cid:[email protected]][cid:[email protected]] Email: [email protected]<mailto:[email protected]> Tel: +31 (0)35 538 1921 Fax: +31 (0)35 538 1922 Mobiel: +31 (0)6 3069 7223 Utrechtseweg 49 1213 TL Hilversum The Netherlands http://www.xebia.com<http://www.xebia.com/> Xebia Blog: http://blog.xebia.com/ On Mar 25, 2012, at 4:11 PM, [email protected]<mailto:[email protected]> wrote: Hi all, i have a problem about Modify Control. In my map i have 3 layer and i would like to modify each layer. I read in this documentation: http://docs.openlayers.org/library/controls.html that : "The ModifyFeature control can only be used with a single layer at any given time. To modify multiple layers, use multiple ModifyFeature controls." I tried to : v_control1 = new OpenLayers.Control.ModifyFeature(poin); v_control 2= new OpenLayers.Control.ModifyFeature(polygon); v_control3 = new OpenLayers.Control.ModifyFeature(line); v_control1.mode = OpenLayers.Control.ModifyFeature.DRAG; v_control2.mode = OpenLayers.Control.ModifyFeature.DRAG; v_control3.mode = OpenLayers.Control.ModifyFeature.DRAG; map.addControl([v_control1,v_control2,v_control3]); v_control1.activate(); v_control2.activate(); v_control3.activate(); but it doesn't work. It seems that i possible to modify just the last layer (in this case line layer). Do you have any suggestion? Thanks Francesco _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
<<inline: image005.jpg>>
<<inline: image006.png>>
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
