mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +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) {
|
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;
|
return options;
|
||||||
@ -151,7 +152,7 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead
|
|||||||
* @param {Number} y
|
* @param {Number} y
|
||||||
*/
|
*/
|
||||||
getTileUrl: function( level, x, 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() {
|
asyncTest('IIIF 1.0 JSON', function() {
|
||||||
testOpen('iiif1_0.json');
|
testOpen('iiif1_0.json');
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user