rem: if ( (this.baseLayer == null) && (this.layers[i].isBaseLayer()) ) { this.baseLayer = this.layers[i]; continue; 
add: var iLayer = this.layers[i]; if (iLayer.isBaseLayer) { this.setBaseLayer(iLayer); break; 
context:     removeLayer: function(layer) {        if (layer.isFixed) {            this.viewPortDiv.removeChild(layer.div);        } else {            this.layerContainerDiv.removeChild(layer.div);        }        this.layers.remove(layer);        if (this.baseLayer == layer) {            this.baseLayer = null;            for(i=0; i < this.layers.length; i++) {                if ( (this.baseLayer == null) && (this.layers[i].isBaseLayer()) ) {                    this.baseLayer = this.layers[i];                    continue;                }            }        }        layer.map = null;        this.events.triggerEvent("removelayer");    },
meta: 4411	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4411/b4a3bfa9c21d9bad6ad6e0ff477f2acb3c72f08d/Map.js/clean/lib/OpenLayers/Map.js