Another way I use:

map.layers.forEach(function(layer) {
        map.removeLayer(layer);
    });
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Map-layers-doesn-t-seem-to-contain-all-layers-tp5996448p5997981.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