[OpenLayers-Users] RE how to remove selected marker
Steve.Toutant at inspq.qc.ca
Steve.Toutant at inspq.qc.ca
Wed Mar 18 10:14:15 EDT 2009
Try
markers.removeMarker(markerName);
steve
wrap map <wrapmap at gmail.com>@openlayers.org
Envoyé par : users-bounces at openlayers.org
18/03/2009 10:05 AM
A
users at openlayers.org
cc
Objet
[OpenLayers-Users] how to remove selected marker
hey all,
function CreateNewMarker() {
markerName = document.getElementById("markerName").value;
if (document.getElementById("markerName").value.length == 0)
alert("You cannot leave markername empty");
else {
markers = new OpenLayers.Layer.Markers(markerName);
map.addLayer(markers);
add();
}
}
now i want to remove marker that i added as the definite layer, i tried to
make layer delete but that is not working for me.
i tired as:
markerName.removeLayer()
or how can i remove selected layer which i can get the name from text box
and delete them
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090318/d2aad65f/attachment.html
More information about the Users
mailing list