diff --git a/lib/OpenLayers/Layer/WorldWind.js b/lib/OpenLayers/Layer/WorldWind.js index 76a19f179c..1adeedcce2 100644 --- a/lib/OpenLayers/Layer/WorldWind.js +++ b/lib/OpenLayers/Layer/WorldWind.js @@ -58,7 +58,7 @@ OpenLayers.Layer.WorldWind.prototype = getZoom: function () { var zoom = this.map.getZoom(); var extent = this.map.getMaxExtent(); - zoom = zoom - Math.log(this.map.maxResolution / (this.lzd/512))/Math.log(2); + zoom = zoom - Math.log(this.maxResolution / (this.lzd/512))/Math.log(2); return zoom; }, @@ -71,6 +71,8 @@ OpenLayers.Layer.WorldWind.prototype = * @type String */ getURL: function (bounds) { + var zoom = this.getZoom(); + var extent = this.map.getMaxExtent(); var deg = this.lzd/Math.pow(2,this.getZoom()); var x = Math.floor((bounds.left - extent.left)/deg); var y = Math.floor((bounds.bottom - extent.bottom)/deg);