From bad9a0307e95052b973ad05fb321f386b7a3bff5 Mon Sep 17 00:00:00 2001 From: euzuro Date: Mon, 5 Jun 2006 19:01:10 +0000 Subject: [PATCH] on destroy() of a WFS feature, remove its marker git-svn-id: http://svn.openlayers.org/trunk/openlayers@527 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Feature/WFS.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/OpenLayers/Feature/WFS.js b/lib/OpenLayers/Feature/WFS.js index a0c3cacd7a..822caef2dc 100644 --- a/lib/OpenLayers/Feature/WFS.js +++ b/lib/OpenLayers/Feature/WFS.js @@ -24,6 +24,13 @@ OpenLayers.Feature.WFS.prototype = this.layer.addMarker(this.marker); } }, + + destroy: function() { + if (this.marker != null) { + this.layer.removeMarker(this.marker); + } + OpenLayers.Feature.prototype.destroy.apply(this, arguments); + }, /** * @param {XMLNode} xmlNode