On Tuesday, April 6, 2010, gtg287y <gtg2...@gmail.com> wrote: > > I have a vectorLayer, polygonLayer, which I am calling > destroyFeatures(polygonLayer.features) on. I can confirm that after calling > it, the features go away in the polygonLayer.features variable. However, the > features (polygons drawn by the DrawFeatures controller as per the example > found at: > http://openlayers.org/dev/examples/regular-polygons.html > http://openlayers.org/dev/examples/regular-polygons.html > ) don't actually go away on screen (they are still drawn on the map).
Hi. I'm not sure about what's going on here, but I suspect this is related to both addFeatures and destroyFeatures fiddling with the features array. As a workaround you can try to register to beforefeaturesadded (instead of beforefeatureadded) and call destroyFeatures with no argument. Hope this helps, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemo...@camptocamp.com http://www.camptocamp.com _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users