when calculating maxResolution from maxExtent and tileSize we dont want to the actual tile size for single layers

This commit is contained in:
Éric Lemoine
2012-05-10 15:42:59 +02:00
parent 98fb795f97
commit 4ad6bacc5d

View File

@@ -1010,7 +1010,7 @@ OpenLayers.Layer = OpenLayers.Class({
this.maxExtent != null) {
// maxResolution for default grid sets assumes that at zoom
// level zero, the whole world fits on one tile.
var tileSize = this.tileSize || this.map.getTileSize();
var tileSize = this.map.getTileSize();
maxResolution = Math.max(
this.maxExtent.getWidth() / tileSize.w,
this.maxExtent.getHeight() / tileSize.h