@opengeoweb/webmap 6.0.0 → 6.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,6 +29,302 @@ function _iterableToArrayLimit(arr, i) {
29
29
  return _arr;
30
30
  }
31
31
  }
32
+ function _regeneratorRuntime() {
33
+ _regeneratorRuntime = function () {
34
+ return exports;
35
+ };
36
+ var exports = {},
37
+ Op = Object.prototype,
38
+ hasOwn = Op.hasOwnProperty,
39
+ defineProperty = Object.defineProperty || function (obj, key, desc) {
40
+ obj[key] = desc.value;
41
+ },
42
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
43
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
44
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
45
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
46
+ function define(obj, key, value) {
47
+ return Object.defineProperty(obj, key, {
48
+ value: value,
49
+ enumerable: !0,
50
+ configurable: !0,
51
+ writable: !0
52
+ }), obj[key];
53
+ }
54
+ try {
55
+ define({}, "");
56
+ } catch (err) {
57
+ define = function (obj, key, value) {
58
+ return obj[key] = value;
59
+ };
60
+ }
61
+ function wrap(innerFn, outerFn, self, tryLocsList) {
62
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
63
+ generator = Object.create(protoGenerator.prototype),
64
+ context = new Context(tryLocsList || []);
65
+ return defineProperty(generator, "_invoke", {
66
+ value: makeInvokeMethod(innerFn, self, context)
67
+ }), generator;
68
+ }
69
+ function tryCatch(fn, obj, arg) {
70
+ try {
71
+ return {
72
+ type: "normal",
73
+ arg: fn.call(obj, arg)
74
+ };
75
+ } catch (err) {
76
+ return {
77
+ type: "throw",
78
+ arg: err
79
+ };
80
+ }
81
+ }
82
+ exports.wrap = wrap;
83
+ var ContinueSentinel = {};
84
+ function Generator() {}
85
+ function GeneratorFunction() {}
86
+ function GeneratorFunctionPrototype() {}
87
+ var IteratorPrototype = {};
88
+ define(IteratorPrototype, iteratorSymbol, function () {
89
+ return this;
90
+ });
91
+ var getProto = Object.getPrototypeOf,
92
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
93
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
94
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
95
+ function defineIteratorMethods(prototype) {
96
+ ["next", "throw", "return"].forEach(function (method) {
97
+ define(prototype, method, function (arg) {
98
+ return this._invoke(method, arg);
99
+ });
100
+ });
101
+ }
102
+ function AsyncIterator(generator, PromiseImpl) {
103
+ function invoke(method, arg, resolve, reject) {
104
+ var record = tryCatch(generator[method], generator, arg);
105
+ if ("throw" !== record.type) {
106
+ var result = record.arg,
107
+ value = result.value;
108
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
109
+ invoke("next", value, resolve, reject);
110
+ }, function (err) {
111
+ invoke("throw", err, resolve, reject);
112
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
113
+ result.value = unwrapped, resolve(result);
114
+ }, function (error) {
115
+ return invoke("throw", error, resolve, reject);
116
+ });
117
+ }
118
+ reject(record.arg);
119
+ }
120
+ var previousPromise;
121
+ defineProperty(this, "_invoke", {
122
+ value: function (method, arg) {
123
+ function callInvokeWithMethodAndArg() {
124
+ return new PromiseImpl(function (resolve, reject) {
125
+ invoke(method, arg, resolve, reject);
126
+ });
127
+ }
128
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
129
+ }
130
+ });
131
+ }
132
+ function makeInvokeMethod(innerFn, self, context) {
133
+ var state = "suspendedStart";
134
+ return function (method, arg) {
135
+ if ("executing" === state) throw new Error("Generator is already running");
136
+ if ("completed" === state) {
137
+ if ("throw" === method) throw arg;
138
+ return {
139
+ value: void 0,
140
+ done: !0
141
+ };
142
+ }
143
+ for (context.method = method, context.arg = arg;;) {
144
+ var delegate = context.delegate;
145
+ if (delegate) {
146
+ var delegateResult = maybeInvokeDelegate(delegate, context);
147
+ if (delegateResult) {
148
+ if (delegateResult === ContinueSentinel) continue;
149
+ return delegateResult;
150
+ }
151
+ }
152
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
153
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
154
+ context.dispatchException(context.arg);
155
+ } else "return" === context.method && context.abrupt("return", context.arg);
156
+ state = "executing";
157
+ var record = tryCatch(innerFn, self, context);
158
+ if ("normal" === record.type) {
159
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
160
+ return {
161
+ value: record.arg,
162
+ done: context.done
163
+ };
164
+ }
165
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
166
+ }
167
+ };
168
+ }
169
+ function maybeInvokeDelegate(delegate, context) {
170
+ var methodName = context.method,
171
+ method = delegate.iterator[methodName];
172
+ if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
173
+ var record = tryCatch(method, delegate.iterator, context.arg);
174
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
175
+ var info = record.arg;
176
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
177
+ }
178
+ function pushTryEntry(locs) {
179
+ var entry = {
180
+ tryLoc: locs[0]
181
+ };
182
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
183
+ }
184
+ function resetTryEntry(entry) {
185
+ var record = entry.completion || {};
186
+ record.type = "normal", delete record.arg, entry.completion = record;
187
+ }
188
+ function Context(tryLocsList) {
189
+ this.tryEntries = [{
190
+ tryLoc: "root"
191
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
192
+ }
193
+ function values(iterable) {
194
+ if (iterable || "" === iterable) {
195
+ var iteratorMethod = iterable[iteratorSymbol];
196
+ if (iteratorMethod) return iteratorMethod.call(iterable);
197
+ if ("function" == typeof iterable.next) return iterable;
198
+ if (!isNaN(iterable.length)) {
199
+ var i = -1,
200
+ next = function next() {
201
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
202
+ return next.value = undefined, next.done = !0, next;
203
+ };
204
+ return next.next = next;
205
+ }
206
+ }
207
+ throw new TypeError(typeof iterable + " is not iterable");
208
+ }
209
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
210
+ value: GeneratorFunctionPrototype,
211
+ configurable: !0
212
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
213
+ value: GeneratorFunction,
214
+ configurable: !0
215
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
216
+ var ctor = "function" == typeof genFun && genFun.constructor;
217
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
218
+ }, exports.mark = function (genFun) {
219
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
220
+ }, exports.awrap = function (arg) {
221
+ return {
222
+ __await: arg
223
+ };
224
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
225
+ return this;
226
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
227
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
228
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
229
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
230
+ return result.done ? result.value : iter.next();
231
+ });
232
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
233
+ return this;
234
+ }), define(Gp, "toString", function () {
235
+ return "[object Generator]";
236
+ }), exports.keys = function (val) {
237
+ var object = Object(val),
238
+ keys = [];
239
+ for (var key in object) keys.push(key);
240
+ return keys.reverse(), function next() {
241
+ for (; keys.length;) {
242
+ var key = keys.pop();
243
+ if (key in object) return next.value = key, next.done = !1, next;
244
+ }
245
+ return next.done = !0, next;
246
+ };
247
+ }, exports.values = values, Context.prototype = {
248
+ constructor: Context,
249
+ reset: function (skipTempReset) {
250
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
251
+ },
252
+ stop: function () {
253
+ this.done = !0;
254
+ var rootRecord = this.tryEntries[0].completion;
255
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
256
+ return this.rval;
257
+ },
258
+ dispatchException: function (exception) {
259
+ if (this.done) throw exception;
260
+ var context = this;
261
+ function handle(loc, caught) {
262
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
263
+ }
264
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
265
+ var entry = this.tryEntries[i],
266
+ record = entry.completion;
267
+ if ("root" === entry.tryLoc) return handle("end");
268
+ if (entry.tryLoc <= this.prev) {
269
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
270
+ hasFinally = hasOwn.call(entry, "finallyLoc");
271
+ if (hasCatch && hasFinally) {
272
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
273
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
274
+ } else if (hasCatch) {
275
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
276
+ } else {
277
+ if (!hasFinally) throw new Error("try statement without catch or finally");
278
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
279
+ }
280
+ }
281
+ }
282
+ },
283
+ abrupt: function (type, arg) {
284
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
285
+ var entry = this.tryEntries[i];
286
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
287
+ var finallyEntry = entry;
288
+ break;
289
+ }
290
+ }
291
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
292
+ var record = finallyEntry ? finallyEntry.completion : {};
293
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
294
+ },
295
+ complete: function (record, afterLoc) {
296
+ if ("throw" === record.type) throw record.arg;
297
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
298
+ },
299
+ finish: function (finallyLoc) {
300
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
301
+ var entry = this.tryEntries[i];
302
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
303
+ }
304
+ },
305
+ catch: function (tryLoc) {
306
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
307
+ var entry = this.tryEntries[i];
308
+ if (entry.tryLoc === tryLoc) {
309
+ var record = entry.completion;
310
+ if ("throw" === record.type) {
311
+ var thrown = record.arg;
312
+ resetTryEntry(entry);
313
+ }
314
+ return thrown;
315
+ }
316
+ }
317
+ throw new Error("illegal catch attempt");
318
+ },
319
+ delegateYield: function (iterable, resultName, nextLoc) {
320
+ return this.delegate = {
321
+ iterator: values(iterable),
322
+ resultName: resultName,
323
+ nextLoc: nextLoc
324
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
325
+ }
326
+ }, exports;
327
+ }
32
328
  function _typeof$1(obj) {
33
329
  "@babel/helpers - typeof";
34
330
 
@@ -216,7 +512,22 @@ function __rest(s, e) {
216
512
  t[p[i]] = s[p[i]];
217
513
  }
218
514
  return t;
219
- }
515
+ }
516
+
517
+ function __awaiter(thisArg, _arguments, P, generator) {
518
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
519
+ return new (P || (P = Promise))(function (resolve, reject) {
520
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
521
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
522
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
523
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
524
+ });
525
+ }
526
+
527
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
528
+ var e = new Error(message);
529
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
530
+ };
220
531
 
