Differentiated the z-index base of base layers versus popups.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1173 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2006-08-09 20:47:07 +00:00
parent b2ab65df12
commit 1b26e9cb69

View File

@@ -16,7 +16,7 @@ OpenLayers.Map.prototype = {
*
* @type Object
*/
Z_INDEX_BASE: { Layer: 100, Popup: 200, Control: 1000 },
Z_INDEX_BASE: { BaseLayer: 100, Overlay: 325, Popup: 750, Control: 1000 },
/** supported application event types
*
@@ -261,7 +261,9 @@ OpenLayers.Map.prototype = {
*/
addLayer: function (layer) {
layer.div.style.overflow = "";
layer.div.style.zIndex = this.Z_INDEX_BASE['Layer'] + this.layers.length;
layer.div.style.zIndex =
this.Z_INDEX_BASE[layer.isBaseLayer ? 'BaseLayer' : 'Overlay']
+ this.layers.length * 5;
if (layer.isFixed) {
this.viewPortDiv.appendChild(layer.div);
@@ -288,7 +290,6 @@ OpenLayers.Map.prototype = {
layer.setVisibility(false);
}
}
},
/**