[OpenLayers-Users] map.RemoveLayer() does not work

sunny74 sb.ray at hotmail.com
Mon Sep 7 01:13:37 EDT 2009


Hi,

I am trying to remove a layer using the RemoveLayer(layer,
        setNewBaseLayer) function.
The code is:

 map.removeLayer(choice_features, false);
It is only able to remove the layer "choice_features" the very first time it
is created at PageLoad.
But when the same layer is created the second time it is unable to remove it
and throws javascript exception

htmlfile: Invalid argument.

So how to get it to remove the layer every time it is created.
Awaiting solution.

Thanks for your replies. 
-- 
View this message in context: http://n2.nabble.com/map-RemoveLayer-does-not-work-tp3595538p3595538.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list