@florasync/leaflet-geokit 0.8.2 → 0.8.3
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/CHANGELOG.md +6 -0
- package/dist/django/index.js +1313 -1261
- package/dist/django/index.js.map +1 -1
- package/dist/leaflet-geokit.es.js +2185 -2133
- package/dist/leaflet-geokit.es.js.map +1 -1
- package/dist/leaflet-geokit.external.es.js +112 -60
- package/dist/leaflet-geokit.external.es.js.map +1 -1
- package/dist/leaflet-geokit.umd.js +55 -7
- package/dist/leaflet-geokit.umd.js.map +1 -1
- package/dist/preact/{index-DCGBWrrm.js → index-BMfJn-mD.js} +113 -61
- package/dist/preact/index-BMfJn-mD.js.map +1 -0
- package/dist/preact/index.js +1 -1
- package/dist/preact-bundled/index.js +1100 -1048
- package/dist/preact-bundled/index.js.map +1 -1
- package/dist/react/{index-DCGBWrrm.js → index-BMfJn-mD.js} +113 -61
- package/dist/react/index-BMfJn-mD.js.map +1 -0
- package/dist/react/index.js +1 -1
- package/dist/react-bundled/index.js +1100 -1048
- package/dist/react-bundled/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/preact/index-DCGBWrrm.js.map +0 -1
- package/dist/react/index-DCGBWrrm.js.map +0 -1
|
@@ -12,7 +12,7 @@ const L = {
|
|
|
12
12
|
Error: "leaflet-draw:error",
|
|
13
13
|
Ingest: "leaflet-draw:ingest",
|
|
14
14
|
Export: "leaflet-draw:export"
|
|
15
|
-
},
|
|
15
|
+
}, q = {
|
|
16
16
|
Status: "leaflet-geokit:status",
|
|
17
17
|
Diagnostic: "leaflet-geokit:diagnostic"
|
|
18
18
|
}, fe = {
|
|
@@ -32,7 +32,7 @@ function Je() {
|
|
|
32
32
|
return "";
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function V(a, t = "debug", e = console) {
|
|
36
36
|
let r = t;
|
|
37
37
|
const o = (n) => (...s) => {
|
|
38
38
|
try {
|
|
@@ -55,7 +55,7 @@ function J(a, t = "debug", e = console) {
|
|
|
55
55
|
warn: o("warn"),
|
|
56
56
|
error: o("error"),
|
|
57
57
|
child(n) {
|
|
58
|
-
return
|
|
58
|
+
return V(`${a}:${n}`, r, e);
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
}
|
|
@@ -244,6 +244,54 @@ ${Ye}
|
|
|
244
244
|
border-right-color: #8A2BE2 !important;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
+
/* --- Managed toolbar controls --- */
|
|
248
|
+
[data-geokit-map-container][data-geokit-default-toolbar-hidden] .leaflet-draw-toolbar,
|
|
249
|
+
[data-geokit-map-container][data-geokit-default-toolbar-hidden] .leaflet-ruler,
|
|
250
|
+
[data-geokit-map-container][data-geokit-default-toolbar-hidden] .leaflet-ruler-settings-control {
|
|
251
|
+
display: none !important;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.leaflet-geokit-toolbar-group {
|
|
255
|
+
display: flex !important;
|
|
256
|
+
flex-direction: column !important;
|
|
257
|
+
gap: 6px !important;
|
|
258
|
+
padding: 6px !important;
|
|
259
|
+
border: 1px solid rgba(15, 23, 18, 0.16) !important;
|
|
260
|
+
border-radius: 16px !important;
|
|
261
|
+
background: rgba(255, 255, 255, 0.94) !important;
|
|
262
|
+
backdrop-filter: blur(10px) !important;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.leaflet-geokit-toolbar-button {
|
|
266
|
+
width: 44px !important;
|
|
267
|
+
height: 44px !important;
|
|
268
|
+
border: 1px solid rgba(15, 23, 18, 0.18) !important;
|
|
269
|
+
border-radius: 12px !important;
|
|
270
|
+
background: #fff !important;
|
|
271
|
+
color: #1f5134 !important;
|
|
272
|
+
box-shadow: 0 10px 24px rgba(15, 23, 18, 0.16) !important;
|
|
273
|
+
transition:
|
|
274
|
+
background 160ms ease,
|
|
275
|
+
border-color 160ms ease,
|
|
276
|
+
box-shadow 160ms ease,
|
|
277
|
+
transform 160ms ease !important;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.leaflet-geokit-toolbar-button:hover,
|
|
281
|
+
.leaflet-geokit-toolbar-button:focus-visible {
|
|
282
|
+
background: #f0f8ed !important;
|
|
283
|
+
border-color: #2f8f5f !important;
|
|
284
|
+
box-shadow:
|
|
285
|
+
0 0 0 1px rgba(47, 143, 95, 0.35),
|
|
286
|
+
0 12px 26px rgba(15, 23, 18, 0.18) !important;
|
|
287
|
+
transform: translateY(-1px) !important;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.leaflet-geokit-toolbar-button:focus-visible {
|
|
291
|
+
outline: 2px solid #2f8f5f !important;
|
|
292
|
+
outline-offset: 2px !important;
|
|
293
|
+
}
|
|
294
|
+
|
|
247
295
|
/* --- Move tool mode cursor styles --- */
|
|
248
296
|
.leaflet-draw-move-mode {
|
|
249
297
|
cursor: default !important;
|
|
@@ -288,30 +336,34 @@ function ot(a) {
|
|
|
288
336
|
} catch {
|
|
289
337
|
}
|
|
290
338
|
}
|
|
291
|
-
let U;
|
|
292
|
-
const at = new Uint8Array(16);
|
|
293
|
-
function it() {
|
|
294
|
-
if (!U && (U = typeof crypto != "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !U))
|
|
295
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
296
|
-
return U(at);
|
|
297
|
-
}
|
|
298
339
|
const M = [];
|
|
299
340
|
for (let a = 0; a < 256; ++a)
|
|
300
341
|
M.push((a + 256).toString(16).slice(1));
|
|
301
|
-
function
|
|
302
|
-
return M[a[t + 0]] + M[a[t + 1]] + M[a[t + 2]] + M[a[t + 3]] + "-" + M[a[t + 4]] + M[a[t + 5]] + "-" + M[a[t + 6]] + M[a[t + 7]] + "-" + M[a[t + 8]] + M[a[t + 9]] + "-" + M[a[t + 10]] + M[a[t + 11]] + M[a[t + 12]] + M[a[t + 13]] + M[a[t + 14]] + M[a[t + 15]];
|
|
342
|
+
function at(a, t = 0) {
|
|
343
|
+
return (M[a[t + 0]] + M[a[t + 1]] + M[a[t + 2]] + M[a[t + 3]] + "-" + M[a[t + 4]] + M[a[t + 5]] + "-" + M[a[t + 6]] + M[a[t + 7]] + "-" + M[a[t + 8]] + M[a[t + 9]] + "-" + M[a[t + 10]] + M[a[t + 11]] + M[a[t + 12]] + M[a[t + 13]] + M[a[t + 14]] + M[a[t + 15]]).toLowerCase();
|
|
303
344
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
345
|
+
let K;
|
|
346
|
+
const it = new Uint8Array(16);
|
|
347
|
+
function nt() {
|
|
348
|
+
if (!K) {
|
|
349
|
+
if (typeof crypto == "undefined" || !crypto.getRandomValues)
|
|
350
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
351
|
+
K = crypto.getRandomValues.bind(crypto);
|
|
352
|
+
}
|
|
353
|
+
return K(it);
|
|
354
|
+
}
|
|
355
|
+
const st = typeof crypto != "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ge = { randomUUID: st };
|
|
307
356
|
function de(a, t, e) {
|
|
357
|
+
var o, i, n;
|
|
308
358
|
if (ge.randomUUID && !a)
|
|
309
359
|
return ge.randomUUID();
|
|
310
360
|
a = a || {};
|
|
311
|
-
const r = a.random
|
|
312
|
-
|
|
361
|
+
const r = (n = (i = a.random) != null ? i : (o = a.rng) == null ? void 0 : o.call(a)) != null ? n : nt();
|
|
362
|
+
if (r.length < 16)
|
|
363
|
+
throw new Error("Random bytes length must be >= 16");
|
|
364
|
+
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, at(r);
|
|
313
365
|
}
|
|
314
|
-
function
|
|
366
|
+
function J(a) {
|
|
315
367
|
var e, r;
|
|
316
368
|
const t = (r = a.id) != null ? r : (e = a.properties) == null ? void 0 : e.id;
|
|
317
369
|
if (t != null)
|
|
@@ -319,7 +371,7 @@ function Z(a) {
|
|
|
319
371
|
}
|
|
320
372
|
const lt = /^(.*)::(\d+)$/;
|
|
321
373
|
function me(a) {
|
|
322
|
-
const t =
|
|
374
|
+
const t = J(a);
|
|
323
375
|
if (!t) return null;
|
|
324
376
|
const e = lt.exec(t);
|
|
325
377
|
return e ? {
|
|
@@ -413,7 +465,7 @@ function gt(a) {
|
|
|
413
465
|
const t = [];
|
|
414
466
|
for (const r of a.features) {
|
|
415
467
|
if (!r || r.type !== "Feature") continue;
|
|
416
|
-
const o = (e = r.properties) != null ? e : {}, i =
|
|
468
|
+
const o = (e = r.properties) != null ? e : {}, i = J(r), n = (l, c) => {
|
|
417
469
|
const d = o && typeof o == "object" ? { ...o } : {}, u = i !== void 0 ? `${i}::${c}` : void 0;
|
|
418
470
|
return u !== void 0 && (d.id = u), {
|
|
419
471
|
type: "Feature",
|
|
@@ -519,7 +571,7 @@ function bt(a, t) {
|
|
|
519
571
|
};
|
|
520
572
|
}
|
|
521
573
|
class At {
|
|
522
|
-
constructor(t =
|
|
574
|
+
constructor(t = V("feature-store", "debug")) {
|
|
523
575
|
h(this, "log");
|
|
524
576
|
h(this, "features");
|
|
525
577
|
this.log = t, this.features = /* @__PURE__ */ new Map();
|
|
@@ -597,13 +649,13 @@ class At {
|
|
|
597
649
|
* Ensure the feature has an id; returns the resolved id.
|
|
598
650
|
*/
|
|
599
651
|
ensureId(t) {
|
|
600
|
-
const e =
|
|
652
|
+
const e = J(t);
|
|
601
653
|
if (e) return String(e);
|
|
602
654
|
const r = de();
|
|
603
655
|
return t.id = r, t.properties && typeof t.properties == "object" && (t.properties.id = r), r;
|
|
604
656
|
}
|
|
605
657
|
}
|
|
606
|
-
const
|
|
658
|
+
const Z = {
|
|
607
659
|
polygon: {
|
|
608
660
|
selectors: ["a.leaflet-draw-draw-polygon"],
|
|
609
661
|
dataTool: "polygon"
|
|
@@ -660,11 +712,11 @@ const j = {
|
|
|
660
712
|
selectors: [],
|
|
661
713
|
dataTool: "save"
|
|
662
714
|
}
|
|
663
|
-
}, vt = Object.keys(
|
|
715
|
+
}, vt = Object.keys(Z), _e = "leaflet-geokit-tool-button-icon", Ie = ".leaflet-geokit-cake-icon, .leaflet-geokit-move-icon", wt = "[data-geokit-managed-toolbar='true']", xt = "[data-geokit-tool-popover='true']", kt = "[data-geokit-tool][aria-expanded='true']", te = /* @__PURE__ */ new WeakMap(), re = /* @__PURE__ */ new WeakMap(), oe = /* @__PURE__ */ new WeakMap();
|
|
664
716
|
function Q(a, t, e = {}) {
|
|
665
717
|
R(a);
|
|
666
718
|
for (const r of vt) {
|
|
667
|
-
const o =
|
|
719
|
+
const o = Z[r];
|
|
668
720
|
for (const i of Et(a, o.selectors)) {
|
|
669
721
|
i.setAttribute("data-geokit-tool", o.dataTool), Lt(i);
|
|
670
722
|
const n = t == null ? void 0 : t[r];
|
|
@@ -688,7 +740,7 @@ function Et(a, t) {
|
|
|
688
740
|
function Lt(a) {
|
|
689
741
|
const t = te.get(a);
|
|
690
742
|
t && (a.removeEventListener("click", t), te.delete(a)), delete a.__geokitToolButtonConfig;
|
|
691
|
-
const e =
|
|
743
|
+
const e = j(a.dataset.geokitToolButtonClass);
|
|
692
744
|
e.length > 0 && a.classList.remove(...e), delete a.dataset.geokitToolButtonClass, a.removeAttribute("data-geokit-custom-tool-button"), a.dataset.geokitOriginalTitle !== void 0 && ye(a, "title", a.dataset.geokitOriginalTitle), a.dataset.geokitOriginalAriaLabel !== void 0 && ye(
|
|
693
745
|
a,
|
|
694
746
|
"aria-label",
|
|
@@ -720,20 +772,20 @@ function Mt(a, t, e) {
|
|
|
720
772
|
Ct(a), a.__geokitToolButtonConfig = t, a.setAttribute("data-geokit-custom-tool-button", "true"), t.title && a.setAttribute("title", t.title);
|
|
721
773
|
const r = (i = t.ariaLabel) != null ? i : t.title;
|
|
722
774
|
r && a.setAttribute("aria-label", r);
|
|
723
|
-
const o =
|
|
724
|
-
o.length > 0 && (a.classList.add(...o), a.dataset.geokitToolButtonClass = o.join(" ")), t.iconUrl ?
|
|
775
|
+
const o = j(t.className);
|
|
776
|
+
o.length > 0 && (a.classList.add(...o), a.dataset.geokitToolButtonClass = o.join(" ")), t.iconUrl ? U(a, t, { tool: e }) : (t.iconHtml || t.renderIcon) && U(a, t, { tool: e });
|
|
725
777
|
}
|
|
726
778
|
function Ct(a) {
|
|
727
779
|
var t, e;
|
|
728
780
|
a.dataset.geokitOriginalTitle === void 0 && (a.dataset.geokitOriginalTitle = (t = a.getAttribute("title")) != null ? t : ""), a.dataset.geokitOriginalAriaLabel === void 0 && (a.dataset.geokitOriginalAriaLabel = (e = a.getAttribute("aria-label")) != null ? e : ""), a.dataset.geokitOriginalStyleBackgroundImage === void 0 && (a.dataset.geokitOriginalStyleBackgroundImage = a.style.getPropertyValue("background-image"), a.dataset.geokitOriginalStyleBackgroundImagePriority = a.style.getPropertyPriority("background-image")), a.dataset.geokitOriginalStylePosition === void 0 && (a.dataset.geokitOriginalStylePosition = a.style.getPropertyValue("position"), a.dataset.geokitOriginalStylePositionPriority = a.style.getPropertyPriority("position"));
|
|
729
781
|
}
|
|
730
|
-
function
|
|
782
|
+
function j(a) {
|
|
731
783
|
return a ? a.split(/\s+/).map((t) => t.trim()).filter(Boolean) : [];
|
|
732
784
|
}
|
|
733
785
|
function _t(a) {
|
|
734
786
|
return !!(a.iconUrl || a.iconHtml || a.renderIcon);
|
|
735
787
|
}
|
|
736
|
-
function
|
|
788
|
+
function U(a, t, e = {}) {
|
|
737
789
|
var l, c;
|
|
738
790
|
const [r, o] = It(t.iconSize);
|
|
739
791
|
a.style.setProperty("background-image", "none", "important"), a.style.setProperty("position", "relative", "important"), a.querySelectorAll(Ie).forEach((d) => {
|
|
@@ -809,7 +861,7 @@ function Bt(a, t, e) {
|
|
|
809
861
|
return;
|
|
810
862
|
const s = document.createElement("div");
|
|
811
863
|
s.dataset.geokitManagedToolbar = "true", s.dataset.geokitToolbarGroup = n.id, s.className = "leaflet-geokit-toolbar-group leaflet-bar", s.setAttribute("role", "toolbar"), s.setAttribute("aria-label", (c = n.ariaLabel) != null ? c : n.id), Pt(s, n.position, n.offset);
|
|
812
|
-
const l =
|
|
864
|
+
const l = j(n.className);
|
|
813
865
|
l.length > 0 && s.classList.add(...l), n.tools.forEach((d, u) => {
|
|
814
866
|
const p = Dt(d, n, u, t == null ? void 0 : t[d]);
|
|
815
867
|
Te(p, d, {
|
|
@@ -836,20 +888,20 @@ function Ot(a, t) {
|
|
|
836
888
|
function Dt(a, t, e, r) {
|
|
837
889
|
var s, l, c, d, u;
|
|
838
890
|
const o = document.createElement("button");
|
|
839
|
-
o.type = "button", o.dataset.geokitTool = (l = (s =
|
|
891
|
+
o.type = "button", o.dataset.geokitTool = (l = (s = Z[a]) == null ? void 0 : s.dataTool) != null ? l : a, o.dataset.geokitToolbarGroup = t.id, o.dataset.geokitToolbarPosition = (c = t.position) != null ? c : "topright", o.dataset.geokitToolInstance = Ft(
|
|
840
892
|
t.id,
|
|
841
893
|
a,
|
|
842
894
|
e
|
|
843
895
|
), o.className = "leaflet-geokit-toolbar-button", o.style.setProperty("display", "block", "important"), o.style.setProperty("width", "34px", "important"), o.style.setProperty("height", "34px", "important"), o.style.setProperty("padding", "0", "important"), o.style.setProperty("border", "0", "important"), o.style.setProperty("border-bottom", "1px solid #ccc", "important"), o.style.setProperty("background", "#fff", "important"), o.style.setProperty("cursor", "pointer", "important"), o.style.setProperty("position", "relative", "important");
|
|
844
896
|
const i = (d = r == null ? void 0 : r.title) != null ? d : Se(a);
|
|
845
897
|
o.title = i, o.setAttribute("aria-label", (u = r == null ? void 0 : r.ariaLabel) != null ? u : i);
|
|
846
|
-
const n =
|
|
847
|
-
if (n.length > 0 && o.classList.add(...n), r && (o.__geokitToolButtonConfig = r, _t(r) &&
|
|
898
|
+
const n = j(r == null ? void 0 : r.className);
|
|
899
|
+
if (n.length > 0 && o.classList.add(...n), r && (o.__geokitToolButtonConfig = r, _t(r) && U(o, r, { tool: a, groupId: t.id })), !o.querySelector(`.${_e}`)) {
|
|
848
900
|
const p = {
|
|
849
901
|
iconHtml: Gt(a),
|
|
850
902
|
iconSize: [20, 20]
|
|
851
903
|
};
|
|
852
|
-
|
|
904
|
+
U(o, p, { tool: a, groupId: t.id });
|
|
853
905
|
}
|
|
854
906
|
return o;
|
|
855
907
|
}
|
|
@@ -868,7 +920,7 @@ function zt(a, t, e, r) {
|
|
|
868
920
|
if (!e.popover) return;
|
|
869
921
|
R(r.container);
|
|
870
922
|
const o = document.createElement("div");
|
|
871
|
-
if (o.dataset.geokitToolPopover = "true", o.dataset.geokitTool = (l = (s =
|
|
923
|
+
if (o.dataset.geokitToolPopover = "true", o.dataset.geokitTool = (l = (s = Z[t]) == null ? void 0 : s.dataTool) != null ? l : t, a.dataset.geokitToolInstance && (o.dataset.geokitToolInstance = a.dataset.geokitToolInstance), r.groupId && (o.dataset.geokitToolbarGroup = r.groupId), o.setAttribute("role", "dialog"), o.setAttribute(
|
|
872
924
|
"aria-label",
|
|
873
925
|
(d = (c = e.popover.ariaLabel) != null ? c : e.popover.title) != null ? d : Se(t)
|
|
874
926
|
), o.style.setProperty("position", "absolute", "important"), o.style.setProperty("z-index", "10001", "important"), o.style.setProperty("max-width", "260px", "important"), o.style.setProperty("padding", "10px 12px", "important"), o.style.setProperty(
|
|
@@ -1052,9 +1104,9 @@ function Vt(a = x) {
|
|
|
1052
1104
|
return i;
|
|
1053
1105
|
}, Ae.add(a);
|
|
1054
1106
|
}
|
|
1055
|
-
const
|
|
1107
|
+
const G = class G extends x.Draw.Circle {
|
|
1056
1108
|
constructor(t, e) {
|
|
1057
|
-
super(t, e), this.type =
|
|
1109
|
+
super(t, e), this.type = G.TYPE;
|
|
1058
1110
|
}
|
|
1059
1111
|
addHooks() {
|
|
1060
1112
|
super.addHooks();
|
|
@@ -1065,9 +1117,9 @@ const H = class H extends x.Draw.Circle {
|
|
|
1065
1117
|
});
|
|
1066
1118
|
}
|
|
1067
1119
|
};
|
|
1068
|
-
h(
|
|
1069
|
-
let
|
|
1070
|
-
x.Draw.Cake =
|
|
1120
|
+
h(G, "TYPE", "cake");
|
|
1121
|
+
let N = G;
|
|
1122
|
+
x.Draw.Cake = N;
|
|
1071
1123
|
function Jt(a) {
|
|
1072
1124
|
const t = a.Draw;
|
|
1073
1125
|
if (!t || t.Cake) return;
|
|
@@ -1088,7 +1140,7 @@ function Jt(a) {
|
|
|
1088
1140
|
let e = r;
|
|
1089
1141
|
t.Cake = e;
|
|
1090
1142
|
}
|
|
1091
|
-
const
|
|
1143
|
+
const H = class H extends x.Draw.Feature {
|
|
1092
1144
|
constructor(e, r) {
|
|
1093
1145
|
super(e, r);
|
|
1094
1146
|
h(this, "_featureGroup");
|
|
@@ -1097,7 +1149,7 @@ const V = class V extends x.Draw.Feature {
|
|
|
1097
1149
|
h(this, "_dragStartLatLng", null);
|
|
1098
1150
|
h(this, "_isDragging", !1);
|
|
1099
1151
|
h(this, "_pendingMove", null);
|
|
1100
|
-
this.type =
|
|
1152
|
+
this.type = H.TYPE, this._featureGroup = (r == null ? void 0 : r.featureGroup) || new x.FeatureGroup();
|
|
1101
1153
|
}
|
|
1102
1154
|
enable() {
|
|
1103
1155
|
this._enabled || super.enable();
|
|
@@ -1238,8 +1290,8 @@ const V = class V extends x.Draw.Feature {
|
|
|
1238
1290
|
return this._pendingMove !== null;
|
|
1239
1291
|
}
|
|
1240
1292
|
};
|
|
1241
|
-
h(
|
|
1242
|
-
let ie =
|
|
1293
|
+
h(H, "TYPE", "move");
|
|
1294
|
+
let ie = H;
|
|
1243
1295
|
x.Draw.Move = ie;
|
|
1244
1296
|
function Zt(a) {
|
|
1245
1297
|
const t = a.Draw;
|
|
@@ -1720,10 +1772,10 @@ const tr = `<?xml version="1.0" encoding="utf-8"?>
|
|
|
1720
1772
|
<path d="M22 12 L19 15"/>
|
|
1721
1773
|
</g>
|
|
1722
1774
|
</svg>
|
|
1723
|
-
`, Be = 6378137, S = 6356752314245e-6, T = 1 / 298.257223563, or = Math.PI / 180, ar = 180 / Math.PI,
|
|
1775
|
+
`, Be = 6378137, S = 6356752314245e-6, T = 1 / 298.257223563, or = Math.PI / 180, ar = 180 / Math.PI, F = 1e9;
|
|
1724
1776
|
function ir(a) {
|
|
1725
|
-
const t = BigInt(Math.round(a *
|
|
1726
|
-
return Number(t) /
|
|
1777
|
+
const t = BigInt(Math.round(a * F));
|
|
1778
|
+
return Number(t) / F;
|
|
1727
1779
|
}
|
|
1728
1780
|
function B(a) {
|
|
1729
1781
|
return ir(a) * or;
|
|
@@ -1733,8 +1785,8 @@ function we(a) {
|
|
|
1733
1785
|
return t < 0 ? t + 360 : t;
|
|
1734
1786
|
}
|
|
1735
1787
|
function ce(a) {
|
|
1736
|
-
const t = BigInt(Math.round(a *
|
|
1737
|
-
return Number(t) /
|
|
1788
|
+
const t = BigInt(Math.round(a * F));
|
|
1789
|
+
return Number(t) / F;
|
|
1738
1790
|
}
|
|
1739
1791
|
function nr(a, t, e, r) {
|
|
1740
1792
|
const o = sr(a, t, e, r);
|
|
@@ -1772,8 +1824,8 @@ function sr(a, t, e, r) {
|
|
|
1772
1824
|
y = c * u + d * p * he, b = Math.atan2(v, y);
|
|
1773
1825
|
const pe = d * p * ue / v;
|
|
1774
1826
|
w = 1 - pe ** 2, E = w === 0 ? 0 : y - 2 * c * u / w;
|
|
1775
|
-
const
|
|
1776
|
-
m = g, g = n + (1 -
|
|
1827
|
+
const Y = T / 16 * w * (4 + T * (4 - 3 * w));
|
|
1828
|
+
m = g, g = n + (1 - Y) * T * pe * (b + Y * v * (E + Y * y * (-1 + 2 * E ** 2))), f += 1;
|
|
1777
1829
|
}
|
|
1778
1830
|
if (f >= A)
|
|
1779
1831
|
return {
|
|
@@ -1896,7 +1948,7 @@ class gr {
|
|
|
1896
1948
|
h(this, "toolButtonConfig", null);
|
|
1897
1949
|
h(this, "toolbarGroups", null);
|
|
1898
1950
|
var e, r, o, i;
|
|
1899
|
-
this.options = t, this.container = t.container, this.logger = ((e = t.logger) != null ? e :
|
|
1951
|
+
this.options = t, this.container = t.container, this.logger = ((e = t.logger) != null ? e : V("controller", "debug")).child(
|
|
1900
1952
|
"map"
|
|
1901
1953
|
), this.L = this.resolveLeaflet(t), this.store = new At(this.logger.child("store")), this.setMarkerIconConfig((r = t.markerIconConfig) != null ? r : null, {
|
|
1902
1954
|
reapplyExistingLayers: !1,
|
|
@@ -2367,7 +2419,7 @@ class gr {
|
|
|
2367
2419
|
return this.L.geoJSON(t, {
|
|
2368
2420
|
pointToLayer: (e, r) => this.markerIcon ? this.L.marker(r, { icon: this.markerIcon }) : this.L.marker(r),
|
|
2369
2421
|
onEachFeature: (e, r) => {
|
|
2370
|
-
const o =
|
|
2422
|
+
const o = J(e);
|
|
2371
2423
|
o && (r._fid = o);
|
|
2372
2424
|
}
|
|
2373
2425
|
});
|
|
@@ -2752,7 +2804,7 @@ class gr {
|
|
|
2752
2804
|
var e, r, o;
|
|
2753
2805
|
try {
|
|
2754
2806
|
const { layer: i, layerType: n } = t;
|
|
2755
|
-
if (n ===
|
|
2807
|
+
if (n === N.TYPE) {
|
|
2756
2808
|
try {
|
|
2757
2809
|
(e = this.activeCakeSession) == null || e.destroy();
|
|
2758
2810
|
} catch {
|
|
@@ -3293,7 +3345,7 @@ class Ue extends HTMLElement {
|
|
|
3293
3345
|
h(this, "_root");
|
|
3294
3346
|
h(this, "_container");
|
|
3295
3347
|
// Logging
|
|
3296
|
-
h(this, "_logger",
|
|
3348
|
+
h(this, "_logger", V("component:leaflet-geokit", "debug"));
|
|
3297
3349
|
// Internal state mirrors for attributes/properties
|
|
3298
3350
|
h(this, "_latitude", 0);
|
|
3299
3351
|
h(this, "_longitude", 0);
|
|
@@ -4489,13 +4541,13 @@ class Ue extends HTMLElement {
|
|
|
4489
4541
|
state: r.state
|
|
4490
4542
|
};
|
|
4491
4543
|
return this.dispatchEvent(
|
|
4492
|
-
new CustomEvent(
|
|
4544
|
+
new CustomEvent(q.Diagnostic, { detail: o })
|
|
4493
4545
|
), this._setStatus({
|
|
4494
4546
|
state: r.state,
|
|
4495
4547
|
ready: r.state === "ready",
|
|
4496
4548
|
busy: r.state === "initializing" || r.state === "loading",
|
|
4497
4549
|
featureCount: (i = r.featureCount) != null ? i : this._status.featureCount,
|
|
4498
|
-
lastEvent: (n = r.lastEvent) != null ? n :
|
|
4550
|
+
lastEvent: (n = r.lastEvent) != null ? n : q.Diagnostic,
|
|
4499
4551
|
lastError: {
|
|
4500
4552
|
code: o.code,
|
|
4501
4553
|
message: o.message,
|
|
@@ -4512,7 +4564,7 @@ class Ue extends HTMLElement {
|
|
|
4512
4564
|
timestamp: Date.now()
|
|
4513
4565
|
};
|
|
4514
4566
|
this._status = r, this.dispatchEvent(
|
|
4515
|
-
new CustomEvent(
|
|
4567
|
+
new CustomEvent(q.Status, {
|
|
4516
4568
|
detail: this._cloneStatus(r)
|
|
4517
4569
|
})
|
|
4518
4570
|
);
|
|
@@ -4574,7 +4626,7 @@ if (!customElements.get(Ee)) {
|
|
|
4574
4626
|
}
|
|
4575
4627
|
export {
|
|
4576
4628
|
L as DrawEvent,
|
|
4577
|
-
|
|
4629
|
+
q as GeoKitEvent,
|
|
4578
4630
|
Ue as LeafletDrawMapElement
|
|
4579
4631
|
};
|
|
4580
4632
|
//# sourceMappingURL=leaflet-geokit.external.es.js.map
|