aviation-chart 0.1.8 → 0.1.10
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/dist/aviation-chart.umd.js +4 -4
- package/dist/index.cjs +4 -4
- package/dist/index.js +494 -490
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import jt from "maplibre-gl";
|
|
2
2
|
var vt, Rt, Ot;
|
|
3
|
-
function Mt(o,
|
|
3
|
+
function Mt(o, a) {
|
|
4
4
|
if (!vt)
|
|
5
|
-
vt =
|
|
5
|
+
vt = a;
|
|
6
6
|
else if (!Rt)
|
|
7
|
-
Rt =
|
|
7
|
+
Rt = a;
|
|
8
8
|
else {
|
|
9
9
|
var u = "var sharedChunk = {}; (" + vt + ")(sharedChunk); (" + Rt + ")(sharedChunk);", g = {};
|
|
10
|
-
vt(g), Ot =
|
|
10
|
+
vt(g), Ot = a(g), typeof window < "u" && (Ot.workerUrl = window.URL.createObjectURL(
|
|
11
11
|
new Blob([u], { type: "text/javascript" })
|
|
12
12
|
));
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
Mt(["exports"], function(o) {
|
|
16
|
-
class
|
|
16
|
+
class a {
|
|
17
17
|
constructor(e, i) {
|
|
18
18
|
this.start = e, this.end = i, this.points = [], this.append = this.append.bind(this), this.prepend = this.prepend.bind(this);
|
|
19
19
|
}
|
|
@@ -141,99 +141,99 @@ Mt(["exports"], function(o) {
|
|
|
141
141
|
function x(t, e, i = 4096, n = 1) {
|
|
142
142
|
if (!t)
|
|
143
143
|
return {};
|
|
144
|
-
const
|
|
145
|
-
let l, s, c, m,
|
|
146
|
-
const
|
|
147
|
-
function P
|
|
148
|
-
|
|
144
|
+
const r = i / (e.width - 1);
|
|
145
|
+
let l, s, c, m, h, d;
|
|
146
|
+
const f = {}, w = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map();
|
|
147
|
+
function C(P, I, k) {
|
|
148
|
+
P[0] === 0 ? k(r * (d - 1), r * (h - y(c, I, l))) : P[0] === 2 ? k(r * d, r * (h - y(m, I, s))) : P[1] === 0 ? k(r * (d - y(s, I, l)), r * (h - 1)) : k(r * (d - y(m, I, c)), r * h);
|
|
149
149
|
}
|
|
150
|
-
for (
|
|
151
|
-
s = e.get(0,
|
|
152
|
-
let
|
|
153
|
-
for (
|
|
154
|
-
l = s, c = m, s = e.get(
|
|
155
|
-
const
|
|
156
|
-
if (
|
|
150
|
+
for (h = 1 - n; h < e.height + n; h++) {
|
|
151
|
+
s = e.get(0, h - 1), m = e.get(0, h);
|
|
152
|
+
let P = Math.min(s, m), I = Math.max(s, m);
|
|
153
|
+
for (d = 1 - n; d < e.width + n; d++) {
|
|
154
|
+
l = s, c = m, s = e.get(d, h - 1), m = e.get(d, h);
|
|
155
|
+
const k = P, V = I;
|
|
156
|
+
if (P = Math.min(s, m), I = Math.max(s, m), isNaN(l) || isNaN(s) || isNaN(m) || isNaN(c))
|
|
157
157
|
continue;
|
|
158
|
-
const
|
|
159
|
-
for (let
|
|
160
|
-
const At = l >
|
|
158
|
+
const ft = Math.min(k, P), pt = Math.max(V, I), X = Math.ceil(ft / t) * t, ot = Math.floor(pt / t) * t;
|
|
159
|
+
for (let R = X; R <= ot; R += t) {
|
|
160
|
+
const At = l > R, q = s > R, nt = c > R, _t = m > R;
|
|
161
161
|
for (const bt of u[(At ? 8 : 0) | (q ? 4 : 0) | (_t ? 2 : 0) | (nt ? 1 : 0)]) {
|
|
162
|
-
let Y = w.get(
|
|
163
|
-
Y || w.set(
|
|
164
|
-
let lt =
|
|
165
|
-
lt ||
|
|
166
|
-
const kt = bt[0], zt = bt[1], yt = g(e.width,
|
|
162
|
+
let Y = w.get(R);
|
|
163
|
+
Y || w.set(R, Y = /* @__PURE__ */ new Map());
|
|
164
|
+
let lt = F.get(R);
|
|
165
|
+
lt || F.set(R, lt = /* @__PURE__ */ new Map());
|
|
166
|
+
const kt = bt[0], zt = bt[1], yt = g(e.width, d, h, kt), st = g(e.width, d, h, zt);
|
|
167
167
|
let L, Tt;
|
|
168
168
|
if (L = lt.get(yt))
|
|
169
169
|
if (lt.delete(yt), Tt = Y.get(st))
|
|
170
170
|
if (Y.delete(st), L === Tt) {
|
|
171
|
-
if (
|
|
172
|
-
let rt =
|
|
173
|
-
rt || (
|
|
171
|
+
if (C(zt, R, L.append), !L.isEmpty()) {
|
|
172
|
+
let rt = f[R];
|
|
173
|
+
rt || (f[R] = rt = []), rt.push(L.lineString());
|
|
174
174
|
}
|
|
175
175
|
} else
|
|
176
176
|
L.appendFragment(Tt), lt.set(L.end = Tt.end, L);
|
|
177
177
|
else
|
|
178
|
-
|
|
178
|
+
C(zt, R, L.append), lt.set(L.end = st, L);
|
|
179
179
|
else if (L = Y.get(st))
|
|
180
|
-
Y.delete(st),
|
|
180
|
+
Y.delete(st), C(kt, R, L.prepend), Y.set(L.start = yt, L);
|
|
181
181
|
else {
|
|
182
|
-
const rt = new
|
|
183
|
-
|
|
182
|
+
const rt = new a(yt, st);
|
|
183
|
+
C(kt, R, rt.append), C(zt, R, rt.append), Y.set(yt, rt), lt.set(st, rt);
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
for (const [
|
|
190
|
-
let
|
|
189
|
+
for (const [P, I] of w.entries()) {
|
|
190
|
+
let k = null;
|
|
191
191
|
for (const V of I.values())
|
|
192
|
-
V.isEmpty() || (
|
|
192
|
+
V.isEmpty() || (k == null && (k = f[P] || (f[P] = [])), k.push(V.lineString()));
|
|
193
193
|
}
|
|
194
|
-
return
|
|
194
|
+
return f;
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function z(t) {
|
|
197
197
|
const e = Object.entries(t);
|
|
198
198
|
return e.sort(([i], [n]) => i < n ? -1 : i > n ? 1 : 0), e;
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
return
|
|
200
|
+
function S(t) {
|
|
201
|
+
return z(t).map(([e, i]) => [e, ...typeof i == "number" ? [i] : i].join("*")).join("~");
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function O(t) {
|
|
204
204
|
return Object.fromEntries(t.split("~").map((e) => e.split("*").map(Number)).map(([e, ...i]) => [e, i]));
|
|
205
205
|
}
|
|
206
206
|
function A({ thresholds: t, ...e }) {
|
|
207
|
-
return
|
|
207
|
+
return z({ thresholds: S(t), ...e }).map(([i, n]) => `${encodeURIComponent(i)}=${encodeURIComponent(n)}`).join("&");
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function _(t) {
|
|
210
210
|
return Object.fromEntries(t.replace(/^.*\?/, "").split("&").map((e) => {
|
|
211
211
|
const i = e.split("=").map(decodeURIComponent), n = i[0];
|
|
212
|
-
let
|
|
212
|
+
let r = i[1];
|
|
213
213
|
switch (n) {
|
|
214
214
|
case "thresholds":
|
|
215
|
-
|
|
215
|
+
r = O(r);
|
|
216
216
|
break;
|
|
217
217
|
case "extent":
|
|
218
218
|
case "multiplier":
|
|
219
219
|
case "overzoom":
|
|
220
220
|
case "buffer":
|
|
221
|
-
|
|
221
|
+
r = Number(r);
|
|
222
222
|
}
|
|
223
|
-
return [n,
|
|
223
|
+
return [n, r];
|
|
224
224
|
}));
|
|
225
225
|
}
|
|
226
226
|
function p(t) {
|
|
227
|
-
return
|
|
227
|
+
return z(t).map(([e, i]) => `${encodeURIComponent(e)}=${encodeURIComponent(i)}`).join(",");
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function b(t, e) {
|
|
230
230
|
const { thresholds: i, ...n } = t;
|
|
231
|
-
let
|
|
231
|
+
let r = [], l = -1 / 0;
|
|
232
232
|
return Object.entries(i).forEach(([s, c]) => {
|
|
233
233
|
const m = Number(s);
|
|
234
|
-
m <= e && m > l && (l = m,
|
|
234
|
+
m <= e && m > l && (l = m, r = typeof c == "number" ? [c] : c);
|
|
235
235
|
}), {
|
|
236
|
-
levels:
|
|
236
|
+
levels: r,
|
|
237
237
|
...n
|
|
238
238
|
};
|
|
239
239
|
}
|
|
@@ -241,10 +241,10 @@ Mt(["exports"], function(o) {
|
|
|
241
241
|
const e = new ArrayBuffer(t.byteLength);
|
|
242
242
|
return new Uint8Array(e).set(new Uint8Array(t)), e;
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function D(t, e) {
|
|
245
245
|
return t.then(({ data: i, ...n }) => {
|
|
246
|
-
let
|
|
247
|
-
return e && (
|
|
246
|
+
let r = i;
|
|
247
|
+
return e && (r = new Float32Array(i.length), r.set(i)), { ...n, data: r, transferrables: [r.buffer] };
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
250
|
function M(t) {
|
|
@@ -265,13 +265,13 @@ Mt(["exports"], function(o) {
|
|
|
265
265
|
if (tt == null && (tt = !1, ct() && typeof VideoFrame < "u")) {
|
|
266
266
|
const i = new OffscreenCanvas(5, 5).getContext("2d", { willReadFrequently: !0 });
|
|
267
267
|
if (i) {
|
|
268
|
-
for (let
|
|
269
|
-
const l =
|
|
270
|
-
i.fillStyle = `rgb(${l},${l + 1},${l + 2})`, i.fillRect(
|
|
268
|
+
for (let r = 0; r < 5 * 5; r++) {
|
|
269
|
+
const l = r * 4;
|
|
270
|
+
i.fillStyle = `rgb(${l},${l + 1},${l + 2})`, i.fillRect(r % 5, Math.floor(r / 5), 1, 1);
|
|
271
271
|
}
|
|
272
272
|
const n = i.getImageData(0, 0, 5, 5).data;
|
|
273
|
-
for (let
|
|
274
|
-
if (
|
|
273
|
+
for (let r = 0; r < 5 * 5 * 4; r++)
|
|
274
|
+
if (r % 4 !== 3 && n[r] !== r) {
|
|
275
275
|
tt = !0;
|
|
276
276
|
break;
|
|
277
277
|
}
|
|
@@ -282,18 +282,18 @@ Mt(["exports"], function(o) {
|
|
|
282
282
|
function G(t, e, i) {
|
|
283
283
|
let n = () => {
|
|
284
284
|
};
|
|
285
|
-
const
|
|
285
|
+
const r = setTimeout(() => {
|
|
286
286
|
n(new Error("timed out")), i == null || i.abort();
|
|
287
287
|
}, t);
|
|
288
288
|
U(i, () => {
|
|
289
|
-
n(new Error("aborted")), clearTimeout(
|
|
289
|
+
n(new Error("aborted")), clearTimeout(r);
|
|
290
290
|
});
|
|
291
291
|
const l = new Promise((s, c) => {
|
|
292
292
|
n = c;
|
|
293
293
|
});
|
|
294
294
|
return Promise.race([
|
|
295
295
|
l,
|
|
296
|
-
e.finally(() => clearTimeout(
|
|
296
|
+
e.finally(() => clearTimeout(r))
|
|
297
297
|
]);
|
|
298
298
|
}
|
|
299
299
|
function U(t, e) {
|
|
@@ -303,35 +303,35 @@ Mt(["exports"], function(o) {
|
|
|
303
303
|
var e;
|
|
304
304
|
return !!(!((e = t == null ? void 0 : t.signal) === null || e === void 0) && e.aborted);
|
|
305
305
|
}
|
|
306
|
-
let
|
|
306
|
+
let E = 0;
|
|
307
307
|
class Z {
|
|
308
308
|
constructor(e = 100) {
|
|
309
|
-
this.size = () => this.items.size, this.get = (i, n,
|
|
309
|
+
this.size = () => this.items.size, this.get = (i, n, r) => {
|
|
310
310
|
let l = this.items.get(i);
|
|
311
311
|
if (l)
|
|
312
|
-
l.lastUsed = ++
|
|
312
|
+
l.lastUsed = ++E, l.waiting++;
|
|
313
313
|
else {
|
|
314
|
-
const
|
|
314
|
+
const h = new AbortController(), d = n(i, h);
|
|
315
315
|
l = {
|
|
316
|
-
abortController:
|
|
317
|
-
item:
|
|
318
|
-
lastUsed: ++
|
|
316
|
+
abortController: h,
|
|
317
|
+
item: d,
|
|
318
|
+
lastUsed: ++E,
|
|
319
319
|
waiting: 1
|
|
320
320
|
}, this.items.set(i, l), this.prune();
|
|
321
321
|
}
|
|
322
|
-
const s = this.items, c = l.item.then((
|
|
322
|
+
const s = this.items, c = l.item.then((h) => h, (h) => (s.delete(i), Promise.reject(h)));
|
|
323
323
|
let m = !1;
|
|
324
|
-
return U(
|
|
325
|
-
var
|
|
326
|
-
l && l.abortController && !m && (m = !0, --l.waiting <= 0 && ((
|
|
324
|
+
return U(r, () => {
|
|
325
|
+
var h;
|
|
326
|
+
l && l.abortController && !m && (m = !0, --l.waiting <= 0 && ((h = l.abortController) === null || h === void 0 || h.abort(), s.delete(i)));
|
|
327
327
|
}), c;
|
|
328
328
|
}, this.clear = () => this.items.clear(), this.maxSize = e, this.items = /* @__PURE__ */ new Map();
|
|
329
329
|
}
|
|
330
330
|
prune() {
|
|
331
331
|
if (this.items.size > this.maxSize) {
|
|
332
332
|
let e, i = 1 / 0;
|
|
333
|
-
this.items.forEach((n,
|
|
334
|
-
n.lastUsed < i && (i = n.lastUsed, e =
|
|
333
|
+
this.items.forEach((n, r) => {
|
|
334
|
+
n.lastUsed < i && (i = n.lastUsed, e = r);
|
|
335
335
|
}), typeof e < "u" && this.items.delete(e);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
@@ -347,21 +347,21 @@ Mt(["exports"], function(o) {
|
|
|
347
347
|
})), Lt(t, e, K, et);
|
|
348
348
|
}
|
|
349
349
|
async function xt(t, e, i) {
|
|
350
|
-
var n,
|
|
350
|
+
var n, r, l;
|
|
351
351
|
const s = await createImageBitmap(t);
|
|
352
352
|
if (B(i))
|
|
353
353
|
return null;
|
|
354
354
|
const c = new VideoFrame(s, { timestamp: 0 });
|
|
355
355
|
try {
|
|
356
|
-
if (!(((n = c == null ? void 0 : c.format) === null || n === void 0 ? void 0 : n.startsWith("BGR")) || ((
|
|
356
|
+
if (!(((n = c == null ? void 0 : c.format) === null || n === void 0 ? void 0 : n.startsWith("BGR")) || ((r = c == null ? void 0 : c.format) === null || r === void 0 ? void 0 : r.startsWith("RGB"))))
|
|
357
357
|
throw new Error(`Unrecognized format: ${c == null ? void 0 : c.format}`);
|
|
358
|
-
const
|
|
359
|
-
if (await c.copyTo(
|
|
360
|
-
for (let w = 0; w <
|
|
361
|
-
const
|
|
362
|
-
|
|
358
|
+
const h = (l = c == null ? void 0 : c.format) === null || l === void 0 ? void 0 : l.startsWith("BGR"), d = c.allocationSize(), f = new Uint8ClampedArray(d);
|
|
359
|
+
if (await c.copyTo(f), h)
|
|
360
|
+
for (let w = 0; w < f.length; w += 4) {
|
|
361
|
+
const F = f[w];
|
|
362
|
+
f[w] = f[w + 2], f[w + 2] = F;
|
|
363
363
|
}
|
|
364
|
-
return Dt(s.width, s.height, e,
|
|
364
|
+
return Dt(s.width, s.height, e, f);
|
|
365
365
|
} catch {
|
|
366
366
|
return B(i) ? null : W(s, e);
|
|
367
367
|
} finally {
|
|
@@ -374,12 +374,12 @@ Mt(["exports"], function(o) {
|
|
|
374
374
|
}));
|
|
375
375
|
const n = new Image();
|
|
376
376
|
U(i, () => n.src = "");
|
|
377
|
-
const
|
|
377
|
+
const r = await new Promise((l, s) => {
|
|
378
378
|
n.onload = () => {
|
|
379
379
|
B(i) || l(n), URL.revokeObjectURL(n.src), n.onload = null;
|
|
380
380
|
}, n.onerror = () => s(new Error("Could not load image.")), n.src = t.size ? URL.createObjectURL(t) : "";
|
|
381
381
|
});
|
|
382
|
-
return Lt(
|
|
382
|
+
return Lt(r, e, N, it);
|
|
383
383
|
}
|
|
384
384
|
function te(t, e, i) {
|
|
385
385
|
return self.actor.send("decodeImage", [], i, void 0, t, e);
|
|
@@ -396,13 +396,13 @@ Mt(["exports"], function(o) {
|
|
|
396
396
|
if (i.width = t.width, i.height = t.height, !n)
|
|
397
397
|
throw new Error("failed to get context");
|
|
398
398
|
n.drawImage(t, 0, 0, t.width, t.height);
|
|
399
|
-
const
|
|
400
|
-
return Dt(t.width, t.height, e,
|
|
399
|
+
const r = n.getImageData(0, 0, t.width, t.height).data;
|
|
400
|
+
return Dt(t.width, t.height, e, r);
|
|
401
401
|
}
|
|
402
402
|
function Dt(t, e, i, n) {
|
|
403
|
-
const
|
|
403
|
+
const r = i === "mapbox" ? (s, c, m) => -1e4 + (s * 256 * 256 + c * 256 + m) * 0.1 : (s, c, m) => s * 256 + c + m / 256 - 32768, l = new Float32Array(t * e);
|
|
404
404
|
for (let s = 0; s < n.length; s += 4)
|
|
405
|
-
l[s / 4] =
|
|
405
|
+
l[s / 4] = r(n[s], n[s + 1], n[s + 2]);
|
|
406
406
|
return { width: t, height: e, data: l };
|
|
407
407
|
}
|
|
408
408
|
const ie = -12e3, oe = 9e3;
|
|
@@ -411,40 +411,40 @@ Mt(["exports"], function(o) {
|
|
|
411
411
|
}
|
|
412
412
|
class $ {
|
|
413
413
|
constructor(e, i, n) {
|
|
414
|
-
this.split = (
|
|
415
|
-
if (
|
|
414
|
+
this.split = (r, l, s) => {
|
|
415
|
+
if (r === 0)
|
|
416
416
|
return this;
|
|
417
|
-
const c = 1 <<
|
|
418
|
-
return new $(this.width / c, this.height / c, (
|
|
419
|
-
}, this.subsamplePixelCenters = (
|
|
420
|
-
const l = (m,
|
|
421
|
-
if (
|
|
417
|
+
const c = 1 << r, m = l * this.width / c, h = s * this.height / c;
|
|
418
|
+
return new $(this.width / c, this.height / c, (d, f) => this.get(d + m, f + h));
|
|
419
|
+
}, this.subsamplePixelCenters = (r) => {
|
|
420
|
+
const l = (m, h, d) => isNaN(m) ? h : isNaN(h) ? m : m + (h - m) * d;
|
|
421
|
+
if (r <= 1)
|
|
422
422
|
return this;
|
|
423
|
-
const s = 0.5 - 1 / (2 *
|
|
424
|
-
const
|
|
425
|
-
return l(pt, X,
|
|
423
|
+
const s = 0.5 - 1 / (2 * r), c = (m, h) => {
|
|
424
|
+
const d = m / r - s, f = h / r - s, w = Math.floor(d), F = Math.floor(f), C = this.get(w, F), P = this.get(w + 1, F), I = this.get(w, F + 1), k = this.get(w + 1, F + 1), V = d - w, ft = f - F, pt = l(C, P, V), X = l(I, k, V);
|
|
425
|
+
return l(pt, X, ft);
|
|
426
426
|
};
|
|
427
|
-
return new $(this.width *
|
|
428
|
-
}, this.averagePixelCentersToGrid = (
|
|
429
|
-
let c = 0, m = 0,
|
|
430
|
-
for (let
|
|
431
|
-
for (let
|
|
432
|
-
isNaN(
|
|
427
|
+
return new $(this.width * r, this.height * r, c);
|
|
428
|
+
}, this.averagePixelCentersToGrid = (r = 1) => new $(this.width + 1, this.height + 1, (l, s) => {
|
|
429
|
+
let c = 0, m = 0, h = 0;
|
|
430
|
+
for (let d = l - r; d < l + r; d++)
|
|
431
|
+
for (let f = s - r; f < s + r; f++)
|
|
432
|
+
isNaN(h = this.get(d, f)) || (m++, c += h);
|
|
433
433
|
return m === 0 ? NaN : c / m;
|
|
434
|
-
}), this.scaleElevation = (
|
|
435
|
-
const l = this.width + 2 *
|
|
434
|
+
}), this.scaleElevation = (r) => r === 1 ? this : new $(this.width, this.height, (l, s) => this.get(l, s) * r), this.materialize = (r = 2) => {
|
|
435
|
+
const l = this.width + 2 * r, s = new Float32Array(l * (this.height + 2 * r));
|
|
436
436
|
let c = 0;
|
|
437
|
-
for (let m = -
|
|
438
|
-
for (let
|
|
439
|
-
s[c++] = this.get(
|
|
440
|
-
return new $(this.width, this.height, (m,
|
|
437
|
+
for (let m = -r; m < this.height + r; m++)
|
|
438
|
+
for (let h = -r; h < this.width + r; h++)
|
|
439
|
+
s[c++] = this.get(h, m);
|
|
440
|
+
return new $(this.width, this.height, (m, h) => s[(h + r) * l + m + r]);
|
|
441
441
|
}, this.get = n, this.width = e, this.height = i;
|
|
442
442
|
}
|
|
443
443
|
/** Construct a height tile from raw DEM pixel values */
|
|
444
444
|
static fromRawDem(e) {
|
|
445
445
|
return new $(e.width, e.height, (i, n) => {
|
|
446
|
-
const
|
|
447
|
-
return re(
|
|
446
|
+
const r = e.data[n * e.width + i];
|
|
447
|
+
return re(r) ? r : NaN;
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
450
|
/**
|
|
@@ -459,10 +459,10 @@ Mt(["exports"], function(o) {
|
|
|
459
459
|
const i = e[4];
|
|
460
460
|
if (!i)
|
|
461
461
|
return;
|
|
462
|
-
const n = i.width,
|
|
463
|
-
return new $(n,
|
|
462
|
+
const n = i.width, r = i.height;
|
|
463
|
+
return new $(n, r, (l, s) => {
|
|
464
464
|
let c = 0;
|
|
465
|
-
s < 0 ? s +=
|
|
465
|
+
s < 0 ? s += r : s < r ? c += 3 : (s -= r, c += 6), l < 0 ? l += n : l < n ? c += 1 : (l -= n, c += 2);
|
|
466
466
|
const m = e[c];
|
|
467
467
|
return m ? m.get(l, s) : NaN;
|
|
468
468
|
});
|
|
@@ -473,27 +473,27 @@ Mt(["exports"], function(o) {
|
|
|
473
473
|
}
|
|
474
474
|
var Et = {};
|
|
475
475
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
476
|
-
Et.read = function(t, e, i, n,
|
|
477
|
-
var l, s, c =
|
|
478
|
-
for (
|
|
476
|
+
Et.read = function(t, e, i, n, r) {
|
|
477
|
+
var l, s, c = r * 8 - n - 1, m = (1 << c) - 1, h = m >> 1, d = -7, f = i ? r - 1 : 0, w = i ? -1 : 1, F = t[e + f];
|
|
478
|
+
for (f += w, l = F & (1 << -d) - 1, F >>= -d, d += c; d > 0; l = l * 256 + t[e + f], f += w, d -= 8)
|
|
479
479
|
;
|
|
480
|
-
for (s = l & (1 << -
|
|
480
|
+
for (s = l & (1 << -d) - 1, l >>= -d, d += n; d > 0; s = s * 256 + t[e + f], f += w, d -= 8)
|
|
481
481
|
;
|
|
482
482
|
if (l === 0)
|
|
483
|
-
l = 1 -
|
|
483
|
+
l = 1 - h;
|
|
484
484
|
else {
|
|
485
485
|
if (l === m)
|
|
486
|
-
return s ? NaN : (
|
|
487
|
-
s = s + Math.pow(2, n), l = l -
|
|
486
|
+
return s ? NaN : (F ? -1 : 1) * (1 / 0);
|
|
487
|
+
s = s + Math.pow(2, n), l = l - h;
|
|
488
488
|
}
|
|
489
|
-
return (
|
|
490
|
-
}, Et.write = function(t, e, i, n,
|
|
491
|
-
var s, c, m,
|
|
492
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (c = isNaN(e) ? 1 : 0, s =
|
|
489
|
+
return (F ? -1 : 1) * s * Math.pow(2, l - n);
|
|
490
|
+
}, Et.write = function(t, e, i, n, r, l) {
|
|
491
|
+
var s, c, m, h = l * 8 - r - 1, d = (1 << h) - 1, f = d >> 1, w = r === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, F = n ? 0 : l - 1, C = n ? 1 : -1, P = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
492
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (c = isNaN(e) ? 1 : 0, s = d) : (s = Math.floor(Math.log(e) / Math.LN2), e * (m = Math.pow(2, -s)) < 1 && (s--, m *= 2), s + f >= 1 ? e += w / m : e += w * Math.pow(2, 1 - f), e * m >= 2 && (s++, m /= 2), s + f >= d ? (c = 0, s = d) : s + f >= 1 ? (c = (e * m - 1) * Math.pow(2, r), s = s + f) : (c = e * Math.pow(2, f - 1) * Math.pow(2, r), s = 0)); r >= 8; t[i + F] = c & 255, F += C, c /= 256, r -= 8)
|
|
493
493
|
;
|
|
494
|
-
for (s = s <<
|
|
494
|
+
for (s = s << r | c, h += r; h > 0; t[i + F] = s & 255, F += C, s /= 256, h -= 8)
|
|
495
495
|
;
|
|
496
|
-
t[i +
|
|
496
|
+
t[i + F - C] |= P * 128;
|
|
497
497
|
};
|
|
498
498
|
var ne = T, gt = Et;
|
|
499
499
|
function T(t) {
|
|
@@ -508,8 +508,8 @@ Mt(["exports"], function(o) {
|
|
|
508
508
|
// === READING =================================================================
|
|
509
509
|
readFields: function(t, e, i) {
|
|
510
510
|
for (i = i || this.length; this.pos < i; ) {
|
|
511
|
-
var n = this.readVarint(),
|
|
512
|
-
this.type = n & 7, t(
|
|
511
|
+
var n = this.readVarint(), r = n >> 3, l = this.pos;
|
|
512
|
+
this.type = n & 7, t(r, e, this), this.pos === l && this.skip(n);
|
|
513
513
|
}
|
|
514
514
|
return e;
|
|
515
515
|
},
|
|
@@ -642,16 +642,16 @@ Mt(["exports"], function(o) {
|
|
|
642
642
|
return this.length = this.pos, this.pos = 0, this.buf.subarray(0, this.length);
|
|
643
643
|
},
|
|
644
644
|
writeFixed32: function(t) {
|
|
645
|
-
this.realloc(4),
|
|
645
|
+
this.realloc(4), ht(this.buf, t, this.pos), this.pos += 4;
|
|
646
646
|
},
|
|
647
647
|
writeSFixed32: function(t) {
|
|
648
|
-
this.realloc(4),
|
|
648
|
+
this.realloc(4), ht(this.buf, t, this.pos), this.pos += 4;
|
|
649
649
|
},
|
|
650
650
|
writeFixed64: function(t) {
|
|
651
|
-
this.realloc(8),
|
|
651
|
+
this.realloc(8), ht(this.buf, t & -1, this.pos), ht(this.buf, Math.floor(t * Gt), this.pos + 4), this.pos += 8;
|
|
652
652
|
},
|
|
653
653
|
writeSFixed64: function(t) {
|
|
654
|
-
this.realloc(8),
|
|
654
|
+
this.realloc(8), ht(this.buf, t & -1, this.pos), ht(this.buf, Math.floor(t * Gt), this.pos + 4), this.pos += 8;
|
|
655
655
|
},
|
|
656
656
|
writeVarint: function(t) {
|
|
657
657
|
if (t = +t || 0, t > 268435455 || t < 0) {
|
|
@@ -695,10 +695,10 @@ Mt(["exports"], function(o) {
|
|
|
695
695
|
this.writeTag(t, T.Bytes), this.writeRawMessage(e, i);
|
|
696
696
|
},
|
|
697
697
|
writePackedVarint: function(t, e) {
|
|
698
|
-
e.length && this.writeMessage(t,
|
|
698
|
+
e.length && this.writeMessage(t, de, e);
|
|
699
699
|
},
|
|
700
700
|
writePackedSVarint: function(t, e) {
|
|
701
|
-
e.length && this.writeMessage(t,
|
|
701
|
+
e.length && this.writeMessage(t, fe, e);
|
|
702
702
|
},
|
|
703
703
|
writePackedBoolean: function(t, e) {
|
|
704
704
|
e.length && this.writeMessage(t, ye, e);
|
|
@@ -756,8 +756,8 @@ Mt(["exports"], function(o) {
|
|
|
756
756
|
}
|
|
757
757
|
};
|
|
758
758
|
function se(t, e, i) {
|
|
759
|
-
var n = i.buf,
|
|
760
|
-
if (l = n[i.pos++],
|
|
759
|
+
var n = i.buf, r, l;
|
|
760
|
+
if (l = n[i.pos++], r = (l & 112) >> 4, l < 128 || (l = n[i.pos++], r |= (l & 127) << 3, l < 128) || (l = n[i.pos++], r |= (l & 127) << 10, l < 128) || (l = n[i.pos++], r |= (l & 127) << 17, l < 128) || (l = n[i.pos++], r |= (l & 127) << 24, l < 128) || (l = n[i.pos++], r |= (l & 1) << 31, l < 128)) return mt(t, r, e);
|
|
761
761
|
throw new Error("Expected varint not more than 10 bytes");
|
|
762
762
|
}
|
|
763
763
|
function J(t) {
|
|
@@ -770,24 +770,24 @@ Mt(["exports"], function(o) {
|
|
|
770
770
|
var i, n;
|
|
771
771
|
if (t >= 0 ? (i = t % 4294967296 | 0, n = t / 4294967296 | 0) : (i = ~(-t % 4294967296), n = ~(-t / 4294967296), i ^ 4294967295 ? i = i + 1 | 0 : (i = 0, n = n + 1 | 0)), t >= 18446744073709552e3 || t < -18446744073709552e3)
|
|
772
772
|
throw new Error("Given varint doesn't fit into 10 bytes");
|
|
773
|
-
e.realloc(10), me(i, n, e),
|
|
773
|
+
e.realloc(10), me(i, n, e), he(n, e);
|
|
774
774
|
}
|
|
775
775
|
function me(t, e, i) {
|
|
776
776
|
i.buf[i.pos++] = t & 127 | 128, t >>>= 7, i.buf[i.pos++] = t & 127 | 128, t >>>= 7, i.buf[i.pos++] = t & 127 | 128, t >>>= 7, i.buf[i.pos++] = t & 127 | 128, t >>>= 7, i.buf[i.pos] = t & 127;
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function he(t, e) {
|
|
779
779
|
var i = (t & 7) << 4;
|
|
780
780
|
e.buf[e.pos++] |= i | ((t >>>= 3) ? 128 : 0), t && (e.buf[e.pos++] = t & 127 | ((t >>>= 7) ? 128 : 0), t && (e.buf[e.pos++] = t & 127 | ((t >>>= 7) ? 128 : 0), t && (e.buf[e.pos++] = t & 127 | ((t >>>= 7) ? 128 : 0), t && (e.buf[e.pos++] = t & 127 | ((t >>>= 7) ? 128 : 0), t && (e.buf[e.pos++] = t & 127)))));
|
|
781
781
|
}
|
|
782
782
|
function Xt(t, e, i) {
|
|
783
783
|
var n = e <= 16383 ? 1 : e <= 2097151 ? 2 : e <= 268435455 ? 3 : Math.floor(Math.log(e) / (Math.LN2 * 7));
|
|
784
784
|
i.realloc(n);
|
|
785
|
-
for (var
|
|
785
|
+
for (var r = i.pos - 1; r >= t; r--) i.buf[r + n] = i.buf[r];
|
|
786
786
|
}
|
|
787
|
-
function
|
|
787
|
+
function de(t, e) {
|
|
788
788
|
for (var i = 0; i < t.length; i++) e.writeVarint(t[i]);
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function fe(t, e) {
|
|
791
791
|
for (var i = 0; i < t.length; i++) e.writeSVarint(t[i]);
|
|
792
792
|
}
|
|
793
793
|
function ue(t, e) {
|
|
@@ -814,18 +814,18 @@ Mt(["exports"], function(o) {
|
|
|
814
814
|
function wt(t, e) {
|
|
815
815
|
return (t[e] | t[e + 1] << 8 | t[e + 2] << 16) + t[e + 3] * 16777216;
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function ht(t, e, i) {
|
|
818
818
|
t[i] = e, t[i + 1] = e >>> 8, t[i + 2] = e >>> 16, t[i + 3] = e >>> 24;
|
|
819
819
|
}
|
|
820
820
|
function Nt(t, e) {
|
|
821
821
|
return (t[e] | t[e + 1] << 8 | t[e + 2] << 16) + (t[e + 3] << 24);
|
|
822
822
|
}
|
|
823
823
|
function be(t, e, i) {
|
|
824
|
-
for (var n = "",
|
|
825
|
-
var l = t[
|
|
826
|
-
if (
|
|
827
|
-
var m,
|
|
828
|
-
c === 1 ? l < 128 && (s = l) : c === 2 ? (m = t[
|
|
824
|
+
for (var n = "", r = e; r < i; ) {
|
|
825
|
+
var l = t[r], s = null, c = l > 239 ? 4 : l > 223 ? 3 : l > 191 ? 2 : 1;
|
|
826
|
+
if (r + c > i) break;
|
|
827
|
+
var m, h, d;
|
|
828
|
+
c === 1 ? l < 128 && (s = l) : c === 2 ? (m = t[r + 1], (m & 192) === 128 && (s = (l & 31) << 6 | m & 63, s <= 127 && (s = null))) : c === 3 ? (m = t[r + 1], h = t[r + 2], (m & 192) === 128 && (h & 192) === 128 && (s = (l & 15) << 12 | (m & 63) << 6 | h & 63, (s <= 2047 || s >= 55296 && s <= 57343) && (s = null))) : c === 4 && (m = t[r + 1], h = t[r + 2], d = t[r + 3], (m & 192) === 128 && (h & 192) === 128 && (d & 192) === 128 && (s = (l & 15) << 18 | (m & 63) << 12 | (h & 63) << 6 | d & 63, (s <= 65535 || s >= 1114112) && (s = null))), s === null ? (s = 65533, c = 1) : s > 65535 && (s -= 65536, n += String.fromCharCode(s >>> 10 & 1023 | 55296), s = 56320 | s & 1023), n += String.fromCharCode(s), r += c;
|
|
829
829
|
}
|
|
830
830
|
return n;
|
|
831
831
|
}
|
|
@@ -833,27 +833,27 @@ Mt(["exports"], function(o) {
|
|
|
833
833
|
return Bt.decode(t.subarray(e, i));
|
|
834
834
|
}
|
|
835
835
|
function Te(t, e, i) {
|
|
836
|
-
for (var n = 0,
|
|
837
|
-
if (
|
|
836
|
+
for (var n = 0, r, l; n < e.length; n++) {
|
|
837
|
+
if (r = e.charCodeAt(n), r > 55295 && r < 57344)
|
|
838
838
|
if (l)
|
|
839
|
-
if (
|
|
840
|
-
t[i++] = 239, t[i++] = 191, t[i++] = 189, l =
|
|
839
|
+
if (r < 56320) {
|
|
840
|
+
t[i++] = 239, t[i++] = 191, t[i++] = 189, l = r;
|
|
841
841
|
continue;
|
|
842
842
|
} else
|
|
843
|
-
|
|
843
|
+
r = l - 55296 << 10 | r - 56320 | 65536, l = null;
|
|
844
844
|
else {
|
|
845
|
-
|
|
845
|
+
r > 56319 || n + 1 === e.length ? (t[i++] = 239, t[i++] = 191, t[i++] = 189) : l = r;
|
|
846
846
|
continue;
|
|
847
847
|
}
|
|
848
848
|
else l && (t[i++] = 239, t[i++] = 191, t[i++] = 189, l = null);
|
|
849
|
-
|
|
849
|
+
r < 128 ? t[i++] = r : (r < 2048 ? t[i++] = r >> 6 | 192 : (r < 65536 ? t[i++] = r >> 12 | 224 : (t[i++] = r >> 18 | 240, t[i++] = r >> 12 & 63 | 128), t[i++] = r >> 6 & 63 | 128), t[i++] = r & 63 | 128);
|
|
850
850
|
}
|
|
851
851
|
return i;
|
|
852
852
|
}
|
|
853
|
-
var ve = /* @__PURE__ */ ae(ne),
|
|
853
|
+
var ve = /* @__PURE__ */ ae(ne), dt;
|
|
854
854
|
(function(t) {
|
|
855
855
|
t[t.UNKNOWN = 0] = "UNKNOWN", t[t.POINT = 1] = "POINT", t[t.LINESTRING = 2] = "LINESTRING", t[t.POLYGON = 3] = "POLYGON";
|
|
856
|
-
})(
|
|
856
|
+
})(dt || (dt = {}));
|
|
857
857
|
function De(t) {
|
|
858
858
|
const e = new ve();
|
|
859
859
|
for (const i in t.layers) {
|
|
@@ -889,17 +889,17 @@ Mt(["exports"], function(o) {
|
|
|
889
889
|
const i = t.feature;
|
|
890
890
|
if (!i || !e)
|
|
891
891
|
throw new Error();
|
|
892
|
-
const n = t.keys,
|
|
892
|
+
const n = t.keys, r = t.values, l = t.keycache, s = t.valuecache;
|
|
893
893
|
for (const c in i.properties) {
|
|
894
|
-
let m = i.properties[c],
|
|
894
|
+
let m = i.properties[c], h = l[c];
|
|
895
895
|
if (m === null)
|
|
896
896
|
continue;
|
|
897
|
-
typeof
|
|
898
|
-
const
|
|
899
|
-
|
|
900
|
-
const
|
|
901
|
-
let w = s[
|
|
902
|
-
typeof w > "u" && (
|
|
897
|
+
typeof h > "u" && (n.push(c), h = n.length - 1, l[c] = h), e.writeVarint(h);
|
|
898
|
+
const d = typeof m;
|
|
899
|
+
d !== "string" && d !== "boolean" && d !== "number" && (m = JSON.stringify(m));
|
|
900
|
+
const f = `${d}:${m}`;
|
|
901
|
+
let w = s[f];
|
|
902
|
+
typeof w > "u" && (r.push(m), w = r.length - 1, s[f] = w), e.writeVarint(w);
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
905
|
function St(t, e) {
|
|
@@ -912,17 +912,17 @@ Mt(["exports"], function(o) {
|
|
|
912
912
|
if (!e)
|
|
913
913
|
throw new Error();
|
|
914
914
|
const i = t.geometry, n = t.type;
|
|
915
|
-
let
|
|
915
|
+
let r = 0, l = 0;
|
|
916
916
|
for (const s of i) {
|
|
917
917
|
let c = 1;
|
|
918
|
-
n ===
|
|
919
|
-
const m = s.length / 2,
|
|
920
|
-
for (let
|
|
921
|
-
|
|
922
|
-
const
|
|
923
|
-
e.writeVarint(Vt(
|
|
918
|
+
n === dt.POINT && (c = s.length / 2), e.writeVarint(St(1, c));
|
|
919
|
+
const m = s.length / 2, h = n === dt.POLYGON ? m - 1 : m;
|
|
920
|
+
for (let d = 0; d < h; d++) {
|
|
921
|
+
d === 1 && n !== 1 && e.writeVarint(St(2, h - 1));
|
|
922
|
+
const f = s[d * 2] - r, w = s[d * 2 + 1] - l;
|
|
923
|
+
e.writeVarint(Vt(f)), e.writeVarint(Vt(w)), r += f, l += w;
|
|
924
924
|
}
|
|
925
|
-
n ===
|
|
925
|
+
n === dt.POLYGON && e.writeVarint(St(7, 1));
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
function ke(t, e) {
|
|
@@ -931,76 +931,76 @@ Mt(["exports"], function(o) {
|
|
|
931
931
|
typeof t == "string" ? e.writeStringField(1, t) : typeof t == "boolean" ? e.writeBooleanField(7, t) : typeof t == "number" && (t % 1 !== 0 ? e.writeDoubleField(3, t) : t < 0 ? e.writeSVarintField(6, t) : e.writeVarintField(5, t));
|
|
932
932
|
}
|
|
933
933
|
class Re {
|
|
934
|
-
constructor(e, i, n,
|
|
935
|
-
this.loaded = Promise.resolve(), this.decodeImage = It, this.fetchAndParseTile = (s, c, m,
|
|
936
|
-
const
|
|
937
|
-
return
|
|
938
|
-
const
|
|
939
|
-
if (B(
|
|
934
|
+
constructor(e, i, n, r, l) {
|
|
935
|
+
this.loaded = Promise.resolve(), this.decodeImage = It, this.fetchAndParseTile = (s, c, m, h, d) => {
|
|
936
|
+
const f = this, w = this.demUrlPattern.replace("{z}", s.toString()).replace("{x}", c.toString()).replace("{y}", m.toString());
|
|
937
|
+
return d == null || d.useTile(w), this.parsedCache.get(w, async (F, C) => {
|
|
938
|
+
const P = await f.fetchTile(s, c, m, C, d);
|
|
939
|
+
if (B(C))
|
|
940
940
|
throw new Error("canceled");
|
|
941
|
-
const I =
|
|
942
|
-
return
|
|
943
|
-
},
|
|
944
|
-
}, this.tileCache = new Z(i), this.parsedCache = new Z(i), this.contourCache = new Z(i), this.timeoutMs = l, this.demUrlPattern = e, this.encoding = n, this.maxzoom =
|
|
941
|
+
const I = f.decodeImage(P.data, f.encoding, C), k = d == null ? void 0 : d.marker("decode"), V = await I;
|
|
942
|
+
return k == null || k(), V;
|
|
943
|
+
}, h);
|
|
944
|
+
}, this.tileCache = new Z(i), this.parsedCache = new Z(i), this.contourCache = new Z(i), this.timeoutMs = l, this.demUrlPattern = e, this.encoding = n, this.maxzoom = r;
|
|
945
945
|
}
|
|
946
|
-
fetchTile(e, i, n,
|
|
946
|
+
fetchTile(e, i, n, r, l) {
|
|
947
947
|
const s = this.demUrlPattern.replace("{z}", e.toString()).replace("{x}", i.toString()).replace("{y}", n.toString());
|
|
948
948
|
return l == null || l.useTile(s), this.tileCache.get(s, (c, m) => {
|
|
949
|
-
const
|
|
949
|
+
const h = {
|
|
950
950
|
signal: m.signal
|
|
951
951
|
};
|
|
952
952
|
l == null || l.fetchTile(s);
|
|
953
|
-
const
|
|
954
|
-
return G(this.timeoutMs, fetch(s,
|
|
955
|
-
if (
|
|
956
|
-
throw new Error(`Bad response: ${
|
|
953
|
+
const d = l == null ? void 0 : l.marker("fetch");
|
|
954
|
+
return G(this.timeoutMs, fetch(s, h).then(async (f) => {
|
|
955
|
+
if (d == null || d(), !f.ok)
|
|
956
|
+
throw new Error(`Bad response: ${f.status} for ${s}`);
|
|
957
957
|
return {
|
|
958
|
-
data: await
|
|
959
|
-
expires:
|
|
960
|
-
cacheControl:
|
|
958
|
+
data: await f.blob(),
|
|
959
|
+
expires: f.headers.get("expires") || void 0,
|
|
960
|
+
cacheControl: f.headers.get("cache-control") || void 0
|
|
961
961
|
};
|
|
962
962
|
}), m);
|
|
963
|
-
},
|
|
963
|
+
}, r);
|
|
964
964
|
}
|
|
965
|
-
async fetchDem(e, i, n,
|
|
966
|
-
const c = Math.min(e - (
|
|
967
|
-
return $.fromRawDem(w).split(m, i %
|
|
965
|
+
async fetchDem(e, i, n, r, l, s) {
|
|
966
|
+
const c = Math.min(e - (r.overzoom || 0), this.maxzoom), m = e - c, h = 1 << m, d = Math.floor(i / h), f = Math.floor(n / h), w = await this.fetchAndParseTile(c, d, f, l, s);
|
|
967
|
+
return $.fromRawDem(w).split(m, i % h, n % h);
|
|
968
968
|
}
|
|
969
|
-
fetchContourTile(e, i, n,
|
|
970
|
-
const { levels: c, multiplier: m = 1, buffer:
|
|
969
|
+
fetchContourTile(e, i, n, r, l, s) {
|
|
970
|
+
const { levels: c, multiplier: m = 1, buffer: h = 1, extent: d = 4096, contourLayer: f = "contours", elevationKey: w = "ele", levelKey: F = "level", subsampleBelow: C = 100 } = r;
|
|
971
971
|
if (!c || c.length === 0)
|
|
972
972
|
return Promise.resolve({ arrayBuffer: new ArrayBuffer(0) });
|
|
973
|
-
const
|
|
974
|
-
return this.contourCache.get(
|
|
975
|
-
const V = 1 << e,
|
|
973
|
+
const P = [e, i, n, p(r)].join("/");
|
|
974
|
+
return this.contourCache.get(P, async (I, k) => {
|
|
975
|
+
const V = 1 << e, ft = [];
|
|
976
976
|
for (let q = n - 1; q <= n + 1; q++)
|
|
977
977
|
for (let nt = i - 1; nt <= i + 1; nt++)
|
|
978
|
-
|
|
979
|
-
const pt = await Promise.all(
|
|
978
|
+
ft.push(q < 0 || q >= V ? void 0 : this.fetchDem(e, (nt + V) % V, q, r, k, s));
|
|
979
|
+
const pt = await Promise.all(ft);
|
|
980
980
|
let X = $.combineNeighbors(pt);
|
|
981
|
-
if (!X || B(
|
|
981
|
+
if (!X || B(k))
|
|
982
982
|
return { arrayBuffer: new Uint8Array().buffer };
|
|
983
983
|
const ot = s == null ? void 0 : s.marker("isoline");
|
|
984
|
-
if (X.width >=
|
|
984
|
+
if (X.width >= C)
|
|
985
985
|
X = X.materialize(2);
|
|
986
986
|
else
|
|
987
|
-
for (; X.width <
|
|
987
|
+
for (; X.width < C; )
|
|
988
988
|
X = X.subsamplePixelCenters(2).materialize(2);
|
|
989
989
|
X = X.averagePixelCentersToGrid().scaleElevation(m).materialize(1);
|
|
990
|
-
const
|
|
990
|
+
const R = x(c[0], X, d, h);
|
|
991
991
|
ot == null || ot();
|
|
992
992
|
const At = De({
|
|
993
|
-
extent:
|
|
993
|
+
extent: d,
|
|
994
994
|
layers: {
|
|
995
|
-
[
|
|
996
|
-
features: Object.entries(
|
|
995
|
+
[f]: {
|
|
996
|
+
features: Object.entries(R).map(([q, nt]) => {
|
|
997
997
|
const _t = Number(q);
|
|
998
998
|
return {
|
|
999
|
-
type:
|
|
999
|
+
type: dt.LINESTRING,
|
|
1000
1000
|
geometry: nt,
|
|
1001
1001
|
properties: {
|
|
1002
1002
|
[w]: _t,
|
|
1003
|
-
[
|
|
1003
|
+
[F]: Math.max(...c.map((bt, Y) => _t % bt === 0 ? Y : 0))
|
|
1004
1004
|
}
|
|
1005
1005
|
};
|
|
1006
1006
|
})
|
|
@@ -1030,9 +1030,9 @@ Mt(["exports"], function(o) {
|
|
|
1030
1030
|
this.marks = {}, this.urls = [], this.fetched = [], this.resources = [], this.tilesFetched = 0, this.timeOrigin = Ce, this.finish = (i) => {
|
|
1031
1031
|
this.markFinish();
|
|
1032
1032
|
const n = (m) => {
|
|
1033
|
-
const
|
|
1034
|
-
return Number.isFinite(
|
|
1035
|
-
},
|
|
1033
|
+
const h = this.marks[m] || [], d = Math.max(...h.map((w) => Math.max(...w))), f = Math.min(...h.map((w) => Math.min(...w)));
|
|
1034
|
+
return Number.isFinite(d) ? d - f : void 0;
|
|
1035
|
+
}, r = n("main") || 0, l = n("fetch"), s = n("decode"), c = n("isoline");
|
|
1036
1036
|
return {
|
|
1037
1037
|
url: i,
|
|
1038
1038
|
tilesUsed: this.tilesFetched,
|
|
@@ -1042,17 +1042,17 @@ Mt(["exports"], function(o) {
|
|
|
1042
1042
|
...this.resources,
|
|
1043
1043
|
...Oe(this.fetched.map(Pe))
|
|
1044
1044
|
],
|
|
1045
|
-
duration:
|
|
1045
|
+
duration: r,
|
|
1046
1046
|
fetch: l,
|
|
1047
1047
|
decode: s,
|
|
1048
1048
|
process: c,
|
|
1049
|
-
wait:
|
|
1049
|
+
wait: r - (l || 0) - (s || 0) - (c || 0)
|
|
1050
1050
|
};
|
|
1051
1051
|
}, this.error = (i) => ({ ...this.finish(i), error: !0 }), this.marker = (i) => {
|
|
1052
1052
|
var n;
|
|
1053
1053
|
this.marks[i] || (this.marks[i] = []);
|
|
1054
|
-
const
|
|
1055
|
-
return (n = this.marks[i]) === null || n === void 0 || n.push(
|
|
1054
|
+
const r = [Ut()];
|
|
1055
|
+
return (n = this.marks[i]) === null || n === void 0 || n.push(r), () => r.push(Ut());
|
|
1056
1056
|
}, this.useTile = (i) => {
|
|
1057
1057
|
this.urls.indexOf(i) < 0 && (this.urls.push(i), this.tilesFetched++);
|
|
1058
1058
|
}, this.fetchTile = (i) => {
|
|
@@ -1060,12 +1060,12 @@ Mt(["exports"], function(o) {
|
|
|
1060
1060
|
}, this.addAll = (i) => {
|
|
1061
1061
|
var n;
|
|
1062
1062
|
this.tilesFetched += i.tilesUsed;
|
|
1063
|
-
const
|
|
1063
|
+
const r = i.origin - this.timeOrigin;
|
|
1064
1064
|
for (const l in i.marks) {
|
|
1065
1065
|
const s = l;
|
|
1066
|
-
(this.marks[s] || (this.marks[s] = [])).push(...((n = i.marks[s]) === null || n === void 0 ? void 0 : n.map((m) => m.map((
|
|
1066
|
+
(this.marks[s] || (this.marks[s] = [])).push(...((n = i.marks[s]) === null || n === void 0 ? void 0 : n.map((m) => m.map((h) => h + r))) || []);
|
|
1067
1067
|
}
|
|
1068
|
-
this.resources.push(...i.resources.map((l) => Ie(l,
|
|
1068
|
+
this.resources.push(...i.resources.map((l) => Ie(l, r)));
|
|
1069
1069
|
}, this.markFinish = this.marker(e);
|
|
1070
1070
|
}
|
|
1071
1071
|
}
|
|
@@ -1079,8 +1079,8 @@ Mt(["exports"], function(o) {
|
|
|
1079
1079
|
let Le = 0;
|
|
1080
1080
|
class Ge {
|
|
1081
1081
|
constructor(e, i, n = 2e4) {
|
|
1082
|
-
this.callbacks = {}, this.cancels = {}, this.dest = e, this.timeoutMs = n, this.dest.onmessage = async ({ data:
|
|
1083
|
-
const l =
|
|
1082
|
+
this.callbacks = {}, this.cancels = {}, this.dest = e, this.timeoutMs = n, this.dest.onmessage = async ({ data: r }) => {
|
|
1083
|
+
const l = r;
|
|
1084
1084
|
if (l.type === "cancel") {
|
|
1085
1085
|
const s = this.cancels[l.id];
|
|
1086
1086
|
delete this.cancels[l.id], s == null || s.abort();
|
|
@@ -1088,27 +1088,27 @@ Mt(["exports"], function(o) {
|
|
|
1088
1088
|
const s = this.callbacks[l.id];
|
|
1089
1089
|
delete this.callbacks[l.id], s && s(l.error ? new Error(l.error) : void 0, l.response, l.timings);
|
|
1090
1090
|
} else if (l.type === "request") {
|
|
1091
|
-
const s = new Wt("worker"), c = i[l.name], m = new AbortController(),
|
|
1091
|
+
const s = new Wt("worker"), c = i[l.name], m = new AbortController(), h = c.apply(c, [
|
|
1092
1092
|
...l.args,
|
|
1093
1093
|
m,
|
|
1094
1094
|
s
|
|
1095
|
-
]),
|
|
1096
|
-
if (l.id &&
|
|
1095
|
+
]), d = `${l.name}_${l.id}`;
|
|
1096
|
+
if (l.id && h) {
|
|
1097
1097
|
this.cancels[l.id] = m;
|
|
1098
1098
|
try {
|
|
1099
|
-
const
|
|
1099
|
+
const f = await h, w = f == null ? void 0 : f.transferrables;
|
|
1100
1100
|
this.postMessage({
|
|
1101
1101
|
id: l.id,
|
|
1102
1102
|
type: "response",
|
|
1103
|
-
response:
|
|
1104
|
-
timings: s.finish(
|
|
1103
|
+
response: f,
|
|
1104
|
+
timings: s.finish(d)
|
|
1105
1105
|
}, w);
|
|
1106
|
-
} catch (
|
|
1106
|
+
} catch (f) {
|
|
1107
1107
|
this.postMessage({
|
|
1108
1108
|
id: l.id,
|
|
1109
1109
|
type: "response",
|
|
1110
|
-
error: (
|
|
1111
|
-
timings: s.finish(
|
|
1110
|
+
error: (f == null ? void 0 : f.toString()) || "error",
|
|
1111
|
+
timings: s.finish(d)
|
|
1112
1112
|
});
|
|
1113
1113
|
}
|
|
1114
1114
|
delete this.cancels[l.id];
|
|
@@ -1120,10 +1120,10 @@ Mt(["exports"], function(o) {
|
|
|
1120
1120
|
this.dest.postMessage(e, i || []);
|
|
1121
1121
|
}
|
|
1122
1122
|
/** Invokes a method by name with a set of arguments in the remote context. */
|
|
1123
|
-
send(e, i, n,
|
|
1124
|
-
const s = ++Le, c = new Promise((m,
|
|
1125
|
-
this.postMessage({ id: s, type: "request", name: e, args: l }, i), this.callbacks[s] = (
|
|
1126
|
-
|
|
1123
|
+
send(e, i, n, r, ...l) {
|
|
1124
|
+
const s = ++Le, c = new Promise((m, h) => {
|
|
1125
|
+
this.postMessage({ id: s, type: "request", name: e, args: l }, i), this.callbacks[s] = (d, f, w) => {
|
|
1126
|
+
r == null || r.addAll(w), d ? h(d) : m(f);
|
|
1127
1127
|
};
|
|
1128
1128
|
});
|
|
1129
1129
|
return U(n, () => {
|
|
@@ -1131,21 +1131,21 @@ Mt(["exports"], function(o) {
|
|
|
1131
1131
|
}), G(this.timeoutMs, c, n);
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
1134
|
-
o.A = Ge, o.H = $, o.L = Re, o.T = Wt, o.a =
|
|
1134
|
+
o.A = Ge, o.H = $, o.L = Re, o.T = Wt, o.a = _, o.b = x, o.c = Dt, o.d = It, o.e = A, o.f = M, o.g = b, o.p = D;
|
|
1135
1135
|
});
|
|
1136
1136
|
Mt(["./shared"], function(o) {
|
|
1137
|
-
const
|
|
1137
|
+
const a = (y) => Promise.reject(new Error(`No manager registered for ${y}`));
|
|
1138
1138
|
class u {
|
|
1139
1139
|
constructor() {
|
|
1140
|
-
this.managers = {}, this.init = (x,
|
|
1140
|
+
this.managers = {}, this.init = (x, z) => (this.managers[x.managerId] = new o.L(x.demUrlPattern, x.cacheSize, x.encoding, x.maxzoom, x.timeoutMs), Promise.resolve()), this.fetchTile = (x, z, S, O, A, _) => {
|
|
1141
1141
|
var p;
|
|
1142
|
-
return ((p = this.managers[x]) === null || p === void 0 ? void 0 : p.fetchTile(
|
|
1143
|
-
}, this.fetchAndParseTile = (x,
|
|
1142
|
+
return ((p = this.managers[x]) === null || p === void 0 ? void 0 : p.fetchTile(z, S, O, A, _)) || a(x);
|
|
1143
|
+
}, this.fetchAndParseTile = (x, z, S, O, A, _) => {
|
|
1144
1144
|
var p;
|
|
1145
|
-
return o.p(((p = this.managers[x]) === null || p === void 0 ? void 0 : p.fetchAndParseTile(
|
|
1146
|
-
}, this.fetchContourTile = (x,
|
|
1147
|
-
var
|
|
1148
|
-
return o.f(((
|
|
1145
|
+
return o.p(((p = this.managers[x]) === null || p === void 0 ? void 0 : p.fetchAndParseTile(z, S, O, A, _)) || a(x), !0);
|
|
1146
|
+
}, this.fetchContourTile = (x, z, S, O, A, _, p) => {
|
|
1147
|
+
var b;
|
|
1148
|
+
return o.f(((b = this.managers[x]) === null || b === void 0 ? void 0 : b.fetchContourTile(z, S, O, A, _, p)) || a(x));
|
|
1149
1149
|
};
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
@@ -1153,28 +1153,28 @@ Mt(["./shared"], function(o) {
|
|
|
1153
1153
|
g.actor = new o.A(g, new u());
|
|
1154
1154
|
});
|
|
1155
1155
|
Mt(["./shared"], function(o) {
|
|
1156
|
-
const
|
|
1156
|
+
const a = { workerUrl: "" };
|
|
1157
1157
|
let u, g = 0;
|
|
1158
1158
|
class y {
|
|
1159
1159
|
constructor() {
|
|
1160
|
-
this.decodeImage = (
|
|
1160
|
+
this.decodeImage = (b, v, D) => o.p(o.d(b, v, D), !1);
|
|
1161
1161
|
}
|
|
1162
1162
|
}
|
|
1163
1163
|
function x() {
|
|
1164
1164
|
if (!u) {
|
|
1165
|
-
const p = new Worker(
|
|
1166
|
-
u = new o.A(p,
|
|
1165
|
+
const p = new Worker(a.workerUrl), b = new y();
|
|
1166
|
+
u = new o.A(p, b);
|
|
1167
1167
|
}
|
|
1168
1168
|
return u;
|
|
1169
1169
|
}
|
|
1170
|
-
class
|
|
1171
|
-
constructor(
|
|
1172
|
-
this.fetchTile = (H, G, U, B,
|
|
1170
|
+
class z {
|
|
1171
|
+
constructor(b, v, D, M, j, ct) {
|
|
1172
|
+
this.fetchTile = (H, G, U, B, E) => this.actor.send("fetchTile", [], B, E, this.managerId, H, G, U), this.fetchAndParseTile = (H, G, U, B, E) => this.actor.send("fetchAndParseTile", [], B, E, this.managerId, H, G, U), this.fetchContourTile = (H, G, U, B, E, Z) => this.actor.send("fetchContourTile", [], E, Z, this.managerId, H, G, U, B);
|
|
1173
1173
|
const tt = this.managerId = ++g;
|
|
1174
1174
|
this.actor = ct || x(), this.loaded = this.actor.send("init", [], new AbortController(), void 0, {
|
|
1175
1175
|
cacheSize: v,
|
|
1176
|
-
demUrlPattern:
|
|
1177
|
-
encoding:
|
|
1176
|
+
demUrlPattern: b,
|
|
1177
|
+
encoding: D,
|
|
1178
1178
|
maxzoom: M,
|
|
1179
1179
|
managerId: tt,
|
|
1180
1180
|
timeoutMs: j
|
|
@@ -1182,68 +1182,68 @@ Mt(["./shared"], function(o) {
|
|
|
1182
1182
|
}
|
|
1183
1183
|
}
|
|
1184
1184
|
Blob.prototype.arrayBuffer || (Blob.prototype.arrayBuffer = function() {
|
|
1185
|
-
return new Promise((
|
|
1186
|
-
const
|
|
1187
|
-
|
|
1185
|
+
return new Promise((b, v) => {
|
|
1186
|
+
const D = new FileReader();
|
|
1187
|
+
D.onload = (M) => {
|
|
1188
1188
|
var j;
|
|
1189
|
-
return
|
|
1190
|
-
},
|
|
1189
|
+
return b((j = M.target) === null || j === void 0 ? void 0 : j.result);
|
|
1190
|
+
}, D.onerror = v, D.readAsArrayBuffer(this);
|
|
1191
1191
|
});
|
|
1192
1192
|
});
|
|
1193
|
-
const
|
|
1193
|
+
const S = (p) => (b, v) => {
|
|
1194
1194
|
if (v instanceof AbortController)
|
|
1195
|
-
return p(
|
|
1195
|
+
return p(b, v);
|
|
1196
1196
|
{
|
|
1197
|
-
const
|
|
1198
|
-
return p(
|
|
1197
|
+
const D = new AbortController();
|
|
1198
|
+
return p(b, D).then((M) => v(void 0, M.data, M.cacheControl, M.expires), (M) => v(M)), { cancel: () => D.abort() };
|
|
1199
1199
|
}
|
|
1200
|
-
},
|
|
1200
|
+
}, O = /* @__PURE__ */ new Set();
|
|
1201
1201
|
class A {
|
|
1202
|
-
constructor({ url:
|
|
1203
|
-
this.timingCallbacks = [], this.onTiming = (
|
|
1204
|
-
this.timingCallbacks.push(
|
|
1205
|
-
}, this.setupMaplibre = (
|
|
1206
|
-
|
|
1207
|
-
}, this.sharedDemProtocolV4 = async (
|
|
1208
|
-
const [K, et, N] = this.parseUrl(
|
|
1202
|
+
constructor({ url: b, cacheSize: v = 100, id: D = "dem", encoding: M = "terrarium", maxzoom: j = 12, worker: ct = !0, timeoutMs: tt = 1e4, actor: H }) {
|
|
1203
|
+
this.timingCallbacks = [], this.onTiming = (E) => {
|
|
1204
|
+
this.timingCallbacks.push(E);
|
|
1205
|
+
}, this.setupMaplibre = (E) => {
|
|
1206
|
+
E.addProtocol(this.sharedDemProtocolId, this.sharedDemProtocol), E.addProtocol(this.contourProtocolId, this.contourProtocol);
|
|
1207
|
+
}, this.sharedDemProtocolV4 = async (E, Z) => {
|
|
1208
|
+
const [K, et, N] = this.parseUrl(E.url), it = new o.T("main");
|
|
1209
1209
|
let at;
|
|
1210
1210
|
try {
|
|
1211
1211
|
const W = await this.manager.fetchTile(K, et, N, Z, it);
|
|
1212
|
-
return at = it.finish(
|
|
1212
|
+
return at = it.finish(E.url), {
|
|
1213
1213
|
data: await W.data.arrayBuffer(),
|
|
1214
1214
|
cacheControl: W.cacheControl,
|
|
1215
1215
|
expires: W.expires
|
|
1216
1216
|
};
|
|
1217
1217
|
} catch (W) {
|
|
1218
|
-
throw at = it.error(
|
|
1218
|
+
throw at = it.error(E.url), W;
|
|
1219
1219
|
} finally {
|
|
1220
1220
|
this.timingCallbacks.forEach((W) => W(at));
|
|
1221
1221
|
}
|
|
1222
|
-
}, this.contourProtocolV4 = async (
|
|
1222
|
+
}, this.contourProtocolV4 = async (E, Z) => {
|
|
1223
1223
|
const K = new o.T("main");
|
|
1224
1224
|
let et;
|
|
1225
1225
|
try {
|
|
1226
|
-
const [N, it, at] = this.parseUrl(
|
|
1227
|
-
return et = K.finish(
|
|
1226
|
+
const [N, it, at] = this.parseUrl(E.url), W = o.a(E.url), xt = await this.manager.fetchContourTile(N, it, at, o.g(W, N), Z, K);
|
|
1227
|
+
return et = K.finish(E.url), { data: xt.arrayBuffer };
|
|
1228
1228
|
} catch (N) {
|
|
1229
|
-
throw et = K.error(
|
|
1229
|
+
throw et = K.error(E.url), N;
|
|
1230
1230
|
} finally {
|
|
1231
1231
|
this.timingCallbacks.forEach((N) => N(et));
|
|
1232
1232
|
}
|
|
1233
|
-
}, this.contourProtocol =
|
|
1234
|
-
let G =
|
|
1235
|
-
for (;
|
|
1236
|
-
G =
|
|
1237
|
-
|
|
1238
|
-
const B = ct ?
|
|
1239
|
-
this.manager = new B(
|
|
1233
|
+
}, this.contourProtocol = S(this.contourProtocolV4), this.sharedDemProtocol = S(this.sharedDemProtocolV4), this.contourProtocolUrl = (E) => `${this.contourProtocolUrlBase}?${o.e(E)}`;
|
|
1234
|
+
let G = D, U = 1;
|
|
1235
|
+
for (; O.has(G); )
|
|
1236
|
+
G = D + U++;
|
|
1237
|
+
O.add(G), this.sharedDemProtocolId = `${G}-shared`, this.contourProtocolId = `${G}-contour`, this.sharedDemProtocolUrl = `${this.sharedDemProtocolId}://{z}/{x}/{y}`, this.contourProtocolUrlBase = `${this.contourProtocolId}://{z}/{x}/{y}`;
|
|
1238
|
+
const B = ct ? z : o.L;
|
|
1239
|
+
this.manager = new B(b, v, M, j, tt, H);
|
|
1240
1240
|
}
|
|
1241
|
-
getDemTile(
|
|
1242
|
-
return this.manager.fetchAndParseTile(
|
|
1241
|
+
getDemTile(b, v, D, M) {
|
|
1242
|
+
return this.manager.fetchAndParseTile(b, v, D, M || new AbortController());
|
|
1243
1243
|
}
|
|
1244
|
-
parseUrl(
|
|
1245
|
-
const [, v,
|
|
1246
|
-
return [Number(v), Number(
|
|
1244
|
+
parseUrl(b) {
|
|
1245
|
+
const [, v, D, M] = /\/\/(\d+)\/(\d+)\/(\d+)/.exec(b) || [];
|
|
1246
|
+
return [Number(v), Number(D), Number(M)];
|
|
1247
1247
|
}
|
|
1248
1248
|
}
|
|
1249
1249
|
return {
|
|
@@ -1253,10 +1253,10 @@ Mt(["./shared"], function(o) {
|
|
|
1253
1253
|
LocalDemManager: o.L,
|
|
1254
1254
|
decodeParsedImage: o.c,
|
|
1255
1255
|
set workerUrl(p) {
|
|
1256
|
-
|
|
1256
|
+
a.workerUrl = p;
|
|
1257
1257
|
},
|
|
1258
1258
|
get workerUrl() {
|
|
1259
|
-
return
|
|
1259
|
+
return a.workerUrl;
|
|
1260
1260
|
}
|
|
1261
1261
|
};
|
|
1262
1262
|
});
|
|
@@ -1266,77 +1266,77 @@ function Xe(o) {
|
|
|
1266
1266
|
}
|
|
1267
1267
|
function Ne(o) {
|
|
1268
1268
|
if (o == null) return Xe;
|
|
1269
|
-
var
|
|
1270
|
-
return function(
|
|
1271
|
-
|
|
1272
|
-
var A = 2,
|
|
1273
|
-
for (p[0] = (
|
|
1269
|
+
var a, u, g = o.scale[0], y = o.scale[1], x = o.translate[0], z = o.translate[1];
|
|
1270
|
+
return function(S, O) {
|
|
1271
|
+
O || (a = u = 0);
|
|
1272
|
+
var A = 2, _ = S.length, p = new Array(_);
|
|
1273
|
+
for (p[0] = (a += S[0]) * g + x, p[1] = (u += S[1]) * y + z; A < _; ) p[A] = S[A], ++A;
|
|
1274
1274
|
return p;
|
|
1275
1275
|
};
|
|
1276
1276
|
}
|
|
1277
|
-
function Ve(o,
|
|
1278
|
-
for (var u, g = o.length, y = g -
|
|
1277
|
+
function Ve(o, a) {
|
|
1278
|
+
for (var u, g = o.length, y = g - a; y < --g; ) u = o[y], o[y++] = o[g], o[g] = u;
|
|
1279
1279
|
}
|
|
1280
|
-
function $t(o,
|
|
1281
|
-
return typeof
|
|
1280
|
+
function $t(o, a) {
|
|
1281
|
+
return typeof a == "string" && (a = o.objects[a]), a.type === "GeometryCollection" ? { type: "FeatureCollection", features: a.geometries.map(function(u) {
|
|
1282
1282
|
return Kt(o, u);
|
|
1283
|
-
}) } : Kt(o,
|
|
1283
|
+
}) } : Kt(o, a);
|
|
1284
1284
|
}
|
|
1285
|
-
function Kt(o,
|
|
1286
|
-
var u =
|
|
1285
|
+
function Kt(o, a) {
|
|
1286
|
+
var u = a.id, g = a.bbox, y = a.properties == null ? {} : a.properties, x = Ue(o, a);
|
|
1287
1287
|
return u == null && g == null ? { type: "Feature", properties: y, geometry: x } : g == null ? { type: "Feature", id: u, properties: y, geometry: x } : { type: "Feature", id: u, bbox: g, properties: y, geometry: x };
|
|
1288
1288
|
}
|
|
1289
|
-
function Ue(o,
|
|
1289
|
+
function Ue(o, a) {
|
|
1290
1290
|
var u = Ne(o.transform), g = o.arcs;
|
|
1291
|
-
function y(
|
|
1291
|
+
function y(_, p) {
|
|
1292
1292
|
p.length && p.pop();
|
|
1293
|
-
for (var
|
|
1294
|
-
p.push(u(
|
|
1295
|
-
|
|
1293
|
+
for (var b = g[_ < 0 ? ~_ : _], v = 0, D = b.length; v < D; ++v)
|
|
1294
|
+
p.push(u(b[v], v));
|
|
1295
|
+
_ < 0 && Ve(p, D);
|
|
1296
1296
|
}
|
|
1297
|
-
function x(
|
|
1298
|
-
return u(
|
|
1297
|
+
function x(_) {
|
|
1298
|
+
return u(_);
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1301
|
-
for (var p = [],
|
|
1300
|
+
function z(_) {
|
|
1301
|
+
for (var p = [], b = 0, v = _.length; b < v; ++b) y(_[b], p);
|
|
1302
1302
|
return p.length < 2 && p.push(p[0]), p;
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1305
|
-
for (var p =
|
|
1304
|
+
function S(_) {
|
|
1305
|
+
for (var p = z(_); p.length < 4; ) p.push(p[0]);
|
|
1306
1306
|
return p;
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1309
|
-
return
|
|
1308
|
+
function O(_) {
|
|
1309
|
+
return _.map(S);
|
|
1310
1310
|
}
|
|
1311
|
-
function A(
|
|
1312
|
-
var p =
|
|
1311
|
+
function A(_) {
|
|
1312
|
+
var p = _.type, b;
|
|
1313
1313
|
switch (p) {
|
|
1314
1314
|
case "GeometryCollection":
|
|
1315
|
-
return { type: p, geometries:
|
|
1315
|
+
return { type: p, geometries: _.geometries.map(A) };
|
|
1316
1316
|
case "Point":
|
|
1317
|
-
|
|
1317
|
+
b = x(_.coordinates);
|
|
1318
1318
|
break;
|
|
1319
1319
|
case "MultiPoint":
|
|
1320
|
-
|
|
1320
|
+
b = _.coordinates.map(x);
|
|
1321
1321
|
break;
|
|
1322
1322
|
case "LineString":
|
|
1323
|
-
|
|
1323
|
+
b = z(_.arcs);
|
|
1324
1324
|
break;
|
|
1325
1325
|
case "MultiLineString":
|
|
1326
|
-
|
|
1326
|
+
b = _.arcs.map(z);
|
|
1327
1327
|
break;
|
|
1328
1328
|
case "Polygon":
|
|
1329
|
-
|
|
1329
|
+
b = O(_.arcs);
|
|
1330
1330
|
break;
|
|
1331
1331
|
case "MultiPolygon":
|
|
1332
|
-
|
|
1332
|
+
b = _.arcs.map(O);
|
|
1333
1333
|
break;
|
|
1334
1334
|
default:
|
|
1335
1335
|
return null;
|
|
1336
1336
|
}
|
|
1337
|
-
return { type: p, coordinates:
|
|
1337
|
+
return { type: p, coordinates: b };
|
|
1338
1338
|
}
|
|
1339
|
-
return A(
|
|
1339
|
+
return A(a);
|
|
1340
1340
|
}
|
|
1341
1341
|
const We = {
|
|
1342
1342
|
airspaceStroke: "#AAB7B8",
|
|
@@ -1351,7 +1351,7 @@ const We = {
|
|
|
1351
1351
|
runway: "#333333"
|
|
1352
1352
|
};
|
|
1353
1353
|
function je() {
|
|
1354
|
-
const o = "navdata",
|
|
1354
|
+
const o = "navdata", a = We;
|
|
1355
1355
|
return [
|
|
1356
1356
|
{
|
|
1357
1357
|
id: "landLaye",
|
|
@@ -1408,7 +1408,7 @@ function je() {
|
|
|
1408
1408
|
"source-layer": "fir",
|
|
1409
1409
|
minzoom: 2,
|
|
1410
1410
|
// layout: { "line-cap": "butt", "line-join": "miter", "line-miter-limit": 0 },
|
|
1411
|
-
paint: { "line-color":
|
|
1411
|
+
paint: { "line-color": a.airspaceStroke, "line-opacity": ["interpolate", ["linear"], ["zoom"], 2, 0, 2.7, 0.8, 9, 0.8, 10, 0.5], "line-width": 0.5, "line-dasharray": [4.2, 4] }
|
|
1412
1412
|
},
|
|
1413
1413
|
{
|
|
1414
1414
|
id: "fir_line_dash",
|
|
@@ -1417,7 +1417,7 @@ function je() {
|
|
|
1417
1417
|
"source-layer": "fir",
|
|
1418
1418
|
minzoom: 5,
|
|
1419
1419
|
layout: { "line-miter-limit": 0, "line-cap": "butt", "line-join": "miter" },
|
|
1420
|
-
paint: { "line-color":
|
|
1420
|
+
paint: { "line-color": a.airspaceStroke, "line-opacity": ["interpolate", ["linear"], ["zoom"], 5, 0, 5.5, 0.8, 9, 0.8, 10, 0.5], "line-width": 6, "line-dasharray": [0.2, 5] }
|
|
1421
1421
|
},
|
|
1422
1422
|
{
|
|
1423
1423
|
id: "fir-label-lineside",
|
|
@@ -1426,7 +1426,7 @@ function je() {
|
|
|
1426
1426
|
"source-layer": "fir",
|
|
1427
1427
|
minzoom: 4,
|
|
1428
1428
|
layout: { "text-field": ["concat", ["get", "TXT_NAME"], "/", ["get", "CODE_ID"], "/", ["get", "CODE_TYPE"]], "text-size": 10, "symbol-placement": "line", "text-max-width": 8, "text-offset": [0, 1], "text-letter-spacing": 0.05, "text-optional": !0 },
|
|
1429
|
-
paint: { "text-color":
|
|
1429
|
+
paint: { "text-color": a.airspaceStroke }
|
|
1430
1430
|
},
|
|
1431
1431
|
{
|
|
1432
1432
|
id: "fir-label",
|
|
@@ -1441,7 +1441,7 @@ function je() {
|
|
|
1441
1441
|
"text-max-width": 8
|
|
1442
1442
|
},
|
|
1443
1443
|
paint: {
|
|
1444
|
-
"text-color":
|
|
1444
|
+
"text-color": a.airspaceStroke,
|
|
1445
1445
|
"text-opacity": ["interpolate", ["linear"], ["zoom"], 3, 0.85, 8, 0.7, 12, 0.5]
|
|
1446
1446
|
}
|
|
1447
1447
|
},
|
|
@@ -1474,7 +1474,7 @@ function je() {
|
|
|
1474
1474
|
type: "line",
|
|
1475
1475
|
source: o,
|
|
1476
1476
|
"source-layer": "restricted",
|
|
1477
|
-
paint: { "line-color":
|
|
1477
|
+
paint: { "line-color": "#FAD7A0", "line-width": 1, "line-dasharray": [2, 2], "line-opacity": ["interpolate", ["linear"], ["zoom"], 4, 0.5, 8, 1] }
|
|
1478
1478
|
},
|
|
1479
1479
|
{
|
|
1480
1480
|
id: "restricted-label",
|
|
@@ -1483,7 +1483,7 @@ function je() {
|
|
|
1483
1483
|
"source-layer": "restricted",
|
|
1484
1484
|
minzoom: 6,
|
|
1485
1485
|
layout: { "text-field": ["concat", ["get", "TXT_NAME"], "/", ["get", "CODE_ID"], "/", ["get", "CODE_TYPE"]], "text-letter-spacing": 0.1, "text-size": 10, "symbol-placement": "line", "text-max-width": 8, "text-offset": [0, 1] },
|
|
1486
|
-
paint: { "text-color":
|
|
1486
|
+
paint: { "text-color": a.restrictedStroke }
|
|
1487
1487
|
},
|
|
1488
1488
|
{
|
|
1489
1489
|
id: "controlled-fill",
|
|
@@ -1499,7 +1499,7 @@ function je() {
|
|
|
1499
1499
|
["!=", ["get", "CODE_TYPE"], "TRSA"]
|
|
1500
1500
|
],
|
|
1501
1501
|
paint: {
|
|
1502
|
-
"fill-color":
|
|
1502
|
+
"fill-color": a.controlledFill,
|
|
1503
1503
|
"fill-opacity": [
|
|
1504
1504
|
"interpolate",
|
|
1505
1505
|
[
|
|
@@ -1527,7 +1527,7 @@ function je() {
|
|
|
1527
1527
|
["!=", ["get", "CODE_TYPE"], "TRSA"]
|
|
1528
1528
|
],
|
|
1529
1529
|
paint: {
|
|
1530
|
-
"line-color":
|
|
1530
|
+
"line-color": a.controlledStroke,
|
|
1531
1531
|
"line-width": 1,
|
|
1532
1532
|
"line-opacity": ["interpolate", ["linear"], ["zoom"], 4, 0.5, 8, 1],
|
|
1533
1533
|
"line-dasharray": [
|
|
@@ -1549,7 +1549,7 @@ function je() {
|
|
|
1549
1549
|
"source-layer": "controlled",
|
|
1550
1550
|
minzoom: 6,
|
|
1551
1551
|
layout: { "text-field": ["concat", ["get", "TXT_NAME"], "/", ["get", "CODE_ID"], "/", ["get", "CODE_TYPE"]], "text-size": 10, "symbol-placement": "line", "text-letter-spacing": 0.2, "text-max-width": 8, "text-offset": [0, 1] },
|
|
1552
|
-
paint: { "text-color":
|
|
1552
|
+
paint: { "text-color": a.controlledStroke }
|
|
1553
1553
|
},
|
|
1554
1554
|
{
|
|
1555
1555
|
id: "segment-line",
|
|
@@ -1558,7 +1558,7 @@ function je() {
|
|
|
1558
1558
|
"source-layer": "segment",
|
|
1559
1559
|
minzoom: 5,
|
|
1560
1560
|
paint: {
|
|
1561
|
-
"line-color": ["case", ["==", ["get", "HAS_REMARK"], 1], "#E8A020",
|
|
1561
|
+
"line-color": ["case", ["==", ["get", "HAS_REMARK"], 1], "#E8A020", a.segment],
|
|
1562
1562
|
"line-width": ["interpolate", ["linear"], ["zoom"], 5, 0.2, 8, 0.8],
|
|
1563
1563
|
"line-blur": 0,
|
|
1564
1564
|
"line-opacity": [
|
|
@@ -1634,7 +1634,7 @@ function je() {
|
|
|
1634
1634
|
paint: {
|
|
1635
1635
|
"text-halo-color": "#ffffff",
|
|
1636
1636
|
"text-halo-width": 0.1,
|
|
1637
|
-
"icon-color":
|
|
1637
|
+
"icon-color": a.segment,
|
|
1638
1638
|
"text-opacity": [
|
|
1639
1639
|
"interpolate",
|
|
1640
1640
|
[
|
|
@@ -1683,7 +1683,7 @@ function je() {
|
|
|
1683
1683
|
"text-offset": [0, -0.6],
|
|
1684
1684
|
"text-justify": "auto"
|
|
1685
1685
|
},
|
|
1686
|
-
paint: { "text-color":
|
|
1686
|
+
paint: { "text-color": a.segment }
|
|
1687
1687
|
},
|
|
1688
1688
|
{
|
|
1689
1689
|
id: "airport-circle",
|
|
@@ -1728,7 +1728,7 @@ function je() {
|
|
|
1728
1728
|
"case",
|
|
1729
1729
|
["has", "has_amm"],
|
|
1730
1730
|
"#4B2D6E",
|
|
1731
|
-
|
|
1731
|
+
a.airport
|
|
1732
1732
|
],
|
|
1733
1733
|
"icon-opacity": [
|
|
1734
1734
|
"interpolate",
|
|
@@ -1783,7 +1783,7 @@ function je() {
|
|
|
1783
1783
|
"case",
|
|
1784
1784
|
["has", "has_amm"],
|
|
1785
1785
|
"#4B2D6E",
|
|
1786
|
-
|
|
1786
|
+
a.airport
|
|
1787
1787
|
]
|
|
1788
1788
|
}
|
|
1789
1789
|
},
|
|
@@ -1796,7 +1796,7 @@ function je() {
|
|
|
1796
1796
|
minzoom: 4,
|
|
1797
1797
|
maxzoom: 11,
|
|
1798
1798
|
paint: {
|
|
1799
|
-
"line-color":
|
|
1799
|
+
"line-color": a.runway,
|
|
1800
1800
|
"line-width": ["interpolate", ["linear"], ["zoom"], 4, 1, 13, 10]
|
|
1801
1801
|
}
|
|
1802
1802
|
},
|
|
@@ -1809,7 +1809,7 @@ function je() {
|
|
|
1809
1809
|
minzoom: 4,
|
|
1810
1810
|
maxzoom: 11,
|
|
1811
1811
|
paint: {
|
|
1812
|
-
"line-color":
|
|
1812
|
+
"line-color": a.runway,
|
|
1813
1813
|
"line-width": ["interpolate", ["linear"], ["zoom"], 4, 1, 10, 4],
|
|
1814
1814
|
"line-opacity": ["interpolate", ["linear"], ["zoom"], 10.5, 1, 11, 0]
|
|
1815
1815
|
}
|
|
@@ -1828,7 +1828,7 @@ function je() {
|
|
|
1828
1828
|
"text-optional": !0
|
|
1829
1829
|
},
|
|
1830
1830
|
paint: {
|
|
1831
|
-
"text-color":
|
|
1831
|
+
"text-color": a.runway,
|
|
1832
1832
|
"text-halo-width": 1,
|
|
1833
1833
|
"text-opacity": ["interpolate", ["linear"], ["zoom"], 10.5, 1, 11, 0]
|
|
1834
1834
|
}
|
|
@@ -1880,7 +1880,7 @@ function je() {
|
|
|
1880
1880
|
"source-layer": "vor",
|
|
1881
1881
|
minzoom: 5,
|
|
1882
1882
|
layout: { "text-field": ["get", "CODE_ID"], "text-size": 10, "text-anchor": "bottom", "text-offset": [0, -0.8] },
|
|
1883
|
-
paint: { "text-color":
|
|
1883
|
+
paint: { "text-color": a.vor, "text-halo-color": "#ffffff", "text-halo-width": 1 }
|
|
1884
1884
|
},
|
|
1885
1885
|
{
|
|
1886
1886
|
id: "ndb-symbol",
|
|
@@ -1900,7 +1900,7 @@ function je() {
|
|
|
1900
1900
|
"CODE_ID"
|
|
1901
1901
|
],
|
|
1902
1902
|
{
|
|
1903
|
-
"text-color":
|
|
1903
|
+
"text-color": a.ndb,
|
|
1904
1904
|
"font-scale": 1.1
|
|
1905
1905
|
},
|
|
1906
1906
|
"",
|
|
@@ -1914,7 +1914,7 @@ function je() {
|
|
|
1914
1914
|
""
|
|
1915
1915
|
],
|
|
1916
1916
|
{
|
|
1917
|
-
"text-color":
|
|
1917
|
+
"text-color": a.ndb,
|
|
1918
1918
|
"font-scale": 0.95
|
|
1919
1919
|
}
|
|
1920
1920
|
],
|
|
@@ -1926,11 +1926,11 @@ function je() {
|
|
|
1926
1926
|
"text-anchor": "top"
|
|
1927
1927
|
},
|
|
1928
1928
|
paint: {
|
|
1929
|
-
"text-color":
|
|
1929
|
+
"text-color": a.ndb,
|
|
1930
1930
|
"text-halo-color": "#ffffff",
|
|
1931
1931
|
"text-halo-width": 0.5,
|
|
1932
1932
|
"text-halo-blur": 1,
|
|
1933
|
-
"icon-color":
|
|
1933
|
+
"icon-color": a.ndb,
|
|
1934
1934
|
"text-opacity": [
|
|
1935
1935
|
"interpolate",
|
|
1936
1936
|
[
|
|
@@ -1993,8 +1993,8 @@ function je() {
|
|
|
1993
1993
|
"text-justify": "auto"
|
|
1994
1994
|
},
|
|
1995
1995
|
paint: {
|
|
1996
|
-
"icon-color":
|
|
1997
|
-
"text-color":
|
|
1996
|
+
"icon-color": a.waypoint,
|
|
1997
|
+
"text-color": a.waypoint,
|
|
1998
1998
|
"text-halo-color": "#ffffff",
|
|
1999
1999
|
"text-halo-width": 1,
|
|
2000
2000
|
"icon-halo-color": "rgba(0,0,0,0)",
|
|
@@ -2041,8 +2041,8 @@ function je() {
|
|
|
2041
2041
|
minzoom: 7,
|
|
2042
2042
|
layout: { "icon-image": ["case", ["==", ["get", "report_type"], "C"], "designate_point_inway", "designate_point_notinway"], "icon-size": 0.6, "icon-allow-overlap": !0, "icon-ignore-placement": !0, "text-field": ["get", "CODE_ID"], "text-size": 9, "text-variable-anchor-offset": ["bottom", [0, -0.6], "top", [0, 0.6], "right", [-0.6, 0], "left", [0.6, 0], "bottom-right", [-0.4, -0.4], "bottom-left", [0.4, -0.4], "top-right", [-0.4, 0.4], "top-left", [0.4, 0.4]], "text-justify": "auto", "text-optional": !0 },
|
|
2043
2043
|
paint: {
|
|
2044
|
-
"icon-color":
|
|
2045
|
-
"text-color":
|
|
2044
|
+
"icon-color": a.waypoint,
|
|
2045
|
+
"text-color": a.waypoint,
|
|
2046
2046
|
"text-halo-color": "#ffffff",
|
|
2047
2047
|
"text-halo-width": 1,
|
|
2048
2048
|
"icon-opacity": [
|
|
@@ -2092,7 +2092,7 @@ const $e = {
|
|
|
2092
2092
|
runway: "#64748b"
|
|
2093
2093
|
};
|
|
2094
2094
|
function Ke() {
|
|
2095
|
-
const o = "navdata",
|
|
2095
|
+
const o = "navdata", a = $e;
|
|
2096
2096
|
return [
|
|
2097
2097
|
{
|
|
2098
2098
|
id: "landLaye",
|
|
@@ -2150,7 +2150,7 @@ function Ke() {
|
|
|
2150
2150
|
"source-layer": "fir",
|
|
2151
2151
|
minzoom: 2,
|
|
2152
2152
|
layout: { "line-cap": "butt", "line-join": "miter", "line-miter-limit": 0 },
|
|
2153
|
-
paint: { "line-color":
|
|
2153
|
+
paint: { "line-color": a.airspaceStroke, "line-opacity": ["interpolate", ["linear"], ["zoom"], 2, 0, 2.7, 0.8, 9, 0.8, 10, 0.5], "line-width": 0.8, "line-dasharray": [4.2, 4] }
|
|
2154
2154
|
},
|
|
2155
2155
|
{
|
|
2156
2156
|
id: "fir_line_dash",
|
|
@@ -2159,7 +2159,7 @@ function Ke() {
|
|
|
2159
2159
|
"source-layer": "fir",
|
|
2160
2160
|
minzoom: 5,
|
|
2161
2161
|
layout: { "line-miter-limit": 0, "line-cap": "butt", "line-join": "miter" },
|
|
2162
|
-
paint: { "line-color":
|
|
2162
|
+
paint: { "line-color": a.airspaceStroke, "line-opacity": ["interpolate", ["linear"], ["zoom"], 5, 0, 5.5, 0.8, 9, 0.8, 10, 0.5], "line-width": 5, "line-dasharray": [0.2, 5] }
|
|
2163
2163
|
},
|
|
2164
2164
|
{
|
|
2165
2165
|
id: "fir-label-lineside",
|
|
@@ -2168,7 +2168,7 @@ function Ke() {
|
|
|
2168
2168
|
"source-layer": "fir",
|
|
2169
2169
|
minzoom: 4,
|
|
2170
2170
|
layout: { "text-field": ["concat", ["get", "TXT_NAME"], "/", ["get", "CODE_ID"], "/", ["get", "CODE_TYPE"]], "text-size": 10, "symbol-placement": "line", "text-max-width": 8, "text-offset": [0, 1], "text-letter-spacing": 0.05, "text-optional": !0 },
|
|
2171
|
-
paint: { "text-color":
|
|
2171
|
+
paint: { "text-color": a.airspaceStroke, "text-halo-color": "#0f172a", "text-halo-width": 1 }
|
|
2172
2172
|
},
|
|
2173
2173
|
{
|
|
2174
2174
|
id: "fir-label",
|
|
@@ -2183,7 +2183,7 @@ function Ke() {
|
|
|
2183
2183
|
"text-max-width": 8
|
|
2184
2184
|
},
|
|
2185
2185
|
paint: {
|
|
2186
|
-
"text-color":
|
|
2186
|
+
"text-color": a.airspaceStroke,
|
|
2187
2187
|
"text-halo-color": "#0f172a",
|
|
2188
2188
|
"text-halo-width": 1.5,
|
|
2189
2189
|
"text-opacity": ["interpolate", ["linear"], ["zoom"], 3, 0.85, 8, 0.7, 12, 0.5]
|
|
@@ -2202,7 +2202,7 @@ function Ke() {
|
|
|
2202
2202
|
type: "line",
|
|
2203
2203
|
source: o,
|
|
2204
2204
|
"source-layer": "restricted",
|
|
2205
|
-
paint: { "line-color":
|
|
2205
|
+
paint: { "line-color": a.restrictedStroke, "line-width": 1, "line-dasharray": [2, 2], "line-opacity": ["interpolate", ["linear"], ["zoom"], 4, 0.6, 8, 1] }
|
|
2206
2206
|
},
|
|
2207
2207
|
{
|
|
2208
2208
|
id: "restricted-label",
|
|
@@ -2211,7 +2211,7 @@ function Ke() {
|
|
|
2211
2211
|
"source-layer": "restricted",
|
|
2212
2212
|
minzoom: 6,
|
|
2213
2213
|
layout: { "text-field": ["coalesce", ["get", "TXT_NAME"], ["get", "CODE_ID"]], "text-size": 10, "symbol-placement": "line", "text-max-width": 8, "text-offset": [0, 1] },
|
|
2214
|
-
paint: { "text-color":
|
|
2214
|
+
paint: { "text-color": a.restrictedStroke, "text-halo-color": "#0f172a", "text-halo-width": 1 }
|
|
2215
2215
|
},
|
|
2216
2216
|
{
|
|
2217
2217
|
id: "controlled-fill",
|
|
@@ -2219,14 +2219,14 @@ function Ke() {
|
|
|
2219
2219
|
source: o,
|
|
2220
2220
|
"source-layer": "controlled-fill",
|
|
2221
2221
|
minzoom: 4,
|
|
2222
|
-
paint: { "fill-color":
|
|
2222
|
+
paint: { "fill-color": a.controlledFill, "fill-opacity": 0.03 }
|
|
2223
2223
|
},
|
|
2224
2224
|
{
|
|
2225
2225
|
id: "controlled-stroke",
|
|
2226
2226
|
type: "line",
|
|
2227
2227
|
source: o,
|
|
2228
2228
|
"source-layer": "controlled",
|
|
2229
|
-
paint: { "line-color":
|
|
2229
|
+
paint: { "line-color": a.controlledStroke, "line-width": 1, "line-opacity": ["interpolate", ["linear"], ["zoom"], 4, 0.6, 8, 1], "line-dasharray": [2, 2] }
|
|
2230
2230
|
},
|
|
2231
2231
|
{
|
|
2232
2232
|
id: "controlled-label",
|
|
@@ -2235,7 +2235,7 @@ function Ke() {
|
|
|
2235
2235
|
"source-layer": "controlled",
|
|
2236
2236
|
minzoom: 6,
|
|
2237
2237
|
layout: { "text-field": ["coalesce", ["get", "TXT_NAME"], ["get", "CODE_ID"]], "text-size": 10, "symbol-placement": "point", "text-max-width": 8 },
|
|
2238
|
-
paint: { "text-color":
|
|
2238
|
+
paint: { "text-color": a.controlledStroke, "text-halo-color": "#0f172a", "text-halo-width": 1.5 }
|
|
2239
2239
|
},
|
|
2240
2240
|
{
|
|
2241
2241
|
id: "segment-line",
|
|
@@ -2244,7 +2244,7 @@ function Ke() {
|
|
|
2244
2244
|
"source-layer": "segment",
|
|
2245
2245
|
minzoom: 5,
|
|
2246
2246
|
paint: {
|
|
2247
|
-
"line-color": ["case", ["==", ["get", "HAS_REMARK"], 1], "#fbbf24",
|
|
2247
|
+
"line-color": ["case", ["==", ["get", "HAS_REMARK"], 1], "#fbbf24", a.segment],
|
|
2248
2248
|
"line-width": ["interpolate", ["linear"], ["zoom"], 5, 0.2, 8, 0.8],
|
|
2249
2249
|
"line-blur": 0,
|
|
2250
2250
|
"line-opacity": [
|
|
@@ -2316,7 +2316,7 @@ function Ke() {
|
|
|
2316
2316
|
"text-size": ["interpolate", ["linear"], ["zoom"], 6, 9, 10, 10],
|
|
2317
2317
|
"icon-text-fit-padding": [0, 3, 0, 3]
|
|
2318
2318
|
},
|
|
2319
|
-
paint: { "icon-color":
|
|
2319
|
+
paint: { "icon-color": a.segment }
|
|
2320
2320
|
},
|
|
2321
2321
|
{
|
|
2322
2322
|
id: "segment-radial",
|
|
@@ -2325,7 +2325,7 @@ function Ke() {
|
|
|
2325
2325
|
"source-layer": "segment-radial",
|
|
2326
2326
|
minzoom: 10,
|
|
2327
2327
|
layout: { "text-field": ["concat", ["get", "bearing"], "°"], "text-size": 9, "text-rotate": ["to-number", ["get", "line_angle"], 0], "text-rotation-alignment": "map", "text-allow-overlap": !0, "text-ignore-placement": !0, "text-offset": [0, -1] },
|
|
2328
|
-
paint: { "text-color":
|
|
2328
|
+
paint: { "text-color": a.segment, "text-halo-color": "#0f172a", "text-halo-width": 1 }
|
|
2329
2329
|
},
|
|
2330
2330
|
{
|
|
2331
2331
|
id: "airport-circle",
|
|
@@ -2370,7 +2370,7 @@ function Ke() {
|
|
|
2370
2370
|
"case",
|
|
2371
2371
|
["has", "has_amm"],
|
|
2372
2372
|
"#4B2D6E",
|
|
2373
|
-
|
|
2373
|
+
a.airport
|
|
2374
2374
|
],
|
|
2375
2375
|
"icon-opacity": [
|
|
2376
2376
|
"interpolate",
|
|
@@ -2436,7 +2436,7 @@ function Ke() {
|
|
|
2436
2436
|
"source-layer": "runway",
|
|
2437
2437
|
filter: ["!", ["has", "has_amm"]],
|
|
2438
2438
|
minzoom: 4,
|
|
2439
|
-
paint: { "line-color":
|
|
2439
|
+
paint: { "line-color": a.runway, "line-width": ["interpolate", ["linear"], ["zoom"], 4, 1, 10, 3] }
|
|
2440
2440
|
},
|
|
2441
2441
|
{
|
|
2442
2442
|
id: "runway-line-amm",
|
|
@@ -2445,7 +2445,7 @@ function Ke() {
|
|
|
2445
2445
|
"source-layer": "runway",
|
|
2446
2446
|
filter: ["has", "has_amm"],
|
|
2447
2447
|
minzoom: 4,
|
|
2448
|
-
paint: { "line-color":
|
|
2448
|
+
paint: { "line-color": a.runway, "line-width": ["interpolate", ["linear"], ["zoom"], 4, 1, 10, 3], "line-opacity": ["interpolate", ["linear"], ["zoom"], 10.5, 1, 11, 0] }
|
|
2449
2449
|
},
|
|
2450
2450
|
{
|
|
2451
2451
|
id: "runway-label",
|
|
@@ -2454,7 +2454,7 @@ function Ke() {
|
|
|
2454
2454
|
"source-layer": "runway",
|
|
2455
2455
|
minzoom: 10,
|
|
2456
2456
|
layout: { "text-field": ["concat", ["to-string", ["get", "VAL_LEN"]], "×", ["to-string", ["get", "VAL_WID"]], "m"], "text-size": 10, "text-font": ["Noto Sans Regular"], "symbol-placement": "line-center", "text-rotation-alignment": "map", "text-optional": !0 },
|
|
2457
|
-
paint: { "text-color":
|
|
2457
|
+
paint: { "text-color": a.runway, "text-halo-color": "#0f172a", "text-halo-width": 1, "text-opacity": ["interpolate", ["linear"], ["zoom"], 10.5, 1, 11, 0] }
|
|
2458
2458
|
},
|
|
2459
2459
|
{
|
|
2460
2460
|
id: "vor-symbol",
|
|
@@ -2471,7 +2471,7 @@ function Ke() {
|
|
|
2471
2471
|
"source-layer": "vor",
|
|
2472
2472
|
minzoom: 5,
|
|
2473
2473
|
layout: { "text-field": ["get", "CODE_ID"], "text-size": 10, "text-anchor": "bottom", "text-offset": [0, -0.8] },
|
|
2474
|
-
paint: { "text-color":
|
|
2474
|
+
paint: { "text-color": a.vor, "text-halo-color": "#0f172a", "text-halo-width": 1 }
|
|
2475
2475
|
},
|
|
2476
2476
|
{
|
|
2477
2477
|
id: "ndb-symbol",
|
|
@@ -2481,7 +2481,7 @@ function Ke() {
|
|
|
2481
2481
|
"source-layer": "ndb",
|
|
2482
2482
|
layout: { "icon-image": "ndb-inway", "icon-size": ["interpolate", ["linear"], ["zoom"], 6, 0.5, 10, 1], "symbol-z-order": "viewport-y", "text-field": ["concat", ["get", "CODE_ID"], `
|
|
2483
2483
|
`, ["get", "VAL_FREQ"], "kHz"], "text-size": 10, "text-offset": [0, 1.4], "text-letter-spacing": 0.05, "text-optional": !0, "icon-allow-overlap": !0 },
|
|
2484
|
-
paint: { "text-color":
|
|
2484
|
+
paint: { "text-color": a.ndb, "text-halo-color": "#0f172a", "text-halo-width": 1, "icon-color": a.ndb }
|
|
2485
2485
|
},
|
|
2486
2486
|
{
|
|
2487
2487
|
id: "waypoint-symbol",
|
|
@@ -2490,7 +2490,7 @@ function Ke() {
|
|
|
2490
2490
|
"source-layer": "waypoint",
|
|
2491
2491
|
minzoom: 5,
|
|
2492
2492
|
layout: { "icon-image": ["case", ["==", ["get", "report_type"], "C"], "waypoint-compusory", "waypoint"], "icon-size": 0.6, "icon-allow-overlap": !0, "icon-ignore-placement": !0, "text-field": ["get", "CODE_ID"], "text-size": 9, "text-variable-anchor-offset": ["bottom", [0, -0.6], "top", [0, 0.6], "right", [-0.6, 0], "left", [0.6, 0], "bottom-right", [-0.4, -0.4], "bottom-left", [0.4, -0.4], "top-right", [-0.4, 0.4], "top-left", [0.4, 0.4]], "text-justify": "auto", "text-optional": !0 },
|
|
2493
|
-
paint: { "icon-color":
|
|
2493
|
+
paint: { "icon-color": a.waypoint, "text-color": a.waypoint, "text-halo-color": "#0f172a", "text-halo-width": 1 }
|
|
2494
2494
|
},
|
|
2495
2495
|
{
|
|
2496
2496
|
id: "waypoint-off-airway-symbol",
|
|
@@ -2499,7 +2499,7 @@ function Ke() {
|
|
|
2499
2499
|
"source-layer": "waypoint-off-airway",
|
|
2500
2500
|
minzoom: 7,
|
|
2501
2501
|
layout: { "icon-image": ["case", ["==", ["get", "report_type"], "C"], "designate_point_inway", "designate_point_notinway"], "icon-size": 0.6, "icon-allow-overlap": !0, "icon-ignore-placement": !0, "text-field": ["get", "CODE_ID"], "text-size": 9, "text-variable-anchor-offset": ["bottom", [0, -0.6], "top", [0, 0.6], "right", [-0.6, 0], "left", [0.6, 0], "bottom-right", [-0.4, -0.4], "bottom-left", [0.4, -0.4], "top-right", [-0.4, 0.4], "top-left", [0.4, 0.4]], "text-justify": "auto", "text-optional": !0 },
|
|
2502
|
-
paint: { "icon-color":
|
|
2502
|
+
paint: { "icon-color": a.waypoint, "text-color": a.waypoint, "text-halo-color": "#0f172a", "text-halo-width": 1 }
|
|
2503
2503
|
}
|
|
2504
2504
|
];
|
|
2505
2505
|
}
|
|
@@ -2549,7 +2549,7 @@ const Ct = {
|
|
|
2549
2549
|
hotspot: "#ea580c"
|
|
2550
2550
|
};
|
|
2551
2551
|
function He(o = "amm") {
|
|
2552
|
-
const
|
|
2552
|
+
const a = Ye;
|
|
2553
2553
|
return [
|
|
2554
2554
|
// ── 机场边界轮廓(z11+)
|
|
2555
2555
|
{
|
|
@@ -2559,7 +2559,7 @@ function He(o = "amm") {
|
|
|
2559
2559
|
"source-layer": "amm-airport",
|
|
2560
2560
|
minzoom: 11,
|
|
2561
2561
|
paint: {
|
|
2562
|
-
"fill-color":
|
|
2562
|
+
"fill-color": a.airport,
|
|
2563
2563
|
"fill-opacity": 0.4
|
|
2564
2564
|
// 适当调高不透明度,确保白底可见
|
|
2565
2565
|
}
|
|
@@ -2571,7 +2571,7 @@ function He(o = "amm") {
|
|
|
2571
2571
|
"source-layer": "amm-airport",
|
|
2572
2572
|
minzoom: 11,
|
|
2573
2573
|
paint: {
|
|
2574
|
-
"line-color":
|
|
2574
|
+
"line-color": a.airport,
|
|
2575
2575
|
"line-width": 1
|
|
2576
2576
|
}
|
|
2577
2577
|
},
|
|
@@ -2583,7 +2583,7 @@ function He(o = "amm") {
|
|
|
2583
2583
|
"source-layer": "amm-runway",
|
|
2584
2584
|
minzoom: 11,
|
|
2585
2585
|
paint: {
|
|
2586
|
-
"fill-color":
|
|
2586
|
+
"fill-color": a.runway,
|
|
2587
2587
|
"fill-opacity": 0.9
|
|
2588
2588
|
}
|
|
2589
2589
|
},
|
|
@@ -2607,7 +2607,7 @@ function He(o = "amm") {
|
|
|
2607
2607
|
"source-layer": "amm-apron",
|
|
2608
2608
|
minzoom: 11,
|
|
2609
2609
|
paint: {
|
|
2610
|
-
"fill-color":
|
|
2610
|
+
"fill-color": a.apron,
|
|
2611
2611
|
"fill-opacity": 0.6
|
|
2612
2612
|
// 提高透明度浓度
|
|
2613
2613
|
}
|
|
@@ -2632,7 +2632,7 @@ function He(o = "amm") {
|
|
|
2632
2632
|
"source-layer": "amm-taxiway",
|
|
2633
2633
|
minzoom: 11,
|
|
2634
2634
|
paint: {
|
|
2635
|
-
"fill-color":
|
|
2635
|
+
"fill-color": a.taxiway,
|
|
2636
2636
|
"fill-opacity": 0.7
|
|
2637
2637
|
}
|
|
2638
2638
|
},
|
|
@@ -2644,7 +2644,7 @@ function He(o = "amm") {
|
|
|
2644
2644
|
"source-layer": "amm-taxiway-line",
|
|
2645
2645
|
minzoom: 11,
|
|
2646
2646
|
paint: {
|
|
2647
|
-
"line-color":
|
|
2647
|
+
"line-color": a.taxiwayLine,
|
|
2648
2648
|
"line-width": ["interpolate", ["linear"], ["zoom"], 15, 0.8, 18, 2]
|
|
2649
2649
|
}
|
|
2650
2650
|
},
|
|
@@ -2672,7 +2672,7 @@ function He(o = "amm") {
|
|
|
2672
2672
|
},
|
|
2673
2673
|
paint: {
|
|
2674
2674
|
"text-color": "#FFF",
|
|
2675
|
-
"icon-color":
|
|
2675
|
+
"icon-color": a.taxiwayLine
|
|
2676
2676
|
}
|
|
2677
2677
|
},
|
|
2678
2678
|
// ── 等待位(z11+)─────
|
|
@@ -2683,7 +2683,7 @@ function He(o = "amm") {
|
|
|
2683
2683
|
"source-layer": "amm-holding",
|
|
2684
2684
|
minzoom: 11,
|
|
2685
2685
|
paint: {
|
|
2686
|
-
"line-color":
|
|
2686
|
+
"line-color": a.holding,
|
|
2687
2687
|
"line-width": 1.5
|
|
2688
2688
|
}
|
|
2689
2689
|
},
|
|
@@ -2695,7 +2695,7 @@ function He(o = "amm") {
|
|
|
2695
2695
|
"source-layer": "amm-runway-marking",
|
|
2696
2696
|
minzoom: 13,
|
|
2697
2697
|
paint: {
|
|
2698
|
-
"fill-color":
|
|
2698
|
+
"fill-color": a.runwayMarking,
|
|
2699
2699
|
"fill-opacity": 0.9
|
|
2700
2700
|
}
|
|
2701
2701
|
},
|
|
@@ -2707,7 +2707,7 @@ function He(o = "amm") {
|
|
|
2707
2707
|
"source-layer": "amm-restricted",
|
|
2708
2708
|
minzoom: 11,
|
|
2709
2709
|
paint: {
|
|
2710
|
-
"fill-color":
|
|
2710
|
+
"fill-color": a.restricted,
|
|
2711
2711
|
"fill-opacity": 0.08
|
|
2712
2712
|
// 针对白底降低面纯度
|
|
2713
2713
|
}
|
|
@@ -2719,7 +2719,7 @@ function He(o = "amm") {
|
|
|
2719
2719
|
"source-layer": "amm-restricted",
|
|
2720
2720
|
minzoom: 11,
|
|
2721
2721
|
paint: {
|
|
2722
|
-
"line-color":
|
|
2722
|
+
"line-color": a.restricted,
|
|
2723
2723
|
"line-width": 1.5,
|
|
2724
2724
|
"line-dasharray": [4, 2]
|
|
2725
2725
|
}
|
|
@@ -2732,7 +2732,7 @@ function He(o = "amm") {
|
|
|
2732
2732
|
"source-layer": "amm-hotspot",
|
|
2733
2733
|
minzoom: 11,
|
|
2734
2734
|
paint: {
|
|
2735
|
-
"fill-color":
|
|
2735
|
+
"fill-color": a.hotspot,
|
|
2736
2736
|
"fill-opacity": 0.1
|
|
2737
2737
|
// 针对白底轻微淡化面
|
|
2738
2738
|
}
|
|
@@ -2744,7 +2744,7 @@ function He(o = "amm") {
|
|
|
2744
2744
|
"source-layer": "amm-hotspot",
|
|
2745
2745
|
minzoom: 11,
|
|
2746
2746
|
paint: {
|
|
2747
|
-
"line-color":
|
|
2747
|
+
"line-color": a.hotspot,
|
|
2748
2748
|
"line-width": 1.5
|
|
2749
2749
|
}
|
|
2750
2750
|
},
|
|
@@ -2756,7 +2756,7 @@ function He(o = "amm") {
|
|
|
2756
2756
|
"source-layer": "amm-runway-centerline",
|
|
2757
2757
|
minzoom: 11,
|
|
2758
2758
|
paint: {
|
|
2759
|
-
"line-color":
|
|
2759
|
+
"line-color": a.runwayCenterline,
|
|
2760
2760
|
"line-width": 1,
|
|
2761
2761
|
"line-dasharray": [6, 3]
|
|
2762
2762
|
}
|
|
@@ -2808,7 +2808,7 @@ function He(o = "amm") {
|
|
|
2808
2808
|
"source-layer": "amm-stand-line",
|
|
2809
2809
|
minzoom: 13,
|
|
2810
2810
|
paint: {
|
|
2811
|
-
"line-color":
|
|
2811
|
+
"line-color": a.standLine,
|
|
2812
2812
|
"line-width": 1
|
|
2813
2813
|
}
|
|
2814
2814
|
},
|
|
@@ -2847,7 +2847,7 @@ function He(o = "amm") {
|
|
|
2847
2847
|
"source-layer": "amm-stand",
|
|
2848
2848
|
minzoom: 12,
|
|
2849
2849
|
paint: {
|
|
2850
|
-
"circle-color":
|
|
2850
|
+
"circle-color": a.stand,
|
|
2851
2851
|
"circle-radius": 1.5
|
|
2852
2852
|
}
|
|
2853
2853
|
},
|
|
@@ -2866,7 +2866,7 @@ function He(o = "amm") {
|
|
|
2866
2866
|
"text-allow-overlap": !1
|
|
2867
2867
|
},
|
|
2868
2868
|
paint: {
|
|
2869
|
-
"text-color":
|
|
2869
|
+
"text-color": a.standLine
|
|
2870
2870
|
// 改为深墨绿字,白底/浅灰底上高可读
|
|
2871
2871
|
}
|
|
2872
2872
|
},
|
|
@@ -2988,16 +2988,16 @@ const Ze = {
|
|
|
2988
2988
|
hotspot: "#fb923c"
|
|
2989
2989
|
};
|
|
2990
2990
|
function Je(o = "amm") {
|
|
2991
|
-
const
|
|
2991
|
+
const a = Ze;
|
|
2992
2992
|
return [
|
|
2993
|
-
{ id: "amm-airport-fill", type: "fill", source: o, "source-layer": "amm-airport", minzoom: 11, paint: { "fill-color":
|
|
2993
|
+
{ id: "amm-airport-fill", type: "fill", source: o, "source-layer": "amm-airport", minzoom: 11, paint: { "fill-color": a.airport, "fill-opacity": 0.3 } },
|
|
2994
2994
|
{ id: "amm-airport-stroke", type: "line", source: o, "source-layer": "amm-airport", minzoom: 11, paint: { "line-color": "#475569", "line-width": 1 } },
|
|
2995
|
-
{ id: "amm-runway-fill", type: "fill", source: o, "source-layer": "amm-runway", minzoom: 11, paint: { "fill-color":
|
|
2995
|
+
{ id: "amm-runway-fill", type: "fill", source: o, "source-layer": "amm-runway", minzoom: 11, paint: { "fill-color": a.runway, "fill-opacity": 1 } },
|
|
2996
2996
|
{ id: "amm-runway-stroke", type: "line", source: o, "source-layer": "amm-runway", minzoom: 11, paint: { "line-color": "#64748b", "line-width": 0.5 } },
|
|
2997
|
-
{ id: "amm-apron-fill", type: "fill", source: o, "source-layer": "amm-apron", minzoom: 11, paint: { "fill-color":
|
|
2997
|
+
{ id: "amm-apron-fill", type: "fill", source: o, "source-layer": "amm-apron", minzoom: 11, paint: { "fill-color": a.apron, "fill-opacity": 1 } },
|
|
2998
2998
|
{ id: "amm-apron-stroke", type: "line", source: o, "source-layer": "amm-apron", minzoom: 11, paint: { "line-color": "#334155", "line-width": 0.5 } },
|
|
2999
|
-
{ id: "amm-taxiway-fill", type: "fill", source: o, "source-layer": "amm-taxiway", minzoom: 11, paint: { "fill-color":
|
|
3000
|
-
{ id: "amm-taxiway-line", type: "line", source: o, "source-layer": "amm-taxiway-line", minzoom: 11, paint: { "line-color":
|
|
2999
|
+
{ id: "amm-taxiway-fill", type: "fill", source: o, "source-layer": "amm-taxiway", minzoom: 11, paint: { "fill-color": a.taxiway, "fill-opacity": 0.8 } },
|
|
3000
|
+
{ id: "amm-taxiway-line", type: "line", source: o, "source-layer": "amm-taxiway-line", minzoom: 11, paint: { "line-color": a.taxiwayLine, "line-width": ["interpolate", ["linear"], ["zoom"], 15, 0.8, 18, 2] } },
|
|
3001
3001
|
{
|
|
3002
3002
|
id: "amm-taxiway-label",
|
|
3003
3003
|
type: "symbol",
|
|
@@ -3005,15 +3005,15 @@ function Je(o = "amm") {
|
|
|
3005
3005
|
"source-layer": "amm-taxiway-line",
|
|
3006
3006
|
minzoom: 14,
|
|
3007
3007
|
layout: { "text-field": ["get", "idlin"], "text-size": 10, "icon-image": "text_bg", "icon-text-fit": "both", "icon-text-fit-padding": [1, 2, 1, 2], "symbol-placement": "line", "text-keep-upright": !0, "text-allow-overlap": !1 },
|
|
3008
|
-
paint: { "text-color": "#0f172a", "icon-color":
|
|
3008
|
+
paint: { "text-color": "#0f172a", "icon-color": a.taxiwayLine }
|
|
3009
3009
|
},
|
|
3010
|
-
{ id: "amm-holding", type: "line", source: o, "source-layer": "amm-holding", minzoom: 11, paint: { "line-color":
|
|
3011
|
-
{ id: "amm-runway-marking", type: "fill", source: o, "source-layer": "amm-runway-marking", minzoom: 13, paint: { "fill-color":
|
|
3012
|
-
{ id: "amm-restricted-fill", type: "fill", source: o, "source-layer": "amm-restricted", minzoom: 11, paint: { "fill-color":
|
|
3013
|
-
{ id: "amm-restricted-stroke", type: "line", source: o, "source-layer": "amm-restricted", minzoom: 11, paint: { "line-color":
|
|
3014
|
-
{ id: "amm-hotspot-fill", type: "fill", source: o, "source-layer": "amm-hotspot", minzoom: 11, paint: { "fill-color":
|
|
3015
|
-
{ id: "amm-hotspot-stroke", type: "line", source: o, "source-layer": "amm-hotspot", minzoom: 11, paint: { "line-color":
|
|
3016
|
-
{ id: "amm-runway-centerline", type: "line", source: o, "source-layer": "amm-runway-centerline", minzoom: 11, paint: { "line-color":
|
|
3010
|
+
{ id: "amm-holding", type: "line", source: o, "source-layer": "amm-holding", minzoom: 11, paint: { "line-color": a.holding, "line-width": 1.5 } },
|
|
3011
|
+
{ id: "amm-runway-marking", type: "fill", source: o, "source-layer": "amm-runway-marking", minzoom: 13, paint: { "fill-color": a.runwayMarking, "fill-opacity": 0.8 } },
|
|
3012
|
+
{ id: "amm-restricted-fill", type: "fill", source: o, "source-layer": "amm-restricted", minzoom: 11, paint: { "fill-color": a.restricted, "fill-opacity": 0.12 } },
|
|
3013
|
+
{ id: "amm-restricted-stroke", type: "line", source: o, "source-layer": "amm-restricted", minzoom: 11, paint: { "line-color": a.restricted, "line-width": 1.2, "line-dasharray": [4, 2] } },
|
|
3014
|
+
{ id: "amm-hotspot-fill", type: "fill", source: o, "source-layer": "amm-hotspot", minzoom: 11, paint: { "fill-color": a.hotspot, "fill-opacity": 0.15 } },
|
|
3015
|
+
{ id: "amm-hotspot-stroke", type: "line", source: o, "source-layer": "amm-hotspot", minzoom: 11, paint: { "line-color": a.hotspot, "line-width": 1.2 } },
|
|
3016
|
+
{ id: "amm-runway-centerline", type: "line", source: o, "source-layer": "amm-runway-centerline", minzoom: 11, paint: { "line-color": a.runwayCenterline, "line-width": 1, "line-dasharray": [6, 3] } },
|
|
3017
3017
|
{
|
|
3018
3018
|
id: "amm-runway-info",
|
|
3019
3019
|
type: "symbol",
|
|
@@ -3023,7 +3023,7 @@ function Je(o = "amm") {
|
|
|
3023
3023
|
layout: { "text-field": ["concat", ["coalesce", ["get", "length"], ""], "×", ["coalesce", ["get", "width"], ""], "m"], "text-size": ["interpolate", ["exponential", 1.5], ["zoom"], 13, 10, 16, 13], "symbol-placement": "point", "text-rotate": ["coalesce", ["get", "bearing"], 0], "text-rotation-alignment": "map", "text-allow-overlap": !0, "text-ignore-placement": !0 },
|
|
3024
3024
|
paint: { "text-color": "#e2e8f0", "text-halo-color": "#0f172a", "text-halo-width": 2 }
|
|
3025
3025
|
},
|
|
3026
|
-
{ id: "amm-stand-line", type: "line", source: o, "source-layer": "amm-stand-line", minzoom: 13, paint: { "line-color":
|
|
3026
|
+
{ id: "amm-stand-line", type: "line", source: o, "source-layer": "amm-stand-line", minzoom: 13, paint: { "line-color": a.standLine, "line-width": 1 } },
|
|
3027
3027
|
{
|
|
3028
3028
|
id: "amm-runway-threshold-label",
|
|
3029
3029
|
type: "symbol",
|
|
@@ -3033,7 +3033,7 @@ function Je(o = "amm") {
|
|
|
3033
3033
|
layout: { "icon-image": "text_bg", "icon-text-fit": "both", "icon-text-fit-padding": [1, 2, 1, 2], "text-field": ["get", "idthr"], "text-size": 14, "text-allow-overlap": !0, "text-rotation-alignment": "map", "icon-rotation-alignment": "map" },
|
|
3034
3034
|
paint: { "text-color": "#ffffff", "icon-color": "#ef4444" }
|
|
3035
3035
|
},
|
|
3036
|
-
{ id: "amm-stand", type: "circle", source: o, "source-layer": "amm-stand", minzoom: 12, paint: { "circle-color":
|
|
3036
|
+
{ id: "amm-stand", type: "circle", source: o, "source-layer": "amm-stand", minzoom: 12, paint: { "circle-color": a.stand, "circle-radius": 1.5 } },
|
|
3037
3037
|
{
|
|
3038
3038
|
id: "amm-stand-label",
|
|
3039
3039
|
type: "symbol",
|
|
@@ -3041,7 +3041,7 @@ function Je(o = "amm") {
|
|
|
3041
3041
|
"source-layer": "amm-stand",
|
|
3042
3042
|
minzoom: 14,
|
|
3043
3043
|
layout: { "text-field": ["get", "idstd"], "text-size": 9, "text-anchor": "bottom", "text-offset": [0, -0.5], "text-allow-overlap": !1 },
|
|
3044
|
-
paint: { "text-color":
|
|
3044
|
+
paint: { "text-color": a.stand, "text-halo-color": "#0f172a", "text-halo-width": 1 }
|
|
3045
3045
|
},
|
|
3046
3046
|
{ id: "amm-obstacle-region-fill", type: "fill", source: o, "source-layer": "amm-obstacle-region", minzoom: 11, paint: { "fill-color": "#fef08a", "fill-opacity": 0.15 } },
|
|
3047
3047
|
{ id: "amm-obstacle-region-stroke", type: "line", source: o, "source-layer": "amm-obstacle-region", minzoom: 11, paint: { "line-color": "#eab308", "line-width": 1.2, "line-dasharray": [1.5, 1] } },
|
|
@@ -3084,16 +3084,16 @@ const Qe = {
|
|
|
3084
3084
|
hotspot: "#fb923c"
|
|
3085
3085
|
};
|
|
3086
3086
|
function qe(o = "amm") {
|
|
3087
|
-
const
|
|
3087
|
+
const a = Qe, u = "#1f1f23";
|
|
3088
3088
|
return [
|
|
3089
|
-
{ id: "amm-airport-fill", type: "fill", source: o, "source-layer": "amm-airport", minzoom: 11, paint: { "fill-color":
|
|
3089
|
+
{ id: "amm-airport-fill", type: "fill", source: o, "source-layer": "amm-airport", minzoom: 11, paint: { "fill-color": a.airport, "fill-opacity": 0.3 } },
|
|
3090
3090
|
{ id: "amm-airport-stroke", type: "line", source: o, "source-layer": "amm-airport", minzoom: 11, paint: { "line-color": "#52525b", "line-width": 1 } },
|
|
3091
|
-
{ id: "amm-runway-fill", type: "fill", source: o, "source-layer": "amm-runway", minzoom: 11, paint: { "fill-color":
|
|
3091
|
+
{ id: "amm-runway-fill", type: "fill", source: o, "source-layer": "amm-runway", minzoom: 11, paint: { "fill-color": a.runway, "fill-opacity": 1 } },
|
|
3092
3092
|
{ id: "amm-runway-stroke", type: "line", source: o, "source-layer": "amm-runway", minzoom: 11, paint: { "line-color": "#52525b", "line-width": 0.5 } },
|
|
3093
|
-
{ id: "amm-apron-fill", type: "fill", source: o, "source-layer": "amm-apron", minzoom: 11, paint: { "fill-color":
|
|
3093
|
+
{ id: "amm-apron-fill", type: "fill", source: o, "source-layer": "amm-apron", minzoom: 11, paint: { "fill-color": a.apron, "fill-opacity": 1 } },
|
|
3094
3094
|
{ id: "amm-apron-stroke", type: "line", source: o, "source-layer": "amm-apron", minzoom: 11, paint: { "line-color": "#3f3f46", "line-width": 0.5 } },
|
|
3095
|
-
{ id: "amm-taxiway-fill", type: "fill", source: o, "source-layer": "amm-taxiway", minzoom: 11, paint: { "fill-color":
|
|
3096
|
-
{ id: "amm-taxiway-line", type: "line", source: o, "source-layer": "amm-taxiway-line", minzoom: 11, paint: { "line-color":
|
|
3095
|
+
{ id: "amm-taxiway-fill", type: "fill", source: o, "source-layer": "amm-taxiway", minzoom: 11, paint: { "fill-color": a.taxiway, "fill-opacity": 0.9 } },
|
|
3096
|
+
{ id: "amm-taxiway-line", type: "line", source: o, "source-layer": "amm-taxiway-line", minzoom: 11, paint: { "line-color": a.taxiwayLine, "line-width": ["interpolate", ["linear"], ["zoom"], 15, 0.8, 18, 2] } },
|
|
3097
3097
|
{
|
|
3098
3098
|
id: "amm-taxiway-label",
|
|
3099
3099
|
type: "symbol",
|
|
@@ -3101,15 +3101,15 @@ function qe(o = "amm") {
|
|
|
3101
3101
|
"source-layer": "amm-taxiway-line",
|
|
3102
3102
|
minzoom: 14,
|
|
3103
3103
|
layout: { "text-field": ["get", "idlin"], "text-size": 10, "icon-image": "text_bg", "icon-text-fit": "both", "icon-text-fit-padding": [1, 2, 1, 2], "symbol-placement": "line", "text-keep-upright": !0, "text-allow-overlap": !1 },
|
|
3104
|
-
paint: { "text-color": u, "icon-color":
|
|
3104
|
+
paint: { "text-color": u, "icon-color": a.taxiwayLine }
|
|
3105
3105
|
},
|
|
3106
|
-
{ id: "amm-holding", type: "line", source: o, "source-layer": "amm-holding", minzoom: 11, paint: { "line-color":
|
|
3107
|
-
{ id: "amm-runway-marking", type: "fill", source: o, "source-layer": "amm-runway-marking", minzoom: 13, paint: { "fill-color":
|
|
3108
|
-
{ id: "amm-restricted-fill", type: "fill", source: o, "source-layer": "amm-restricted", minzoom: 11, paint: { "fill-color":
|
|
3109
|
-
{ id: "amm-restricted-stroke", type: "line", source: o, "source-layer": "amm-restricted", minzoom: 11, paint: { "line-color":
|
|
3110
|
-
{ id: "amm-hotspot-fill", type: "fill", source: o, "source-layer": "amm-hotspot", minzoom: 11, paint: { "fill-color":
|
|
3111
|
-
{ id: "amm-hotspot-stroke", type: "line", source: o, "source-layer": "amm-hotspot", minzoom: 11, paint: { "line-color":
|
|
3112
|
-
{ id: "amm-runway-centerline", type: "line", source: o, "source-layer": "amm-runway-centerline", minzoom: 11, paint: { "line-color":
|
|
3106
|
+
{ id: "amm-holding", type: "line", source: o, "source-layer": "amm-holding", minzoom: 11, paint: { "line-color": a.holding, "line-width": 1.5 } },
|
|
3107
|
+
{ id: "amm-runway-marking", type: "fill", source: o, "source-layer": "amm-runway-marking", minzoom: 13, paint: { "fill-color": a.runwayMarking, "fill-opacity": 0.85 } },
|
|
3108
|
+
{ id: "amm-restricted-fill", type: "fill", source: o, "source-layer": "amm-restricted", minzoom: 11, paint: { "fill-color": a.restricted, "fill-opacity": 0.1 } },
|
|
3109
|
+
{ id: "amm-restricted-stroke", type: "line", source: o, "source-layer": "amm-restricted", minzoom: 11, paint: { "line-color": a.restricted, "line-width": 1.2, "line-dasharray": [4, 2] } },
|
|
3110
|
+
{ id: "amm-hotspot-fill", type: "fill", source: o, "source-layer": "amm-hotspot", minzoom: 11, paint: { "fill-color": a.hotspot, "fill-opacity": 0.12 } },
|
|
3111
|
+
{ id: "amm-hotspot-stroke", type: "line", source: o, "source-layer": "amm-hotspot", minzoom: 11, paint: { "line-color": a.hotspot, "line-width": 1.2 } },
|
|
3112
|
+
{ id: "amm-runway-centerline", type: "line", source: o, "source-layer": "amm-runway-centerline", minzoom: 11, paint: { "line-color": a.runwayCenterline, "line-width": 1, "line-dasharray": [6, 3] } },
|
|
3113
3113
|
{
|
|
3114
3114
|
id: "amm-runway-info",
|
|
3115
3115
|
type: "symbol",
|
|
@@ -3119,7 +3119,7 @@ function qe(o = "amm") {
|
|
|
3119
3119
|
layout: { "text-field": ["concat", ["coalesce", ["get", "length"], ""], "×", ["coalesce", ["get", "width"], ""], "m"], "text-size": ["interpolate", ["exponential", 1.5], ["zoom"], 13, 10, 16, 13], "symbol-placement": "point", "text-rotate": ["coalesce", ["get", "bearing"], 0], "text-rotation-alignment": "map", "text-allow-overlap": !0, "text-ignore-placement": !0 },
|
|
3120
3120
|
paint: { "text-color": "#e4e4e7", "text-halo-color": u, "text-halo-width": 2 }
|
|
3121
3121
|
},
|
|
3122
|
-
{ id: "amm-stand-line", type: "line", source: o, "source-layer": "amm-stand-line", minzoom: 13, paint: { "line-color":
|
|
3122
|
+
{ id: "amm-stand-line", type: "line", source: o, "source-layer": "amm-stand-line", minzoom: 13, paint: { "line-color": a.standLine, "line-width": 1 } },
|
|
3123
3123
|
{
|
|
3124
3124
|
id: "amm-runway-threshold-label",
|
|
3125
3125
|
type: "symbol",
|
|
@@ -3127,9 +3127,9 @@ function qe(o = "amm") {
|
|
|
3127
3127
|
"source-layer": "amm-runway-threshold",
|
|
3128
3128
|
minzoom: 12,
|
|
3129
3129
|
layout: { "icon-image": "text_bg", "icon-text-fit": "both", "icon-text-fit-padding": [1, 2, 1, 2], "text-field": ["get", "idthr"], "text-size": 14, "text-allow-overlap": !0, "text-rotation-alignment": "map", "icon-rotation-alignment": "map" },
|
|
3130
|
-
paint: { "text-color": "#ffffff", "icon-color":
|
|
3130
|
+
paint: { "text-color": "#ffffff", "icon-color": a.threshold }
|
|
3131
3131
|
},
|
|
3132
|
-
{ id: "amm-stand", type: "circle", source: o, "source-layer": "amm-stand", minzoom: 12, paint: { "circle-color":
|
|
3132
|
+
{ id: "amm-stand", type: "circle", source: o, "source-layer": "amm-stand", minzoom: 12, paint: { "circle-color": a.stand, "circle-radius": 1.5 } },
|
|
3133
3133
|
{
|
|
3134
3134
|
id: "amm-stand-label",
|
|
3135
3135
|
type: "symbol",
|
|
@@ -3137,7 +3137,7 @@ function qe(o = "amm") {
|
|
|
3137
3137
|
"source-layer": "amm-stand",
|
|
3138
3138
|
minzoom: 14,
|
|
3139
3139
|
layout: { "text-field": ["get", "idstd"], "text-size": 9, "text-anchor": "bottom", "text-offset": [0, -0.5], "text-allow-overlap": !1 },
|
|
3140
|
-
paint: { "text-color":
|
|
3140
|
+
paint: { "text-color": a.stand, "text-halo-color": u, "text-halo-width": 1 }
|
|
3141
3141
|
},
|
|
3142
3142
|
{ id: "amm-obstacle-region-fill", type: "fill", source: o, "source-layer": "amm-obstacle-region", minzoom: 11, paint: { "fill-color": "#fef08a", "fill-opacity": 0.1 } },
|
|
3143
3143
|
{ id: "amm-obstacle-region-stroke", type: "line", source: o, "source-layer": "amm-obstacle-region", minzoom: 11, paint: { "line-color": "#eab308", "line-width": 1.2, "line-dasharray": [1.5, 1] } },
|
|
@@ -3164,8 +3164,8 @@ function qe(o = "amm") {
|
|
|
3164
3164
|
}
|
|
3165
3165
|
];
|
|
3166
3166
|
}
|
|
3167
|
-
function Ht(o = "amm",
|
|
3168
|
-
return
|
|
3167
|
+
function Ht(o = "amm", a = "light") {
|
|
3168
|
+
return a === "dark" ? Je(o) : a === "neutral" ? qe(o) : He(o);
|
|
3169
3169
|
}
|
|
3170
3170
|
const oi = {
|
|
3171
3171
|
ammAirport: ["amm-airport-fill", "amm-airport-stroke"],
|
|
@@ -3239,12 +3239,12 @@ const oi = {
|
|
|
3239
3239
|
"amm-construction-label"
|
|
3240
3240
|
], Zt = ["terrain-color", "terrain-hillshade"], Jt = ["contour-line", "contour-label"];
|
|
3241
3241
|
async function Qt(o) {
|
|
3242
|
-
const
|
|
3243
|
-
if (!
|
|
3244
|
-
const u =
|
|
3242
|
+
const a = await fetch(o);
|
|
3243
|
+
if (!a.ok) throw new Error(`fetch ${o} → ${a.status}`);
|
|
3244
|
+
const u = a.headers.get("Content-Encoding"), g = a.headers.get("Content-Type") || "";
|
|
3245
3245
|
if (u === "gzip" || g.includes("json"))
|
|
3246
|
-
return
|
|
3247
|
-
const y =
|
|
3246
|
+
return a.json();
|
|
3247
|
+
const y = a.body.pipeThrough(new DecompressionStream("gzip"));
|
|
3248
3248
|
return new Response(y).json();
|
|
3249
3249
|
}
|
|
3250
3250
|
class ri {
|
|
@@ -3256,17 +3256,21 @@ class ri {
|
|
|
3256
3256
|
* @param {string} [options.spriteUrl] Override sprite server URL (defaults to apiUrl)
|
|
3257
3257
|
* @param {string} [options.period] Period id; defaults to latest
|
|
3258
3258
|
* @param {object} [options.layers] Initial layer visibility map
|
|
3259
|
+
* @param {[number,number]} [options.center] Initial map center [lng, lat] (default [104, 36])
|
|
3260
|
+
* @param {number} [options.zoom] Initial zoom level (default 4)
|
|
3259
3261
|
*/
|
|
3260
|
-
constructor(
|
|
3262
|
+
constructor(a = {}) {
|
|
3261
3263
|
const {
|
|
3262
3264
|
container: u,
|
|
3263
3265
|
theme: g = "light",
|
|
3264
3266
|
apiUrl: y = ti,
|
|
3265
3267
|
spriteUrl: x,
|
|
3266
|
-
period:
|
|
3267
|
-
layers:
|
|
3268
|
-
|
|
3269
|
-
|
|
3268
|
+
period: z = null,
|
|
3269
|
+
layers: S = {},
|
|
3270
|
+
center: O = [104, 36],
|
|
3271
|
+
zoom: A = 4
|
|
3272
|
+
} = a;
|
|
3273
|
+
return this._apiUrl = y.replace(/\/$/, ""), this._spriteUrl = (x ?? y).replace(/\/$/, ""), this._theme = g, this._period = z, this._center = O, this._zoom = A, this._ready = !1, this._layerVisible = {
|
|
3270
3274
|
// aviation groups — all visible by default
|
|
3271
3275
|
adiz: !0,
|
|
3272
3276
|
fir: !0,
|
|
@@ -3284,21 +3288,21 @@ class ri {
|
|
|
3284
3288
|
terrain: !1,
|
|
3285
3289
|
contour: !1,
|
|
3286
3290
|
// user overrides
|
|
3287
|
-
...
|
|
3291
|
+
...S
|
|
3288
3292
|
}, this._initMap(u), new Proxy(this, {
|
|
3289
|
-
get(
|
|
3290
|
-
var
|
|
3291
|
-
if (
|
|
3292
|
-
const
|
|
3293
|
-
return typeof
|
|
3293
|
+
get(_, p, b) {
|
|
3294
|
+
var D;
|
|
3295
|
+
if (p in _) return Reflect.get(_, p, b);
|
|
3296
|
+
const v = (D = _._map) == null ? void 0 : D[p];
|
|
3297
|
+
return typeof v == "function" ? v.bind(_._map) : v;
|
|
3294
3298
|
}
|
|
3295
3299
|
});
|
|
3296
3300
|
}
|
|
3297
3301
|
// ── Map initialization ────────────────────────────────────────────────────
|
|
3298
|
-
_initMap(
|
|
3302
|
+
_initMap(a) {
|
|
3299
3303
|
const u = ut[this._theme] ?? ut.light;
|
|
3300
3304
|
this._map = new jt.Map({
|
|
3301
|
-
container:
|
|
3305
|
+
container: a,
|
|
3302
3306
|
style: {
|
|
3303
3307
|
version: 8,
|
|
3304
3308
|
glyphs: "https://aips.siniswift.com/mapsdk/glyphs/{fontstack}/{range}.pbf",
|
|
@@ -3315,8 +3319,8 @@ class ri {
|
|
|
3315
3319
|
{ id: "background", type: "background", paint: { "background-color": u.background } }
|
|
3316
3320
|
]
|
|
3317
3321
|
},
|
|
3318
|
-
center:
|
|
3319
|
-
zoom:
|
|
3322
|
+
center: this._center,
|
|
3323
|
+
zoom: this._zoom,
|
|
3320
3324
|
minZoom: 0,
|
|
3321
3325
|
maxZoom: 17.5,
|
|
3322
3326
|
crossSourceCollisions: !1,
|
|
@@ -3353,15 +3357,15 @@ class ri {
|
|
|
3353
3357
|
encoding: "mapbox",
|
|
3354
3358
|
maxzoom: 8
|
|
3355
3359
|
});
|
|
3356
|
-
const
|
|
3360
|
+
const a = new Be.DemSource({
|
|
3357
3361
|
url: `${this._apiUrl}/api/terrain/{z}/{x}/{y}.png`,
|
|
3358
3362
|
encoding: "mapbox",
|
|
3359
3363
|
maxzoom: 8,
|
|
3360
3364
|
worker: !0
|
|
3361
3365
|
});
|
|
3362
|
-
|
|
3366
|
+
a.setupMaplibre(jt), this._map.addSource("contour", {
|
|
3363
3367
|
type: "vector",
|
|
3364
|
-
tiles: [
|
|
3368
|
+
tiles: [a.contourProtocolUrl({
|
|
3365
3369
|
thresholds: {
|
|
3366
3370
|
5: [250, 1e3],
|
|
3367
3371
|
7: [125, 500],
|
|
@@ -3377,30 +3381,30 @@ class ri {
|
|
|
3377
3381
|
}), await this._loadBaseData();
|
|
3378
3382
|
}
|
|
3379
3383
|
async _loadBaseData() {
|
|
3380
|
-
var
|
|
3384
|
+
var a, u, g, y;
|
|
3381
3385
|
try {
|
|
3382
|
-
const [x,
|
|
3386
|
+
const [x, z] = await Promise.all([
|
|
3383
3387
|
Qt(`${this._apiUrl}/topjson/land.topojson.gz`),
|
|
3384
3388
|
Qt(`${this._apiUrl}/topjson/boundary.topojson.gz`)
|
|
3385
3389
|
]);
|
|
3386
|
-
(
|
|
3390
|
+
(a = x == null ? void 0 : x.objects) != null && a.land ? (u = this._map.getSource("land")) == null || u.setData($t(x, x.objects.land)) : console.warn("[AviationChart] land topojson missing objects.land"), (g = z == null ? void 0 : z.objects) != null && g.boundary ? (y = this._map.getSource("boundary")) == null || y.setData($t(z, z.objects.boundary)) : console.warn("[AviationChart] boundary topojson missing objects.boundary");
|
|
3387
3391
|
} catch (x) {
|
|
3388
3392
|
console.error("[AviationChart] loadBaseData failed:", x);
|
|
3389
3393
|
}
|
|
3390
3394
|
}
|
|
3391
3395
|
_initLayers() {
|
|
3392
|
-
const
|
|
3396
|
+
const a = this._layerVisible.terrain ? "visible" : "none", u = this._layerVisible.contour ? "visible" : "none";
|
|
3393
3397
|
this._map.addLayer({
|
|
3394
3398
|
id: "terrain-color",
|
|
3395
3399
|
type: "color-relief",
|
|
3396
3400
|
source: "terrain",
|
|
3397
|
-
layout: { visibility:
|
|
3401
|
+
layout: { visibility: a },
|
|
3398
3402
|
paint: { "color-relief-color": ei }
|
|
3399
3403
|
}), this._map.addLayer({
|
|
3400
3404
|
id: "terrain-hillshade",
|
|
3401
3405
|
type: "hillshade",
|
|
3402
3406
|
source: "terrain",
|
|
3403
|
-
layout: { visibility:
|
|
3407
|
+
layout: { visibility: a },
|
|
3404
3408
|
paint: {
|
|
3405
3409
|
"hillshade-shadow-color": "rgba(74,59,42,0.35)",
|
|
3406
3410
|
"hillshade-highlight-color": "rgba(255,246,230,0.25)",
|
|
@@ -3447,13 +3451,13 @@ class ri {
|
|
|
3447
3451
|
}
|
|
3448
3452
|
_applyVisibility() {
|
|
3449
3453
|
for (const [y, x] of Object.entries(Ct)) {
|
|
3450
|
-
const
|
|
3451
|
-
for (const
|
|
3452
|
-
this._map.getLayer(
|
|
3454
|
+
const z = this._layerVisible[y] !== !1 ? "visible" : "none";
|
|
3455
|
+
for (const S of x)
|
|
3456
|
+
this._map.getLayer(S) && this._map.setLayoutProperty(S, "visibility", z);
|
|
3453
3457
|
}
|
|
3454
|
-
const
|
|
3458
|
+
const a = this._layerVisible.amm !== !1 ? "visible" : "none";
|
|
3455
3459
|
for (const y of Pt)
|
|
3456
|
-
this._map.getLayer(y) && this._map.setLayoutProperty(y, "visibility",
|
|
3460
|
+
this._map.getLayer(y) && this._map.setLayoutProperty(y, "visibility", a);
|
|
3457
3461
|
const u = this._layerVisible.terrain ? "visible" : "none";
|
|
3458
3462
|
for (const y of Zt)
|
|
3459
3463
|
this._map.getLayer(y) && this._map.setLayoutProperty(y, "visibility", u);
|
|
@@ -3478,10 +3482,10 @@ class ri {
|
|
|
3478
3482
|
* Switch the chart theme.
|
|
3479
3483
|
* @param {'light'|'dark'} theme
|
|
3480
3484
|
*/
|
|
3481
|
-
setTheme(
|
|
3482
|
-
if (
|
|
3483
|
-
this._theme =
|
|
3484
|
-
const u = ut[
|
|
3485
|
+
setTheme(a) {
|
|
3486
|
+
if (a === this._theme) return;
|
|
3487
|
+
this._theme = a;
|
|
3488
|
+
const u = ut[a] ?? ut.light;
|
|
3485
3489
|
this._map.setPaintProperty("background", "background-color", u.background);
|
|
3486
3490
|
const g = [
|
|
3487
3491
|
"landLaye",
|
|
@@ -3508,29 +3512,29 @@ class ri {
|
|
|
3508
3512
|
* @param {string} key
|
|
3509
3513
|
* @param {boolean} visible
|
|
3510
3514
|
*/
|
|
3511
|
-
setLayerVisible(
|
|
3512
|
-
if (this._layerVisible[
|
|
3515
|
+
setLayerVisible(a, u) {
|
|
3516
|
+
if (this._layerVisible[a] = u, a === "terrain") {
|
|
3513
3517
|
const x = u ? "visible" : "none";
|
|
3514
|
-
for (const
|
|
3515
|
-
this._map.getLayer(
|
|
3518
|
+
for (const z of Zt)
|
|
3519
|
+
this._map.getLayer(z) && this._map.setLayoutProperty(z, "visibility", x);
|
|
3516
3520
|
this._map.setTerrain(u ? { source: "terrain", exaggeration: 4 } : null);
|
|
3517
3521
|
return;
|
|
3518
3522
|
}
|
|
3519
|
-
if (
|
|
3523
|
+
if (a === "contour") {
|
|
3520
3524
|
const x = u ? "visible" : "none";
|
|
3521
|
-
for (const
|
|
3522
|
-
this._map.getLayer(
|
|
3525
|
+
for (const z of Jt)
|
|
3526
|
+
this._map.getLayer(z) && this._map.setLayoutProperty(z, "visibility", x);
|
|
3523
3527
|
return;
|
|
3524
3528
|
}
|
|
3525
|
-
if (
|
|
3529
|
+
if (a === "amm") {
|
|
3526
3530
|
const x = u ? "visible" : "none";
|
|
3527
|
-
for (const
|
|
3528
|
-
this._map.getLayer(
|
|
3531
|
+
for (const z of Pt)
|
|
3532
|
+
this._map.getLayer(z) && this._map.setLayoutProperty(z, "visibility", x);
|
|
3529
3533
|
return;
|
|
3530
3534
|
}
|
|
3531
|
-
const g = Ct[
|
|
3535
|
+
const g = Ct[a];
|
|
3532
3536
|
if (!g) {
|
|
3533
|
-
console.warn(`[AviationChart] Unknown layer key: "${
|
|
3537
|
+
console.warn(`[AviationChart] Unknown layer key: "${a}"`);
|
|
3534
3538
|
return;
|
|
3535
3539
|
}
|
|
3536
3540
|
const y = u ? "visible" : "none";
|
|
@@ -3541,19 +3545,19 @@ class ri {
|
|
|
3541
3545
|
* Switch the navdata period. Fetches tiles for the new period immediately.
|
|
3542
3546
|
* @param {string} period
|
|
3543
3547
|
*/
|
|
3544
|
-
setPeriod(
|
|
3548
|
+
setPeriod(a) {
|
|
3545
3549
|
var g;
|
|
3546
|
-
this._period =
|
|
3550
|
+
this._period = a;
|
|
3547
3551
|
const u = (g = this._map) == null ? void 0 : g.getSource("navdata");
|
|
3548
|
-
u && u.setTiles([`${this._apiUrl}/api/tiles/${
|
|
3552
|
+
u && u.setTiles([`${this._apiUrl}/api/tiles/${a}/{z}/{x}/{y}.pbf`]);
|
|
3549
3553
|
}
|
|
3550
3554
|
/** Proxy to map.on — returns `this` for chaining */
|
|
3551
|
-
on(
|
|
3552
|
-
return this._map.on(
|
|
3555
|
+
on(a, u) {
|
|
3556
|
+
return this._map.on(a, u), this;
|
|
3553
3557
|
}
|
|
3554
3558
|
/** Proxy to map.off — returns `this` for chaining */
|
|
3555
|
-
off(
|
|
3556
|
-
return this._map.off(
|
|
3559
|
+
off(a, u) {
|
|
3560
|
+
return this._map.off(a, u), this;
|
|
3557
3561
|
}
|
|
3558
3562
|
/** Remove the map and release all resources */
|
|
3559
3563
|
destroy() {
|