Changing/fixing the meaning of getServerZoom.
If a layer is configured with serverResolutions, then getServerZoom should return the zoom level as index of the current resolution in the serverResolutions array.
This commit is contained in:
@@ -173,9 +173,7 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
||||
var res = this.getServerResolution();
|
||||
var x = Math.round((bounds.left - this.tileOrigin.lon) / (res * this.tileSize.w));
|
||||
var y = Math.round((bounds.bottom - this.tileOrigin.lat) / (res * this.tileSize.h));
|
||||
var z = this.serverResolutions != null ?
|
||||
OpenLayers.Util.indexOf(this.serverResolutions, res) :
|
||||
this.getServerZoom() + this.zoomOffset;
|
||||
var z = this.getServerZoom() + (this.zoomOffset || 0);
|
||||
var path = this.serviceVersion + "/" + this.layername + "/" + z + "/" + x + "/" + y + "." + this.type;
|
||||
var url = this.url;
|
||||
if (OpenLayers.Util.isArray(url)) {
|
||||
|
||||
Reference in New Issue
Block a user