From d9ddc5f65d5b6397e914b264176fe4d3664e4db7 Mon Sep 17 00:00:00 2001 From: esmondb Date: Sat, 31 May 2014 08:30:25 +0100 Subject: [PATCH] Fix for IIPServer style urls when using DZI. --- src/dzitilesource.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dzitilesource.js b/src/dzitilesource.js index daed278e..5ef2585e 100644 --- a/src/dzitilesource.js +++ b/src/dzitilesource.js @@ -138,7 +138,12 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead if (url && !options.tilesUrl) { options.tilesUrl = url.replace(/([^\/]+)\.(dzi|xml|js)(\?.*|$)/, '$1_files/'); - options.queryParams = url.match(/\?.*/); + + if (url.search(/\.(dzi|xml|js)\?/) != -1) { + options.queryParams = url.match(/\?.*/); + }else{ + options.queryParams = ''; + } } return options;