Merge pull request #1889 from abrlam/master

fileFormat is no longer hard coded in Zoomify Tile Source
This commit is contained in:
Ian Gilman 2020-11-20 15:10:32 -08:00 committed by GitHub
commit 6648e8fe88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,6 +48,11 @@
options.tileSize = 256; options.tileSize = 256;
} }
if(typeof options.fileFormat === 'undefined'){
options.fileFormat = 'jpg';
this.fileFormat = options.fileFormat;
}
var currentImageSize = { var currentImageSize = {
x: options.width, x: options.width,
y: options.height y: options.height
@ -135,7 +140,7 @@
var result = 0; var result = 0;
var num = this._calculateAbsoluteTileNumber(level, x, y); var num = this._calculateAbsoluteTileNumber(level, x, y);
result = Math.floor(num / 256); result = Math.floor(num / 256);
return this.tilesUrl + 'TileGroup' + result + '/' + level + '-' + x + '-' + y + '.jpg'; return this.tilesUrl + 'TileGroup' + result + '/' + level + '-' + x + '-' + y + '.' + this.fileFormat;
} }
}); });