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:
@@ -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;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user