diff --git a/lib/OpenLayers/Layer/XYZ.js b/lib/OpenLayers/Layer/XYZ.js index 4689f9c9f0..d0b6a34991 100644 --- a/lib/OpenLayers/Layer/XYZ.js +++ b/lib/OpenLayers/Layer/XYZ.js @@ -140,10 +140,10 @@ OpenLayers.Layer.XYZ = OpenLayers.Class(OpenLayers.Layer.Grid, { */ getXYZ: function(bounds) { var res = this.map.getResolution(); - var x = Math.round((bounds.left - this.maxExtent.left) - / (res * this.tileSize.w)); - var y = Math.round((this.maxExtent.top - bounds.top) - / (res * this.tileSize.h)); + var x = Math.round((bounds.left - this.maxExtent.left) / + (res * this.tileSize.w)); + var y = Math.round((this.maxExtent.top - bounds.top) / + (res * this.tileSize.h)); var z = this.serverResolutions != null ? OpenLayers.Util.indexOf(this.serverResolutions, res) : this.map.getZoom() + this.zoomOffset;