From 1b26e9cb69be7a60600a0060deee7fd36590c1d0 Mon Sep 17 00:00:00 2001 From: Schuyler Erle Date: Wed, 9 Aug 2006 20:47:07 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Map.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 1caba750c4..8b9265350f 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -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); } } - }, /**