@maptiler/sdk 2.4.2 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/maptiler-sdk.mjs +494 -472
- package/dist/maptiler-sdk.mjs.map +1 -1
- package/dist/src/MaptilerGeolocateControl.d.ts +1 -0
- package/dist/src/language.d.ts +25 -25
- package/package.json +2 -2
- package/readme.md +34 -1
package/dist/maptiler-sdk.mjs
CHANGED
|
@@ -3,15 +3,15 @@ var Cr = (r) => {
|
|
|
3
3
|
throw TypeError(r);
|
|
4
4
|
};
|
|
5
5
|
var Ca = (r, e, t) => e in r ? La(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var I = (r, e, t) => Ca(r, typeof e != "symbol" ? e + "" : e, t), _t = (r, e, t) => e.has(r) || Cr("Cannot " + t);
|
|
7
|
+
var E = (r, e, t) => (_t(r, e, "read from private field"), t ? t.call(r) : e.get(r)), fe = (r, e, t) => e.has(r) ? Cr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), ve = (r, e, t, n) => (_t(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), V = (r, e, t) => (_t(r, e, "access private method"), t);
|
|
8
8
|
import S from "maplibre-gl";
|
|
9
|
-
import { Language as Aa, getLanguageInfoFromCode as Ar, config as
|
|
10
|
-
import { MapStyle as Ou, MapStyleVariant as Du, ReferenceMapStyle as ju, ServiceError as qu, areSameLanguages as
|
|
11
|
-
import
|
|
12
|
-
import { v4 as
|
|
13
|
-
import { Base64 as
|
|
14
|
-
const
|
|
9
|
+
import { Language as Aa, getLanguageInfoFromCode as Ar, config as zt, MapStyle as je, mapStylePresetList as Rt, expandMapStyle as Ta, MapStyleVariant as Ea, ReferenceMapStyle as Ia, toLanguageInfo as Tr, getLanguageInfoFromFlag as Ma, geolocation as Er } from "@maptiler/client";
|
|
10
|
+
import { MapStyle as Ou, MapStyleVariant as Du, ReferenceMapStyle as ju, ServiceError as qu, areSameLanguages as Bu, bufferToPixelDataBrowser as Uu, circumferenceAtLatitude as Vu, coordinates as Gu, data as Hu, elevation as Ku, expandMapStyle as Wu, geocoding as Zu, geolocation as Ju, getAutoLanguage as Yu, getBufferToPixelDataParser as Xu, getLanguageInfoFromCode as Qu, getLanguageInfoFromFlag as ec, getLanguageInfoFromKey as tc, getTileCache as rc, isLanguageInfo as nc, mapStylePresetList as ac, math as oc, misc as ic, staticMaps as sc, styleToStyle as lc, toLanguageInfo as uc } from "@maptiler/client";
|
|
11
|
+
import _a from "events";
|
|
12
|
+
import { v4 as za } from "uuid";
|
|
13
|
+
import { Base64 as Ra } from "js-base64";
|
|
14
|
+
const Pa = "@maptiler/sdk", $a = "2.5.1", Na = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", Fa = "dist/maptiler-sdk.mjs", Oa = "dist/maptiler-sdk.d.ts", Da = "dist/maptiler-sdk.css", ja = "module", qa = {
|
|
15
15
|
".": {
|
|
16
16
|
import: "./dist/maptiler-sdk.mjs",
|
|
17
17
|
types: "./dist/maptiler-sdk.d.ts"
|
|
@@ -22,7 +22,7 @@ const $a = "@maptiler/sdk", Ra = "2.4.2", Na = "The Javascript & TypeScript map
|
|
|
22
22
|
"./style.css": {
|
|
23
23
|
import: "./dist/maptiler-sdk.css"
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, Ba = [
|
|
26
26
|
"maptiler",
|
|
27
27
|
"map",
|
|
28
28
|
"sdk",
|
|
@@ -30,7 +30,7 @@ const $a = "@maptiler/sdk", Ra = "2.4.2", Na = "The Javascript & TypeScript map
|
|
|
30
30
|
"cloud",
|
|
31
31
|
"webGL",
|
|
32
32
|
"maplibre"
|
|
33
|
-
],
|
|
33
|
+
], Ua = "https://docs.maptiler.com/sdk-js/", Va = "BSD-3-Clause", Ga = {
|
|
34
34
|
type: "git",
|
|
35
35
|
url: "https://github.com/maptiler/maptiler-sdk-js.git"
|
|
36
36
|
}, Ha = {
|
|
@@ -59,29 +59,29 @@ const $a = "@maptiler/sdk", Ra = "2.4.2", Na = "The Javascript & TypeScript map
|
|
|
59
59
|
vitest: "^0.34.2"
|
|
60
60
|
}, Za = {
|
|
61
61
|
"@maplibre/maplibre-gl-style-spec": "^20.3.1",
|
|
62
|
-
"@maptiler/client": "^2.
|
|
62
|
+
"@maptiler/client": "^2.2.0",
|
|
63
63
|
events: "^3.3.0",
|
|
64
64
|
"js-base64": "^3.7.4",
|
|
65
65
|
"maplibre-gl": "4.7.1",
|
|
66
66
|
uuid: "^9.0.0"
|
|
67
67
|
}, Ja = {
|
|
68
|
-
name:
|
|
69
|
-
version:
|
|
68
|
+
name: Pa,
|
|
69
|
+
version: $a,
|
|
70
70
|
description: Na,
|
|
71
71
|
module: Fa,
|
|
72
72
|
types: Oa,
|
|
73
73
|
style: Da,
|
|
74
74
|
type: ja,
|
|
75
75
|
exports: qa,
|
|
76
|
-
keywords:
|
|
77
|
-
homepage:
|
|
76
|
+
keywords: Ba,
|
|
77
|
+
homepage: Ua,
|
|
78
78
|
license: Va,
|
|
79
79
|
repository: Ga,
|
|
80
80
|
scripts: Ha,
|
|
81
81
|
author: Ka,
|
|
82
82
|
devDependencies: Wa,
|
|
83
83
|
dependencies: Za
|
|
84
|
-
},
|
|
84
|
+
}, M = {
|
|
85
85
|
/**
|
|
86
86
|
* Language mode to display labels in both the local language and the language of the visitor's device, concatenated.
|
|
87
87
|
* Note that if those two languages are the same, labels won't be duplicated.
|
|
@@ -123,37 +123,37 @@ const $a = "@maptiler/sdk", Ra = "2.4.2", Na = "The Javascript & TypeScript map
|
|
|
123
123
|
},
|
|
124
124
|
...Aa
|
|
125
125
|
};
|
|
126
|
-
function
|
|
126
|
+
function Ir() {
|
|
127
127
|
if (typeof navigator > "u") {
|
|
128
128
|
const e = Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0], t = Ar(e);
|
|
129
|
-
return t ||
|
|
129
|
+
return t || M.ENGLISH;
|
|
130
130
|
}
|
|
131
|
-
return Array.from(new Set(navigator.languages.map((e) => e.split("-")[0]))).map((e) => Ar(e)).filter((e) => e)[0] ??
|
|
131
|
+
return Array.from(new Set(navigator.languages.map((e) => e.split("-")[0]))).map((e) => Ar(e)).filter((e) => e)[0] ?? M.LOCAL;
|
|
132
132
|
}
|
|
133
133
|
const H = {
|
|
134
134
|
maptilerLogoURL: "https://api.maptiler.com/resources/logo.svg",
|
|
135
135
|
maptilerURL: "https://www.maptiler.com/",
|
|
136
136
|
maptilerApiHost: "api.maptiler.com",
|
|
137
137
|
rtlPluginURL: "https://cdn.maptiler.com/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.min.js",
|
|
138
|
-
primaryLanguage:
|
|
139
|
-
secondaryLanguage:
|
|
138
|
+
primaryLanguage: M.STYLE,
|
|
139
|
+
secondaryLanguage: M.LOCAL,
|
|
140
140
|
terrainSourceURL: "https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json",
|
|
141
141
|
terrainSourceId: "maptiler-terrain"
|
|
142
142
|
};
|
|
143
143
|
Object.freeze(H);
|
|
144
|
-
const mn =
|
|
145
|
-
class Ya extends
|
|
144
|
+
const mn = za();
|
|
145
|
+
class Ya extends _a {
|
|
146
146
|
constructor() {
|
|
147
147
|
super(...arguments);
|
|
148
148
|
/**
|
|
149
149
|
* The primary language. By default, the language of the web browser is used.
|
|
150
150
|
*/
|
|
151
|
-
|
|
151
|
+
I(this, "primaryLanguage", H.primaryLanguage);
|
|
152
152
|
/**
|
|
153
153
|
* The secondary language, to overwrite the default language defined in the map style.
|
|
154
154
|
* This settings is highly dependant on the style compatibility and may not work in most cases.
|
|
155
155
|
*/
|
|
156
|
-
|
|
156
|
+
I(this, "secondaryLanguage");
|
|
157
157
|
/**
|
|
158
158
|
* Setting on whether of not the SDK runs with a session logic.
|
|
159
159
|
* A "session" is started at the initialization of the SDK and finished when the browser
|
|
@@ -161,21 +161,21 @@ class Ya extends za {
|
|
|
161
161
|
* When `session` is enabled (default: true), the extra URL param `mtsid` is added to queries
|
|
162
162
|
* on the MapTiler Cloud API. This allows MapTiler to enable "session based billing".
|
|
163
163
|
*/
|
|
164
|
-
|
|
164
|
+
I(this, "session", !0);
|
|
165
165
|
/**
|
|
166
166
|
* Enables client-side caching of requests for tiles and fonts.
|
|
167
167
|
* The cached requests persist multiple browser sessions and will be reused when possible.
|
|
168
168
|
* Works only for requests to the MapTiler Cloud API when sessions are enabled.
|
|
169
169
|
*/
|
|
170
|
-
|
|
170
|
+
I(this, "caching", !0);
|
|
171
171
|
/**
|
|
172
172
|
* Unit to be used
|
|
173
173
|
*/
|
|
174
|
-
|
|
174
|
+
I(this, "_unit", "metric");
|
|
175
175
|
/**
|
|
176
176
|
* MapTiler Cloud API key
|
|
177
177
|
*/
|
|
178
|
-
|
|
178
|
+
I(this, "_apiKey", "");
|
|
179
179
|
}
|
|
180
180
|
/**
|
|
181
181
|
* Set the unit system
|
|
@@ -193,7 +193,7 @@ class Ya extends za {
|
|
|
193
193
|
* Set the MapTiler Cloud API key
|
|
194
194
|
*/
|
|
195
195
|
set apiKey(t) {
|
|
196
|
-
this._apiKey = t,
|
|
196
|
+
this._apiKey = t, zt.apiKey = t, this.emit("apiKey", t);
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
199
199
|
* Get the MapTiler Cloud API key
|
|
@@ -205,18 +205,18 @@ class Ya extends za {
|
|
|
205
205
|
* Set a the custom fetch function to replace the default one
|
|
206
206
|
*/
|
|
207
207
|
set fetch(t) {
|
|
208
|
-
|
|
208
|
+
zt.fetch = t;
|
|
209
209
|
}
|
|
210
210
|
/**
|
|
211
211
|
* Get the fetch fucntion
|
|
212
212
|
*/
|
|
213
213
|
get fetch() {
|
|
214
|
-
return
|
|
214
|
+
return zt.fetch;
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
const
|
|
217
|
+
const B = new Ya(), { addProtocol: Mr } = S, Vt = "localcache_source", Gt = "localcache", Xa = "maptiler_sdk", Qa = 1e3, eo = 100, Ht = typeof caches < "u";
|
|
218
218
|
function to(r, e) {
|
|
219
|
-
if (Ht &&
|
|
219
|
+
if (Ht && B.caching && B.session && r.host === H.maptilerApiHost) {
|
|
220
220
|
if (e === "Source" && r.href.includes("tiles.json"))
|
|
221
221
|
return r.href.replace("https://", `${Vt}://`);
|
|
222
222
|
if (e === "Tile" || e === "Glyphs")
|
|
@@ -224,18 +224,18 @@ function to(r, e) {
|
|
|
224
224
|
}
|
|
225
225
|
return r.href;
|
|
226
226
|
}
|
|
227
|
-
let
|
|
227
|
+
let Pt;
|
|
228
228
|
async function hn() {
|
|
229
|
-
return
|
|
229
|
+
return Pt || (Pt = await caches.open(Xa)), Pt;
|
|
230
230
|
}
|
|
231
|
-
let
|
|
231
|
+
let _r = 0;
|
|
232
232
|
async function ro() {
|
|
233
233
|
const r = await hn(), e = await r.keys(), t = e.slice(0, Math.max(e.length - Qa, 0));
|
|
234
234
|
for (const n of t)
|
|
235
235
|
r.delete(n);
|
|
236
236
|
}
|
|
237
237
|
function no() {
|
|
238
|
-
|
|
238
|
+
Mr(
|
|
239
239
|
Vt,
|
|
240
240
|
async (r, e) => {
|
|
241
241
|
if (!r.url) throw new Error("");
|
|
@@ -249,7 +249,7 @@ function no() {
|
|
|
249
249
|
expires: n.headers.get("Expires")
|
|
250
250
|
};
|
|
251
251
|
}
|
|
252
|
-
),
|
|
252
|
+
), Mr(
|
|
253
253
|
Gt,
|
|
254
254
|
async (r, e) => {
|
|
255
255
|
if (!r.url) throw new Error("");
|
|
@@ -269,7 +269,7 @@ function no() {
|
|
|
269
269
|
c.signal = e.signal;
|
|
270
270
|
const p = await fetch(i, c);
|
|
271
271
|
return p.status >= 200 && p.status < 300 && (l.put(a, p.clone()).catch(() => {
|
|
272
|
-
}), ++
|
|
272
|
+
}), ++_r > eo && (ro(), _r = 0)), s(p);
|
|
273
273
|
}
|
|
274
274
|
);
|
|
275
275
|
}
|
|
@@ -286,14 +286,14 @@ function oo(r, e) {
|
|
|
286
286
|
for (const t of r)
|
|
287
287
|
typeof e[t] == "function" && (e[t] = e[t].bind(e));
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function _e(r, e, t) {
|
|
290
290
|
const n = window.document.createElement(r);
|
|
291
291
|
return e !== void 0 && (n.className = e), t && t.appendChild(n), n;
|
|
292
292
|
}
|
|
293
293
|
function gn(r) {
|
|
294
294
|
r.parentNode && r.parentNode.removeChild(r);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function zr(r, e) {
|
|
297
297
|
let t = null;
|
|
298
298
|
try {
|
|
299
299
|
t = new URL(r);
|
|
@@ -302,20 +302,20 @@ function _r(r, e) {
|
|
|
302
302
|
url: r
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
|
-
return t.host === H.maptilerApiHost && (t.searchParams.has("key") || t.searchParams.append("key",
|
|
305
|
+
return t.host === H.maptilerApiHost && (t.searchParams.has("key") || t.searchParams.append("key", B.apiKey), B.session && t.searchParams.append("mtsid", mn)), {
|
|
306
306
|
url: to(t, e)
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function Rr(r) {
|
|
310
310
|
return (e, t) => {
|
|
311
311
|
if (r != null) {
|
|
312
|
-
const n = r(e, t), a =
|
|
312
|
+
const n = r(e, t), a = zr((n == null ? void 0 : n.url) ?? "", t);
|
|
313
313
|
return {
|
|
314
314
|
...n,
|
|
315
315
|
...a
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
|
-
return
|
|
318
|
+
return zr(e, t);
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
321
|
function vn() {
|
|
@@ -351,16 +351,16 @@ function uo(r) {
|
|
|
351
351
|
const n = document.createElement("div");
|
|
352
352
|
n.innerHTML = e, n.classList.add("webgl-warning-div"), t.appendChild(n);
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function Pr(r, e) {
|
|
355
355
|
return !(!Array.isArray(r) || r.length !== 2 || r[0] !== "get" || typeof r[1] != "string" || e && !r[1].startsWith("name:") || !e && r[1] !== "name");
|
|
356
356
|
}
|
|
357
357
|
function co(r, e, t) {
|
|
358
358
|
const n = structuredClone(r), a = (o) => {
|
|
359
359
|
if (typeof o != "string")
|
|
360
360
|
for (let i = 0; i < o.length; i += 1)
|
|
361
|
-
|
|
361
|
+
Pr(o[i], t) ? o[i] = structuredClone(e) : a(o[i]);
|
|
362
362
|
};
|
|
363
|
-
return
|
|
363
|
+
return Pr(n, t) ? e : (a(n), n);
|
|
364
364
|
}
|
|
365
365
|
function po(r, e) {
|
|
366
366
|
const t = e ? /\{name:\S+\}/ : /\{name\}/;
|
|
@@ -536,31 +536,31 @@ class Tl extends S.KeyboardHandler {
|
|
|
536
536
|
super(e);
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
|
-
class
|
|
539
|
+
class El extends S.TwoFingersTouchPitchHandler {
|
|
540
540
|
constructor(e) {
|
|
541
541
|
super(e);
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
class
|
|
544
|
+
class Il extends S.MapWheelEvent {
|
|
545
545
|
constructor(e, t, n) {
|
|
546
546
|
super(e, t, n);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
class
|
|
549
|
+
class Ml extends S.MapTouchEvent {
|
|
550
550
|
constructor(e, t, n) {
|
|
551
551
|
super(e, t, n);
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
class
|
|
554
|
+
class _l extends S.MapMouseEvent {
|
|
555
555
|
constructor(e, t, n, a = {}) {
|
|
556
556
|
super(e, t, n, a);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
class
|
|
559
|
+
class $r extends wo {
|
|
560
560
|
constructor(t = {}) {
|
|
561
561
|
super(t);
|
|
562
|
-
|
|
563
|
-
|
|
562
|
+
I(this, "logoURL", "");
|
|
563
|
+
I(this, "linkURL", "");
|
|
564
564
|
this.logoURL = t.logoURL ?? H.maptilerLogoURL, this.linkURL = t.linkURL ?? H.maptilerURL;
|
|
565
565
|
}
|
|
566
566
|
onAdd(t) {
|
|
@@ -697,7 +697,7 @@ var ko = 8, Lo = {
|
|
|
697
697
|
"*": {
|
|
698
698
|
type: "*"
|
|
699
699
|
}
|
|
700
|
-
},
|
|
700
|
+
}, Eo = {
|
|
701
701
|
type: {
|
|
702
702
|
required: !0,
|
|
703
703
|
type: "enum",
|
|
@@ -754,7 +754,7 @@ var ko = 8, Lo = {
|
|
|
754
754
|
"*": {
|
|
755
755
|
type: "*"
|
|
756
756
|
}
|
|
757
|
-
},
|
|
757
|
+
}, Io = {
|
|
758
758
|
type: {
|
|
759
759
|
required: !0,
|
|
760
760
|
type: "enum",
|
|
@@ -828,7 +828,7 @@ var ko = 8, Lo = {
|
|
|
828
828
|
"*": {
|
|
829
829
|
type: "*"
|
|
830
830
|
}
|
|
831
|
-
},
|
|
831
|
+
}, Mo = {
|
|
832
832
|
type: {
|
|
833
833
|
required: !0,
|
|
834
834
|
type: "enum",
|
|
@@ -889,7 +889,7 @@ var ko = 8, Lo = {
|
|
|
889
889
|
promoteId: {
|
|
890
890
|
type: "promoteId"
|
|
891
891
|
}
|
|
892
|
-
},
|
|
892
|
+
}, _o = {
|
|
893
893
|
type: {
|
|
894
894
|
required: !0,
|
|
895
895
|
type: "enum",
|
|
@@ -912,7 +912,7 @@ var ko = 8, Lo = {
|
|
|
912
912
|
value: "number"
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
|
-
},
|
|
915
|
+
}, zo = {
|
|
916
916
|
type: {
|
|
917
917
|
required: !0,
|
|
918
918
|
type: "enum",
|
|
@@ -934,7 +934,7 @@ var ko = 8, Lo = {
|
|
|
934
934
|
value: "number"
|
|
935
935
|
}
|
|
936
936
|
}
|
|
937
|
-
},
|
|
937
|
+
}, Ro = {
|
|
938
938
|
id: {
|
|
939
939
|
type: "string",
|
|
940
940
|
required: !0
|
|
@@ -982,7 +982,7 @@ var ko = 8, Lo = {
|
|
|
982
982
|
paint: {
|
|
983
983
|
type: "paint"
|
|
984
984
|
}
|
|
985
|
-
},
|
|
985
|
+
}, Po = [
|
|
986
986
|
"layout_fill",
|
|
987
987
|
"layout_line",
|
|
988
988
|
"layout_circle",
|
|
@@ -992,7 +992,7 @@ var ko = 8, Lo = {
|
|
|
992
992
|
"layout_raster",
|
|
993
993
|
"layout_hillshade",
|
|
994
994
|
"layout_background"
|
|
995
|
-
],
|
|
995
|
+
], $o = {
|
|
996
996
|
visibility: {
|
|
997
997
|
type: "enum",
|
|
998
998
|
values: {
|
|
@@ -1977,7 +1977,7 @@ var ko = 8, Lo = {
|
|
|
1977
1977
|
default: "visible",
|
|
1978
1978
|
"property-type": "constant"
|
|
1979
1979
|
}
|
|
1980
|
-
},
|
|
1980
|
+
}, Bo = {
|
|
1981
1981
|
visibility: {
|
|
1982
1982
|
type: "enum",
|
|
1983
1983
|
values: {
|
|
@@ -1987,7 +1987,7 @@ var ko = 8, Lo = {
|
|
|
1987
1987
|
default: "visible",
|
|
1988
1988
|
"property-type": "constant"
|
|
1989
1989
|
}
|
|
1990
|
-
},
|
|
1990
|
+
}, Uo = {
|
|
1991
1991
|
type: "array",
|
|
1992
1992
|
value: "*"
|
|
1993
1993
|
}, Vo = {
|
|
@@ -3305,14 +3305,14 @@ var ko = 8, Lo = {
|
|
|
3305
3305
|
sources: Co,
|
|
3306
3306
|
source: Ao,
|
|
3307
3307
|
source_vector: To,
|
|
3308
|
-
source_raster:
|
|
3309
|
-
source_raster_dem:
|
|
3310
|
-
source_geojson:
|
|
3311
|
-
source_video:
|
|
3312
|
-
source_image:
|
|
3313
|
-
layer:
|
|
3314
|
-
layout:
|
|
3315
|
-
layout_background:
|
|
3308
|
+
source_raster: Eo,
|
|
3309
|
+
source_raster_dem: Io,
|
|
3310
|
+
source_geojson: Mo,
|
|
3311
|
+
source_video: _o,
|
|
3312
|
+
source_image: zo,
|
|
3313
|
+
layer: Ro,
|
|
3314
|
+
layout: Po,
|
|
3315
|
+
layout_background: $o,
|
|
3316
3316
|
layout_fill: No,
|
|
3317
3317
|
layout_circle: Fo,
|
|
3318
3318
|
layout_heatmap: Oo,
|
|
@@ -3330,8 +3330,8 @@ var ko = 8, Lo = {
|
|
|
3330
3330
|
layout_line: Do,
|
|
3331
3331
|
layout_symbol: jo,
|
|
3332
3332
|
layout_raster: qo,
|
|
3333
|
-
layout_hillshade:
|
|
3334
|
-
filter:
|
|
3333
|
+
layout_hillshade: Bo,
|
|
3334
|
+
filter: Uo,
|
|
3335
3335
|
filter_operator: Vo,
|
|
3336
3336
|
geometry_type: Go,
|
|
3337
3337
|
function: {
|
|
@@ -3579,7 +3579,7 @@ class tr {
|
|
|
3579
3579
|
return this.bindings[e] ? !0 : this.parent ? this.parent.has(e) : !1;
|
|
3580
3580
|
}
|
|
3581
3581
|
}
|
|
3582
|
-
const ht = { kind: "null" }, g = { kind: "number" }, A = { kind: "string" }, L = { kind: "boolean" }, ne = { kind: "color" },
|
|
3582
|
+
const ht = { kind: "null" }, g = { kind: "number" }, A = { kind: "string" }, L = { kind: "boolean" }, ne = { kind: "color" }, ze = { kind: "object" }, C = { kind: "value" }, ci = { kind: "error" }, gt = { kind: "collator" }, vt = { kind: "formatted" }, bt = { kind: "padding" }, Je = { kind: "resolvedImage" }, wt = { kind: "variableAnchorOffsetCollection" };
|
|
3583
3583
|
function W(r, e) {
|
|
3584
3584
|
return {
|
|
3585
3585
|
kind: "array",
|
|
@@ -3601,24 +3601,24 @@ const pi = [
|
|
|
3601
3601
|
L,
|
|
3602
3602
|
ne,
|
|
3603
3603
|
vt,
|
|
3604
|
-
|
|
3604
|
+
ze,
|
|
3605
3605
|
W(C),
|
|
3606
3606
|
bt,
|
|
3607
3607
|
Je,
|
|
3608
3608
|
wt
|
|
3609
3609
|
];
|
|
3610
|
-
function
|
|
3610
|
+
function Ue(r, e) {
|
|
3611
3611
|
if (e.kind === "error")
|
|
3612
3612
|
return null;
|
|
3613
3613
|
if (r.kind === "array") {
|
|
3614
|
-
if (e.kind === "array" && (e.N === 0 && e.itemType.kind === "value" || !
|
|
3614
|
+
if (e.kind === "array" && (e.N === 0 && e.itemType.kind === "value" || !Ue(r.itemType, e.itemType)) && (typeof r.N != "number" || r.N === e.N))
|
|
3615
3615
|
return null;
|
|
3616
3616
|
} else {
|
|
3617
3617
|
if (r.kind === e.kind)
|
|
3618
3618
|
return null;
|
|
3619
3619
|
if (r.kind === "value") {
|
|
3620
3620
|
for (const t of pi)
|
|
3621
|
-
if (!
|
|
3621
|
+
if (!Ue(t, e))
|
|
3622
3622
|
return null;
|
|
3623
3623
|
}
|
|
3624
3624
|
}
|
|
@@ -3633,19 +3633,19 @@ function Se(r, e) {
|
|
|
3633
3633
|
function De(r, e) {
|
|
3634
3634
|
return r.kind === "array" && e.kind === "array" ? r.itemType.kind === e.itemType.kind && typeof r.N == "number" : r.kind === e.kind;
|
|
3635
3635
|
}
|
|
3636
|
-
const bn = 0.96422, wn = 1, Sn = 0.82521, xn = 4 / 29,
|
|
3636
|
+
const bn = 0.96422, wn = 1, Sn = 0.82521, xn = 4 / 29, Re = 6 / 29, kn = 3 * Re * Re, fi = Re * Re * Re, di = Math.PI / 180, yi = 180 / Math.PI;
|
|
3637
3637
|
function Ln(r) {
|
|
3638
3638
|
return r = r % 360, r < 0 && (r += 360), r;
|
|
3639
3639
|
}
|
|
3640
3640
|
function Cn([r, e, t, n]) {
|
|
3641
|
-
r =
|
|
3641
|
+
r = $t(r), e = $t(e), t = $t(t);
|
|
3642
3642
|
let a, o;
|
|
3643
3643
|
const i = Nt((0.2225045 * r + 0.7168786 * e + 0.0606169 * t) / wn);
|
|
3644
3644
|
r === e && e === t ? a = o = i : (a = Nt((0.4360747 * r + 0.3850649 * e + 0.1430804 * t) / bn), o = Nt((0.0139322 * r + 0.0971045 * e + 0.7141733 * t) / Sn));
|
|
3645
3645
|
const s = 116 * i - 16;
|
|
3646
3646
|
return [s < 0 ? 0 : s, 500 * (a - i), 200 * (i - o), n];
|
|
3647
3647
|
}
|
|
3648
|
-
function
|
|
3648
|
+
function $t(r) {
|
|
3649
3649
|
return r <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
|
|
3650
3650
|
}
|
|
3651
3651
|
function Nt(r) {
|
|
@@ -3665,7 +3665,7 @@ function Ft(r) {
|
|
|
3665
3665
|
return r = r <= 304e-5 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - 0.055, r < 0 ? 0 : r > 1 ? 1 : r;
|
|
3666
3666
|
}
|
|
3667
3667
|
function Ot(r) {
|
|
3668
|
-
return r >
|
|
3668
|
+
return r > Re ? r * r * r : kn * (r - xn);
|
|
3669
3669
|
}
|
|
3670
3670
|
function mi(r) {
|
|
3671
3671
|
const [e, t, n, a] = Cn(r), o = Math.sqrt(t * t + n * n);
|
|
@@ -3730,16 +3730,16 @@ function vi(r) {
|
|
|
3730
3730
|
// % (optional)
|
|
3731
3731
|
] = o, b = [u || " ", y || " ", m].join("");
|
|
3732
3732
|
if (b === " " || b === " /" || b === ",," || b === ",,,") {
|
|
3733
|
-
const T = [l, p, d].join(""),
|
|
3734
|
-
if (
|
|
3735
|
-
const
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3733
|
+
const T = [l, p, d].join(""), $ = T === "%%%" ? 100 : T === "" ? 255 : 0;
|
|
3734
|
+
if ($) {
|
|
3735
|
+
const P = [
|
|
3736
|
+
Ie(+s / $, 0, 1),
|
|
3737
|
+
Ie(+c / $, 0, 1),
|
|
3738
|
+
Ie(+f / $, 0, 1),
|
|
3739
3739
|
v ? Nr(+v, w) : 1
|
|
3740
3740
|
];
|
|
3741
|
-
if (Fr(
|
|
3742
|
-
return
|
|
3741
|
+
if (Fr(P))
|
|
3742
|
+
return P;
|
|
3743
3743
|
}
|
|
3744
3744
|
}
|
|
3745
3745
|
return;
|
|
@@ -3770,8 +3770,8 @@ function vi(r) {
|
|
|
3770
3770
|
if (f === " " || f === " /" || f === ",," || f === ",,,") {
|
|
3771
3771
|
const d = [
|
|
3772
3772
|
+o,
|
|
3773
|
-
|
|
3774
|
-
|
|
3773
|
+
Ie(+s, 0, 100),
|
|
3774
|
+
Ie(+u, 0, 100),
|
|
3775
3775
|
p ? Nr(+p, y) : 1
|
|
3776
3776
|
];
|
|
3777
3777
|
if (Fr(d))
|
|
@@ -3783,9 +3783,9 @@ function et(r) {
|
|
|
3783
3783
|
return parseInt(r.padEnd(2, r), 16) / 255;
|
|
3784
3784
|
}
|
|
3785
3785
|
function Nr(r, e) {
|
|
3786
|
-
return
|
|
3786
|
+
return Ie(e ? r / 100 : r, 0, 1);
|
|
3787
3787
|
}
|
|
3788
|
-
function
|
|
3788
|
+
function Ie(r, e, t) {
|
|
3789
3789
|
return Math.min(Math.max(e, r), t);
|
|
3790
3790
|
}
|
|
3791
3791
|
function Fr(r) {
|
|
@@ -4199,13 +4199,13 @@ function j(r) {
|
|
|
4199
4199
|
}
|
|
4200
4200
|
return W(t || C, e);
|
|
4201
4201
|
} else
|
|
4202
|
-
return
|
|
4202
|
+
return ze;
|
|
4203
4203
|
}
|
|
4204
4204
|
function qe(r) {
|
|
4205
4205
|
const e = typeof r;
|
|
4206
4206
|
return r === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(r) : r instanceof F || r instanceof ue || r instanceof ae || r instanceof ce || r instanceof he ? r.toString() : JSON.stringify(r);
|
|
4207
4207
|
}
|
|
4208
|
-
class
|
|
4208
|
+
class Pe {
|
|
4209
4209
|
constructor(e, t) {
|
|
4210
4210
|
this.type = e, this.value = t;
|
|
4211
4211
|
}
|
|
@@ -4217,7 +4217,7 @@ class $e {
|
|
|
4217
4217
|
const n = e[1];
|
|
4218
4218
|
let a = j(n);
|
|
4219
4219
|
const o = t.expectedType;
|
|
4220
|
-
return a.kind === "array" && a.N === 0 && o && o.kind === "array" && (typeof o.N != "number" || o.N === 0) && (a = o), new
|
|
4220
|
+
return a.kind === "array" && a.N === 0 && o && o.kind === "array" && (typeof o.N != "number" || o.N === 0) && (a = o), new Pe(a, n);
|
|
4221
4221
|
}
|
|
4222
4222
|
evaluate() {
|
|
4223
4223
|
return this.value;
|
|
@@ -4240,7 +4240,7 @@ const tt = {
|
|
|
4240
4240
|
string: A,
|
|
4241
4241
|
number: g,
|
|
4242
4242
|
boolean: L,
|
|
4243
|
-
object:
|
|
4243
|
+
object: ze
|
|
4244
4244
|
};
|
|
4245
4245
|
class Q {
|
|
4246
4246
|
constructor(e, t) {
|
|
@@ -4284,7 +4284,7 @@ class Q {
|
|
|
4284
4284
|
evaluate(e) {
|
|
4285
4285
|
for (let t = 0; t < this.args.length; t++) {
|
|
4286
4286
|
const n = this.args[t].evaluate(e);
|
|
4287
|
-
if (
|
|
4287
|
+
if (Ue(this.type, j(n))) {
|
|
4288
4288
|
if (t === this.args.length - 1)
|
|
4289
4289
|
throw new D(`Expected value to be of type ${N(this.type)}, but found ${N(j(n))} instead.`);
|
|
4290
4290
|
} else return n;
|
|
@@ -4390,7 +4390,7 @@ class me {
|
|
|
4390
4390
|
}
|
|
4391
4391
|
}
|
|
4392
4392
|
const Si = ["Unknown", "Point", "LineString", "Polygon"];
|
|
4393
|
-
class
|
|
4393
|
+
class En {
|
|
4394
4394
|
constructor() {
|
|
4395
4395
|
this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null, this._parseColorCache = {}, this.availableImages = null, this.canonical = null;
|
|
4396
4396
|
}
|
|
@@ -4457,10 +4457,10 @@ class St {
|
|
|
4457
4457
|
else if (this.checkSubtype(s, l))
|
|
4458
4458
|
return null;
|
|
4459
4459
|
}
|
|
4460
|
-
if (!(i instanceof
|
|
4461
|
-
const s = new
|
|
4460
|
+
if (!(i instanceof Pe) && i.type.kind !== "resolvedImage" && this._isConstant(i)) {
|
|
4461
|
+
const s = new En();
|
|
4462
4462
|
try {
|
|
4463
|
-
i = new
|
|
4463
|
+
i = new Pe(i.type, i.evaluate(s));
|
|
4464
4464
|
} catch (l) {
|
|
4465
4465
|
return this.error(l.message), null;
|
|
4466
4466
|
}
|
|
@@ -4501,7 +4501,7 @@ class St {
|
|
|
4501
4501
|
* @returns null if `t` is a subtype of `expected`; otherwise returns an error message
|
|
4502
4502
|
*/
|
|
4503
4503
|
checkSubtype(e, t) {
|
|
4504
|
-
const n =
|
|
4504
|
+
const n = Ue(e, t);
|
|
4505
4505
|
return n && this.error(n), n;
|
|
4506
4506
|
}
|
|
4507
4507
|
}
|
|
@@ -4787,7 +4787,7 @@ class lt {
|
|
|
4787
4787
|
return !1;
|
|
4788
4788
|
}
|
|
4789
4789
|
}
|
|
4790
|
-
function
|
|
4790
|
+
function In(r, e) {
|
|
4791
4791
|
const t = r.length - 1;
|
|
4792
4792
|
let n = 0, a = t, o = 0, i, s;
|
|
4793
4793
|
for (; n <= a; )
|
|
@@ -4841,7 +4841,7 @@ class Lt {
|
|
|
4841
4841
|
const o = t.length;
|
|
4842
4842
|
if (a >= t[o - 1])
|
|
4843
4843
|
return n[o - 1].evaluate(e);
|
|
4844
|
-
const i =
|
|
4844
|
+
const i = In(t, a);
|
|
4845
4845
|
return n[i].evaluate(e);
|
|
4846
4846
|
}
|
|
4847
4847
|
eachChild(e) {
|
|
@@ -4856,11 +4856,11 @@ class Lt {
|
|
|
4856
4856
|
function xi(r) {
|
|
4857
4857
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
4858
4858
|
}
|
|
4859
|
-
var ki =
|
|
4860
|
-
function
|
|
4859
|
+
var ki = Mn;
|
|
4860
|
+
function Mn(r, e, t, n) {
|
|
4861
4861
|
this.cx = 3 * r, this.bx = 3 * (t - r) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * e, this.by = 3 * (n - e) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = r, this.p1y = e, this.p2x = t, this.p2y = n;
|
|
4862
4862
|
}
|
|
4863
|
-
|
|
4863
|
+
Mn.prototype = {
|
|
4864
4864
|
sampleCurveX: function(r) {
|
|
4865
4865
|
return ((this.ax * r + this.bx) * r + this.cx) * r;
|
|
4866
4866
|
},
|
|
@@ -5021,7 +5021,7 @@ class oe {
|
|
|
5021
5021
|
const o = t.length;
|
|
5022
5022
|
if (a >= t[o - 1])
|
|
5023
5023
|
return n[o - 1].evaluate(e);
|
|
5024
|
-
const i =
|
|
5024
|
+
const i = In(t, a), s = t[i], l = t[i + 1], u = oe.interpolationFactor(this.interpolation, a, s, l), c = n[i].evaluate(e), p = n[i + 1].evaluate(e);
|
|
5025
5025
|
switch (this.operator) {
|
|
5026
5026
|
case "interpolate":
|
|
5027
5027
|
return Dt[this.type.kind](c, p, u);
|
|
@@ -5063,7 +5063,7 @@ class Ge {
|
|
|
5063
5063
|
}
|
|
5064
5064
|
if (!n)
|
|
5065
5065
|
throw new Error("No output type");
|
|
5066
|
-
return a && o.some((s) =>
|
|
5066
|
+
return a && o.some((s) => Ue(a, s.type)) ? new Ge(C, o) : new Ge(n, o);
|
|
5067
5067
|
}
|
|
5068
5068
|
evaluate(e) {
|
|
5069
5069
|
let t = null, n = 0, a;
|
|
@@ -5082,31 +5082,31 @@ class Ge {
|
|
|
5082
5082
|
function Dr(r, e) {
|
|
5083
5083
|
return r === "==" || r === "!=" ? e.kind === "boolean" || e.kind === "string" || e.kind === "number" || e.kind === "null" || e.kind === "value" : e.kind === "string" || e.kind === "number" || e.kind === "value";
|
|
5084
5084
|
}
|
|
5085
|
-
function
|
|
5085
|
+
function Ei(r, e, t) {
|
|
5086
5086
|
return e === t;
|
|
5087
5087
|
}
|
|
5088
|
-
function
|
|
5088
|
+
function Ii(r, e, t) {
|
|
5089
5089
|
return e !== t;
|
|
5090
5090
|
}
|
|
5091
|
-
function
|
|
5091
|
+
function Mi(r, e, t) {
|
|
5092
5092
|
return e < t;
|
|
5093
5093
|
}
|
|
5094
|
-
function
|
|
5094
|
+
function _i(r, e, t) {
|
|
5095
5095
|
return e > t;
|
|
5096
5096
|
}
|
|
5097
|
-
function
|
|
5097
|
+
function zi(r, e, t) {
|
|
5098
5098
|
return e <= t;
|
|
5099
5099
|
}
|
|
5100
|
-
function
|
|
5100
|
+
function Ri(r, e, t) {
|
|
5101
5101
|
return e >= t;
|
|
5102
5102
|
}
|
|
5103
|
-
function
|
|
5103
|
+
function _n(r, e, t, n) {
|
|
5104
5104
|
return n.compare(e, t) === 0;
|
|
5105
5105
|
}
|
|
5106
|
-
function
|
|
5107
|
-
return !
|
|
5106
|
+
function Pi(r, e, t, n) {
|
|
5107
|
+
return !_n(r, e, t, n);
|
|
5108
5108
|
}
|
|
5109
|
-
function
|
|
5109
|
+
function $i(r, e, t, n) {
|
|
5110
5110
|
return n.compare(e, t) < 0;
|
|
5111
5111
|
}
|
|
5112
5112
|
function Ni(r, e, t, n) {
|
|
@@ -5120,7 +5120,7 @@ function Oi(r, e, t, n) {
|
|
|
5120
5120
|
}
|
|
5121
5121
|
function Ne(r, e, t) {
|
|
5122
5122
|
const n = r !== "==" && r !== "!=";
|
|
5123
|
-
return class
|
|
5123
|
+
return class zn {
|
|
5124
5124
|
constructor(o, i, s) {
|
|
5125
5125
|
this.type = L, this.lhs = o, this.rhs = i, this.collator = s, this.hasUntypedArgument = o.type.kind === "value" || i.type.kind === "value";
|
|
5126
5126
|
}
|
|
@@ -5148,7 +5148,7 @@ function Ne(r, e, t) {
|
|
|
5148
5148
|
if (c = i.parse(o[3], 3, gt), !c)
|
|
5149
5149
|
return null;
|
|
5150
5150
|
}
|
|
5151
|
-
return new
|
|
5151
|
+
return new zn(l, u, c);
|
|
5152
5152
|
}
|
|
5153
5153
|
evaluate(o) {
|
|
5154
5154
|
const i = this.lhs.evaluate(o), s = this.rhs.evaluate(o);
|
|
@@ -5172,7 +5172,7 @@ function Ne(r, e, t) {
|
|
|
5172
5172
|
}
|
|
5173
5173
|
};
|
|
5174
5174
|
}
|
|
5175
|
-
const Di = Ne("==",
|
|
5175
|
+
const Di = Ne("==", Ei, _n), ji = Ne("!=", Ii, Pi), qi = Ne("<", Mi, $i), Bi = Ne(">", _i, Ni), Ui = Ne("<=", zi, Fi), Vi = Ne(">=", Ri, Oi);
|
|
5176
5176
|
class Ct {
|
|
5177
5177
|
constructor(e, t, n) {
|
|
5178
5178
|
this.type = gt, this.locale = n, this.caseSensitive = e, this.diacriticSensitive = t;
|
|
@@ -5403,7 +5403,7 @@ function Qi(r, e) {
|
|
|
5403
5403
|
return !0;
|
|
5404
5404
|
return !1;
|
|
5405
5405
|
}
|
|
5406
|
-
function
|
|
5406
|
+
function Rn(r, e) {
|
|
5407
5407
|
for (const t of r)
|
|
5408
5408
|
if (!Fe(t, e))
|
|
5409
5409
|
return !1;
|
|
@@ -5414,7 +5414,7 @@ function Pn(r, e) {
|
|
|
5414
5414
|
}
|
|
5415
5415
|
function es(r, e) {
|
|
5416
5416
|
for (const t of e)
|
|
5417
|
-
if (
|
|
5417
|
+
if (Rn(r, t))
|
|
5418
5418
|
return !0;
|
|
5419
5419
|
return !1;
|
|
5420
5420
|
}
|
|
@@ -5437,7 +5437,7 @@ function dr(r, e, t) {
|
|
|
5437
5437
|
}
|
|
5438
5438
|
return n;
|
|
5439
5439
|
}
|
|
5440
|
-
function
|
|
5440
|
+
function Pn(r, e, t) {
|
|
5441
5441
|
const n = [];
|
|
5442
5442
|
for (let a = 0; a < r.length; a++) {
|
|
5443
5443
|
const o = dr(r[a], e, t);
|
|
@@ -5445,7 +5445,7 @@ function $n(r, e, t) {
|
|
|
5445
5445
|
}
|
|
5446
5446
|
return n;
|
|
5447
5447
|
}
|
|
5448
|
-
function
|
|
5448
|
+
function $n(r, e, t, n) {
|
|
5449
5449
|
if (r[0] < t[0] || r[0] > t[2]) {
|
|
5450
5450
|
const a = n * 0.5;
|
|
5451
5451
|
let o = r[0] - t[0] > a ? -n : t[0] - r[0] > a ? n : 0;
|
|
@@ -5461,11 +5461,11 @@ function qr(r, e, t, n) {
|
|
|
5461
5461
|
for (const s of r)
|
|
5462
5462
|
for (const l of s) {
|
|
5463
5463
|
const u = [l.x + o[0], l.y + o[1]];
|
|
5464
|
-
|
|
5464
|
+
$n(u, e, t, a), i.push(u);
|
|
5465
5465
|
}
|
|
5466
5466
|
return i;
|
|
5467
5467
|
}
|
|
5468
|
-
function
|
|
5468
|
+
function Br(r, e, t, n) {
|
|
5469
5469
|
const a = Math.pow(2, n.z) * ie, o = [n.x * ie, n.y * ie], i = [];
|
|
5470
5470
|
for (const s of r) {
|
|
5471
5471
|
const l = [];
|
|
@@ -5479,7 +5479,7 @@ function Ur(r, e, t, n) {
|
|
|
5479
5479
|
rs(e);
|
|
5480
5480
|
for (const s of i)
|
|
5481
5481
|
for (const l of s)
|
|
5482
|
-
|
|
5482
|
+
$n(l, e, t, a);
|
|
5483
5483
|
}
|
|
5484
5484
|
return i;
|
|
5485
5485
|
}
|
|
@@ -5494,7 +5494,7 @@ function ns(r, e) {
|
|
|
5494
5494
|
return !1;
|
|
5495
5495
|
}
|
|
5496
5496
|
if (e.type === "MultiPolygon") {
|
|
5497
|
-
const o =
|
|
5497
|
+
const o = Pn(e.coordinates, n, a), i = qr(r.geometry(), t, n, a);
|
|
5498
5498
|
if (!He(t, n))
|
|
5499
5499
|
return !1;
|
|
5500
5500
|
for (const s of i)
|
|
@@ -5506,15 +5506,15 @@ function ns(r, e) {
|
|
|
5506
5506
|
function as(r, e) {
|
|
5507
5507
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
|
|
5508
5508
|
if (e.type === "Polygon") {
|
|
5509
|
-
const o = dr(e.coordinates, n, a), i =
|
|
5509
|
+
const o = dr(e.coordinates, n, a), i = Br(r.geometry(), t, n, a);
|
|
5510
5510
|
if (!He(t, n))
|
|
5511
5511
|
return !1;
|
|
5512
5512
|
for (const s of i)
|
|
5513
|
-
if (!
|
|
5513
|
+
if (!Rn(s, o))
|
|
5514
5514
|
return !1;
|
|
5515
5515
|
}
|
|
5516
5516
|
if (e.type === "MultiPolygon") {
|
|
5517
|
-
const o =
|
|
5517
|
+
const o = Pn(e.coordinates, n, a), i = Br(r.geometry(), t, n, a);
|
|
5518
5518
|
if (!He(t, n))
|
|
5519
5519
|
return !1;
|
|
5520
5520
|
for (const s of i)
|
|
@@ -5622,7 +5622,7 @@ function is(r) {
|
|
|
5622
5622
|
o = r[t], i = r[a], e += (i.x - o.x) * (o.y + i.y);
|
|
5623
5623
|
return e;
|
|
5624
5624
|
}
|
|
5625
|
-
const ss = 6378.137,
|
|
5625
|
+
const ss = 6378.137, Ur = 1 / 298.257223563, Vr = Ur * (2 - Ur), Gr = Math.PI / 180;
|
|
5626
5626
|
class yr {
|
|
5627
5627
|
constructor(e) {
|
|
5628
5628
|
const t = Gr * ss * 1e3, n = Math.cos(e * Gr), a = 1 / (1 - Vr * (1 - n * n)), o = Math.sqrt(a);
|
|
@@ -6026,10 +6026,10 @@ const gr = {
|
|
|
6026
6026
|
// special forms
|
|
6027
6027
|
"==": Di,
|
|
6028
6028
|
"!=": ji,
|
|
6029
|
-
">":
|
|
6029
|
+
">": Bi,
|
|
6030
6030
|
"<": qi,
|
|
6031
6031
|
">=": Vi,
|
|
6032
|
-
"<=":
|
|
6032
|
+
"<=": Ui,
|
|
6033
6033
|
array: Q,
|
|
6034
6034
|
at: ar,
|
|
6035
6035
|
boolean: Q,
|
|
@@ -6045,7 +6045,7 @@ const gr = {
|
|
|
6045
6045
|
"interpolate-lab": oe,
|
|
6046
6046
|
length: pr,
|
|
6047
6047
|
let: xt,
|
|
6048
|
-
literal:
|
|
6048
|
+
literal: Pe,
|
|
6049
6049
|
match: ir,
|
|
6050
6050
|
number: Q,
|
|
6051
6051
|
"number-format": lr,
|
|
@@ -6136,7 +6136,7 @@ function Zr(r, [e, t, n, a]) {
|
|
|
6136
6136
|
function Jr(r, e) {
|
|
6137
6137
|
return r in e;
|
|
6138
6138
|
}
|
|
6139
|
-
function
|
|
6139
|
+
function Bt(r, e) {
|
|
6140
6140
|
const t = e[r];
|
|
6141
6141
|
return typeof t > "u" ? null : t;
|
|
6142
6142
|
}
|
|
@@ -6191,7 +6191,7 @@ ee.register(gr, {
|
|
|
6191
6191
|
(r, [e]) => Jr(e.evaluate(r), r.properties())
|
|
6192
6192
|
],
|
|
6193
6193
|
[
|
|
6194
|
-
[A,
|
|
6194
|
+
[A, ze],
|
|
6195
6195
|
(r, [e, t]) => Jr(e.evaluate(r), t.evaluate(r))
|
|
6196
6196
|
]
|
|
6197
6197
|
]
|
|
@@ -6201,21 +6201,21 @@ ee.register(gr, {
|
|
|
6201
6201
|
overloads: [
|
|
6202
6202
|
[
|
|
6203
6203
|
[A],
|
|
6204
|
-
(r, [e]) =>
|
|
6204
|
+
(r, [e]) => Bt(e.evaluate(r), r.properties())
|
|
6205
6205
|
],
|
|
6206
6206
|
[
|
|
6207
|
-
[A,
|
|
6208
|
-
(r, [e, t]) =>
|
|
6207
|
+
[A, ze],
|
|
6208
|
+
(r, [e, t]) => Bt(e.evaluate(r), t.evaluate(r))
|
|
6209
6209
|
]
|
|
6210
6210
|
]
|
|
6211
6211
|
},
|
|
6212
6212
|
"feature-state": [
|
|
6213
6213
|
C,
|
|
6214
6214
|
[A],
|
|
6215
|
-
(r, [e]) =>
|
|
6215
|
+
(r, [e]) => Bt(e.evaluate(r), r.featureState || {})
|
|
6216
6216
|
],
|
|
6217
6217
|
properties: [
|
|
6218
|
-
|
|
6218
|
+
ze,
|
|
6219
6219
|
[],
|
|
6220
6220
|
(r) => r.properties()
|
|
6221
6221
|
],
|
|
@@ -6594,8 +6594,8 @@ function dt(r) {
|
|
|
6594
6594
|
const e = r instanceof me || r instanceof Q;
|
|
6595
6595
|
let t = !0;
|
|
6596
6596
|
return r.eachChild((n) => {
|
|
6597
|
-
e ? t = t && dt(n) : t = t && n instanceof
|
|
6598
|
-
}), t ? Tt(r) &&
|
|
6597
|
+
e ? t = t && dt(n) : t = t && n instanceof Pe;
|
|
6598
|
+
}), t ? Tt(r) && Et(r, ["zoom", "heatmap-density", "line-progress", "accumulated", "is-supported-script"]) : !1;
|
|
6599
6599
|
}
|
|
6600
6600
|
function Tt(r) {
|
|
6601
6601
|
if (r instanceof ee) {
|
|
@@ -6625,18 +6625,18 @@ function Ke(r) {
|
|
|
6625
6625
|
e && !Ke(t) && (e = !1);
|
|
6626
6626
|
}), e;
|
|
6627
6627
|
}
|
|
6628
|
-
function
|
|
6628
|
+
function Et(r, e) {
|
|
6629
6629
|
if (r instanceof ee && e.indexOf(r.name) >= 0)
|
|
6630
6630
|
return !1;
|
|
6631
6631
|
let t = !0;
|
|
6632
6632
|
return r.eachChild((n) => {
|
|
6633
|
-
t && !
|
|
6633
|
+
t && !Et(n, e) && (t = !1);
|
|
6634
6634
|
}), t;
|
|
6635
6635
|
}
|
|
6636
6636
|
function Qt(r) {
|
|
6637
6637
|
return { result: "success", value: r };
|
|
6638
6638
|
}
|
|
6639
|
-
function
|
|
6639
|
+
function Me(r) {
|
|
6640
6640
|
return { result: "error", value: r };
|
|
6641
6641
|
}
|
|
6642
6642
|
function yt(r) {
|
|
@@ -6648,7 +6648,7 @@ function On(r) {
|
|
|
6648
6648
|
function Dn(r) {
|
|
6649
6649
|
return !!r.expression && r.expression.interpolated;
|
|
6650
6650
|
}
|
|
6651
|
-
function
|
|
6651
|
+
function _(r) {
|
|
6652
6652
|
return r instanceof Number ? "number" : r instanceof String ? "string" : r instanceof Boolean ? "boolean" : Array.isArray(r) ? "array" : r === null ? "null" : typeof r;
|
|
6653
6653
|
}
|
|
6654
6654
|
function vr(r) {
|
|
@@ -6656,7 +6656,7 @@ function vr(r) {
|
|
|
6656
6656
|
}
|
|
6657
6657
|
class vs {
|
|
6658
6658
|
constructor(e, t) {
|
|
6659
|
-
this.expression = e, this._warningHistory = {}, this._evaluator = new
|
|
6659
|
+
this.expression = e, this._warningHistory = {}, this._evaluator = new En(), this._defaultValue = t ? Ss(t) : null, this._enumValues = t && t.type === "enum" ? t.values : null;
|
|
6660
6660
|
}
|
|
6661
6661
|
evaluateWithoutErrorHandling(e, t, n, a, o, i) {
|
|
6662
6662
|
return this._evaluator.globals = e, this._evaluator.feature = t, this._evaluator.featureState = n, this._evaluator.canonical = a, this._evaluator.availableImages = o || null, this._evaluator.formattedSection = i, this.expression.evaluate(this._evaluator);
|
|
@@ -6680,7 +6680,7 @@ function jn(r) {
|
|
|
6680
6680
|
}
|
|
6681
6681
|
function qn(r, e) {
|
|
6682
6682
|
const t = new St(gr, dt, [], e ? ws(e) : void 0), n = t.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
|
|
6683
|
-
return n ? Qt(new vs(n, e)) :
|
|
6683
|
+
return n ? Qt(new vs(n, e)) : Me(t.errors);
|
|
6684
6684
|
}
|
|
6685
6685
|
class Yr {
|
|
6686
6686
|
constructor(e, t) {
|
|
@@ -6713,17 +6713,17 @@ function bs(r, e) {
|
|
|
6713
6713
|
return t;
|
|
6714
6714
|
const n = t.value.expression, a = Tt(n);
|
|
6715
6715
|
if (!a && !yt(e))
|
|
6716
|
-
return
|
|
6717
|
-
const o =
|
|
6716
|
+
return Me([new re("", "data expressions not supported")]);
|
|
6717
|
+
const o = Et(n, ["zoom"]);
|
|
6718
6718
|
if (!o && !On(e))
|
|
6719
|
-
return
|
|
6719
|
+
return Me([new re("", "zoom expressions not supported")]);
|
|
6720
6720
|
const i = at(n);
|
|
6721
6721
|
if (!i && !o)
|
|
6722
|
-
return
|
|
6722
|
+
return Me([new re("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);
|
|
6723
6723
|
if (i instanceof re)
|
|
6724
|
-
return
|
|
6724
|
+
return Me([i]);
|
|
6725
6725
|
if (i instanceof oe && !Dn(e))
|
|
6726
|
-
return
|
|
6726
|
+
return Me([new re("", '"interpolate" expressions cannot be used with this property')]);
|
|
6727
6727
|
if (!i)
|
|
6728
6728
|
return Qt(a ? new Yr("constant", t.value) : new Yr("source", t.value));
|
|
6729
6729
|
const s = i instanceof oe ? i.interpolation : void 0;
|
|
@@ -6760,7 +6760,7 @@ function ws(r) {
|
|
|
6760
6760
|
function Ss(r) {
|
|
6761
6761
|
return r.type === "color" && vr(r.default) ? new F(0, 0, 0, 0) : r.type === "color" ? F.parse(r.default) || null : r.type === "padding" ? ae.parse(r.default) || null : r.type === "variableAnchorOffsetCollection" ? ce.parse(r.default) || null : r.default === void 0 ? null : r.default;
|
|
6762
6762
|
}
|
|
6763
|
-
function
|
|
6763
|
+
function Bn(r) {
|
|
6764
6764
|
if (r === !0 || r === !1)
|
|
6765
6765
|
return !0;
|
|
6766
6766
|
if (!Array.isArray(r) || r.length === 0)
|
|
@@ -6784,14 +6784,14 @@ function Un(r) {
|
|
|
6784
6784
|
case "any":
|
|
6785
6785
|
case "all":
|
|
6786
6786
|
for (const e of r.slice(1))
|
|
6787
|
-
if (!
|
|
6787
|
+
if (!Bn(e) && typeof e != "boolean")
|
|
6788
6788
|
return !1;
|
|
6789
6789
|
return !0;
|
|
6790
6790
|
default:
|
|
6791
6791
|
return !0;
|
|
6792
6792
|
}
|
|
6793
6793
|
}
|
|
6794
|
-
function
|
|
6794
|
+
function Un(r) {
|
|
6795
6795
|
const e = r.key, t = r.value;
|
|
6796
6796
|
return t ? [new h(e, t, "constants have been deprecated as of v8")] : [];
|
|
6797
6797
|
}
|
|
@@ -6812,7 +6812,7 @@ function Te(r) {
|
|
|
6812
6812
|
function J(r) {
|
|
6813
6813
|
const e = r.key, t = r.value, n = r.valueSpec || {}, a = r.objectElementValidators || {}, o = r.style, i = r.styleSpec, s = r.validateSpec;
|
|
6814
6814
|
let l = [];
|
|
6815
|
-
const u =
|
|
6815
|
+
const u = _(t);
|
|
6816
6816
|
if (u !== "object")
|
|
6817
6817
|
return [new h(e, t, `object expected, ${u} found`)];
|
|
6818
6818
|
for (const c in t) {
|
|
@@ -6847,8 +6847,8 @@ function J(r) {
|
|
|
6847
6847
|
}
|
|
6848
6848
|
function br(r) {
|
|
6849
6849
|
const e = r.value, t = r.valueSpec, n = r.validateSpec, a = r.style, o = r.styleSpec, i = r.key, s = r.arrayElementValidator || n;
|
|
6850
|
-
if (
|
|
6851
|
-
return [new h(i, e, `array expected, ${
|
|
6850
|
+
if (_(e) !== "array")
|
|
6851
|
+
return [new h(i, e, `array expected, ${_(e)} found`)];
|
|
6852
6852
|
if (t.length && e.length !== t.length)
|
|
6853
6853
|
return [new h(i, e, `array length ${t.length} expected, length ${e.length} found`)];
|
|
6854
6854
|
if (t["min-length"] && e.length < t["min-length"])
|
|
@@ -6857,7 +6857,7 @@ function br(r) {
|
|
|
6857
6857
|
type: t.value,
|
|
6858
6858
|
values: t.values
|
|
6859
6859
|
};
|
|
6860
|
-
o.$version < 7 && (l.function = t.function),
|
|
6860
|
+
o.$version < 7 && (l.function = t.function), _(t.value) === "object" && (l = t.value);
|
|
6861
6861
|
let u = [];
|
|
6862
6862
|
for (let c = 0; c < e.length; c++)
|
|
6863
6863
|
u = u.concat(s({
|
|
@@ -6874,13 +6874,13 @@ function br(r) {
|
|
|
6874
6874
|
}
|
|
6875
6875
|
function wr(r) {
|
|
6876
6876
|
const e = r.key, t = r.value, n = r.valueSpec;
|
|
6877
|
-
let a =
|
|
6877
|
+
let a = _(t);
|
|
6878
6878
|
return a === "number" && t !== t && (a = "NaN"), a !== "number" ? [new h(e, t, `number expected, ${a} found`)] : "minimum" in n && t < n.minimum ? [new h(e, t, `${t} is less than the minimum value ${n.minimum}`)] : "maximum" in n && t > n.maximum ? [new h(e, t, `${t} is greater than the maximum value ${n.maximum}`)] : [];
|
|
6879
6879
|
}
|
|
6880
6880
|
function Vn(r) {
|
|
6881
6881
|
const e = r.valueSpec, t = O(r.value.type);
|
|
6882
6882
|
let n, a = {}, o, i;
|
|
6883
|
-
const s = t !== "categorical" && r.value.property === void 0, l = !s, u =
|
|
6883
|
+
const s = t !== "categorical" && r.value.property === void 0, l = !s, u = _(r.value.stops) === "array" && _(r.value.stops[0]) === "array" && _(r.value.stops[0][0]) === "object", c = J({
|
|
6884
6884
|
key: r.key,
|
|
6885
6885
|
value: r.value,
|
|
6886
6886
|
valueSpec: r.styleSpec.function,
|
|
@@ -6906,18 +6906,18 @@ function Vn(r) {
|
|
|
6906
6906
|
style: m.style,
|
|
6907
6907
|
styleSpec: m.styleSpec,
|
|
6908
6908
|
arrayElementValidator: y
|
|
6909
|
-
})),
|
|
6909
|
+
})), _(w) === "array" && w.length === 0 && v.push(new h(m.key, w, "array must have at least one stop")), v;
|
|
6910
6910
|
}
|
|
6911
6911
|
function y(m) {
|
|
6912
6912
|
let v = [];
|
|
6913
6913
|
const w = m.value, b = m.key;
|
|
6914
|
-
if (
|
|
6915
|
-
return [new h(b, w, `array expected, ${
|
|
6914
|
+
if (_(w) !== "array")
|
|
6915
|
+
return [new h(b, w, `array expected, ${_(w)} found`)];
|
|
6916
6916
|
if (w.length !== 2)
|
|
6917
6917
|
return [new h(b, w, `array length 2 expected, length ${w.length} found`)];
|
|
6918
6918
|
if (u) {
|
|
6919
|
-
if (
|
|
6920
|
-
return [new h(b, w, `object expected, ${
|
|
6919
|
+
if (_(w[0]) !== "object")
|
|
6920
|
+
return [new h(b, w, `object expected, ${_(w[0])} found`)];
|
|
6921
6921
|
if (w[0].zoom === void 0)
|
|
6922
6922
|
return [new h(b, w, "object stop key must have zoom")];
|
|
6923
6923
|
if (w[0].value === void 0)
|
|
@@ -6952,7 +6952,7 @@ function Vn(r) {
|
|
|
6952
6952
|
}));
|
|
6953
6953
|
}
|
|
6954
6954
|
function f(m, v) {
|
|
6955
|
-
const w =
|
|
6955
|
+
const w = _(m.value), b = O(m.value), T = m.value !== null ? m.value : v;
|
|
6956
6956
|
if (!n)
|
|
6957
6957
|
n = w;
|
|
6958
6958
|
else if (w !== n)
|
|
@@ -6960,8 +6960,8 @@ function Vn(r) {
|
|
|
6960
6960
|
if (w !== "number" && w !== "string" && w !== "boolean")
|
|
6961
6961
|
return [new h(m.key, T, "stop domain value must be a number, string, or boolean")];
|
|
6962
6962
|
if (w !== "number" && t !== "categorical") {
|
|
6963
|
-
let
|
|
6964
|
-
return yt(e) && t === void 0 && (
|
|
6963
|
+
let $ = `number expected, ${w} found`;
|
|
6964
|
+
return yt(e) && t === void 0 && ($ += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new h(m.key, T, $)];
|
|
6965
6965
|
}
|
|
6966
6966
|
return t === "categorical" && w === "number" && (!isFinite(b) || Math.floor(b) !== b) ? [new h(m.key, T, `integer expected, found ${b}`)] : t !== "categorical" && w === "number" && o !== void 0 && b < o ? [new h(m.key, T, "stop domain values must appear in ascending order")] : (o = b, t === "categorical" && b in a ? [new h(m.key, T, "stop domain values must be unique")] : (a[b] = !0, []));
|
|
6967
6967
|
}
|
|
@@ -6976,7 +6976,7 @@ function Vn(r) {
|
|
|
6976
6976
|
});
|
|
6977
6977
|
}
|
|
6978
6978
|
}
|
|
6979
|
-
function
|
|
6979
|
+
function $e(r) {
|
|
6980
6980
|
const e = (r.expressionContext === "property" ? bs : qn)(Te(r.value), r.valueSpec);
|
|
6981
6981
|
if (e.result === "error")
|
|
6982
6982
|
return e.value.map((n) => new h(`${r.key}${n.key}`, r.value, n.message));
|
|
@@ -6988,7 +6988,7 @@ function Re(r) {
|
|
|
6988
6988
|
if (r.expressionContext === "filter" && !Ke(t))
|
|
6989
6989
|
return [new h(r.key, r.value, '"feature-state" data expressions are not supported with filters.')];
|
|
6990
6990
|
if (r.expressionContext && r.expressionContext.indexOf("cluster") === 0) {
|
|
6991
|
-
if (!
|
|
6991
|
+
if (!Et(t, ["zoom", "feature-state"]))
|
|
6992
6992
|
return [new h(r.key, r.value, '"zoom" and "feature-state" expressions are not supported with cluster properties.')];
|
|
6993
6993
|
if (r.expressionContext === "cluster-initial" && !Tt(t))
|
|
6994
6994
|
return [new h(r.key, r.value, "Feature data expressions are not supported with initial expression part of cluster properties.")];
|
|
@@ -6996,11 +6996,11 @@ function Re(r) {
|
|
|
6996
6996
|
return [];
|
|
6997
6997
|
}
|
|
6998
6998
|
function xs(r) {
|
|
6999
|
-
const e = r.value, t = r.key, n =
|
|
6999
|
+
const e = r.value, t = r.key, n = _(e);
|
|
7000
7000
|
return n !== "boolean" ? [new h(t, e, `boolean expected, ${n} found`)] : [];
|
|
7001
7001
|
}
|
|
7002
7002
|
function ks(r) {
|
|
7003
|
-
const e = r.key, t = r.value, n =
|
|
7003
|
+
const e = r.key, t = r.value, n = _(t);
|
|
7004
7004
|
return n !== "string" ? [new h(e, t, `color expected, ${n} found`)] : F.parse(String(t)) ? [] : [new h(e, t, `color expected, "${t}" found`)];
|
|
7005
7005
|
}
|
|
7006
7006
|
function We(r) {
|
|
@@ -7008,15 +7008,15 @@ function We(r) {
|
|
|
7008
7008
|
return Array.isArray(n.values) ? n.values.indexOf(O(t)) === -1 && a.push(new h(e, t, `expected one of [${n.values.join(", ")}], ${JSON.stringify(t)} found`)) : Object.keys(n.values).indexOf(O(t)) === -1 && a.push(new h(e, t, `expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(t)} found`)), a;
|
|
7009
7009
|
}
|
|
7010
7010
|
function Sr(r) {
|
|
7011
|
-
return
|
|
7011
|
+
return Bn(Te(r.value)) ? $e(it({}, r, {
|
|
7012
7012
|
expressionContext: "filter",
|
|
7013
7013
|
valueSpec: { value: "boolean" }
|
|
7014
7014
|
})) : Gn(r);
|
|
7015
7015
|
}
|
|
7016
7016
|
function Gn(r) {
|
|
7017
7017
|
const e = r.value, t = r.key;
|
|
7018
|
-
if (
|
|
7019
|
-
return [new h(t, e, `array expected, ${
|
|
7018
|
+
if (_(e) !== "array")
|
|
7019
|
+
return [new h(t, e, `array expected, ${_(e)} found`)];
|
|
7020
7020
|
const n = r.styleSpec;
|
|
7021
7021
|
let a, o = [];
|
|
7022
7022
|
if (e.length < 1)
|
|
@@ -7038,9 +7038,9 @@ function Gn(r) {
|
|
|
7038
7038
|
e.length !== 3 && o.push(new h(t, e, `filter array for operator "${e[0]}" must have 3 elements`));
|
|
7039
7039
|
case "in":
|
|
7040
7040
|
case "!in":
|
|
7041
|
-
e.length >= 2 && (a =
|
|
7041
|
+
e.length >= 2 && (a = _(e[1]), a !== "string" && o.push(new h(`${t}[1]`, e[1], `string expected, ${a} found`)));
|
|
7042
7042
|
for (let i = 2; i < e.length; i++)
|
|
7043
|
-
a =
|
|
7043
|
+
a = _(e[i]), O(e[1]) === "$type" ? o = o.concat(We({
|
|
7044
7044
|
key: `${t}[${i}]`,
|
|
7045
7045
|
value: e[i],
|
|
7046
7046
|
valueSpec: n.geometry_type,
|
|
@@ -7061,7 +7061,7 @@ function Gn(r) {
|
|
|
7061
7061
|
break;
|
|
7062
7062
|
case "has":
|
|
7063
7063
|
case "!has":
|
|
7064
|
-
a =
|
|
7064
|
+
a = _(e[1]), e.length !== 2 ? o.push(new h(t, e, `filter array for "${e[0]}" operator must have 2 elements`)) : a !== "string" && o.push(new h(`${t}[1]`, e[1], `string expected, ${a} found`));
|
|
7065
7065
|
break;
|
|
7066
7066
|
}
|
|
7067
7067
|
return o;
|
|
@@ -7083,7 +7083,7 @@ function Hn(r, e) {
|
|
|
7083
7083
|
if (!c)
|
|
7084
7084
|
return [new h(t, i, `unknown property "${s}"`)];
|
|
7085
7085
|
let p;
|
|
7086
|
-
if (
|
|
7086
|
+
if (_(i) === "string" && yt(c) && !c.tokens && (p = /^{([^}]+)}$/.exec(i)))
|
|
7087
7087
|
return [new h(t, i, `"${s}" does not support interpolation syntax
|
|
7088
7088
|
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(p[1])} }\`.`)];
|
|
7089
7089
|
const y = [];
|
|
@@ -7191,15 +7191,15 @@ function Zn(r) {
|
|
|
7191
7191
|
}
|
|
7192
7192
|
})), e;
|
|
7193
7193
|
}
|
|
7194
|
-
function
|
|
7195
|
-
const e = r.value, t = r.key, n =
|
|
7194
|
+
function Ee(r) {
|
|
7195
|
+
const e = r.value, t = r.key, n = _(e);
|
|
7196
7196
|
return n !== "string" ? [new h(t, e, `string expected, ${n} found`)] : [];
|
|
7197
7197
|
}
|
|
7198
7198
|
function Ls(r) {
|
|
7199
7199
|
var e;
|
|
7200
7200
|
const t = (e = r.sourceName) !== null && e !== void 0 ? e : "", n = r.value, a = r.styleSpec, o = a.source_raster_dem, i = r.style;
|
|
7201
7201
|
let s = [];
|
|
7202
|
-
const l =
|
|
7202
|
+
const l = _(n);
|
|
7203
7203
|
if (n === void 0)
|
|
7204
7204
|
return s;
|
|
7205
7205
|
if (l !== "object")
|
|
@@ -7257,12 +7257,12 @@ function Jn(r) {
|
|
|
7257
7257
|
}), e.cluster)
|
|
7258
7258
|
for (const l in e.clusterProperties) {
|
|
7259
7259
|
const [u, c] = e.clusterProperties[l], p = typeof u == "string" ? [u, ["accumulated"], ["get", l]] : u;
|
|
7260
|
-
s.push(
|
|
7260
|
+
s.push(...$e({
|
|
7261
7261
|
key: `${t}.${l}.map`,
|
|
7262
7262
|
value: c,
|
|
7263
7263
|
validateSpec: o,
|
|
7264
7264
|
expressionContext: "cluster-map"
|
|
7265
|
-
})), s.push(
|
|
7265
|
+
})), s.push(...$e({
|
|
7266
7266
|
key: `${t}.${l}.reduce`,
|
|
7267
7267
|
value: p,
|
|
7268
7268
|
validateSpec: o,
|
|
@@ -7302,19 +7302,19 @@ function Jn(r) {
|
|
|
7302
7302
|
}
|
|
7303
7303
|
}
|
|
7304
7304
|
function Cs({ key: r, value: e }) {
|
|
7305
|
-
if (
|
|
7306
|
-
return
|
|
7305
|
+
if (_(e) === "string")
|
|
7306
|
+
return Ee({ key: r, value: e });
|
|
7307
7307
|
{
|
|
7308
7308
|
const t = [];
|
|
7309
7309
|
for (const n in e)
|
|
7310
|
-
t.push(...
|
|
7310
|
+
t.push(...Ee({ key: `${r}.${n}`, value: e[n] }));
|
|
7311
7311
|
return t;
|
|
7312
7312
|
}
|
|
7313
7313
|
}
|
|
7314
7314
|
function Yn(r) {
|
|
7315
7315
|
const e = r.value, t = r.styleSpec, n = t.light, a = r.style;
|
|
7316
7316
|
let o = [];
|
|
7317
|
-
const i =
|
|
7317
|
+
const i = _(e);
|
|
7318
7318
|
if (e === void 0)
|
|
7319
7319
|
return o;
|
|
7320
7320
|
if (i !== "object")
|
|
@@ -7340,7 +7340,7 @@ function Yn(r) {
|
|
|
7340
7340
|
return o;
|
|
7341
7341
|
}
|
|
7342
7342
|
function Xn(r) {
|
|
7343
|
-
const e = r.value, t = r.styleSpec, n = t.sky, a = r.style, o =
|
|
7343
|
+
const e = r.value, t = r.styleSpec, n = t.sky, a = r.style, o = _(e);
|
|
7344
7344
|
if (e === void 0)
|
|
7345
7345
|
return [];
|
|
7346
7346
|
if (o !== "object")
|
|
@@ -7359,7 +7359,7 @@ function Xn(r) {
|
|
|
7359
7359
|
function Qn(r) {
|
|
7360
7360
|
const e = r.value, t = r.styleSpec, n = t.terrain, a = r.style;
|
|
7361
7361
|
let o = [];
|
|
7362
|
-
const i =
|
|
7362
|
+
const i = _(e);
|
|
7363
7363
|
if (e === void 0)
|
|
7364
7364
|
return o;
|
|
7365
7365
|
if (i !== "object")
|
|
@@ -7376,14 +7376,14 @@ function Qn(r) {
|
|
|
7376
7376
|
return o;
|
|
7377
7377
|
}
|
|
7378
7378
|
function As(r) {
|
|
7379
|
-
return
|
|
7379
|
+
return Ee(r).length === 0 ? [] : $e(r);
|
|
7380
7380
|
}
|
|
7381
7381
|
function Ts(r) {
|
|
7382
|
-
return
|
|
7382
|
+
return Ee(r).length === 0 ? [] : $e(r);
|
|
7383
7383
|
}
|
|
7384
|
-
function
|
|
7384
|
+
function Es(r) {
|
|
7385
7385
|
const e = r.key, t = r.value;
|
|
7386
|
-
if (
|
|
7386
|
+
if (_(t) === "array") {
|
|
7387
7387
|
if (t.length < 1 || t.length > 4)
|
|
7388
7388
|
return [new h(e, t, `padding requires 1 to 4 values; ${t.length} values found`)];
|
|
7389
7389
|
const a = {
|
|
@@ -7405,8 +7405,8 @@ function Is(r) {
|
|
|
7405
7405
|
valueSpec: {}
|
|
7406
7406
|
});
|
|
7407
7407
|
}
|
|
7408
|
-
function
|
|
7409
|
-
const e = r.key, t = r.value, n =
|
|
7408
|
+
function Is(r) {
|
|
7409
|
+
const e = r.key, t = r.value, n = _(t), a = r.styleSpec;
|
|
7410
7410
|
if (n !== "array" || t.length < 1 || t.length % 2 !== 0)
|
|
7411
7411
|
return [new h(e, t, "variableAnchorOffsetCollection requires a non-empty array of even length")];
|
|
7412
7412
|
let o = [];
|
|
@@ -7454,13 +7454,13 @@ function ea(r) {
|
|
|
7454
7454
|
}
|
|
7455
7455
|
return e;
|
|
7456
7456
|
} else
|
|
7457
|
-
return
|
|
7457
|
+
return Ee({
|
|
7458
7458
|
key: n,
|
|
7459
7459
|
value: t
|
|
7460
7460
|
});
|
|
7461
7461
|
}
|
|
7462
|
-
function
|
|
7463
|
-
const e = r.value, t = r.styleSpec, n = t.projection, a = r.style, o =
|
|
7462
|
+
function Ms(r) {
|
|
7463
|
+
const e = r.value, t = r.styleSpec, n = t.projection, a = r.style, o = _(e);
|
|
7464
7464
|
if (e === void 0)
|
|
7465
7465
|
return [];
|
|
7466
7466
|
if (o !== "object")
|
|
@@ -7484,7 +7484,7 @@ const en = {
|
|
|
7484
7484
|
boolean: xs,
|
|
7485
7485
|
number: wr,
|
|
7486
7486
|
color: ks,
|
|
7487
|
-
constants:
|
|
7487
|
+
constants: Un,
|
|
7488
7488
|
enum: We,
|
|
7489
7489
|
filter: Sr,
|
|
7490
7490
|
function: Vn,
|
|
@@ -7494,45 +7494,45 @@ const en = {
|
|
|
7494
7494
|
light: Yn,
|
|
7495
7495
|
sky: Xn,
|
|
7496
7496
|
terrain: Qn,
|
|
7497
|
-
projection:
|
|
7498
|
-
string:
|
|
7497
|
+
projection: Ms,
|
|
7498
|
+
string: Ee,
|
|
7499
7499
|
formatted: As,
|
|
7500
7500
|
resolvedImage: Ts,
|
|
7501
|
-
padding:
|
|
7502
|
-
variableAnchorOffsetCollection:
|
|
7501
|
+
padding: Es,
|
|
7502
|
+
variableAnchorOffsetCollection: Is,
|
|
7503
7503
|
sprite: ea
|
|
7504
7504
|
};
|
|
7505
|
-
function
|
|
7505
|
+
function Be(r) {
|
|
7506
7506
|
const e = r.value, t = r.valueSpec, n = r.styleSpec;
|
|
7507
|
-
return r.validateSpec =
|
|
7507
|
+
return r.validateSpec = Be, t.expression && vr(O(e)) ? Vn(r) : t.expression && jn(Te(e)) ? $e(r) : t.type && en[t.type] ? en[t.type](r) : J(it({}, r, {
|
|
7508
7508
|
valueSpec: t.type ? n[t.type] : t
|
|
7509
7509
|
}));
|
|
7510
7510
|
}
|
|
7511
7511
|
function ta(r) {
|
|
7512
|
-
const e = r.value, t = r.key, n =
|
|
7512
|
+
const e = r.value, t = r.key, n = Ee(r);
|
|
7513
7513
|
return n.length || (e.indexOf("{fontstack}") === -1 && n.push(new h(t, e, '"glyphs" url must include a "{fontstack}" token')), e.indexOf("{range}") === -1 && n.push(new h(t, e, '"glyphs" url must include a "{range}" token'))), n;
|
|
7514
7514
|
}
|
|
7515
7515
|
function Y(r, e = ui) {
|
|
7516
7516
|
let t = [];
|
|
7517
|
-
return t = t.concat(
|
|
7517
|
+
return t = t.concat(Be({
|
|
7518
7518
|
key: "",
|
|
7519
7519
|
value: r,
|
|
7520
7520
|
valueSpec: e.$root,
|
|
7521
7521
|
styleSpec: e,
|
|
7522
7522
|
style: r,
|
|
7523
|
-
validateSpec:
|
|
7523
|
+
validateSpec: Be,
|
|
7524
7524
|
objectElementValidators: {
|
|
7525
7525
|
glyphs: ta,
|
|
7526
7526
|
"*"() {
|
|
7527
7527
|
return [];
|
|
7528
7528
|
}
|
|
7529
7529
|
}
|
|
7530
|
-
})), r.constants && (t = t.concat(
|
|
7530
|
+
})), r.constants && (t = t.concat(Un({
|
|
7531
7531
|
key: "constants",
|
|
7532
7532
|
value: r.constants,
|
|
7533
7533
|
style: r,
|
|
7534
7534
|
styleSpec: e,
|
|
7535
|
-
validateSpec:
|
|
7535
|
+
validateSpec: Be
|
|
7536
7536
|
}))), ra(t);
|
|
7537
7537
|
}
|
|
7538
7538
|
Y.source = le(se(Jn));
|
|
@@ -7549,7 +7549,7 @@ function se(r) {
|
|
|
7549
7549
|
return function(e) {
|
|
7550
7550
|
return r({
|
|
7551
7551
|
...e,
|
|
7552
|
-
validateSpec:
|
|
7552
|
+
validateSpec: Be
|
|
7553
7553
|
});
|
|
7554
7554
|
};
|
|
7555
7555
|
}
|
|
@@ -7564,25 +7564,25 @@ function le(r) {
|
|
|
7564
7564
|
function tn(r) {
|
|
7565
7565
|
if (!r)
|
|
7566
7566
|
return {
|
|
7567
|
-
style: je[
|
|
7567
|
+
style: je[Rt[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
|
|
7568
7568
|
requiresUrlMonitoring: !1,
|
|
7569
7569
|
// default styles don't require URL monitoring
|
|
7570
7570
|
isFallback: !0
|
|
7571
7571
|
};
|
|
7572
7572
|
if (typeof r == "string") {
|
|
7573
|
-
const t =
|
|
7573
|
+
const t = zs(r);
|
|
7574
7574
|
return t.isValidStyle ? {
|
|
7575
7575
|
style: t.styleObject,
|
|
7576
7576
|
requiresUrlMonitoring: !1,
|
|
7577
7577
|
isFallback: !1
|
|
7578
7578
|
} : t.isValidJSON ? {
|
|
7579
|
-
style: je[
|
|
7579
|
+
style: je[Rt[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
|
|
7580
7580
|
requiresUrlMonitoring: !1,
|
|
7581
7581
|
// default styles don't require URL monitoring
|
|
7582
7582
|
isFallback: !0
|
|
7583
|
-
} : r.startsWith("http") ? { style: r, requiresUrlMonitoring: !0, isFallback: !1 } : r.toLowerCase().includes(".json") ? { style:
|
|
7583
|
+
} : r.startsWith("http") ? { style: r, requiresUrlMonitoring: !0, isFallback: !1 } : r.toLowerCase().includes(".json") ? { style: _s(r), requiresUrlMonitoring: !0, isFallback: !1 } : { style: Ta(r), requiresUrlMonitoring: !0, isFallback: !1 };
|
|
7584
7584
|
}
|
|
7585
|
-
return r instanceof
|
|
7585
|
+
return r instanceof Ea ? { style: r.getExpandedStyleURL(), requiresUrlMonitoring: !1, isFallback: !1 } : r instanceof Ia ? {
|
|
7586
7586
|
style: r.getDefaultVariant().getExpandedStyleURL(),
|
|
7587
7587
|
requiresUrlMonitoring: !1,
|
|
7588
7588
|
isFallback: !1
|
|
@@ -7591,20 +7591,20 @@ function tn(r) {
|
|
|
7591
7591
|
requiresUrlMonitoring: !1,
|
|
7592
7592
|
isFallback: !1
|
|
7593
7593
|
} : {
|
|
7594
|
-
style: je[
|
|
7594
|
+
style: je[Rt[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
|
|
7595
7595
|
requiresUrlMonitoring: !1,
|
|
7596
7596
|
// default styles don't require URL monitoring
|
|
7597
7597
|
isFallback: !0
|
|
7598
7598
|
};
|
|
7599
7599
|
}
|
|
7600
|
-
function
|
|
7600
|
+
function _s(r) {
|
|
7601
7601
|
try {
|
|
7602
7602
|
return new URL(r).href;
|
|
7603
7603
|
} catch {
|
|
7604
7604
|
}
|
|
7605
7605
|
return new URL(r, location.origin).href;
|
|
7606
7606
|
}
|
|
7607
|
-
function
|
|
7607
|
+
function zs(r) {
|
|
7608
7608
|
try {
|
|
7609
7609
|
const e = JSON.parse(r), t = Y(e);
|
|
7610
7610
|
return {
|
|
@@ -7620,15 +7620,15 @@ function _s(r) {
|
|
|
7620
7620
|
};
|
|
7621
7621
|
}
|
|
7622
7622
|
}
|
|
7623
|
-
class
|
|
7623
|
+
class Rs {
|
|
7624
7624
|
constructor() {
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7625
|
+
I(this, "_map");
|
|
7626
|
+
I(this, "_container");
|
|
7627
|
+
I(this, "_terrainButton");
|
|
7628
7628
|
oo(["_toggleTerrain", "_updateTerrainIcon"], this);
|
|
7629
7629
|
}
|
|
7630
7630
|
onAdd(e) {
|
|
7631
|
-
return this._map = e, this._container =
|
|
7631
|
+
return this._map = e, this._container = _e("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = _e("button", "maplibregl-ctrl-terrain", this._container), _e("span", "maplibregl-ctrl-icon", this._terrainButton).setAttribute("aria-hidden", "true"), this._terrainButton.type = "button", this._terrainButton.addEventListener("click", this._toggleTerrain), this._updateTerrainIcon(), this._map.on("terrain", this._updateTerrainIcon), this._container;
|
|
7632
7632
|
}
|
|
7633
7633
|
onRemove() {
|
|
7634
7634
|
gn(this._container), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
|
|
@@ -7640,7 +7640,7 @@ class Ps {
|
|
|
7640
7640
|
this._terrainButton.classList.remove("maplibregl-ctrl-terrain"), this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"), this._map.hasTerrain() ? (this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"), this._terrainButton.title = this._map._getUIString("TerrainControl.Disable")) : (this._terrainButton.classList.add("maplibregl-ctrl-terrain"), this._terrainButton.title = this._map._getUIString("TerrainControl.Enable"));
|
|
7641
7641
|
}
|
|
7642
7642
|
}
|
|
7643
|
-
class
|
|
7643
|
+
class Ps extends vo {
|
|
7644
7644
|
constructor(t = {}) {
|
|
7645
7645
|
super({
|
|
7646
7646
|
showCompass: t.showCompass ?? !0,
|
|
@@ -7650,7 +7650,7 @@ class $s extends vo {
|
|
|
7650
7650
|
/**
|
|
7651
7651
|
* Overloading: Limit how flat the compass icon can get
|
|
7652
7652
|
*/
|
|
7653
|
-
|
|
7653
|
+
I(this, "_rotateCompassArrow", () => {
|
|
7654
7654
|
const t = this.options.visualizePitch ? `scale(${Math.min(
|
|
7655
7655
|
1.5,
|
|
7656
7656
|
1 / Math.cos(this._map.transform.pitch * (Math.PI / 180)) ** 0.5
|
|
@@ -7669,25 +7669,25 @@ class $s extends vo {
|
|
|
7669
7669
|
return a.clickFunction = n, a;
|
|
7670
7670
|
}
|
|
7671
7671
|
}
|
|
7672
|
-
const rn = S.Marker, nn = S.LngLat,
|
|
7672
|
+
const rn = S.Marker, nn = S.LngLat, $s = S.LngLatBounds;
|
|
7673
7673
|
class Ns extends bo {
|
|
7674
7674
|
constructor() {
|
|
7675
7675
|
super(...arguments);
|
|
7676
|
-
|
|
7676
|
+
I(this, "lastUpdatedCenter", new nn(0, 0));
|
|
7677
7677
|
/**
|
|
7678
7678
|
* Update the camera location to center on the current position
|
|
7679
7679
|
*
|
|
7680
7680
|
* @param {Position} position the Geolocation API Position
|
|
7681
7681
|
* @private
|
|
7682
7682
|
*/
|
|
7683
|
-
|
|
7683
|
+
I(this, "_updateCamera", (t) => {
|
|
7684
7684
|
var c, p;
|
|
7685
7685
|
const n = new nn(t.coords.longitude, t.coords.latitude), a = t.coords.accuracy, i = {
|
|
7686
7686
|
bearing: this._map.getBearing(),
|
|
7687
7687
|
...this.options.fitBoundsOptions,
|
|
7688
7688
|
linear: !0
|
|
7689
7689
|
}, s = this._map.getZoom();
|
|
7690
|
-
s > (((p = (c = this.options) == null ? void 0 : c.fitBoundsOptions) == null ? void 0 : p.maxZoom) ?? 30) && (i.zoom = s), this._map.fitBounds(
|
|
7690
|
+
s > (((p = (c = this.options) == null ? void 0 : c.fitBoundsOptions) == null ? void 0 : p.maxZoom) ?? 30) && (i.zoom = s), this._map.fitBounds($s.fromLngLat(n, a), i, {
|
|
7691
7691
|
geolocateSource: !0
|
|
7692
7692
|
// tag this camera change so it won't cause the control to change to background state
|
|
7693
7693
|
});
|
|
@@ -7699,7 +7699,7 @@ class Ns extends bo {
|
|
|
7699
7699
|
this._map.off("click", u), this._map.off("dblclick", u), this._map.off("dragstart", u), this._map.off("mousedown", u), this._map.off("touchstart", u), this._map.off("wheel", u), !l && (this.lastUpdatedCenter = this._map.getCenter());
|
|
7700
7700
|
});
|
|
7701
7701
|
});
|
|
7702
|
-
|
|
7702
|
+
I(this, "_finishSetupUI", (t) => {
|
|
7703
7703
|
if (this._map) {
|
|
7704
7704
|
if (t === !1) {
|
|
7705
7705
|
const n = this._map._getUIString("GeolocateControl.LocationNotAvailable");
|
|
@@ -7708,7 +7708,7 @@ class Ns extends bo {
|
|
|
7708
7708
|
const n = this._map._getUIString("GeolocateControl.FindMyLocation");
|
|
7709
7709
|
this._geolocateButton.disabled = !1, this._geolocateButton.title = n, this._geolocateButton.setAttribute("aria-label", n);
|
|
7710
7710
|
}
|
|
7711
|
-
this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement =
|
|
7711
|
+
this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = _e("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new rn({ element: this._dotElement }), this._circleElement = _e("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new rn({
|
|
7712
7712
|
element: this._circleElement,
|
|
7713
7713
|
pitchAlignment: "map"
|
|
7714
7714
|
}), this.options.trackUserLocation && (this._watchState = "OFF"), this._map.on("move", this._onZoom)), this._geolocateButton.addEventListener("click", this.trigger.bind(this)), this._setup = !0, this.options.trackUserLocation && this._map.on("moveend", (n) => {
|
|
@@ -7717,7 +7717,7 @@ class Ns extends bo {
|
|
|
7717
7717
|
});
|
|
7718
7718
|
}
|
|
7719
7719
|
});
|
|
7720
|
-
|
|
7720
|
+
I(this, "_onZoom", () => {
|
|
7721
7721
|
this.options.showUserLocation && this.options.showAccuracyCircle && this._updateCircleRadius();
|
|
7722
7722
|
});
|
|
7723
7723
|
}
|
|
@@ -7730,13 +7730,35 @@ class Ns extends bo {
|
|
|
7730
7730
|
], n = this._map.project(t), a = this._map.unproject([n.x, n.y]), o = this._map.unproject([n.x + 20, n.y]), i = a.distanceTo(o) / 20, s = Math.ceil(2 * this._accuracy / i);
|
|
7731
7731
|
this._circleElement.style.width = `${s}px`, this._circleElement.style.height = `${s}px`;
|
|
7732
7732
|
}
|
|
7733
|
+
// We are overwriting the method _setErrorState from Maplibre's GeolocateControl because the
|
|
7734
|
+
// case BACKGROUND_ERROR is not dealt with in the original function and yields an error.
|
|
7735
|
+
// Related issue: https://github.com/maplibre/maplibre-gl-js/issues/2294
|
|
7736
|
+
_setErrorState() {
|
|
7737
|
+
switch (this._watchState) {
|
|
7738
|
+
case "WAITING_ACTIVE":
|
|
7739
|
+
this._watchState = "ACTIVE_ERROR", this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");
|
|
7740
|
+
break;
|
|
7741
|
+
case "ACTIVE_LOCK":
|
|
7742
|
+
this._watchState = "ACTIVE_ERROR", this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");
|
|
7743
|
+
break;
|
|
7744
|
+
case "BACKGROUND":
|
|
7745
|
+
this._watchState = "BACKGROUND_ERROR", this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");
|
|
7746
|
+
break;
|
|
7747
|
+
case "ACTIVE_ERROR":
|
|
7748
|
+
break;
|
|
7749
|
+
case "BACKGROUND_ERROR":
|
|
7750
|
+
break;
|
|
7751
|
+
default:
|
|
7752
|
+
throw new Error(`Unexpected watchState ${this._watchState}`);
|
|
7753
|
+
}
|
|
7754
|
+
}
|
|
7733
7755
|
}
|
|
7734
7756
|
var G, X, de, ye, K, Ze, q, na, Z, aa;
|
|
7735
|
-
class
|
|
7757
|
+
class Ut {
|
|
7736
7758
|
constructor(e, t) {
|
|
7737
7759
|
fe(this, q);
|
|
7738
7760
|
fe(this, G);
|
|
7739
|
-
|
|
7761
|
+
I(this, "map");
|
|
7740
7762
|
fe(this, X);
|
|
7741
7763
|
fe(this, de);
|
|
7742
7764
|
fe(this, ye);
|
|
@@ -7765,48 +7787,48 @@ class Bt {
|
|
|
7765
7787
|
height: "300px",
|
|
7766
7788
|
...e.containerStyle ?? {}
|
|
7767
7789
|
}
|
|
7768
|
-
}), e.lockZoom !== void 0 && (
|
|
7790
|
+
}), e.lockZoom !== void 0 && (E(this, G).minZoom = e.lockZoom, E(this, G).maxZoom = e.lockZoom);
|
|
7769
7791
|
}
|
|
7770
7792
|
setStyle(e, t) {
|
|
7771
|
-
|
|
7793
|
+
E(this, K) || this.map.setStyle(e, t), V(this, q, Z).call(this);
|
|
7772
7794
|
}
|
|
7773
7795
|
addLayer(e, t) {
|
|
7774
|
-
return
|
|
7796
|
+
return E(this, K) || this.map.addLayer(e, t), V(this, q, Z).call(this), this.map;
|
|
7775
7797
|
}
|
|
7776
7798
|
moveLayer(e, t) {
|
|
7777
|
-
return
|
|
7799
|
+
return E(this, K) || this.map.moveLayer(e, t), V(this, q, Z).call(this), this.map;
|
|
7778
7800
|
}
|
|
7779
7801
|
removeLayer(e) {
|
|
7780
|
-
return
|
|
7802
|
+
return E(this, K) || this.map.removeLayer(e), V(this, q, Z).call(this), this;
|
|
7781
7803
|
}
|
|
7782
7804
|
setLayerZoomRange(e, t, n) {
|
|
7783
|
-
return
|
|
7805
|
+
return E(this, K) || this.map.setLayerZoomRange(e, t, n), V(this, q, Z).call(this), this;
|
|
7784
7806
|
}
|
|
7785
7807
|
setFilter(e, t, n) {
|
|
7786
|
-
return
|
|
7808
|
+
return E(this, K) || this.map.setFilter(e, t, n), V(this, q, Z).call(this), this;
|
|
7787
7809
|
}
|
|
7788
7810
|
setPaintProperty(e, t, n, a) {
|
|
7789
|
-
return
|
|
7811
|
+
return E(this, K) || this.map.setPaintProperty(e, t, n, a), V(this, q, Z).call(this), this;
|
|
7790
7812
|
}
|
|
7791
7813
|
setLayoutProperty(e, t, n, a) {
|
|
7792
|
-
return
|
|
7814
|
+
return E(this, K) || this.map.setLayoutProperty(e, t, n, a), V(this, q, Z).call(this), this;
|
|
7793
7815
|
}
|
|
7794
7816
|
setGlyphs(e, t) {
|
|
7795
|
-
return
|
|
7817
|
+
return E(this, K) || this.map.setGlyphs(e, t), V(this, q, Z).call(this), this;
|
|
7796
7818
|
}
|
|
7797
7819
|
onAdd(e) {
|
|
7798
|
-
ve(this, X, e), ve(this, de,
|
|
7799
|
-
for (const [t, n] of Object.entries(
|
|
7800
|
-
|
|
7801
|
-
return
|
|
7820
|
+
ve(this, X, e), ve(this, de, _e("div", "maplibregl-ctrl maplibregl-ctrl-group"));
|
|
7821
|
+
for (const [t, n] of Object.entries(E(this, G).containerStyle))
|
|
7822
|
+
E(this, de).style.setProperty(t, n);
|
|
7823
|
+
return E(this, G).container = E(this, de), E(this, G).zoom = e.getZoom() + E(this, G).zoomAdjust, this.map = new Os(E(this, G)), this.map.once("style.load", () => {
|
|
7802
7824
|
this.map.resize();
|
|
7803
7825
|
}), this.map.once("load", () => {
|
|
7804
|
-
V(this, q, na).call(this,
|
|
7805
|
-
}),
|
|
7826
|
+
V(this, q, na).call(this, E(this, G).parentRect), ve(this, Ze, V(this, q, aa).call(this));
|
|
7827
|
+
}), E(this, de);
|
|
7806
7828
|
}
|
|
7807
7829
|
onRemove() {
|
|
7808
7830
|
var e;
|
|
7809
|
-
(e =
|
|
7831
|
+
(e = E(this, Ze)) == null || e.call(this), gn(E(this, de));
|
|
7810
7832
|
}
|
|
7811
7833
|
}
|
|
7812
7834
|
G = new WeakMap(), X = new WeakMap(), de = new WeakMap(), ye = new WeakMap(), K = new WeakMap(), Ze = new WeakMap(), q = new WeakSet(), na = function(e) {
|
|
@@ -7821,7 +7843,7 @@ G = new WeakMap(), X = new WeakMap(), de = new WeakMap(), ye = new WeakMap(), K
|
|
|
7821
7843
|
}
|
|
7822
7844
|
}), this.map.addSource("parentRect", {
|
|
7823
7845
|
type: "geojson",
|
|
7824
|
-
data:
|
|
7846
|
+
data: E(this, ye)
|
|
7825
7847
|
}), (e.lineLayout !== void 0 || e.linePaint !== void 0) && this.map.addLayer({
|
|
7826
7848
|
id: "parentRectOutline",
|
|
7827
7849
|
type: "line",
|
|
@@ -7847,23 +7869,23 @@ G = new WeakMap(), X = new WeakMap(), de = new WeakMap(), ye = new WeakMap(), K
|
|
|
7847
7869
|
}
|
|
7848
7870
|
}), V(this, q, Z).call(this));
|
|
7849
7871
|
}, Z = function() {
|
|
7850
|
-
if (
|
|
7851
|
-
const { devicePixelRatio: e } = window, t =
|
|
7852
|
-
|
|
7872
|
+
if (E(this, ye) === void 0) return;
|
|
7873
|
+
const { devicePixelRatio: e } = window, t = E(this, X).getCanvas(), n = t.width / e, a = t.height / e, o = E(this, X).unproject.bind(E(this, X)), i = o([0, 0]), s = o([n, 0]), l = o([0, a]), u = o([n, a]);
|
|
7874
|
+
E(this, ye).geometry.coordinates = [
|
|
7853
7875
|
[l.toArray(), u.toArray(), s.toArray(), i.toArray(), l.toArray()]
|
|
7854
|
-
], this.map.getSource("parentRect").setData(
|
|
7876
|
+
], this.map.getSource("parentRect").setData(E(this, ye));
|
|
7855
7877
|
}, aa = function() {
|
|
7856
|
-
const { pitchAdjust: e } =
|
|
7878
|
+
const { pitchAdjust: e } = E(this, G), t = () => {
|
|
7857
7879
|
i("parent");
|
|
7858
7880
|
}, n = () => {
|
|
7859
7881
|
i("minimap");
|
|
7860
7882
|
}, a = () => {
|
|
7861
|
-
|
|
7883
|
+
E(this, X).on("move", t), this.map.on("move", n);
|
|
7862
7884
|
}, o = () => {
|
|
7863
|
-
|
|
7885
|
+
E(this, X).off("move", t), this.map.off("move", n);
|
|
7864
7886
|
}, i = (s) => {
|
|
7865
7887
|
o();
|
|
7866
|
-
const l = s === "parent" ?
|
|
7888
|
+
const l = s === "parent" ? E(this, X) : this.map, u = s === "parent" ? this.map : E(this, X), c = l.getCenter(), p = l.getZoom() + E(this, G).zoomAdjust * (s === "parent" ? 1 : -1), y = l.getBearing(), f = l.getPitch();
|
|
7867
7889
|
u.jumpTo({
|
|
7868
7890
|
center: c,
|
|
7869
7891
|
zoom: p,
|
|
@@ -7881,11 +7903,11 @@ const Fs = {
|
|
|
7881
7903
|
};
|
|
7882
7904
|
class Os extends S.Map {
|
|
7883
7905
|
constructor(t) {
|
|
7884
|
-
lo(t.container), t.apiKey && (
|
|
7906
|
+
lo(t.container), t.apiKey && (B.apiKey = t.apiKey);
|
|
7885
7907
|
const { style: n, requiresUrlMonitoring: a, isFallback: o } = tn(t.style);
|
|
7886
7908
|
o && console.warn(
|
|
7887
7909
|
"Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Fallback to default MapTiler style."
|
|
7888
|
-
),
|
|
7910
|
+
), B.apiKey || console.warn("MapTiler Cloud API key is not set. Visit https://maptiler.com and try Cloud for free!");
|
|
7889
7911
|
const i = location.hash;
|
|
7890
7912
|
let s = {
|
|
7891
7913
|
compact: !1
|
|
@@ -7898,25 +7920,25 @@ class Os extends S.Map {
|
|
|
7898
7920
|
...t,
|
|
7899
7921
|
style: n,
|
|
7900
7922
|
maplibreLogo: !1,
|
|
7901
|
-
transformRequest:
|
|
7923
|
+
transformRequest: Rr(t.transformRequest),
|
|
7902
7924
|
attributionControl: t.forceNoAttributionControl === !0 ? !1 : s
|
|
7903
7925
|
};
|
|
7904
7926
|
delete l.style;
|
|
7905
7927
|
super(l);
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
7919
|
-
|
|
7928
|
+
I(this, "isTerrainEnabled", !1);
|
|
7929
|
+
I(this, "terrainExaggeration", 1);
|
|
7930
|
+
I(this, "primaryLanguage");
|
|
7931
|
+
I(this, "terrainGrowing", !1);
|
|
7932
|
+
I(this, "terrainFlattening", !1);
|
|
7933
|
+
I(this, "minimap");
|
|
7934
|
+
I(this, "forceLanguageUpdate");
|
|
7935
|
+
I(this, "languageAlwaysBeenStyle");
|
|
7936
|
+
I(this, "isReady", !1);
|
|
7937
|
+
I(this, "terrainAnimationDuration", 1e3);
|
|
7938
|
+
I(this, "monitoredStyleUrls");
|
|
7939
|
+
I(this, "styleInProcess", !1);
|
|
7940
|
+
I(this, "originalLabelStyle", new window.Map());
|
|
7941
|
+
I(this, "isStyleLocalized", !1);
|
|
7920
7942
|
this.setStyle(n), a && this.monitorStyleUrl(n);
|
|
7921
7943
|
const u = () => {
|
|
7922
7944
|
let d = "The distant style could not be loaded.";
|
|
@@ -7929,20 +7951,20 @@ class Os extends S.Map {
|
|
|
7929
7951
|
const v = d.error.url, w = new URL(v);
|
|
7930
7952
|
w.search = "";
|
|
7931
7953
|
const b = w.href;
|
|
7932
|
-
this.monitoredStyleUrls.has(b) && (this.monitoredStyleUrls.delete(b), u());
|
|
7954
|
+
this.monitoredStyleUrls && this.monitoredStyleUrls.has(b) && (this.monitoredStyleUrls.delete(b), u());
|
|
7933
7955
|
return;
|
|
7934
7956
|
}
|
|
7935
7957
|
if (this.styleInProcess)
|
|
7936
7958
|
return u();
|
|
7937
|
-
}),
|
|
7959
|
+
}), B.caching && !Ht && console.warn(
|
|
7938
7960
|
"The cache API is only available in secure contexts. More info at https://developer.mozilla.org/en-US/docs/Web/API/Cache"
|
|
7939
|
-
),
|
|
7940
|
-
this.primaryLanguage =
|
|
7961
|
+
), B.caching && Ht && no(), typeof t.language > "u")
|
|
7962
|
+
this.primaryLanguage = B.primaryLanguage;
|
|
7941
7963
|
else {
|
|
7942
|
-
const d = Tr(t.language,
|
|
7943
|
-
this.primaryLanguage = d ??
|
|
7964
|
+
const d = Tr(t.language, M);
|
|
7965
|
+
this.primaryLanguage = d ?? B.primaryLanguage;
|
|
7944
7966
|
}
|
|
7945
|
-
this.forceLanguageUpdate = !(this.primaryLanguage ===
|
|
7967
|
+
this.forceLanguageUpdate = !(this.primaryLanguage === M.STYLE || this.primaryLanguage === M.STYLE_LOCK), this.languageAlwaysBeenStyle = this.primaryLanguage === M.STYLE, this.terrainExaggeration = t.terrainExaggeration ?? this.terrainExaggeration, this.once("styledata", async () => {
|
|
7946
7968
|
if (!t.geolocate || t.center || t.hash && i)
|
|
7947
7969
|
return;
|
|
7948
7970
|
try {
|
|
@@ -7997,23 +8019,23 @@ class Os extends S.Map {
|
|
|
7997
8019
|
const m = Object.keys(this.style.sourceCaches).map((b) => this.getSource(b)).filter(
|
|
7998
8020
|
(b) => b && "url" in b && typeof b.url == "string" && (b == null ? void 0 : b.url.includes("tiles.json"))
|
|
7999
8021
|
), v = new URL(m[0].url);
|
|
8000
|
-
v.searchParams.has("key") || v.searchParams.append("key",
|
|
8022
|
+
v.searchParams.has("key") || v.searchParams.append("key", B.apiKey), d = await (await fetch(v.href)).json();
|
|
8001
8023
|
} catch {
|
|
8002
8024
|
}
|
|
8003
8025
|
if (t.forceNoAttributionControl !== !0)
|
|
8004
8026
|
if ("logo" in d && d.logo) {
|
|
8005
8027
|
const m = d.logo;
|
|
8006
|
-
this.addControl(new
|
|
8007
|
-
} else t.maptilerLogo && this.addControl(new
|
|
8028
|
+
this.addControl(new $r({ logoURL: m }), t.logoPosition);
|
|
8029
|
+
} else t.maptilerLogo && this.addControl(new $r(), t.logoPosition);
|
|
8008
8030
|
if (t.scaleControl) {
|
|
8009
|
-
const m = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, v = new So({ unit:
|
|
8010
|
-
this.addControl(v, m),
|
|
8031
|
+
const m = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, v = new So({ unit: B.unit });
|
|
8032
|
+
this.addControl(v, m), B.on("unit", (w) => {
|
|
8011
8033
|
v.setUnit(w);
|
|
8012
8034
|
});
|
|
8013
8035
|
}
|
|
8014
8036
|
if (t.navigationControl !== !1) {
|
|
8015
8037
|
const m = t.navigationControl === !0 || t.navigationControl === void 0 ? "top-right" : t.navigationControl;
|
|
8016
|
-
this.addControl(new
|
|
8038
|
+
this.addControl(new Ps(), m);
|
|
8017
8039
|
}
|
|
8018
8040
|
if (t.geolocateControl !== !1) {
|
|
8019
8041
|
const m = t.geolocateControl === !0 || t.geolocateControl === void 0 ? "top-right" : t.geolocateControl;
|
|
@@ -8037,7 +8059,7 @@ class Os extends S.Map {
|
|
|
8037
8059
|
}
|
|
8038
8060
|
if (t.terrainControl) {
|
|
8039
8061
|
const m = t.terrainControl === !0 || t.terrainControl === void 0 ? "top-right" : t.terrainControl;
|
|
8040
|
-
this.addControl(new
|
|
8062
|
+
this.addControl(new Rs(), m);
|
|
8041
8063
|
}
|
|
8042
8064
|
if (t.fullscreenControl) {
|
|
8043
8065
|
const m = t.fullscreenControl === !0 || t.fullscreenControl === void 0 ? "top-right" : t.fullscreenControl;
|
|
@@ -8057,8 +8079,8 @@ class Os extends S.Map {
|
|
|
8057
8079
|
style: w,
|
|
8058
8080
|
language: b,
|
|
8059
8081
|
apiKey: T,
|
|
8060
|
-
maptilerLogo:
|
|
8061
|
-
antialias:
|
|
8082
|
+
maptilerLogo: $,
|
|
8083
|
+
antialias: P,
|
|
8062
8084
|
refreshExpiredTiles: te,
|
|
8063
8085
|
maxBounds: ge,
|
|
8064
8086
|
scrollZoom: Oe,
|
|
@@ -8074,15 +8096,15 @@ class Os extends S.Map {
|
|
|
8074
8096
|
pixelRatio: xa,
|
|
8075
8097
|
validateStyle: ka
|
|
8076
8098
|
} = t;
|
|
8077
|
-
this.minimap = new
|
|
8099
|
+
this.minimap = new Ut(d, {
|
|
8078
8100
|
zoom: m,
|
|
8079
8101
|
center: v,
|
|
8080
8102
|
style: w,
|
|
8081
8103
|
language: b,
|
|
8082
8104
|
apiKey: T,
|
|
8083
8105
|
container: "null",
|
|
8084
|
-
maptilerLogo:
|
|
8085
|
-
antialias:
|
|
8106
|
+
maptilerLogo: $,
|
|
8107
|
+
antialias: P,
|
|
8086
8108
|
refreshExpiredTiles: te,
|
|
8087
8109
|
maxBounds: ge,
|
|
8088
8110
|
scrollZoom: Oe,
|
|
@@ -8098,7 +8120,7 @@ class Os extends S.Map {
|
|
|
8098
8120
|
pixelRatio: xa,
|
|
8099
8121
|
validateStyle: ka
|
|
8100
8122
|
}), this.addControl(this.minimap, d.position ?? "bottom-left");
|
|
8101
|
-
} else d === !0 ? (this.minimap = new
|
|
8123
|
+
} else d === !0 ? (this.minimap = new Ut({}, t), this.addControl(this.minimap, "bottom-left")) : d !== void 0 && d !== !1 && (this.minimap = new Ut({}, t), this.addControl(this.minimap, d));
|
|
8102
8124
|
});
|
|
8103
8125
|
const f = (d) => {
|
|
8104
8126
|
d.terrain && (p = !0, y = {
|
|
@@ -8336,7 +8358,7 @@ class Os extends S.Map {
|
|
|
8336
8358
|
return (a = this.minimap) == null || a.setGlyphs(t, n), super.setGlyphs(t, n);
|
|
8337
8359
|
}
|
|
8338
8360
|
getStyleLanguage() {
|
|
8339
|
-
return !this.style.stylesheet.metadata || typeof this.style.stylesheet.metadata != "object" ? null : "maptiler:language" in this.style.stylesheet.metadata && typeof this.style.stylesheet.metadata["maptiler:language"] == "string" ?
|
|
8361
|
+
return !this.style || !this.style.stylesheet || !this.style.stylesheet.metadata || typeof this.style.stylesheet.metadata != "object" ? null : "maptiler:language" in this.style.stylesheet.metadata && typeof this.style.stylesheet.metadata["maptiler:language"] == "string" ? Ma(this.style.stylesheet.metadata["maptiler:language"]) : null;
|
|
8340
8362
|
}
|
|
8341
8363
|
/**
|
|
8342
8364
|
* Define the primary language of the map. Note that not all the languages shorthands provided are available.
|
|
@@ -8351,14 +8373,14 @@ class Os extends S.Map {
|
|
|
8351
8373
|
* Define the primary language of the map. Note that not all the languages shorthands provided are available.
|
|
8352
8374
|
*/
|
|
8353
8375
|
setPrimaryLanguage(t) {
|
|
8354
|
-
const n = this.getStyleLanguage(), a = Tr(t,
|
|
8376
|
+
const n = this.getStyleLanguage(), a = Tr(t, M);
|
|
8355
8377
|
if (!a) {
|
|
8356
8378
|
console.warn(`The language "${a}" is not supported.`);
|
|
8357
8379
|
return;
|
|
8358
8380
|
}
|
|
8359
|
-
if (!(a.flag ===
|
|
8381
|
+
if (!(a.flag === M.STYLE.flag && n && (n.flag === M.AUTO.flag || n.flag === M.VISITOR.flag)) && (a.flag !== M.STYLE.flag && (this.languageAlwaysBeenStyle = !1), this.languageAlwaysBeenStyle || this.primaryLanguage === a && !this.forceLanguageUpdate))
|
|
8360
8382
|
return;
|
|
8361
|
-
if (this.primaryLanguage.flag ===
|
|
8383
|
+
if (this.primaryLanguage.flag === M.STYLE_LOCK.flag) {
|
|
8362
8384
|
console.warn(
|
|
8363
8385
|
"The language cannot be changed because this map has been instantiated with the STYLE_LOCK language flag."
|
|
8364
8386
|
);
|
|
@@ -8366,51 +8388,51 @@ class Os extends S.Map {
|
|
|
8366
8388
|
}
|
|
8367
8389
|
this.primaryLanguage = a;
|
|
8368
8390
|
let o = a;
|
|
8369
|
-
if (a.flag ===
|
|
8391
|
+
if (a.flag === M.STYLE.flag) {
|
|
8370
8392
|
if (!n) {
|
|
8371
8393
|
console.warn("The style has no default languages or has an invalid one.");
|
|
8372
8394
|
return;
|
|
8373
8395
|
}
|
|
8374
8396
|
o = n;
|
|
8375
8397
|
}
|
|
8376
|
-
let i =
|
|
8377
|
-
o.flag ===
|
|
8398
|
+
let i = M.LOCAL.flag, s = ["get", i];
|
|
8399
|
+
o.flag === M.VISITOR.flag ? (i = Ir().flag, s = [
|
|
8378
8400
|
"case",
|
|
8379
|
-
["all", ["has", i], ["has",
|
|
8401
|
+
["all", ["has", i], ["has", M.LOCAL.flag]],
|
|
8380
8402
|
[
|
|
8381
8403
|
"case",
|
|
8382
|
-
["==", ["get", i], ["get",
|
|
8383
|
-
["get",
|
|
8404
|
+
["==", ["get", i], ["get", M.LOCAL.flag]],
|
|
8405
|
+
["get", M.LOCAL.flag],
|
|
8384
8406
|
[
|
|
8385
8407
|
"format",
|
|
8386
8408
|
["get", i],
|
|
8387
8409
|
{ "font-scale": 0.8 },
|
|
8388
8410
|
`
|
|
8389
8411
|
`,
|
|
8390
|
-
["get",
|
|
8412
|
+
["get", M.LOCAL.flag],
|
|
8391
8413
|
{ "font-scale": 1.1 }
|
|
8392
8414
|
]
|
|
8393
8415
|
],
|
|
8394
|
-
["get",
|
|
8395
|
-
]) : o.flag ===
|
|
8416
|
+
["get", M.LOCAL.flag]
|
|
8417
|
+
]) : o.flag === M.VISITOR_ENGLISH.flag ? (i = M.ENGLISH.flag, s = [
|
|
8396
8418
|
"case",
|
|
8397
|
-
["all", ["has", i], ["has",
|
|
8419
|
+
["all", ["has", i], ["has", M.LOCAL.flag]],
|
|
8398
8420
|
[
|
|
8399
8421
|
"case",
|
|
8400
|
-
["==", ["get", i], ["get",
|
|
8401
|
-
["get",
|
|
8422
|
+
["==", ["get", i], ["get", M.LOCAL.flag]],
|
|
8423
|
+
["get", M.LOCAL.flag],
|
|
8402
8424
|
[
|
|
8403
8425
|
"format",
|
|
8404
8426
|
["get", i],
|
|
8405
8427
|
{ "font-scale": 0.8 },
|
|
8406
8428
|
`
|
|
8407
8429
|
`,
|
|
8408
|
-
["get",
|
|
8430
|
+
["get", M.LOCAL.flag],
|
|
8409
8431
|
{ "font-scale": 1.1 }
|
|
8410
8432
|
]
|
|
8411
8433
|
],
|
|
8412
|
-
["get",
|
|
8413
|
-
]) : o.flag ===
|
|
8434
|
+
["get", M.LOCAL.flag]
|
|
8435
|
+
]) : o.flag === M.AUTO.flag ? (i = Ir().flag, s = ["coalesce", ["get", i], ["get", M.LOCAL.flag]]) : o === M.LOCAL ? (i = M.LOCAL.flag, s = ["get", i]) : (i = o.flag, s = ["coalesce", ["get", i], ["get", M.LOCAL.flag]]);
|
|
8414
8436
|
const { layers: l } = this.getStyle(), u = this.originalLabelStyle.size === 0;
|
|
8415
8437
|
if (u) {
|
|
8416
8438
|
const c = go(l, this);
|
|
@@ -8545,14 +8567,14 @@ class Os extends S.Map {
|
|
|
8545
8567
|
});
|
|
8546
8568
|
}
|
|
8547
8569
|
async fitToIpBounds() {
|
|
8548
|
-
const t = await
|
|
8570
|
+
const t = await Er.info();
|
|
8549
8571
|
this.fitBounds(t.country_bounds, {
|
|
8550
8572
|
duration: 0,
|
|
8551
8573
|
padding: 100
|
|
8552
8574
|
});
|
|
8553
8575
|
}
|
|
8554
8576
|
async centerOnIpPoint(t) {
|
|
8555
|
-
const n = await
|
|
8577
|
+
const n = await Er.info();
|
|
8556
8578
|
this.jumpTo({
|
|
8557
8579
|
center: [(n == null ? void 0 : n.longitude) ?? 0, (n == null ? void 0 : n.latitude) ?? 0],
|
|
8558
8580
|
zoom: t || 11
|
|
@@ -8560,7 +8582,7 @@ class Os extends S.Map {
|
|
|
8560
8582
|
}
|
|
8561
8583
|
getCameraHash() {
|
|
8562
8584
|
const t = new Float32Array(5), n = this.getCenter();
|
|
8563
|
-
return t[0] = n.lng, t[1] = n.lat, t[2] = this.getZoom(), t[3] = this.getPitch(), t[4] = this.getBearing(),
|
|
8585
|
+
return t[0] = n.lng, t[1] = n.lat, t[2] = this.getZoom(), t[3] = this.getPitch(), t[4] = this.getBearing(), Ra.fromUint8Array(new Uint8Array(t.buffer));
|
|
8564
8586
|
}
|
|
8565
8587
|
/**
|
|
8566
8588
|
* Get the SDK config object.
|
|
@@ -8568,7 +8590,7 @@ class Os extends S.Map {
|
|
|
8568
8590
|
* that do not directly have access to the SDK configuration but do have access to a Map instance.
|
|
8569
8591
|
*/
|
|
8570
8592
|
getSdkConfig() {
|
|
8571
|
-
return
|
|
8593
|
+
return B;
|
|
8572
8594
|
}
|
|
8573
8595
|
/**
|
|
8574
8596
|
* Get the MapTiler session ID. Convenient to dispatch to externaly built component
|
|
@@ -8590,7 +8612,7 @@ class Os extends S.Map {
|
|
|
8590
8612
|
* map.setTransformRequest((url: string, resourceType: string) => {});
|
|
8591
8613
|
*/
|
|
8592
8614
|
setTransformRequest(t) {
|
|
8593
|
-
return super.setTransformRequest(
|
|
8615
|
+
return super.setTransformRequest(Rr(t)), this;
|
|
8594
8616
|
}
|
|
8595
8617
|
}
|
|
8596
8618
|
function xr(r) {
|
|
@@ -8621,16 +8643,16 @@ function ia(r) {
|
|
|
8621
8643
|
const e = typeof r == "string" ? xr(r) : r;
|
|
8622
8644
|
if (!oa(e, "gpx"))
|
|
8623
8645
|
throw new Error("The XML document is not valid GPX");
|
|
8624
|
-
const t =
|
|
8646
|
+
const t = U(e, "trk"), n = U(e, "rte"), a = U(e, "wpt"), o = {
|
|
8625
8647
|
type: "FeatureCollection",
|
|
8626
8648
|
features: []
|
|
8627
8649
|
};
|
|
8628
8650
|
for (const i of Array.from(t)) {
|
|
8629
|
-
const s =
|
|
8651
|
+
const s = Bs(i);
|
|
8630
8652
|
s && o.features.push(s);
|
|
8631
8653
|
}
|
|
8632
8654
|
for (const i of Array.from(n)) {
|
|
8633
|
-
const s =
|
|
8655
|
+
const s = Us(i);
|
|
8634
8656
|
s && o.features.push(s);
|
|
8635
8657
|
}
|
|
8636
8658
|
for (const i of Array.from(a))
|
|
@@ -8644,7 +8666,7 @@ function sa(r, e) {
|
|
|
8644
8666
|
const n = {
|
|
8645
8667
|
type: "FeatureCollection",
|
|
8646
8668
|
features: []
|
|
8647
|
-
}, a = {}, o = {}, i = {}, s =
|
|
8669
|
+
}, a = {}, o = {}, i = {}, s = U(t, "Placemark"), l = U(t, "Style"), u = U(t, "StyleMap");
|
|
8648
8670
|
for (const c of Array.from(l)) {
|
|
8649
8671
|
const p = sn(e !== void 0 ? e(c) : an(c)).toString(16);
|
|
8650
8672
|
a[`#${Ce(c, "id")}`] = p, o[p] = c;
|
|
@@ -8653,9 +8675,9 @@ function sa(r, e) {
|
|
|
8653
8675
|
a[`#${Ce(c, "id")}`] = sn(
|
|
8654
8676
|
e !== void 0 ? e(c) : an(c)
|
|
8655
8677
|
).toString(16);
|
|
8656
|
-
const p =
|
|
8678
|
+
const p = U(c, "Pair"), y = {};
|
|
8657
8679
|
for (const f of Array.from(p))
|
|
8658
|
-
y[
|
|
8680
|
+
y[z(k(f, "key")) ?? ""] = z(k(f, "styleUrl"));
|
|
8659
8681
|
i[`#${Ce(c, "id")}`] = y;
|
|
8660
8682
|
}
|
|
8661
8683
|
for (const c of Array.from(s))
|
|
@@ -8671,13 +8693,13 @@ function Ds(r) {
|
|
|
8671
8693
|
return ca(r.split(" "));
|
|
8672
8694
|
}
|
|
8673
8695
|
function js(r) {
|
|
8674
|
-
let e =
|
|
8696
|
+
let e = U(r, "coord");
|
|
8675
8697
|
const t = [], n = [];
|
|
8676
|
-
e.length === 0 && (e =
|
|
8698
|
+
e.length === 0 && (e = U(r, "gx:coord"));
|
|
8677
8699
|
for (const o of Array.from(e))
|
|
8678
|
-
t.push(Ds(
|
|
8679
|
-
const a =
|
|
8680
|
-
for (const o of Array.from(a)) n.push(
|
|
8700
|
+
t.push(Ds(z(o) ?? ""));
|
|
8701
|
+
const a = U(r, "when");
|
|
8702
|
+
for (const o of Array.from(a)) n.push(z(o));
|
|
8681
8703
|
return {
|
|
8682
8704
|
coords: t,
|
|
8683
8705
|
times: n
|
|
@@ -8694,22 +8716,22 @@ function ot(r) {
|
|
|
8694
8716
|
if (k(r, "gx:MultiTrack") !== null)
|
|
8695
8717
|
return ot(k(r, "gx:MultiTrack"));
|
|
8696
8718
|
for (a = 0; a < e.length; a++)
|
|
8697
|
-
if (n =
|
|
8719
|
+
if (n = U(r, e[a]), n) {
|
|
8698
8720
|
for (o = 0; o < n.length; o++)
|
|
8699
8721
|
if (t = n[o], e[a] === "Point")
|
|
8700
8722
|
s.push({
|
|
8701
8723
|
type: "Point",
|
|
8702
|
-
coordinates: pa(
|
|
8724
|
+
coordinates: pa(z(k(t, "coordinates")) ?? "")
|
|
8703
8725
|
});
|
|
8704
8726
|
else if (e[a] === "LineString")
|
|
8705
8727
|
s.push({
|
|
8706
8728
|
type: "LineString",
|
|
8707
|
-
coordinates: un(
|
|
8729
|
+
coordinates: un(z(k(t, "coordinates")) ?? "")
|
|
8708
8730
|
});
|
|
8709
8731
|
else if (e[a] === "Polygon") {
|
|
8710
|
-
const u =
|
|
8732
|
+
const u = U(t, "LinearRing"), c = [];
|
|
8711
8733
|
for (i = 0; i < u.length; i++)
|
|
8712
|
-
c.push(un(
|
|
8734
|
+
c.push(un(z(k(u[i], "coordinates")) ?? ""));
|
|
8713
8735
|
s.push({
|
|
8714
8736
|
type: "Polygon",
|
|
8715
8737
|
coordinates: c
|
|
@@ -8725,8 +8747,8 @@ function ot(r) {
|
|
|
8725
8747
|
return { geoms: s, coordTimes: l };
|
|
8726
8748
|
}
|
|
8727
8749
|
function qs(r, e, t, n) {
|
|
8728
|
-
const a = ot(r), o = {}, i =
|
|
8729
|
-
let f, d =
|
|
8750
|
+
const a = ot(r), o = {}, i = z(k(r, "name")), s = z(k(r, "address")), l = z(k(r, "description")), u = k(r, "TimeSpan"), c = k(r, "TimeStamp"), p = k(r, "ExtendedData"), y = k(r, "visibility");
|
|
8751
|
+
let f, d = z(k(r, "styleUrl")), m = k(r, "LineStyle"), v = k(r, "PolyStyle");
|
|
8730
8752
|
if (!a.geoms.length) return [];
|
|
8731
8753
|
if (i && (o.name = i), s && (o.address = s), d) {
|
|
8732
8754
|
d[0] !== "#" && (d = `#${d}`), o.styleUrl = d, e[d] && (o.styleHash = e[d]), n[d] && (o.styleMapHash = n[d], o.styleHash = e[n[d].normal ?? ""]);
|
|
@@ -8735,34 +8757,34 @@ function qs(r, e, t, n) {
|
|
|
8735
8757
|
m || (m = k(b, "LineStyle")), v || (v = k(b, "PolyStyle"));
|
|
8736
8758
|
const T = k(b, "IconStyle");
|
|
8737
8759
|
if (T) {
|
|
8738
|
-
const
|
|
8739
|
-
if (
|
|
8740
|
-
const
|
|
8741
|
-
|
|
8760
|
+
const $ = k(T, "Icon");
|
|
8761
|
+
if ($) {
|
|
8762
|
+
const P = z(k($, "href"));
|
|
8763
|
+
P && (o.icon = P);
|
|
8742
8764
|
}
|
|
8743
8765
|
}
|
|
8744
8766
|
}
|
|
8745
8767
|
}
|
|
8746
8768
|
if (l && (o.description = l), u) {
|
|
8747
|
-
const b =
|
|
8769
|
+
const b = z(k(u, "begin")), T = z(k(u, "end"));
|
|
8748
8770
|
b && T && (o.timespan = { begin: b, end: T });
|
|
8749
8771
|
}
|
|
8750
|
-
if (c !== null && (o.timestamp =
|
|
8751
|
-
const b = on(
|
|
8752
|
-
T && (o.stroke = T), Number.isNaN(
|
|
8772
|
+
if (c !== null && (o.timestamp = z(k(c, "when")) ?? (/* @__PURE__ */ new Date()).toISOString()), m !== null) {
|
|
8773
|
+
const b = on(z(k(m, "color"))), T = b[0], $ = b[1], P = Number.parseFloat(z(k(m, "width")) ?? "");
|
|
8774
|
+
T && (o.stroke = T), Number.isNaN($) || (o["stroke-opacity"] = $), Number.isNaN(P) || (o["stroke-width"] = P);
|
|
8753
8775
|
}
|
|
8754
8776
|
if (v) {
|
|
8755
|
-
const b = on(
|
|
8756
|
-
T && (o.fill = T), Number.isNaN(
|
|
8777
|
+
const b = on(z(k(v, "color"))), T = b[0], $ = b[1], P = z(k(v, "fill")), te = z(k(v, "outline"));
|
|
8778
|
+
T && (o.fill = T), Number.isNaN($) || (o["fill-opacity"] = $), P && (o["fill-opacity"] = P === "1" ? o["fill-opacity"] || 1 : 0), te && (o["stroke-opacity"] = te === "1" ? o["stroke-opacity"] || 1 : 0);
|
|
8757
8779
|
}
|
|
8758
8780
|
if (p) {
|
|
8759
|
-
const b =
|
|
8781
|
+
const b = U(p, "Data"), T = U(p, "SimpleData");
|
|
8760
8782
|
for (f = 0; f < b.length; f++)
|
|
8761
|
-
o[b[f].getAttribute("name") ?? ""] =
|
|
8783
|
+
o[b[f].getAttribute("name") ?? ""] = z(k(b[f], "value")) ?? "";
|
|
8762
8784
|
for (f = 0; f < T.length; f++)
|
|
8763
|
-
o[T[f].getAttribute("name") ?? ""] =
|
|
8785
|
+
o[T[f].getAttribute("name") ?? ""] = z(T[f]) ?? "";
|
|
8764
8786
|
}
|
|
8765
|
-
y !== null && (o.visibility =
|
|
8787
|
+
y !== null && (o.visibility = z(y) ?? ""), a.coordTimes.length !== 0 && (o.coordTimes = a.coordTimes.length === 1 ? a.coordTimes[0] : a.coordTimes);
|
|
8766
8788
|
const w = {
|
|
8767
8789
|
type: "Feature",
|
|
8768
8790
|
geometry: a.geoms.length === 1 ? a.geoms[0] : {
|
|
@@ -8774,7 +8796,7 @@ function qs(r, e, t, n) {
|
|
|
8774
8796
|
return Ce(r, "id") && (w.id = Ce(r, "id") ?? void 0), [w];
|
|
8775
8797
|
}
|
|
8776
8798
|
function la(r, e) {
|
|
8777
|
-
const t =
|
|
8799
|
+
const t = U(r, e), n = [], a = [];
|
|
8778
8800
|
let o = [];
|
|
8779
8801
|
const i = t.length;
|
|
8780
8802
|
if (!(i < 2)) {
|
|
@@ -8789,8 +8811,8 @@ function la(r, e) {
|
|
|
8789
8811
|
};
|
|
8790
8812
|
}
|
|
8791
8813
|
}
|
|
8792
|
-
function
|
|
8793
|
-
const e =
|
|
8814
|
+
function Bs(r) {
|
|
8815
|
+
const e = U(r, "trkseg"), t = [], n = [], a = [];
|
|
8794
8816
|
let o;
|
|
8795
8817
|
for (let s = 0; s < e.length; s++)
|
|
8796
8818
|
if (o = la(e[s], "trkpt"), o !== void 0 && (o.line && t.push(o.line), o.times && o.times.length && n.push(o.times), a.length || o.heartRates && o.heartRates.length)) {
|
|
@@ -8820,7 +8842,7 @@ function Us(r) {
|
|
|
8820
8842
|
}
|
|
8821
8843
|
};
|
|
8822
8844
|
}
|
|
8823
|
-
function
|
|
8845
|
+
function Us(r) {
|
|
8824
8846
|
const e = la(r, "rtept");
|
|
8825
8847
|
return e === void 0 ? void 0 : {
|
|
8826
8848
|
type: "Feature",
|
|
@@ -8849,7 +8871,7 @@ function ua(r) {
|
|
|
8849
8871
|
if (r) {
|
|
8850
8872
|
const t = k(r, "line");
|
|
8851
8873
|
if (t) {
|
|
8852
|
-
const n =
|
|
8874
|
+
const n = z(k(t, "color")), a = Number.parseFloat(z(k(t, "opacity")) ?? "0"), o = Number.parseFloat(z(k(t, "width")) ?? "0");
|
|
8853
8875
|
n && (e.stroke = n), Number.isNaN(a) || (e["stroke-opacity"] = a), Number.isNaN(o) || (e["stroke-width"] = o * 96 / 25.4);
|
|
8854
8876
|
}
|
|
8855
8877
|
}
|
|
@@ -8863,7 +8885,7 @@ function kr(r) {
|
|
|
8863
8885
|
"type",
|
|
8864
8886
|
"time",
|
|
8865
8887
|
"keywords"
|
|
8866
|
-
]), t =
|
|
8888
|
+
]), t = U(r, "link");
|
|
8867
8889
|
if (t.length !== 0) {
|
|
8868
8890
|
e.links = [];
|
|
8869
8891
|
for (const n of Array.from(t)) {
|
|
@@ -8883,7 +8905,7 @@ function sn(r) {
|
|
|
8883
8905
|
e = (e << 5) - e + r.charCodeAt(t) | 0;
|
|
8884
8906
|
return e;
|
|
8885
8907
|
}
|
|
8886
|
-
function
|
|
8908
|
+
function U(r, e) {
|
|
8887
8909
|
return r.getElementsByTagName(e);
|
|
8888
8910
|
}
|
|
8889
8911
|
function Ce(r, e) {
|
|
@@ -8893,7 +8915,7 @@ function ln(r, e) {
|
|
|
8893
8915
|
return Number.parseFloat(Ce(r, e) ?? "0");
|
|
8894
8916
|
}
|
|
8895
8917
|
function k(r, e) {
|
|
8896
|
-
const t =
|
|
8918
|
+
const t = U(r, e);
|
|
8897
8919
|
return t.length ? t[0] : null;
|
|
8898
8920
|
}
|
|
8899
8921
|
function Gs(r) {
|
|
@@ -8902,14 +8924,14 @@ function Gs(r) {
|
|
|
8902
8924
|
function ca(r) {
|
|
8903
8925
|
return r.map(Number.parseFloat).map((e) => Number.isNaN(e) ? null : e);
|
|
8904
8926
|
}
|
|
8905
|
-
function
|
|
8927
|
+
function z(r) {
|
|
8906
8928
|
return r && Gs(r), r && r.textContent;
|
|
8907
8929
|
}
|
|
8908
8930
|
function er(r, e) {
|
|
8909
8931
|
const t = {};
|
|
8910
8932
|
let n, a;
|
|
8911
8933
|
for (a = 0; a < e.length; a++)
|
|
8912
|
-
n = k(r, e[a]), n && (t[e[a]] =
|
|
8934
|
+
n = k(r, e[a]), n && (t[e[a]] = z(n) ?? "");
|
|
8913
8935
|
return t;
|
|
8914
8936
|
}
|
|
8915
8937
|
function pa(r) {
|
|
@@ -8923,10 +8945,10 @@ function un(r) {
|
|
|
8923
8945
|
function fa(r) {
|
|
8924
8946
|
const e = [ln(r, "lon"), ln(r, "lat")], t = k(r, "ele"), n = k(r, "gpxtpx:hr") || k(r, "hr"), a = k(r, "time");
|
|
8925
8947
|
let o;
|
|
8926
|
-
return t && (o = Number.parseFloat(
|
|
8948
|
+
return t && (o = Number.parseFloat(z(t) ?? "0"), Number.isNaN(o) || e.push(o)), {
|
|
8927
8949
|
coordinates: e,
|
|
8928
|
-
time: a ?
|
|
8929
|
-
heartRate: n !== null ? Number.parseFloat(
|
|
8950
|
+
time: a ? z(a) : null,
|
|
8951
|
+
heartRate: n !== null ? Number.parseFloat(z(n) ?? "0") : null
|
|
8930
8952
|
};
|
|
8931
8953
|
}
|
|
8932
8954
|
function Hs(r) {
|
|
@@ -8956,8 +8978,8 @@ function Ks(r) {
|
|
|
8956
8978
|
class x extends Array {
|
|
8957
8979
|
constructor(t = {}) {
|
|
8958
8980
|
super();
|
|
8959
|
-
|
|
8960
|
-
|
|
8981
|
+
I(this, "min", 0);
|
|
8982
|
+
I(this, "max", 1);
|
|
8961
8983
|
"min" in t && (this.min = t.min), "max" in t && (this.max = t.max), "stops" in t && this.setStops(t.stops, { clone: !1 });
|
|
8962
8984
|
}
|
|
8963
8985
|
/**
|
|
@@ -9933,10 +9955,10 @@ const cn = [
|
|
|
9933
9955
|
function Lr() {
|
|
9934
9956
|
return cn[~~(Math.random() * cn.length)][~~(Math.random() * 4)];
|
|
9935
9957
|
}
|
|
9936
|
-
function
|
|
9958
|
+
function It() {
|
|
9937
9959
|
return `maptiler_source_${vn()}`;
|
|
9938
9960
|
}
|
|
9939
|
-
function
|
|
9961
|
+
function Mt() {
|
|
9940
9962
|
return `maptiler_layer_${vn()}`;
|
|
9941
9963
|
}
|
|
9942
9964
|
function pn(r, e) {
|
|
@@ -9954,7 +9976,7 @@ function pn(r, e) {
|
|
|
9954
9976
|
function Ae(r) {
|
|
9955
9977
|
return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((e) => [e.zoom, e.value])];
|
|
9956
9978
|
}
|
|
9957
|
-
function
|
|
9979
|
+
function R(r) {
|
|
9958
9980
|
return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((e) => [e.zoom, e.value])];
|
|
9959
9981
|
}
|
|
9960
9982
|
function Js(r, e) {
|
|
@@ -10059,7 +10081,7 @@ async function el(r, e, t = {}) {
|
|
|
10059
10081
|
let n = e.data;
|
|
10060
10082
|
if (typeof n == "string") {
|
|
10061
10083
|
if (mt(n))
|
|
10062
|
-
n = `https://api.maptiler.com/data/${e.data}/features.json?key=${
|
|
10084
|
+
n = `https://api.maptiler.com/data/${e.data}/features.json?key=${B.apiKey}`;
|
|
10063
10085
|
else if (((a = n.split(".").pop()) == null ? void 0 : a.toLowerCase().trim()) === "gpx") {
|
|
10064
10086
|
const s = await (await fetch(n, t)).text();
|
|
10065
10087
|
n = ia(s);
|
|
@@ -10081,7 +10103,7 @@ async function el(r, e, t = {}) {
|
|
|
10081
10103
|
function tl(r, e) {
|
|
10082
10104
|
if (e.layerId && r.getLayer(e.layerId))
|
|
10083
10105
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
10084
|
-
const t = e.sourceId ??
|
|
10106
|
+
const t = e.sourceId ?? It(), n = e.layerId ?? Mt(), a = {
|
|
10085
10107
|
polylineLayerId: n,
|
|
10086
10108
|
polylineOutlineLayerId: "",
|
|
10087
10109
|
polylineSourceId: t
|
|
@@ -10107,10 +10129,10 @@ function tl(r, e) {
|
|
|
10107
10129
|
minzoom: e.minzoom ?? 0,
|
|
10108
10130
|
maxzoom: e.maxzoom ?? 23,
|
|
10109
10131
|
paint: {
|
|
10110
|
-
"line-opacity": typeof f == "number" ? f :
|
|
10132
|
+
"line-opacity": typeof f == "number" ? f : R(f),
|
|
10111
10133
|
"line-color": typeof y == "string" ? y : Ae(y),
|
|
10112
10134
|
"line-width": Js(o, p),
|
|
10113
|
-
"line-blur": typeof d == "number" ? d :
|
|
10135
|
+
"line-blur": typeof d == "number" ? d : R(d)
|
|
10114
10136
|
}
|
|
10115
10137
|
},
|
|
10116
10138
|
e.beforeId
|
|
@@ -10128,11 +10150,11 @@ function tl(r, e) {
|
|
|
10128
10150
|
minzoom: e.minzoom ?? 0,
|
|
10129
10151
|
maxzoom: e.maxzoom ?? 23,
|
|
10130
10152
|
paint: {
|
|
10131
|
-
"line-opacity": typeof s == "number" ? s :
|
|
10153
|
+
"line-opacity": typeof s == "number" ? s : R(s),
|
|
10132
10154
|
"line-color": typeof i == "string" ? i : Ae(i),
|
|
10133
|
-
"line-width": typeof o == "number" ? o :
|
|
10134
|
-
"line-blur": typeof l == "number" ? l :
|
|
10135
|
-
"line-gap-width": typeof u == "number" ? u :
|
|
10155
|
+
"line-width": typeof o == "number" ? o : R(o),
|
|
10156
|
+
"line-blur": typeof l == "number" ? l : R(l),
|
|
10157
|
+
"line-gap-width": typeof u == "number" ? u : R(u),
|
|
10136
10158
|
// For some reasons passing "line-dasharray" with the value "undefined"
|
|
10137
10159
|
// results in no showing the line while it should have the same behavior
|
|
10138
10160
|
// of not adding the property "line-dasharray" as all.
|
|
@@ -10147,14 +10169,14 @@ function tl(r, e) {
|
|
|
10147
10169
|
function rl(r, e) {
|
|
10148
10170
|
if (e.layerId && r.getLayer(e.layerId))
|
|
10149
10171
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
10150
|
-
const t = e.sourceId ??
|
|
10172
|
+
const t = e.sourceId ?? It(), n = e.layerId ?? Mt(), a = {
|
|
10151
10173
|
polygonLayerId: n,
|
|
10152
10174
|
polygonOutlineLayerId: e.outline ? `${n}_outline` : "",
|
|
10153
10175
|
polygonSourceId: t
|
|
10154
10176
|
};
|
|
10155
10177
|
if (e.data && !r.getSource(t)) {
|
|
10156
10178
|
let m = e.data;
|
|
10157
|
-
typeof m == "string" && mt(m) && (m = `https://api.maptiler.com/data/${m}/features.json?key=${
|
|
10179
|
+
typeof m == "string" && mt(m) && (m = `https://api.maptiler.com/data/${m}/features.json?key=${B.apiKey}`), r.addSource(t, {
|
|
10158
10180
|
type: "geojson",
|
|
10159
10181
|
data: m
|
|
10160
10182
|
});
|
|
@@ -10172,7 +10194,7 @@ function rl(r, e) {
|
|
|
10172
10194
|
maxzoom: e.maxzoom ?? 23,
|
|
10173
10195
|
paint: {
|
|
10174
10196
|
"fill-color": typeof c == "string" ? c : Ae(c),
|
|
10175
|
-
"fill-opacity": typeof p == "number" ? p :
|
|
10197
|
+
"fill-opacity": typeof p == "number" ? p : R(p),
|
|
10176
10198
|
// Adding a pattern if provided
|
|
10177
10199
|
...m && { "fill-pattern": m }
|
|
10178
10200
|
}
|
|
@@ -10180,12 +10202,12 @@ function rl(r, e) {
|
|
|
10180
10202
|
e.beforeId
|
|
10181
10203
|
), e.outline === !0) {
|
|
10182
10204
|
let v;
|
|
10183
|
-
y === "inside" ? typeof i == "number" ? v = 0.5 * i : v =
|
|
10205
|
+
y === "inside" ? typeof i == "number" ? v = 0.5 * i : v = R(
|
|
10184
10206
|
i.map(({ zoom: w, value: b }) => ({
|
|
10185
10207
|
zoom: w,
|
|
10186
10208
|
value: 0.5 * b
|
|
10187
10209
|
}))
|
|
10188
|
-
) : y === "outside" ? typeof i == "number" ? v = -0.5 * i : v =
|
|
10210
|
+
) : y === "outside" ? typeof i == "number" ? v = -0.5 * i : v = R(
|
|
10189
10211
|
i.map((w) => ({
|
|
10190
10212
|
zoom: w.zoom,
|
|
10191
10213
|
value: -0.5 * w.value
|
|
@@ -10202,10 +10224,10 @@ function rl(r, e) {
|
|
|
10202
10224
|
minzoom: e.minzoom ?? 0,
|
|
10203
10225
|
maxzoom: e.maxzoom ?? 23,
|
|
10204
10226
|
paint: {
|
|
10205
|
-
"line-opacity": typeof l == "number" ? l :
|
|
10227
|
+
"line-opacity": typeof l == "number" ? l : R(l),
|
|
10206
10228
|
"line-color": typeof s == "string" ? s : Ae(s),
|
|
10207
|
-
"line-width": typeof i == "number" ? i :
|
|
10208
|
-
"line-blur": typeof u == "number" ? u :
|
|
10229
|
+
"line-width": typeof i == "number" ? i : R(i),
|
|
10230
|
+
"line-blur": typeof u == "number" ? u : R(u),
|
|
10209
10231
|
"line-offset": v,
|
|
10210
10232
|
// For some reasons passing "line-dasharray" with the value "undefined"
|
|
10211
10233
|
// results in no showing the line while it should have the same behavior
|
|
@@ -10228,32 +10250,32 @@ function rl(r, e) {
|
|
|
10228
10250
|
function nl(r, e) {
|
|
10229
10251
|
if (e.layerId && r.getLayer(e.layerId))
|
|
10230
10252
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
10231
|
-
const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : da.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ??
|
|
10253
|
+
const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : da.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ?? It(), u = e.layerId ?? Mt(), c = e.showLabel ?? a, p = e.alignOnViewport ?? !0, y = e.outline ?? !1, f = e.outlineOpacity ?? 1, d = e.outlineWidth ?? 1, m = e.outlineColor ?? "#FFFFFF";
|
|
10232
10254
|
let v;
|
|
10233
10255
|
const w = e.zoomCompensation ?? !0, b = e.minzoom ?? 0, T = e.maxzoom ?? 23;
|
|
10234
|
-
typeof e.pointOpacity == "number" ? v = e.pointOpacity : Array.isArray(e.pointOpacity) ? v =
|
|
10256
|
+
typeof e.pointOpacity == "number" ? v = e.pointOpacity : Array.isArray(e.pointOpacity) ? v = R(e.pointOpacity) : e.cluster ? v = yn(i, "point_count") : e.property ? v = yn(i, e.property) : v = R([
|
|
10235
10257
|
{ zoom: b, value: 0 },
|
|
10236
10258
|
{ zoom: b + 0.25, value: 1 },
|
|
10237
10259
|
{ zoom: T - 0.25, value: 1 },
|
|
10238
10260
|
{ zoom: T, value: 0 }
|
|
10239
10261
|
]);
|
|
10240
|
-
const
|
|
10262
|
+
const $ = {
|
|
10241
10263
|
pointLayerId: u,
|
|
10242
10264
|
clusterLayerId: "",
|
|
10243
10265
|
labelLayerId: "",
|
|
10244
10266
|
pointSourceId: l
|
|
10245
10267
|
};
|
|
10246
10268
|
if (e.data && !r.getSource(l)) {
|
|
10247
|
-
let
|
|
10248
|
-
typeof
|
|
10269
|
+
let P = e.data;
|
|
10270
|
+
typeof P == "string" && mt(P) && (P = `https://api.maptiler.com/data/${P}/features.json?key=${B.apiKey}`), r.addSource(l, {
|
|
10249
10271
|
type: "geojson",
|
|
10250
|
-
data:
|
|
10272
|
+
data: P,
|
|
10251
10273
|
cluster: a
|
|
10252
10274
|
});
|
|
10253
10275
|
}
|
|
10254
10276
|
if (a) {
|
|
10255
|
-
|
|
10256
|
-
const
|
|
10277
|
+
$.clusterLayerId = `${u}_cluster`;
|
|
10278
|
+
const P = Array.from({ length: o }, (te, ge) => {
|
|
10257
10279
|
const Oe = s.min + ge * (s.max - s.min) / (o - 1);
|
|
10258
10280
|
return {
|
|
10259
10281
|
value: Oe,
|
|
@@ -10263,21 +10285,21 @@ function nl(r, e) {
|
|
|
10263
10285
|
});
|
|
10264
10286
|
r.addLayer(
|
|
10265
10287
|
{
|
|
10266
|
-
id:
|
|
10288
|
+
id: $.clusterLayerId,
|
|
10267
10289
|
type: "circle",
|
|
10268
10290
|
source: l,
|
|
10269
10291
|
filter: ["has", "point_count"],
|
|
10270
10292
|
paint: {
|
|
10271
10293
|
// 'circle-color': options.pointColor ?? colorDrivenByProperty(clusterStyle, "point_count"),
|
|
10272
|
-
"circle-color": typeof e.pointColor == "string" ? e.pointColor : fn(
|
|
10273
|
-
"circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ?
|
|
10294
|
+
"circle-color": typeof e.pointColor == "string" ? e.pointColor : fn(P, "point_count"),
|
|
10295
|
+
"circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? R(e.pointRadius) : dn(P, "point_count", !1),
|
|
10274
10296
|
"circle-pitch-alignment": p ? "viewport" : "map",
|
|
10275
10297
|
"circle-pitch-scale": "map",
|
|
10276
10298
|
// scale with camera distance regardless of viewport/biewport alignement
|
|
10277
10299
|
"circle-opacity": v,
|
|
10278
10300
|
...y && {
|
|
10279
|
-
"circle-stroke-opacity": typeof f == "number" ? f :
|
|
10280
|
-
"circle-stroke-width": typeof d == "number" ? d :
|
|
10301
|
+
"circle-stroke-opacity": typeof f == "number" ? f : R(f),
|
|
10302
|
+
"circle-stroke-width": typeof d == "number" ? d : R(d),
|
|
10281
10303
|
"circle-stroke-color": typeof m == "string" ? m : Ae(m)
|
|
10282
10304
|
}
|
|
10283
10305
|
},
|
|
@@ -10287,7 +10309,7 @@ function nl(r, e) {
|
|
|
10287
10309
|
e.beforeId
|
|
10288
10310
|
), r.addLayer(
|
|
10289
10311
|
{
|
|
10290
|
-
id:
|
|
10312
|
+
id: $.pointLayerId,
|
|
10291
10313
|
type: "circle",
|
|
10292
10314
|
source: l,
|
|
10293
10315
|
filter: ["!", ["has", "point_count"]],
|
|
@@ -10297,11 +10319,11 @@ function nl(r, e) {
|
|
|
10297
10319
|
// scale with camera distance regardless of viewport/biewport alignement
|
|
10298
10320
|
// 'circle-color': options.pointColor ?? clusterStyle[0].color,
|
|
10299
10321
|
"circle-color": typeof e.pointColor == "string" ? e.pointColor : i.getColorHex(i.getBounds().min),
|
|
10300
|
-
"circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ?
|
|
10322
|
+
"circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? R(e.pointRadius) : P[0].pointRadius * 0.75,
|
|
10301
10323
|
"circle-opacity": v,
|
|
10302
10324
|
...y && {
|
|
10303
|
-
"circle-stroke-opacity": typeof f == "number" ? f :
|
|
10304
|
-
"circle-stroke-width": typeof d == "number" ? d :
|
|
10325
|
+
"circle-stroke-opacity": typeof f == "number" ? f : R(f),
|
|
10326
|
+
"circle-stroke-width": typeof d == "number" ? d : R(d),
|
|
10305
10327
|
"circle-stroke-color": typeof m == "string" ? m : Ae(m)
|
|
10306
10328
|
}
|
|
10307
10329
|
},
|
|
@@ -10311,13 +10333,13 @@ function nl(r, e) {
|
|
|
10311
10333
|
e.beforeId
|
|
10312
10334
|
);
|
|
10313
10335
|
} else {
|
|
10314
|
-
let
|
|
10336
|
+
let P = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : Lr(), te = typeof e.pointRadius == "number" ? w ? R([
|
|
10315
10337
|
{ zoom: 0, value: e.pointRadius * 0.025 },
|
|
10316
10338
|
{ zoom: 2, value: e.pointRadius * 0.05 },
|
|
10317
10339
|
{ zoom: 4, value: e.pointRadius * 0.1 },
|
|
10318
10340
|
{ zoom: 8, value: e.pointRadius * 0.25 },
|
|
10319
10341
|
{ zoom: 16, value: e.pointRadius * 1 }
|
|
10320
|
-
]) : e.pointRadius : Array.isArray(e.pointRadius) ?
|
|
10342
|
+
]) : e.pointRadius : Array.isArray(e.pointRadius) ? R(e.pointRadius) : w ? R([
|
|
10321
10343
|
{ zoom: 0, value: t * 0.05 },
|
|
10322
10344
|
{ zoom: 2, value: t * 0.1 },
|
|
10323
10345
|
{ zoom: 4, value: t * 0.2 },
|
|
@@ -10333,11 +10355,11 @@ function nl(r, e) {
|
|
|
10333
10355
|
color: typeof e.pointColor == "string" ? e.pointColor : i.getColorHex(Qe)
|
|
10334
10356
|
};
|
|
10335
10357
|
});
|
|
10336
|
-
|
|
10358
|
+
P = fn(ge, e.property), te = dn(ge, e.property, w);
|
|
10337
10359
|
}
|
|
10338
10360
|
r.addLayer(
|
|
10339
10361
|
{
|
|
10340
|
-
id:
|
|
10362
|
+
id: $.pointLayerId,
|
|
10341
10363
|
type: "circle",
|
|
10342
10364
|
source: l,
|
|
10343
10365
|
layout: {
|
|
@@ -10348,12 +10370,12 @@ function nl(r, e) {
|
|
|
10348
10370
|
"circle-pitch-alignment": p ? "viewport" : "map",
|
|
10349
10371
|
"circle-pitch-scale": "map",
|
|
10350
10372
|
// scale with camera distance regardless of viewport/biewport alignement
|
|
10351
|
-
"circle-color":
|
|
10373
|
+
"circle-color": P,
|
|
10352
10374
|
"circle-opacity": v,
|
|
10353
10375
|
"circle-radius": te,
|
|
10354
10376
|
...y && {
|
|
10355
|
-
"circle-stroke-opacity": typeof f == "number" ? f :
|
|
10356
|
-
"circle-stroke-width": typeof d == "number" ? d :
|
|
10377
|
+
"circle-stroke-opacity": typeof f == "number" ? f : R(f),
|
|
10378
|
+
"circle-stroke-width": typeof d == "number" ? d : R(d),
|
|
10357
10379
|
"circle-stroke-color": typeof m == "string" ? m : Ae(m)
|
|
10358
10380
|
}
|
|
10359
10381
|
},
|
|
@@ -10364,11 +10386,11 @@ function nl(r, e) {
|
|
|
10364
10386
|
);
|
|
10365
10387
|
}
|
|
10366
10388
|
if (c !== !1 && (e.cluster || e.property)) {
|
|
10367
|
-
|
|
10368
|
-
const
|
|
10389
|
+
$.labelLayerId = `${u}_label`;
|
|
10390
|
+
const P = e.labelColor ?? "#fff", te = e.labelSize ?? 12;
|
|
10369
10391
|
r.addLayer(
|
|
10370
10392
|
{
|
|
10371
|
-
id:
|
|
10393
|
+
id: $.labelLayerId,
|
|
10372
10394
|
type: "symbol",
|
|
10373
10395
|
source: l,
|
|
10374
10396
|
filter: ["has", e.cluster ? "point_count" : e.property],
|
|
@@ -10381,7 +10403,7 @@ function nl(r, e) {
|
|
|
10381
10403
|
// so that the largest value goes on top
|
|
10382
10404
|
},
|
|
10383
10405
|
paint: {
|
|
10384
|
-
"text-color":
|
|
10406
|
+
"text-color": P,
|
|
10385
10407
|
"text-opacity": v
|
|
10386
10408
|
},
|
|
10387
10409
|
minzoom: b,
|
|
@@ -10390,12 +10412,12 @@ function nl(r, e) {
|
|
|
10390
10412
|
e.beforeId
|
|
10391
10413
|
);
|
|
10392
10414
|
}
|
|
10393
|
-
return
|
|
10415
|
+
return $;
|
|
10394
10416
|
}
|
|
10395
10417
|
function al(r, e) {
|
|
10396
10418
|
if (e.layerId && r.getLayer(e.layerId))
|
|
10397
10419
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
10398
|
-
const t = e.sourceId ??
|
|
10420
|
+
const t = e.sourceId ?? It(), n = e.layerId ?? Mt(), a = e.minzoom ?? 0, o = e.maxzoom ?? 23, i = e.zoomCompensation ?? !0, s = e.opacity ?? [
|
|
10399
10421
|
{ zoom: a, value: 0 },
|
|
10400
10422
|
{ zoom: a + 0.25, value: 1 },
|
|
10401
10423
|
{ zoom: o - 0.25, value: 1 },
|
|
@@ -10423,14 +10445,14 @@ function al(r, e) {
|
|
|
10423
10445
|
{ zoom: 16, value: 50 }
|
|
10424
10446
|
], m = e.radius ?? (i ? d : 10);
|
|
10425
10447
|
let v = 1;
|
|
10426
|
-
typeof m == "number" ? v = m : Array.isArray(m) && "zoom" in m[0] ? v =
|
|
10448
|
+
typeof m == "number" ? v = m : Array.isArray(m) && "zoom" in m[0] ? v = R(m) : p && Array.isArray(m) && "propertyValue" in m[0] ? v = Xs(m, p, i) : !p && Array.isArray(m) && "propertyValue" in m[0] ? (v = R(d), console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")) : v = R(d);
|
|
10427
10449
|
const w = {
|
|
10428
10450
|
heatmapLayerId: n,
|
|
10429
10451
|
heatmapSourceId: t
|
|
10430
10452
|
};
|
|
10431
10453
|
if (e.data && !r.getSource(t)) {
|
|
10432
10454
|
let b = e.data;
|
|
10433
|
-
typeof b == "string" && mt(b) && (b = `https://api.maptiler.com/data/${b}/features.json?key=${
|
|
10455
|
+
typeof b == "string" && mt(b) && (b = `https://api.maptiler.com/data/${b}/features.json?key=${B.apiKey}`), r.addSource(t, {
|
|
10434
10456
|
type: "geojson",
|
|
10435
10457
|
data: b
|
|
10436
10458
|
});
|
|
@@ -10444,16 +10466,16 @@ function al(r, e) {
|
|
|
10444
10466
|
maxzoom: o,
|
|
10445
10467
|
paint: {
|
|
10446
10468
|
"heatmap-weight": f,
|
|
10447
|
-
"heatmap-intensity": typeof c == "number" ? c :
|
|
10469
|
+
"heatmap-intensity": typeof c == "number" ? c : R(c),
|
|
10448
10470
|
"heatmap-color": Qs(l),
|
|
10449
10471
|
"heatmap-radius": v,
|
|
10450
|
-
"heatmap-opacity": typeof s == "number" ? s :
|
|
10472
|
+
"heatmap-opacity": typeof s == "number" ? s : R(s)
|
|
10451
10473
|
}
|
|
10452
10474
|
},
|
|
10453
10475
|
e.beforeId
|
|
10454
10476
|
), w;
|
|
10455
10477
|
}
|
|
10456
|
-
const
|
|
10478
|
+
const zl = {
|
|
10457
10479
|
addPolyline: el,
|
|
10458
10480
|
addPolygon: rl,
|
|
10459
10481
|
addPoint: nl,
|
|
@@ -10461,10 +10483,10 @@ const _l = {
|
|
|
10461
10483
|
takeScreenshot: Ws
|
|
10462
10484
|
};
|
|
10463
10485
|
ao();
|
|
10464
|
-
function
|
|
10486
|
+
function Rl() {
|
|
10465
10487
|
return Ja.version;
|
|
10466
10488
|
}
|
|
10467
|
-
const
|
|
10489
|
+
const Pl = S.Map, $l = S.Marker, Nl = S.Popup, Fl = S.Style, Ol = S.CanvasSource, Dl = S.GeoJSONSource, jl = S.ImageSource, ql = S.RasterTileSource, Bl = S.RasterDEMTileSource, Ul = S.VectorTileSource, Vl = S.VideoSource, Gl = S.NavigationControl, Hl = S.GeolocateControl, Kl = S.AttributionControl, Wl = S.LogoControl, Zl = S.ScaleControl, Jl = S.FullscreenControl, Yl = S.TerrainControl, Xl = S.BoxZoomHandler, Ql = S.ScrollZoomHandler, eu = S.CooperativeGesturesHandler, tu = S.KeyboardHandler, ru = S.TwoFingersTouchPitchHandler, nu = S.MapWheelEvent, au = S.MapTouchEvent, ou = S.MapMouseEvent, iu = S.config, su = S.getVersion, {
|
|
10468
10490
|
setRTLTextPlugin: lu,
|
|
10469
10491
|
getRTLTextPluginStatus: uu,
|
|
10470
10492
|
LngLat: cu,
|
|
@@ -10485,14 +10507,14 @@ const $l = S.Map, Rl = S.Marker, Nl = S.Popup, Fl = S.Style, Ol = S.CanvasSource
|
|
|
10485
10507
|
TwoFingersTouchRotateHandler: Cu,
|
|
10486
10508
|
getWorkerCount: Au,
|
|
10487
10509
|
setWorkerCount: Tu,
|
|
10488
|
-
getMaxParallelImageRequests:
|
|
10489
|
-
setMaxParallelImageRequests:
|
|
10490
|
-
getWorkerUrl:
|
|
10491
|
-
setWorkerUrl:
|
|
10492
|
-
addSourceType:
|
|
10493
|
-
importScriptInWorkers:
|
|
10494
|
-
addProtocol:
|
|
10495
|
-
removeProtocol:
|
|
10510
|
+
getMaxParallelImageRequests: Eu,
|
|
10511
|
+
setMaxParallelImageRequests: Iu,
|
|
10512
|
+
getWorkerUrl: Mu,
|
|
10513
|
+
setWorkerUrl: _u,
|
|
10514
|
+
addSourceType: zu,
|
|
10515
|
+
importScriptInWorkers: Ru,
|
|
10516
|
+
addProtocol: Pu,
|
|
10517
|
+
removeProtocol: $u
|
|
10496
10518
|
} = S;
|
|
10497
10519
|
export {
|
|
10498
10520
|
yu as AJAXError,
|
|
@@ -10523,27 +10545,27 @@ export {
|
|
|
10523
10545
|
jl as ImageSourceMLGL,
|
|
10524
10546
|
Tl as KeyboardHandler,
|
|
10525
10547
|
tu as KeyboardHandlerMLGL,
|
|
10526
|
-
|
|
10548
|
+
M as Language,
|
|
10527
10549
|
cu as LngLat,
|
|
10528
10550
|
pu as LngLatBounds,
|
|
10529
10551
|
wo as LogoControl,
|
|
10530
10552
|
Wl as LogoControlMLGL,
|
|
10531
10553
|
Os as Map,
|
|
10532
|
-
|
|
10533
|
-
|
|
10554
|
+
Pl as MapMLGL,
|
|
10555
|
+
_l as MapMouseEvent,
|
|
10534
10556
|
ou as MapMouseEventMLGL,
|
|
10535
10557
|
Ou as MapStyle,
|
|
10536
10558
|
Du as MapStyleVariant,
|
|
10537
|
-
|
|
10559
|
+
Ml as MapTouchEvent,
|
|
10538
10560
|
au as MapTouchEventMLGL,
|
|
10539
|
-
|
|
10561
|
+
Il as MapWheelEvent,
|
|
10540
10562
|
nu as MapWheelEventMLGL,
|
|
10541
10563
|
Ns as MaptilerGeolocateControl,
|
|
10542
|
-
|
|
10543
|
-
|
|
10544
|
-
|
|
10564
|
+
$r as MaptilerLogoControl,
|
|
10565
|
+
Ps as MaptilerNavigationControl,
|
|
10566
|
+
Rs as MaptilerTerrainControl,
|
|
10545
10567
|
pl as Marker,
|
|
10546
|
-
|
|
10568
|
+
$l as MarkerMLGL,
|
|
10547
10569
|
fu as MercatorCoordinate,
|
|
10548
10570
|
Gl as NavigationControMLGL,
|
|
10549
10571
|
vo as NavigationControl,
|
|
@@ -10551,7 +10573,7 @@ export {
|
|
|
10551
10573
|
dl as Popup,
|
|
10552
10574
|
Nl as PopupMLGL,
|
|
10553
10575
|
bl as RasterDEMTileSource,
|
|
10554
|
-
|
|
10576
|
+
Bl as RasterDEMTileSourceMLGL,
|
|
10555
10577
|
vl as RasterTileSource,
|
|
10556
10578
|
ql as RasterTileSourceMLGL,
|
|
10557
10579
|
ju as ReferenceMapStyle,
|
|
@@ -10565,22 +10587,22 @@ export {
|
|
|
10565
10587
|
Fl as StyleMLGL,
|
|
10566
10588
|
Yl as TerrainControMLGL,
|
|
10567
10589
|
kl as TerrainControl,
|
|
10568
|
-
|
|
10590
|
+
El as TwoFingersTouchPitchHandler,
|
|
10569
10591
|
ru as TwoFingersTouchPitchHandlerMLGL,
|
|
10570
10592
|
Cu as TwoFingersTouchRotateHandler,
|
|
10571
10593
|
Lu as TwoFingersTouchZoomHandler,
|
|
10572
10594
|
xu as TwoFingersTouchZoomRotateHandler,
|
|
10573
10595
|
wl as VectorTileSource,
|
|
10574
|
-
|
|
10596
|
+
Ul as VectorTileSourceMLGL,
|
|
10575
10597
|
Sl as VideoSource,
|
|
10576
10598
|
Vl as VideoSourceMLGL,
|
|
10577
|
-
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
|
|
10599
|
+
Pu as addProtocol,
|
|
10600
|
+
zu as addSourceType,
|
|
10601
|
+
Bu as areSameLanguages,
|
|
10602
|
+
Uu as bufferToPixelDataBrowser,
|
|
10581
10603
|
Vu as circumferenceAtLatitude,
|
|
10582
10604
|
hu as clearPrewarmedResources,
|
|
10583
|
-
|
|
10605
|
+
B as config,
|
|
10584
10606
|
iu as configMLGL,
|
|
10585
10607
|
Gu as coordinates,
|
|
10586
10608
|
Hu as data,
|
|
@@ -10589,35 +10611,35 @@ export {
|
|
|
10589
10611
|
Zu as geocoding,
|
|
10590
10612
|
Ju as geolocation,
|
|
10591
10613
|
Yu as getAutoLanguage,
|
|
10592
|
-
|
|
10614
|
+
Ir as getBrowserLanguage,
|
|
10593
10615
|
Xu as getBufferToPixelDataParser,
|
|
10594
10616
|
Qu as getLanguageInfoFromCode,
|
|
10595
10617
|
ec as getLanguageInfoFromFlag,
|
|
10596
10618
|
tc as getLanguageInfoFromKey,
|
|
10597
10619
|
su as getMapLibreVersion,
|
|
10598
|
-
|
|
10620
|
+
Eu as getMaxParallelImageRequests,
|
|
10599
10621
|
uu as getRTLTextPluginStatus,
|
|
10600
10622
|
rc as getTileCache,
|
|
10601
|
-
|
|
10623
|
+
Rl as getVersion,
|
|
10602
10624
|
so as getWebGLSupportError,
|
|
10603
10625
|
Au as getWorkerCount,
|
|
10604
|
-
|
|
10626
|
+
Mu as getWorkerUrl,
|
|
10605
10627
|
ia as gpx,
|
|
10606
10628
|
Hs as gpxOrKml,
|
|
10607
10629
|
oa as hasChildNodeWithName,
|
|
10608
|
-
|
|
10609
|
-
|
|
10630
|
+
zl as helpers,
|
|
10631
|
+
Ru as importScriptInWorkers,
|
|
10610
10632
|
nc as isLanguageInfo,
|
|
10611
10633
|
sa as kml,
|
|
10612
10634
|
ac as mapStylePresetList,
|
|
10613
10635
|
oc as math,
|
|
10614
10636
|
ic as misc,
|
|
10615
10637
|
mu as prewarm,
|
|
10616
|
-
|
|
10617
|
-
|
|
10638
|
+
$u as removeProtocol,
|
|
10639
|
+
Iu as setMaxParallelImageRequests,
|
|
10618
10640
|
lu as setRTLTextPlugin,
|
|
10619
10641
|
Tu as setWorkerCount,
|
|
10620
|
-
|
|
10642
|
+
_u as setWorkerUrl,
|
|
10621
10643
|
sc as staticMaps,
|
|
10622
10644
|
xr as str2xml,
|
|
10623
10645
|
lc as styleToStyle,
|