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(); },