From 82d4a1327c77d1f6261fd26348fc8542abc357bf Mon Sep 17 00:00:00 2001 From: euzuro Date: Mon, 5 Jun 2006 19:00:03 +0000 Subject: [PATCH] when we destroy a feature, remove its popup from the map through the removePopup() function git-svn-id: http://svn.openlayers.org/trunk/openlayers@526 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Feature.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/OpenLayers/Feature.js b/lib/OpenLayers/Feature.js index d8d3341638..83b58dda98 100644 --- a/lib/OpenLayers/Feature.js +++ b/lib/OpenLayers/Feature.js @@ -44,6 +44,12 @@ OpenLayers.Feature.prototype= { * */ destroy: function() { + + //remove the popup from the map + if (this.popup != null) { + this.layer.map.removePopup(this.popup); + } + this.events = null; this.layer = null; this.id = null;