From adc561b38fd127ba9ca055455be2ede05f5ffff2 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Thu, 3 Aug 2006 17:27:47 +0000 Subject: [PATCH] When panning by large distances, OpenLayers previously created all the grid space inbetween. This no longer happens -- instead, the grid will re-init if the bounds is not at least partially contained by the existing box. git-svn-id: http://svn.openlayers.org/trunk/openlayers@1074 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/Grid.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index b890c632e9..a511954ea0 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -148,7 +148,9 @@ OpenLayers.Layer.Grid.prototype = } else { if (!this.grid || zoomChanged) { this._initTiles(); - } else { + } else if (this.getGridBounds().containsBounds(bounds, true) == false) { + this._initTiles(); + } else { var i = 0; while (this.getGridBounds().bottom > bounds.bottom) { this.insertRow(false);