From 85b14a3c937becd98ae52079c2d37bb256d92876 Mon Sep 17 00:00:00 2001 From: euzuro Date: Wed, 7 Jun 2006 16:07:26 +0000 Subject: [PATCH] when we destroy a grid layer, destroy all of its tiles git-svn-id: http://svn.openlayers.org/trunk/openlayers@540 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/Grid.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index eb4f72c023..2ed4b61079 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -35,6 +35,16 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), { OpenLayers.Layer.Grid.TILE_HEIGHT); }, + /** + * + */ + destroy: function() { + this.params = null; + this.clearGrid(); + this.grid = null; + OpenLayers.Layer.prototype.destroy.apply(this, arguments); + }, + setTileSize: function (size) { this.tileSize = size.copyOf(); },