fix for #785 - fix up gutter logic a little bit. on a path to getting all gutter info in one place
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3555 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -172,15 +172,12 @@ OpenLayers.Layer.Image.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* Set the tile size based on the map size. This also sets layer.imageSize
|
||||
* and layer.imageOffset for use by Tile.Image.
|
||||
* Set the tile size based on the map size.
|
||||
*/
|
||||
setTileSize: function() {
|
||||
var tileWidth = this.extent.getWidth() / this.map.getResolution();
|
||||
var tileHeight = this.extent.getHeight() / this.map.getResolution();
|
||||
this.tileSize = new OpenLayers.Size(tileWidth, tileHeight);
|
||||
this.imageSize = this.tileSize;
|
||||
this.imageOffset = new OpenLayers.Pixel(0, 0);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -119,15 +119,17 @@ OpenLayers.Layer.MapServer.prototype =
|
||||
bounds = this.adjustBounds(bounds);
|
||||
// Make a list, so that getFullRequestString uses literal ","
|
||||
var extent = [bounds.left, bounds. bottom, bounds.right, bounds.top];
|
||||
|
||||
var imageSize = this.getImageSize();
|
||||
|
||||
// make lists, so that literal ','s are used
|
||||
var url = this.getFullRequestString(
|
||||
{mapext: extent,
|
||||
imgext: extent,
|
||||
map_size: [this.imageSize.w, this.imageSize.h],
|
||||
imgx: this.imageSize.w / 2,
|
||||
imgy: this.imageSize.h / 2,
|
||||
imgxy: [this.imageSize.w, this.imageSize.h]
|
||||
map_size: [imageSize.w, imageSize.h],
|
||||
imgx: imageSize.w / 2,
|
||||
imgy: imageSize.h / 2,
|
||||
imgxy: [imageSize.w, imageSize.h]
|
||||
});
|
||||
|
||||
return url;
|
||||
|
||||
@@ -125,16 +125,13 @@ OpenLayers.Layer.MapServer.Untiled.prototype =
|
||||
|
||||
/**
|
||||
* Method: setTileSize
|
||||
* Set the tile size based on the map size. This also sets layer.imageSize
|
||||
* and layer.imageOffset for use by Tile.Image.
|
||||
* Set the tile size based on the map size.
|
||||
*/
|
||||
setTileSize: function() {
|
||||
var tileSize = this.map.getSize();
|
||||
tileSize.w = tileSize.w * this.ratio;
|
||||
tileSize.h = tileSize.h * this.ratio;
|
||||
this.tileSize = tileSize;
|
||||
this.imageSize = tileSize;
|
||||
this.imageOffset = new OpenLayers.Pixel(0, 0);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -142,10 +142,12 @@ OpenLayers.Layer.WMS.prototype =
|
||||
*/
|
||||
getURL: function (bounds) {
|
||||
bounds = this.adjustBounds(bounds);
|
||||
|
||||
var imageSize = this.getImageSize();
|
||||
return this.getFullRequestString(
|
||||
{BBOX:bounds.toBBOX(),
|
||||
WIDTH:this.imageSize.w,
|
||||
HEIGHT:this.imageSize.h});
|
||||
WIDTH:imageSize.w,
|
||||
HEIGHT:imageSize.h});
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -147,16 +147,13 @@ OpenLayers.Layer.WMS.Untiled.prototype =
|
||||
|
||||
/**
|
||||
* Method: setTileSize
|
||||
* Set the tile size based on the map size. This also sets layer.imageSize
|
||||
* and layer.imageOffset for use by Tile.Image.
|
||||
* Set the tile size based on the map size.
|
||||
*/
|
||||
setTileSize: function() {
|
||||
var tileSize = this.map.getSize();
|
||||
tileSize.w = tileSize.w * this.ratio;
|
||||
tileSize.h = tileSize.h * this.ratio;
|
||||
this.tileSize = tileSize;
|
||||
this.imageSize = tileSize;
|
||||
this.imageOffset = new OpenLayers.Pixel(0, 0);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user