---------- Forwarded message ---------- From: wrap map <[email protected]> Date: Wed, Mar 18, 2009 at 3:47 PM Subject: Re: RE [OpenLayers-Users] how to remove selected marker To: [email protected]
thanks for the answers, But this is also not working, i can define my case even more better, 1. I had added each marker in diffrent layers, where layer name=marker name and each marker has numerical value as i need to establish these marker as some data later.' 2. i am listing all markers and its data in one HTML table. 3. when i like to delete row of the table, it cannot delete the Marker even i did ; - markers.removeMarker(markerName);// also not working it work of recent marker only - markerName.removeLayer() - markerName.destroy(), // removes one of the recent layer only, if i enter the layer name in text box and want to delete that it cannot work. the markerName here is name of the new layer which contains marker. I could not found out the error in concept i am using. On Wed, Mar 18, 2009 at 3:14 PM, <[email protected]> wrote: > > Try > > markers.removeMarker(markerName); > > steve > > > *wrap map <[email protected]>@openlayers.org* > Envoyé par : [email protected] > > 18/03/2009 10:05 AM > A > [email protected] 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 > [email protected] > http://openlayers.org/mailman/listinfo/users > > > >
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
