diff --git a/lib/OpenLayers/Feature.js b/lib/OpenLayers/Feature.js index 8c65df6ca1..d701664745 100644 --- a/lib/OpenLayers/Feature.js +++ b/lib/OpenLayers/Feature.js @@ -63,7 +63,7 @@ OpenLayers.Feature.prototype= { this.lonlat = null; this.data = null; if (this.marker != null) { - this.marker.destroy(); + this.destroyMarker(this.marker); this.marker = null; } if (this.popup != null) { @@ -89,6 +89,10 @@ OpenLayers.Feature.prototype= { return this.marker; }, + destroyMarker: function() { + this.marker.destroy(); + }, + /** * */