@opengeoweb/webmap 6.0.0 → 6.0.1
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.
- package/index.js +1381 -1
- package/package.json +2 -2
- package/src/index.d.ts +1 -1
- package/src/lib/index.d.ts +2 -0
- package/src/lib/utils/getCapabilities/getCapabilities.d.ts +18 -0
- package/src/lib/utils/getCapabilities/getCapabilities.spec.d.ts +1 -0
- package/src/lib/utils/getCapabilities/index.d.ts +2 -0
- package/src/lib/utils/getCapabilities/mocks/WMS111GetCapabilitiesGeoServicesRADAR.d.ts +1 -0
- package/src/lib/utils/getCapabilities/mocks/index.d.ts +89 -0
- package/src/lib/utils/getCapabilities/mocks/mockGetCapabilities.d.ts +87 -0
- package/src/lib/utils/index.d.ts +4 -0
- package/src/lib/utils/testSettings.d.ts +6 -0
- package/src/lib/utils/tilesettings.d.ts +1 -2
- package/src/lib/utils/utils.d.ts +41 -0
- package/src/lib/utils/utils.spec.d.ts +1 -0
package/index.js
CHANGED
|
@@ -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,6 +512,16 @@ function __rest(s, e) {
|
|
|
216
512
|
t[p[i]] = s[p[i]];
|
|
217
513
|
}
|
|
218
514
|
return t;
|
|
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
|
+
});
|
|
219
525
|
}
|
|
220
526
|
|
|
221
527
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -31409,4 +31715,1078 @@ var WMLayer = /*#__PURE__*/function () {
|
|
|
31409
31715
|
return WMLayer;
|
|
31410
31716
|
}();
|
|
31411
31717
|
|
|
31412
|
-
|
|
31718
|
+
/* *
|
|
31719
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
31720
|
+
* you may not use this file except in compliance with the License.
|
|
31721
|
+
* You may obtain a copy of the License at
|
|
31722
|
+
*
|
|
31723
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
31724
|
+
*
|
|
31725
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
31726
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
31727
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
31728
|
+
* See the License for the specific language governing permissions and
|
|
31729
|
+
* limitations under the License.
|
|
31730
|
+
*
|
|
31731
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
31732
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
31733
|
+
* */
|
|
31734
|
+
var WmMultiDimensionLayer = new WMLayer({
|
|
31735
|
+
service: 'https://testservice',
|
|
31736
|
+
id: 'multiDimensionLayerMock',
|
|
31737
|
+
name: 'MULTI_DIMENSION_LAYER',
|
|
31738
|
+
title: 'MULTI_DIMENSION_LAYER',
|
|
31739
|
+
layerType: LayerType.mapLayer,
|
|
31740
|
+
enabled: true,
|
|
31741
|
+
dimensions: [{
|
|
31742
|
+
name: 'flight level',
|
|
31743
|
+
units: 'hft',
|
|
31744
|
+
currentValue: '625',
|
|
31745
|
+
values: '25,325,625'
|
|
31746
|
+
}, {
|
|
31747
|
+
name: 'elevation',
|
|
31748
|
+
units: 'meters',
|
|
31749
|
+
currentValue: '9000',
|
|
31750
|
+
values: '1000,5000,9000'
|
|
31751
|
+
}, {
|
|
31752
|
+
name: 'time',
|
|
31753
|
+
units: 'ISO8601',
|
|
31754
|
+
currentValue: '2020-03-13T14:40:00Z',
|
|
31755
|
+
values: '2020-03-13T10:40:00Z/2020-03-13T14:40:00Z/PT5M'
|
|
31756
|
+
}]
|
|
31757
|
+
});
|
|
31758
|
+
var layerWithoutTimeDimension = {
|
|
31759
|
+
service: 'https://testservice',
|
|
31760
|
+
id: 'layerWithoutTime',
|
|
31761
|
+
name: 'LAYER_WITHOUT_TIME',
|
|
31762
|
+
layerType: LayerType.mapLayer,
|
|
31763
|
+
dimensions: [{
|
|
31764
|
+
name: 'flight level',
|
|
31765
|
+
units: 'hft',
|
|
31766
|
+
currentValue: '625',
|
|
31767
|
+
values: '25,325,625'
|
|
31768
|
+
}]
|
|
31769
|
+
};
|
|
31770
|
+
var WmLayerWithoutTimeDimension = new WMLayer(layerWithoutTimeDimension);
|
|
31771
|
+
var crsListForRADNL25PCPCMLayer = [{
|
|
31772
|
+
name: 'EPSG:3411',
|
|
31773
|
+
bbox: {
|
|
31774
|
+
left: 2682754.74362,
|
|
31775
|
+
right: 3759536.917562,
|
|
31776
|
+
bottom: -3245034.014141,
|
|
31777
|
+
top: -2168251.989038
|
|
31778
|
+
}
|
|
31779
|
+
}, {
|
|
31780
|
+
name: 'EPSG:3412',
|
|
31781
|
+
bbox: {
|
|
31782
|
+
left: 0,
|
|
31783
|
+
right: 7413041.166015,
|
|
31784
|
+
bottom: 32318824.826266,
|
|
31785
|
+
top: 40075258.815074
|
|
31786
|
+
}
|
|
31787
|
+
}, {
|
|
31788
|
+
name: 'EPSG:3575',
|
|
31789
|
+
bbox: {
|
|
31790
|
+
left: -770622.801471,
|
|
31791
|
+
right: 56845.766135,
|
|
31792
|
+
bottom: -4485814.811314,
|
|
31793
|
+
top: -3684039.44362
|
|
31794
|
+
}
|
|
31795
|
+
}, {
|
|
31796
|
+
name: 'EPSG:3857',
|
|
31797
|
+
bbox: {
|
|
31798
|
+
left: 0,
|
|
31799
|
+
right: 1208534.698398,
|
|
31800
|
+
bottom: 6257115.219364,
|
|
31801
|
+
top: 7553161.958695
|
|
31802
|
+
}
|
|
31803
|
+
}, {
|
|
31804
|
+
name: 'EPSG:4258',
|
|
31805
|
+
bbox: {
|
|
31806
|
+
left: 0,
|
|
31807
|
+
right: 10.856452,
|
|
31808
|
+
bottom: 48.895303,
|
|
31809
|
+
top: 55.9736
|
|
31810
|
+
}
|
|
31811
|
+
}, {
|
|
31812
|
+
name: 'EPSG:4326',
|
|
31813
|
+
bbox: {
|
|
31814
|
+
left: 0,
|
|
31815
|
+
right: 10.856452,
|
|
31816
|
+
bottom: 48.895303,
|
|
31817
|
+
top: 55.9736
|
|
31818
|
+
}
|
|
31819
|
+
}, {
|
|
31820
|
+
name: 'CRS:84',
|
|
31821
|
+
bbox: {
|
|
31822
|
+
left: 0,
|
|
31823
|
+
right: 10.856452,
|
|
31824
|
+
bottom: 48.895303,
|
|
31825
|
+
top: 55.9736
|
|
31826
|
+
}
|
|
31827
|
+
}, {
|
|
31828
|
+
name: 'EPSG:25831',
|
|
31829
|
+
bbox: {
|
|
31830
|
+
left: 282182.345905,
|
|
31831
|
+
right: 997135.658653,
|
|
31832
|
+
bottom: 5433247.394267,
|
|
31833
|
+
top: 6207204.592736
|
|
31834
|
+
}
|
|
31835
|
+
}, {
|
|
31836
|
+
name: 'EPSG:25832',
|
|
31837
|
+
bbox: {
|
|
31838
|
+
left: -153083.019482,
|
|
31839
|
+
right: 617595.626092,
|
|
31840
|
+
bottom: 5415817.312927,
|
|
31841
|
+
top: 6239769.309937
|
|
31842
|
+
}
|
|
31843
|
+
}, {
|
|
31844
|
+
name: 'EPSG:28992',
|
|
31845
|
+
bbox: {
|
|
31846
|
+
left: -236275.338083,
|
|
31847
|
+
right: 501527.918656,
|
|
31848
|
+
bottom: 106727.731651,
|
|
31849
|
+
top: 900797.079725
|
|
31850
|
+
}
|
|
31851
|
+
}, {
|
|
31852
|
+
name: 'EPSG:7399',
|
|
31853
|
+
bbox: {
|
|
31854
|
+
left: 0,
|
|
31855
|
+
right: 763611.971696,
|
|
31856
|
+
bottom: 5757301.056717,
|
|
31857
|
+
top: 6483919.801602
|
|
31858
|
+
}
|
|
31859
|
+
}, {
|
|
31860
|
+
name: 'EPSG:50001',
|
|
31861
|
+
bbox: {
|
|
31862
|
+
left: -2000000,
|
|
31863
|
+
right: 10000000,
|
|
31864
|
+
bottom: -2000000,
|
|
31865
|
+
top: 8500000
|
|
31866
|
+
}
|
|
31867
|
+
}, {
|
|
31868
|
+
name: 'EPSG:54030',
|
|
31869
|
+
bbox: {
|
|
31870
|
+
left: 0,
|
|
31871
|
+
right: 853649.695106,
|
|
31872
|
+
bottom: 5211855.054125,
|
|
31873
|
+
top: 5936394.291427
|
|
31874
|
+
}
|
|
31875
|
+
}, {
|
|
31876
|
+
name: 'EPSG:32661',
|
|
31877
|
+
bbox: {
|
|
31878
|
+
left: 2000000,
|
|
31879
|
+
right: 2745713.040381,
|
|
31880
|
+
bottom: -2703305.597319,
|
|
31881
|
+
top: -1888346.21671
|
|
31882
|
+
}
|
|
31883
|
+
}, {
|
|
31884
|
+
name: 'EPSG:40000',
|
|
31885
|
+
bbox: {
|
|
31886
|
+
left: 0,
|
|
31887
|
+
right: 750214.326339,
|
|
31888
|
+
bottom: -4731695.771951,
|
|
31889
|
+
top: -3911817.119426
|
|
31890
|
+
}
|
|
31891
|
+
}, {
|
|
31892
|
+
name: 'EPSG:900913',
|
|
31893
|
+
bbox: {
|
|
31894
|
+
left: 0,
|
|
31895
|
+
right: 1208534.698398,
|
|
31896
|
+
bottom: 6257115.219364,
|
|
31897
|
+
top: 7553161.958695
|
|
31898
|
+
}
|
|
31899
|
+
}, {
|
|
31900
|
+
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',
|
|
31901
|
+
bbox: {
|
|
31902
|
+
left: 0,
|
|
31903
|
+
right: 700.00242,
|
|
31904
|
+
bottom: -3649.999338,
|
|
31905
|
+
top: -4415.002986
|
|
31906
|
+
}
|
|
31907
|
+
}];
|
|
31908
|
+
var styleListForRADNL25PCPCMLayer = [{
|
|
31909
|
+
title: 'radar/nearest',
|
|
31910
|
+
name: 'radar/nearest',
|
|
31911
|
+
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',
|
|
31912
|
+
"abstract": 'No abstract available'
|
|
31913
|
+
}, {
|
|
31914
|
+
title: 'precip-rainbow/nearest',
|
|
31915
|
+
name: 'precip-rainbow/nearest',
|
|
31916
|
+
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',
|
|
31917
|
+
"abstract": 'No abstract available'
|
|
31918
|
+
}, {
|
|
31919
|
+
title: 'precip-gray/nearest',
|
|
31920
|
+
name: 'precip-gray/nearest',
|
|
31921
|
+
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',
|
|
31922
|
+
"abstract": 'No abstract available'
|
|
31923
|
+
}, {
|
|
31924
|
+
title: 'precip-blue/nearest',
|
|
31925
|
+
name: 'precip-blue/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=precip-blue/nearest',
|
|
31927
|
+
"abstract": 'No abstract available'
|
|
31928
|
+
}, {
|
|
31929
|
+
title: 'precip-blue-transparent/nearest',
|
|
31930
|
+
name: 'precip-blue-transparent/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-blue-transparent/nearest',
|
|
31932
|
+
"abstract": 'No abstract available'
|
|
31933
|
+
}, {
|
|
31934
|
+
title: 'precip-with-range/nearest',
|
|
31935
|
+
name: 'precip-with-range/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-with-range/nearest',
|
|
31937
|
+
"abstract": 'No abstract available'
|
|
31938
|
+
}];
|
|
31939
|
+
|
|
31940
|
+
var testSettings = /*#__PURE__*/Object.freeze({
|
|
31941
|
+
__proto__: null,
|
|
31942
|
+
WmMultiDimensionLayer: WmMultiDimensionLayer,
|
|
31943
|
+
layerWithoutTimeDimension: layerWithoutTimeDimension,
|
|
31944
|
+
WmLayerWithoutTimeDimension: WmLayerWithoutTimeDimension,
|
|
31945
|
+
crsListForRADNL25PCPCMLayer: crsListForRADNL25PCPCMLayer,
|
|
31946
|
+
styleListForRADNL25PCPCMLayer: styleListForRADNL25PCPCMLayer
|
|
31947
|
+
});
|
|
31948
|
+
|
|
31949
|
+
/* *
|
|
31950
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
31951
|
+
* you may not use this file except in compliance with the License.
|
|
31952
|
+
* You may obtain a copy of the License at
|
|
31953
|
+
*
|
|
31954
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
31955
|
+
*
|
|
31956
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
31957
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
31958
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
31959
|
+
* See the License for the specific language governing permissions and
|
|
31960
|
+
* limitations under the License.
|
|
31961
|
+
*
|
|
31962
|
+
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
31963
|
+
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
31964
|
+
* */
|
|
31965
|
+
var tilesettings = {
|
|
31966
|
+
WorldMap_Light_Grey_Canvas: {
|
|
31967
|
+
'EPSG:3857': {
|
|
31968
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap_Light_Grey_Canvas/EPSG3857/',
|
|
31969
|
+
minLevel: 0,
|
|
31970
|
+
maxLevel: 9,
|
|
31971
|
+
tileServerType: 'osm',
|
|
31972
|
+
copyRight: 'Natural Earth II | Ingmapping'
|
|
31973
|
+
}
|
|
31974
|
+
},
|
|
31975
|
+
OpenStreetMap_NL: {
|
|
31976
|
+
'EPSG:3857': {
|
|
31977
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OpenStreetMap_NL/EPSG3857/',
|
|
31978
|
+
minLevel: 0,
|
|
31979
|
+
maxLevel: 16,
|
|
31980
|
+
tileServerType: 'osm',
|
|
31981
|
+
copyRight: 'OpenStreetMap - contributors | Ingmapping'
|
|
31982
|
+
}
|
|
31983
|
+
},
|
|
31984
|
+
OpenStreets_NL: {
|
|
31985
|
+
'EPSG:3857': {
|
|
31986
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OpenStreets_NL/EPSG3857/',
|
|
31987
|
+
minLevel: 0,
|
|
31988
|
+
maxLevel: 16,
|
|
31989
|
+
tileServerType: 'osm',
|
|
31990
|
+
copyRight: 'OpenStreetMap - contributors | Ingmapping'
|
|
31991
|
+
},
|
|
31992
|
+
'EPSG:28992': {
|
|
31993
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OpenStreets_NL/EPSG28992/',
|
|
31994
|
+
minLevel: 0,
|
|
31995
|
+
maxLevel: 16,
|
|
31996
|
+
tileServerType: 'osm',
|
|
31997
|
+
copyRight: 'Natural Earth II | Ingmapping'
|
|
31998
|
+
}
|
|
31999
|
+
},
|
|
32000
|
+
Positron_NL: {
|
|
32001
|
+
'EPSG:3857': {
|
|
32002
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/Positron_NL/EPSG3857/',
|
|
32003
|
+
minLevel: 0,
|
|
32004
|
+
maxLevel: 16,
|
|
32005
|
+
tileServerType: 'osm',
|
|
32006
|
+
copyRight: 'OpenStreetMap - contributors | OpenMapTiles | Ingmapping'
|
|
32007
|
+
}
|
|
32008
|
+
},
|
|
32009
|
+
Positron_NL_NoLabels: {
|
|
32010
|
+
'EPSG:3857': {
|
|
32011
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/Positron_NL_NoLabels/EPSG3857/',
|
|
32012
|
+
minLevel: 0,
|
|
32013
|
+
maxLevel: 16,
|
|
32014
|
+
tileServerType: 'osm',
|
|
32015
|
+
copyRight: 'OpenStreetMap - contributors | OpenMapTiles | Ingmapping'
|
|
32016
|
+
}
|
|
32017
|
+
},
|
|
32018
|
+
Klokantech_Basic_NL: {
|
|
32019
|
+
'EPSG:3857': {
|
|
32020
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/Klokantech_Basic_NL/EPSG3857/',
|
|
32021
|
+
minLevel: 0,
|
|
32022
|
+
maxLevel: 16,
|
|
32023
|
+
tileServerType: 'osm',
|
|
32024
|
+
copyRight: 'OpenStreetMap - contributors | OpenMapTiles | Ingmapping'
|
|
32025
|
+
}
|
|
32026
|
+
},
|
|
32027
|
+
Klokantech_Basic_NL_NoLabels: {
|
|
32028
|
+
'EPSG:3857': {
|
|
32029
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/Klokantech_Basic_NL_NoLabels/EPSG3857/',
|
|
32030
|
+
minLevel: 0,
|
|
32031
|
+
maxLevel: 16,
|
|
32032
|
+
tileServerType: 'osm',
|
|
32033
|
+
copyRight: 'OpenStreetMap - contributors | OpenMapTiles | Ingmapping'
|
|
32034
|
+
}
|
|
32035
|
+
},
|
|
32036
|
+
OSM_Blossom_NL: {
|
|
32037
|
+
'EPSG:3857': {
|
|
32038
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OSM_Blossom_NL/EPSG3857/',
|
|
32039
|
+
minLevel: 0,
|
|
32040
|
+
maxLevel: 16,
|
|
32041
|
+
tileServerType: 'osm',
|
|
32042
|
+
copyRight: 'OpenStreetMap - contributors | Ingmapping'
|
|
32043
|
+
}
|
|
32044
|
+
},
|
|
32045
|
+
WorldMap: {
|
|
32046
|
+
'EPSG:3857': {
|
|
32047
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG3857/',
|
|
32048
|
+
minLevel: 0,
|
|
32049
|
+
maxLevel: 9,
|
|
32050
|
+
tileServerType: 'osm',
|
|
32051
|
+
copyRight: 'Natural Earth II | Ingmapping'
|
|
32052
|
+
},
|
|
32053
|
+
'TODO__EPSG:4326': {
|
|
32054
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG4326/',
|
|
32055
|
+
minLevel: 0,
|
|
32056
|
+
maxLevel: 9,
|
|
32057
|
+
origX: -180,
|
|
32058
|
+
origY: 90,
|
|
32059
|
+
resolution: 1.422222,
|
|
32060
|
+
tileServerType: 'osm',
|
|
32061
|
+
copyRight: 'Natural Earth II | Ingmapping'
|
|
32062
|
+
},
|
|
32063
|
+
'EPSG:3411': {
|
|
32064
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG3411/',
|
|
32065
|
+
minLevel: 3,
|
|
32066
|
+
maxLevel: 9,
|
|
32067
|
+
tileServerType: 'osm',
|
|
32068
|
+
copyRight: 'Natural Earth II | Ingmapping'
|
|
32069
|
+
},
|
|
32070
|
+
'EPSG:28992': {
|
|
32071
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG28992/',
|
|
32072
|
+
minLevel: 5,
|
|
32073
|
+
maxLevel: 9,
|
|
32074
|
+
tileServerType: 'osm',
|
|
32075
|
+
copyRight: 'Natural Earth II | Ingmapping'
|
|
32076
|
+
},
|
|
32077
|
+
'EPSG:3412': {
|
|
32078
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG3412/',
|
|
32079
|
+
minLevel: 3,
|
|
32080
|
+
maxLevel: 9,
|
|
32081
|
+
tileServerType: 'osm',
|
|
32082
|
+
copyRight: 'Natural Earth II | Ingmapping'
|
|
32083
|
+
},
|
|
32084
|
+
'EPSG:32661': {
|
|
32085
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG32661/',
|
|
32086
|
+
minLevel: 4,
|
|
32087
|
+
maxLevel: 9,
|
|
32088
|
+
tileServerType: 'osm',
|
|
32089
|
+
copyRight: 'Natural Earth II | Ingmapping'
|
|
32090
|
+
},
|
|
32091
|
+
'EPSG:54030': {
|
|
32092
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG54030/',
|
|
32093
|
+
minLevel: 3,
|
|
32094
|
+
maxLevel: 9,
|
|
32095
|
+
tileServerType: 'osm',
|
|
32096
|
+
copyRight: 'Natural Earth II | Ingmapping'
|
|
32097
|
+
},
|
|
32098
|
+
'EPSG:3575': {
|
|
32099
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG3575/',
|
|
32100
|
+
minLevel: 5,
|
|
32101
|
+
maxLevel: 9,
|
|
32102
|
+
tileServerType: 'osm',
|
|
32103
|
+
copyRight: 'Natural Earth II | Ingmapping'
|
|
32104
|
+
}
|
|
32105
|
+
},
|
|
32106
|
+
OSM_Antarctica: {
|
|
32107
|
+
'EPSG:3412': {
|
|
32108
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OSM_Antarctica/EPSG3412/',
|
|
32109
|
+
minLevel: 1,
|
|
32110
|
+
maxLevel: 7,
|
|
32111
|
+
origX: -3000000,
|
|
32112
|
+
origY: 3000000,
|
|
32113
|
+
resolution: 23437.5,
|
|
32114
|
+
tileServerType: 'osm',
|
|
32115
|
+
copyRight: 'OpenStreetMap - contributors | Ingmapping'
|
|
32116
|
+
}
|
|
32117
|
+
},
|
|
32118
|
+
arcGisCanvas: {
|
|
32119
|
+
title: 'ArcGIS canvas map',
|
|
32120
|
+
'EPSG:3857': {
|
|
32121
|
+
home: 'https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/',
|
|
32122
|
+
minLevel: 1,
|
|
32123
|
+
maxLevel: 16,
|
|
32124
|
+
tileServerType: 'arcgisonline',
|
|
32125
|
+
copyRight: 'Basemap copyright: 2013 ESRI, DeLorme, NAVTEQ'
|
|
32126
|
+
},
|
|
32127
|
+
'EPSG:28992': {
|
|
32128
|
+
home: 'https://services.arcgisonline.com/arcgis/rest/services/Basiskaarten/Canvas/MapServer/tile/',
|
|
32129
|
+
minLevel: 1,
|
|
32130
|
+
maxLevel: 12,
|
|
32131
|
+
origX: -285401.92,
|
|
32132
|
+
origY: 903401.92,
|
|
32133
|
+
resolution: 3440.64,
|
|
32134
|
+
tileServerType: 'arcgisonline',
|
|
32135
|
+
copyRight: 'Basiskaart bronnen: ESRI Nederland, ESRI, Kadaster, CBS en Rijkswaterstaat'
|
|
32136
|
+
}
|
|
32137
|
+
},
|
|
32138
|
+
arcGisTopo: {
|
|
32139
|
+
title: 'ArcGIS topo map',
|
|
32140
|
+
'EPSG:3857': {
|
|
32141
|
+
home: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/',
|
|
32142
|
+
minLevel: 1,
|
|
32143
|
+
maxLevel: 19,
|
|
32144
|
+
tileServerType: 'arcgisonline',
|
|
32145
|
+
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'
|
|
32146
|
+
},
|
|
32147
|
+
'EPSG:28992': {
|
|
32148
|
+
home: 'https://services.arcgisonline.com/arcgis/rest/services/Basiskaarten/Topo/MapServer/tile/',
|
|
32149
|
+
minLevel: 1,
|
|
32150
|
+
maxLevel: 12,
|
|
32151
|
+
origX: -285401.92,
|
|
32152
|
+
origY: 903401.92,
|
|
32153
|
+
resolution: 3440.64,
|
|
32154
|
+
tileServerType: 'arcgisonline',
|
|
32155
|
+
copyRight: 'Basiskaart bronnen: ESRI Nederland, ESRI, Kadaster, CBS, Min VROM, Rijkswaterstaat en gemeenten: Rotterdam, Breda, Tilburg'
|
|
32156
|
+
}
|
|
32157
|
+
},
|
|
32158
|
+
arcGisOceanBaseMap: {
|
|
32159
|
+
'EPSG:3857': {
|
|
32160
|
+
title: 'ArcGIS ocean map',
|
|
32161
|
+
home: 'https://services.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/tile/',
|
|
32162
|
+
minLevel: 1,
|
|
32163
|
+
maxLevel: 19,
|
|
32164
|
+
tileServerType: 'arcgisonline',
|
|
32165
|
+
copyRight: 'Basemap sources: ESRI, GEBCO, NOAA, National Geographic, DeLorme, NAVTEQ, Geonames.org, and other contributors'
|
|
32166
|
+
}
|
|
32167
|
+
},
|
|
32168
|
+
arcGisSat: {
|
|
32169
|
+
title: 'ArcGIS satellite map',
|
|
32170
|
+
'EPSG:4326': {
|
|
32171
|
+
home: 'https://services.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/tile/',
|
|
32172
|
+
minLevel: 1,
|
|
32173
|
+
maxLevel: 15,
|
|
32174
|
+
tileServerType: 'arcgisonline',
|
|
32175
|
+
origX: -180,
|
|
32176
|
+
origY: 90,
|
|
32177
|
+
resolution: 0.3515625,
|
|
32178
|
+
tileSize: 512,
|
|
32179
|
+
copyRight: 'ESRI'
|
|
32180
|
+
},
|
|
32181
|
+
'EPSG:3857': {
|
|
32182
|
+
home: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/',
|
|
32183
|
+
minLevel: 1,
|
|
32184
|
+
maxLevel: 18,
|
|
32185
|
+
tileServerType: 'arcgisonline',
|
|
32186
|
+
copyRight: 'ESRI'
|
|
32187
|
+
}
|
|
32188
|
+
},
|
|
32189
|
+
OpenStreetMap_Service: {
|
|
32190
|
+
title: 'OpenStreetMap Service',
|
|
32191
|
+
'EPSG:3857': {
|
|
32192
|
+
home: 'https://b.tile.openstreetmap.org/',
|
|
32193
|
+
minLevel: 1,
|
|
32194
|
+
maxLevel: 16,
|
|
32195
|
+
tileServerType: 'osm',
|
|
32196
|
+
copyRight: 'OpenStreetMap - contributors'
|
|
32197
|
+
},
|
|
32198
|
+
'EPSG:28992': {
|
|
32199
|
+
home: 'https://services.arcgisonline.com/ArcGIS/rest/services/Basiskaarten/PDOK_BRT/MapServer/tile/',
|
|
32200
|
+
minLevel: 1,
|
|
32201
|
+
maxLevel: 12,
|
|
32202
|
+
origX: -285401.92,
|
|
32203
|
+
origY: 903401.92,
|
|
32204
|
+
resolution: 3440.64,
|
|
32205
|
+
tileServerType: 'arcgisonline',
|
|
32206
|
+
copyRight: 'Basiskaart bronnen: PDOK, Kadaster, OpenStreetMap'
|
|
32207
|
+
}
|
|
32208
|
+
},
|
|
32209
|
+
NaturalEarth2: {
|
|
32210
|
+
'EPSG:3411': {
|
|
32211
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG3411/',
|
|
32212
|
+
minLevel: 1,
|
|
32213
|
+
maxLevel: 6,
|
|
32214
|
+
origX: -12400000,
|
|
32215
|
+
origY: 12400000,
|
|
32216
|
+
resolution: 96875,
|
|
32217
|
+
tileServerType: 'wmst',
|
|
32218
|
+
copyRight: 'NPS - Natural Earth II'
|
|
32219
|
+
},
|
|
32220
|
+
'EPSG:3412': {
|
|
32221
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG3412/',
|
|
32222
|
+
minLevel: 1,
|
|
32223
|
+
maxLevel: 6,
|
|
32224
|
+
origX: -12400000,
|
|
32225
|
+
origY: 12400000,
|
|
32226
|
+
resolution: 96875,
|
|
32227
|
+
tileServerType: 'wmst',
|
|
32228
|
+
copyRight: 'NPS - Natural Earth II'
|
|
32229
|
+
},
|
|
32230
|
+
'EPSG:3575': {
|
|
32231
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG3575/',
|
|
32232
|
+
minLevel: 1,
|
|
32233
|
+
maxLevel: 6,
|
|
32234
|
+
origX: -13000000,
|
|
32235
|
+
origY: 13000000,
|
|
32236
|
+
resolution: 101562.5,
|
|
32237
|
+
tileServerType: 'wmst',
|
|
32238
|
+
copyRight: 'NPS - Natural Earth II'
|
|
32239
|
+
},
|
|
32240
|
+
'EPSG:3857': {
|
|
32241
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG3857/',
|
|
32242
|
+
minLevel: 1,
|
|
32243
|
+
maxLevel: 7,
|
|
32244
|
+
tileServerType: 'wmst',
|
|
32245
|
+
copyRight: 'NPS - Natural Earth II'
|
|
32246
|
+
},
|
|
32247
|
+
'EPSG:4258': {
|
|
32248
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG4326/',
|
|
32249
|
+
minLevel: 1,
|
|
32250
|
+
maxLevel: 6,
|
|
32251
|
+
origX: -180,
|
|
32252
|
+
origY: 90,
|
|
32253
|
+
resolution: 0.703125,
|
|
32254
|
+
tileServerType: 'wmst',
|
|
32255
|
+
copyRight: 'NPS - Natural Earth II'
|
|
32256
|
+
},
|
|
32257
|
+
'EPSG:4326': {
|
|
32258
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG4326/',
|
|
32259
|
+
minLevel: 1,
|
|
32260
|
+
maxLevel: 6,
|
|
32261
|
+
origX: -180,
|
|
32262
|
+
origY: 90,
|
|
32263
|
+
resolution: 0.703125,
|
|
32264
|
+
tileServerType: 'wmst',
|
|
32265
|
+
copyRight: 'NPS - Natural Earth II'
|
|
32266
|
+
},
|
|
32267
|
+
'EPSG:28992': {
|
|
32268
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG28992/',
|
|
32269
|
+
minLevel: 1,
|
|
32270
|
+
maxLevel: 5,
|
|
32271
|
+
origX: -2999000,
|
|
32272
|
+
origY: 2995500,
|
|
32273
|
+
resolution: 23437,
|
|
32274
|
+
tileServerType: 'wmst',
|
|
32275
|
+
copyRight: 'NPS - Natural Earth II'
|
|
32276
|
+
},
|
|
32277
|
+
'EPSG:32661': {
|
|
32278
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG32661/',
|
|
32279
|
+
minLevel: 1,
|
|
32280
|
+
maxLevel: 7,
|
|
32281
|
+
origX: -5000000,
|
|
32282
|
+
origY: 4000000,
|
|
32283
|
+
resolution: 58593.75,
|
|
32284
|
+
tileServerType: 'wmst',
|
|
32285
|
+
copyRight: 'NPS - Natural Earth II'
|
|
32286
|
+
},
|
|
32287
|
+
'EPSG:54030': {
|
|
32288
|
+
home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG54030/',
|
|
32289
|
+
minLevel: 1,
|
|
32290
|
+
maxLevel: 7,
|
|
32291
|
+
origX: -17000000,
|
|
32292
|
+
origY: 8625830,
|
|
32293
|
+
resolution: 132812.5,
|
|
32294
|
+
tileServerType: 'wmst',
|
|
32295
|
+
copyRight: 'NPS - Natural Earth II'
|
|
32296
|
+
}
|
|
32297
|
+
}
|
|
32298
|
+
};
|
|
32299
|
+
|
|
32300
|
+
/* *
|
|
32301
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
32302
|
+
* you may not use this file except in compliance with the License.
|
|
32303
|
+
* You may obtain a copy of the License at
|
|
32304
|
+
*
|
|
32305
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
32306
|
+
*
|
|
32307
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
32308
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
32309
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
32310
|
+
* See the License for the specific language governing permissions and
|
|
32311
|
+
* limitations under the License.
|
|
32312
|
+
*
|
|
32313
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
32314
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
32315
|
+
* */
|
|
32316
|
+
var generatedLayerIds = 0;
|
|
32317
|
+
var generateLayerId = function generateLayerId() {
|
|
32318
|
+
generatedLayerIds += 1;
|
|
32319
|
+
return "layerid_".concat(generatedLayerIds);
|
|
32320
|
+
};
|
|
32321
|
+
var generatedMapIds = 0;
|
|
32322
|
+
var generateMapId = function generateMapId() {
|
|
32323
|
+
generatedMapIds += 1;
|
|
32324
|
+
return "mapid_".concat(generatedMapIds);
|
|
32325
|
+
};
|
|
32326
|
+
var generatedTimesliderIds = 0;
|
|
32327
|
+
var generateTimesliderId = function generateTimesliderId() {
|
|
32328
|
+
generatedTimesliderIds += 1;
|
|
32329
|
+
return "timesliderid_".concat(generatedTimesliderIds);
|
|
32330
|
+
};
|
|
32331
|
+
/**
|
|
32332
|
+
* Map for registering wmlayers with their id's
|
|
32333
|
+
*/
|
|
32334
|
+
var registeredWMLayersForReactLayerId = {};
|
|
32335
|
+
/**
|
|
32336
|
+
* Registers a WMJSLayer in a lookuptable with a layerId
|
|
32337
|
+
* @param {WMLayer} wmLayer
|
|
32338
|
+
* @param {string} layerId
|
|
32339
|
+
*/
|
|
32340
|
+
var registerWMLayer = function registerWMLayer(wmLayer, layerId) {
|
|
32341
|
+
registeredWMLayersForReactLayerId[layerId] = wmLayer;
|
|
32342
|
+
};
|
|
32343
|
+
/**
|
|
32344
|
+
* Get the WMLayer from the lookuptable with layerId
|
|
32345
|
+
* @param {string} layerId
|
|
32346
|
+
*/
|
|
32347
|
+
var getWMLayerById = function getWMLayerById(layerId) {
|
|
32348
|
+
return registeredWMLayersForReactLayerId[layerId];
|
|
32349
|
+
};
|
|
32350
|
+
var unRegisterWMJSLayer = function unRegisterWMJSLayer(layerId) {
|
|
32351
|
+
var layer = registeredWMLayersForReactLayerId[layerId];
|
|
32352
|
+
if (layer) {
|
|
32353
|
+
delete registeredWMLayersForReactLayerId[layerId];
|
|
32354
|
+
}
|
|
32355
|
+
};
|
|
32356
|
+
var unRegisterAllWMJSLayersAndMaps = function unRegisterAllWMJSLayersAndMaps() {
|
|
32357
|
+
var allLayerIds = Object.keys(registeredWMLayersForReactLayerId);
|
|
32358
|
+
allLayerIds.forEach(function (layerId) {
|
|
32359
|
+
unRegisterWMJSLayer(layerId);
|
|
32360
|
+
});
|
|
32361
|
+
var allMapIds = Object.keys(registeredWMMapForReactMapId);
|
|
32362
|
+
allMapIds.forEach(function (mapId) {
|
|
32363
|
+
unRegisterWMJSMap(mapId);
|
|
32364
|
+
});
|
|
32365
|
+
};
|
|
32366
|
+
/**
|
|
32367
|
+
* Map for registering wmlayers with their id's
|
|
32368
|
+
*/
|
|
32369
|
+
var registeredWMMapForReactMapId = {};
|
|
32370
|
+
/**
|
|
32371
|
+
* Registers a WMJSMap in a lookuptable with a wmjsMapId
|
|
32372
|
+
* @param {WMJSMap} wmjsMap
|
|
32373
|
+
* @param {string} wmjsMapId
|
|
32374
|
+
*/
|
|
32375
|
+
var registerWMJSMap = function registerWMJSMap(wmjsMap, wmjsMapId) {
|
|
32376
|
+
if (registeredWMMapForReactMapId[wmjsMapId]) {
|
|
32377
|
+
console.warn("Map with id ".concat(wmjsMapId, " already made"));
|
|
32378
|
+
}
|
|
32379
|
+
registeredWMMapForReactMapId[wmjsMapId] = wmjsMap;
|
|
32380
|
+
};
|
|
32381
|
+
var unRegisterWMJSMap = function unRegisterWMJSMap(wmjsMapId) {
|
|
32382
|
+
var wmjsMap = registeredWMMapForReactMapId[wmjsMapId];
|
|
32383
|
+
if (wmjsMap) {
|
|
32384
|
+
wmjsMap.getListener().suspendEvents();
|
|
32385
|
+
try {
|
|
32386
|
+
wmjsMap.stopAnimating && wmjsMap.stopAnimating();
|
|
32387
|
+
} catch (e) {
|
|
32388
|
+
console.warn(e);
|
|
32389
|
+
}
|
|
32390
|
+
Object.keys(registeredWMLayersForReactLayerId).forEach(function (layerId) {
|
|
32391
|
+
var wmLayer = getWMLayerById(layerId);
|
|
32392
|
+
if (wmLayer.parentMap === wmjsMap) {
|
|
32393
|
+
unRegisterWMJSLayer(layerId);
|
|
32394
|
+
}
|
|
32395
|
+
});
|
|
32396
|
+
wmjsMap.destroy();
|
|
32397
|
+
delete registeredWMMapForReactMapId[wmjsMapId];
|
|
32398
|
+
}
|
|
32399
|
+
};
|
|
32400
|
+
/**
|
|
32401
|
+
* Get the wmjsMap from the lookuptable with wmjsMapId
|
|
32402
|
+
* @param {string} wmjsMapId
|
|
32403
|
+
*/
|
|
32404
|
+
var getWMJSMapById = function getWMJSMapById(wmjsMapId) {
|
|
32405
|
+
return registeredWMMapForReactMapId[wmjsMapId];
|
|
32406
|
+
};
|
|
32407
|
+
/**
|
|
32408
|
+
* Returns the WMJSDimension object for given layerId and dimension name
|
|
32409
|
+
* @param layerId The layerId
|
|
32410
|
+
* @param dimensionName The dimension to lookup
|
|
32411
|
+
*/
|
|
32412
|
+
var getWMJSDimensionForLayerAndDimension = function getWMJSDimensionForLayerAndDimension(layerId, dimensionName) {
|
|
32413
|
+
var wmLayer = getWMLayerById(layerId);
|
|
32414
|
+
if (!wmLayer || !dimensionName) {
|
|
32415
|
+
return undefined;
|
|
32416
|
+
}
|
|
32417
|
+
var wmjsDimension = wmLayer.getDimension(dimensionName);
|
|
32418
|
+
if (!wmjsDimension) {
|
|
32419
|
+
return undefined;
|
|
32420
|
+
}
|
|
32421
|
+
return wmjsDimension;
|
|
32422
|
+
};
|
|
32423
|
+
/**
|
|
32424
|
+
* Gets the WMJSTimeDimension for given activeLayerId and dimensions list
|
|
32425
|
+
* @param layerId: The layer id to search the WMJSDimension for
|
|
32426
|
+
* @return: The WMJSDimension if found, otherwise null
|
|
32427
|
+
*/
|
|
32428
|
+
var getWMJSTimeDimensionForLayerId = function getWMJSTimeDimensionForLayerId(layerId) {
|
|
32429
|
+
var wmLayer = getWMLayerById(layerId);
|
|
32430
|
+
if (!wmLayer) {
|
|
32431
|
+
return null;
|
|
32432
|
+
}
|
|
32433
|
+
return wmLayer.getDimension('time');
|
|
32434
|
+
};
|
|
32435
|
+
|
|
32436
|
+
var utils = /*#__PURE__*/Object.freeze({
|
|
32437
|
+
__proto__: null,
|
|
32438
|
+
generateLayerId: generateLayerId,
|
|
32439
|
+
generateMapId: generateMapId,
|
|
32440
|
+
generateTimesliderId: generateTimesliderId,
|
|
32441
|
+
registerWMLayer: registerWMLayer,
|
|
32442
|
+
getWMLayerById: getWMLayerById,
|
|
32443
|
+
unRegisterWMJSLayer: unRegisterWMJSLayer,
|
|
32444
|
+
unRegisterAllWMJSLayersAndMaps: unRegisterAllWMJSLayersAndMaps,
|
|
32445
|
+
registerWMJSMap: registerWMJSMap,
|
|
32446
|
+
unRegisterWMJSMap: unRegisterWMJSMap,
|
|
32447
|
+
getWMJSMapById: getWMJSMapById,
|
|
32448
|
+
getWMJSDimensionForLayerAndDimension: getWMJSDimensionForLayerAndDimension,
|
|
32449
|
+
getWMJSTimeDimensionForLayerId: getWMJSTimeDimensionForLayerId
|
|
32450
|
+
});
|
|
32451
|
+
|
|
32452
|
+
/* *
|
|
32453
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
32454
|
+
* you may not use this file except in compliance with the License.
|
|
32455
|
+
* You may obtain a copy of the License at
|
|
32456
|
+
*
|
|
32457
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
32458
|
+
*
|
|
32459
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
32460
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
32461
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
32462
|
+
* See the License for the specific language governing permissions and
|
|
32463
|
+
* limitations under the License.
|
|
32464
|
+
*
|
|
32465
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
32466
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
32467
|
+
* */
|
|
32468
|
+
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&SERVICE=WMS&\" />\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&SERVICE=WMS&\" />\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&SERVICE=WMS&\" />\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&SERVICE=WMS&\" />\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&SERVICE=WMS&\" />\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&SERVICE=WMS&\" />\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&SERVICE=WMS&\" />\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&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&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&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&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&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&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&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&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&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&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&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&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>";
|
|
32469
|
+
|
|
32470
|
+
var MOCK_URL_WITH_CHILDREN = 'https://mockUrlWithChildren.nl';
|
|
32471
|
+
var MOCK_URL_NO_CHILDREN = 'https://mockUrlNoChildren.nl';
|
|
32472
|
+
var MOCK_URL_WITH_NO_TITLE = 'https://mockUrlWithNoTitle.nl';
|
|
32473
|
+
var MOCK_URL_WITH_NO_TITLE_OR_NAME = 'https://mockUrlWithNoTitleOrName.nl/wms?';
|
|
32474
|
+
var MOCK_URL_WITH_SUBCATEGORY = 'https://mockUrlWithSubcategory.nl';
|
|
32475
|
+
var MOCK_URL_INVALID = 'https://notawmsservice.nl';
|
|
32476
|
+
var MOCK_URL_SLOW = 'https://slowresolve.nl';
|
|
32477
|
+
var MOCK_URL_SLOW_FAILS = 'https://slowreject.nl';
|
|
32478
|
+
var MOCK_URL_DEFAULT = 'https://defaultservice.nl';
|
|
32479
|
+
var MOCK_URL_DEFAULT2 = 'https://defaultservice2.nl';
|
|
32480
|
+
var MOCK_URL_HTTP = 'http://wmsservice.nl';
|
|
32481
|
+
var mockLayersNoChildren = {
|
|
32482
|
+
leaf: false,
|
|
32483
|
+
name: null,
|
|
32484
|
+
title: 'RADNL_OPER_R___25PCPRR_L3_WMS',
|
|
32485
|
+
path: [],
|
|
32486
|
+
children: []
|
|
32487
|
+
};
|
|
32488
|
+
var mockLayersWithChildren = {
|
|
32489
|
+
leaf: false,
|
|
32490
|
+
name: null,
|
|
32491
|
+
title: 'RADNL_OPER_R___25PCPRR_L3_WMS',
|
|
32492
|
+
path: [],
|
|
32493
|
+
children: [{
|
|
32494
|
+
leaf: true,
|
|
32495
|
+
name: 'RAD_NL25_PCP_CM',
|
|
32496
|
+
title: 'RAD_NL25_PCP_CM',
|
|
32497
|
+
path: [],
|
|
32498
|
+
children: []
|
|
32499
|
+
}, {
|
|
32500
|
+
leaf: true,
|
|
32501
|
+
name: 'RADNL_OPER_R___25PCPRR_L3_KNMI',
|
|
32502
|
+
title: 'RADNL_OPER_R___25PCPRR_L3_KNMI',
|
|
32503
|
+
path: [],
|
|
32504
|
+
children: []
|
|
32505
|
+
}]
|
|
32506
|
+
};
|
|
32507
|
+
var mockLayersWithNoTitle = {
|
|
32508
|
+
leaf: false,
|
|
32509
|
+
name: 'UNTITLED_WMS',
|
|
32510
|
+
title: null,
|
|
32511
|
+
path: [],
|
|
32512
|
+
children: []
|
|
32513
|
+
};
|
|
32514
|
+
var mockLayersWithNoTitleOrName = {
|
|
32515
|
+
leaf: false,
|
|
32516
|
+
name: null,
|
|
32517
|
+
title: null,
|
|
32518
|
+
path: [],
|
|
32519
|
+
children: []
|
|
32520
|
+
};
|
|
32521
|
+
var mockLayersWithSubcategory = {
|
|
32522
|
+
leaf: false,
|
|
32523
|
+
name: null,
|
|
32524
|
+
title: 'Service with subcategory',
|
|
32525
|
+
path: [],
|
|
32526
|
+
children: [{
|
|
32527
|
+
leaf: true,
|
|
32528
|
+
name: 'cloud_area_fraction',
|
|
32529
|
+
title: 'Cloud cover (flag)',
|
|
32530
|
+
path: [],
|
|
32531
|
+
children: []
|
|
32532
|
+
}, {
|
|
32533
|
+
leaf: false,
|
|
32534
|
+
name: null,
|
|
32535
|
+
title: 'Subcategory',
|
|
32536
|
+
path: [],
|
|
32537
|
+
children: [{
|
|
32538
|
+
leaf: true,
|
|
32539
|
+
name: 'baselayer',
|
|
32540
|
+
title: 'Baselayer (-)',
|
|
32541
|
+
path: ['Subcategory'],
|
|
32542
|
+
children: []
|
|
32543
|
+
}, {
|
|
32544
|
+
leaf: false,
|
|
32545
|
+
name: null,
|
|
32546
|
+
title: 'Klima',
|
|
32547
|
+
path: ['Subcategory'],
|
|
32548
|
+
children: [{
|
|
32549
|
+
leaf: true,
|
|
32550
|
+
name: 'haic_airports',
|
|
32551
|
+
title: 'HAIC Airports',
|
|
32552
|
+
path: ['SubcategoryKlima'],
|
|
32553
|
+
children: []
|
|
32554
|
+
}]
|
|
32555
|
+
}]
|
|
32556
|
+
}]
|
|
32557
|
+
};
|
|
32558
|
+
var mockLayersDefault = {
|
|
32559
|
+
leaf: false,
|
|
32560
|
+
name: null,
|
|
32561
|
+
title: 'Default title for default layer',
|
|
32562
|
+
path: [],
|
|
32563
|
+
children: []
|
|
32564
|
+
};
|
|
32565
|
+
var mockLayersDefault2 = {
|
|
32566
|
+
leaf: false,
|
|
32567
|
+
name: null,
|
|
32568
|
+
title: 'Default title for default 2 layer',
|
|
32569
|
+
path: [],
|
|
32570
|
+
children: []
|
|
32571
|
+
};
|
|
32572
|
+
var mockGetLayersFromService = function mockGetLayersFromService(url) {
|
|
32573
|
+
switch (url) {
|
|
32574
|
+
case MOCK_URL_WITH_CHILDREN:
|
|
32575
|
+
return new Promise(function (resolve) {
|
|
32576
|
+
resolve(mockLayersWithChildren);
|
|
32577
|
+
});
|
|
32578
|
+
case MOCK_URL_NO_CHILDREN:
|
|
32579
|
+
return new Promise(function (resolve) {
|
|
32580
|
+
resolve(mockLayersNoChildren);
|
|
32581
|
+
});
|
|
32582
|
+
case MOCK_URL_WITH_NO_TITLE:
|
|
32583
|
+
return new Promise(function (resolve) {
|
|
32584
|
+
resolve(mockLayersWithNoTitle);
|
|
32585
|
+
});
|
|
32586
|
+
case MOCK_URL_WITH_NO_TITLE_OR_NAME:
|
|
32587
|
+
return new Promise(function (resolve) {
|
|
32588
|
+
resolve(mockLayersWithNoTitleOrName);
|
|
32589
|
+
});
|
|
32590
|
+
case MOCK_URL_WITH_SUBCATEGORY:
|
|
32591
|
+
return new Promise(function (resolve) {
|
|
32592
|
+
resolve(mockLayersWithSubcategory);
|
|
32593
|
+
});
|
|
32594
|
+
case MOCK_URL_SLOW:
|
|
32595
|
+
return new Promise(function (resolve) {
|
|
32596
|
+
setTimeout(function () {
|
|
32597
|
+
return resolve(mockLayersWithChildren);
|
|
32598
|
+
}, 300);
|
|
32599
|
+
});
|
|
32600
|
+
case MOCK_URL_SLOW_FAILS:
|
|
32601
|
+
return new Promise(function (resolve, reject) {
|
|
32602
|
+
setTimeout(function () {
|
|
32603
|
+
return reject(new Error("Mock url '".concat(url, "' service returned an error.")));
|
|
32604
|
+
}, 300);
|
|
32605
|
+
});
|
|
32606
|
+
case MOCK_URL_INVALID:
|
|
32607
|
+
return Promise.reject(new Error("Url '".concat(url, "' is not a wms service.")));
|
|
32608
|
+
case MOCK_URL_HTTP:
|
|
32609
|
+
return Promise.reject(new Error("Url '".concat(url, "' is not https.")));
|
|
32610
|
+
case MOCK_URL_DEFAULT:
|
|
32611
|
+
return new Promise(function (resolve) {
|
|
32612
|
+
resolve(mockLayersDefault);
|
|
32613
|
+
});
|
|
32614
|
+
case MOCK_URL_DEFAULT2:
|
|
32615
|
+
return new Promise(function (resolve) {
|
|
32616
|
+
resolve(mockLayersDefault2);
|
|
32617
|
+
});
|
|
32618
|
+
default:
|
|
32619
|
+
{
|
|
32620
|
+
var message = "Url '".concat(url, "' is not a mock-url.");
|
|
32621
|
+
return Promise.reject(new Error(message));
|
|
32622
|
+
}
|
|
32623
|
+
}
|
|
32624
|
+
};
|
|
32625
|
+
var mockGetLayersFlattenedFromService = function mockGetLayersFlattenedFromService(url) {
|
|
32626
|
+
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
32627
|
+
var layers, serviceLayers, _iterator, _step, object;
|
|
32628
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
32629
|
+
while (1) switch (_context.prev = _context.next) {
|
|
32630
|
+
case 0:
|
|
32631
|
+
_context.next = 2;
|
|
32632
|
+
return mockGetLayersFromService(url);
|
|
32633
|
+
case 2:
|
|
32634
|
+
layers = _context.sent;
|
|
32635
|
+
serviceLayers = []; // TODO: Maarten Plieger, 2022-11-02: Harmonize types and use correct types: https://gitlab.com/opengeoweb/opengeoweb/-/issues/2817
|
|
32636
|
+
_iterator = _createForOfIteratorHelper(layers.children);
|
|
32637
|
+
try {
|
|
32638
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
32639
|
+
object = _step.value;
|
|
32640
|
+
serviceLayers.push({
|
|
32641
|
+
name: object.name,
|
|
32642
|
+
title: object.title,
|
|
32643
|
+
leaf: object.leaf,
|
|
32644
|
+
path: object.path,
|
|
32645
|
+
keywords: object.keywords ? object.keywords : [],
|
|
32646
|
+
"abstract": object["abstract"] ? object["abstract"] : '',
|
|
32647
|
+
styles: object.styles ? object.styles : [],
|
|
32648
|
+
dimensions: object.dimensions || [],
|
|
32649
|
+
geographicBoundingBox: object.geographicBoundingBox || undefined
|
|
32650
|
+
});
|
|
32651
|
+
}
|
|
32652
|
+
} catch (err) {
|
|
32653
|
+
_iterator.e(err);
|
|
32654
|
+
} finally {
|
|
32655
|
+
_iterator.f();
|
|
32656
|
+
}
|
|
32657
|
+
return _context.abrupt("return", serviceLayers);
|
|
32658
|
+
case 7:
|
|
32659
|
+
case "end":
|
|
32660
|
+
return _context.stop();
|
|
32661
|
+
}
|
|
32662
|
+
}, _callee);
|
|
32663
|
+
}));
|
|
32664
|
+
};
|
|
32665
|
+
|
|
32666
|
+
var getCapabilities$1 = /*#__PURE__*/Object.freeze({
|
|
32667
|
+
__proto__: null,
|
|
32668
|
+
MOCK_URL_WITH_CHILDREN: MOCK_URL_WITH_CHILDREN,
|
|
32669
|
+
MOCK_URL_NO_CHILDREN: MOCK_URL_NO_CHILDREN,
|
|
32670
|
+
MOCK_URL_WITH_NO_TITLE: MOCK_URL_WITH_NO_TITLE,
|
|
32671
|
+
MOCK_URL_WITH_NO_TITLE_OR_NAME: MOCK_URL_WITH_NO_TITLE_OR_NAME,
|
|
32672
|
+
MOCK_URL_WITH_SUBCATEGORY: MOCK_URL_WITH_SUBCATEGORY,
|
|
32673
|
+
MOCK_URL_INVALID: MOCK_URL_INVALID,
|
|
32674
|
+
MOCK_URL_SLOW: MOCK_URL_SLOW,
|
|
32675
|
+
MOCK_URL_SLOW_FAILS: MOCK_URL_SLOW_FAILS,
|
|
32676
|
+
MOCK_URL_DEFAULT: MOCK_URL_DEFAULT,
|
|
32677
|
+
MOCK_URL_DEFAULT2: MOCK_URL_DEFAULT2,
|
|
32678
|
+
MOCK_URL_HTTP: MOCK_URL_HTTP,
|
|
32679
|
+
mockLayersNoChildren: mockLayersNoChildren,
|
|
32680
|
+
mockLayersWithChildren: mockLayersWithChildren,
|
|
32681
|
+
mockLayersWithNoTitle: mockLayersWithNoTitle,
|
|
32682
|
+
mockLayersWithNoTitleOrName: mockLayersWithNoTitleOrName,
|
|
32683
|
+
mockLayersWithSubcategory: mockLayersWithSubcategory,
|
|
32684
|
+
mockLayersDefault: mockLayersDefault,
|
|
32685
|
+
mockLayersDefault2: mockLayersDefault2,
|
|
32686
|
+
mockGetLayersFromService: mockGetLayersFromService,
|
|
32687
|
+
mockGetLayersFlattenedFromService: mockGetLayersFlattenedFromService
|
|
32688
|
+
});
|
|
32689
|
+
|
|
32690
|
+
/* *
|
|
32691
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
32692
|
+
* you may not use this file except in compliance with the License.
|
|
32693
|
+
* You may obtain a copy of the License at
|
|
32694
|
+
*
|
|
32695
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
32696
|
+
*
|
|
32697
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
32698
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
32699
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
32700
|
+
* See the License for the specific language governing permissions and
|
|
32701
|
+
* limitations under the License.
|
|
32702
|
+
*
|
|
32703
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
32704
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
32705
|
+
* */
|
|
32706
|
+
var mockGetCapabilities = Object.assign(Object.assign({}, getCapabilities$1), {
|
|
32707
|
+
WMS111GetCapabilitiesGeoServicesRADAR: WMS111GetCapabilitiesGeoServicesRADAR
|
|
32708
|
+
});
|
|
32709
|
+
|
|
32710
|
+
/* *
|
|
32711
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
32712
|
+
* you may not use this file except in compliance with the License.
|
|
32713
|
+
* You may obtain a copy of the License at
|
|
32714
|
+
*
|
|
32715
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
32716
|
+
*
|
|
32717
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
32718
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
32719
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
32720
|
+
* See the License for the specific language governing permissions and
|
|
32721
|
+
* limitations under the License.
|
|
32722
|
+
*
|
|
32723
|
+
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
32724
|
+
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
32725
|
+
* */
|
|
32726
|
+
/**
|
|
32727
|
+
* Converts webmapjs node structure to LayerTree
|
|
32728
|
+
* @param nodesToRecur THe WebMapJS node structure from service.getNodes();
|
|
32729
|
+
*/
|
|
32730
|
+
var recurseNodes = function recurseNodes(nodesToRecur) {
|
|
32731
|
+
var newLayerTreeObj = {
|
|
32732
|
+
leaf: nodesToRecur.leaf,
|
|
32733
|
+
name: nodesToRecur.name,
|
|
32734
|
+
title: nodesToRecur.title,
|
|
32735
|
+
path: nodesToRecur.path || [],
|
|
32736
|
+
children: [],
|
|
32737
|
+
keywords: nodesToRecur.keywords || [],
|
|
32738
|
+
"abstract": nodesToRecur["abstract"] || '',
|
|
32739
|
+
styles: nodesToRecur.styles || [],
|
|
32740
|
+
dimensions: nodesToRecur.dimensions || [],
|
|
32741
|
+
geographicBoundingBox: nodesToRecur.geographicBoundingBox || null
|
|
32742
|
+
};
|
|
32743
|
+
if (nodesToRecur.children) {
|
|
32744
|
+
for (var j = 0; j < nodesToRecur.children.length; j += 1) {
|
|
32745
|
+
newLayerTreeObj.children.push(recurseNodes(nodesToRecur.children[j]));
|
|
32746
|
+
}
|
|
32747
|
+
}
|
|
32748
|
+
return newLayerTreeObj;
|
|
32749
|
+
};
|
|
32750
|
+
/**
|
|
32751
|
+
* Returns a promise with a hierarchical tree of layers from the WMS GetCapabilities document.
|
|
32752
|
+
* @param serviceUrl The URL of the WMS service
|
|
32753
|
+
* @param {boolean} forceReload **optional** forceReload: boolean, true will force the layers to be reloaded from the service, defaults to false
|
|
32754
|
+
*/
|
|
32755
|
+
var getLayersFromService = function getLayersFromService(serviceUrl) {
|
|
32756
|
+
var forceReload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
32757
|
+
return new Promise(function (resolve, reject) {
|
|
32758
|
+
var serviceObject = WMGetServiceFromStore(serviceUrl);
|
|
32759
|
+
serviceObject.getNodes(function (nodes) {
|
|
32760
|
+
// TODO: Maarten Plieger, 2022-11-02: Harmonize types and use correct types: https://gitlab.com/opengeoweb/opengeoweb/-/issues/2817
|
|
32761
|
+
var layerTree = recurseNodes(nodes);
|
|
32762
|
+
resolve(layerTree);
|
|
32763
|
+
}, function (error) {
|
|
32764
|
+
reject(new Error(error));
|
|
32765
|
+
}, forceReload);
|
|
32766
|
+
});
|
|
32767
|
+
};
|
|
32768
|
+
/**
|
|
32769
|
+
* Returns a promise with an array of flattened layerobjects from the WMS GetCapabilities document.
|
|
32770
|
+
* @param serviceUrl The URL of the WMS service
|
|
32771
|
+
* @param {boolean} forceReload **optional** forceReload: boolean, true will force the layers to be reloaded from the service, defaults to false
|
|
32772
|
+
*/
|
|
32773
|
+
var getLayersFlattenedFromService = function getLayersFlattenedFromService(serviceUrl) {
|
|
32774
|
+
var forceReload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
32775
|
+
return new Promise(function (resolve, reject) {
|
|
32776
|
+
var serviceObject = WMGetServiceFromStore(serviceUrl);
|
|
32777
|
+
serviceObject.getLayerObjectsFlat(function (layers) {
|
|
32778
|
+
resolve(layers);
|
|
32779
|
+
}, function (error) {
|
|
32780
|
+
reject(new Error(error));
|
|
32781
|
+
}, forceReload);
|
|
32782
|
+
});
|
|
32783
|
+
};
|
|
32784
|
+
|
|
32785
|
+
var getCapabilities = /*#__PURE__*/Object.freeze({
|
|
32786
|
+
__proto__: null,
|
|
32787
|
+
recurseNodes: recurseNodes,
|
|
32788
|
+
getLayersFromService: getLayersFromService,
|
|
32789
|
+
getLayersFlattenedFromService: getLayersFlattenedFromService
|
|
32790
|
+
});
|
|
32791
|
+
|
|
32792
|
+
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 };
|