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