leaflet-html 0.13.2 → 0.13.4
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/leaflet-html.js +158 -142
- package/dist/leaflet-html.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/leaflet-html.js
CHANGED
|
@@ -7,10 +7,10 @@ var jn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
7
7
|
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
|
8
8
|
*/
|
|
9
9
|
(function(g, d) {
|
|
10
|
-
(function(c,
|
|
11
|
-
|
|
10
|
+
(function(c, y) {
|
|
11
|
+
y(d);
|
|
12
12
|
})(jn, function(c) {
|
|
13
|
-
var
|
|
13
|
+
var y = "1.9.4";
|
|
14
14
|
function x(t) {
|
|
15
15
|
var e, i, n, o;
|
|
16
16
|
for (i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -61,11 +61,11 @@ var jn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
61
61
|
var i = Math.pow(10, e === void 0 ? 6 : e);
|
|
62
62
|
return Math.round(t * i) / i;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function w(t) {
|
|
65
65
|
return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "");
|
|
66
66
|
}
|
|
67
67
|
function M(t) {
|
|
68
|
-
return
|
|
68
|
+
return w(t).split(/\s+/);
|
|
69
69
|
}
|
|
70
70
|
function C(t, e) {
|
|
71
71
|
Object.prototype.hasOwnProperty.call(t, "options") || (t.options = t.options ? s(t.options) : {});
|
|
@@ -131,7 +131,7 @@ var jn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
131
131
|
wrapNum: v,
|
|
132
132
|
falseFn: _,
|
|
133
133
|
formatNum: b,
|
|
134
|
-
trim:
|
|
134
|
+
trim: w,
|
|
135
135
|
splitWords: M,
|
|
136
136
|
setOptions: C,
|
|
137
137
|
getParamString: H,
|
|
@@ -1102,7 +1102,7 @@ var jn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
1102
1102
|
}
|
|
1103
1103
|
}
|
|
1104
1104
|
function j(t, e) {
|
|
1105
|
-
t.classList !== void 0 ? t.classList.remove(e) : Ke(t,
|
|
1105
|
+
t.classList !== void 0 ? t.classList.remove(e) : Ke(t, w((" " + fe(t) + " ").replace(" " + e + " ", " ")));
|
|
1106
1106
|
}
|
|
1107
1107
|
function Ke(t, e) {
|
|
1108
1108
|
t.className.baseVal === void 0 ? t.className = e : t.className.baseVal = e;
|
|
@@ -6306,7 +6306,7 @@ var jn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
6306
6306
|
this._zooming = !1, lt(this._animRequest), F(document, "touchmove", this._onTouchMove, this), F(document, "touchend touchcancel", this._onTouchEnd, this), this._map.options.zoomAnimation ? this._map._animateZoom(this._center, this._map._limitZoom(this._zoom), !0, this._map.options.zoomSnap) : this._map._resetView(this._center, this._map._limitZoom(this._zoom));
|
|
6307
6307
|
}
|
|
6308
6308
|
});
|
|
6309
|
-
N.addInitHook("addHandler", "touchZoom", Rn), N.BoxZoom = zn, N.DoubleClickZoom = Zn, N.Drag = An, N.Keyboard = In, N.ScrollWheelZoom = Bn, N.TapHold = Nn, N.TouchZoom = Rn, c.Bounds = V, c.Browser = S, c.CRS = xt, c.Canvas = Sn, c.Circle = fi, c.CircleMarker = ye, c.Class = Pt, c.Control = _t, c.DivIcon = Cn, c.DivOverlay = yt, c.DomEvent = Do, c.DomUtil = No, c.Draggable = Et, c.Evented = Jt, c.FeatureGroup = Ct, c.GeoJSON = Mt, c.GridLayer = re, c.Handler = vt, c.Icon = Gt, c.ImageOverlay = xe, c.LatLng = D, c.LatLngBounds = st, c.Layer = pt, c.LayerGroup = Ft, c.LineUtil = $o, c.Map = N, c.Marker = ve, c.Mixin = qo, c.Path = Ot, c.Point = O, c.PolyUtil = jo, c.Polygon = Ut, c.Polyline = Tt, c.Popup = Ce, c.PosAnimation = an, c.Projection = Qo, c.Rectangle = On, c.Renderer = St, c.SVG = he, c.SVGOverlay = xn, c.TileLayer = Vt, c.Tooltip = Te, c.Transformation = De, c.Util = oo, c.VideoOverlay = Pn, c.bind = a, c.bounds = ot, c.canvas = kn, c.circle = as, c.circleMarker = rs, c.control = ne, c.divIcon = ms, c.extend = x, c.featureGroup = ns, c.geoJSON = bn, c.geoJson = ls, c.gridLayer = gs, c.icon = os, c.imageOverlay = cs, c.latLng = B, c.latLngBounds = J, c.layerGroup = is, c.map = Ho, c.marker = ss, c.point = E, c.polygon = us, c.polyline = hs, c.popup = _s, c.rectangle = Ls, c.setOptions = C, c.stamp = l, c.svg = En, c.svgOverlay = fs, c.tileLayer = Tn, c.tooltip = ps, c.transformation = Kt, c.version =
|
|
6309
|
+
N.addInitHook("addHandler", "touchZoom", Rn), N.BoxZoom = zn, N.DoubleClickZoom = Zn, N.Drag = An, N.Keyboard = In, N.ScrollWheelZoom = Bn, N.TapHold = Nn, N.TouchZoom = Rn, c.Bounds = V, c.Browser = S, c.CRS = xt, c.Canvas = Sn, c.Circle = fi, c.CircleMarker = ye, c.Class = Pt, c.Control = _t, c.DivIcon = Cn, c.DivOverlay = yt, c.DomEvent = Do, c.DomUtil = No, c.Draggable = Et, c.Evented = Jt, c.FeatureGroup = Ct, c.GeoJSON = Mt, c.GridLayer = re, c.Handler = vt, c.Icon = Gt, c.ImageOverlay = xe, c.LatLng = D, c.LatLngBounds = st, c.Layer = pt, c.LayerGroup = Ft, c.LineUtil = $o, c.Map = N, c.Marker = ve, c.Mixin = qo, c.Path = Ot, c.Point = O, c.PolyUtil = jo, c.Polygon = Ut, c.Polyline = Tt, c.Popup = Ce, c.PosAnimation = an, c.Projection = Qo, c.Rectangle = On, c.Renderer = St, c.SVG = he, c.SVGOverlay = xn, c.TileLayer = Vt, c.Tooltip = Te, c.Transformation = De, c.Util = oo, c.VideoOverlay = Pn, c.bind = a, c.bounds = ot, c.canvas = kn, c.circle = as, c.circleMarker = rs, c.control = ne, c.divIcon = ms, c.extend = x, c.featureGroup = ns, c.geoJSON = bn, c.geoJson = ls, c.gridLayer = gs, c.icon = os, c.imageOverlay = cs, c.latLng = B, c.latLngBounds = J, c.layerGroup = is, c.map = Ho, c.marker = ss, c.point = E, c.polygon = us, c.polyline = hs, c.popup = _s, c.rectangle = Ls, c.setOptions = C, c.stamp = l, c.svg = En, c.svgOverlay = fs, c.tileLayer = Tn, c.tooltip = ps, c.transformation = Kt, c.version = y, c.videoOverlay = ds;
|
|
6310
6310
|
var bs = window.L;
|
|
6311
6311
|
c.noConflict = function() {
|
|
6312
6312
|
return window.L = bs, this;
|
|
@@ -6316,8 +6316,8 @@ var jn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
6316
6316
|
var G = yi.exports;
|
|
6317
6317
|
const et = "l:layer:connected", Jn = "l:popup:connected", Oe = "l:icon:connected", Gn = "l:layer:removed", Kn = "l:latlngbounds:connected", Yn = "l:latlngbounds:changed", xi = "l:tooltip:connected", Xn = "l:pane:connected", $n = (g, d, c = !0) => {
|
|
6318
6318
|
if (g.hasAttribute("on")) {
|
|
6319
|
-
const
|
|
6320
|
-
|
|
6319
|
+
const y = g.getAttribute("on");
|
|
6320
|
+
y !== null && y.split(/\s+/).forEach((x) => {
|
|
6321
6321
|
d !== null && d.on(x, (s) => {
|
|
6322
6322
|
g.dispatchEvent(
|
|
6323
6323
|
new CustomEvent(x, { bubbles: c, detail: s })
|
|
@@ -6341,16 +6341,16 @@ class As extends HTMLElement {
|
|
|
6341
6341
|
super();
|
|
6342
6342
|
}
|
|
6343
6343
|
connectedCallback() {
|
|
6344
|
-
const d = {}, c = {},
|
|
6344
|
+
const d = {}, c = {}, y = G.control.layers(d, c);
|
|
6345
6345
|
this.addEventListener(et, (s) => {
|
|
6346
6346
|
const { type: a, name: h, layer: l } = s.detail;
|
|
6347
|
-
a === "overlay" ?
|
|
6347
|
+
a === "overlay" ? y.addOverlay(l, h) : a === "base" && y.addBaseLayer(l, h), s.preventDefault();
|
|
6348
6348
|
});
|
|
6349
6349
|
const x = new CustomEvent(et, {
|
|
6350
6350
|
cancelable: !0,
|
|
6351
6351
|
bubbles: !0,
|
|
6352
6352
|
detail: {
|
|
6353
|
-
layer:
|
|
6353
|
+
layer: y
|
|
6354
6354
|
}
|
|
6355
6355
|
});
|
|
6356
6356
|
this.dispatchEvent(x);
|
|
@@ -6372,7 +6372,7 @@ class Is extends zt {
|
|
|
6372
6372
|
connectedCallback() {
|
|
6373
6373
|
const d = this.getAttribute("name"), c = G.layerGroup();
|
|
6374
6374
|
this.layer = c;
|
|
6375
|
-
const
|
|
6375
|
+
const y = new CustomEvent(et, {
|
|
6376
6376
|
cancelable: !0,
|
|
6377
6377
|
bubbles: !0,
|
|
6378
6378
|
detail: {
|
|
@@ -6380,7 +6380,7 @@ class Is extends zt {
|
|
|
6380
6380
|
name: d
|
|
6381
6381
|
}
|
|
6382
6382
|
});
|
|
6383
|
-
this.dispatchEvent(
|
|
6383
|
+
this.dispatchEvent(y), this.addEventListener(et, (s) => {
|
|
6384
6384
|
s.stopPropagation(), c.addLayer(s.detail.layer);
|
|
6385
6385
|
}), new MutationObserver(function(s) {
|
|
6386
6386
|
s.forEach((a) => {
|
|
@@ -6421,21 +6421,21 @@ const Ns = (g) => ({
|
|
|
6421
6421
|
throw new Bs(c.issues);
|
|
6422
6422
|
return Rs(c);
|
|
6423
6423
|
}, Ds = (g) => (d) => {
|
|
6424
|
-
let { status: c, issues:
|
|
6424
|
+
let { status: c, issues: y } = d;
|
|
6425
6425
|
const x = {};
|
|
6426
6426
|
for (const s of Object.keys(g)) {
|
|
6427
6427
|
let a = g[s](d);
|
|
6428
|
-
a.status === "abort" && (c = "abort",
|
|
6428
|
+
a.status === "abort" && (c = "abort", y = [...y, ...a.issues]), x[s] = a.value;
|
|
6429
6429
|
}
|
|
6430
|
-
return { status: c, issues:
|
|
6430
|
+
return { status: c, issues: y, value: x };
|
|
6431
6431
|
}, Be = (g) => (d) => {
|
|
6432
|
-
let { issues: c } = d,
|
|
6432
|
+
let { issues: c } = d, y = "clean";
|
|
6433
6433
|
const x = {};
|
|
6434
6434
|
for (const s of Object.keys(g)) {
|
|
6435
6435
|
let a = g[s](d);
|
|
6436
|
-
a.status !== "clean" && (
|
|
6436
|
+
a.status !== "clean" && (y = a.status), !(a.value === null && a.status === "clean") && (c = [...c, ...a.issues], x[s] = a.value);
|
|
6437
6437
|
}
|
|
6438
|
-
return { status:
|
|
6438
|
+
return { status: y, issues: c, value: x };
|
|
6439
6439
|
}, Hs = (...g) => (d) => {
|
|
6440
6440
|
for (let c = 0; c < g.length && (d = g[c](d), d.status !== "abort"); c++)
|
|
6441
6441
|
;
|
|
@@ -6446,12 +6446,12 @@ const Ns = (g) => ({
|
|
|
6446
6446
|
return d;
|
|
6447
6447
|
}, wi = (g) => (d) => d.value === null ? d : g(d), ut = (g) => (d) => (d = g(d), d.value === null ? { status: "clean", issues: [], value: null } : d), Q = (g) => (d) => {
|
|
6448
6448
|
const c = d.value;
|
|
6449
|
-
let
|
|
6450
|
-
return
|
|
6449
|
+
let y = c.getAttribute(g);
|
|
6450
|
+
return y === null ? {
|
|
6451
6451
|
status: "abort",
|
|
6452
6452
|
issues: [...d.issues, js(c, g)],
|
|
6453
6453
|
value: null
|
|
6454
|
-
} : { ...d, value:
|
|
6454
|
+
} : { ...d, value: y };
|
|
6455
6455
|
}, Fs = () => (g) => {
|
|
6456
6456
|
let d = parseInt(g.value);
|
|
6457
6457
|
return isNaN(d) ? {
|
|
@@ -6493,15 +6493,15 @@ const Ns = (g) => ({
|
|
|
6493
6493
|
}), Ae = class Ae extends HTMLElement {
|
|
6494
6494
|
constructor() {
|
|
6495
6495
|
super(), this.map = null;
|
|
6496
|
-
const d = (
|
|
6497
|
-
const { bounds: x, method: s } =
|
|
6496
|
+
const d = (y) => {
|
|
6497
|
+
const { bounds: x, method: s } = y.detail;
|
|
6498
6498
|
this.map !== null && this.map[s](x);
|
|
6499
6499
|
};
|
|
6500
|
-
this.addEventListener(Kn, d), this.addEventListener(Yn, d), this.addEventListener(Xn, (
|
|
6501
|
-
const { name: x } =
|
|
6500
|
+
this.addEventListener(Kn, d), this.addEventListener(Yn, d), this.addEventListener(Xn, (y) => {
|
|
6501
|
+
const { name: x } = y.detail;
|
|
6502
6502
|
this.map.createPane(x);
|
|
6503
|
-
}), new MutationObserver(function(
|
|
6504
|
-
|
|
6503
|
+
}), new MutationObserver(function(y) {
|
|
6504
|
+
y.forEach((x) => {
|
|
6505
6505
|
if (x.target instanceof Ae) {
|
|
6506
6506
|
const s = x.target;
|
|
6507
6507
|
x.removedNodes.forEach((a) => {
|
|
@@ -6528,25 +6528,29 @@ const Ns = (g) => ({
|
|
|
6528
6528
|
}), $n(this, this.map), this.hasAttribute("fit-world"))
|
|
6529
6529
|
this.map.fitWorld();
|
|
6530
6530
|
else {
|
|
6531
|
-
const
|
|
6531
|
+
const c = Ds({
|
|
6532
6532
|
zoom: Ee("zoom", Fs()),
|
|
6533
6533
|
center: Ee("center", ze())
|
|
6534
|
-
}), { zoom:
|
|
6535
|
-
this.map.setView(
|
|
6534
|
+
}), { zoom: y, center: x } = wt(c, this);
|
|
6535
|
+
this.map.setView(x, y);
|
|
6536
6536
|
}
|
|
6537
6537
|
if (this.hasAttribute("locate")) {
|
|
6538
|
-
const
|
|
6539
|
-
this.map.locate(wt(
|
|
6538
|
+
const c = Ee("locate", ze());
|
|
6539
|
+
this.map.locate(wt(c, this));
|
|
6540
6540
|
}
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
}
|
|
6545
|
-
|
|
6541
|
+
const d = {
|
|
6542
|
+
"l-control-layers": (c, y) => c.addTo(y),
|
|
6543
|
+
default: (c, y) => y.addLayer(c)
|
|
6544
|
+
};
|
|
6545
|
+
this.addEventListener(et, (c) => {
|
|
6546
|
+
const { layer: y } = c.detail, x = c.target.localName;
|
|
6547
|
+
(d[x] || d.default)(y, this.map);
|
|
6548
|
+
}), this.addEventListener(Gn, (c) => {
|
|
6549
|
+
this.map !== null && this.map.removeLayer(c.detail.layer);
|
|
6546
6550
|
});
|
|
6547
6551
|
}
|
|
6548
|
-
attributeChangedCallback(d, c,
|
|
6549
|
-
this.map !== null && (d === "zoom" ? this.map.setZoom(parseInt(
|
|
6552
|
+
attributeChangedCallback(d, c, y) {
|
|
6553
|
+
this.map !== null && (d === "zoom" ? this.map.setZoom(parseInt(y)) : d === "center" && this.map.setView(JSON.parse(y)));
|
|
6550
6554
|
}
|
|
6551
6555
|
};
|
|
6552
6556
|
Lt(Ae, "observedAttributes", ["zoom", "center", "zoom-control"]);
|
|
@@ -6565,8 +6569,8 @@ class Qn extends zt {
|
|
|
6565
6569
|
opacity: Li(ut(Q("opacity")), wi(Gs()))
|
|
6566
6570
|
}),
|
|
6567
6571
|
this
|
|
6568
|
-
),
|
|
6569
|
-
if (
|
|
6572
|
+
), y = this.closest("l-pane");
|
|
6573
|
+
if (y !== null && (c.pane = y.getAttribute("name")), this.layer = G.marker(d, c), this.hasAttribute("icon")) {
|
|
6570
6574
|
const s = G.icon(JSON.parse(this.getAttribute("icon")));
|
|
6571
6575
|
this.layer.setIcon(s);
|
|
6572
6576
|
}
|
|
@@ -6583,8 +6587,8 @@ class Qn extends zt {
|
|
|
6583
6587
|
});
|
|
6584
6588
|
this.dispatchEvent(x);
|
|
6585
6589
|
}
|
|
6586
|
-
attributeChangedCallback(d, c,
|
|
6587
|
-
this.layer !== null && (d === "lat-lng" && this.layer.setLatLng(JSON.parse(
|
|
6590
|
+
attributeChangedCallback(d, c, y) {
|
|
6591
|
+
this.layer !== null && (d === "lat-lng" && this.layer.setLatLng(JSON.parse(y)), d === "opacity" && this.layer.setOpacity(parseFloat(y)), d === "icon" && this.layer.setIcon(G.icon(JSON.parse(y))));
|
|
6588
6592
|
}
|
|
6589
6593
|
}
|
|
6590
6594
|
Lt(Qn, "observedAttributes", ["lat-lng", "opacity", "icon"]);
|
|
@@ -6605,8 +6609,8 @@ class Ks extends HTMLElement {
|
|
|
6605
6609
|
connectedCallback() {
|
|
6606
6610
|
const d = this.getAttribute("content");
|
|
6607
6611
|
let c = !1;
|
|
6608
|
-
const
|
|
6609
|
-
|
|
6612
|
+
const y = this.getAttribute("open-popup");
|
|
6613
|
+
y !== null && (c = y !== "false");
|
|
6610
6614
|
const x = new CustomEvent(Jn, {
|
|
6611
6615
|
cancelable: !0,
|
|
6612
6616
|
bubbles: !0,
|
|
@@ -6623,10 +6627,10 @@ class Ci extends zt {
|
|
|
6623
6627
|
super(), this.layer = null;
|
|
6624
6628
|
}
|
|
6625
6629
|
connectedCallback() {
|
|
6626
|
-
const d = wt(Q("url-template"), this), c = Ci.parseTemplateAttributes(d),
|
|
6630
|
+
const d = wt(Q("url-template"), this), c = Ci.parseTemplateAttributes(d), y = {};
|
|
6627
6631
|
for (const p of c) {
|
|
6628
6632
|
const v = this.getAttribute(p);
|
|
6629
|
-
v !== null && (
|
|
6633
|
+
v !== null && (y[p] = v);
|
|
6630
6634
|
}
|
|
6631
6635
|
const x = {};
|
|
6632
6636
|
this.parentElement.tagName.toLowerCase() === "l-pane" && (x.pane = this.parentElement.getAttribute("name"));
|
|
@@ -6634,7 +6638,7 @@ class Ci extends zt {
|
|
|
6634
6638
|
attribution: ut(Q("attribution")),
|
|
6635
6639
|
errorTileUrl: ut(Q("error-tile-url"))
|
|
6636
6640
|
}), h = wt(a, this);
|
|
6637
|
-
this.layer = G.tileLayer(d, { ...
|
|
6641
|
+
this.layer = G.tileLayer(d, { ...y, ...x, ...h });
|
|
6638
6642
|
const l = new CustomEvent(et, {
|
|
6639
6643
|
detail: { name: s, layer: this.layer },
|
|
6640
6644
|
bubbles: !0
|
|
@@ -6647,15 +6651,24 @@ class Ci extends zt {
|
|
|
6647
6651
|
*/
|
|
6648
6652
|
static parseTemplateAttributes(d) {
|
|
6649
6653
|
const c = /{(.*?)}/g;
|
|
6650
|
-
return [...d.matchAll(c)].map((
|
|
6654
|
+
return [...d.matchAll(c)].map((y) => y[1]);
|
|
6651
6655
|
}
|
|
6652
6656
|
}
|
|
6653
6657
|
class Ys extends zt {
|
|
6658
|
+
static get observedAttributes() {
|
|
6659
|
+
return ["options"];
|
|
6660
|
+
}
|
|
6654
6661
|
constructor() {
|
|
6655
6662
|
super(), this.layer = null;
|
|
6656
6663
|
}
|
|
6657
6664
|
connectedCallback() {
|
|
6658
|
-
|
|
6665
|
+
this.initLayer();
|
|
6666
|
+
}
|
|
6667
|
+
attributeChangedCallback(d, c, y) {
|
|
6668
|
+
d === "options" && c !== y && this.isConnected && this.reloadLayer();
|
|
6669
|
+
}
|
|
6670
|
+
initLayer() {
|
|
6671
|
+
const d = wt(Q("url-template"), this), c = this.getAttribute("name"), y = Be({
|
|
6659
6672
|
// Leaflet.tileLayer default options: https://leafletjs.com/reference.html#tilelayer-wms-layers
|
|
6660
6673
|
layers: Q("layers"),
|
|
6661
6674
|
styles: ut(Q("styles")),
|
|
@@ -6666,7 +6679,7 @@ class Ys extends zt {
|
|
|
6666
6679
|
uppercase: ut(Q("uppercase")),
|
|
6667
6680
|
// Inherited option from Layer: https://leafletjs.com/reference.html#tilelayer-wms-attribution
|
|
6668
6681
|
attribution: ut(Q("attribution"))
|
|
6669
|
-
}), x = wt(
|
|
6682
|
+
}), x = wt(y, this), s = this.getAttribute("options"), a = () => {
|
|
6670
6683
|
if (s)
|
|
6671
6684
|
try {
|
|
6672
6685
|
return JSON.parse(s);
|
|
@@ -6690,6 +6703,9 @@ class Ys extends zt {
|
|
|
6690
6703
|
});
|
|
6691
6704
|
this.dispatchEvent(l);
|
|
6692
6705
|
}
|
|
6706
|
+
reloadLayer() {
|
|
6707
|
+
this.layer && this.layer.remove(), this.initLayer();
|
|
6708
|
+
}
|
|
6693
6709
|
}
|
|
6694
6710
|
class to extends HTMLElement {
|
|
6695
6711
|
constructor() {
|
|
@@ -6699,8 +6715,8 @@ class to extends HTMLElement {
|
|
|
6699
6715
|
let d = this.getAttribute("bounds");
|
|
6700
6716
|
d !== null && this.dispatchEvent(this.getEvent(Kn, JSON.parse(d)));
|
|
6701
6717
|
}
|
|
6702
|
-
attributeChangedCallback(d, c,
|
|
6703
|
-
this.dispatchEvent(this.getEvent(Yn, JSON.parse(
|
|
6718
|
+
attributeChangedCallback(d, c, y) {
|
|
6719
|
+
this.dispatchEvent(this.getEvent(Yn, JSON.parse(y)));
|
|
6704
6720
|
}
|
|
6705
6721
|
/**
|
|
6706
6722
|
* @param {LatLngBounds} bounds
|
|
@@ -6731,11 +6747,11 @@ class eo extends zt {
|
|
|
6731
6747
|
console.warn("attribute 'bounds' not set");
|
|
6732
6748
|
return;
|
|
6733
6749
|
}
|
|
6734
|
-
const
|
|
6750
|
+
const y = {
|
|
6735
6751
|
opacity: parseFloat(this.getAttribute("opacity") || "1.0"),
|
|
6736
6752
|
alt: this.getAttribute("alt") || ""
|
|
6737
6753
|
}, x = this.closest("l-pane");
|
|
6738
|
-
x !== null && (
|
|
6754
|
+
x !== null && (y.pane = x.getAttribute("name")), this.layer = G.imageOverlay(d, JSON.parse(c), y), this.dispatchEvent(
|
|
6739
6755
|
new CustomEvent(et, {
|
|
6740
6756
|
cancelable: !0,
|
|
6741
6757
|
bubbles: !0,
|
|
@@ -6745,8 +6761,8 @@ class eo extends zt {
|
|
|
6745
6761
|
})
|
|
6746
6762
|
);
|
|
6747
6763
|
}
|
|
6748
|
-
attributeChangedCallback(d, c,
|
|
6749
|
-
this.layer !== null && (d === "url" ? this.layer.setUrl(
|
|
6764
|
+
attributeChangedCallback(d, c, y) {
|
|
6765
|
+
this.layer !== null && (d === "url" ? this.layer.setUrl(y) : d === "bounds" ? this.layer.setBounds(JSON.parse(y)) : d === "opacity" && this.layer.setOpacity(parseFloat(y)));
|
|
6750
6766
|
}
|
|
6751
6767
|
}
|
|
6752
6768
|
Lt(eo, "observedAttributes", ["url", "bounds", "opacity"]);
|
|
@@ -6755,13 +6771,13 @@ class Xs extends zt {
|
|
|
6755
6771
|
super();
|
|
6756
6772
|
}
|
|
6757
6773
|
connectedCallback() {
|
|
6758
|
-
const d = JSON.parse(this.getAttribute("url")), c = JSON.parse(this.getAttribute("bounds")),
|
|
6774
|
+
const d = JSON.parse(this.getAttribute("url")), c = JSON.parse(this.getAttribute("bounds")), y = {
|
|
6759
6775
|
opacity: parseFloat(this.getAttribute("opacity") || "1.0"),
|
|
6760
6776
|
alt: this.getAttribute("alt") || "",
|
|
6761
6777
|
autoplay: !0,
|
|
6762
6778
|
muted: !0,
|
|
6763
6779
|
playsInline: !0
|
|
6764
|
-
}, x = G.videoOverlay(d, c,
|
|
6780
|
+
}, x = G.videoOverlay(d, c, y);
|
|
6765
6781
|
this.dispatchEvent(
|
|
6766
6782
|
new CustomEvent(et, {
|
|
6767
6783
|
cancelable: !0,
|
|
@@ -6778,8 +6794,8 @@ class $s extends HTMLElement {
|
|
|
6778
6794
|
super(), this.layer = null;
|
|
6779
6795
|
}
|
|
6780
6796
|
connectedCallback() {
|
|
6781
|
-
const d = this.getAttribute("geojson"), c = {},
|
|
6782
|
-
|
|
6797
|
+
const d = this.getAttribute("geojson"), c = {}, y = this.closest("l-pane");
|
|
6798
|
+
y !== null && (c.pane = y.getAttribute("name")), d !== null && (this.layer = G.geoJSON(JSON.parse(d), c), this.dispatchEvent(
|
|
6783
6799
|
new CustomEvent(et, {
|
|
6784
6800
|
bubbles: !0,
|
|
6785
6801
|
cancelable: !0,
|
|
@@ -6823,10 +6839,10 @@ const ue = (g) => g.replace(/-./g, (d) => d[1].toUpperCase()), Qs = (g) => g.spl
|
|
|
6823
6839
|
* @param {string} _
|
|
6824
6840
|
* @param {string} newValue
|
|
6825
6841
|
*/
|
|
6826
|
-
attributeChangedCallback(d, c,
|
|
6842
|
+
attributeChangedCallback(d, c, y) {
|
|
6827
6843
|
if (Ie.observedAttributes.indexOf(d) !== -1 && this.icon !== null) {
|
|
6828
6844
|
let x = {};
|
|
6829
|
-
vi.indexOf(d) !== -1 ? x[ue(d)] =
|
|
6845
|
+
vi.indexOf(d) !== -1 ? x[ue(d)] = y : Wn.indexOf(d) !== -1 ? x[ue(d)] = y.toLowerCase() === "true" : x[ue(d)] = JSON.parse(y), this.icon = G.icon({
|
|
6830
6846
|
...this.icon.options,
|
|
6831
6847
|
...x
|
|
6832
6848
|
});
|
|
@@ -6845,11 +6861,11 @@ const ue = (g) => g.replace(/-./g, (d) => d[1].toUpperCase()), Qs = (g) => g.spl
|
|
|
6845
6861
|
*/
|
|
6846
6862
|
_parseOptions() {
|
|
6847
6863
|
const d = {};
|
|
6848
|
-
vi.forEach((
|
|
6849
|
-
d[ue(
|
|
6850
|
-
}), Un.forEach((
|
|
6851
|
-
d[ue(
|
|
6852
|
-
ut(Q(
|
|
6864
|
+
vi.forEach((y) => {
|
|
6865
|
+
d[ue(y)] = ut(Q(y));
|
|
6866
|
+
}), Un.forEach((y) => {
|
|
6867
|
+
d[ue(y)] = Li(
|
|
6868
|
+
ut(Q(y)),
|
|
6853
6869
|
wi(ze())
|
|
6854
6870
|
);
|
|
6855
6871
|
}), d.crossOrigin = Li(
|
|
@@ -6907,8 +6923,8 @@ class io extends HTMLElement {
|
|
|
6907
6923
|
* @param {string} attName
|
|
6908
6924
|
* @param {string} newValue
|
|
6909
6925
|
*/
|
|
6910
|
-
attributeChangedCallback(d, c,
|
|
6911
|
-
this.tooltip && (d === "content" ? this.tooltip.setContent(
|
|
6926
|
+
attributeChangedCallback(d, c, y) {
|
|
6927
|
+
this.tooltip && (d === "content" ? this.tooltip.setContent(y) : d === "permanent" ? this.tooltip.options.permanent = this.hasAttribute("permanent") : d === "interactive" ? this.tooltip.options.interactive = this.hasAttribute("interactive") : d === "direction" && (this.tooltip.options.direction = y));
|
|
6912
6928
|
}
|
|
6913
6929
|
}
|
|
6914
6930
|
Lt(io, "observedAttributes", ["content", "permanent", "interactive", "direction"]);
|
|
@@ -6993,60 +7009,60 @@ const Ti = (g) => {
|
|
|
6993
7009
|
}, nr = (g) => {
|
|
6994
7010
|
let d = g, c = [g];
|
|
6995
7011
|
for (; Vn[d].length > 0; ) {
|
|
6996
|
-
let
|
|
6997
|
-
c.push(
|
|
7012
|
+
let y = Vn[d][0];
|
|
7013
|
+
c.push(y), d = y;
|
|
6998
7014
|
}
|
|
6999
7015
|
return c;
|
|
7000
|
-
}, or = (g, d, c,
|
|
7016
|
+
}, or = (g, d, c, y) => {
|
|
7001
7017
|
let s = [
|
|
7002
7018
|
...Ti(d),
|
|
7003
7019
|
...Ze(d)
|
|
7004
7020
|
].find((l) => l.kebab === c);
|
|
7005
7021
|
if (typeof s > "u")
|
|
7006
7022
|
return;
|
|
7007
|
-
const a = s.parser(
|
|
7023
|
+
const a = s.parser(y);
|
|
7008
7024
|
if (g instanceof G.Circle)
|
|
7009
7025
|
switch (c) {
|
|
7010
7026
|
case "lat-lng":
|
|
7011
|
-
g.setLatLng(JSON.parse(
|
|
7027
|
+
g.setLatLng(JSON.parse(y));
|
|
7012
7028
|
break;
|
|
7013
7029
|
case "radius":
|
|
7014
|
-
g.setRadius(parseFloat(
|
|
7030
|
+
g.setRadius(parseFloat(y));
|
|
7015
7031
|
break;
|
|
7016
7032
|
}
|
|
7017
7033
|
else if (g instanceof G.Rectangle)
|
|
7018
7034
|
switch (c) {
|
|
7019
7035
|
case "lat-lngs":
|
|
7020
|
-
g.setLatLngs(JSON.parse(
|
|
7036
|
+
g.setLatLngs(JSON.parse(y));
|
|
7021
7037
|
break;
|
|
7022
7038
|
case "lat-lng-bounds":
|
|
7023
|
-
g.setBounds(JSON.parse(
|
|
7039
|
+
g.setBounds(JSON.parse(y));
|
|
7024
7040
|
break;
|
|
7025
7041
|
}
|
|
7026
7042
|
else if (g instanceof G.Polygon)
|
|
7027
7043
|
switch (c) {
|
|
7028
7044
|
case "lat-lngs":
|
|
7029
|
-
g.setLatLngs(JSON.parse(
|
|
7045
|
+
g.setLatLngs(JSON.parse(y));
|
|
7030
7046
|
break;
|
|
7031
7047
|
}
|
|
7032
7048
|
else if (g instanceof G.Polyline)
|
|
7033
7049
|
switch (c) {
|
|
7034
7050
|
case "lat-lngs":
|
|
7035
|
-
g.setLatLngs(JSON.parse(
|
|
7051
|
+
g.setLatLngs(JSON.parse(y));
|
|
7036
7052
|
break;
|
|
7037
7053
|
}
|
|
7038
7054
|
let h = Ze("polyline").find((l) => l.kebab === c);
|
|
7039
7055
|
typeof h < "u" && g.setStyle({ [h.camel]: a });
|
|
7040
7056
|
}, sr = (g) => {
|
|
7041
|
-
let d = Ti(g).map((
|
|
7057
|
+
let d = Ti(g).map((y) => y.kebab), c = Ze(g).map((y) => y.kebab);
|
|
7042
7058
|
return [...d, ...c];
|
|
7043
7059
|
}, rr = (g, d) => {
|
|
7044
7060
|
let c = {};
|
|
7045
|
-
return Ze(d).forEach((
|
|
7046
|
-
g.hasAttribute(
|
|
7061
|
+
return Ze(d).forEach((y) => {
|
|
7062
|
+
g.hasAttribute(y.kebab) && (c[y.camel] = y.parser(g.getAttribute(y.kebab)));
|
|
7047
7063
|
}), c;
|
|
7048
7064
|
}, ar = (g, d) => Ti(d).map((c) => {
|
|
7049
|
-
const
|
|
7065
|
+
const y = Q(c.kebab), x = wt(y, g);
|
|
7050
7066
|
return c.parser(x);
|
|
7051
7067
|
}), ke = (g, d) => {
|
|
7052
7068
|
class c extends HTMLElement {
|
|
@@ -7079,10 +7095,10 @@ const Ti = (g) => {
|
|
|
7079
7095
|
};
|
|
7080
7096
|
var qn = { exports: {} };
|
|
7081
7097
|
(function(g, d) {
|
|
7082
|
-
(function(c,
|
|
7083
|
-
|
|
7098
|
+
(function(c, y) {
|
|
7099
|
+
y(d);
|
|
7084
7100
|
})(jn, function(c) {
|
|
7085
|
-
var
|
|
7101
|
+
var y = L.MarkerClusterGroup = L.FeatureGroup.extend({
|
|
7086
7102
|
options: {
|
|
7087
7103
|
maxClusterRadius: 80,
|
|
7088
7104
|
//A cluster will cover at most this many pixels from its center
|
|
@@ -7153,17 +7169,17 @@ var qn = { exports: {} };
|
|
|
7153
7169
|
addLayers: function(s, a) {
|
|
7154
7170
|
if (!L.Util.isArray(s))
|
|
7155
7171
|
return this.addLayer(s);
|
|
7156
|
-
var h = this._featureGroup, l = this._nonPointGroup, p = this.options.chunkedLoading, v = this.options.chunkInterval, _ = this.options.chunkProgress, b = s.length,
|
|
7172
|
+
var h = this._featureGroup, l = this._nonPointGroup, p = this.options.chunkedLoading, v = this.options.chunkInterval, _ = this.options.chunkProgress, b = s.length, w = 0, M = !0, C;
|
|
7157
7173
|
if (this._map) {
|
|
7158
7174
|
var H = (/* @__PURE__ */ new Date()).getTime(), Z = L.bind(function() {
|
|
7159
7175
|
var W = (/* @__PURE__ */ new Date()).getTime();
|
|
7160
|
-
for (this._map && this._unspiderfy && this._unspiderfy();
|
|
7161
|
-
if (p &&
|
|
7176
|
+
for (this._map && this._unspiderfy && this._unspiderfy(); w < b; w++) {
|
|
7177
|
+
if (p && w % 200 === 0) {
|
|
7162
7178
|
var bt = (/* @__PURE__ */ new Date()).getTime() - W;
|
|
7163
7179
|
if (bt > v)
|
|
7164
7180
|
break;
|
|
7165
7181
|
}
|
|
7166
|
-
if (C = s[
|
|
7182
|
+
if (C = s[w], C instanceof L.LayerGroup) {
|
|
7167
7183
|
M && (s = s.slice(), M = !1), this._extractNonGroupLayers(C, s), b = s.length;
|
|
7168
7184
|
continue;
|
|
7169
7185
|
}
|
|
@@ -7176,12 +7192,12 @@ var qn = { exports: {} };
|
|
|
7176
7192
|
h.removeLayer(jt);
|
|
7177
7193
|
}
|
|
7178
7194
|
}
|
|
7179
|
-
_ && _(
|
|
7195
|
+
_ && _(w, b, (/* @__PURE__ */ new Date()).getTime() - H), w === b ? (this._topClusterLevel._recalculateBounds(), this._refreshClustersIcons(), this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds)) : setTimeout(Z, this.options.chunkDelay);
|
|
7180
7196
|
}, this);
|
|
7181
7197
|
Z();
|
|
7182
7198
|
} else
|
|
7183
|
-
for (var U = this._needsClustering;
|
|
7184
|
-
if (C = s[
|
|
7199
|
+
for (var U = this._needsClustering; w < b; w++) {
|
|
7200
|
+
if (C = s[w], C instanceof L.LayerGroup) {
|
|
7185
7201
|
M && (s = s.slice(), M = !1), this._extractNonGroupLayers(C, s), b = s.length;
|
|
7186
7202
|
continue;
|
|
7187
7203
|
}
|
|
@@ -7208,10 +7224,10 @@ var qn = { exports: {} };
|
|
|
7208
7224
|
}
|
|
7209
7225
|
if (this._unspiderfy) {
|
|
7210
7226
|
this._unspiderfy();
|
|
7211
|
-
var b = s.slice(),
|
|
7212
|
-
for (a = 0; a <
|
|
7227
|
+
var b = s.slice(), w = l;
|
|
7228
|
+
for (a = 0; a < w; a++) {
|
|
7213
7229
|
if (h = b[a], h instanceof L.LayerGroup) {
|
|
7214
|
-
this._extractNonGroupLayers(h, b),
|
|
7230
|
+
this._extractNonGroupLayers(h, b), w = b.length;
|
|
7215
7231
|
continue;
|
|
7216
7232
|
}
|
|
7217
7233
|
this._unspiderfyLayer(h);
|
|
@@ -7352,9 +7368,9 @@ var qn = { exports: {} };
|
|
|
7352
7368
|
_removeLayer: function(s, a, h) {
|
|
7353
7369
|
var l = this._gridClusters, p = this._gridUnclustered, v = this._featureGroup, _ = this._map, b = Math.floor(this._map.getMinZoom());
|
|
7354
7370
|
a && this._removeFromGridUnclustered(s, this._maxZoom);
|
|
7355
|
-
var
|
|
7356
|
-
for (this._arraySplice(M, s);
|
|
7357
|
-
a &&
|
|
7371
|
+
var w = s.__parent, M = w._markers, C;
|
|
7372
|
+
for (this._arraySplice(M, s); w && (w._childCount--, w._boundsNeedUpdate = !0, !(w._zoom < b)); )
|
|
7373
|
+
a && w._childCount <= 1 ? (C = w._markers[0] === s ? w._markers[1] : w._markers[0], l[w._zoom].removeObject(w, _.project(w._cLatLng, w._zoom)), p[w._zoom].addObject(C, _.project(C.getLatLng(), w._zoom)), this._arraySplice(w.__parent._childClusters, w), w.__parent._markers.push(C), C.__parent = w.__parent, w._icon && (v.removeLayer(w), h || v.addLayer(C))) : w._iconNeedsUpdate = !0, w = w.__parent;
|
|
7358
7374
|
delete s.__parent;
|
|
7359
7375
|
},
|
|
7360
7376
|
_isOrIsParent: function(s, a) {
|
|
@@ -7435,14 +7451,14 @@ var qn = { exports: {} };
|
|
|
7435
7451
|
return;
|
|
7436
7452
|
}
|
|
7437
7453
|
if (b = l[a].getNearObject(v), b) {
|
|
7438
|
-
var
|
|
7439
|
-
|
|
7454
|
+
var w = b.__parent;
|
|
7455
|
+
w && this._removeLayer(b, !1);
|
|
7440
7456
|
var M = new this._markerCluster(this, a, b, s);
|
|
7441
7457
|
h[a].addObject(M, this._map.project(M._cLatLng, a)), b.__parent = M, s.__parent = M;
|
|
7442
7458
|
var C = M;
|
|
7443
|
-
for (_ = a - 1; _ >
|
|
7459
|
+
for (_ = a - 1; _ > w._zoom; _--)
|
|
7444
7460
|
C = new this._markerCluster(this, _, C), h[_].addObject(C, this._map.project(b.getLatLng(), _));
|
|
7445
|
-
|
|
7461
|
+
w._addChild(C), this._removeFromGridUnclustered(b, a);
|
|
7446
7462
|
return;
|
|
7447
7463
|
}
|
|
7448
7464
|
l[a].addObject(s, v);
|
|
@@ -7567,9 +7583,9 @@ var qn = { exports: {} };
|
|
|
7567
7583
|
_animationZoomIn: function(s, a) {
|
|
7568
7584
|
var h = this._getExpandedVisibleBounds(), l = this._featureGroup, p = Math.floor(this._map.getMinZoom()), v;
|
|
7569
7585
|
this._ignoreMove = !0, this._topClusterLevel._recursively(h, s, p, function(_) {
|
|
7570
|
-
var b = _._latlng,
|
|
7571
|
-
for (h.contains(b) || (b = null), _._isSingleParent() && s + 1 === a ? (l.removeLayer(_), _._recursivelyAddChildrenToMap(null, a, h)) : (_.clusterHide(), _._recursivelyAddChildrenToMap(b, a, h)), v =
|
|
7572
|
-
M =
|
|
7586
|
+
var b = _._latlng, w = _._markers, M;
|
|
7587
|
+
for (h.contains(b) || (b = null), _._isSingleParent() && s + 1 === a ? (l.removeLayer(_), _._recursivelyAddChildrenToMap(null, a, h)) : (_.clusterHide(), _._recursivelyAddChildrenToMap(b, a, h)), v = w.length - 1; v >= 0; v--)
|
|
7588
|
+
M = w[v], h.contains(M._latlng) || l.removeLayer(M);
|
|
7573
7589
|
}), this._forceLayout(), this._topClusterLevel._recursivelyBecomeVisible(h, a), l.eachLayer(function(_) {
|
|
7574
7590
|
!(_ instanceof L.MarkerCluster) && _._icon && _.clusterShow();
|
|
7575
7591
|
}), this._topClusterLevel._recursively(h, s, a, function(_) {
|
|
@@ -7686,12 +7702,12 @@ var qn = { exports: {} };
|
|
|
7686
7702
|
s._southWest && (s._southWest.lat = 1 / 0, s._southWest.lng = 1 / 0), s._northEast && (s._northEast.lat = -1 / 0, s._northEast.lng = -1 / 0);
|
|
7687
7703
|
},
|
|
7688
7704
|
_recalculateBounds: function() {
|
|
7689
|
-
var s = this._markers, a = this._childClusters, h = 0, l = 0, p = this._childCount, v, _, b,
|
|
7705
|
+
var s = this._markers, a = this._childClusters, h = 0, l = 0, p = this._childCount, v, _, b, w;
|
|
7690
7706
|
if (p !== 0) {
|
|
7691
7707
|
for (this._resetBounds(), v = 0; v < s.length; v++)
|
|
7692
7708
|
b = s[v]._latlng, this._bounds.extend(b), h += b.lat, l += b.lng;
|
|
7693
7709
|
for (v = 0; v < a.length; v++)
|
|
7694
|
-
_ = a[v], _._boundsNeedUpdate && _._recalculateBounds(), this._bounds.extend(_._bounds), b = _._wLatLng,
|
|
7710
|
+
_ = a[v], _._boundsNeedUpdate && _._recalculateBounds(), this._bounds.extend(_._bounds), b = _._wLatLng, w = _._childCount, h += b.lat * w, l += b.lng * w;
|
|
7695
7711
|
this._latlng = this._wLatLng = new L.LatLng(h / p, l / p), this._boundsNeedUpdate = !1;
|
|
7696
7712
|
}
|
|
7697
7713
|
},
|
|
@@ -7787,10 +7803,10 @@ var qn = { exports: {} };
|
|
|
7787
7803
|
// runAtEveryLevel: function that takes an L.MarkerCluster as an argument that should be applied on every level
|
|
7788
7804
|
// runAtBottomLevel: function that takes an L.MarkerCluster as an argument that should be applied at only the bottom level
|
|
7789
7805
|
_recursively: function(s, a, h, l, p) {
|
|
7790
|
-
var v = this._childClusters, _ = this._zoom, b,
|
|
7806
|
+
var v = this._childClusters, _ = this._zoom, b, w;
|
|
7791
7807
|
if (a <= _ && (l && l(this), p && _ === h && p(this)), _ < a || _ < h)
|
|
7792
7808
|
for (b = v.length - 1; b >= 0; b--)
|
|
7793
|
-
|
|
7809
|
+
w = v[b], w._boundsNeedUpdate && w._recalculateBounds(), s.intersects(w._bounds) && w._recursively(s, a, h, l, p);
|
|
7794
7810
|
},
|
|
7795
7811
|
//Returns true if we are the parent of only one cluster and that cluster is the same as us
|
|
7796
7812
|
_isSingleParent: function() {
|
|
@@ -7817,27 +7833,27 @@ var qn = { exports: {} };
|
|
|
7817
7833
|
},
|
|
7818
7834
|
//Returns true if the object was found
|
|
7819
7835
|
removeObject: function(s, a) {
|
|
7820
|
-
var h = this._getCoord(a.x), l = this._getCoord(a.y), p = this._grid, v = p[l] = p[l] || {}, _ = v[h] = v[h] || [], b,
|
|
7821
|
-
for (delete this._objectPoint[L.Util.stamp(s)], b = 0,
|
|
7836
|
+
var h = this._getCoord(a.x), l = this._getCoord(a.y), p = this._grid, v = p[l] = p[l] || {}, _ = v[h] = v[h] || [], b, w;
|
|
7837
|
+
for (delete this._objectPoint[L.Util.stamp(s)], b = 0, w = _.length; b < w; b++)
|
|
7822
7838
|
if (_[b] === s)
|
|
7823
|
-
return _.splice(b, 1),
|
|
7839
|
+
return _.splice(b, 1), w === 1 && delete v[h], !0;
|
|
7824
7840
|
},
|
|
7825
7841
|
eachObject: function(s, a) {
|
|
7826
|
-
var h, l, p, v, _, b,
|
|
7842
|
+
var h, l, p, v, _, b, w, M = this._grid;
|
|
7827
7843
|
for (h in M) {
|
|
7828
7844
|
_ = M[h];
|
|
7829
7845
|
for (l in _)
|
|
7830
7846
|
for (b = _[l], p = 0, v = b.length; p < v; p++)
|
|
7831
|
-
|
|
7847
|
+
w = s.call(a, b[p]), w && (p--, v--);
|
|
7832
7848
|
}
|
|
7833
7849
|
},
|
|
7834
7850
|
getNearObject: function(s) {
|
|
7835
|
-
var a = this._getCoord(s.x), h = this._getCoord(s.y), l, p, v, _, b,
|
|
7851
|
+
var a = this._getCoord(s.x), h = this._getCoord(s.y), l, p, v, _, b, w, M, C, H = this._objectPoint, Z = this._sqCellSize, U = null;
|
|
7836
7852
|
for (l = h - 1; l <= h + 1; l++)
|
|
7837
7853
|
if (_ = this._grid[l], _) {
|
|
7838
7854
|
for (p = a - 1; p <= a + 1; p++)
|
|
7839
7855
|
if (b = _[p], b)
|
|
7840
|
-
for (v = 0,
|
|
7856
|
+
for (v = 0, w = b.length; v < w; v++)
|
|
7841
7857
|
M = b[v], C = this._sqDist(H[L.Util.stamp(M)], s), (C < Z || C <= Z && U === null) && (Z = C, U = M);
|
|
7842
7858
|
}
|
|
7843
7859
|
return U;
|
|
@@ -7903,12 +7919,12 @@ var qn = { exports: {} };
|
|
|
7903
7919
|
* @returns {Array}
|
|
7904
7920
|
*/
|
|
7905
7921
|
getConvexHull: function(s) {
|
|
7906
|
-
var a = !1, h = !1, l = !1, p = !1, v = null, _ = null, b = null,
|
|
7922
|
+
var a = !1, h = !1, l = !1, p = !1, v = null, _ = null, b = null, w = null, M = null, C = null, H;
|
|
7907
7923
|
for (H = s.length - 1; H >= 0; H--) {
|
|
7908
7924
|
var Z = s[H];
|
|
7909
|
-
(a === !1 || Z.lat > a) && (v = Z, a = Z.lat), (h === !1 || Z.lat < h) && (_ = Z, h = Z.lat), (l === !1 || Z.lng > l) && (b = Z, l = Z.lng), (p === !1 || Z.lng < p) && (
|
|
7925
|
+
(a === !1 || Z.lat > a) && (v = Z, a = Z.lat), (h === !1 || Z.lat < h) && (_ = Z, h = Z.lat), (l === !1 || Z.lng > l) && (b = Z, l = Z.lng), (p === !1 || Z.lng < p) && (w = Z, p = Z.lng);
|
|
7910
7926
|
}
|
|
7911
|
-
h !== a ? (C = _, M = v) : (C =
|
|
7927
|
+
h !== a ? (C = _, M = v) : (C = w, M = b);
|
|
7912
7928
|
var U = [].concat(
|
|
7913
7929
|
this.buildConvexHull([C, M], s),
|
|
7914
7930
|
this.buildConvexHull([M, C], s)
|
|
@@ -7951,9 +7967,9 @@ var qn = { exports: {} };
|
|
|
7951
7967
|
return v;
|
|
7952
7968
|
},
|
|
7953
7969
|
_generatePointsSpiral: function(s, a) {
|
|
7954
|
-
var h = this._group.options.spiderfyDistanceMultiplier, l = h * this._spiralLengthStart, p = h * this._spiralFootSeparation, v = h * this._spiralLengthFactor * this._2PI, _ = 0, b = [],
|
|
7955
|
-
for (b.length = s,
|
|
7956
|
-
|
|
7970
|
+
var h = this._group.options.spiderfyDistanceMultiplier, l = h * this._spiralLengthStart, p = h * this._spiralFootSeparation, v = h * this._spiralLengthFactor * this._2PI, _ = 0, b = [], w;
|
|
7971
|
+
for (b.length = s, w = s; w >= 0; w--)
|
|
7972
|
+
w < s && (b[w] = new L.Point(a.x + l * Math.cos(_), a.y + l * Math.sin(_))._round()), _ += p / l + w * 5e-4, l += v / _;
|
|
7957
7973
|
return b;
|
|
7958
7974
|
},
|
|
7959
7975
|
_noanimationUnspiderfy: function() {
|
|
@@ -7967,9 +7983,9 @@ var qn = { exports: {} };
|
|
|
7967
7983
|
}
|
|
7968
7984
|
}), L.MarkerClusterNonAnimated = L.MarkerCluster.extend({
|
|
7969
7985
|
_animationSpiderfy: function(s, a) {
|
|
7970
|
-
var h = this._group, l = h._map, p = h._featureGroup, v = this._group.options.spiderLegPolylineOptions, _, b,
|
|
7986
|
+
var h = this._group, l = h._map, p = h._featureGroup, v = this._group.options.spiderLegPolylineOptions, _, b, w, M;
|
|
7971
7987
|
for (h._ignoreMove = !0, _ = 0; _ < s.length; _++)
|
|
7972
|
-
M = l.layerPointToLatLng(a[_]), b = s[_],
|
|
7988
|
+
M = l.layerPointToLatLng(a[_]), b = s[_], w = new L.Polyline([this._latlng, M], v), l.addLayer(w), b._spiderLeg = w, b._preSpiderfyLatlng = b._latlng, b.setLatLng(M), b.setZIndexOffset && b.setZIndexOffset(1e6), p.addLayer(b);
|
|
7973
7989
|
this.setOpacity(0.3), h._ignoreMove = !1, h.fire("spiderfied", {
|
|
7974
7990
|
cluster: this,
|
|
7975
7991
|
markers: s
|
|
@@ -7980,11 +7996,11 @@ var qn = { exports: {} };
|
|
|
7980
7996
|
}
|
|
7981
7997
|
}), L.MarkerCluster.include({
|
|
7982
7998
|
_animationSpiderfy: function(s, a) {
|
|
7983
|
-
var h = this, l = this._group, p = l._map, v = l._featureGroup, _ = this._latlng, b = p.latLngToLayerPoint(_),
|
|
7984
|
-
for (C === void 0 && (C = L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),
|
|
7985
|
-
Z = s[H], at = p.layerPointToLatLng(a[H]), U = new L.Polyline([_, at], M), p.addLayer(U), Z._spiderLeg = U,
|
|
7999
|
+
var h = this, l = this._group, p = l._map, v = l._featureGroup, _ = this._latlng, b = p.latLngToLayerPoint(_), w = L.Path.SVG, M = L.extend({}, this._group.options.spiderLegPolylineOptions), C = M.opacity, H, Z, U, W, bt, at;
|
|
8000
|
+
for (C === void 0 && (C = L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity), w ? (M.opacity = 0, M.className = (M.className || "") + " leaflet-cluster-spider-leg") : M.opacity = C, l._ignoreMove = !0, H = 0; H < s.length; H++)
|
|
8001
|
+
Z = s[H], at = p.layerPointToLatLng(a[H]), U = new L.Polyline([_, at], M), p.addLayer(U), Z._spiderLeg = U, w && (W = U._path, bt = W.getTotalLength() + 0.1, W.style.strokeDasharray = bt, W.style.strokeDashoffset = bt), Z.setZIndexOffset && Z.setZIndexOffset(1e6), Z.clusterHide && Z.clusterHide(), v.addLayer(Z), Z._setPos && Z._setPos(b);
|
|
7986
8002
|
for (l._forceLayout(), l._animationStart(), H = s.length - 1; H >= 0; H--)
|
|
7987
|
-
at = p.layerPointToLatLng(a[H]), Z = s[H], Z._preSpiderfyLatlng = Z._latlng, Z.setLatLng(at), Z.clusterShow && Z.clusterShow(),
|
|
8003
|
+
at = p.layerPointToLatLng(a[H]), Z = s[H], Z._preSpiderfyLatlng = Z._latlng, Z.setLatLng(at), Z.clusterShow && Z.clusterShow(), w && (U = Z._spiderLeg, W = U._path, W.style.strokeDashoffset = 0, U.setStyle({ opacity: C }));
|
|
7988
8004
|
this.setOpacity(0.3), l._ignoreMove = !1, setTimeout(function() {
|
|
7989
8005
|
l._animationEnd(), l.fire("spiderfied", {
|
|
7990
8006
|
cluster: h,
|
|
@@ -7993,15 +8009,15 @@ var qn = { exports: {} };
|
|
|
7993
8009
|
}, 200);
|
|
7994
8010
|
},
|
|
7995
8011
|
_animationUnspiderfy: function(s) {
|
|
7996
|
-
var a = this, h = this._group, l = h._map, p = h._featureGroup, v = s ? l._latLngToNewLayerPoint(this._latlng, s.zoom, s.center) : l.latLngToLayerPoint(this._latlng), _ = this.getAllChildMarkers(null, !0), b = L.Path.SVG,
|
|
8012
|
+
var a = this, h = this._group, l = h._map, p = h._featureGroup, v = s ? l._latLngToNewLayerPoint(this._latlng, s.zoom, s.center) : l.latLngToLayerPoint(this._latlng), _ = this.getAllChildMarkers(null, !0), b = L.Path.SVG, w, M, C, H, Z, U;
|
|
7997
8013
|
for (h._ignoreMove = !0, h._animationStart(), this.setOpacity(1), M = _.length - 1; M >= 0; M--)
|
|
7998
|
-
|
|
8014
|
+
w = _[M], w._preSpiderfyLatlng && (w.closePopup(), w.setLatLng(w._preSpiderfyLatlng), delete w._preSpiderfyLatlng, U = !0, w._setPos && (w._setPos(v), U = !1), w.clusterHide && (w.clusterHide(), U = !1), U && p.removeLayer(w), b && (C = w._spiderLeg, H = C._path, Z = H.getTotalLength() + 0.1, H.style.strokeDashoffset = Z, C.setStyle({ opacity: 0 })));
|
|
7999
8015
|
h._ignoreMove = !1, setTimeout(function() {
|
|
8000
8016
|
var W = 0;
|
|
8001
8017
|
for (M = _.length - 1; M >= 0; M--)
|
|
8002
|
-
|
|
8018
|
+
w = _[M], w._spiderLeg && W++;
|
|
8003
8019
|
for (M = _.length - 1; M >= 0; M--)
|
|
8004
|
-
|
|
8020
|
+
w = _[M], w._spiderLeg && (w.clusterShow && w.clusterShow(), w.setZIndexOffset && w.setZIndexOffset(0), W > 1 && p.removeLayer(w), l.removeLayer(w._spiderLeg), delete w._spiderLeg);
|
|
8005
8021
|
h._animationEnd(), h.fire("unspiderfied", {
|
|
8006
8022
|
cluster: a,
|
|
8007
8023
|
markers: _
|
|
@@ -8087,7 +8103,7 @@ var qn = { exports: {} };
|
|
|
8087
8103
|
var h = this.options.icon;
|
|
8088
8104
|
return L.setOptions(h, s), this.setIcon(h), a && this.__parent && this.__parent._group.refreshClusters(this), this;
|
|
8089
8105
|
}
|
|
8090
|
-
}), c.MarkerClusterGroup =
|
|
8106
|
+
}), c.MarkerClusterGroup = y, c.MarkerCluster = x, Object.defineProperty(c, "__esModule", { value: !0 });
|
|
8091
8107
|
});
|
|
8092
8108
|
})(qn, qn.exports);
|
|
8093
8109
|
class no extends zt {
|
|
@@ -8100,7 +8116,7 @@ class no extends zt {
|
|
|
8100
8116
|
showCoverageOnHover: this.hasAttribute("show-coverage-on-hover"),
|
|
8101
8117
|
iconCreateFunction: this._createIconCreateFunction(c)
|
|
8102
8118
|
});
|
|
8103
|
-
const
|
|
8119
|
+
const y = new CustomEvent(et, {
|
|
8104
8120
|
cancelable: !0,
|
|
8105
8121
|
bubbles: !0,
|
|
8106
8122
|
detail: {
|
|
@@ -8108,15 +8124,15 @@ class no extends zt {
|
|
|
8108
8124
|
name: d
|
|
8109
8125
|
}
|
|
8110
8126
|
});
|
|
8111
|
-
this.dispatchEvent(
|
|
8127
|
+
this.dispatchEvent(y), this.addEventListener(et, (x) => {
|
|
8112
8128
|
x.stopPropagation(), this.layer.addLayer(x.detail.layer);
|
|
8113
8129
|
});
|
|
8114
8130
|
}
|
|
8115
8131
|
_createIconCreateFunction(d) {
|
|
8116
8132
|
if (d) {
|
|
8117
|
-
let { size: c, content:
|
|
8133
|
+
let { size: c, content: y, className: x } = JSON.parse(d);
|
|
8118
8134
|
return (s) => {
|
|
8119
|
-
const a = this._callClusterFunction(s, c), h = this._callClusterFunction(s,
|
|
8135
|
+
const a = this._callClusterFunction(s, c), h = this._callClusterFunction(s, y);
|
|
8120
8136
|
return L.divIcon({
|
|
8121
8137
|
html: h,
|
|
8122
8138
|
className: x,
|