[OpenLayers-Users] how to remove selected marker
Heidt, Christopher M.
CHRISTOPHER.M.HEIDT at saic.com
Wed Mar 18 10:11:40 EDT 2009
http://dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/Open
Layers/Map-js.html#OpenLayers.Map.removeLayer
<http://dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/Ope
nLayers/Layer/Markers-js.html#OpenLayers.Layer.Markers.removeMarker>
________________________________
From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org]
On Behalf Of wrap map
Sent: Wednesday, March 18, 2009 10:05 AM
To: users at openlayers.org
Subject: [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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090318/1e8f0bf5/attachment.html
More information about the Users
mailing list