From bd0881d56bc3642ca9ec86c59d50d85aca0a2db0 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Tue, 30 May 2006 05:50:14 +0000 Subject: [PATCH] If a layer is not visible when a zoomlevel changes, and the map view is then dragged, the map view will not be filled with tiles by the inittiles call. Always make sure that we fill the view, even if we just init-tiles'd. git-svn-id: http://svn.openlayers.org/trunk/openlayers@464 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/Grid.js | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 60e69de455..fecab71cda 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -55,20 +55,19 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), { } if (!this.grid || zoomChanged) { this._initTiles(); - } else { - var i = 0; - while (this.getGridBounds().bottom > bounds.bottom) { - this.insertRow(false); - } - while (this.getGridBounds().left > bounds.left) { - this.insertColumn(true); - } - while (this.getGridBounds().top < bounds.top) { - this.insertRow(true); - } - while (this.getGridBounds().right < bounds.right) { - this.insertColumn(false); - } + } + var i = 0; + while (this.getGridBounds().bottom > bounds.bottom) { + this.insertRow(false); + } + while (this.getGridBounds().left > bounds.left) { + this.insertColumn(true); + } + while (this.getGridBounds().top < bounds.top) { + this.insertRow(true); + } + while (this.getGridBounds().right < bounds.right) { + this.insertColumn(false); } }, getGridBounds:function() {