call layer.getImageSize with the tile bounds to support layer implementations
with different tile sizes at the extent edges. p=klokan, r=me (closes #2324) git-svn-id: http://svn.openlayers.org/trunk/openlayers@9756 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -555,12 +555,17 @@ OpenLayers.Layer = OpenLayers.Class({
|
||||
|
||||
/**
|
||||
* APIMethod: getImageSize
|
||||
*
|
||||
* Parameters:
|
||||
* bounds - {<OpenLayers.Bounds>} optional tile bounds, can be used
|
||||
* by subclasses that have to deal with different tile sizes at the
|
||||
* layer extent edges (e.g. Zoomify)
|
||||
*
|
||||
* Returns:
|
||||
* {<OpenLayers.Size>} The size that the image should be, taking into
|
||||
* account gutters.
|
||||
*/
|
||||
getImageSize: function() {
|
||||
getImageSize: function(bounds) {
|
||||
return (this.imageSize || this.tileSize);
|
||||
},
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
|
||||
this.backBufferTile.position = this.position;
|
||||
this.backBufferTile.bounds = this.bounds;
|
||||
this.backBufferTile.size = this.size;
|
||||
this.backBufferTile.imageSize = this.layer.imageSize || this.size;
|
||||
this.backBufferTile.imageSize = this.layer.getImageSize(this.bounds) || this.size;
|
||||
this.backBufferTile.imageOffset = this.layer.imageOffset;
|
||||
this.backBufferTile.resolution = this.layer.getResolution();
|
||||
this.backBufferTile.renderTile();
|
||||
@@ -324,7 +324,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
|
||||
OpenLayers.Util.modifyDOMElement(this.frame,
|
||||
null, this.position, this.size);
|
||||
|
||||
var imageSize = this.layer.getImageSize();
|
||||
var imageSize = this.layer.getImageSize(this.bounds);
|
||||
if (this.layerAlphaHack) {
|
||||
OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,
|
||||
null, null, imageSize, this.url);
|
||||
@@ -356,7 +356,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
|
||||
initImgDiv: function() {
|
||||
|
||||
var offset = this.layer.imageOffset;
|
||||
var size = this.layer.getImageSize();
|
||||
var size = this.layer.getImageSize(this.bounds);
|
||||
|
||||
if (this.layerAlphaHack) {
|
||||
this.imgDiv = OpenLayers.Util.createAlphaImageDiv(null,
|
||||
|
||||
Reference in New Issue
Block a user