fix serverResolutions if not provided
This commit is contained in:
@@ -133,14 +133,18 @@ OpenLayers.Layer.Zoomify = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
this.tierImageSize.reverse();
|
this.tierImageSize.reverse();
|
||||||
|
|
||||||
this.numberOfTiers = this.tierSizeInTiles.length;
|
this.numberOfTiers = this.tierSizeInTiles.length;
|
||||||
|
var resolutions = [1];
|
||||||
this.tileCountUpToTier = [0];
|
this.tileCountUpToTier = [0];
|
||||||
for (var i = 1; i < this.numberOfTiers; i++) {
|
for (var i = 1; i < this.numberOfTiers; i++) {
|
||||||
|
resolutions.unshift(Math.pow(2, i));
|
||||||
this.tileCountUpToTier.push(
|
this.tileCountUpToTier.push(
|
||||||
this.tierSizeInTiles[i-1].w * this.tierSizeInTiles[i-1].h +
|
this.tierSizeInTiles[i-1].w * this.tierSizeInTiles[i-1].h +
|
||||||
this.tileCountUpToTier[i-1]
|
this.tileCountUpToTier[i-1]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (!this.serverResolutions) {
|
||||||
|
this.serverResolutions = resolutions;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user