No more percentage based positioning.
Client zoom now supports both over- and undersampling.
This commit is contained in:
@@ -212,11 +212,15 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
|
||||
positionTile: function() {
|
||||
var style = this.getTile().style,
|
||||
size = this.frame ? this.size :
|
||||
this.layer.getImageSize(this.bounds);
|
||||
style.left = this.position.x + "%";
|
||||
style.top = this.position.y + "%";
|
||||
style.width = size.w + "%";
|
||||
style.height = size.h + "%";
|
||||
this.layer.getImageSize(this.bounds),
|
||||
ratio = 1;
|
||||
if (this.layer instanceof OpenLayers.Layer.Grid) {
|
||||
ratio = this.layer.getServerResolution() / this.layer.map.getResolution();
|
||||
}
|
||||
style.left = (this.position.x | 0) + "px";
|
||||
style.top = (this.position.y | 0) + "px";
|
||||
style.width = Math.round(ratio * size.w) + "px";
|
||||
style.height = Math.round(ratio * size.h) + "px";
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user