adding ability to add a layer to the viewport instead of the layerContainerDiv - this is especially for the virtual earth implementation, as we want to simply make a div that stays put. we dont want it sliding around with the layerdiv. it should stay where it is and let its own events handler move it around

git-svn-id: http://svn.openlayers.org/trunk/openlayers@588 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-06-15 12:10:38 +00:00
parent 9ca4ca2cee
commit e55d2a7cce

View File

@@ -139,7 +139,12 @@ OpenLayers.Map.prototype = {
} else {
layer.div.style.zIndex = this.Z_INDEX_BASE['Layer'] + this.layers.length;
}
this.layerContainerDiv.appendChild(layer.div);
if (layer.viewPortLayer) {
this.viewPortDiv.appendChild(layer.div);
} else {
this.layerContainerDiv.appendChild(layer.div);
}
this.layers.push(layer);
this.events.triggerEvent("addlayer");
},