mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
Merge pull request #378 from heathn/dziQueryParams
Support query parameters in DZI tileSource URL
This commit is contained in:
commit
82d5de2127
@ -137,7 +137,8 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead
|
||||
}
|
||||
|
||||
if (url && !options.tilesUrl) {
|
||||
options.tilesUrl = url.replace(/([^\/]+)\.(dzi|xml|js)$/, '$1_files/');
|
||||
options.tilesUrl = url.replace(/([^\/]+)\.(dzi|xml|js)(\?.*|$)/, '$1_files/');
|
||||
options.queryParams = url.match(/\?.*/);
|
||||
}
|
||||
|
||||
return options;
|
||||
@ -151,7 +152,7 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead
|
||||
* @param {Number} y
|
||||
*/
|
||||
getTileUrl: function( level, x, y ) {
|
||||
return [ this.tilesUrl, level, '/', x, '_', y, '.', this.fileFormat ].join( '' );
|
||||
return [ this.tilesUrl, level, '/', x, '_', y, '.', this.fileFormat, this.queryParams ].join( '' );
|
||||
},
|
||||
|
||||
|
||||
|
@ -66,6 +66,11 @@
|
||||
});
|
||||
|
||||
// ----------
|
||||
asyncTest('DZI XML with query parameter', function() {
|
||||
testOpen('testpattern.xml?param=value');
|
||||
});
|
||||
|
||||
// ----------
|
||||
asyncTest('IIIF 1.0 JSON', function() {
|
||||
testOpen('iiif1_0.json');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user