@opengeoweb/webmap 6.0.4 → 6.1.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.esm.js +794 -667
- package/package.json +2 -2
- package/src/lib/components/WMAnimate.d.ts +6 -1
- package/src/lib/components/WMCanvasBuffer.d.ts +1 -1
- package/src/lib/components/WMImage.d.ts +2 -1
- package/src/lib/components/WMJSDimension.d.ts +2 -2
- package/src/lib/components/WMJSMap.d.ts +3 -3
- package/src/lib/components/WMJSMapHelpers.d.ts +1 -1
- package/src/lib/components/WMJSTools.d.ts +1 -1
- package/src/lib/components/WMLayer.d.ts +19 -10
- package/src/lib/components/WMTime.d.ts +2 -1
- package/src/lib/components/index.d.ts +5 -4
- package/src/lib/components/types.d.ts +3 -3
- package/src/lib/utils/testSettings.d.ts +24 -1
- package/src/lib/utils/tilesettings.d.ts +36 -333
- package/src/lib/utils/utils.d.ts +1 -1
package/index.esm.js
CHANGED
|
@@ -2,337 +2,342 @@ import { debounce, throttle } from 'throttle-debounce';
|
|
|
2
2
|
import { dateUtils } from '@opengeoweb/shared';
|
|
3
3
|
import proj4 from 'proj4';
|
|
4
4
|
|
|
5
|
-
function _iterableToArrayLimit(
|
|
6
|
-
var
|
|
7
|
-
if (null !=
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
function _iterableToArrayLimit(r, l) {
|
|
6
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
7
|
+
if (null != t) {
|
|
8
|
+
var e,
|
|
9
|
+
n,
|
|
10
|
+
i,
|
|
11
|
+
u,
|
|
12
|
+
a = [],
|
|
13
|
+
f = !0,
|
|
14
|
+
o = !1;
|
|
15
15
|
try {
|
|
16
|
-
if (
|
|
17
|
-
if (Object(
|
|
18
|
-
|
|
19
|
-
} else for (; !(
|
|
20
|
-
} catch (
|
|
21
|
-
|
|
16
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
17
|
+
if (Object(t) !== t) return;
|
|
18
|
+
f = !1;
|
|
19
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
20
|
+
} catch (r) {
|
|
21
|
+
o = !0, n = r;
|
|
22
22
|
} finally {
|
|
23
23
|
try {
|
|
24
|
-
if (!
|
|
24
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
25
25
|
} finally {
|
|
26
|
-
if (
|
|
26
|
+
if (o) throw n;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
return
|
|
29
|
+
return a;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
function _regeneratorRuntime() {
|
|
33
33
|
_regeneratorRuntime = function () {
|
|
34
|
-
return
|
|
34
|
+
return e;
|
|
35
35
|
};
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
var t,
|
|
37
|
+
e = {},
|
|
38
|
+
r = Object.prototype,
|
|
39
|
+
n = r.hasOwnProperty,
|
|
40
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
41
|
+
t[e] = r.value;
|
|
41
42
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
function define(
|
|
47
|
-
return Object.defineProperty(
|
|
48
|
-
value:
|
|
43
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
44
|
+
a = i.iterator || "@@iterator",
|
|
45
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
46
|
+
u = i.toStringTag || "@@toStringTag";
|
|
47
|
+
function define(t, e, r) {
|
|
48
|
+
return Object.defineProperty(t, e, {
|
|
49
|
+
value: r,
|
|
49
50
|
enumerable: !0,
|
|
50
51
|
configurable: !0,
|
|
51
52
|
writable: !0
|
|
52
|
-
}),
|
|
53
|
+
}), t[e];
|
|
53
54
|
}
|
|
54
55
|
try {
|
|
55
56
|
define({}, "");
|
|
56
|
-
} catch (
|
|
57
|
-
define = function (
|
|
58
|
-
return
|
|
57
|
+
} catch (t) {
|
|
58
|
+
define = function (t, e, r) {
|
|
59
|
+
return t[e] = r;
|
|
59
60
|
};
|
|
60
61
|
}
|
|
61
|
-
function wrap(
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return
|
|
66
|
-
value: makeInvokeMethod(
|
|
67
|
-
}),
|
|
62
|
+
function wrap(t, e, r, n) {
|
|
63
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
64
|
+
a = Object.create(i.prototype),
|
|
65
|
+
c = new Context(n || []);
|
|
66
|
+
return o(a, "_invoke", {
|
|
67
|
+
value: makeInvokeMethod(t, r, c)
|
|
68
|
+
}), a;
|
|
68
69
|
}
|
|
69
|
-
function tryCatch(
|
|
70
|
+
function tryCatch(t, e, r) {
|
|
70
71
|
try {
|
|
71
72
|
return {
|
|
72
73
|
type: "normal",
|
|
73
|
-
arg:
|
|
74
|
+
arg: t.call(e, r)
|
|
74
75
|
};
|
|
75
|
-
} catch (
|
|
76
|
+
} catch (t) {
|
|
76
77
|
return {
|
|
77
78
|
type: "throw",
|
|
78
|
-
arg:
|
|
79
|
+
arg: t
|
|
79
80
|
};
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
|
-
|
|
83
|
-
var
|
|
83
|
+
e.wrap = wrap;
|
|
84
|
+
var h = "suspendedStart",
|
|
85
|
+
l = "suspendedYield",
|
|
86
|
+
f = "executing",
|
|
87
|
+
s = "completed",
|
|
88
|
+
y = {};
|
|
84
89
|
function Generator() {}
|
|
85
90
|
function GeneratorFunction() {}
|
|
86
91
|
function GeneratorFunctionPrototype() {}
|
|
87
|
-
var
|
|
88
|
-
define(
|
|
92
|
+
var p = {};
|
|
93
|
+
define(p, a, function () {
|
|
89
94
|
return this;
|
|
90
95
|
});
|
|
91
|
-
var
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
var
|
|
95
|
-
function defineIteratorMethods(
|
|
96
|
-
["next", "throw", "return"].forEach(function (
|
|
97
|
-
define(
|
|
98
|
-
return this._invoke(
|
|
96
|
+
var d = Object.getPrototypeOf,
|
|
97
|
+
v = d && d(d(values([])));
|
|
98
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
99
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
100
|
+
function defineIteratorMethods(t) {
|
|
101
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
102
|
+
define(t, e, function (t) {
|
|
103
|
+
return this._invoke(e, t);
|
|
99
104
|
});
|
|
100
105
|
});
|
|
101
106
|
}
|
|
102
|
-
function AsyncIterator(
|
|
103
|
-
function invoke(
|
|
104
|
-
var
|
|
105
|
-
if ("throw" !==
|
|
106
|
-
var
|
|
107
|
-
|
|
108
|
-
return
|
|
109
|
-
invoke("next",
|
|
110
|
-
}, function (
|
|
111
|
-
invoke("throw",
|
|
112
|
-
}) :
|
|
113
|
-
|
|
114
|
-
}, function (
|
|
115
|
-
return invoke("throw",
|
|
107
|
+
function AsyncIterator(t, e) {
|
|
108
|
+
function invoke(r, o, i, a) {
|
|
109
|
+
var c = tryCatch(t[r], t, o);
|
|
110
|
+
if ("throw" !== c.type) {
|
|
111
|
+
var u = c.arg,
|
|
112
|
+
h = u.value;
|
|
113
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
114
|
+
invoke("next", t, i, a);
|
|
115
|
+
}, function (t) {
|
|
116
|
+
invoke("throw", t, i, a);
|
|
117
|
+
}) : e.resolve(h).then(function (t) {
|
|
118
|
+
u.value = t, i(u);
|
|
119
|
+
}, function (t) {
|
|
120
|
+
return invoke("throw", t, i, a);
|
|
116
121
|
});
|
|
117
122
|
}
|
|
118
|
-
|
|
123
|
+
a(c.arg);
|
|
119
124
|
}
|
|
120
|
-
var
|
|
121
|
-
|
|
122
|
-
value: function (
|
|
125
|
+
var r;
|
|
126
|
+
o(this, "_invoke", {
|
|
127
|
+
value: function (t, n) {
|
|
123
128
|
function callInvokeWithMethodAndArg() {
|
|
124
|
-
return new
|
|
125
|
-
invoke(
|
|
129
|
+
return new e(function (e, r) {
|
|
130
|
+
invoke(t, n, e, r);
|
|
126
131
|
});
|
|
127
132
|
}
|
|
128
|
-
return
|
|
133
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
129
134
|
}
|
|
130
135
|
});
|
|
131
136
|
}
|
|
132
|
-
function makeInvokeMethod(
|
|
133
|
-
var
|
|
134
|
-
return function (
|
|
135
|
-
if (
|
|
136
|
-
if (
|
|
137
|
-
if ("throw" ===
|
|
137
|
+
function makeInvokeMethod(e, r, n) {
|
|
138
|
+
var o = h;
|
|
139
|
+
return function (i, a) {
|
|
140
|
+
if (o === f) throw new Error("Generator is already running");
|
|
141
|
+
if (o === s) {
|
|
142
|
+
if ("throw" === i) throw a;
|
|
138
143
|
return {
|
|
139
|
-
value:
|
|
144
|
+
value: t,
|
|
140
145
|
done: !0
|
|
141
146
|
};
|
|
142
147
|
}
|
|
143
|
-
for (
|
|
144
|
-
var
|
|
145
|
-
if (
|
|
146
|
-
var
|
|
147
|
-
if (
|
|
148
|
-
if (
|
|
149
|
-
return
|
|
148
|
+
for (n.method = i, n.arg = a;;) {
|
|
149
|
+
var c = n.delegate;
|
|
150
|
+
if (c) {
|
|
151
|
+
var u = maybeInvokeDelegate(c, n);
|
|
152
|
+
if (u) {
|
|
153
|
+
if (u === y) continue;
|
|
154
|
+
return u;
|
|
150
155
|
}
|
|
151
156
|
}
|
|
152
|
-
if ("next" ===
|
|
153
|
-
if (
|
|
154
|
-
|
|
155
|
-
} else "return" ===
|
|
156
|
-
|
|
157
|
-
var
|
|
158
|
-
if ("normal" ===
|
|
159
|
-
if (
|
|
157
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
158
|
+
if (o === h) throw o = s, n.arg;
|
|
159
|
+
n.dispatchException(n.arg);
|
|
160
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
161
|
+
o = f;
|
|
162
|
+
var p = tryCatch(e, r, n);
|
|
163
|
+
if ("normal" === p.type) {
|
|
164
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
160
165
|
return {
|
|
161
|
-
value:
|
|
162
|
-
done:
|
|
166
|
+
value: p.arg,
|
|
167
|
+
done: n.done
|
|
163
168
|
};
|
|
164
169
|
}
|
|
165
|
-
"throw" ===
|
|
170
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
166
171
|
}
|
|
167
172
|
};
|
|
168
173
|
}
|
|
169
|
-
function maybeInvokeDelegate(
|
|
170
|
-
var
|
|
171
|
-
|
|
172
|
-
if (
|
|
173
|
-
var
|
|
174
|
-
if ("throw" ===
|
|
175
|
-
var
|
|
176
|
-
return
|
|
174
|
+
function maybeInvokeDelegate(e, r) {
|
|
175
|
+
var n = r.method,
|
|
176
|
+
o = e.iterator[n];
|
|
177
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
178
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
179
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
180
|
+
var a = i.arg;
|
|
181
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
177
182
|
}
|
|
178
|
-
function pushTryEntry(
|
|
179
|
-
var
|
|
180
|
-
tryLoc:
|
|
183
|
+
function pushTryEntry(t) {
|
|
184
|
+
var e = {
|
|
185
|
+
tryLoc: t[0]
|
|
181
186
|
};
|
|
182
|
-
1 in
|
|
187
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
183
188
|
}
|
|
184
|
-
function resetTryEntry(
|
|
185
|
-
var
|
|
186
|
-
|
|
189
|
+
function resetTryEntry(t) {
|
|
190
|
+
var e = t.completion || {};
|
|
191
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
187
192
|
}
|
|
188
|
-
function Context(
|
|
193
|
+
function Context(t) {
|
|
189
194
|
this.tryEntries = [{
|
|
190
195
|
tryLoc: "root"
|
|
191
|
-
}],
|
|
196
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
192
197
|
}
|
|
193
|
-
function values(
|
|
194
|
-
if (
|
|
195
|
-
var
|
|
196
|
-
if (
|
|
197
|
-
if ("function" == typeof
|
|
198
|
-
if (!isNaN(
|
|
199
|
-
var
|
|
200
|
-
|
|
201
|
-
for (; ++
|
|
202
|
-
return next.value =
|
|
198
|
+
function values(e) {
|
|
199
|
+
if (e || "" === e) {
|
|
200
|
+
var r = e[a];
|
|
201
|
+
if (r) return r.call(e);
|
|
202
|
+
if ("function" == typeof e.next) return e;
|
|
203
|
+
if (!isNaN(e.length)) {
|
|
204
|
+
var o = -1,
|
|
205
|
+
i = function next() {
|
|
206
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
207
|
+
return next.value = t, next.done = !0, next;
|
|
203
208
|
};
|
|
204
|
-
return
|
|
209
|
+
return i.next = i;
|
|
205
210
|
}
|
|
206
211
|
}
|
|
207
|
-
throw new TypeError(typeof
|
|
212
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
208
213
|
}
|
|
209
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
214
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
210
215
|
value: GeneratorFunctionPrototype,
|
|
211
216
|
configurable: !0
|
|
212
|
-
}),
|
|
217
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
213
218
|
value: GeneratorFunction,
|
|
214
219
|
configurable: !0
|
|
215
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
216
|
-
var
|
|
217
|
-
return !!
|
|
218
|
-
},
|
|
219
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
220
|
-
},
|
|
220
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
221
|
+
var e = "function" == typeof t && t.constructor;
|
|
222
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
223
|
+
}, e.mark = function (t) {
|
|
224
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
225
|
+
}, e.awrap = function (t) {
|
|
221
226
|
return {
|
|
222
|
-
__await:
|
|
227
|
+
__await: t
|
|
223
228
|
};
|
|
224
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
229
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
225
230
|
return this;
|
|
226
|
-
}),
|
|
227
|
-
void 0 ===
|
|
228
|
-
var
|
|
229
|
-
return
|
|
230
|
-
return
|
|
231
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
232
|
+
void 0 === i && (i = Promise);
|
|
233
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
234
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
235
|
+
return t.done ? t.value : a.next();
|
|
231
236
|
});
|
|
232
|
-
}, defineIteratorMethods(
|
|
237
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
233
238
|
return this;
|
|
234
|
-
}), define(
|
|
239
|
+
}), define(g, "toString", function () {
|
|
235
240
|
return "[object Generator]";
|
|
236
|
-
}),
|
|
237
|
-
var
|
|
238
|
-
|
|
239
|
-
for (var
|
|
240
|
-
return
|
|
241
|
-
for (;
|
|
242
|
-
var
|
|
243
|
-
if (
|
|
241
|
+
}), e.keys = function (t) {
|
|
242
|
+
var e = Object(t),
|
|
243
|
+
r = [];
|
|
244
|
+
for (var n in e) r.push(n);
|
|
245
|
+
return r.reverse(), function next() {
|
|
246
|
+
for (; r.length;) {
|
|
247
|
+
var t = r.pop();
|
|
248
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
244
249
|
}
|
|
245
250
|
return next.done = !0, next;
|
|
246
251
|
};
|
|
247
|
-
},
|
|
252
|
+
}, e.values = values, Context.prototype = {
|
|
248
253
|
constructor: Context,
|
|
249
|
-
reset: function (
|
|
250
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
254
|
+
reset: function (e) {
|
|
255
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
251
256
|
},
|
|
252
257
|
stop: function () {
|
|
253
258
|
this.done = !0;
|
|
254
|
-
var
|
|
255
|
-
if ("throw" ===
|
|
259
|
+
var t = this.tryEntries[0].completion;
|
|
260
|
+
if ("throw" === t.type) throw t.arg;
|
|
256
261
|
return this.rval;
|
|
257
262
|
},
|
|
258
|
-
dispatchException: function (
|
|
259
|
-
if (this.done) throw
|
|
260
|
-
var
|
|
261
|
-
function handle(
|
|
262
|
-
return
|
|
263
|
-
}
|
|
264
|
-
for (var
|
|
265
|
-
var
|
|
266
|
-
|
|
267
|
-
if ("root" ===
|
|
268
|
-
if (
|
|
269
|
-
var
|
|
270
|
-
|
|
271
|
-
if (
|
|
272
|
-
if (this.prev <
|
|
273
|
-
if (this.prev <
|
|
274
|
-
} else if (
|
|
275
|
-
if (this.prev <
|
|
263
|
+
dispatchException: function (e) {
|
|
264
|
+
if (this.done) throw e;
|
|
265
|
+
var r = this;
|
|
266
|
+
function handle(n, o) {
|
|
267
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
268
|
+
}
|
|
269
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
270
|
+
var i = this.tryEntries[o],
|
|
271
|
+
a = i.completion;
|
|
272
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
273
|
+
if (i.tryLoc <= this.prev) {
|
|
274
|
+
var c = n.call(i, "catchLoc"),
|
|
275
|
+
u = n.call(i, "finallyLoc");
|
|
276
|
+
if (c && u) {
|
|
277
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
278
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
279
|
+
} else if (c) {
|
|
280
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
276
281
|
} else {
|
|
277
|
-
if (!
|
|
278
|
-
if (this.prev <
|
|
282
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
283
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
279
284
|
}
|
|
280
285
|
}
|
|
281
286
|
}
|
|
282
287
|
},
|
|
283
|
-
abrupt: function (
|
|
284
|
-
for (var
|
|
285
|
-
var
|
|
286
|
-
if (
|
|
287
|
-
var
|
|
288
|
+
abrupt: function (t, e) {
|
|
289
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
290
|
+
var o = this.tryEntries[r];
|
|
291
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
292
|
+
var i = o;
|
|
288
293
|
break;
|
|
289
294
|
}
|
|
290
295
|
}
|
|
291
|
-
|
|
292
|
-
var
|
|
293
|
-
return
|
|
296
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
297
|
+
var a = i ? i.completion : {};
|
|
298
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
294
299
|
},
|
|
295
|
-
complete: function (
|
|
296
|
-
if ("throw" ===
|
|
297
|
-
return "break" ===
|
|
300
|
+
complete: function (t, e) {
|
|
301
|
+
if ("throw" === t.type) throw t.arg;
|
|
302
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
298
303
|
},
|
|
299
|
-
finish: function (
|
|
300
|
-
for (var
|
|
301
|
-
var
|
|
302
|
-
if (
|
|
304
|
+
finish: function (t) {
|
|
305
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
306
|
+
var r = this.tryEntries[e];
|
|
307
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
303
308
|
}
|
|
304
309
|
},
|
|
305
|
-
catch: function (
|
|
306
|
-
for (var
|
|
307
|
-
var
|
|
308
|
-
if (
|
|
309
|
-
var
|
|
310
|
-
if ("throw" ===
|
|
311
|
-
var
|
|
312
|
-
resetTryEntry(
|
|
310
|
+
catch: function (t) {
|
|
311
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
312
|
+
var r = this.tryEntries[e];
|
|
313
|
+
if (r.tryLoc === t) {
|
|
314
|
+
var n = r.completion;
|
|
315
|
+
if ("throw" === n.type) {
|
|
316
|
+
var o = n.arg;
|
|
317
|
+
resetTryEntry(r);
|
|
313
318
|
}
|
|
314
|
-
return
|
|
319
|
+
return o;
|
|
315
320
|
}
|
|
316
321
|
}
|
|
317
322
|
throw new Error("illegal catch attempt");
|
|
318
323
|
},
|
|
319
|
-
delegateYield: function (
|
|
324
|
+
delegateYield: function (e, r, n) {
|
|
320
325
|
return this.delegate = {
|
|
321
|
-
iterator: values(
|
|
322
|
-
resultName:
|
|
323
|
-
nextLoc:
|
|
324
|
-
}, "next" === this.method && (this.arg =
|
|
326
|
+
iterator: values(e),
|
|
327
|
+
resultName: r,
|
|
328
|
+
nextLoc: n
|
|
329
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
325
330
|
}
|
|
326
|
-
},
|
|
331
|
+
}, e;
|
|
327
332
|
}
|
|
328
|
-
function _typeof$1(
|
|
333
|
+
function _typeof$1(o) {
|
|
329
334
|
"@babel/helpers - typeof";
|
|
330
335
|
|
|
331
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
332
|
-
return typeof
|
|
333
|
-
} : function (
|
|
334
|
-
return
|
|
335
|
-
}, _typeof$1(
|
|
336
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
337
|
+
return typeof o;
|
|
338
|
+
} : function (o) {
|
|
339
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
340
|
+
}, _typeof$1(o);
|
|
336
341
|
}
|
|
337
342
|
function _classCallCheck(instance, Constructor) {
|
|
338
343
|
if (!(instance instanceof Constructor)) {
|
|
@@ -17870,14 +17875,14 @@ var getCorrectWMSDimName = function getCorrectWMSDimName(origDimName) {
|
|
|
17870
17875
|
/* Returns all dimensions with its current values as URL */
|
|
17871
17876
|
var getMapDimURL = function getMapDimURL(layer) {
|
|
17872
17877
|
var request = '';
|
|
17873
|
-
|
|
17874
|
-
var currentValue =
|
|
17875
|
-
request += "&".concat(getCorrectWMSDimName(
|
|
17878
|
+
layer.dimensions.forEach(function (dimension) {
|
|
17879
|
+
var currentValue = dimension.getValue();
|
|
17880
|
+
request += "&".concat(getCorrectWMSDimName(dimension.name));
|
|
17876
17881
|
request += "=".concat(URLEncode(currentValue));
|
|
17877
17882
|
if (currentValue === WMDateOutSideRange || currentValue === WMDateTooEarlyString || currentValue === WMDateTooLateString) {
|
|
17878
17883
|
throw new Error(WMDateOutSideRange);
|
|
17879
17884
|
}
|
|
17880
|
-
}
|
|
17885
|
+
});
|
|
17881
17886
|
return request;
|
|
17882
17887
|
};
|
|
17883
17888
|
/**
|
|
@@ -18262,6 +18267,11 @@ var WMImage = /*#__PURE__*/function () {
|
|
|
18262
18267
|
}
|
|
18263
18268
|
return this._isLoaded;
|
|
18264
18269
|
}
|
|
18270
|
+
}, {
|
|
18271
|
+
key: "isLoadedWithoutErrors",
|
|
18272
|
+
value: function isLoadedWithoutErrors() {
|
|
18273
|
+
return this.isLoaded() && !this.hasError();
|
|
18274
|
+
}
|
|
18265
18275
|
/**
|
|
18266
18276
|
* Returns true if the image is still loading
|
|
18267
18277
|
*/
|
|
@@ -18393,6 +18403,7 @@ var WMImage = /*#__PURE__*/function () {
|
|
|
18393
18403
|
}, {
|
|
18394
18404
|
key: "_load",
|
|
18395
18405
|
value: function _load() {
|
|
18406
|
+
var _a;
|
|
18396
18407
|
this._hasError = false;
|
|
18397
18408
|
if (this._isLoaded === true) {
|
|
18398
18409
|
this._loadEvent(false);
|
|
@@ -18418,7 +18429,7 @@ var WMImage = /*#__PURE__*/function () {
|
|
|
18418
18429
|
this._loadEvent(false);
|
|
18419
18430
|
return;
|
|
18420
18431
|
}
|
|
18421
|
-
if (
|
|
18432
|
+
if ((_a = this.headers) === null || _a === void 0 ? void 0 : _a.length) {
|
|
18422
18433
|
/* Get an image which needs headers */
|
|
18423
18434
|
this._getImageWithHeaders(this.srcToLoad, this.headers);
|
|
18424
18435
|
} else if (this.randomize) {
|
|
@@ -18430,19 +18441,19 @@ var WMImage = /*#__PURE__*/function () {
|
|
|
18430
18441
|
newSrc += "random=".concat(Math.random());
|
|
18431
18442
|
this.getElement().src = newSrc;
|
|
18432
18443
|
} else {
|
|
18444
|
+
// setting src loads the image and the 'load' callback is called when its finished loading
|
|
18433
18445
|
this.getElement().src = this.srcToLoad;
|
|
18434
18446
|
}
|
|
18435
18447
|
}
|
|
18436
18448
|
}, {
|
|
18437
18449
|
key: "_loadEvent",
|
|
18438
18450
|
value: function _loadEvent(hasError) {
|
|
18451
|
+
var _a;
|
|
18439
18452
|
this._hasError = hasError;
|
|
18440
18453
|
this._isLoading = false;
|
|
18441
18454
|
this._isLoaded = true;
|
|
18442
18455
|
this._srcLoaded = this.srcToLoad;
|
|
18443
|
-
|
|
18444
|
-
this.loadEventCallback(this);
|
|
18445
|
-
}
|
|
18456
|
+
(_a = this.loadEventCallback) === null || _a === void 0 ? void 0 : _a.call(this, this);
|
|
18446
18457
|
}
|
|
18447
18458
|
/**
|
|
18448
18459
|
* Get the width of the current image
|
|
@@ -18954,20 +18965,19 @@ var makeQueryStringWithoutGeoInfo = function makeQueryStringWithoutGeoInfo(image
|
|
|
18954
18965
|
* @param newLayer A canvaslayer object to add.
|
|
18955
18966
|
*/
|
|
18956
18967
|
var addAlternativeImage = function addAlternativeImage(newLayer) {
|
|
18968
|
+
var _a;
|
|
18957
18969
|
/* Get a signature for images which belong to each other */
|
|
18958
18970
|
var sigImageUrl = makeQueryStringWithoutGeoInfo(newLayer.imageSource);
|
|
18959
18971
|
/* Make an entry for these images in the sharedImagesList */
|
|
18960
|
-
|
|
18961
|
-
sharedImagesList[sigImageUrl] = [];
|
|
18962
|
-
}
|
|
18972
|
+
(_a = sharedImagesList[sigImageUrl]) !== null && _a !== void 0 ? _a : sharedImagesList[sigImageUrl] = [];
|
|
18963
18973
|
/* Get the images for this signature */
|
|
18964
18974
|
var imagesForUrl = sharedImagesList[sigImageUrl];
|
|
18965
18975
|
/* Check if the image is not already in the sharedImagesList */
|
|
18966
|
-
var imageIsAlreadyIndex = imagesForUrl.
|
|
18976
|
+
var imageIsAlreadyIndex = imagesForUrl.find(function (i) {
|
|
18967
18977
|
return i.imageSource === newLayer.imageSource;
|
|
18968
18978
|
});
|
|
18969
18979
|
/* It is not in the list, so add it */
|
|
18970
|
-
if (imageIsAlreadyIndex
|
|
18980
|
+
if (!imageIsAlreadyIndex) {
|
|
18971
18981
|
/* Ensure that the oldest images are removed, keep a maximum of 10 images per signature url */
|
|
18972
18982
|
while (sharedImagesList[sigImageUrl].length >= 10) {
|
|
18973
18983
|
sharedImagesList[sigImageUrl].pop();
|
|
@@ -19019,18 +19029,14 @@ var getAlternativeImage = function getAlternativeImage(imageUrl, imageStore,
|
|
|
19019
19029
|
_bbox) {
|
|
19020
19030
|
var sigImageUrl = makeQueryStringWithoutGeoInfo(imageUrl);
|
|
19021
19031
|
var imagesForUrl = sharedImagesList[sigImageUrl];
|
|
19022
|
-
if (imagesForUrl
|
|
19032
|
+
if (imagesForUrl === null || imagesForUrl === void 0 ? void 0 : imagesForUrl.length) {
|
|
19023
19033
|
var sortedImagesForUrl = sortByImageDate(imagesForUrl);
|
|
19024
|
-
|
|
19025
|
-
var index = sortedImagesForUrl.findIndex(function (altImage) {
|
|
19034
|
+
return sortedImagesForUrl.find(function (altImage) {
|
|
19026
19035
|
var cachedImage = imageStore.getImageForSrc(altImage.imageSource);
|
|
19027
|
-
return cachedImage
|
|
19036
|
+
return cachedImage === null || cachedImage === void 0 ? void 0 : cachedImage.isLoadedWithoutErrors();
|
|
19028
19037
|
});
|
|
19029
|
-
if (index !== -1) {
|
|
19030
|
-
return sortedImagesForUrl[index];
|
|
19031
|
-
}
|
|
19032
19038
|
}
|
|
19033
|
-
return
|
|
19039
|
+
return undefined;
|
|
19034
19040
|
};
|
|
19035
19041
|
var WMCanvasBuffer = /*#__PURE__*/function () {
|
|
19036
19042
|
function WMCanvasBuffer(webmapJSCallback, _imageStore, w, h, internalCallbacks) {
|
|
@@ -19148,6 +19154,8 @@ var WMCanvasBuffer = /*#__PURE__*/function () {
|
|
|
19148
19154
|
}, {
|
|
19149
19155
|
key: "display",
|
|
19150
19156
|
value: function display() {
|
|
19157
|
+
var _this2 = this;
|
|
19158
|
+
var _a, _b, _c, _d, _e, _f;
|
|
19151
19159
|
this._ctx.globalAlpha = 1;
|
|
19152
19160
|
this._ctx.fillStyle = 'white';
|
|
19153
19161
|
this._ctx.beginPath();
|
|
@@ -19159,47 +19167,37 @@ var WMCanvasBuffer = /*#__PURE__*/function () {
|
|
|
19159
19167
|
}
|
|
19160
19168
|
/* Reset errors */
|
|
19161
19169
|
this._errorList.length = 0;
|
|
19162
|
-
|
|
19163
|
-
var imageToDisplay =
|
|
19164
|
-
if (imageToDisplay
|
|
19170
|
+
this.layers.forEach(function (layer) {
|
|
19171
|
+
var imageToDisplay = _this2._imageStore.getImageForSrc(layer.imageSource);
|
|
19172
|
+
if (imageToDisplay === null || imageToDisplay === void 0 ? void 0 : imageToDisplay.isLoadedWithoutErrors()) {
|
|
19165
19173
|
// Draw this image, it is loaded and OK
|
|
19166
|
-
|
|
19167
|
-
|
|
19168
|
-
/**
|
|
19169
|
-
* Check if this image has an error.
|
|
19170
|
-
* If the error has occured some time ago, and the amount of retries is low, just retry to load the image.
|
|
19171
|
-
*/
|
|
19172
|
-
if (imageToDisplay.hasError()) {
|
|
19173
|
-
if (imageToDisplay.isLoading() === false && imageToDisplay.getLastErrorMSecondsAgo() > 5000) {
|
|
19174
|
-
if (imageToDisplay.getNumFailedAttempts() < 10) {
|
|
19175
|
-
imageToDisplay.forceReload();
|
|
19176
|
-
}
|
|
19177
|
-
}
|
|
19178
|
-
}
|
|
19179
|
-
/* Find closest alternative and display instead image */
|
|
19180
|
-
var im = getAlternativeImage(this.layers[j].imageSource, this._imageStore, this._currentnewbbox);
|
|
19181
|
-
if (im) {
|
|
19182
|
-
this._drawImage(im);
|
|
19183
|
-
}
|
|
19174
|
+
_this2._drawImage(layer);
|
|
19175
|
+
return;
|
|
19184
19176
|
}
|
|
19185
|
-
|
|
19177
|
+
/**
|
|
19178
|
+
* Check if this image has an error.
|
|
19179
|
+
* If the error has occured some time ago, and the amount of retries is low, just retry to load the image.
|
|
19180
|
+
*/
|
|
19181
|
+
if (imageToDisplay.hasError() && imageToDisplay.isLoading() === false && imageToDisplay.getLastErrorMSecondsAgo() > 5000 && imageToDisplay.getNumFailedAttempts() < 10) {
|
|
19182
|
+
imageToDisplay.forceReload();
|
|
19183
|
+
}
|
|
19184
|
+
/* Find closest alternative and display instead image */
|
|
19185
|
+
var im = getAlternativeImage(layer.imageSource, _this2._imageStore, _this2._currentnewbbox);
|
|
19186
|
+
if (im) {
|
|
19187
|
+
_this2._drawImage(im);
|
|
19188
|
+
}
|
|
19189
|
+
});
|
|
19186
19190
|
this._ctx.globalAlpha = 1;
|
|
19187
19191
|
/* Display errors */
|
|
19188
19192
|
if (this._errorList.length > 0) {
|
|
19189
19193
|
this._webmapJSCallback.triggerEvent('canvasonerror', this._errorList);
|
|
19190
|
-
|
|
19191
|
-
this._internalCallbacks.canvasonerror(this._errorList);
|
|
19192
|
-
}
|
|
19194
|
+
(_b = (_a = this._internalCallbacks) === null || _a === void 0 ? void 0 : _a.canvasonerror) === null || _b === void 0 ? void 0 : _b.call(_a, this._errorList);
|
|
19193
19195
|
}
|
|
19194
19196
|
this._webmapJSCallback.triggerEvent('beforecanvasdisplay', this._ctx);
|
|
19195
|
-
|
|
19196
|
-
this._internalCallbacks.beforecanvasdisplay(this._ctx);
|
|
19197
|
-
}
|
|
19197
|
+
(_d = (_c = this._internalCallbacks) === null || _c === void 0 ? void 0 : _c.beforecanvasdisplay) === null || _d === void 0 ? void 0 : _d.call(_c, this._ctx);
|
|
19198
19198
|
this.canvas.style.display = 'inline-block';
|
|
19199
19199
|
this._webmapJSCallback.triggerEvent('aftercanvasdisplay', this._ctx);
|
|
19200
|
-
|
|
19201
|
-
this._internalCallbacks.aftercanvasdisplay(this._ctx);
|
|
19202
|
-
}
|
|
19200
|
+
(_f = (_e = this._internalCallbacks) === null || _e === void 0 ? void 0 : _e.aftercanvasdisplay) === null || _f === void 0 ? void 0 : _f.call(_e, this._ctx);
|
|
19203
19201
|
}
|
|
19204
19202
|
}, {
|
|
19205
19203
|
key: "finishedLoading",
|
|
@@ -19250,12 +19248,13 @@ var WMCanvasBuffer = /*#__PURE__*/function () {
|
|
|
19250
19248
|
}, {
|
|
19251
19249
|
key: "setSrc",
|
|
19252
19250
|
value: function setSrc(layerIndex, imageSource, linkedInfo, opacity, bbox) {
|
|
19251
|
+
var _a, _b;
|
|
19253
19252
|
if (!isDefined(imageSource)) {
|
|
19254
19253
|
debug(DebugType.Warning);
|
|
19255
19254
|
return;
|
|
19256
19255
|
}
|
|
19257
19256
|
/* HTTP Headers for the image, necessary in case of certain authentication forms */
|
|
19258
|
-
var headers = linkedInfo
|
|
19257
|
+
var headers = (_b = (_a = linkedInfo === null || linkedInfo === void 0 ? void 0 : linkedInfo.layer) === null || _a === void 0 ? void 0 : _a.headers) !== null && _b !== void 0 ? _b : [];
|
|
19259
19258
|
/* Make a new CanvasLayer */
|
|
19260
19259
|
var newLayer = {
|
|
19261
19260
|
imageSource: imageSource,
|
|
@@ -19318,24 +19317,24 @@ var WMCanvasBuffer = /*#__PURE__*/function () {
|
|
|
19318
19317
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19319
19318
|
var prefetch = function prefetch(requests) {
|
|
19320
19319
|
var prefetching = [];
|
|
19321
|
-
|
|
19322
|
-
var image = getMapImageStore.getImage(
|
|
19323
|
-
headers:
|
|
19320
|
+
requests.forEach(function (request) {
|
|
19321
|
+
var image = getMapImageStore.getImage(request.url, {
|
|
19322
|
+
headers: request.headers
|
|
19324
19323
|
});
|
|
19325
19324
|
if (image.isLoaded() === false && image.isLoading() === false) {
|
|
19326
19325
|
prefetching.push(image);
|
|
19327
19326
|
image.load();
|
|
19328
19327
|
}
|
|
19329
|
-
}
|
|
19328
|
+
});
|
|
19330
19329
|
return prefetching;
|
|
19331
19330
|
};
|
|
19332
19331
|
var WMJSAnimate = /*#__PURE__*/function () {
|
|
19333
19332
|
function WMJSAnimate(_map) {
|
|
19334
19333
|
_classCallCheck(this, WMJSAnimate);
|
|
19334
|
+
this._imageStore = getMapImageStore;
|
|
19335
19335
|
this.isNextTimeCloseToWallClockTime = false;
|
|
19336
19336
|
_map.animationDelay = 100;
|
|
19337
19337
|
this._callBack = _map.getListener();
|
|
19338
|
-
this._imageStore = getMapImageStore;
|
|
19339
19338
|
this._divAnimationInfo = document.createElement('div');
|
|
19340
19339
|
_map.currentAnimationStep = 0;
|
|
19341
19340
|
_map.animationList = undefined;
|
|
@@ -19362,10 +19361,10 @@ var WMJSAnimate = /*#__PURE__*/function () {
|
|
|
19362
19361
|
/* Bind */
|
|
19363
19362
|
this._animate = this._animate.bind(this);
|
|
19364
19363
|
this._animateLoop = this._animateLoop.bind(this);
|
|
19365
|
-
this.
|
|
19364
|
+
this.prefetchImagesForAnimationSteps = this.prefetchImagesForAnimationSteps.bind(this);
|
|
19366
19365
|
this.stopAnimating = this.stopAnimating.bind(this);
|
|
19367
19366
|
_map.stopAnimating = this.stopAnimating;
|
|
19368
|
-
_map.checkAnimation = this.
|
|
19367
|
+
_map.checkAnimation = this.prefetchImagesForAnimationSteps;
|
|
19369
19368
|
}
|
|
19370
19369
|
_createClass(WMJSAnimate, [{
|
|
19371
19370
|
key: "isCurrentAnimationTimeCloseToWallClockTime",
|
|
@@ -19409,67 +19408,70 @@ var WMJSAnimate = /*#__PURE__*/function () {
|
|
|
19409
19408
|
this._map.setDimension(animationStep.name, animationStep.value, false);
|
|
19410
19409
|
this._callBack.triggerEvent('ondimchange');
|
|
19411
19410
|
this._callBack.triggerEvent('onnextanimationstep', this._map);
|
|
19412
|
-
this._map.
|
|
19411
|
+
this._map.addLayersToCanvasAndDisplayThem();
|
|
19413
19412
|
this._map.animateBusy = false;
|
|
19414
19413
|
}
|
|
19415
19414
|
}, {
|
|
19416
19415
|
key: "_animateLoop",
|
|
19417
19416
|
value: function _animateLoop() {
|
|
19417
|
+
var _this = this;
|
|
19418
19418
|
if (this._map.isAnimating === false) {
|
|
19419
19419
|
this._map.isAnimatingLoopRunning = false;
|
|
19420
19420
|
return;
|
|
19421
19421
|
}
|
|
19422
19422
|
var animationDelay = this._map.animationDelay;
|
|
19423
|
+
var animationSteps = this._map.animationList;
|
|
19423
19424
|
if (this._map.currentAnimationStep === 0) {
|
|
19424
19425
|
animationDelay *= 3;
|
|
19425
|
-
} else if (this._map.currentAnimationStep ===
|
|
19426
|
+
} else if (this._map.currentAnimationStep === animationSteps.length - 1) {
|
|
19426
19427
|
animationDelay *= 5;
|
|
19427
19428
|
} else if (this.isCurrentAnimationTimeCloseToWallClockTime()) {
|
|
19428
19429
|
animationDelay *= 5;
|
|
19429
19430
|
}
|
|
19431
|
+
// set up timer for next animation step
|
|
19430
19432
|
this._map.animationTimer.init(animationDelay, this._animateLoop);
|
|
19431
|
-
this.
|
|
19432
|
-
if (this._map.mouseHoverAnimationBox
|
|
19433
|
-
|
|
19434
|
-
|
|
19435
|
-
|
|
19436
|
-
|
|
19437
|
-
|
|
19438
|
-
|
|
19439
|
-
|
|
19440
|
-
|
|
19441
|
-
|
|
19442
|
-
|
|
19443
|
-
|
|
19444
|
-
|
|
19445
|
-
|
|
19446
|
-
|
|
19447
|
-
|
|
19448
|
-
|
|
19449
|
-
|
|
19450
|
-
|
|
19451
|
-
|
|
19452
|
-
|
|
19453
|
-
var im = getAlternativeImage(url, getMapImageStore, this._map.getDrawBBOX());
|
|
19454
|
-
if (im) {
|
|
19455
|
-
numReady += 1;
|
|
19456
|
-
} else if (!(image && image.isLoading())) {
|
|
19457
|
-
/* No alternatives and current image is not loading, so lets continue the animation */
|
|
19458
|
-
numReady += 1;
|
|
19459
|
-
}
|
|
19460
|
-
}
|
|
19433
|
+
this.prefetchImagesForAnimationSteps();
|
|
19434
|
+
if (this._map.mouseHoverAnimationBox !== false) {
|
|
19435
|
+
return;
|
|
19436
|
+
}
|
|
19437
|
+
this._animate();
|
|
19438
|
+
var nextAnimationStepIndex = this._map.currentAnimationStep + 1;
|
|
19439
|
+
if (nextAnimationStepIndex >= animationSteps.length) {
|
|
19440
|
+
nextAnimationStepIndex = 0;
|
|
19441
|
+
}
|
|
19442
|
+
// get urls for images in next animation step
|
|
19443
|
+
var nextAnimationStep = animationSteps[nextAnimationStepIndex];
|
|
19444
|
+
nextAnimationStep.requests = this.getRequestsForAnimationStep(animationSteps, nextAnimationStepIndex);
|
|
19445
|
+
// if images for next animation step is ready or haven't started loading
|
|
19446
|
+
// change map animation step to next step
|
|
19447
|
+
var numberOfImagesReadyForNextAnimationStep = 0;
|
|
19448
|
+
nextAnimationStep.requests.forEach(function (request) {
|
|
19449
|
+
var url = request.url;
|
|
19450
|
+
var image = getMapImageStore.getImageForSrc(url);
|
|
19451
|
+
/* Get a loaded image which has no error */
|
|
19452
|
+
if (image === null || image === void 0 ? void 0 : image.isLoadedWithoutErrors()) {
|
|
19453
|
+
numberOfImagesReadyForNextAnimationStep += 1;
|
|
19454
|
+
return;
|
|
19461
19455
|
}
|
|
19462
|
-
if
|
|
19463
|
-
|
|
19456
|
+
/* Check if a similar image is available instead, then we can continue with the smoother animation */
|
|
19457
|
+
var alternativeImage = getAlternativeImage(url, getMapImageStore, _this._map.getDrawBBOX());
|
|
19458
|
+
if (alternativeImage) {
|
|
19459
|
+
numberOfImagesReadyForNextAnimationStep += 1;
|
|
19460
|
+
return;
|
|
19464
19461
|
}
|
|
19465
|
-
|
|
19466
|
-
|
|
19462
|
+
var imageHasntStartedLoading = !(image === null || image === void 0 ? void 0 : image.isLoading());
|
|
19463
|
+
if (imageHasntStartedLoading) {
|
|
19464
|
+
/* No alternatives and current image is not loading, so lets continue the animation */
|
|
19465
|
+
numberOfImagesReadyForNextAnimationStep += 1;
|
|
19467
19466
|
}
|
|
19467
|
+
});
|
|
19468
|
+
if (numberOfImagesReadyForNextAnimationStep >= nextAnimationStep.requests.length) {
|
|
19469
|
+
this._map.currentAnimationStep = nextAnimationStepIndex;
|
|
19468
19470
|
}
|
|
19469
19471
|
}
|
|
19470
19472
|
}, {
|
|
19471
|
-
key: "
|
|
19472
|
-
value: function
|
|
19473
|
+
key: "prefetchImagesForAnimationSteps",
|
|
19474
|
+
value: function prefetchImagesForAnimationSteps() {
|
|
19473
19475
|
if (this._map.isAnimating === false) {
|
|
19474
19476
|
this._map.isAnimatingLoopRunning = false;
|
|
19475
19477
|
return;
|
|
@@ -19477,37 +19479,32 @@ var WMJSAnimate = /*#__PURE__*/function () {
|
|
|
19477
19479
|
if (!this._map.animationTimer) {
|
|
19478
19480
|
this._map.animationTimer = new WMTimer();
|
|
19479
19481
|
}
|
|
19480
|
-
|
|
19481
|
-
|
|
19482
|
-
|
|
19483
|
-
|
|
19484
|
-
|
|
19485
|
-
|
|
19486
|
-
|
|
19487
|
-
|
|
19488
|
-
|
|
19489
|
-
|
|
19490
|
-
|
|
19491
|
-
|
|
19492
|
-
|
|
19493
|
-
|
|
19494
|
-
if (index < 0) {
|
|
19495
|
-
index = 0;
|
|
19496
|
-
}
|
|
19497
|
-
if (index >= 0) {
|
|
19498
|
-
var animationStep = this._map.animationList[index];
|
|
19499
|
-
this._map.setDimension(animationStep.name, animationStep.value, false);
|
|
19500
|
-
this._map.animationList[index].requests = this._map.getWMSRequests();
|
|
19501
|
-
animationStep = this._map.animationList[this._map.currentAnimationStep];
|
|
19502
|
-
this._map.setDimension(animationStep.name, animationStep.value, false);
|
|
19503
|
-
this._map.animationList[index].imagesInPrefetch = prefetch(this._map.animationList[index].requests);
|
|
19504
|
-
getNumImagesLoading = this._imageStore.getNumImagesLoading();
|
|
19505
|
-
if (getNumImagesLoading > maxSimultaneousLoads - 1) {
|
|
19506
|
-
break;
|
|
19507
|
-
}
|
|
19508
|
-
}
|
|
19509
|
-
}
|
|
19482
|
+
var animationSteps = this._map.animationList;
|
|
19483
|
+
var countAnimationSteps = animationSteps === null || animationSteps === void 0 ? void 0 : animationSteps.length;
|
|
19484
|
+
if (countAnimationSteps && this._map.mouseHoverAnimationBox === false) {
|
|
19485
|
+
for (var j = 0; j < countAnimationSteps; j += 1) {
|
|
19486
|
+
// dont prefetch if already prefetching too many images
|
|
19487
|
+
var maxSimultaneousLoads = 4;
|
|
19488
|
+
var countImagesLoading = this._imageStore.getNumImagesLoading();
|
|
19489
|
+
if (countImagesLoading > maxSimultaneousLoads - 1) {
|
|
19490
|
+
break;
|
|
19491
|
+
}
|
|
19492
|
+
// start prefecthing images for the next animation step first
|
|
19493
|
+
var index = j + this._map.currentAnimationStep;
|
|
19494
|
+
while (index < 0) {
|
|
19495
|
+
index += countAnimationSteps;
|
|
19510
19496
|
}
|
|
19497
|
+
while (index >= countAnimationSteps) {
|
|
19498
|
+
index -= countAnimationSteps;
|
|
19499
|
+
}
|
|
19500
|
+
if (index < 0) {
|
|
19501
|
+
index = 0;
|
|
19502
|
+
}
|
|
19503
|
+
// get urls for animation step
|
|
19504
|
+
var animationStep = animationSteps[index];
|
|
19505
|
+
animationStep.requests = this.getRequestsForAnimationStep(animationSteps, index);
|
|
19506
|
+
// prefetch images for animation step
|
|
19507
|
+
animationStep.imagesInPrefetch = prefetch(animationStep.requests);
|
|
19511
19508
|
}
|
|
19512
19509
|
}
|
|
19513
19510
|
if (this._map.isAnimatingLoopRunning === false) {
|
|
@@ -19528,6 +19525,18 @@ var WMJSAnimate = /*#__PURE__*/function () {
|
|
|
19528
19525
|
this._map.rebuildMapDimensions();
|
|
19529
19526
|
this._callBack.triggerEvent('onstopanimation', this._map);
|
|
19530
19527
|
}
|
|
19528
|
+
}, {
|
|
19529
|
+
key: "getRequestsForAnimationStep",
|
|
19530
|
+
value: function getRequestsForAnimationStep(animationSteps, index) {
|
|
19531
|
+
// get urls for animation step
|
|
19532
|
+
var animationStep = animationSteps[index];
|
|
19533
|
+
this._map.setDimension(animationStep.name, animationStep.value, false);
|
|
19534
|
+
var requests = this._map.getWMSRequests();
|
|
19535
|
+
// set map back to correct dimension
|
|
19536
|
+
var animationStepShownOnMap = animationSteps[this._map.currentAnimationStep];
|
|
19537
|
+
this._map.setDimension(animationStepShownOnMap.name, animationStepShownOnMap.value, false);
|
|
19538
|
+
return requests;
|
|
19539
|
+
}
|
|
19531
19540
|
}]);
|
|
19532
19541
|
return WMJSAnimate;
|
|
19533
19542
|
}();
|
|
@@ -19818,10 +19827,6 @@ var getLegendGraphicURLForLayer = function getLegendGraphicURLForLayer(layer) {
|
|
|
19818
19827
|
if (!legendURL) {
|
|
19819
19828
|
return undefined;
|
|
19820
19829
|
}
|
|
19821
|
-
// For THREDDS WMS we need to add layers=
|
|
19822
|
-
if (!legendURL.includes('&layers=')) {
|
|
19823
|
-
legendURL += "&layers=".concat(URLEncode(layer.name), "&");
|
|
19824
|
-
}
|
|
19825
19830
|
try {
|
|
19826
19831
|
if (layer.legendIsDimensionDependent === true) {
|
|
19827
19832
|
legendURL += "".concat(getMapDimURL(layer), "&");
|
|
@@ -25571,14 +25576,14 @@ var moment$1 = {exports: {}};
|
|
|
25571
25576
|
|
|
25572
25577
|
var moment = moment$1.exports;
|
|
25573
25578
|
|
|
25574
|
-
function _typeof(
|
|
25579
|
+
function _typeof(o) {
|
|
25575
25580
|
"@babel/helpers - typeof";
|
|
25576
25581
|
|
|
25577
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
25578
|
-
return typeof
|
|
25579
|
-
} : function (
|
|
25580
|
-
return
|
|
25581
|
-
}, _typeof(
|
|
25582
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
25583
|
+
return typeof o;
|
|
25584
|
+
} : function (o) {
|
|
25585
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
25586
|
+
}, _typeof(o);
|
|
25582
25587
|
}
|
|
25583
25588
|
|
|
25584
25589
|
function requiredArgs(required, args) {
|
|
@@ -26973,11 +26978,9 @@ var getBBOXandProjString = function getBBOXandProjString(map, layer) {
|
|
|
26973
26978
|
};
|
|
26974
26979
|
// Build a valid WMS request for a certain layer
|
|
26975
26980
|
var buildWMSGetMapRequest = function buildWMSGetMapRequest(map, layer) {
|
|
26976
|
-
|
|
26977
|
-
|
|
26978
|
-
|
|
26979
|
-
headers: null
|
|
26980
|
-
};
|
|
26981
|
+
var _a;
|
|
26982
|
+
if (!isDefined(layer.name) || layer.name.length < 1) {
|
|
26983
|
+
return undefined;
|
|
26981
26984
|
}
|
|
26982
26985
|
var _map$getProjection2 = map.getProjection(),
|
|
26983
26986
|
srs = _map$getProjection2.srs;
|
|
@@ -26985,15 +26988,7 @@ var buildWMSGetMapRequest = function buildWMSGetMapRequest(map, layer) {
|
|
|
26985
26988
|
var _map$getSize = map.getSize(),
|
|
26986
26989
|
width = _map$getSize.width,
|
|
26987
26990
|
height = _map$getSize.height;
|
|
26988
|
-
|
|
26989
|
-
layer.format = 'image/png';
|
|
26990
|
-
}
|
|
26991
|
-
if (layer.name.length < 1) {
|
|
26992
|
-
return {
|
|
26993
|
-
url: undefined,
|
|
26994
|
-
headers: null
|
|
26995
|
-
};
|
|
26996
|
-
}
|
|
26991
|
+
(_a = layer.format) !== null && _a !== void 0 ? _a : layer.format = 'image/png';
|
|
26997
26992
|
// GetFeatureInfo timeseries in the mapview
|
|
26998
26993
|
if (srs === 'GFI:TIME_ELEVATION') {
|
|
26999
26994
|
var x = 707;
|
|
@@ -27059,10 +27054,7 @@ var buildWMSGetMapRequest = function buildWMSGetMapRequest(map, layer) {
|
|
|
27059
27054
|
try {
|
|
27060
27055
|
request += getMapDimURL(layer);
|
|
27061
27056
|
} catch (e) {
|
|
27062
|
-
return
|
|
27063
|
-
url: null,
|
|
27064
|
-
headers: null
|
|
27065
|
-
};
|
|
27057
|
+
return undefined;
|
|
27066
27058
|
}
|
|
27067
27059
|
// Handle WMS extensions
|
|
27068
27060
|
request += layer.wmsextensions.url;
|
|
@@ -27377,7 +27369,7 @@ var WMJSMap = /*#__PURE__*/function () {
|
|
|
27377
27369
|
this._onResumeSuspendCallbackFunction = this._onResumeSuspendCallbackFunction.bind(this);
|
|
27378
27370
|
this._animFrameRedraw = this._animFrameRedraw.bind(this);
|
|
27379
27371
|
this.getWMSRequests = this.getWMSRequests.bind(this);
|
|
27380
|
-
this.
|
|
27372
|
+
this.addLayersToCanvasAndDisplayThem = this.addLayersToCanvasAndDisplayThem.bind(this);
|
|
27381
27373
|
this._updateBoundingBox = this._updateBoundingBox.bind(this);
|
|
27382
27374
|
this.redrawBuffer = this.redrawBuffer.bind(this);
|
|
27383
27375
|
this.addBaseLayers = this.addBaseLayers.bind(this);
|
|
@@ -28451,7 +28443,7 @@ var WMJSMap = /*#__PURE__*/function () {
|
|
|
28451
28443
|
debug(DebugType.Log);
|
|
28452
28444
|
return;
|
|
28453
28445
|
}
|
|
28454
|
-
this.
|
|
28446
|
+
this._draw(this._animationList);
|
|
28455
28447
|
}
|
|
28456
28448
|
/**
|
|
28457
28449
|
* API Function called to draw the layers, fires getmap request and shows the layers on the screen
|
|
@@ -28475,46 +28467,41 @@ var WMJSMap = /*#__PURE__*/function () {
|
|
|
28475
28467
|
}, {
|
|
28476
28468
|
key: "_drawAndLoad",
|
|
28477
28469
|
value: function _drawAndLoad(animationList) {
|
|
28470
|
+
var _this7 = this;
|
|
28478
28471
|
if (this.width < 4 || this.height < 4) {
|
|
28479
28472
|
this._drawReady();
|
|
28480
28473
|
return;
|
|
28481
28474
|
}
|
|
28482
28475
|
this.callBack.triggerEvent('beforedraw');
|
|
28483
|
-
if (this.isAnimating === false) {
|
|
28484
|
-
|
|
28485
|
-
|
|
28486
|
-
|
|
28487
|
-
|
|
28488
|
-
var timeDim = this.getDimension('time');
|
|
28489
|
-
if (!timeDim) {
|
|
28490
|
-
return;
|
|
28491
|
-
}
|
|
28492
|
-
var selectedTime = timeDim.currentValue;
|
|
28493
|
-
this.isAnimating = true;
|
|
28494
|
-
this.callBack.triggerEvent('onstartanimation', this);
|
|
28495
|
-
this.currentAnimationStep = this.initialAnimationStep;
|
|
28496
|
-
this.animationList = [];
|
|
28497
|
-
this.mouseHoverAnimationBox = false;
|
|
28498
|
-
for (var j = 0; j < animationList.length; j += 1) {
|
|
28499
|
-
if (selectedTime && animationList[j].value === selectedTime) {
|
|
28500
|
-
this.currentAnimationStep = j;
|
|
28501
|
-
}
|
|
28502
|
-
var animationListObject = {
|
|
28503
|
-
name: animationList[j].name,
|
|
28504
|
-
value: animationList[j].value,
|
|
28505
|
-
requests: []
|
|
28506
|
-
};
|
|
28507
|
-
this.setDimension(animationList[j].name, animationList[j].value, false);
|
|
28508
|
-
animationListObject.requests = this.getWMSRequests();
|
|
28509
|
-
this.animationList.push(animationListObject);
|
|
28510
|
-
}
|
|
28511
|
-
this.setDimension(this.animationList[this.currentAnimationStep].name, this.animationList[this.currentAnimationStep].value, false);
|
|
28512
|
-
this.wmAnimate.checkAnimation();
|
|
28513
|
-
}
|
|
28514
|
-
}
|
|
28476
|
+
if (this.isAnimating === false && animationList !== undefined && _typeof$1(animationList) === 'object' && animationList.length > 0) {
|
|
28477
|
+
// Ensure the time dimension has been loaded for the map before starting animation
|
|
28478
|
+
var timeDim = this.getDimension('time');
|
|
28479
|
+
if (!timeDim) {
|
|
28480
|
+
return;
|
|
28515
28481
|
}
|
|
28482
|
+
var selectedTime = timeDim.currentValue;
|
|
28483
|
+
this.isAnimating = true;
|
|
28484
|
+
this.callBack.triggerEvent('onstartanimation', this);
|
|
28485
|
+
this.currentAnimationStep = this.initialAnimationStep;
|
|
28486
|
+
this.animationList = [];
|
|
28487
|
+
this.mouseHoverAnimationBox = false;
|
|
28488
|
+
animationList.forEach(function (animationStepWithoutRequests, j) {
|
|
28489
|
+
if (selectedTime && animationStepWithoutRequests.value === selectedTime) {
|
|
28490
|
+
_this7.currentAnimationStep = j;
|
|
28491
|
+
}
|
|
28492
|
+
var animationStep = {
|
|
28493
|
+
name: animationStepWithoutRequests.name,
|
|
28494
|
+
value: animationStepWithoutRequests.value,
|
|
28495
|
+
requests: []
|
|
28496
|
+
};
|
|
28497
|
+
_this7.setDimension(animationStepWithoutRequests.name, animationStepWithoutRequests.value, false);
|
|
28498
|
+
animationStep.requests = _this7.getWMSRequests();
|
|
28499
|
+
_this7.animationList.push(animationStep);
|
|
28500
|
+
});
|
|
28501
|
+
this.setDimension(this.animationList[this.currentAnimationStep].name, this.animationList[this.currentAnimationStep].value, false);
|
|
28502
|
+
this.wmAnimate.prefetchImagesForAnimationSteps();
|
|
28516
28503
|
}
|
|
28517
|
-
this.
|
|
28504
|
+
this.addLayersToCanvasAndDisplayThem();
|
|
28518
28505
|
}
|
|
28519
28506
|
}, {
|
|
28520
28507
|
key: "_onLayersReadyCallbackFunction",
|
|
@@ -28535,70 +28522,65 @@ var WMJSMap = /*#__PURE__*/function () {
|
|
|
28535
28522
|
}, {
|
|
28536
28523
|
key: "getWMSRequests",
|
|
28537
28524
|
value: function getWMSRequests() {
|
|
28525
|
+
var _this8 = this;
|
|
28538
28526
|
var requests = [];
|
|
28539
|
-
|
|
28540
|
-
|
|
28541
|
-
|
|
28542
|
-
|
|
28543
|
-
if (request.url) {
|
|
28527
|
+
this.layers.forEach(function (layer) {
|
|
28528
|
+
if (layer.service && layer.enabled) {
|
|
28529
|
+
var request = buildWMSGetMapRequest(_this8, layer);
|
|
28530
|
+
if (request === null || request === void 0 ? void 0 : request.url) {
|
|
28544
28531
|
requests.push(request);
|
|
28545
28532
|
}
|
|
28546
28533
|
}
|
|
28547
|
-
}
|
|
28534
|
+
});
|
|
28548
28535
|
return requests;
|
|
28549
28536
|
}
|
|
28550
28537
|
}, {
|
|
28551
|
-
key: "
|
|
28552
|
-
value: function
|
|
28553
|
-
var
|
|
28554
|
-
var
|
|
28555
|
-
|
|
28556
|
-
|
|
28557
|
-
|
|
28558
|
-
|
|
28559
|
-
|
|
28560
|
-
|
|
28561
|
-
|
|
28562
|
-
|
|
28563
|
-
|
|
28564
|
-
|
|
28565
|
-
|
|
28566
|
-
|
|
28567
|
-
|
|
28568
|
-
|
|
28569
|
-
}
|
|
28570
|
-
}
|
|
28538
|
+
key: "addLayersToCanvasAndDisplayThem",
|
|
28539
|
+
value: function addLayersToCanvasAndDisplayThem() {
|
|
28540
|
+
var _this9 = this;
|
|
28541
|
+
var _a, _b, _c;
|
|
28542
|
+
debug(DebugType.Log);
|
|
28543
|
+
this.divBuffer.reset();
|
|
28544
|
+
var currentLayerIndex = 0;
|
|
28545
|
+
this.numBaseLayers = 0;
|
|
28546
|
+
(_a = this.baseLayers) === null || _a === void 0 ? void 0 : _a.forEach(function (baseLayer) {
|
|
28547
|
+
var _a;
|
|
28548
|
+
if (baseLayer.enabled && baseLayer.keepOnTop === false && baseLayer.type && baseLayer.type !== 'twms') {
|
|
28549
|
+
_this9.numBaseLayers += 1;
|
|
28550
|
+
var requestURL = (_a = buildWMSGetMapRequest(_this9, baseLayer)) === null || _a === void 0 ? void 0 : _a.url;
|
|
28551
|
+
if (requestURL) {
|
|
28552
|
+
_this9.divBuffer.setSrc(currentLayerIndex, requestURL, {
|
|
28553
|
+
layer: baseLayer
|
|
28554
|
+
}, baseLayer.opacity, _this9.getDrawBBOX());
|
|
28555
|
+
currentLayerIndex += 1;
|
|
28571
28556
|
}
|
|
28572
28557
|
}
|
|
28573
|
-
|
|
28574
|
-
|
|
28575
|
-
|
|
28576
|
-
|
|
28577
|
-
|
|
28578
|
-
|
|
28579
|
-
|
|
28580
|
-
|
|
28581
|
-
|
|
28582
|
-
}
|
|
28558
|
+
});
|
|
28559
|
+
/* Loop through all layers */
|
|
28560
|
+
(_b = this.layers) === null || _b === void 0 ? void 0 : _b.forEach(function (layer) {
|
|
28561
|
+
var _a;
|
|
28562
|
+
if (layer.service && layer.enabled && layer.isConfigured) {
|
|
28563
|
+
var requestURL = (_a = buildWMSGetMapRequest(_this9, layer)) === null || _a === void 0 ? void 0 : _a.url;
|
|
28564
|
+
if (requestURL) {
|
|
28565
|
+
_this9.divBuffer.setSrc(currentLayerIndex, requestURL, {
|
|
28566
|
+
layer: layer
|
|
28567
|
+
}, layer.opacity, _this9.getDrawBBOX());
|
|
28568
|
+
currentLayerIndex += 1;
|
|
28583
28569
|
}
|
|
28584
28570
|
}
|
|
28585
|
-
|
|
28586
|
-
|
|
28587
|
-
|
|
28588
|
-
|
|
28589
|
-
|
|
28590
|
-
|
|
28591
|
-
|
|
28592
|
-
|
|
28593
|
-
|
|
28594
|
-
|
|
28595
|
-
}
|
|
28596
|
-
}
|
|
28597
|
-
}
|
|
28571
|
+
});
|
|
28572
|
+
(_c = this.baseLayers) === null || _c === void 0 ? void 0 : _c.forEach(function (baseLayer) {
|
|
28573
|
+
var _a;
|
|
28574
|
+
if (baseLayer.enabled && baseLayer.keepOnTop === true) {
|
|
28575
|
+
var requestURL = (_a = buildWMSGetMapRequest(_this9, baseLayer)) === null || _a === void 0 ? void 0 : _a.url;
|
|
28576
|
+
if (requestURL) {
|
|
28577
|
+
_this9.divBuffer.setSrc(currentLayerIndex, requestURL, {
|
|
28578
|
+
layer: baseLayer
|
|
28579
|
+
}, baseLayer.opacity, _this9.getDrawBBOX());
|
|
28580
|
+
currentLayerIndex += 1;
|
|
28598
28581
|
}
|
|
28599
28582
|
}
|
|
28600
|
-
};
|
|
28601
|
-
loadLayers();
|
|
28583
|
+
});
|
|
28602
28584
|
this.divBuffer.display();
|
|
28603
28585
|
this.callBack.triggerEvent('onmapready', this);
|
|
28604
28586
|
}
|
|
@@ -28788,27 +28770,24 @@ var WMJSMap = /*#__PURE__*/function () {
|
|
|
28788
28770
|
}, {
|
|
28789
28771
|
key: "_buildLayerDims",
|
|
28790
28772
|
value: function _buildLayerDims() {
|
|
28773
|
+
var _this10 = this;
|
|
28791
28774
|
if (this.buildLayerDimsBusy === true) {
|
|
28792
28775
|
return;
|
|
28793
28776
|
}
|
|
28794
|
-
|
|
28795
|
-
|
|
28796
|
-
|
|
28797
|
-
|
|
28798
|
-
|
|
28799
|
-
|
|
28800
|
-
if (layerDim.name === mapDim.name) {
|
|
28801
|
-
if (mapDim.currentValue === 'current' || mapDim.currentValue === 'default' || mapDim.currentValue === '' || mapDim.currentValue === 'earliest' || mapDim.currentValue === 'middle' || mapDim.currentValue === 'latest') {
|
|
28802
|
-
mapDim.currentValue = layerDim.getClosestValue(mapDim.currentValue);
|
|
28803
|
-
}
|
|
28804
|
-
this.buildLayerDimsBusy = true;
|
|
28805
|
-
layerDim.setClosestValue(mapDim.currentValue);
|
|
28806
|
-
this.buildLayerDimsBusy = false;
|
|
28777
|
+
this.mapdimensions.forEach(function (mapDim) {
|
|
28778
|
+
_this10.layers.forEach(function (layer) {
|
|
28779
|
+
layer.dimensions.forEach(function (layerDim) {
|
|
28780
|
+
if (layerDim.linked === true && layerDim.name === mapDim.name) {
|
|
28781
|
+
if (mapDim.currentValue === 'current' || mapDim.currentValue === 'default' || mapDim.currentValue === '' || mapDim.currentValue === 'earliest' || mapDim.currentValue === 'middle' || mapDim.currentValue === 'latest') {
|
|
28782
|
+
mapDim.currentValue = layerDim.getClosestValue(mapDim.currentValue);
|
|
28807
28783
|
}
|
|
28784
|
+
_this10.buildLayerDimsBusy = true;
|
|
28785
|
+
layerDim.setClosestValue(mapDim.currentValue);
|
|
28786
|
+
_this10.buildLayerDimsBusy = false;
|
|
28808
28787
|
}
|
|
28809
|
-
}
|
|
28810
|
-
}
|
|
28811
|
-
}
|
|
28788
|
+
});
|
|
28789
|
+
});
|
|
28790
|
+
});
|
|
28812
28791
|
}
|
|
28813
28792
|
}, {
|
|
28814
28793
|
key: "getMapMode",
|
|
@@ -29520,7 +29499,7 @@ var WMJSMap = /*#__PURE__*/function () {
|
|
|
29520
29499
|
}, {
|
|
29521
29500
|
key: "zoomTo",
|
|
29522
29501
|
value: function zoomTo(_newbbox) {
|
|
29523
|
-
var
|
|
29502
|
+
var _this11 = this;
|
|
29524
29503
|
debug(DebugType.Log);
|
|
29525
29504
|
var setOrigBox = false;
|
|
29526
29505
|
var newbbox = new WMBBOX(_newbbox);
|
|
@@ -29561,14 +29540,14 @@ var WMJSMap = /*#__PURE__*/function () {
|
|
|
29561
29540
|
this._updateBoundingBox(this.bbox);
|
|
29562
29541
|
this.drawnBBOX.setBBOX(this.bbox);
|
|
29563
29542
|
var resetMapPinAndDialogs = function resetMapPinAndDialogs() {
|
|
29564
|
-
for (var j = 0; j <
|
|
29565
|
-
var newpos =
|
|
29566
|
-
x:
|
|
29567
|
-
y:
|
|
29543
|
+
for (var j = 0; j < _this11.gfiDialogList.length; j += 1) {
|
|
29544
|
+
var newpos = _this11.getPixelCoordFromGeoCoord({
|
|
29545
|
+
x: _this11.gfiDialogList[j].geoPosX,
|
|
29546
|
+
y: _this11.gfiDialogList[j].geoPosY
|
|
29568
29547
|
});
|
|
29569
|
-
if (
|
|
29570
|
-
if (
|
|
29571
|
-
|
|
29548
|
+
if (_this11.gfiDialogList[j].hasBeenDragged === false) {
|
|
29549
|
+
if (_this11.gfiDialogList[j].moveToMouseCursor === true) {
|
|
29550
|
+
_this11.gfiDialogList[j].setXY(_this11.gfiDialogList[j].origX + newpos.x, _this11.gfiDialogList[j].origY + newpos.y);
|
|
29572
29551
|
}
|
|
29573
29552
|
}
|
|
29574
29553
|
}
|
|
@@ -29721,10 +29700,13 @@ var WMJSMap = /*#__PURE__*/function () {
|
|
|
29721
29700
|
// listeners:
|
|
29722
29701
|
}, {
|
|
29723
29702
|
key: "addListener",
|
|
29724
|
-
value: function addListener(name,
|
|
29703
|
+
value: function addListener(name,
|
|
29704
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29705
|
+
f) {
|
|
29725
29706
|
var keep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
29726
29707
|
return this.callBack.addToCallback(name, f, keep);
|
|
29727
29708
|
}
|
|
29709
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29728
29710
|
}, {
|
|
29729
29711
|
key: "removeListener",
|
|
29730
29712
|
value: function removeListener(name, f) {
|
|
@@ -29948,6 +29930,30 @@ var WMJSMap = /*#__PURE__*/function () {
|
|
|
29948
29930
|
return WMJSMap;
|
|
29949
29931
|
}();
|
|
29950
29932
|
|
|
29933
|
+
/* *
|
|
29934
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
29935
|
+
* you may not use this file except in compliance with the License.
|
|
29936
|
+
* You may obtain a copy of the License at
|
|
29937
|
+
*
|
|
29938
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
29939
|
+
*
|
|
29940
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
29941
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
29942
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
29943
|
+
* See the License for the specific language governing permissions and
|
|
29944
|
+
* limitations under the License.
|
|
29945
|
+
*
|
|
29946
|
+
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
29947
|
+
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
29948
|
+
* */
|
|
29949
|
+
/**
|
|
29950
|
+
* Global service store for re-use of services
|
|
29951
|
+
*/
|
|
29952
|
+
var WMServiceStore = [];
|
|
29953
|
+
var WMServiceStoreXML2JSONRequest = {
|
|
29954
|
+
proxy: 'Check WMJSGlobals WMJSServiceStoreXML2JSONRequest'
|
|
29955
|
+
};
|
|
29956
|
+
|
|
29951
29957
|
/* *
|
|
29952
29958
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
29953
29959
|
* you may not use this file except in compliance with the License.
|
|
@@ -30351,30 +30357,6 @@ var I18n = {
|
|
|
30351
30357
|
}
|
|
30352
30358
|
};
|
|
30353
30359
|
|
|
30354
|
-
/* *
|
|
30355
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
30356
|
-
* you may not use this file except in compliance with the License.
|
|
30357
|
-
* You may obtain a copy of the License at
|
|
30358
|
-
*
|
|
30359
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
30360
|
-
*
|
|
30361
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
30362
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
30363
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
30364
|
-
* See the License for the specific language governing permissions and
|
|
30365
|
-
* limitations under the License.
|
|
30366
|
-
*
|
|
30367
|
-
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
30368
|
-
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
30369
|
-
* */
|
|
30370
|
-
/**
|
|
30371
|
-
* Global service store for re-use of services
|
|
30372
|
-
*/
|
|
30373
|
-
var WMServiceStore = [];
|
|
30374
|
-
var WMServiceStoreXML2JSONRequest = {
|
|
30375
|
-
proxy: 'Check WMJSGlobals WMJSServiceStoreXML2JSONRequest'
|
|
30376
|
-
};
|
|
30377
|
-
|
|
30378
30360
|
/* *
|
|
30379
30361
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
30380
30362
|
* you may not use this file except in compliance with the License.
|
|
@@ -30918,6 +30900,7 @@ var LayerType;
|
|
|
30918
30900
|
LayerType["mapLayer"] = "mapLayer";
|
|
30919
30901
|
LayerType["baseLayer"] = "baseLayer";
|
|
30920
30902
|
LayerType["overLayer"] = "overLayer";
|
|
30903
|
+
LayerType["featureLayer"] = "featureLayer";
|
|
30921
30904
|
})(LayerType || (LayerType = {}));
|
|
30922
30905
|
/**
|
|
30923
30906
|
* Helper function to figure out the dimensions from the WMS layer object (From WMS GetCapabilities). Parses both WMS 1.1.1 and WMS 1.3.0.
|
|
@@ -31597,9 +31580,7 @@ var WMLayer = /*#__PURE__*/function () {
|
|
|
31597
31580
|
this.legendGraphic = this.styles[0].legendURL;
|
|
31598
31581
|
}
|
|
31599
31582
|
/* Check if this legenURL has already a Layer Property set. If so set the Layer to the name of this layer */
|
|
31600
|
-
this.legendGraphic = getUriWithParam(this.legendGraphic
|
|
31601
|
-
layer: this.name
|
|
31602
|
-
});
|
|
31583
|
+
this.legendGraphic = getUriWithParam(this.legendGraphic);
|
|
31603
31584
|
}
|
|
31604
31585
|
}, {
|
|
31605
31586
|
key: "getStyles",
|
|
@@ -31746,6 +31727,286 @@ var WMLayer = /*#__PURE__*/function () {
|
|
|
31746
31727
|
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
31747
31728
|
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
31748
31729
|
* */
|
|
31730
|
+
var generatedLayerIds = 0;
|
|
31731
|
+
var generateLayerId = function generateLayerId() {
|
|
31732
|
+
generatedLayerIds += 1;
|
|
31733
|
+
return "layerid_".concat(generatedLayerIds);
|
|
31734
|
+
};
|
|
31735
|
+
var generatedMapIds = 0;
|
|
31736
|
+
var generateMapId = function generateMapId() {
|
|
31737
|
+
generatedMapIds += 1;
|
|
31738
|
+
return "mapid_".concat(generatedMapIds);
|
|
31739
|
+
};
|
|
31740
|
+
var generatedTimesliderIds = 0;
|
|
31741
|
+
var generateTimesliderId = function generateTimesliderId() {
|
|
31742
|
+
generatedTimesliderIds += 1;
|
|
31743
|
+
return "timesliderid_".concat(generatedTimesliderIds);
|
|
31744
|
+
};
|
|
31745
|
+
/**
|
|
31746
|
+
* Map for registering wmlayers with their id's
|
|
31747
|
+
*/
|
|
31748
|
+
var registeredWMLayersForReactLayerId = {};
|
|
31749
|
+
/**
|
|
31750
|
+
* Registers a WMJSLayer in a lookuptable with a layerId
|
|
31751
|
+
* @param {WMLayer} wmLayer
|
|
31752
|
+
* @param {string} layerId
|
|
31753
|
+
*/
|
|
31754
|
+
var registerWMLayer = function registerWMLayer(wmLayer, layerId) {
|
|
31755
|
+
registeredWMLayersForReactLayerId[layerId] = wmLayer;
|
|
31756
|
+
};
|
|
31757
|
+
/**
|
|
31758
|
+
* Get the WMLayer from the lookuptable with layerId
|
|
31759
|
+
* @param {string} layerId
|
|
31760
|
+
*/
|
|
31761
|
+
var getWMLayerById = function getWMLayerById(layerId) {
|
|
31762
|
+
return registeredWMLayersForReactLayerId[layerId];
|
|
31763
|
+
};
|
|
31764
|
+
var unRegisterWMJSLayer = function unRegisterWMJSLayer(layerId) {
|
|
31765
|
+
var layer = registeredWMLayersForReactLayerId[layerId];
|
|
31766
|
+
if (layer) {
|
|
31767
|
+
delete registeredWMLayersForReactLayerId[layerId];
|
|
31768
|
+
}
|
|
31769
|
+
};
|
|
31770
|
+
var unRegisterAllWMJSLayersAndMaps = function unRegisterAllWMJSLayersAndMaps() {
|
|
31771
|
+
var allLayerIds = Object.keys(registeredWMLayersForReactLayerId);
|
|
31772
|
+
allLayerIds.forEach(function (layerId) {
|
|
31773
|
+
unRegisterWMJSLayer(layerId);
|
|
31774
|
+
});
|
|
31775
|
+
var allMapIds = Object.keys(registeredWMMapForReactMapId);
|
|
31776
|
+
allMapIds.forEach(function (mapId) {
|
|
31777
|
+
unRegisterWMJSMap(mapId);
|
|
31778
|
+
});
|
|
31779
|
+
};
|
|
31780
|
+
/**
|
|
31781
|
+
* Map for registering wmlayers with their id's
|
|
31782
|
+
*/
|
|
31783
|
+
var registeredWMMapForReactMapId = {};
|
|
31784
|
+
/**
|
|
31785
|
+
* Registers a WMJSMap in a lookuptable with a wmjsMapId
|
|
31786
|
+
* @param {WMJSMap} wmjsMap
|
|
31787
|
+
* @param {string} wmjsMapId
|
|
31788
|
+
*/
|
|
31789
|
+
var registerWMJSMap = function registerWMJSMap(wmjsMap, wmjsMapId) {
|
|
31790
|
+
if (registeredWMMapForReactMapId[wmjsMapId]) {
|
|
31791
|
+
console.warn("Map with id ".concat(wmjsMapId, " already made"));
|
|
31792
|
+
}
|
|
31793
|
+
registeredWMMapForReactMapId[wmjsMapId] = wmjsMap;
|
|
31794
|
+
};
|
|
31795
|
+
var unRegisterWMJSMap = function unRegisterWMJSMap(wmjsMapId) {
|
|
31796
|
+
var wmjsMap = registeredWMMapForReactMapId[wmjsMapId];
|
|
31797
|
+
if (wmjsMap) {
|
|
31798
|
+
wmjsMap.getListener().suspendEvents();
|
|
31799
|
+
try {
|
|
31800
|
+
wmjsMap.stopAnimating && wmjsMap.stopAnimating();
|
|
31801
|
+
} catch (e) {
|
|
31802
|
+
console.warn(e);
|
|
31803
|
+
}
|
|
31804
|
+
Object.keys(registeredWMLayersForReactLayerId).forEach(function (layerId) {
|
|
31805
|
+
var wmLayer = getWMLayerById(layerId);
|
|
31806
|
+
if (wmLayer.parentMap === wmjsMap) {
|
|
31807
|
+
unRegisterWMJSLayer(layerId);
|
|
31808
|
+
}
|
|
31809
|
+
});
|
|
31810
|
+
wmjsMap.destroy();
|
|
31811
|
+
delete registeredWMMapForReactMapId[wmjsMapId];
|
|
31812
|
+
}
|
|
31813
|
+
};
|
|
31814
|
+
/**
|
|
31815
|
+
* Get the wmjsMap from the lookuptable with wmjsMapId
|
|
31816
|
+
* @param {string} wmjsMapId
|
|
31817
|
+
*/
|
|
31818
|
+
var getWMJSMapById = function getWMJSMapById(wmjsMapId) {
|
|
31819
|
+
return registeredWMMapForReactMapId[wmjsMapId];
|
|
31820
|
+
};
|
|
31821
|
+
/**
|
|
31822
|
+
* Returns the WMJSDimension object for given layerId and dimension name
|
|
31823
|
+
* @param layerId The layerId
|
|
31824
|
+
* @param dimensionName The dimension to lookup
|
|
31825
|
+
*/
|
|
31826
|
+
var getWMJSDimensionForLayerAndDimension = function getWMJSDimensionForLayerAndDimension(layerId, dimensionName) {
|
|
31827
|
+
var wmLayer = getWMLayerById(layerId);
|
|
31828
|
+
if (!wmLayer || !dimensionName) {
|
|
31829
|
+
return undefined;
|
|
31830
|
+
}
|
|
31831
|
+
var wmjsDimension = wmLayer.getDimension(dimensionName);
|
|
31832
|
+
if (!wmjsDimension) {
|
|
31833
|
+
return undefined;
|
|
31834
|
+
}
|
|
31835
|
+
return wmjsDimension;
|
|
31836
|
+
};
|
|
31837
|
+
/**
|
|
31838
|
+
* Gets the WMJSTimeDimension for given activeLayerId and dimensions list
|
|
31839
|
+
* @param layerId: The layer id to search the WMJSDimension for
|
|
31840
|
+
* @return: The WMJSDimension if found, otherwise null
|
|
31841
|
+
*/
|
|
31842
|
+
var getWMJSTimeDimensionForLayerId = function getWMJSTimeDimensionForLayerId(layerId) {
|
|
31843
|
+
var wmLayer = getWMLayerById(layerId);
|
|
31844
|
+
if (!wmLayer) {
|
|
31845
|
+
return null;
|
|
31846
|
+
}
|
|
31847
|
+
return wmLayer.getDimension('time');
|
|
31848
|
+
};
|
|
31849
|
+
|
|
31850
|
+
var utils = /*#__PURE__*/Object.freeze({
|
|
31851
|
+
__proto__: null,
|
|
31852
|
+
generateLayerId: generateLayerId,
|
|
31853
|
+
generateMapId: generateMapId,
|
|
31854
|
+
generateTimesliderId: generateTimesliderId,
|
|
31855
|
+
registerWMLayer: registerWMLayer,
|
|
31856
|
+
getWMLayerById: getWMLayerById,
|
|
31857
|
+
unRegisterWMJSLayer: unRegisterWMJSLayer,
|
|
31858
|
+
unRegisterAllWMJSLayersAndMaps: unRegisterAllWMJSLayersAndMaps,
|
|
31859
|
+
registerWMJSMap: registerWMJSMap,
|
|
31860
|
+
unRegisterWMJSMap: unRegisterWMJSMap,
|
|
31861
|
+
getWMJSMapById: getWMJSMapById,
|
|
31862
|
+
getWMJSDimensionForLayerAndDimension: getWMJSDimensionForLayerAndDimension,
|
|
31863
|
+
getWMJSTimeDimensionForLayerId: getWMJSTimeDimensionForLayerId
|
|
31864
|
+
});
|
|
31865
|
+
|
|
31866
|
+
/* *
|
|
31867
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
31868
|
+
* you may not use this file except in compliance with the License.
|
|
31869
|
+
* You may obtain a copy of the License at
|
|
31870
|
+
*
|
|
31871
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
31872
|
+
*
|
|
31873
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
31874
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
31875
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
31876
|
+
* See the License for the specific language governing permissions and
|
|
31877
|
+
* limitations under the License.
|
|
31878
|
+
*
|
|
31879
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
31880
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
31881
|
+
* */
|
|
31882
|
+
var defaultReduxLayerRadarColor = {
|
|
31883
|
+
service: 'https://testservice',
|
|
31884
|
+
name: 'RAD_NL25_PCP_CM',
|
|
31885
|
+
title: 'RAD_NL25_PCP_CM',
|
|
31886
|
+
format: 'image/png',
|
|
31887
|
+
style: 'rainbow/nearest',
|
|
31888
|
+
enabled: true,
|
|
31889
|
+
layerType: LayerType.mapLayer,
|
|
31890
|
+
dimensions: [],
|
|
31891
|
+
styles: [{
|
|
31892
|
+
title: 'rainbow/nearest',
|
|
31893
|
+
name: 'rainbow/nearest',
|
|
31894
|
+
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',
|
|
31895
|
+
"abstract": 'No abstract available'
|
|
31896
|
+
}],
|
|
31897
|
+
id: 'layerid_1'
|
|
31898
|
+
};
|
|
31899
|
+
var multiDimensionLayer = {
|
|
31900
|
+
service: 'https://testservice',
|
|
31901
|
+
id: 'multiDimensionLayerMock',
|
|
31902
|
+
name: 'MULTI_DIMENSION_LAYER',
|
|
31903
|
+
title: 'MULTI_DIMENSION_LAYER',
|
|
31904
|
+
layerType: LayerType.mapLayer,
|
|
31905
|
+
enabled: true,
|
|
31906
|
+
dimensions: [{
|
|
31907
|
+
name: 'flight level',
|
|
31908
|
+
units: 'hft',
|
|
31909
|
+
currentValue: '625',
|
|
31910
|
+
values: '25,325,625'
|
|
31911
|
+
}, {
|
|
31912
|
+
name: 'elevation',
|
|
31913
|
+
units: 'meters',
|
|
31914
|
+
currentValue: '9000',
|
|
31915
|
+
values: '1000,5000,9000'
|
|
31916
|
+
}, {
|
|
31917
|
+
name: 'time',
|
|
31918
|
+
units: 'ISO8601',
|
|
31919
|
+
currentValue: '2020-03-13T14:40:00Z'
|
|
31920
|
+
}]
|
|
31921
|
+
};
|
|
31922
|
+
var WmdefaultReduxLayerRadarKNMI = new WMLayer({
|
|
31923
|
+
service: 'https://testservice',
|
|
31924
|
+
name: 'RADNL_OPER_R___25PCPRR_L3_KNMI',
|
|
31925
|
+
title: 'RADNL_OPER_R___25PCPRR_L3_KNMI',
|
|
31926
|
+
format: 'image/png',
|
|
31927
|
+
style: 'knmiradar/nearest',
|
|
31928
|
+
enabled: true,
|
|
31929
|
+
layerType: LayerType.mapLayer,
|
|
31930
|
+
dimensions: [{
|
|
31931
|
+
name: 'time',
|
|
31932
|
+
units: 'ISO8601',
|
|
31933
|
+
currentValue: '2020-03-13T13:30:00Z'
|
|
31934
|
+
}],
|
|
31935
|
+
id: 'layerid_3'
|
|
31936
|
+
});
|
|
31937
|
+
var defaultReduxLayerRadarKNMI = {
|
|
31938
|
+
service: 'https://testservice',
|
|
31939
|
+
name: 'RADNL_OPER_R___25PCPRR_L3_KNMI',
|
|
31940
|
+
title: 'RADNL_OPER_R___25PCPRR_L3_KNMI',
|
|
31941
|
+
format: 'image/png',
|
|
31942
|
+
style: 'knmiradar/nearest',
|
|
31943
|
+
enabled: true,
|
|
31944
|
+
layerType: LayerType.mapLayer,
|
|
31945
|
+
dimensions: [{
|
|
31946
|
+
name: 'time',
|
|
31947
|
+
units: 'ISO8601',
|
|
31948
|
+
currentValue: '2020-03-13T13:30:00Z'
|
|
31949
|
+
}],
|
|
31950
|
+
styles: [{
|
|
31951
|
+
title: 'knmiradar/nearest',
|
|
31952
|
+
name: 'knmiradar/nearest',
|
|
31953
|
+
legendURL: 'https://geoservices.knmi.nl/wms?dataset=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RADNL_OPER_R___25PCPRR_L3_KNMI&format=image/png&STYLE=knmiradar/nearest',
|
|
31954
|
+
"abstract": 'No abstract available'
|
|
31955
|
+
}, {
|
|
31956
|
+
title: 'precip/nearest',
|
|
31957
|
+
name: 'precip/nearest',
|
|
31958
|
+
legendURL: 'https://geoservices.knmi.nl/wms?dataset=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RADNL_OPER_R___25PCPRR_L3_KNMI&format=image/png&STYLE=precip/nearest',
|
|
31959
|
+
"abstract": 'No abstract available'
|
|
31960
|
+
}, {
|
|
31961
|
+
title: 'precip-transparent/nearest',
|
|
31962
|
+
name: 'precip-transparent/nearest',
|
|
31963
|
+
legendURL: 'https://geoservices.knmi.nl/wms?dataset=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RADNL_OPER_R___25PCPRR_L3_KNMI&format=image/png&STYLE=precip-transparent/nearest',
|
|
31964
|
+
"abstract": 'No abstract available'
|
|
31965
|
+
}, {
|
|
31966
|
+
title: 'precip-gray/nearest',
|
|
31967
|
+
name: 'precip-gray/nearest',
|
|
31968
|
+
legendURL: 'https://geoservices.knmi.nl/wms?dataset=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RADNL_OPER_R___25PCPRR_L3_KNMI&format=image/png&STYLE=precip-gray/nearest',
|
|
31969
|
+
"abstract": 'No abstract available'
|
|
31970
|
+
}, {
|
|
31971
|
+
title: 'precip-rainbow/nearest',
|
|
31972
|
+
name: 'precip-rainbow/nearest',
|
|
31973
|
+
legendURL: 'https://geoservices.knmi.nl/wms?dataset=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RADNL_OPER_R___25PCPRR_L3_KNMI&format=image/png&STYLE=precip-rainbow/nearest',
|
|
31974
|
+
"abstract": 'No abstract available'
|
|
31975
|
+
}, {
|
|
31976
|
+
title: 'precip-blue/nearest',
|
|
31977
|
+
name: 'precip-blue/nearest',
|
|
31978
|
+
legendURL: 'https://geoservices.knmi.nl/wms?dataset=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RADNL_OPER_R___25PCPRR_L3_KNMI&format=image/png&STYLE=precip-blue/nearest',
|
|
31979
|
+
"abstract": 'No abstract available'
|
|
31980
|
+
}, {
|
|
31981
|
+
title: 'precip-blue-transparent/nearest',
|
|
31982
|
+
name: 'precip-blue-transparent/nearest',
|
|
31983
|
+
legendURL: 'https://geoservices.knmi.nl/wms?dataset=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RADNL_OPER_R___25PCPRR_L3_KNMI&format=image/png&STYLE=precip-blue-transparent/nearest',
|
|
31984
|
+
"abstract": 'No abstract available'
|
|
31985
|
+
}, {
|
|
31986
|
+
title: 'pseudoradar/nearest',
|
|
31987
|
+
name: 'pseudoradar/nearest',
|
|
31988
|
+
legendURL: 'https://geoservices.knmi.nl/wms?dataset=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RADNL_OPER_R___25PCPRR_L3_KNMI&format=image/png&STYLE=pseudoradar/nearest',
|
|
31989
|
+
"abstract": 'No abstract available'
|
|
31990
|
+
}],
|
|
31991
|
+
id: 'layerid_2'
|
|
31992
|
+
};
|
|
31993
|
+
var makeGeoservicesRadarLayer = function makeGeoservicesRadarLayer(dimensions) {
|
|
31994
|
+
return new WMLayer({
|
|
31995
|
+
service: 'https://geoservices.knmi.nl/wms?dataset=RADAR&',
|
|
31996
|
+
name: 'RAD_NL25_PCP_CM',
|
|
31997
|
+
format: 'image/png',
|
|
31998
|
+
enabled: true,
|
|
31999
|
+
style: 'radar/nearest',
|
|
32000
|
+
id: generateLayerId(),
|
|
32001
|
+
layerType: LayerType.mapLayer,
|
|
32002
|
+
title: 'RAD_NL25_PCP_CM',
|
|
32003
|
+
dimensions: dimensions !== null && dimensions !== void 0 ? dimensions : [{
|
|
32004
|
+
name: 'time',
|
|
32005
|
+
units: 'ISO8601',
|
|
32006
|
+
currentValue: '2021-04-15T00:00:00Z'
|
|
32007
|
+
}]
|
|
32008
|
+
});
|
|
32009
|
+
};
|
|
31749
32010
|
var WmMultiDimensionLayer = new WMLayer({
|
|
31750
32011
|
service: 'https://testservice',
|
|
31751
32012
|
id: 'multiDimensionLayerMock',
|
|
@@ -31954,6 +32215,11 @@ var styleListForRADNL25PCPCMLayer = [{
|
|
|
31954
32215
|
|
|
31955
32216
|
var testSettings = /*#__PURE__*/Object.freeze({
|
|
31956
32217
|
__proto__: null,
|
|
32218
|
+
defaultReduxLayerRadarColor: defaultReduxLayerRadarColor,
|
|
32219
|
+
multiDimensionLayer: multiDimensionLayer,
|
|
32220
|
+
WmdefaultReduxLayerRadarKNMI: WmdefaultReduxLayerRadarKNMI,
|
|
32221
|
+
defaultReduxLayerRadarKNMI: defaultReduxLayerRadarKNMI,
|
|
32222
|
+
makeGeoservicesRadarLayer: makeGeoservicesRadarLayer,
|
|
31957
32223
|
WmMultiDimensionLayer: WmMultiDimensionLayer,
|
|
31958
32224
|
layerWithoutTimeDimension: layerWithoutTimeDimension,
|
|
31959
32225
|
WmLayerWithoutTimeDimension: WmLayerWithoutTimeDimension,
|
|
@@ -31977,6 +32243,19 @@ var testSettings = /*#__PURE__*/Object.freeze({
|
|
|
31977
32243
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
31978
32244
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
31979
32245
|
* */
|
|
32246
|
+
var EPSGCode;
|
|
32247
|
+
(function (EPSGCode) {
|
|
32248
|
+
EPSGCode["EPSG3857"] = "EPSG:3857";
|
|
32249
|
+
EPSGCode["EPSG28992"] = "EPSG:28992";
|
|
32250
|
+
EPSGCode["TODO_EPSG4326"] = "TODO__EPSG:4326";
|
|
32251
|
+
EPSGCode["EPSG3411"] = "EPSG:3411";
|
|
32252
|
+
EPSGCode["EPSG32661"] = "EPSG:32661";
|
|
32253
|
+
EPSGCode["EPSG54030"] = "EPSG:54030";
|
|
32254
|
+
EPSGCode["EPSG4326"] = "EPSG:4326";
|
|
32255
|
+
EPSGCode["EPSG4258"] = "EPSG:4258";
|
|
32256
|
+
EPSGCode["EPSG3412"] = "EPSG:3412";
|
|
32257
|
+
EPSGCode["EPSG3575"] = "EPSG:3575";
|
|
32258
|
+
})(EPSGCode || (EPSGCode = {}));
|
|
31980
32259
|
var tilesettings = {
|
|
31981
32260
|
WorldMap_Light_Grey_Canvas: {
|
|
31982
32261
|
'EPSG:3857': {
|
|
@@ -32312,158 +32591,6 @@ var tilesettings = {
|
|
|
32312
32591
|
}
|
|
32313
32592
|
};
|
|
32314
32593
|
|
|
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
32594
|
/* *
|
|
32468
32595
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
32469
32596
|
* you may not use this file except in compliance with the License.
|
|
@@ -32804,4 +32931,4 @@ var getCapabilities = /*#__PURE__*/Object.freeze({
|
|
|
32804
32931
|
getLayersFlattenedFromService: getLayersFlattenedFromService
|
|
32805
32932
|
});
|
|
32806
32933
|
|
|
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 };
|
|
32934
|
+
export { DateInterval, DebugType, EPSGCode, 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 };
|