Change WorldWind layer to work properly when layer is not within appropriate
zoom levels. Adjusts to new method of inittileing. git-svn-id: http://svn.openlayers.org/trunk/openlayers@1493 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -46,12 +46,9 @@ OpenLayers.Layer.WorldWind.prototype =
|
|||||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
return new OpenLayers.Tile.Image(this, position, bounds,
|
||||||
url, this.tileSize);
|
url, this.tileSize);
|
||||||
} else {
|
} else {
|
||||||
var tile = new Object();
|
return new OpenLayers.Tile.Image(this, position, bounds,
|
||||||
tile.draw = function() {};
|
OpenLayers.Util.getImagesLocation() + "blank.gif",
|
||||||
tile.destroy = function() {};
|
this.tileSize);
|
||||||
tile.bounds = bounds;
|
|
||||||
tile.bounds = position;
|
|
||||||
return tile;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -76,11 +73,16 @@ OpenLayers.Layer.WorldWind.prototype =
|
|||||||
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);
|
||||||
return this.getFullRequestString(
|
if (this.map.getResolution() <= (this.lzd/512)
|
||||||
|
&& this.getZoom() <= this.zoomLevels) {
|
||||||
|
return this.getFullRequestString(
|
||||||
{ L: zoom,
|
{ L: zoom,
|
||||||
X: x,
|
X: x,
|
||||||
Y: y
|
Y: y
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
return OpenLayers.Util.getImagesLocation() + "blank.gif";
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user