Also taking into account zoomOffset.

Now the meaning of getServerZoom is fully clarified, and we can get rid of some code again as well.
This commit is contained in:
ahocevar
2012-04-27 09:25:52 -04:00
committed by Tim Schaub
parent 40b4cc49e0
commit 72d1b54956
4 changed files with 10 additions and 9 deletions

View File

@@ -173,7 +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.getServerZoom() + (this.zoomOffset || 0);
var z = this.getServerZoom();
var path = this.serviceVersion + "/" + this.layername + "/" + z + "/" + x + "/" + y + "." + this.type;
var url = this.url;
if (OpenLayers.Util.isArray(url)) {