[OpenLayers-Users] Destroy Feature

Gordon gordonlee91 at hotmail.com
Fri Dec 30 03:56:51 EST 2011


Hi all,

may i know how i can only destroy only one feature in my vector layer??

First Feature							
						var img ='img/start.gif';
						var start = new OpenLayers.Feature.Vector(
 						new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat),
						{some:'data'},
						{externalGraphic: img, graphicHeight: 30, graphicWidth: 20});
						vectors.addFeatures(start);
2nd Feature
						var img ='img/end.gif';
						var end = new OpenLayers.Feature.Vector(
 						new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat),
						{some:'dataa'},
						{externalGraphic: img, graphicHeight: 30, graphicWidth: 20});
						vectors.addFeatures(end);
						
						

How can i remove only the 2nd feature and not the first also?	

						

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Destroy-Feature-tp7137637p7137637.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list