Fix WorldWind layer.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1491 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -58,7 +58,7 @@ OpenLayers.Layer.WorldWind.prototype =
|
|||||||
getZoom: function () {
|
getZoom: function () {
|
||||||
var zoom = this.map.getZoom();
|
var zoom = this.map.getZoom();
|
||||||
var extent = this.map.getMaxExtent();
|
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;
|
return zoom;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -71,6 +71,8 @@ OpenLayers.Layer.WorldWind.prototype =
|
|||||||
* @type String
|
* @type String
|
||||||
*/
|
*/
|
||||||
getURL: function (bounds) {
|
getURL: function (bounds) {
|
||||||
|
var zoom = this.getZoom();
|
||||||
|
var extent = this.map.getMaxExtent();
|
||||||
var deg = this.lzd/Math.pow(2,this.getZoom());
|
var deg = this.lzd/Math.pow(2,this.getZoom());
|
||||||
var x = Math.floor((bounds.left - extent.left)/deg);
|
var x = Math.floor((bounds.left - extent.left)/deg);
|
||||||
var y = Math.floor((bounds.bottom - extent.bottom)/deg);
|
var y = Math.floor((bounds.bottom - extent.bottom)/deg);
|
||||||
|
|||||||
Reference in New Issue
Block a user