give Map the concept of a base layer

git-svn-id: http://svn.openlayers.org/trunk/openlayers@641 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-06-21 11:48:27 +00:00
parent 2d91cade96
commit 76156b7317

View File

@@ -63,6 +63,9 @@ OpenLayers.Map.prototype = {
// OpenLayers.Pixel
mouseDragStart: null,
/** @type OpenLayers.Layer */
baseLayer: null,
/**
* @param {DOMElement} div
*/
@@ -147,6 +150,10 @@ OpenLayers.Map.prototype = {
this.layerContainerDiv.appendChild(layer.div);
}
this.layers.push(layer);
if (layer.isBaseLayer()) {
this.baseLayer = layer;
}
this.events.triggerEvent("addlayer");
},