fix serverResolutions if not provided

This commit is contained in:
dregade
2012-06-29 09:22:54 +02:00
parent 7b91c9c26f
commit 74f9a943cc

View File

@@ -133,14 +133,18 @@ OpenLayers.Layer.Zoomify = OpenLayers.Class(OpenLayers.Layer.Grid, {
this.tierImageSize.reverse();
this.numberOfTiers = this.tierSizeInTiles.length;
var resolutions = [1];
this.tileCountUpToTier = [0];
for (var i = 1; i < this.numberOfTiers; i++) {
resolutions.unshift(Math.pow(2, i));
this.tileCountUpToTier.push(
this.tierSizeInTiles[i-1].w * this.tierSizeInTiles[i-1].h +
this.tileCountUpToTier[i-1]
);
}
if (!this.serverResolutions) {
this.serverResolutions = resolutions;
}
},
/**