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:
@@ -75,6 +75,9 @@ OpenLayers.Popup.prototype = {
|
||||
/**
|
||||
*/
|
||||
destroy: function() {
|
||||
if (this.map != null) {
|
||||
this.map.removePopup(this);
|
||||
}
|
||||
this.div = null;
|
||||
this.map = null;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user