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
This commit is contained in:
euzuro
2006-06-07 16:22:35 +00:00
parent 6628d38dc5
commit cf011820c8

View File

@@ -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;
},
/**