I am trying to remove a layer with

    if (map.getLayerIndex(layer) > 0) {
        map.removeLayer(layer);
    }

but no joy. How can I remove a layer?

A bonus question: if I want to reconstruct a  vector layer on map "zoomend", 
that is, redraw all the features on it so they are resized accordingly, should 
I remove the layer (hence, the question above), or simply remove all the 
features and redraw the features? If the latter, then how?

Many thanks,

--
Puneet Kishor _______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to