[OpenLayers-Commits] r3151 - trunk/openlayers/lib/OpenLayers/Layer
commits at openlayers.org
commits at openlayers.org
Tue May 15 17:14:26 EDT 2007
Author: crschmidt
Date: 2007-05-15 17:14:26 -0400 (Tue, 15 May 2007)
New Revision: 3151
Modified:
trunk/openlayers/lib/OpenLayers/Layer/Vector.js
Log:
Since we have a destroyFeatures command, use it. Patch from fredj, closes
#703.
Modified: trunk/openlayers/lib/OpenLayers/Layer/Vector.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/Vector.js 2007-05-15 21:13:28 UTC (rev 3150)
+++ trunk/openlayers/lib/OpenLayers/Layer/Vector.js 2007-05-15 21:14:26 UTC (rev 3151)
@@ -97,8 +97,7 @@
destroy: function() {
OpenLayers.Layer.prototype.destroy.apply(this, arguments);
- // HACK HACK -- I believe we should be iterating and
- // calling feature[i].destroy() here.
+ this.destroyFeatures();
this.features = null;
this.selectedFeatures = null;
if (this.renderer) {
More information about the Commits
mailing list