From e55d2a7cce8868877ba16baefe9fba04ab33504a Mon Sep 17 00:00:00 2001 From: euzuro Date: Thu, 15 Jun 2006 12:10:38 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Map.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 53e39b60c1..a05746275f 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -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"); },