Changeset 1705
- Timestamp:
- 10/18/06 15:12:31 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Layer/WMS/Untiled.js
r1695 r1705 23 23 }, 24 24 reproject: true, 25 26 /** the ratio of image/tile size to map size (this is the untiled buffer) 27 * @type int */ 28 ratio: 2, 25 29 26 30 /** @type OpenLayers.Tile.Image */ … … 126 130 //determine new tile bounds 127 131 var center = bounds.getCenterLonLat(); 132 var tileWidth = bounds.getWidth() * this.ratio; 133 var tileHeight = bounds.getHeight() * this.ratio; 128 134 var tileBounds = 129 new OpenLayers.Bounds(center.lon - bounds.getWidth(),130 center.lat - bounds.getHeight(),131 center.lon + bounds.getWidth(),132 center.lat + bounds.getHeight());135 new OpenLayers.Bounds(center.lon - (tileWidth / 2), 136 center.lat - (tileHeight / 2), 137 center.lon + (tileWidth / 2), 138 center.lat + (tileHeight / 2)); 133 139 134 140 //determine new tile size 135 141 var tileSize = this.map.getSize(); 136 tileSize.w = tileSize.w * 2;137 tileSize.h = tileSize.h * 2;142 tileSize.w = tileSize.w * this.ratio; 143 tileSize.h = tileSize.h * this.ratio; 138 144 139 145 //formulate request url string … … 157 163 getURL: function(bounds) { 158 164 var tileSize = this.map.getSize(); 159 tileSize.w = tileSize.w * 2;160 tileSize.h = tileSize.h * 2;165 tileSize.w = tileSize.w * this.ratio; 166 tileSize.h = tileSize.h * this.ratio; 161 167 return this.getFullRequestString( {'BBOX': bounds.toBBOX(), 162 168 'WIDTH': tileSize.w,
