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
This commit is contained in:
@@ -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, {
|
||||
* {<OpenLayers.Bounds>} 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;
|
||||
|
||||
Reference in New Issue
Block a user