From 87f26c231e36399a4fb2333a7b6f5010370257a0 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Sat, 31 May 2008 16:56:41 +0000 Subject: [PATCH] Use the maxExtent of the layer in Grid layers instead of the maxExtent of the map (since the two can differ). Patch from kleptog. (Closes #1552) git-svn-id: http://svn.openlayers.org/trunk/openlayers@7298 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/Grid.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 724055e52e..a70e347733 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -353,7 +353,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { var minCols = Math.ceil(viewSize.w/this.tileSize.w) + Math.max(1, 2 * this.buffer); - var extent = this.map.getMaxExtent(); + var extent = this.maxExtent; var resolution = this.map.getResolution(); var tileLayout = this.calculateGridLayout(bounds, extent, resolution); @@ -719,7 +719,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * {} Bounds of the tile at the given pixel location. */ getTileBounds: function(viewPortPx) { - var maxExtent = this.map.getMaxExtent(); + var maxExtent = this.maxExtent; var resolution = this.getResolution(); var tileMapWidth = resolution * this.tileSize.w; var tileMapHeight = resolution * this.tileSize.h;