if we destroy a popup, have it remove itself from the map. good programming says that a popup should be removed by the same person who added it... but if the user destroys a popup, s/he assumes it will dissapear, and unless we remove it, it wont do that.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@538 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-06-07 15:37:51 +00:00
parent eba9f241a0
commit 3b443ca2c9

View File

@@ -75,6 +75,9 @@ OpenLayers.Popup.prototype = {
/**
*/
destroy: function() {
if (this.map != null) {
this.map.removePopup(this);
}
this.div = null;
this.map = null;
},