From 439ff9943ea6019aeaaaf2c8de2e5e8a0c02000c Mon Sep 17 00:00:00 2001 From: crschmidt Date: Wed, 20 Sep 2006 01:07:55 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Layer/WorldWind.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/OpenLayers/Layer/WorldWind.js b/lib/OpenLayers/Layer/WorldWind.js index 1adeedcce2..2264bb62ea 100644 --- a/lib/OpenLayers/Layer/WorldWind.js +++ b/lib/OpenLayers/Layer/WorldWind.js @@ -46,12 +46,9 @@ 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); } }, @@ -76,11 +73,16 @@ OpenLayers.Layer.WorldWind.prototype = 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"; + } },