[OpenLayers-Users] Remove Features By Id
Mehmet Sirin
m.sirin07 at googlemail.com
Wed Nov 25 21:08:10 EST 2009
Hi,
I'm failing when trying to remove a feature selected by its ID:
...
var startpoint= new OpenLayers.Feature.Vector(point,null,start_style);
startpoint.id="hey";
mylayer.addFeatures([startpoint]);
...
var something=getFeatureById("hey"); //works
mylayer.removeFeatures(mylayer.features[something]);
Maybe it's in general not possible choosing a feature by an associative key
?
Then how solving this problem in another, elegant way ? (i have a solution
for my problem, but it's definitely not fine or elegant^^)
leaving you kind regards
mehmet sirin c.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091126/30b14a79/attachment.html
More information about the Users
mailing list