It worked great.
Thanks a lot.
I just pasted it like this
var layer_delete = map.getLayersByName(deletelayer)[0];    // make sure
you've found something
layer_delete.destroy();




Aditya kumar



-----
GIS Developer

--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Deleting-a-layer-by-its-name-tp5101463p5101501.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to