221
532
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
222
533
 
@@ -17820,9 +18131,11 @@ var makeNodeLayerFromWMSGetCapabilityLayer = function makeNodeLayerFromWMSGetCap
17820
18131
  }
17821
18132
  return undefined;
17822
18133
  })) : [];
18134
+ var layerName = layer.Name ? layer.Name.value : null;
18135
+ var layerTitle = layer.Title ? layer.Title.value : layerName;
17823
18136
  return {
17824
- name: layer.Name ? layer.Name.value : null,
17825
- title: layer.Title ? layer.Title.value : 'Layer',
18137
+ name: layerName,
18138
+ title: layerTitle || 'Layer',
17826
18139
  leaf: isleaf,
17827
18140
  path: path,
17828
18141
  keywords: toArray(layer.KeywordList && layer.KeywordList.Keyword).map(function (keywords) {
@@ -25258,13 +25571,22 @@ var moment$1 = {exports: {}};
25258
25571
 
25259
25572
  var moment = moment$1.exports;
25260
25573
 
25574
+ function _typeof(obj) {
25575
+ "@babel/helpers - typeof";
25576
+
25577
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
25578
+ return typeof obj;
25579
+ } : function (obj) {
25580
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
25581
+ }, _typeof(obj);
25582
+ }
25583
+
25261
25584
  function requiredArgs(required, args) {
25262
25585
  if (args.length < required) {
25263
25586
  throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
25264
25587
  }
25265
25588
  }
25266
25589
 
25267
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
25268
25590
  /**
25269
25591
  * @name toDate
25270
25592
  * @category Common Helpers
@@ -25295,11 +25617,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
25295
25617
  * const result = toDate(1392098430000)
25296
25618
  * //=> Tue Feb 11 2014 11:30:30
25297
25619
  */
25298
-
25299
25620
  function toDate(argument) {
25300
25621
  requiredArgs(1, arguments);
25301
- var argStr = Object.prototype.toString.call(argument); // Clone the date
25622
+ var argStr = Object.prototype.toString.call(argument);
25302
25623
 
25624
+ // Clone the date
25303
25625
  if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {
25304
25626
  // Prevent the date to lose the milliseconds when passed to new Date() in IE10
25305
25627
  return new Date(argument.getTime());
@@ -25308,11 +25630,10 @@ function toDate(argument) {
25308
25630
  } else {
25309
25631
  if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
25310
25632
  // eslint-disable-next-line no-console
25311
- console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"); // eslint-disable-next-line no-console
25312
-
25633
+ console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");
25634
+ // eslint-disable-next-line no-console
25313
25635
  console.warn(new Error().stack);
25314
25636
  }
25315
-
25316
25637
  return new Date(NaN);
25317
25638
  }
25318
25639
  }
@@ -25360,12 +25681,12 @@ function isWithinInterval(dirtyDate, interval) {
25360
25681
  requiredArgs(2, arguments);
25361
25682
  var time = toDate(dirtyDate).getTime();
25362
25683
  var startTime = toDate(interval.start).getTime();
25363
- var endTime = toDate(interval.end).getTime(); // Throw an exception if start date is after end date or if any date is `Invalid Date`
25684
+ var endTime = toDate(interval.end).getTime();
25364
25685
 
25686
+ // Throw an exception if start date is after end date or if any date is `Invalid Date`
25365
25687
  if (!(startTime <= endTime)) {
25366
25688
  throw new RangeError('Invalid interval');
25367
25689
  }
25368
-
25369
25690
  return time >= startTime && time <= endTime;
25370
25691
  }
25371
25692
 
@@ -31409,4 +31730,1078 @@ var WMLayer = /*#__PURE__*/function () {
31409
31730
  return WMLayer;
31410
31731
  }();
31411
31732
 
31412
- export { DateInterval, DebugType, I18n, LayerType, ParseISOTimeRangeDuration, URLDecode, URLEncode, WMBBOX, WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMEmptyLayerName, WMEmptyLayerTitle, WMGetServiceFromStore, WMImage, WMImageEventType, WMJSDimension, WMJSMap, WMJSService, WMJScheckURL, WMLayer, WMTimer, clearImageCache, debug, getLegendGraphicURLForLayer, getMapImageStore, isDefined, legendImageStore, parseISO8601DateToDate, parseISO8601IntervalToDateInterval, toArray };
31733
+ /* *
31734
+ * Licensed under the Apache License, Version 2.0 (the "License");
31735
+ * you may not use this file except in compliance with the License.
31736
+ * You may obtain a copy of the License at
31737
+ *
31738
+ * http://www.apache.org/licenses/LICENSE-2.0
31739
+ *
31740
+ * Unless required by applicable law or agreed to in writing, software
31741
+ * distributed under the License is distributed on an "AS IS" BASIS,
31742
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31743
+ * See the License for the specific language governing permissions and
31744
+ * limitations under the License.
31745
+ *
31746
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
31747
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
31748
+ * */
31749
+ var WmMultiDimensionLayer = new WMLayer({
31750
+ service: 'https://testservice',
31751
+ id: 'multiDimensionLayerMock',
31752
+ name: 'MULTI_DIMENSION_LAYER',
31753
+ title: 'MULTI_DIMENSION_LAYER',
31754
+ layerType: LayerType.mapLayer,
31755
+ enabled: true,
31756
+ dimensions: [{
31757
+ name: 'flight level',
31758
+ units: 'hft',
31759
+ currentValue: '625',
31760
+ values: '25,325,625'
31761
+ }, {
31762
+ name: 'elevation',
31763
+ units: 'meters',
31764
+ currentValue: '9000',
31765
+ values: '1000,5000,9000'
31766
+ }, {
31767
+ name: 'time',
31768
+ units: 'ISO8601',
31769
+ currentValue: '2020-03-13T14:40:00Z',
31770
+ values: '2020-03-13T10:40:00Z/2020-03-13T14:40:00Z/PT5M'
31771
+ }]
31772
+ });
31773
+ var layerWithoutTimeDimension = {
31774
+ service: 'https://testservice',
31775
+ id: 'layerWithoutTime',
31776
+ name: 'LAYER_WITHOUT_TIME',
31777
+ layerType: LayerType.mapLayer,
31778
+ dimensions: [{
31779
+ name: 'flight level',
31780
+ units: 'hft',
31781
+ currentValue: '625',
31782
+ values: '25,325,625'
31783
+ }]
31784
+ };
31785
+ var WmLayerWithoutTimeDimension = new WMLayer(layerWithoutTimeDimension);
31786
+ var crsListForRADNL25PCPCMLayer = [{
31787
+ name: 'EPSG:3411',
31788
+ bbox: {
31789
+ left: 2682754.74362,
31790
+ right: 3759536.917562,
31791
+ bottom: -3245034.014141,
31792
+ top: -2168251.989038
31793
+ }
31794
+ }, {
31795
+ name: 'EPSG:3412',
31796
+ bbox: {
31797
+ left: 0,
31798
+ right: 7413041.166015,
31799
+ bottom: 32318824.826266,
31800
+ top: 40075258.815074
31801
+ }
31802
+ }, {
31803
+ name: 'EPSG:3575',
31804
+ bbox: {
31805
+ left: -770622.801471,
31806
+ right: 56845.766135,
31807
+ bottom: -4485814.811314,
31808
+ top: -3684039.44362
31809
+ }
31810
+ }, {
31811
+ name: 'EPSG:3857',
31812
+ bbox: {
31813
+ left: 0,
31814
+ right: 1208534.698398,
31815
+ bottom: 6257115.219364,
31816
+ top: 7553161.958695
31817
+ }
31818
+ }, {
31819
+ name: 'EPSG:4258',
31820
+ bbox: {
31821
+ left: 0,
31822
+ right: 10.856452,
31823
+ bottom: 48.895303,
31824
+ top: 55.9736
31825
+ }
31826
+ }, {
31827
+ name: 'EPSG:4326',
31828
+ bbox: {
31829
+ left: 0,
31830
+ right: 10.856452,
31831
+ bottom: 48.895303,
31832
+ top: 55.9736
31833
+ }
31834
+ }, {
31835
+ name: 'CRS:84',
31836
+ bbox: {
31837
+ left: 0,
31838
+ right: 10.856452,
31839
+ bottom: 48.895303,
31840
+ top: 55.9736
31841
+ }
31842
+ }, {
31843
+ name: 'EPSG:25831',
31844
+ bbox: {
31845
+ left: 282182.345905,
31846
+ right: 997135.658653,
31847
+ bottom: 5433247.394267,
31848
+ top: 6207204.592736
31849
+ }
31850
+ }, {
31851
+ name: 'EPSG:25832',
31852
+ bbox: {
31853
+ left: -153083.019482,
31854
+ right: 617595.626092,
31855
+ bottom: 5415817.312927,
31856
+ top: 6239769.309937
31857
+ }
31858
+ }, {
31859
+ name: 'EPSG:28992',
31860
+ bbox: {
31861
+ left: -236275.338083,
31862
+ right: 501527.918656,
31863
+ bottom: 106727.731651,
31864
+ top: 900797.079725
31865
+ }
31866
+ }, {
31867
+ name: 'EPSG:7399',
31868
+ bbox: {
31869
+ left: 0,
31870
+ right: 763611.971696,
31871
+ bottom: 5757301.056717,
31872
+ top: 6483919.801602
31873
+ }
31874
+ }, {
31875
+ name: 'EPSG:50001',
31876
+ bbox: {
31877
+ left: -2000000,
31878
+ right: 10000000,
31879
+ bottom: -2000000,
31880
+ top: 8500000
31881
+ }
31882
+ }, {
31883
+ name: 'EPSG:54030',
31884
+ bbox: {
31885
+ left: 0,
31886
+ right: 853649.695106,
31887
+ bottom: 5211855.054125,
31888
+ top: 5936394.291427
31889
+ }
31890
+ }, {
31891
+ name: 'EPSG:32661',
31892
+ bbox: {
31893
+ left: 2000000,
31894
+ right: 2745713.040381,
31895
+ bottom: -2703305.597319,
31896
+ top: -1888346.21671
31897
+ }
31898
+ }, {
31899
+ name: 'EPSG:40000',
31900
+ bbox: {
31901
+ left: 0,
31902
+ right: 750214.326339,
31903
+ bottom: -4731695.771951,
31904
+ top: -3911817.119426
31905
+ }
31906
+ }, {
31907
+ name: 'EPSG:900913',
31908
+ bbox: {
31909
+ left: 0,
31910
+ right: 1208534.698398,
31911
+ bottom: 6257115.219364,
31912
+ top: 7553161.958695
31913
+ }
31914
+ }, {
31915
+ name: 'PROJ4:%2Bproj%3Dstere%20%2Blat_0%3D90%20%2Blon_0%3D0%20%2Blat_ts%3D60%20%2Ba%3D6378%2E14%20%2Bb%3D6356%2E75%20%2Bx_0%3D0%20y_0%3D0',
31916
+ bbox: {
31917
+ left: 0,
31918
+ right: 700.00242,
31919
+ bottom: -3649.999338,
31920
+ top: -4415.002986
31921
+ }
31922
+ }];
31923
+ var styleListForRADNL25PCPCMLayer = [{
31924
+ title: 'radar/nearest',
31925
+ name: 'radar/nearest',
31926
+ legendURL: 'https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=radar/nearest',
31927
+ "abstract": 'No abstract available'
31928
+ }, {
31929
+ title: 'precip-rainbow/nearest',
31930
+ name: 'precip-rainbow/nearest',
31931
+ legendURL: 'https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=precip-rainbow/nearest',
31932
+ "abstract": 'No abstract available'
31933
+ }, {
31934
+ title: 'precip-gray/nearest',
31935
+ name: 'precip-gray/nearest',
31936
+ legendURL: 'https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=precip-gray/nearest',
31937
+ "abstract": 'No abstract available'
31938
+ }, {
31939
+ title: 'precip-blue/nearest',
31940
+ name: 'precip-blue/nearest',
31941
+ legendURL: 'https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=precip-blue/nearest',
31942
+ "abstract": 'No abstract available'
31943
+ }, {
31944
+ title: 'precip-blue-transparent/nearest',
31945
+ name: 'precip-blue-transparent/nearest',
31946
+ legendURL: 'https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=precip-blue-transparent/nearest',
31947
+ "abstract": 'No abstract available'
31948
+ }, {
31949
+ title: 'precip-with-range/nearest',
31950
+ name: 'precip-with-range/nearest',
31951
+ legendURL: 'https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=precip-with-range/nearest',
31952
+ "abstract": 'No abstract available'
31953
+ }];
31954
+
31955
+ var testSettings = /*#__PURE__*/Object.freeze({
31956
+ __proto__: null,
31957
+ WmMultiDimensionLayer: WmMultiDimensionLayer,
31958
+ layerWithoutTimeDimension: layerWithoutTimeDimension,
31959
+ WmLayerWithoutTimeDimension: WmLayerWithoutTimeDimension,
31960
+ crsListForRADNL25PCPCMLayer: crsListForRADNL25PCPCMLayer,
31961
+ styleListForRADNL25PCPCMLayer: styleListForRADNL25PCPCMLayer
31962
+ });
31963
+
31964
+ /* *
31965
+ * Licensed under the Apache License, Version 2.0 (the "License");
31966
+ * you may not use this file except in compliance with the License.
31967
+ * You may obtain a copy of the License at
31968
+ *
31969
+ * http://www.apache.org/licenses/LICENSE-2.0
31970
+ *
31971
+ * Unless required by applicable law or agreed to in writing, software
31972
+ * distributed under the License is distributed on an "AS IS" BASIS,
31973
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31974
+ * See the License for the specific language governing permissions and
31975
+ * limitations under the License.
31976
+ *
31977
+ * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
31978
+ * Copyright 2020 - Finnish Meteorological Institute (FMI)
31979
+ * */
31980
+ var tilesettings = {
31981
+ WorldMap_Light_Grey_Canvas: {
31982
+ 'EPSG:3857': {
31983
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap_Light_Grey_Canvas/EPSG3857/',
31984
+ minLevel: 0,
31985
+ maxLevel: 9,
31986
+ tileServerType: 'osm',
31987
+ copyRight: 'Natural Earth II | Ingmapping'
31988
+ }
31989
+ },
31990
+ OpenStreetMap_NL: {
31991
+ 'EPSG:3857': {
31992
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OpenStreetMap_NL/EPSG3857/',
31993
+ minLevel: 0,
31994
+ maxLevel: 16,
31995
+ tileServerType: 'osm',
31996
+ copyRight: 'OpenStreetMap - contributors | Ingmapping'
31997
+ }
31998
+ },
31999
+ OpenStreets_NL: {
32000
+ 'EPSG:3857': {
32001
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OpenStreets_NL/EPSG3857/',
32002
+ minLevel: 0,
32003
+ maxLevel: 16,
32004
+ tileServerType: 'osm',
32005
+ copyRight: 'OpenStreetMap - contributors | Ingmapping'
32006
+ },
32007
+ 'EPSG:28992': {
32008
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OpenStreets_NL/EPSG28992/',
32009
+ minLevel: 0,
32010
+ maxLevel: 16,
32011
+ tileServerType: 'osm',
32012
+ copyRight: 'Natural Earth II | Ingmapping'
32013
+ }
32014
+ },
32015
+ Positron_NL: {
32016
+ 'EPSG:3857': {
32017
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/Positron_NL/EPSG3857/',
32018
+ minLevel: 0,
32019
+ maxLevel: 16,
32020
+ tileServerType: 'osm',
32021
+ copyRight: 'OpenStreetMap - contributors | OpenMapTiles | Ingmapping'
32022
+ }
32023
+ },
32024
+ Positron_NL_NoLabels: {
32025
+ 'EPSG:3857': {
32026
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/Positron_NL_NoLabels/EPSG3857/',
32027
+ minLevel: 0,
32028
+ maxLevel: 16,
32029
+ tileServerType: 'osm',
32030
+ copyRight: 'OpenStreetMap - contributors | OpenMapTiles | Ingmapping'
32031
+ }
32032
+ },
32033
+ Klokantech_Basic_NL: {
32034
+ 'EPSG:3857': {
32035
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/Klokantech_Basic_NL/EPSG3857/',
32036
+ minLevel: 0,
32037
+ maxLevel: 16,
32038
+ tileServerType: 'osm',
32039
+ copyRight: 'OpenStreetMap - contributors | OpenMapTiles | Ingmapping'
32040
+ }
32041
+ },
32042
+ Klokantech_Basic_NL_NoLabels: {
32043
+ 'EPSG:3857': {
32044
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/Klokantech_Basic_NL_NoLabels/EPSG3857/',
32045
+ minLevel: 0,
32046
+ maxLevel: 16,
32047
+ tileServerType: 'osm',
32048
+ copyRight: 'OpenStreetMap - contributors | OpenMapTiles | Ingmapping'
32049
+ }
32050
+ },
32051
+ OSM_Blossom_NL: {
32052
+ 'EPSG:3857': {
32053
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OSM_Blossom_NL/EPSG3857/',
32054
+ minLevel: 0,
32055
+ maxLevel: 16,
32056
+ tileServerType: 'osm',
32057
+ copyRight: 'OpenStreetMap - contributors | Ingmapping'
32058
+ }
32059
+ },
32060
+ WorldMap: {
32061
+ 'EPSG:3857': {
32062
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG3857/',
32063
+ minLevel: 0,
32064
+ maxLevel: 9,
32065
+ tileServerType: 'osm',
32066
+ copyRight: 'Natural Earth II | Ingmapping'
32067
+ },
32068
+ 'TODO__EPSG:4326': {
32069
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG4326/',
32070
+ minLevel: 0,
32071
+ maxLevel: 9,
32072
+ origX: -180,
32073
+ origY: 90,
32074
+ resolution: 1.422222,
32075
+ tileServerType: 'osm',
32076
+ copyRight: 'Natural Earth II | Ingmapping'
32077
+ },
32078
+ 'EPSG:3411': {
32079
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG3411/',
32080
+ minLevel: 3,
32081
+ maxLevel: 9,
32082
+ tileServerType: 'osm',
32083
+ copyRight: 'Natural Earth II | Ingmapping'
32084
+ },
32085
+ 'EPSG:28992': {
32086
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG28992/',
32087
+ minLevel: 5,
32088
+ maxLevel: 9,
32089
+ tileServerType: 'osm',
32090
+ copyRight: 'Natural Earth II | Ingmapping'
32091
+ },
32092
+ 'EPSG:3412': {
32093
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG3412/',
32094
+ minLevel: 3,
32095
+ maxLevel: 9,
32096
+ tileServerType: 'osm',
32097
+ copyRight: 'Natural Earth II | Ingmapping'
32098
+ },
32099
+ 'EPSG:32661': {
32100
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG32661/',
32101
+ minLevel: 4,
32102
+ maxLevel: 9,
32103
+ tileServerType: 'osm',
32104
+ copyRight: 'Natural Earth II | Ingmapping'
32105
+ },
32106
+ 'EPSG:54030': {
32107
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG54030/',
32108
+ minLevel: 3,
32109
+ maxLevel: 9,
32110
+ tileServerType: 'osm',
32111
+ copyRight: 'Natural Earth II | Ingmapping'
32112
+ },
32113
+ 'EPSG:3575': {
32114
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG3575/',
32115
+ minLevel: 5,
32116
+ maxLevel: 9,
32117
+ tileServerType: 'osm',
32118
+ copyRight: 'Natural Earth II | Ingmapping'
32119
+ }
32120
+ },
32121
+ OSM_Antarctica: {
32122
+ 'EPSG:3412': {
32123
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OSM_Antarctica/EPSG3412/',
32124
+ minLevel: 1,
32125
+ maxLevel: 7,
32126
+ origX: -3000000,
32127
+ origY: 3000000,
32128
+ resolution: 23437.5,
32129
+ tileServerType: 'osm',
32130
+ copyRight: 'OpenStreetMap - contributors | Ingmapping'
32131
+ }
32132
+ },
32133
+ arcGisCanvas: {
32134
+ title: 'ArcGIS canvas map',
32135
+ 'EPSG:3857': {
32136
+ home: 'https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/',
32137
+ minLevel: 1,
32138
+ maxLevel: 16,
32139
+ tileServerType: 'arcgisonline',
32140
+ copyRight: 'Basemap copyright: 2013 ESRI, DeLorme, NAVTEQ'
32141
+ },
32142
+ 'EPSG:28992': {
32143
+ home: 'https://services.arcgisonline.com/arcgis/rest/services/Basiskaarten/Canvas/MapServer/tile/',
32144
+ minLevel: 1,
32145
+ maxLevel: 12,
32146
+ origX: -285401.92,
32147
+ origY: 903401.92,
32148
+ resolution: 3440.64,
32149
+ tileServerType: 'arcgisonline',
32150
+ copyRight: 'Basiskaart bronnen: ESRI Nederland, ESRI, Kadaster, CBS en Rijkswaterstaat'
32151
+ }
32152
+ },
32153
+ arcGisTopo: {
32154
+ title: 'ArcGIS topo map',
32155
+ 'EPSG:3857': {
32156
+ home: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/',
32157
+ minLevel: 1,
32158
+ maxLevel: 19,
32159
+ tileServerType: 'arcgisonline',
32160
+ copyRight: 'Basemap sources: ESRI, DeLorme, NAVTEQ, TomTom, Intermap, increment P Corp., GEBCO, USGS, FAO, NPS, NRCAN, GeoBase, IGN, Kadaster NL, Ordnance Survey, ESRI Japan, METI, ESRI China (Hong Kong), and the GIS User Community'
32161
+ },
32162
+ 'EPSG:28992': {
32163
+ home: 'https://services.arcgisonline.com/arcgis/rest/services/Basiskaarten/Topo/MapServer/tile/',
32164
+ minLevel: 1,
32165
+ maxLevel: 12,
32166
+ origX: -285401.92,
32167
+ origY: 903401.92,
32168
+ resolution: 3440.64,
32169
+ tileServerType: 'arcgisonline',
32170
+ copyRight: 'Basiskaart bronnen: ESRI Nederland, ESRI, Kadaster, CBS, Min VROM, Rijkswaterstaat en gemeenten: Rotterdam, Breda, Tilburg'
32171
+ }
32172
+ },
32173
+ arcGisOceanBaseMap: {
32174
+ 'EPSG:3857': {
32175
+ title: 'ArcGIS ocean map',
32176
+ home: 'https://services.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/tile/',
32177
+ minLevel: 1,
32178
+ maxLevel: 19,
32179
+ tileServerType: 'arcgisonline',
32180
+ copyRight: 'Basemap sources: ESRI, GEBCO, NOAA, National Geographic, DeLorme, NAVTEQ, Geonames.org, and other contributors'
32181
+ }
32182
+ },
32183
+ arcGisSat: {
32184
+ title: 'ArcGIS satellite map',
32185
+ 'EPSG:4326': {
32186
+ home: 'https://services.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/tile/',
32187
+ minLevel: 1,
32188
+ maxLevel: 15,
32189
+ tileServerType: 'arcgisonline',
32190
+ origX: -180,
32191
+ origY: 90,
32192
+ resolution: 0.3515625,
32193
+ tileSize: 512,
32194
+ copyRight: 'ESRI'
32195
+ },
32196
+ 'EPSG:3857': {
32197
+ home: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/',
32198
+ minLevel: 1,
32199
+ maxLevel: 18,
32200
+ tileServerType: 'arcgisonline',
32201
+ copyRight: 'ESRI'
32202
+ }
32203
+ },
32204
+ OpenStreetMap_Service: {
32205
+ title: 'OpenStreetMap Service',
32206
+ 'EPSG:3857': {
32207
+ home: 'https://b.tile.openstreetmap.org/',
32208
+ minLevel: 1,
32209
+ maxLevel: 16,
32210
+ tileServerType: 'osm',
32211
+ copyRight: 'OpenStreetMap - contributors'
32212
+ },
32213
+ 'EPSG:28992': {
32214
+ home: 'https://services.arcgisonline.com/ArcGIS/rest/services/Basiskaarten/PDOK_BRT/MapServer/tile/',
32215
+ minLevel: 1,
32216
+ maxLevel: 12,
32217
+ origX: -285401.92,
32218
+ origY: 903401.92,
32219
+ resolution: 3440.64,
32220
+ tileServerType: 'arcgisonline',
32221
+ copyRight: 'Basiskaart bronnen: PDOK, Kadaster, OpenStreetMap'
32222
+ }
32223
+ },
32224
+ NaturalEarth2: {
32225
+ 'EPSG:3411': {
32226
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG3411/',
32227
+ minLevel: 1,
32228
+ maxLevel: 6,
32229
+ origX: -12400000,
32230
+ origY: 12400000,
32231
+ resolution: 96875,
32232
+ tileServerType: 'wmst',
32233
+ copyRight: 'NPS - Natural Earth II'
32234
+ },
32235
+ 'EPSG:3412': {
32236
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG3412/',
32237
+ minLevel: 1,
32238
+ maxLevel: 6,
32239
+ origX: -12400000,
32240
+ origY: 12400000,
32241
+ resolution: 96875,
32242
+ tileServerType: 'wmst',
32243
+ copyRight: 'NPS - Natural Earth II'
32244
+ },
32245
+ 'EPSG:3575': {
32246
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG3575/',
32247
+ minLevel: 1,
32248
+ maxLevel: 6,
32249
+ origX: -13000000,
32250
+ origY: 13000000,
32251
+ resolution: 101562.5,
32252
+ tileServerType: 'wmst',
32253
+ copyRight: 'NPS - Natural Earth II'
32254
+ },
32255
+ 'EPSG:3857': {
32256
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG3857/',
32257
+ minLevel: 1,
32258
+ maxLevel: 7,
32259
+ tileServerType: 'wmst',
32260
+ copyRight: 'NPS - Natural Earth II'
32261
+ },
32262
+ 'EPSG:4258': {
32263
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG4326/',
32264
+ minLevel: 1,
32265
+ maxLevel: 6,
32266
+ origX: -180,
32267
+ origY: 90,
32268
+ resolution: 0.703125,
32269
+ tileServerType: 'wmst',
32270
+ copyRight: 'NPS - Natural Earth II'
32271
+ },
32272
+ 'EPSG:4326': {
32273
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG4326/',
32274
+ minLevel: 1,
32275
+ maxLevel: 6,
32276
+ origX: -180,
32277
+ origY: 90,
32278
+ resolution: 0.703125,
32279
+ tileServerType: 'wmst',
32280
+ copyRight: 'NPS - Natural Earth II'
32281
+ },
32282
+ 'EPSG:28992': {
32283
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG28992/',
32284
+ minLevel: 1,
32285
+ maxLevel: 5,
32286
+ origX: -2999000,
32287
+ origY: 2995500,
32288
+ resolution: 23437,
32289
+ tileServerType: 'wmst',
32290
+ copyRight: 'NPS - Natural Earth II'
32291
+ },
32292
+ 'EPSG:32661': {
32293
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG32661/',
32294
+ minLevel: 1,
32295
+ maxLevel: 7,
32296
+ origX: -5000000,
32297
+ origY: 4000000,
32298
+ resolution: 58593.75,
32299
+ tileServerType: 'wmst',
32300
+ copyRight: 'NPS - Natural Earth II'
32301
+ },
32302
+ 'EPSG:54030': {
32303
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG54030/',
32304
+ minLevel: 1,
32305
+ maxLevel: 7,
32306
+ origX: -17000000,
32307
+ origY: 8625830,
32308
+ resolution: 132812.5,
32309
+ tileServerType: 'wmst',
32310
+ copyRight: 'NPS - Natural Earth II'
32311
+ }
32312
+ }
32313
+ };
32314
+
32315
+ /* *
32316
+ * Licensed under the Apache License, Version 2.0 (the "License");
32317
+ * you may not use this file except in compliance with the License.
32318
+ * You may obtain a copy of the License at
32319
+ *
32320
+ * http://www.apache.org/licenses/LICENSE-2.0
32321
+ *
32322
+ * Unless required by applicable law or agreed to in writing, software
32323
+ * distributed under the License is distributed on an "AS IS" BASIS,
32324
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32325
+ * See the License for the specific language governing permissions and
32326
+ * limitations under the License.
32327
+ *
32328
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
32329
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
32330
+ * */
32331
+ var generatedLayerIds = 0;
32332
+ var generateLayerId = function generateLayerId() {
32333
+ generatedLayerIds += 1;
32334
+ return "layerid_".concat(generatedLayerIds);
32335
+ };
32336
+ var generatedMapIds = 0;
32337
+ var generateMapId = function generateMapId() {
32338
+ generatedMapIds += 1;
32339
+ return "mapid_".concat(generatedMapIds);
32340
+ };
32341
+ var generatedTimesliderIds = 0;
32342
+ var generateTimesliderId = function generateTimesliderId() {
32343
+ generatedTimesliderIds += 1;
32344
+ return "timesliderid_".concat(generatedTimesliderIds);
32345
+ };
32346
+ /**
32347
+ * Map for registering wmlayers with their id's
32348
+ */
32349
+ var registeredWMLayersForReactLayerId = {};
32350
+ /**
32351
+ * Registers a WMJSLayer in a lookuptable with a layerId
32352
+ * @param {WMLayer} wmLayer
32353
+ * @param {string} layerId
32354
+ */
32355
+ var registerWMLayer = function registerWMLayer(wmLayer, layerId) {
32356
+ registeredWMLayersForReactLayerId[layerId] = wmLayer;
32357
+ };
32358
+ /**
32359
+ * Get the WMLayer from the lookuptable with layerId
32360
+ * @param {string} layerId
32361
+ */
32362
+ var getWMLayerById = function getWMLayerById(layerId) {
32363
+ return registeredWMLayersForReactLayerId[layerId];
32364
+ };
32365
+ var unRegisterWMJSLayer = function unRegisterWMJSLayer(layerId) {
32366
+ var layer = registeredWMLayersForReactLayerId[layerId];
32367
+ if (layer) {
32368
+ delete registeredWMLayersForReactLayerId[layerId];
32369
+ }
32370
+ };
32371
+ var unRegisterAllWMJSLayersAndMaps = function unRegisterAllWMJSLayersAndMaps() {
32372
+ var allLayerIds = Object.keys(registeredWMLayersForReactLayerId);
32373
+ allLayerIds.forEach(function (layerId) {
32374
+ unRegisterWMJSLayer(layerId);
32375
+ });
32376
+ var allMapIds = Object.keys(registeredWMMapForReactMapId);
32377
+ allMapIds.forEach(function (mapId) {
32378
+ unRegisterWMJSMap(mapId);
32379
+ });
32380
+ };
32381
+ /**
32382
+ * Map for registering wmlayers with their id's
32383
+ */
32384
+ var registeredWMMapForReactMapId = {};
32385
+ /**
32386
+ * Registers a WMJSMap in a lookuptable with a wmjsMapId
32387
+ * @param {WMJSMap} wmjsMap
32388
+ * @param {string} wmjsMapId
32389
+ */
32390
+ var registerWMJSMap = function registerWMJSMap(wmjsMap, wmjsMapId) {
32391
+ if (registeredWMMapForReactMapId[wmjsMapId]) {
32392
+ console.warn("Map with id ".concat(wmjsMapId, " already made"));
32393
+ }
32394
+ registeredWMMapForReactMapId[wmjsMapId] = wmjsMap;
32395
+ };
32396
+ var unRegisterWMJSMap = function unRegisterWMJSMap(wmjsMapId) {
32397
+ var wmjsMap = registeredWMMapForReactMapId[wmjsMapId];
32398
+ if (wmjsMap) {
32399
+ wmjsMap.getListener().suspendEvents();
32400
+ try {
32401
+ wmjsMap.stopAnimating && wmjsMap.stopAnimating();
32402
+ } catch (e) {
32403
+ console.warn(e);
32404
+ }
32405
+ Object.keys(registeredWMLayersForReactLayerId).forEach(function (layerId) {
32406
+ var wmLayer = getWMLayerById(layerId);
32407
+ if (wmLayer.parentMap === wmjsMap) {
32408
+ unRegisterWMJSLayer(layerId);
32409
+ }
32410
+ });
32411
+ wmjsMap.destroy();
32412
+ delete registeredWMMapForReactMapId[wmjsMapId];
32413
+ }
32414
+ };
32415
+ /**
32416
+ * Get the wmjsMap from the lookuptable with wmjsMapId
32417
+ * @param {string} wmjsMapId
32418
+ */
32419
+ var getWMJSMapById = function getWMJSMapById(wmjsMapId) {
32420
+ return registeredWMMapForReactMapId[wmjsMapId];
32421
+ };
32422
+ /**
32423
+ * Returns the WMJSDimension object for given layerId and dimension name
32424
+ * @param layerId The layerId
32425
+ * @param dimensionName The dimension to lookup
32426
+ */
32427
+ var getWMJSDimensionForLayerAndDimension = function getWMJSDimensionForLayerAndDimension(layerId, dimensionName) {
32428
+ var wmLayer = getWMLayerById(layerId);
32429
+ if (!wmLayer || !dimensionName) {
32430
+ return undefined;
32431
+ }
32432
+ var wmjsDimension = wmLayer.getDimension(dimensionName);
32433
+ if (!wmjsDimension) {
32434
+ return undefined;
32435
+ }
32436
+ return wmjsDimension;
32437
+ };
32438
+ /**
32439
+ * Gets the WMJSTimeDimension for given activeLayerId and dimensions list
32440
+ * @param layerId: The layer id to search the WMJSDimension for
32441
+ * @return: The WMJSDimension if found, otherwise null
32442
+ */
32443
+ var getWMJSTimeDimensionForLayerId = function getWMJSTimeDimensionForLayerId(layerId) {
32444
+ var wmLayer = getWMLayerById(layerId);
32445
+ if (!wmLayer) {
32446
+ return null;
32447
+ }
32448
+ return wmLayer.getDimension('time');
32449
+ };
32450
+
32451
+ var utils = /*#__PURE__*/Object.freeze({
32452
+ __proto__: null,
32453
+ generateLayerId: generateLayerId,
32454
+ generateMapId: generateMapId,
32455
+ generateTimesliderId: generateTimesliderId,
32456
+ registerWMLayer: registerWMLayer,
32457
+ getWMLayerById: getWMLayerById,
32458
+ unRegisterWMJSLayer: unRegisterWMJSLayer,
32459
+ unRegisterAllWMJSLayersAndMaps: unRegisterAllWMJSLayersAndMaps,
32460
+ registerWMJSMap: registerWMJSMap,
32461
+ unRegisterWMJSMap: unRegisterWMJSMap,
32462
+ getWMJSMapById: getWMJSMapById,
32463
+ getWMJSDimensionForLayerAndDimension: getWMJSDimensionForLayerAndDimension,
32464
+ getWMJSTimeDimensionForLayerId: getWMJSTimeDimensionForLayerId
32465
+ });
32466
+
32467
+ /* *
32468
+ * Licensed under the Apache License, Version 2.0 (the "License");
32469
+ * you may not use this file except in compliance with the License.
32470
+ * You may obtain a copy of the License at
32471
+ *
32472
+ * http://www.apache.org/licenses/LICENSE-2.0
32473
+ *
32474
+ * Unless required by applicable law or agreed to in writing, software
32475
+ * distributed under the License is distributed on an "AS IS" BASIS,
32476
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32477
+ * See the License for the specific language governing permissions and
32478
+ * limitations under the License.
32479
+ *
32480
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
32481
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
32482
+ * */
32483
+ var WMS111GetCapabilitiesGeoServicesRADAR = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE WMT_MS_Capabilities SYSTEM \"http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd\" [\n <!ELEMENT VendorSpecificCapabilities EMPTY>\n]>\n<!-- end of DOCTYPE declaration -->\n<WMT_MS_Capabilities version=\"1.1.1\">\n <Service>\n <Name>OGC:WMS</Name>\n <Title>RADAR</Title>\n <Abstract>This service demonstrates how the ADAGUC server can be used to create OGC services.</Abstract>\n <ServerInfo>ADAGUCServer version 2.5.8, of Apr 13 2021 07:55:43</ServerInfo>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&amp;SERVICE=WMS&amp;\" />\n <ContactInformation />\n </Service>\n <Capability>\n <Request>\n <GetCapabilities>\n <Format>application/vnd.ogc.wms_xml</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&amp;SERVICE=WMS&amp;\" />\n </Get>\n </HTTP>\n </DCPType>\n </GetCapabilities>\n <GetMap>\n <Format>image/png</Format>\n <Format>image/gif</Format>\n <Format>image/png32</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&amp;SERVICE=WMS&amp;\" />\n </Get>\n </HTTP>\n </DCPType>\n </GetMap>\n <GetFeatureInfo>\n <Format>text/plain</Format>\n <Format>text/html</Format>\n <Format>text/xml</Format>\n <Format>application/vnd.ogc.gml</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&amp;SERVICE=WMS&amp;\" />\n </Get>\n </HTTP>\n </DCPType>\n </GetFeatureInfo>\n <DescribeLayer>\n <Format>text/xml</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&amp;SERVICE=WMS&amp;\" />\n </Get>\n </HTTP>\n </DCPType>\n </DescribeLayer>\n <GetLegendGraphic>\n <Format>image/png</Format>\n <Format>image/gif</Format>\n <Format>image/png32</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&amp;SERVICE=WMS&amp;\" />\n </Get>\n </HTTP>\n </DCPType>\n </GetLegendGraphic>\n <GetStyles>\n <Format>text/xml</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&amp;SERVICE=WMS&amp;\" />\n </Get>\n </HTTP>\n </DCPType>\n </GetStyles>\n </Request>\n <Exception>\n <Format>application/vnd.ogc.se_xml</Format>\n <Format>application/vnd.ogc.se_inimage</Format>\n <Format>application/vnd.ogc.se_blank</Format>\n </Exception>\n <VendorSpecificCapabilities />\n <UserDefinedSymbolization SupportSLD=\"1\" UserLayer=\"0\" UserStyle=\"1\" RemoteWFS=\"0\" />\n <Layer>\n <Title>WMS of RADAR</Title>\n <SRS>EPSG:3411</SRS>\n <SRS>EPSG:3412</SRS>\n <SRS>EPSG:3575</SRS>\n <SRS>EPSG:3857</SRS>\n <SRS>EPSG:4258</SRS>\n <SRS>EPSG:4326</SRS>\n <SRS>CRS:84</SRS>\n <SRS>EPSG:25831</SRS>\n <SRS>EPSG:25832</SRS>\n <SRS>EPSG:28992</SRS>\n <SRS>EPSG:7399</SRS>\n <SRS>EPSG:50001</SRS>\n <SRS>EPSG:54030</SRS>\n <SRS>EPSG:32661</SRS>\n <SRS>EPSG:40000</SRS>\n <SRS>EPSG:900913</SRS>\n <SRS>PROJ4:%2Bproj%3Dstere%20%2Blat_0%3D90%20%2Blon_0%3D0%20%2Blat_ts%3D60%20%2Ba%3D6378%2E14%20%2Bb%3D6356%2E75%20%2Bx_0%3D0%20y_0%3D0</SRS>\n <Layer queryable=\"1\" opaque=\"1\" cascaded=\"0\">\n <Name>RAD_NL25_PCP_CM</Name>\n <Title>Precipitation Radar NL</Title>\n <Abstract>Radar NL</Abstract>\n <KeywordList>\n <Keyword>Radar</Keyword>\n </KeywordList>\n <SRS>EPSG:3411</SRS>\n <BoundingBox SRS=\"EPSG:3411\" minx=\"2682754.743620\" miny=\"-3245034.014141\" maxx=\"3759536.917562\" maxy=\"-2168251.989038\" />\n <SRS>EPSG:3412</SRS>\n <BoundingBox SRS=\"EPSG:3412\" minx=\"0.000000\" miny=\"32318824.826266\" maxx=\"7413041.166015\" maxy=\"40075258.815074\" />\n <SRS>EPSG:3575</SRS>\n <BoundingBox SRS=\"EPSG:3575\" minx=\"-770622.801471\" miny=\"-4485814.811314\" maxx=\"56845.766135\" maxy=\"-3684039.443620\" />\n <SRS>EPSG:3857</SRS>\n <BoundingBox SRS=\"EPSG:3857\" minx=\"0.000000\" miny=\"6257115.219364\" maxx=\"1208534.698398\" maxy=\"7553161.958695\" />\n <SRS>EPSG:4258</SRS>\n <BoundingBox SRS=\"EPSG:4258\" minx=\"0.000000\" miny=\"48.895303\" maxx=\"10.856452\" maxy=\"55.973600\" />\n <SRS>EPSG:4326</SRS>\n <BoundingBox SRS=\"EPSG:4326\" minx=\"0.000000\" miny=\"48.895303\" maxx=\"10.856452\" maxy=\"55.973600\" />\n <SRS>CRS:84</SRS>\n <BoundingBox SRS=\"CRS:84\" minx=\"0.000000\" miny=\"48.895303\" maxx=\"10.856452\" maxy=\"55.973600\" />\n <SRS>EPSG:25831</SRS>\n <BoundingBox SRS=\"EPSG:25831\" minx=\"282182.345905\" miny=\"5433247.394267\" maxx=\"997135.658653\" maxy=\"6207204.592736\" />\n <SRS>EPSG:25832</SRS>\n <BoundingBox SRS=\"EPSG:25832\" minx=\"-153083.019482\" miny=\"5415817.312927\" maxx=\"617595.626092\" maxy=\"6239769.309937\" />\n <SRS>EPSG:28992</SRS>\n <BoundingBox SRS=\"EPSG:28992\" minx=\"-236275.338083\" miny=\"106727.731651\" maxx=\"501527.918656\" maxy=\"900797.079725\" />\n <SRS>EPSG:7399</SRS>\n <BoundingBox SRS=\"EPSG:7399\" minx=\"0.000000\" miny=\"5757301.056717\" maxx=\"763611.971696\" maxy=\"6483919.801602\" />\n <SRS>EPSG:50001</SRS>\n <BoundingBox SRS=\"EPSG:50001\" minx=\"-2000000.000000\" miny=\"-2000000.000000\" maxx=\"10000000.000000\" maxy=\"8500000.000000\" />\n <SRS>EPSG:54030</SRS>\n <BoundingBox SRS=\"EPSG:54030\" minx=\"0.000000\" miny=\"5211855.054125\" maxx=\"853649.695106\" maxy=\"5936394.291427\" />\n <SRS>EPSG:32661</SRS>\n <BoundingBox SRS=\"EPSG:32661\" minx=\"2000000.000000\" miny=\"-2703305.597319\" maxx=\"2745713.040381\" maxy=\"-1888346.216710\" />\n <SRS>EPSG:40000</SRS>\n <BoundingBox SRS=\"EPSG:40000\" minx=\"0.000000\" miny=\"-4731695.771951\" maxx=\"750214.326339\" maxy=\"-3911817.119426\" />\n <SRS>EPSG:900913</SRS>\n <BoundingBox SRS=\"EPSG:900913\" minx=\"0.000000\" miny=\"6257115.219364\" maxx=\"1208534.698398\" maxy=\"7553161.958695\" />\n <SRS>PROJ4:%2Bproj%3Dstere%20%2Blat_0%3D90%20%2Blon_0%3D0%20%2Blat_ts%3D60%20%2Ba%3D6378%2E14%20%2Bb%3D6356%2E75%20%2Bx_0%3D0%20y_0%3D0</SRS>\n <BoundingBox SRS=\"PROJ4:%2Bproj%3Dstere%20%2Blat_0%3D90%20%2Blon_0%3D0%20%2Blat_ts%3D60%20%2Ba%3D6378%2E14%20%2Bb%3D6356%2E75%20%2Bx_0%3D0%20y_0%3D0\" minx=\"0.000000\" miny=\"-3649.999338\" maxx=\"700.002420\" maxy=\"-4415.002986\" />\n <LatLonBoundingBox minx=\"0.000000\" miny=\"48.895303\" maxx=\"10.856452\" maxy=\"55.973600\" />\n <Dimension name=\"time\" units=\"ISO8601\" />\n <Extent name=\"time\" default=\"2021-05-17T00:00:00Z\" multipleValues=\"1\" nearestValue=\"0\">2021-03-31T09:25:00Z/2021-05-18T07:45:00Z/PT5M</Extent>\n <Style>\n <Name>radar/nearest</Name>\n <Title>radar/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&amp;SERVICE=WMS&amp;&amp;version=1.1.1&amp;service=WMS&amp;request=GetLegendGraphic&amp;layer=RAD_NL25_PCP_CM&amp;format=image/png&amp;STYLE=radar/nearest\" />\n </LegendURL>\n </Style>\n <Style>\n <Name>precip-rainbow/nearest</Name>\n <Title>precip-rainbow/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&amp;SERVICE=WMS&amp;&amp;version=1.1.1&amp;service=WMS&amp;request=GetLegendGraphic&amp;layer=RAD_NL25_PCP_CM&amp;format=image/png&amp;STYLE=precip-rainbow/nearest\" />\n </LegendURL>\n </Style>\n <Style>\n <Name>precip-gray/nearest</Name>\n <Title>precip-gray/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&amp;SERVICE=WMS&amp;&amp;version=1.1.1&amp;service=WMS&amp;request=GetLegendGraphic&amp;layer=RAD_NL25_PCP_CM&amp;format=image/png&amp;STYLE=precip-gray/nearest\" />\n </LegendURL>\n </Style>\n <Style>\n <Name>precip-blue/nearest</Name>\n <Title>precip-blue/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&amp;SERVICE=WMS&amp;&amp;version=1.1.1&amp;service=WMS&amp;request=GetLegendGraphic&amp;layer=RAD_NL25_PCP_CM&amp;format=image/png&amp;STYLE=precip-blue/nearest\" />\n </LegendURL>\n </Style>\n <Style>\n <Name>precip-blue-transparent/nearest</Name>\n <Title>precip-blue-transparent/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&amp;SERVICE=WMS&amp;&amp;version=1.1.1&amp;service=WMS&amp;request=GetLegendGraphic&amp;layer=RAD_NL25_PCP_CM&amp;format=image/png&amp;STYLE=precip-blue-transparent/nearest\" />\n </LegendURL>\n </Style>\n <Style>\n <Name>precip-with-range/nearest</Name>\n <Title>precip-with-range/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&amp;SERVICE=WMS&amp;&amp;version=1.1.1&amp;service=WMS&amp;request=GetLegendGraphic&amp;layer=RAD_NL25_PCP_CM&amp;format=image/png&amp;STYLE=precip-with-range/nearest\" />\n </LegendURL>\n </Style>\n <ScaleHint min=\"0\" max=\"10000\" />\n </Layer>\n </Layer>\n </Capability>\n</WMT_MS_Capabilities>";
32484
+
32485
+ var MOCK_URL_WITH_CHILDREN = 'https://mockUrlWithChildren.nl';
32486
+ var MOCK_URL_NO_CHILDREN = 'https://mockUrlNoChildren.nl';
32487
+ var MOCK_URL_WITH_NO_TITLE = 'https://mockUrlWithNoTitle.nl';
32488
+ var MOCK_URL_WITH_NO_TITLE_OR_NAME = 'https://mockUrlWithNoTitleOrName.nl/wms?';
32489
+ var MOCK_URL_WITH_SUBCATEGORY = 'https://mockUrlWithSubcategory.nl';
32490
+ var MOCK_URL_INVALID = 'https://notawmsservice.nl';
32491
+ var MOCK_URL_SLOW = 'https://slowresolve.nl';
32492
+ var MOCK_URL_SLOW_FAILS = 'https://slowreject.nl';
32493
+ var MOCK_URL_DEFAULT = 'https://defaultservice.nl';
32494
+ var MOCK_URL_DEFAULT2 = 'https://defaultservice2.nl';
32495
+ var MOCK_URL_HTTP = 'http://wmsservice.nl';
32496
+ var mockLayersNoChildren = {
32497
+ leaf: false,
32498
+ name: null,
32499
+ title: 'RADNL_OPER_R___25PCPRR_L3_WMS',
32500
+ path: [],
32501
+ children: []
32502
+ };
32503
+ var mockLayersWithChildren = {
32504
+ leaf: false,
32505
+ name: null,
32506
+ title: 'RADNL_OPER_R___25PCPRR_L3_WMS',
32507
+ path: [],
32508
+ children: [{
32509
+ leaf: true,
32510
+ name: 'RAD_NL25_PCP_CM',
32511
+ title: 'RAD_NL25_PCP_CM',
32512
+ path: [],
32513
+ children: []
32514
+ }, {
32515
+ leaf: true,
32516
+ name: 'RADNL_OPER_R___25PCPRR_L3_KNMI',
32517
+ title: 'RADNL_OPER_R___25PCPRR_L3_KNMI',
32518
+ path: [],
32519
+ children: []
32520
+ }]
32521
+ };
32522
+ var mockLayersWithNoTitle = {
32523
+ leaf: false,
32524
+ name: 'UNTITLED_WMS',
32525
+ title: null,
32526
+ path: [],
32527
+ children: []
32528
+ };
32529
+ var mockLayersWithNoTitleOrName = {
32530
+ leaf: false,
32531
+ name: null,
32532
+ title: null,
32533
+ path: [],
32534
+ children: []
32535
+ };
32536
+ var mockLayersWithSubcategory = {
32537
+ leaf: false,
32538
+ name: null,
32539
+ title: 'Service with subcategory',
32540
+ path: [],
32541
+ children: [{
32542
+ leaf: true,
32543
+ name: 'cloud_area_fraction',
32544
+ title: 'Cloud cover (flag)',
32545
+ path: [],
32546
+ children: []
32547
+ }, {
32548
+ leaf: false,
32549
+ name: null,
32550
+ title: 'Subcategory',
32551
+ path: [],
32552
+ children: [{
32553
+ leaf: true,
32554
+ name: 'baselayer',
32555
+ title: 'Baselayer (-)',
32556
+ path: ['Subcategory'],
32557
+ children: []
32558
+ }, {
32559
+ leaf: false,
32560
+ name: null,
32561
+ title: 'Klima',
32562
+ path: ['Subcategory'],
32563
+ children: [{
32564
+ leaf: true,
32565
+ name: 'haic_airports',
32566
+ title: 'HAIC Airports',
32567
+ path: ['SubcategoryKlima'],
32568
+ children: []
32569
+ }]
32570
+ }]
32571
+ }]
32572
+ };
32573
+ var mockLayersDefault = {
32574
+ leaf: false,
32575
+ name: null,
32576
+ title: 'Default title for default layer',
32577
+ path: [],
32578
+ children: []
32579
+ };
32580
+ var mockLayersDefault2 = {
32581
+ leaf: false,
32582
+ name: null,
32583
+ title: 'Default title for default 2 layer',
32584
+ path: [],
32585
+ children: []
32586
+ };
32587
+ var mockGetLayersFromService = function mockGetLayersFromService(url) {
32588
+ switch (url) {
32589
+ case MOCK_URL_WITH_CHILDREN:
32590
+ return new Promise(function (resolve) {
32591
+ resolve(mockLayersWithChildren);
32592
+ });
32593
+ case MOCK_URL_NO_CHILDREN:
32594
+ return new Promise(function (resolve) {
32595
+ resolve(mockLayersNoChildren);
32596
+ });
32597
+ case MOCK_URL_WITH_NO_TITLE:
32598
+ return new Promise(function (resolve) {
32599
+ resolve(mockLayersWithNoTitle);
32600
+ });
32601
+ case MOCK_URL_WITH_NO_TITLE_OR_NAME:
32602
+ return new Promise(function (resolve) {
32603
+ resolve(mockLayersWithNoTitleOrName);
32604
+ });
32605
+ case MOCK_URL_WITH_SUBCATEGORY:
32606
+ return new Promise(function (resolve) {
32607
+ resolve(mockLayersWithSubcategory);
32608
+ });
32609
+ case MOCK_URL_SLOW:
32610
+ return new Promise(function (resolve) {
32611
+ setTimeout(function () {
32612
+ return resolve(mockLayersWithChildren);
32613
+ }, 300);
32614
+ });
32615
+ case MOCK_URL_SLOW_FAILS:
32616
+ return new Promise(function (resolve, reject) {
32617
+ setTimeout(function () {
32618
+ return reject(new Error("Mock url '".concat(url, "' service returned an error.")));
32619
+ }, 300);
32620
+ });
32621
+ case MOCK_URL_INVALID:
32622
+ return Promise.reject(new Error("Url '".concat(url, "' is not a wms service.")));
32623
+ case MOCK_URL_HTTP:
32624
+ return Promise.reject(new Error("Url '".concat(url, "' is not https.")));
32625
+ case MOCK_URL_DEFAULT:
32626
+ return new Promise(function (resolve) {
32627
+ resolve(mockLayersDefault);
32628
+ });
32629
+ case MOCK_URL_DEFAULT2:
32630
+ return new Promise(function (resolve) {
32631
+ resolve(mockLayersDefault2);
32632
+ });
32633
+ default:
32634
+ {
32635
+ var message = "Url '".concat(url, "' is not a mock-url.");
32636
+ return Promise.reject(new Error(message));
32637
+ }
32638
+ }
32639
+ };
32640
+ var mockGetLayersFlattenedFromService = function mockGetLayersFlattenedFromService(url) {
32641
+ return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
32642
+ var layers, serviceLayers, _iterator, _step, object;
32643
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
32644
+ while (1) switch (_context.prev = _context.next) {
32645
+ case 0:
32646
+ _context.next = 2;
32647
+ return mockGetLayersFromService(url);
32648
+ case 2:
32649
+ layers = _context.sent;
32650
+ serviceLayers = []; // TODO: Maarten Plieger, 2022-11-02: Harmonize types and use correct types: https://gitlab.com/opengeoweb/opengeoweb/-/issues/2817
32651
+ _iterator = _createForOfIteratorHelper(layers.children);
32652
+ try {
32653
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
32654
+ object = _step.value;
32655
+ serviceLayers.push({
32656
+ name: object.name,
32657
+ title: object.title,
32658
+ leaf: object.leaf,
32659
+ path: object.path,
32660
+ keywords: object.keywords ? object.keywords : [],
32661
+ "abstract": object["abstract"] ? object["abstract"] : '',
32662
+ styles: object.styles ? object.styles : [],
32663
+ dimensions: object.dimensions || [],
32664
+ geographicBoundingBox: object.geographicBoundingBox || undefined
32665
+ });
32666
+ }
32667
+ } catch (err) {
32668
+ _iterator.e(err);
32669
+ } finally {
32670
+ _iterator.f();
32671
+ }
32672
+ return _context.abrupt("return", serviceLayers);
32673
+ case 7:
32674
+ case "end":
32675
+ return _context.stop();
32676
+ }
32677
+ }, _callee);
32678
+ }));
32679
+ };
32680
+
32681
+ var getCapabilities$1 = /*#__PURE__*/Object.freeze({
32682
+ __proto__: null,
32683
+ MOCK_URL_WITH_CHILDREN: MOCK_URL_WITH_CHILDREN,
32684
+ MOCK_URL_NO_CHILDREN: MOCK_URL_NO_CHILDREN,
32685
+ MOCK_URL_WITH_NO_TITLE: MOCK_URL_WITH_NO_TITLE,
32686
+ MOCK_URL_WITH_NO_TITLE_OR_NAME: MOCK_URL_WITH_NO_TITLE_OR_NAME,
32687
+ MOCK_URL_WITH_SUBCATEGORY: MOCK_URL_WITH_SUBCATEGORY,
32688
+ MOCK_URL_INVALID: MOCK_URL_INVALID,
32689
+ MOCK_URL_SLOW: MOCK_URL_SLOW,
32690
+ MOCK_URL_SLOW_FAILS: MOCK_URL_SLOW_FAILS,
32691
+ MOCK_URL_DEFAULT: MOCK_URL_DEFAULT,
32692
+ MOCK_URL_DEFAULT2: MOCK_URL_DEFAULT2,
32693
+ MOCK_URL_HTTP: MOCK_URL_HTTP,
32694
+ mockLayersNoChildren: mockLayersNoChildren,
32695
+ mockLayersWithChildren: mockLayersWithChildren,
32696
+ mockLayersWithNoTitle: mockLayersWithNoTitle,
32697
+ mockLayersWithNoTitleOrName: mockLayersWithNoTitleOrName,
32698
+ mockLayersWithSubcategory: mockLayersWithSubcategory,
32699
+ mockLayersDefault: mockLayersDefault,
32700
+ mockLayersDefault2: mockLayersDefault2,
32701
+ mockGetLayersFromService: mockGetLayersFromService,
32702
+ mockGetLayersFlattenedFromService: mockGetLayersFlattenedFromService
32703
+ });
32704
+
32705
+ /* *
32706
+ * Licensed under the Apache License, Version 2.0 (the "License");
32707
+ * you may not use this file except in compliance with the License.
32708
+ * You may obtain a copy of the License at
32709
+ *
32710
+ * http://www.apache.org/licenses/LICENSE-2.0
32711
+ *
32712
+ * Unless required by applicable law or agreed to in writing, software
32713
+ * distributed under the License is distributed on an "AS IS" BASIS,
32714
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32715
+ * See the License for the specific language governing permissions and
32716
+ * limitations under the License.
32717
+ *
32718
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
32719
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
32720
+ * */
32721
+ var mockGetCapabilities = Object.assign(Object.assign({}, getCapabilities$1), {
32722
+ WMS111GetCapabilitiesGeoServicesRADAR: WMS111GetCapabilitiesGeoServicesRADAR
32723
+ });
32724
+
32725
+ /* *
32726
+ * Licensed under the Apache License, Version 2.0 (the "License");
32727
+ * you may not use this file except in compliance with the License.
32728
+ * You may obtain a copy of the License at
32729
+ *
32730
+ * http://www.apache.org/licenses/LICENSE-2.0
32731
+ *
32732
+ * Unless required by applicable law or agreed to in writing, software
32733
+ * distributed under the License is distributed on an "AS IS" BASIS,
32734
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32735
+ * See the License for the specific language governing permissions and
32736
+ * limitations under the License.
32737
+ *
32738
+ * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
32739
+ * Copyright 2020 - Finnish Meteorological Institute (FMI)
32740
+ * */
32741
+ /**
32742
+ * Converts webmapjs node structure to LayerTree
32743
+ * @param nodesToRecur THe WebMapJS node structure from service.getNodes();
32744
+ */
32745
+ var recurseNodes = function recurseNodes(nodesToRecur) {
32746
+ var newLayerTreeObj = {
32747
+ leaf: nodesToRecur.leaf,
32748
+ name: nodesToRecur.name,
32749
+ title: nodesToRecur.title,
32750
+ path: nodesToRecur.path || [],
32751
+ children: [],
32752
+ keywords: nodesToRecur.keywords || [],
32753
+ "abstract": nodesToRecur["abstract"] || '',
32754
+ styles: nodesToRecur.styles || [],
32755
+ dimensions: nodesToRecur.dimensions || [],
32756
+ geographicBoundingBox: nodesToRecur.geographicBoundingBox || null
32757
+ };
32758
+ if (nodesToRecur.children) {
32759
+ for (var j = 0; j < nodesToRecur.children.length; j += 1) {
32760
+ newLayerTreeObj.children.push(recurseNodes(nodesToRecur.children[j]));
32761
+ }
32762
+ }
32763
+ return newLayerTreeObj;
32764
+ };
32765
+ /**
32766
+ * Returns a promise with a hierarchical tree of layers from the WMS GetCapabilities document.
32767
+ * @param serviceUrl The URL of the WMS service
32768
+ * @param {boolean} forceReload **optional** forceReload: boolean, true will force the layers to be reloaded from the service, defaults to false
32769
+ */
32770
+ var getLayersFromService = function getLayersFromService(serviceUrl) {
32771
+ var forceReload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
32772
+ return new Promise(function (resolve, reject) {
32773
+ var serviceObject = WMGetServiceFromStore(serviceUrl);
32774
+ serviceObject.getNodes(function (nodes) {
32775
+ // TODO: Maarten Plieger, 2022-11-02: Harmonize types and use correct types: https://gitlab.com/opengeoweb/opengeoweb/-/issues/2817
32776
+ var layerTree = recurseNodes(nodes);
32777
+ resolve(layerTree);
32778
+ }, function (error) {
32779
+ reject(new Error(error));
32780
+ }, forceReload);
32781
+ });
32782
+ };
32783
+ /**
32784
+ * Returns a promise with an array of flattened layerobjects from the WMS GetCapabilities document.
32785
+ * @param serviceUrl The URL of the WMS service
32786
+ * @param {boolean} forceReload **optional** forceReload: boolean, true will force the layers to be reloaded from the service, defaults to false
32787
+ */
32788
+ var getLayersFlattenedFromService = function getLayersFlattenedFromService(serviceUrl) {
32789
+ var forceReload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
32790
+ return new Promise(function (resolve, reject) {
32791
+ var serviceObject = WMGetServiceFromStore(serviceUrl);
32792
+ serviceObject.getLayerObjectsFlat(function (layers) {
32793
+ resolve(layers);
32794
+ }, function (error) {
32795
+ reject(new Error(error));
32796
+ }, forceReload);
32797
+ });
32798
+ };
32799
+
32800
+ var getCapabilities = /*#__PURE__*/Object.freeze({
32801
+ __proto__: null,
32802
+ recurseNodes: recurseNodes,
32803
+ getLayersFromService: getLayersFromService,
32804
+ getLayersFlattenedFromService: getLayersFlattenedFromService
32805
+ });
32806
+
32807
+ export { DateInterval, DebugType, I18n, LayerType, ParseISOTimeRangeDuration, URLDecode, URLEncode, WMBBOX, WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMEmptyLayerName, WMEmptyLayerTitle, WMGetServiceFromStore, WMImage, WMImageEventType, WMJSDimension, WMJSMap, WMJSService, WMJScheckURL, WMLayer, WMTimer, clearImageCache, debug, getCapabilities, getLegendGraphicURLForLayer, getMapImageStore, isDefined, legendImageStore, mockGetCapabilities, parseISO8601DateToDate, parseISO8601IntervalToDateInterval, tilesettings, toArray, testSettings as webmapTestSettings, utils as webmapUtils };