Pullup changes since RC2. Fixes:
* WorldWind layer working again * Popup.destroy() complaints * Decompose marker destruction code for easier subclassing. * Error catching for better layerPx error in Map.js * Several eamples, including getFeatureInfo, fullScreen, worldwind, layer-opacity git-svn-id: http://svn.openlayers.org/branches/openlayers/2.1@1501 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -46,19 +46,16 @@ OpenLayers.Layer.WorldWind.prototype =
|
||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
||||
url, this.tileSize);
|
||||
} else {
|
||||
var tile = new Object();
|
||||
tile.draw = function() {};
|
||||
tile.destroy = function() {};
|
||||
tile.bounds = bounds;
|
||||
tile.bounds = position;
|
||||
return tile;
|
||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
||||
OpenLayers.Util.getImagesLocation() + "blank.gif",
|
||||
this.tileSize);
|
||||
}
|
||||
},
|
||||
|
||||
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,14 +68,21 @@ 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);
|
||||
return this.getFullRequestString(
|
||||
if (this.map.getResolution() <= (this.lzd/512)
|
||||
&& this.getZoom() <= this.zoomLevels) {
|
||||
return this.getFullRequestString(
|
||||
{ L: zoom,
|
||||
X: x,
|
||||
Y: y
|
||||
});
|
||||
} else {
|
||||
return OpenLayers.Util.getImagesLocation() + "blank.gif";
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user