From cf011820c85142e42aceb64e475d38912708fdf0 Mon Sep 17 00:00:00 2001 From: euzuro Date: Wed, 7 Jun 2006 16:22:35 +0000 Subject: [PATCH] when we remove popups or layers from the map, we have to set their 'map' properties back to null git-svn-id: http://svn.openlayers.org/trunk/openlayers@545 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Map.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index ea5ca628ef..b1cad1541f 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -150,6 +150,7 @@ OpenLayers.Map.prototype = { removeLayer: function(layer) { this.layerContainerDiv.removeChild(layer.div); this.layers.remove(layer); + layer.map = null; this.events.triggerEvent("removelayer"); }, @@ -199,6 +200,7 @@ OpenLayers.Map.prototype = { if (popup.div) { this.layerContainerDiv.removeChild(popup.div); } + popup.map = null; }, /**