diff --git a/lib/OpenLayers/Layer/Vector.js b/lib/OpenLayers/Layer/Vector.js index 4ede7dcbc8..1c130cd0b9 100644 --- a/lib/OpenLayers/Layer/Vector.js +++ b/lib/OpenLayers/Layer/Vector.js @@ -191,8 +191,6 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { * Destroy this layer */ destroy: function() { - OpenLayers.Layer.prototype.destroy.apply(this, arguments); - this.destroyFeatures(); this.features = null; this.selectedFeatures = null; @@ -202,6 +200,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { this.renderer = null; this.geometryType = null; this.drawn = null; + OpenLayers.Layer.prototype.destroy.apply(this, arguments); }, /**