From 20d772e70b6e819946ab8289ab03d758d434c2ab Mon Sep 17 00:00:00 2001 From: Samuel Rothstein Date: Wed, 9 Jun 2021 10:45:07 -0700 Subject: [PATCH 01/12] updated equestImage and the constructor in WebMapTileServiceImageryProvider.js to address issue #9598 --- .../Scene/WebMapTileServiceImageryProvider.js | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Source/Scene/WebMapTileServiceImageryProvider.js b/Source/Scene/WebMapTileServiceImageryProvider.js index 2b3c14755ca6..49430797648f 100644 --- a/Source/Scene/WebMapTileServiceImageryProvider.js +++ b/Source/Scene/WebMapTileServiceImageryProvider.js @@ -228,13 +228,21 @@ function WebMapTileServiceImageryProvider(options) { var style = options.style; var tileMatrixSetID = options.tileMatrixSetID; var url = resource.url; - if (url.indexOf("{") >= 0) { - var templateValues = { - style: style, - Style: style, - TileMatrixSet: tileMatrixSetID, - }; - + var templateValues = { + style: style, + Style: style, + TileMatrixSet: tileMatrixSetID, + }; + + //If there is only one "{s}" in the url and there are no other keywords (i.e. "{" only appears once) -> it is safe to use KVP + if ( + (url.match(/{s}/g) || []).length == 1 && + (url.match(/{/g) || []).length == 1 + ) { + resource.setTemplateValues(templateValues); + this._useKvp = true; //It is safe to use KVP + } else if (url.indexOf("{") >= 0) { + //else continue like we are now resource.setTemplateValues(templateValues); this._useKvp = false; } else { @@ -372,6 +380,8 @@ function requestImage(imageryProvider, col, row, level, request, interval) { queryParameters: query, request: request, }); + //When useKvp is true, replace the {s} keyword in the requested URL. QUESTIONS: modify `resource`? Should I replace {s} with ""? + resource.url = resource.url.replace("{s}", ""); } return ImageryProvider.loadImage(imageryProvider, resource); From 4cd25b43cf52c29be2d4b1e4846cde53694fb3d8 Mon Sep 17 00:00:00 2001 From: Samuel Rothstein Date: Wed, 9 Jun 2021 11:00:20 -0700 Subject: [PATCH 02/12] updated format in WebMapTileServiceImageryProvider.js From 1b7ceb873c8d9a0c59b4fb13ef5bde9f3138c8f9 Mon Sep 17 00:00:00 2001 From: Samuel Rothstein Date: Wed, 9 Jun 2021 17:50:37 -0700 Subject: [PATCH 03/12] updated CHANGES.md, added a spec to WebMapTileServiceImageryProviderSpec.js, removed unnecessary comments from WebMapTileServiceImageryProvider.js --- CHANGES.md | 1 + .../Scene/WebMapTileServiceImageryProvider.js | 6 +-- .../WebMapTileServiceImageryProviderSpec.js | 51 +++++++++++++++++++ 3 files changed, 54 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 58abf0ffafc0..6bf9c413d82b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,7 @@ ##### Fixes :wrench: +- Fixed the `subdomains` feature that is provided by `UrlTemplateImageryProvider`and available to `WebMapServiceImageryProvider` and `WebMapTileServiceImageryProvider`. [#9606](https://github.com/CesiumGS/cesium/pull/9606) - Fixed an issue in `ScreenSpaceCameraController.tilt3DOnTerrain` that caused unexpected camera behavior when tilting terrain diagonally along the screen. [#9562](https://github.com/CesiumGS/cesium/pull/9562) - Fixed error handling in `GlobeSurfaceTile` to print terrain tile request errors to console. [#9570](https://github.com/CesiumGS/cesium/pull/9570) - Fixed broken image URL in the KML Sandcastle. [#9579](https://github.com/CesiumGS/cesium/pull/9579) diff --git a/Source/Scene/WebMapTileServiceImageryProvider.js b/Source/Scene/WebMapTileServiceImageryProvider.js index 49430797648f..7eb1ae711c4f 100644 --- a/Source/Scene/WebMapTileServiceImageryProvider.js +++ b/Source/Scene/WebMapTileServiceImageryProvider.js @@ -234,15 +234,13 @@ function WebMapTileServiceImageryProvider(options) { TileMatrixSet: tileMatrixSetID, }; - //If there is only one "{s}" in the url and there are no other keywords (i.e. "{" only appears once) -> it is safe to use KVP if ( (url.match(/{s}/g) || []).length == 1 && (url.match(/{/g) || []).length == 1 ) { resource.setTemplateValues(templateValues); - this._useKvp = true; //It is safe to use KVP + this._useKvp = true; } else if (url.indexOf("{") >= 0) { - //else continue like we are now resource.setTemplateValues(templateValues); this._useKvp = false; } else { @@ -380,7 +378,7 @@ function requestImage(imageryProvider, col, row, level, request, interval) { queryParameters: query, request: request, }); - //When useKvp is true, replace the {s} keyword in the requested URL. QUESTIONS: modify `resource`? Should I replace {s} with ""? + resource.url = resource.url.replace("{s}", ""); } diff --git a/Specs/Scene/WebMapTileServiceImageryProviderSpec.js b/Specs/Scene/WebMapTileServiceImageryProviderSpec.js index d31c5e4220c9..e1e1f9a1522f 100644 --- a/Specs/Scene/WebMapTileServiceImageryProviderSpec.js +++ b/Specs/Scene/WebMapTileServiceImageryProviderSpec.js @@ -86,6 +86,57 @@ describe("Scene/WebMapTileServiceImageryProvider", function () { expect(parseInt(queryObject.tilerow, 10)).toEqual(tilerow); }); + it("generates expected tile urls for subdomains", function () { + var options = { + url: "http://wmts{s}.invalid", + format: "image/png", + layer: "someLayer", + style: "someStyle", + tileMatrixSetID: "someTMS", + tileMatrixLabels: ["first", "second", "third"], + }; + + var provider = new WebMapTileServiceImageryProvider(options); + + spyOn(ImageryProvider, "loadImage"); + + var tilecol = 12; + var tilerow = 5; + var level = 1; + provider.requestImage(tilecol, tilerow, level); + var uri = new Uri(ImageryProvider.loadImage.calls.mostRecent().args[1].url); + var queryObject = queryToObject(uri.query); + + expect(queryObject.request).toEqual("GetTile"); + expect(queryObject.service).toEqual("WMTS"); + expect(queryObject.version).toEqual("1.0.0"); + expect(queryObject.format).toEqual(options.format); + expect(queryObject.layer).toEqual(options.layer); + expect(queryObject.style).toEqual(options.style); + expect(parseInt(queryObject.tilecol, 10)).toEqual(tilecol); + expect(queryObject.tilematrixset).toEqual(options.tileMatrixSetID); + expect(queryObject.tilematrix).toEqual(options.tileMatrixLabels[level]); + expect(parseInt(queryObject.tilerow, 10)).toEqual(tilerow); + + tilecol = 1; + tilerow = 3; + level = 2; + provider.requestImage(tilecol, tilerow, level); + uri = new Uri(ImageryProvider.loadImage.calls.mostRecent().args[1].url); + queryObject = queryToObject(uri.query); + + expect(queryObject.request).toEqual("GetTile"); + expect(queryObject.service).toEqual("WMTS"); + expect(queryObject.version).toEqual("1.0.0"); + expect(queryObject.format).toEqual(options.format); + expect(queryObject.layer).toEqual(options.layer); + expect(queryObject.style).toEqual(options.style); + expect(parseInt(queryObject.tilecol, 10)).toEqual(tilecol); + expect(queryObject.tilematrixset).toEqual(options.tileMatrixSetID); + expect(queryObject.tilematrix).toEqual(options.tileMatrixLabels[level]); + expect(parseInt(queryObject.tilerow, 10)).toEqual(tilerow); + }); + it("supports subdomains string urls", function () { var options = { url: "{s}", From c52411260ebead3d712863d85e1f6b87283d14ff Mon Sep 17 00:00:00 2001 From: Samuel Rothstein Date: Wed, 9 Jun 2021 18:00:49 -0700 Subject: [PATCH 04/12] fixed two minor bugs --- Source/Scene/WebMapTileServiceImageryProvider.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Scene/WebMapTileServiceImageryProvider.js b/Source/Scene/WebMapTileServiceImageryProvider.js index 7eb1ae711c4f..7422f21dfd14 100644 --- a/Source/Scene/WebMapTileServiceImageryProvider.js +++ b/Source/Scene/WebMapTileServiceImageryProvider.js @@ -235,8 +235,8 @@ function WebMapTileServiceImageryProvider(options) { }; if ( - (url.match(/{s}/g) || []).length == 1 && - (url.match(/{/g) || []).length == 1 + (url.match(/{s}/g) || []).length === 1 && + (url.match(/{/g) || []).length === 1 ) { resource.setTemplateValues(templateValues); this._useKvp = true; From 1cd16333a9963e222a253f3cd9ecc278e9c8db4a Mon Sep 17 00:00:00 2001 From: Sam Rothstein <39531367+srothst1@users.noreply.github.com> Date: Thu, 10 Jun 2021 15:44:55 -0700 Subject: [PATCH 05/12] Updated CHANGES.md with more specific details Co-authored-by: Eli Bogomolny <31491650+ebogo1@users.noreply.github.com> --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 6bf9c413d82b..751009cde8d0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,7 +10,7 @@ ##### Fixes :wrench: -- Fixed the `subdomains` feature that is provided by `UrlTemplateImageryProvider`and available to `WebMapServiceImageryProvider` and `WebMapTileServiceImageryProvider`. [#9606](https://github.com/CesiumGS/cesium/pull/9606) +- Fixed an issue in `WebMapTileServiceImageryProvider` where using URL subdomains caused query parameters to be dropped from requests. [#9606](https://github.com/CesiumGS/cesium/pull/9606) - Fixed an issue in `ScreenSpaceCameraController.tilt3DOnTerrain` that caused unexpected camera behavior when tilting terrain diagonally along the screen. [#9562](https://github.com/CesiumGS/cesium/pull/9562) - Fixed error handling in `GlobeSurfaceTile` to print terrain tile request errors to console. [#9570](https://github.com/CesiumGS/cesium/pull/9570) - Fixed broken image URL in the KML Sandcastle. [#9579](https://github.com/CesiumGS/cesium/pull/9579) From a6fa2e3b90c9e106beee7f75e5d07c83ee8f02ee Mon Sep 17 00:00:00 2001 From: Samuel Rothstein Date: Thu, 10 Jun 2021 15:55:33 -0700 Subject: [PATCH 06/12] changed WebMapTileServiceImageryProvider.js to avoid creating an emptry array --- .../Scene/WebMapTileServiceImageryProvider.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/Source/Scene/WebMapTileServiceImageryProvider.js b/Source/Scene/WebMapTileServiceImageryProvider.js index 7422f21dfd14..9e0e13b6ed82 100644 --- a/Source/Scene/WebMapTileServiceImageryProvider.js +++ b/Source/Scene/WebMapTileServiceImageryProvider.js @@ -11,12 +11,6 @@ import when from "../ThirdParty/when.js"; import ImageryProvider from "./ImageryProvider.js"; import TimeDynamicImagery from "./TimeDynamicImagery.js"; -var defaultParameters = Object.freeze({ - service: "WMTS", - version: "1.0.0", - request: "GetTile", -}); - /** * @typedef {Object} WebMapTileServiceImageryProvider.ConstructorOptions * @@ -234,18 +228,17 @@ function WebMapTileServiceImageryProvider(options) { TileMatrixSet: tileMatrixSetID, }; + var bracketMatch = url.match(/{/g); if ( - (url.match(/{s}/g) || []).length === 1 && - (url.match(/{/g) || []).length === 1 + !defined(bracketMatch) || + (bracketMatch.length === 1 && /{s}/.test(url)) ) { - resource.setTemplateValues(templateValues); + // No brackets or 1 bracket and it belongs to {s} this._useKvp = true; - } else if (url.indexOf("{") >= 0) { + } else { + // A bracket not belonging to {s} resource.setTemplateValues(templateValues); this._useKvp = false; - } else { - resource.setQueryParameters(defaultParameters); - this._useKvp = true; } this._resource = resource; From 54fd143d445aa6c2ebd06869bcc0ce436bc572ec Mon Sep 17 00:00:00 2001 From: Samuel Rothstein Date: Thu, 10 Jun 2021 16:23:18 -0700 Subject: [PATCH 07/12] updated resource when _useKvp is true --- .../Scene/WebMapTileServiceImageryProvider.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Source/Scene/WebMapTileServiceImageryProvider.js b/Source/Scene/WebMapTileServiceImageryProvider.js index 9e0e13b6ed82..2fed1ccfd739 100644 --- a/Source/Scene/WebMapTileServiceImageryProvider.js +++ b/Source/Scene/WebMapTileServiceImageryProvider.js @@ -328,19 +328,18 @@ function requestImage(imageryProvider, col, row, level, request, interval) { var staticDimensions = imageryProvider._dimensions; var dynamicIntervalData = defined(interval) ? interval.data : undefined; - var resource; + var resource = imageryProvider._resource.getDerivedResource({ + request: request, + }); if (!imageryProvider._useKvp) { - var templateValues = { + var templateValuesKvpFalse = { TileMatrix: tileMatrix, TileRow: row.toString(), TileCol: col.toString(), s: subdomains[(col + row + level) % subdomains.length], }; - resource = imageryProvider._resource.getDerivedResource({ - request: request, - }); - resource.setTemplateValues(templateValues); + resource.setTemplateValues(templateValuesKvpFalse); if (defined(staticDimensions)) { resource.setTemplateValues(staticDimensions); @@ -352,6 +351,9 @@ function requestImage(imageryProvider, col, row, level, request, interval) { } else { // build KVP request var query = {}; + var templateValuesKvpTrue = { + s: subdomains[(col + row + level) % subdomains.length], + }; query.tilematrix = tileMatrix; query.layer = imageryProvider._layer; query.style = imageryProvider._style; @@ -367,12 +369,13 @@ function requestImage(imageryProvider, col, row, level, request, interval) { if (defined(dynamicIntervalData)) { query = combine(query, dynamicIntervalData); } + + resource.setTemplateValues(templateValuesKvpTrue); + resource = imageryProvider._resource.getDerivedResource({ queryParameters: query, request: request, }); - - resource.url = resource.url.replace("{s}", ""); } return ImageryProvider.loadImage(imageryProvider, resource); From c153a07cb35ea18b69428fe8912901856ffa3a74 Mon Sep 17 00:00:00 2001 From: Samuel Rothstein Date: Thu, 10 Jun 2021 17:25:37 -0700 Subject: [PATCH 08/12] updated WebMapTileServiceImageryProvider.js after meeting with Eli --- Source/Scene/WebMapTileServiceImageryProvider.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Source/Scene/WebMapTileServiceImageryProvider.js b/Source/Scene/WebMapTileServiceImageryProvider.js index 2fed1ccfd739..3870e9506796 100644 --- a/Source/Scene/WebMapTileServiceImageryProvider.js +++ b/Source/Scene/WebMapTileServiceImageryProvider.js @@ -11,6 +11,12 @@ import when from "../ThirdParty/when.js"; import ImageryProvider from "./ImageryProvider.js"; import TimeDynamicImagery from "./TimeDynamicImagery.js"; +var defaultParameters = Object.freeze({ + service: "WMTS", + version: "1.0.0", + request: "GetTile", +}); + /** * @typedef {Object} WebMapTileServiceImageryProvider.ConstructorOptions * @@ -233,10 +239,9 @@ function WebMapTileServiceImageryProvider(options) { !defined(bracketMatch) || (bracketMatch.length === 1 && /{s}/.test(url)) ) { - // No brackets or 1 bracket and it belongs to {s} + resource.setQueryParameters(defaultParameters); this._useKvp = true; } else { - // A bracket not belonging to {s} resource.setTemplateValues(templateValues); this._useKvp = false; } @@ -370,12 +375,12 @@ function requestImage(imageryProvider, col, row, level, request, interval) { query = combine(query, dynamicIntervalData); } - resource.setTemplateValues(templateValuesKvpTrue); - resource = imageryProvider._resource.getDerivedResource({ queryParameters: query, request: request, }); + + resource.setTemplateValues(templateValuesKvpTrue); } return ImageryProvider.loadImage(imageryProvider, resource); From 0af44fde3eb71064432883cab880a8f33de294a2 Mon Sep 17 00:00:00 2001 From: Eli Bogomolny Date: Fri, 11 Jun 2021 15:00:41 -0400 Subject: [PATCH 09/12] clean up WMTS provider --- .../Scene/WebMapTileServiceImageryProvider.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Source/Scene/WebMapTileServiceImageryProvider.js b/Source/Scene/WebMapTileServiceImageryProvider.js index 3870e9506796..804277a371ca 100644 --- a/Source/Scene/WebMapTileServiceImageryProvider.js +++ b/Source/Scene/WebMapTileServiceImageryProvider.js @@ -333,18 +333,20 @@ function requestImage(imageryProvider, col, row, level, request, interval) { var staticDimensions = imageryProvider._dimensions; var dynamicIntervalData = defined(interval) ? interval.data : undefined; - var resource = imageryProvider._resource.getDerivedResource({ - request: request, - }); + var resource; + var templateValues; if (!imageryProvider._useKvp) { - var templateValuesKvpFalse = { + templateValues = { TileMatrix: tileMatrix, TileRow: row.toString(), TileCol: col.toString(), s: subdomains[(col + row + level) % subdomains.length], }; - resource.setTemplateValues(templateValuesKvpFalse); + resource = imageryProvider._resource.getDerivedResource({ + request: request, + }); + resource.setTemplateValues(templateValues); if (defined(staticDimensions)) { resource.setTemplateValues(staticDimensions); @@ -356,7 +358,7 @@ function requestImage(imageryProvider, col, row, level, request, interval) { } else { // build KVP request var query = {}; - var templateValuesKvpTrue = { + templateValues = { s: subdomains[(col + row + level) % subdomains.length], }; query.tilematrix = tileMatrix; @@ -379,8 +381,7 @@ function requestImage(imageryProvider, col, row, level, request, interval) { queryParameters: query, request: request, }); - - resource.setTemplateValues(templateValuesKvpTrue); + resource.setTemplateValues(templateValues); } return ImageryProvider.loadImage(imageryProvider, resource); From 52abbc3e835cd5d193de8d1d42672ede35752a02 Mon Sep 17 00:00:00 2001 From: Eli Bogomolny Date: Fri, 11 Jun 2021 15:04:15 -0400 Subject: [PATCH 10/12] Move some variables in WMTS provider --- .../Scene/WebMapTileServiceImageryProvider.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Source/Scene/WebMapTileServiceImageryProvider.js b/Source/Scene/WebMapTileServiceImageryProvider.js index 804277a371ca..303614375c11 100644 --- a/Source/Scene/WebMapTileServiceImageryProvider.js +++ b/Source/Scene/WebMapTileServiceImageryProvider.js @@ -228,11 +228,6 @@ function WebMapTileServiceImageryProvider(options) { var style = options.style; var tileMatrixSetID = options.tileMatrixSetID; var url = resource.url; - var templateValues = { - style: style, - Style: style, - TileMatrixSet: tileMatrixSetID, - }; var bracketMatch = url.match(/{/g); if ( @@ -242,6 +237,12 @@ function WebMapTileServiceImageryProvider(options) { resource.setQueryParameters(defaultParameters); this._useKvp = true; } else { + var templateValues = { + style: style, + Style: style, + TileMatrixSet: tileMatrixSetID, + }; + resource.setTemplateValues(templateValues); this._useKvp = false; } @@ -358,9 +359,6 @@ function requestImage(imageryProvider, col, row, level, request, interval) { } else { // build KVP request var query = {}; - templateValues = { - s: subdomains[(col + row + level) % subdomains.length], - }; query.tilematrix = tileMatrix; query.layer = imageryProvider._layer; query.style = imageryProvider._style; @@ -377,6 +375,10 @@ function requestImage(imageryProvider, col, row, level, request, interval) { query = combine(query, dynamicIntervalData); } + templateValues = { + s: subdomains[(col + row + level) % subdomains.length], + }; + resource = imageryProvider._resource.getDerivedResource({ queryParameters: query, request: request, From a77748208b563f78f8a8c8d6d99b61877ccc4b4f Mon Sep 17 00:00:00 2001 From: Samuel Rothstein Date: Mon, 14 Jun 2021 13:49:05 -0700 Subject: [PATCH 11/12] updated the spec to check the URL string to ensure taht the template arguments are set correctly --- Specs/Scene/WebMapTileServiceImageryProviderSpec.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Specs/Scene/WebMapTileServiceImageryProviderSpec.js b/Specs/Scene/WebMapTileServiceImageryProviderSpec.js index e1e1f9a1522f..bea9bd3e7739 100644 --- a/Specs/Scene/WebMapTileServiceImageryProviderSpec.js +++ b/Specs/Scene/WebMapTileServiceImageryProviderSpec.js @@ -117,6 +117,9 @@ describe("Scene/WebMapTileServiceImageryProvider", function () { expect(queryObject.tilematrixset).toEqual(options.tileMatrixSetID); expect(queryObject.tilematrix).toEqual(options.tileMatrixLabels[level]); expect(parseInt(queryObject.tilerow, 10)).toEqual(tilerow); + expect(uri.scheme + "://" + uri.authority).toEqual( + "http://wmtsa.invalid" || "http://wmtsb.invalid" || "http://wmtsc.invalid" + ); tilecol = 1; tilerow = 3; @@ -135,6 +138,9 @@ describe("Scene/WebMapTileServiceImageryProvider", function () { expect(queryObject.tilematrixset).toEqual(options.tileMatrixSetID); expect(queryObject.tilematrix).toEqual(options.tileMatrixLabels[level]); expect(parseInt(queryObject.tilerow, 10)).toEqual(tilerow); + expect(uri.scheme + "://" + uri.authority).toEqual( + "http://wmtsa.invalid" || "http://wmtsb.invalid" || "http://wmtsc.invalid" + ); }); it("supports subdomains string urls", function () { From ddf78136aeb18ed02f0c972bffc27ef8ba360db1 Mon Sep 17 00:00:00 2001 From: Tom Fili Date: Tue, 15 Jun 2021 09:33:26 -0400 Subject: [PATCH 12/12] Tests tweak --- Specs/Scene/WebMapTileServiceImageryProviderSpec.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Specs/Scene/WebMapTileServiceImageryProviderSpec.js b/Specs/Scene/WebMapTileServiceImageryProviderSpec.js index bea9bd3e7739..050516e1e17f 100644 --- a/Specs/Scene/WebMapTileServiceImageryProviderSpec.js +++ b/Specs/Scene/WebMapTileServiceImageryProviderSpec.js @@ -117,11 +117,9 @@ describe("Scene/WebMapTileServiceImageryProvider", function () { expect(queryObject.tilematrixset).toEqual(options.tileMatrixSetID); expect(queryObject.tilematrix).toEqual(options.tileMatrixLabels[level]); expect(parseInt(queryObject.tilerow, 10)).toEqual(tilerow); - expect(uri.scheme + "://" + uri.authority).toEqual( - "http://wmtsa.invalid" || "http://wmtsb.invalid" || "http://wmtsc.invalid" - ); + expect(uri.authority).toEqual("wmtsa.invalid"); - tilecol = 1; + tilecol = 2; tilerow = 3; level = 2; provider.requestImage(tilecol, tilerow, level); @@ -138,9 +136,7 @@ describe("Scene/WebMapTileServiceImageryProvider", function () { expect(queryObject.tilematrixset).toEqual(options.tileMatrixSetID); expect(queryObject.tilematrix).toEqual(options.tileMatrixLabels[level]); expect(parseInt(queryObject.tilerow, 10)).toEqual(tilerow); - expect(uri.scheme + "://" + uri.authority).toEqual( - "http://wmtsa.invalid" || "http://wmtsb.invalid" || "http://wmtsc.invalid" - ); + expect(uri.authority).toEqual("wmtsb.invalid"); }); it("supports subdomains string urls", function () {