Hello,

Since you removed the layer from the map, you cannot use
map.layer[1].destroy(). You can still use the destroy() function, but you'll
have to use it on the layer variable directly. For example:
var myLayer = new OpenLayers.Layer.XXX

map.removeLayer(map.layer[1])
//map.layer[1].destroy()
myLayer.destroy();

Hope this helps

Maxime
-- 
View this message in context: 
http://n2.nabble.com/Delete-layer-vector-on-a-map-tp4540464p4541517.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to