@local-logic/maps 0.0.23 → 0.0.25
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/index-BSGAziKb.js +92 -0
- package/dist/index-BUFjWpWw.js +98 -0
- package/dist/index-BVm_ZeWH.js +92 -0
- package/dist/index-Bd3yDO3y.js +75 -0
- package/dist/index-BxSLdO8P.js +92 -0
- package/dist/{index-BrxP9NHZ.js → index-C2d04GGR.js} +3 -3
- package/dist/index-C3Tj3r2u.js +24 -0
- package/dist/{index-CSVsF1EQ.js → index-CEDpofgZ.js} +1 -1
- package/dist/{index-BRD3rjLE.js → index-CIE9YlvM.js} +12 -12
- package/dist/index-CUUravWc.js +25 -0
- package/dist/index-D8LqYjZz.js +75 -0
- package/dist/{index-B85VZGVP.js → index-DnjO_exB.js} +3 -3
- package/dist/{index-CFomI3Il.js → index-DscDx7HE.js} +14 -13
- package/dist/index-Du1NsFhd.js +69 -0
- package/dist/{index-DfhwDiOS.js → index-GGtrKiJn.js} +22 -22
- package/dist/{index-ufLC1PLO.js → index-bLVZAISz.js} +16 -16
- package/dist/{index-CiWKwaC4.js → index-eWv3le07.js} +7 -6
- package/dist/{index-CN_dNOir.js → index-zPNEOm6B.js} +254 -217
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +8 -3615
- package/dist/{logo-control-VgN6MEKI.js → logo-control-CHapR1Dt.js} +11 -11
- package/dist/{scale-control-jBKptTbw.js → scale-control-Dsir9fWY.js} +21 -21
- package/dist/src/components/Map/Root/BaseMap/Google/index.d.ts +1 -1
- package/dist/src/components/Map/Root/BaseMap/Google/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/BaseMap/Mapbox/index.d.ts +1 -1
- package/dist/src/components/Map/Root/BaseMap/Mapbox/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/BaseMap/Maptiler/index.d.ts +1 -1
- package/dist/src/components/Map/Root/BaseMap/Maptiler/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/BaseMap/index.d.ts +1 -1
- package/dist/src/components/Map/Root/BaseMap/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/BaseMap/types.d.ts +1 -10
- package/dist/src/components/Map/Root/BaseMap/types.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Markers/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Popup/Google/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Popup/Mapbox/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Popup/Maptiler/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Popup/utils/index.d.ts +2 -0
- package/dist/src/components/Map/Root/Popup/utils/index.d.ts.map +1 -0
- package/dist/src/components/Map/Root/Popup/utils/moveIntoView/index.d.ts +21 -0
- package/dist/src/components/Map/Root/Popup/utils/moveIntoView/index.d.ts.map +1 -0
- package/dist/src/components/Map/Root/constants.d.ts +11 -2
- package/dist/src/components/Map/Root/constants.d.ts.map +1 -1
- package/dist/src/components/Map/Root/context.d.ts +6 -6
- package/dist/src/components/Map/Root/context.d.ts.map +1 -1
- package/dist/src/components/Map/Root/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/types.d.ts +9 -0
- package/dist/src/components/Map/Root/types.d.ts.map +1 -1
- package/dist/src/components/Map/index.stories.d.ts +9 -3
- package/dist/src/components/Map/index.stories.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-BR85tnqI.js → styles-BhmqUA5C.js} +231 -266
- package/dist/styles-DGEqzC-2.js +36 -0
- package/package.json +30 -10
- package/dist/IconBase.es-rM5tt24D.js +0 -48
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/index-BpFpg_5A.js +0 -78
- package/dist/index-CRdDPWou.js +0 -34
- package/dist/index-CceEGv05.js +0 -104
- package/dist/index-CmajMf1d.js +0 -109
- package/dist/index-D5kHxP9H.js +0 -43
- package/dist/index-DNNz78Rc.js +0 -24
- package/dist/index-Db33Ugg9.js +0 -34
- package/dist/index-arkRlpaR.js +0 -80
- package/dist/index-vHMPqmOL.js +0 -23
- package/dist/index.modern-B-ChKejQ.js +0 -914
- package/dist/mapbox-gl-C6frO4Gl.js +0 -34625
- package/dist/maplibre-gl-DkDrZ6rP.js +0 -21669
- package/dist/styles-ChFj97uV.js +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as O } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
2
|
+
import * as D from "react";
|
|
3
|
+
import at, { useContext as ct, useState as L, useMemo as S, lazy as w, useRef as z, useEffect as H } from "react";
|
|
4
|
+
const et = at.createContext({}), R = () => ct(et), C = {
|
|
5
5
|
zoom: 14,
|
|
6
6
|
pitch: 0,
|
|
7
7
|
bearing: 0,
|
|
@@ -10,61 +10,66 @@ const tt = it.createContext({}), I = () => at(tt), C = {
|
|
|
10
10
|
maptiler: "600d69cb-288d-445e-9839-3dfe4d76b31a",
|
|
11
11
|
mapbox: "locallogic/cmb9nz9kb011501ru8drq8fqf",
|
|
12
12
|
google: "a7ff20eb973126bb"
|
|
13
|
-
},
|
|
13
|
+
}, ut = {
|
|
14
|
+
top: 10,
|
|
15
|
+
bottom: 10,
|
|
16
|
+
left: 10,
|
|
17
|
+
right: 10
|
|
18
|
+
}, J = 13, pt = 22, Jt = 12.5, ht = 30, lt = 60, Wt = 15, ft = [-180, -85.0511, 180, 85.0511], dt = "w-full h-full relative overflow-hidden", mt = w(() => import("./index-Du1NsFhd.js")), gt = w(() => import("./index-BUFjWpWw.js")), yt = w(() => import("./index-Bd3yDO3y.js")), wt = w(() => import("./index-qqbvBkdn.js")), Mt = ({ children: r }) => {
|
|
14
19
|
const {
|
|
15
|
-
mapProvider:
|
|
16
|
-
center:
|
|
17
|
-
zoom:
|
|
18
|
-
pitch:
|
|
19
|
-
bearing:
|
|
20
|
-
cooperativeGestures:
|
|
21
|
-
zoomPosition:
|
|
22
|
-
} =
|
|
23
|
-
switch (
|
|
20
|
+
mapProvider: t,
|
|
21
|
+
center: e,
|
|
22
|
+
zoom: n = C.zoom,
|
|
23
|
+
pitch: o = C.pitch,
|
|
24
|
+
bearing: i = C.bearing,
|
|
25
|
+
cooperativeGestures: a = C.cooperativeGestures,
|
|
26
|
+
zoomPosition: c
|
|
27
|
+
} = R(), [s] = L(n), h = S(() => {
|
|
28
|
+
switch (t?.name) {
|
|
24
29
|
case "maptiler":
|
|
25
|
-
return
|
|
30
|
+
return mt;
|
|
26
31
|
case "google":
|
|
27
|
-
return
|
|
32
|
+
return gt;
|
|
28
33
|
case "mapbox":
|
|
29
|
-
return
|
|
34
|
+
return yt;
|
|
30
35
|
default:
|
|
31
|
-
return
|
|
36
|
+
return wt;
|
|
32
37
|
}
|
|
33
|
-
}, [
|
|
38
|
+
}, [t]);
|
|
34
39
|
return /* @__PURE__ */ O(
|
|
35
40
|
"div",
|
|
36
41
|
{
|
|
37
|
-
className:
|
|
42
|
+
className: dt,
|
|
38
43
|
"data-testid": "base-map",
|
|
39
|
-
"data-map-provider-name":
|
|
40
|
-
"data-map-provider-theme":
|
|
41
|
-
"data-initial-zoom":
|
|
42
|
-
"data-pitch":
|
|
43
|
-
"data-bearing":
|
|
44
|
-
"data-cooperative-gestures":
|
|
45
|
-
"data-zoom-position":
|
|
46
|
-
"data-center-latitude":
|
|
47
|
-
"data-center-longitude":
|
|
48
|
-
children: /* @__PURE__ */ O(h, {
|
|
44
|
+
"data-map-provider-name": t?.name,
|
|
45
|
+
"data-map-provider-theme": t?.theme || V[t?.name] || V.maptiler,
|
|
46
|
+
"data-initial-zoom": s,
|
|
47
|
+
"data-pitch": o,
|
|
48
|
+
"data-bearing": i,
|
|
49
|
+
"data-cooperative-gestures": a,
|
|
50
|
+
"data-zoom-position": c,
|
|
51
|
+
"data-center-latitude": e.latitude,
|
|
52
|
+
"data-center-longitude": e.longitude,
|
|
53
|
+
children: /* @__PURE__ */ O(h, { children: r })
|
|
49
54
|
}
|
|
50
55
|
);
|
|
51
|
-
},
|
|
52
|
-
function
|
|
53
|
-
const { mapProvider: t } =
|
|
56
|
+
}, _t = w(() => import("./index-C3Tj3r2u.js")), Pt = w(() => import("./index-CUUravWc.js")), At = w(() => import("./index-eWv3le07.js"));
|
|
57
|
+
function Et(r) {
|
|
58
|
+
const { mapProvider: t } = R(), e = S(() => {
|
|
54
59
|
switch (t?.name) {
|
|
55
60
|
case "maptiler":
|
|
56
|
-
return
|
|
61
|
+
return _t;
|
|
57
62
|
case "google":
|
|
58
|
-
return
|
|
63
|
+
return Pt;
|
|
59
64
|
case "mapbox":
|
|
60
|
-
return
|
|
65
|
+
return At;
|
|
61
66
|
default:
|
|
62
67
|
return null;
|
|
63
68
|
}
|
|
64
69
|
}, [t]);
|
|
65
70
|
return e ? /* @__PURE__ */ O(e, { ...r }) : null;
|
|
66
71
|
}
|
|
67
|
-
function
|
|
72
|
+
function nt(r, t, e = {}) {
|
|
68
73
|
const n = { type: "Feature" };
|
|
69
74
|
return (e.id === 0 || e.id) && (n.id = e.id), e.bbox && (n.bbox = e.bbox), n.properties = t || {}, n.geometry = r, n;
|
|
70
75
|
}
|
|
@@ -75,23 +80,23 @@ function xt(r, t, e = {}) {
|
|
|
75
80
|
throw new Error("coordinates must be an Array");
|
|
76
81
|
if (r.length < 2)
|
|
77
82
|
throw new Error("coordinates must be at least 2 numbers long");
|
|
78
|
-
if (!
|
|
83
|
+
if (!W(r[0]) || !W(r[1]))
|
|
79
84
|
throw new Error("coordinates must contain numbers");
|
|
80
|
-
return
|
|
85
|
+
return nt({
|
|
81
86
|
type: "Point",
|
|
82
87
|
coordinates: r
|
|
83
88
|
}, t, e);
|
|
84
89
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
90
|
+
function Yt(r, t, e = {}) {
|
|
91
|
+
return nt({
|
|
87
92
|
type: "MultiPoint",
|
|
88
93
|
coordinates: r
|
|
89
94
|
}, t, e);
|
|
90
95
|
}
|
|
91
|
-
function
|
|
96
|
+
function W(r) {
|
|
92
97
|
return !isNaN(r) && r !== null && !Array.isArray(r);
|
|
93
98
|
}
|
|
94
|
-
const
|
|
99
|
+
const Y = [
|
|
95
100
|
Int8Array,
|
|
96
101
|
Uint8Array,
|
|
97
102
|
Uint8ClampedArray,
|
|
@@ -102,7 +107,7 @@ const J = [
|
|
|
102
107
|
Float32Array,
|
|
103
108
|
Float64Array
|
|
104
109
|
], F = 1, T = 8;
|
|
105
|
-
class
|
|
110
|
+
class G {
|
|
106
111
|
/**
|
|
107
112
|
* Creates an index from raw `ArrayBuffer` data.
|
|
108
113
|
* @param {ArrayBuffer} data
|
|
@@ -116,11 +121,11 @@ class j {
|
|
|
116
121
|
const o = n >> 4;
|
|
117
122
|
if (o !== F)
|
|
118
123
|
throw new Error(`Got v${o} data when expected v${F}.`);
|
|
119
|
-
const i =
|
|
124
|
+
const i = Y[n & 15];
|
|
120
125
|
if (!i)
|
|
121
126
|
throw new Error("Unrecognized array type.");
|
|
122
127
|
const [a] = new Uint16Array(t, 2, 1), [c] = new Uint32Array(t, 4, 1);
|
|
123
|
-
return new
|
|
128
|
+
return new G(c, a, i, t);
|
|
124
129
|
}
|
|
125
130
|
/**
|
|
126
131
|
* Creates an index that will hold a given number of items.
|
|
@@ -132,7 +137,7 @@ class j {
|
|
|
132
137
|
constructor(t, e = 64, n = Float64Array, o) {
|
|
133
138
|
if (isNaN(t) || t < 0) throw new Error(`Unpexpected numItems value: ${t}.`);
|
|
134
139
|
this.numItems = +t, this.nodeSize = Math.min(Math.max(+e, 2), 65535), this.ArrayType = n, this.IndexArrayType = t < 65536 ? Uint16Array : Uint32Array;
|
|
135
|
-
const i =
|
|
140
|
+
const i = Y.indexOf(this.ArrayType), a = t * 2 * this.ArrayType.BYTES_PER_ELEMENT, c = t * this.IndexArrayType.BYTES_PER_ELEMENT, s = (8 - c % 8) % 8;
|
|
136
141
|
if (i < 0)
|
|
137
142
|
throw new Error(`Unexpected typed array class: ${n}.`);
|
|
138
143
|
o && o instanceof ArrayBuffer ? (this.data = o, this.ids = new this.IndexArrayType(this.data, T, t), this.coords = new this.ArrayType(this.data, T + c + s, t * 2), this._pos = t * 2, this._finished = !0) : (this.data = new ArrayBuffer(T + a + c + s), this.ids = new this.IndexArrayType(this.data, T, t), this.coords = new this.ArrayType(this.data, T + c + s, t * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (F << 4) + i]), new Uint16Array(this.data, 2, 1)[0] = e, new Uint32Array(this.data, 4, 1)[0] = t);
|
|
@@ -154,7 +159,7 @@ class j {
|
|
|
154
159
|
const t = this._pos >> 1;
|
|
155
160
|
if (t !== this.numItems)
|
|
156
161
|
throw new Error(`Added ${t} items when expected ${this.numItems}.`);
|
|
157
|
-
return
|
|
162
|
+
return j(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
|
|
158
163
|
}
|
|
159
164
|
/**
|
|
160
165
|
* Search the index for items within a given bounding box.
|
|
@@ -166,20 +171,20 @@ class j {
|
|
|
166
171
|
*/
|
|
167
172
|
range(t, e, n, o) {
|
|
168
173
|
if (!this._finished) throw new Error("Data not yet indexed - call index.finish().");
|
|
169
|
-
const { ids: i, coords: a, nodeSize: c } = this, s = [0, i.length - 1, 0],
|
|
174
|
+
const { ids: i, coords: a, nodeSize: c } = this, s = [0, i.length - 1, 0], h = [];
|
|
170
175
|
for (; s.length; ) {
|
|
171
|
-
const
|
|
176
|
+
const l = s.pop() || 0, u = s.pop() || 0, f = s.pop() || 0;
|
|
172
177
|
if (u - f <= c) {
|
|
173
|
-
for (let
|
|
174
|
-
const
|
|
175
|
-
|
|
178
|
+
for (let p = f; p <= u; p++) {
|
|
179
|
+
const m = a[2 * p], M = a[2 * p + 1];
|
|
180
|
+
m >= t && m <= n && M >= e && M <= o && h.push(i[p]);
|
|
176
181
|
}
|
|
177
182
|
continue;
|
|
178
183
|
}
|
|
179
|
-
const d = f + u >> 1, g = a[2 * d],
|
|
180
|
-
g >= t && g <= n &&
|
|
184
|
+
const d = f + u >> 1, g = a[2 * d], y = a[2 * d + 1];
|
|
185
|
+
g >= t && g <= n && y >= e && y <= o && h.push(i[d]), (l === 0 ? t <= g : e <= y) && (s.push(f), s.push(d - 1), s.push(1 - l)), (l === 0 ? n >= g : o >= y) && (s.push(d + 1), s.push(u), s.push(1 - l));
|
|
181
186
|
}
|
|
182
|
-
return
|
|
187
|
+
return h;
|
|
183
188
|
}
|
|
184
189
|
/**
|
|
185
190
|
* Search the index for items within a given radius.
|
|
@@ -190,44 +195,44 @@ class j {
|
|
|
190
195
|
*/
|
|
191
196
|
within(t, e, n) {
|
|
192
197
|
if (!this._finished) throw new Error("Data not yet indexed - call index.finish().");
|
|
193
|
-
const { ids: o, coords: i, nodeSize: a } = this, c = [0, o.length - 1, 0], s = [],
|
|
198
|
+
const { ids: o, coords: i, nodeSize: a } = this, c = [0, o.length - 1, 0], s = [], h = n * n;
|
|
194
199
|
for (; c.length; ) {
|
|
195
|
-
const
|
|
200
|
+
const l = c.pop() || 0, u = c.pop() || 0, f = c.pop() || 0;
|
|
196
201
|
if (u - f <= a) {
|
|
197
|
-
for (let
|
|
198
|
-
K(i[2 *
|
|
202
|
+
for (let p = f; p <= u; p++)
|
|
203
|
+
K(i[2 * p], i[2 * p + 1], t, e) <= h && s.push(o[p]);
|
|
199
204
|
continue;
|
|
200
205
|
}
|
|
201
|
-
const d = f + u >> 1, g = i[2 * d],
|
|
202
|
-
K(g,
|
|
206
|
+
const d = f + u >> 1, g = i[2 * d], y = i[2 * d + 1];
|
|
207
|
+
K(g, y, t, e) <= h && s.push(o[d]), (l === 0 ? t - n <= g : e - n <= y) && (c.push(f), c.push(d - 1), c.push(1 - l)), (l === 0 ? t + n >= g : e + n >= y) && (c.push(d + 1), c.push(u), c.push(1 - l));
|
|
203
208
|
}
|
|
204
209
|
return s;
|
|
205
210
|
}
|
|
206
211
|
}
|
|
207
|
-
function
|
|
212
|
+
function j(r, t, e, n, o, i) {
|
|
208
213
|
if (o - n <= e) return;
|
|
209
214
|
const a = n + o >> 1;
|
|
210
|
-
|
|
215
|
+
rt(r, t, a, n, o, i), j(r, t, e, n, a - 1, 1 - i), j(r, t, e, a + 1, o, 1 - i);
|
|
211
216
|
}
|
|
212
|
-
function
|
|
217
|
+
function rt(r, t, e, n, o, i) {
|
|
213
218
|
for (; o > n; ) {
|
|
214
219
|
if (o - n > 600) {
|
|
215
|
-
const
|
|
216
|
-
|
|
220
|
+
const h = o - n + 1, l = e - n + 1, u = Math.log(h), f = 0.5 * Math.exp(2 * u / 3), d = 0.5 * Math.sqrt(u * f * (h - f) / h) * (l - h / 2 < 0 ? -1 : 1), g = Math.max(n, Math.floor(e - l * f / h + d)), y = Math.min(o, Math.floor(e + (h - l) * f / h + d));
|
|
221
|
+
rt(r, t, e, g, y, i);
|
|
217
222
|
}
|
|
218
223
|
const a = t[2 * e + i];
|
|
219
224
|
let c = n, s = o;
|
|
220
|
-
for (
|
|
221
|
-
for (
|
|
225
|
+
for (b(r, t, n, e), t[2 * o + i] > a && b(r, t, n, o); c < s; ) {
|
|
226
|
+
for (b(r, t, c, s), c++, s--; t[2 * c + i] < a; ) c++;
|
|
222
227
|
for (; t[2 * s + i] > a; ) s--;
|
|
223
228
|
}
|
|
224
|
-
t[2 * n + i] === a ?
|
|
229
|
+
t[2 * n + i] === a ? b(r, t, n, s) : (s++, b(r, t, s, o)), s <= e && (n = s + 1), e <= s && (o = s - 1);
|
|
225
230
|
}
|
|
226
231
|
}
|
|
227
|
-
function
|
|
228
|
-
|
|
232
|
+
function b(r, t, e, n) {
|
|
233
|
+
B(r, e, n), B(t, 2 * e, 2 * n), B(t, 2 * e + 1, 2 * n + 1);
|
|
229
234
|
}
|
|
230
|
-
function
|
|
235
|
+
function B(r, t, e) {
|
|
231
236
|
const n = r[t];
|
|
232
237
|
r[t] = r[e], r[e] = n;
|
|
233
238
|
}
|
|
@@ -235,7 +240,7 @@ function K(r, t, e, n) {
|
|
|
235
240
|
const o = r - e, i = t - n;
|
|
236
241
|
return o * o + i * i;
|
|
237
242
|
}
|
|
238
|
-
const
|
|
243
|
+
const vt = {
|
|
239
244
|
minZoom: 0,
|
|
240
245
|
// min zoom to generate clusters on
|
|
241
246
|
maxZoom: 16,
|
|
@@ -258,10 +263,10 @@ const Et = {
|
|
|
258
263
|
// properties to use for individual points when running the reducer
|
|
259
264
|
map: (r) => r
|
|
260
265
|
// props => ({sum: props.my_value})
|
|
261
|
-
}, q = Math.fround || /* @__PURE__ */ ((r) => (t) => (r[0] = +t, r[0]))(new Float32Array(1)),
|
|
262
|
-
class
|
|
266
|
+
}, q = Math.fround || /* @__PURE__ */ ((r) => (t) => (r[0] = +t, r[0]))(new Float32Array(1)), x = 2, A = 3, N = 4, P = 5, st = 6;
|
|
267
|
+
class Ot {
|
|
263
268
|
constructor(t) {
|
|
264
|
-
this.options = Object.assign(Object.create(
|
|
269
|
+
this.options = Object.assign(Object.create(vt), t), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
|
|
265
270
|
}
|
|
266
271
|
load(t) {
|
|
267
272
|
const { log: e, minZoom: n, maxZoom: o } = this.options;
|
|
@@ -270,9 +275,9 @@ class Pt {
|
|
|
270
275
|
e && console.time(i), this.points = t;
|
|
271
276
|
const a = [];
|
|
272
277
|
for (let s = 0; s < t.length; s++) {
|
|
273
|
-
const
|
|
274
|
-
if (!
|
|
275
|
-
const [
|
|
278
|
+
const h = t[s];
|
|
279
|
+
if (!h.geometry) continue;
|
|
280
|
+
const [l, u] = h.geometry.coordinates, f = q(I(l)), d = q(U(u));
|
|
276
281
|
a.push(
|
|
277
282
|
f,
|
|
278
283
|
d,
|
|
@@ -290,8 +295,8 @@ class Pt {
|
|
|
290
295
|
let c = this.trees[o + 1] = this._createTree(a);
|
|
291
296
|
e && console.timeEnd(i);
|
|
292
297
|
for (let s = o; s >= n; s--) {
|
|
293
|
-
const
|
|
294
|
-
c = this.trees[s] = this._createTree(this._cluster(c, s)), e && console.log("z%d: %d clusters in %dms", s, c.numItems, +Date.now() -
|
|
298
|
+
const h = +Date.now();
|
|
299
|
+
c = this.trees[s] = this._createTree(this._cluster(c, s)), e && console.log("z%d: %d clusters in %dms", s, c.numItems, +Date.now() - h);
|
|
295
300
|
}
|
|
296
301
|
return e && console.timeEnd("total time"), this;
|
|
297
302
|
}
|
|
@@ -306,22 +311,22 @@ class Pt {
|
|
|
306
311
|
const u = this.getClusters([n, o, 180, a], e), f = this.getClusters([-180, o, i, a], e);
|
|
307
312
|
return u.concat(f);
|
|
308
313
|
}
|
|
309
|
-
const c = this.trees[this._limitZoom(e)], s = c.range(
|
|
314
|
+
const c = this.trees[this._limitZoom(e)], s = c.range(I(n), U(a), I(i), U(o)), h = c.data, l = [];
|
|
310
315
|
for (const u of s) {
|
|
311
316
|
const f = this.stride * u;
|
|
312
|
-
|
|
317
|
+
l.push(h[f + P] > 1 ? Q(h, f, this.clusterProps) : this.points[h[f + A]]);
|
|
313
318
|
}
|
|
314
|
-
return
|
|
319
|
+
return l;
|
|
315
320
|
}
|
|
316
321
|
getChildren(t) {
|
|
317
322
|
const e = this._getOriginId(t), n = this._getOriginZoom(t), o = "No cluster with the specified id.", i = this.trees[n];
|
|
318
323
|
if (!i) throw new Error(o);
|
|
319
324
|
const a = i.data;
|
|
320
325
|
if (e * this.stride >= a.length) throw new Error(o);
|
|
321
|
-
const c = this.options.radius / (this.options.extent * Math.pow(2, n - 1)), s = a[e * this.stride],
|
|
322
|
-
for (const f of
|
|
326
|
+
const c = this.options.radius / (this.options.extent * Math.pow(2, n - 1)), s = a[e * this.stride], h = a[e * this.stride + 1], l = i.within(s, h, c), u = [];
|
|
327
|
+
for (const f of l) {
|
|
323
328
|
const d = f * this.stride;
|
|
324
|
-
a[d +
|
|
329
|
+
a[d + N] === t && u.push(a[d + P] > 1 ? Q(a, d, this.clusterProps) : this.points[a[d + A]]);
|
|
325
330
|
}
|
|
326
331
|
if (u.length === 0) throw new Error(o);
|
|
327
332
|
return u;
|
|
@@ -332,25 +337,25 @@ class Pt {
|
|
|
332
337
|
return this._appendLeaves(o, t, e, n, 0), o;
|
|
333
338
|
}
|
|
334
339
|
getTile(t, e, n) {
|
|
335
|
-
const o = this.trees[this._limitZoom(t)], i = Math.pow(2, t), { extent: a, radius: c } = this.options, s = c / a,
|
|
340
|
+
const o = this.trees[this._limitZoom(t)], i = Math.pow(2, t), { extent: a, radius: c } = this.options, s = c / a, h = (n - s) / i, l = (n + 1 + s) / i, u = {
|
|
336
341
|
features: []
|
|
337
342
|
};
|
|
338
343
|
return this._addTileFeatures(
|
|
339
|
-
o.range((e - s) / i,
|
|
344
|
+
o.range((e - s) / i, h, (e + 1 + s) / i, l),
|
|
340
345
|
o.data,
|
|
341
346
|
e,
|
|
342
347
|
n,
|
|
343
348
|
i,
|
|
344
349
|
u
|
|
345
350
|
), e === 0 && this._addTileFeatures(
|
|
346
|
-
o.range(1 - s / i,
|
|
351
|
+
o.range(1 - s / i, h, 1, l),
|
|
347
352
|
o.data,
|
|
348
353
|
i,
|
|
349
354
|
n,
|
|
350
355
|
i,
|
|
351
356
|
u
|
|
352
357
|
), e === i - 1 && this._addTileFeatures(
|
|
353
|
-
o.range(0,
|
|
358
|
+
o.range(0, h, s / i, l),
|
|
354
359
|
o.data,
|
|
355
360
|
-1,
|
|
356
361
|
n,
|
|
@@ -376,21 +381,21 @@ class Pt {
|
|
|
376
381
|
return i;
|
|
377
382
|
}
|
|
378
383
|
_createTree(t) {
|
|
379
|
-
const e = new
|
|
384
|
+
const e = new G(t.length / this.stride | 0, this.options.nodeSize, Float32Array);
|
|
380
385
|
for (let n = 0; n < t.length; n += this.stride) e.add(t[n], t[n + 1]);
|
|
381
386
|
return e.finish(), e.data = t, e;
|
|
382
387
|
}
|
|
383
388
|
_addTileFeatures(t, e, n, o, i, a) {
|
|
384
389
|
for (const c of t) {
|
|
385
|
-
const s = c * this.stride,
|
|
386
|
-
let
|
|
387
|
-
if (
|
|
388
|
-
|
|
390
|
+
const s = c * this.stride, h = e[s + P] > 1;
|
|
391
|
+
let l, u, f;
|
|
392
|
+
if (h)
|
|
393
|
+
l = ot(e, s, this.clusterProps), u = e[s], f = e[s + 1];
|
|
389
394
|
else {
|
|
390
|
-
const
|
|
391
|
-
|
|
392
|
-
const [
|
|
393
|
-
u =
|
|
395
|
+
const y = this.points[e[s + A]];
|
|
396
|
+
l = y.properties;
|
|
397
|
+
const [p, m] = y.geometry.coordinates;
|
|
398
|
+
u = I(p), f = U(m);
|
|
394
399
|
}
|
|
395
400
|
const d = {
|
|
396
401
|
type: 1,
|
|
@@ -398,50 +403,50 @@ class Pt {
|
|
|
398
403
|
Math.round(this.options.extent * (u * i - n)),
|
|
399
404
|
Math.round(this.options.extent * (f * i - o))
|
|
400
405
|
]],
|
|
401
|
-
tags:
|
|
406
|
+
tags: l
|
|
402
407
|
};
|
|
403
408
|
let g;
|
|
404
|
-
|
|
409
|
+
h || this.options.generateId ? g = e[s + A] : g = this.points[e[s + A]].id, g !== void 0 && (d.id = g), a.features.push(d);
|
|
405
410
|
}
|
|
406
411
|
}
|
|
407
412
|
_limitZoom(t) {
|
|
408
413
|
return Math.max(this.options.minZoom, Math.min(Math.floor(+t), this.options.maxZoom + 1));
|
|
409
414
|
}
|
|
410
415
|
_cluster(t, e) {
|
|
411
|
-
const { radius: n, extent: o, reduce: i, minPoints: a } = this.options, c = n / (o * Math.pow(2, e)), s = t.data,
|
|
412
|
-
for (let u = 0; u < s.length; u +=
|
|
413
|
-
if (s[u +
|
|
414
|
-
s[u +
|
|
415
|
-
const f = s[u], d = s[u + 1], g = t.within(s[u], s[u + 1], c),
|
|
416
|
-
let
|
|
417
|
-
for (const
|
|
418
|
-
const M =
|
|
419
|
-
s[M +
|
|
416
|
+
const { radius: n, extent: o, reduce: i, minPoints: a } = this.options, c = n / (o * Math.pow(2, e)), s = t.data, h = [], l = this.stride;
|
|
417
|
+
for (let u = 0; u < s.length; u += l) {
|
|
418
|
+
if (s[u + x] <= e) continue;
|
|
419
|
+
s[u + x] = e;
|
|
420
|
+
const f = s[u], d = s[u + 1], g = t.within(s[u], s[u + 1], c), y = s[u + P];
|
|
421
|
+
let p = y;
|
|
422
|
+
for (const m of g) {
|
|
423
|
+
const M = m * l;
|
|
424
|
+
s[M + x] > e && (p += s[M + P]);
|
|
420
425
|
}
|
|
421
|
-
if (
|
|
422
|
-
let
|
|
423
|
-
const
|
|
424
|
-
for (const
|
|
425
|
-
const E =
|
|
426
|
-
if (s[E +
|
|
427
|
-
s[E +
|
|
428
|
-
const
|
|
429
|
-
|
|
426
|
+
if (p > y && p >= a) {
|
|
427
|
+
let m = f * y, M = d * y, _, $ = -1;
|
|
428
|
+
const Z = ((u / l | 0) << 5) + (e + 1) + this.points.length;
|
|
429
|
+
for (const it of g) {
|
|
430
|
+
const E = it * l;
|
|
431
|
+
if (s[E + x] <= e) continue;
|
|
432
|
+
s[E + x] = e;
|
|
433
|
+
const k = s[E + P];
|
|
434
|
+
m += s[E] * k, M += s[E + 1] * k, s[E + N] = Z, i && (_ || (_ = this._map(s, u, !0), $ = this.clusterProps.length, this.clusterProps.push(_)), i(_, this._map(s, E)));
|
|
430
435
|
}
|
|
431
|
-
s[u +
|
|
436
|
+
s[u + N] = Z, h.push(m / p, M / p, 1 / 0, Z, -1, p), i && h.push($);
|
|
432
437
|
} else {
|
|
433
|
-
for (let
|
|
434
|
-
if (
|
|
435
|
-
for (const
|
|
436
|
-
const M =
|
|
437
|
-
if (!(s[M +
|
|
438
|
-
s[M +
|
|
439
|
-
for (let _ = 0; _ <
|
|
438
|
+
for (let m = 0; m < l; m++) h.push(s[u + m]);
|
|
439
|
+
if (p > 1)
|
|
440
|
+
for (const m of g) {
|
|
441
|
+
const M = m * l;
|
|
442
|
+
if (!(s[M + x] <= e)) {
|
|
443
|
+
s[M + x] = e;
|
|
444
|
+
for (let _ = 0; _ < l; _++) h.push(s[M + _]);
|
|
440
445
|
}
|
|
441
446
|
}
|
|
442
447
|
}
|
|
443
448
|
}
|
|
444
|
-
return
|
|
449
|
+
return h;
|
|
445
450
|
}
|
|
446
451
|
// get index of the point from which the cluster originated
|
|
447
452
|
_getOriginId(t) {
|
|
@@ -452,50 +457,50 @@ class Pt {
|
|
|
452
457
|
return (t - this.points.length) % 32;
|
|
453
458
|
}
|
|
454
459
|
_map(t, e, n) {
|
|
455
|
-
if (t[e +
|
|
456
|
-
const a = this.clusterProps[t[e +
|
|
460
|
+
if (t[e + P] > 1) {
|
|
461
|
+
const a = this.clusterProps[t[e + st]];
|
|
457
462
|
return n ? Object.assign({}, a) : a;
|
|
458
463
|
}
|
|
459
|
-
const o = this.points[t[e +
|
|
464
|
+
const o = this.points[t[e + A]].properties, i = this.options.map(o);
|
|
460
465
|
return n && i === o ? Object.assign({}, i) : i;
|
|
461
466
|
}
|
|
462
467
|
}
|
|
463
468
|
function Q(r, t, e) {
|
|
464
469
|
return {
|
|
465
470
|
type: "Feature",
|
|
466
|
-
id: r[t +
|
|
467
|
-
properties:
|
|
471
|
+
id: r[t + A],
|
|
472
|
+
properties: ot(r, t, e),
|
|
468
473
|
geometry: {
|
|
469
474
|
type: "Point",
|
|
470
|
-
coordinates: [
|
|
475
|
+
coordinates: [St(r[t]), Tt(r[t + 1])]
|
|
471
476
|
}
|
|
472
477
|
};
|
|
473
478
|
}
|
|
474
|
-
function
|
|
475
|
-
const n = r[t +
|
|
479
|
+
function ot(r, t, e) {
|
|
480
|
+
const n = r[t + P], o = n >= 1e4 ? `${Math.round(n / 1e3)}k` : n >= 1e3 ? `${Math.round(n / 100) / 10}k` : n, i = r[t + st], a = i === -1 ? {} : Object.assign({}, e[i]);
|
|
476
481
|
return Object.assign(a, {
|
|
477
482
|
cluster: !0,
|
|
478
|
-
cluster_id: r[t +
|
|
483
|
+
cluster_id: r[t + A],
|
|
479
484
|
point_count: n,
|
|
480
485
|
point_count_abbreviated: o
|
|
481
486
|
});
|
|
482
487
|
}
|
|
483
|
-
function
|
|
488
|
+
function I(r) {
|
|
484
489
|
return r / 360 + 0.5;
|
|
485
490
|
}
|
|
486
|
-
function
|
|
491
|
+
function U(r) {
|
|
487
492
|
const t = Math.sin(r * Math.PI / 180), e = 0.5 - 0.25 * Math.log((1 + t) / (1 - t)) / Math.PI;
|
|
488
493
|
return e < 0 ? 0 : e > 1 ? 1 : e;
|
|
489
494
|
}
|
|
490
|
-
function
|
|
495
|
+
function St(r) {
|
|
491
496
|
return (r - 0.5) * 360;
|
|
492
497
|
}
|
|
493
|
-
function
|
|
498
|
+
function Tt(r) {
|
|
494
499
|
const t = (180 - r * 360) * Math.PI / 180;
|
|
495
500
|
return 360 * Math.atan(Math.exp(t)) / Math.PI - 90;
|
|
496
501
|
}
|
|
497
|
-
var
|
|
498
|
-
function
|
|
502
|
+
var X = Object.prototype.hasOwnProperty;
|
|
503
|
+
function tt(r, t, e) {
|
|
499
504
|
for (e of r.keys())
|
|
500
505
|
if (v(e, t)) return e;
|
|
501
506
|
}
|
|
@@ -514,14 +519,14 @@ function v(r, t) {
|
|
|
514
519
|
if (r.size !== t.size)
|
|
515
520
|
return !1;
|
|
516
521
|
for (n of r)
|
|
517
|
-
if (o = n, o && typeof o == "object" && (o =
|
|
522
|
+
if (o = n, o && typeof o == "object" && (o = tt(t, o), !o) || !t.has(o)) return !1;
|
|
518
523
|
return !0;
|
|
519
524
|
}
|
|
520
525
|
if (e === Map) {
|
|
521
526
|
if (r.size !== t.size)
|
|
522
527
|
return !1;
|
|
523
528
|
for (n of r)
|
|
524
|
-
if (o = n[0], o && typeof o == "object" && (o =
|
|
529
|
+
if (o = n[0], o && typeof o == "object" && (o = tt(t, o), !o) || !v(n[1], t.get(o)))
|
|
525
530
|
return !1;
|
|
526
531
|
return !0;
|
|
527
532
|
}
|
|
@@ -540,99 +545,119 @@ function v(r, t) {
|
|
|
540
545
|
if (!e || typeof r == "object") {
|
|
541
546
|
n = 0;
|
|
542
547
|
for (e in r)
|
|
543
|
-
if (
|
|
548
|
+
if (X.call(r, e) && ++n && !X.call(t, e) || !(e in t) || !v(r[e], t[e])) return !1;
|
|
544
549
|
return Object.keys(t).length === n;
|
|
545
550
|
}
|
|
546
551
|
}
|
|
547
552
|
return r !== r && t !== t;
|
|
548
553
|
}
|
|
549
554
|
function bt(r) {
|
|
550
|
-
var t =
|
|
551
|
-
return v(r, t.current) || (t.current = r, e.current += 1),
|
|
555
|
+
var t = D.useRef(r), e = D.useRef(0);
|
|
556
|
+
return v(r, t.current) || (t.current = r, e.current += 1), D.useMemo(function() {
|
|
552
557
|
return t.current;
|
|
553
558
|
}, [e.current]);
|
|
554
559
|
}
|
|
555
|
-
function
|
|
556
|
-
return
|
|
560
|
+
function Ct(r, t) {
|
|
561
|
+
return D.useEffect(r, bt(t));
|
|
557
562
|
}
|
|
558
|
-
var
|
|
559
|
-
var e = t.points, n = t.bounds, o = t.zoom, i = t.options, a = t.disableRefresh, c =
|
|
560
|
-
return
|
|
561
|
-
a !== !0 && ((!c.current || !v(s.current, e) || !v(c.current.options, i)) && (c.current = new
|
|
563
|
+
var Lt = function(t) {
|
|
564
|
+
var e = t.points, n = t.bounds, o = t.zoom, i = t.options, a = t.disableRefresh, c = z(), s = z(), h = L([]), l = h[0], u = h[1], f = Math.round(o);
|
|
565
|
+
return Ct(function() {
|
|
566
|
+
a !== !0 && ((!c.current || !v(s.current, e) || !v(c.current.options, i)) && (c.current = new Ot(i), c.current.load(e)), n && u(c.current.getClusters(n, f)), s.current = e);
|
|
562
567
|
}, [e, n, f, i, a]), {
|
|
563
|
-
clusters:
|
|
568
|
+
clusters: l,
|
|
564
569
|
supercluster: c.current
|
|
565
570
|
};
|
|
566
571
|
};
|
|
567
|
-
const
|
|
568
|
-
function
|
|
569
|
-
const { mapProvider: n, activeMarker: o, center: i,
|
|
570
|
-
|
|
571
|
-
let
|
|
572
|
-
r.length > 0 && (
|
|
573
|
-
r.map((m) => [m.
|
|
574
|
-
)),
|
|
572
|
+
const Rt = w(() => import("./index-C2d04GGR.js")), It = w(() => import("./index-bLVZAISz.js")), Ut = w(() => import("./index-DnjO_exB.js"));
|
|
573
|
+
function Dt({ markers: r, onClick: t, ...e }) {
|
|
574
|
+
const { mapProvider: n, activeMarker: o, center: i, zoom: a, setMarkerPoints: c, setClusterPoints: s } = R();
|
|
575
|
+
H(() => {
|
|
576
|
+
let p = [[i.longitude, i.latitude]];
|
|
577
|
+
r.length > 0 && (p = p.concat(
|
|
578
|
+
r.map((m) => [m.longitude, m.latitude])
|
|
579
|
+
)), c(p);
|
|
575
580
|
}, [r, i]);
|
|
576
|
-
const
|
|
581
|
+
const h = S(
|
|
577
582
|
() => ({
|
|
578
|
-
points: r.map((
|
|
579
|
-
bounds
|
|
580
|
-
|
|
583
|
+
points: r.map((p) => xt([p.longitude, p.latitude], p)),
|
|
584
|
+
// Using world bounds to avoid issues with markers near the edges of the map
|
|
585
|
+
bounds: ft,
|
|
586
|
+
zoom: a,
|
|
581
587
|
options: {
|
|
582
|
-
radius: n.name === "google" &&
|
|
583
|
-
minZoom:
|
|
584
|
-
maxZoom:
|
|
588
|
+
radius: n.name === "google" && a > J ? lt : ht,
|
|
589
|
+
minZoom: J,
|
|
590
|
+
maxZoom: pt
|
|
585
591
|
}
|
|
586
592
|
}),
|
|
587
|
-
[r, n, a
|
|
588
|
-
), { clusters:
|
|
589
|
-
|
|
593
|
+
[r, n, a]
|
|
594
|
+
), { clusters: l, supercluster: u } = Lt(h), f = z("");
|
|
595
|
+
H(() => {
|
|
596
|
+
const p = JSON.stringify(
|
|
597
|
+
l.map((m) => ({
|
|
598
|
+
coords: m.geometry.coordinates,
|
|
599
|
+
props: m.properties
|
|
600
|
+
}))
|
|
601
|
+
);
|
|
602
|
+
p !== f.current && (s(l), f.current = p);
|
|
603
|
+
}, [l, s]);
|
|
604
|
+
const d = (p) => {
|
|
605
|
+
if (!("properties" in p))
|
|
590
606
|
throw new Error("Cluster does not have properties");
|
|
591
|
-
if (
|
|
607
|
+
if (p.properties?.cluster && typeof p.properties?.cluster_id == "number") {
|
|
592
608
|
t?.({
|
|
593
|
-
id: `${
|
|
594
|
-
latitude:
|
|
595
|
-
longitude:
|
|
596
|
-
markers: u?.getLeaves(
|
|
609
|
+
id: `${p.properties.cluster_id}`,
|
|
610
|
+
latitude: p.geometry.coordinates[1],
|
|
611
|
+
longitude: p.geometry.coordinates[0],
|
|
612
|
+
markers: u?.getLeaves(p.properties.cluster_id)?.map((m) => m.properties) ?? []
|
|
597
613
|
});
|
|
598
614
|
return;
|
|
599
615
|
}
|
|
600
616
|
t?.({
|
|
601
|
-
id:
|
|
602
|
-
latitude:
|
|
603
|
-
longitude:
|
|
604
|
-
markers: [
|
|
617
|
+
id: p.properties.id,
|
|
618
|
+
latitude: p.properties.latitude,
|
|
619
|
+
longitude: p.properties.longitude,
|
|
620
|
+
markers: [p.properties]
|
|
605
621
|
});
|
|
606
|
-
},
|
|
622
|
+
}, g = (p) => {
|
|
623
|
+
if (!u || !o) return !1;
|
|
624
|
+
if (o.id === `${p}`)
|
|
625
|
+
return !0;
|
|
626
|
+
try {
|
|
627
|
+
return u.getLeaves(p)?.find((m) => m.properties.id === o.id) !== void 0;
|
|
628
|
+
} catch {
|
|
629
|
+
return !1;
|
|
630
|
+
}
|
|
631
|
+
}, y = S(() => {
|
|
607
632
|
switch (n?.name) {
|
|
608
633
|
case "maptiler":
|
|
609
|
-
return
|
|
634
|
+
return Rt;
|
|
610
635
|
case "google":
|
|
611
|
-
return Lt;
|
|
612
|
-
case "mapbox":
|
|
613
636
|
return It;
|
|
637
|
+
case "mapbox":
|
|
638
|
+
return Ut;
|
|
614
639
|
default:
|
|
615
640
|
return null;
|
|
616
641
|
}
|
|
617
642
|
}, [n]);
|
|
618
|
-
return
|
|
619
|
-
|
|
643
|
+
return y ? /* @__PURE__ */ O(
|
|
644
|
+
y,
|
|
620
645
|
{
|
|
621
|
-
clusters:
|
|
622
|
-
onClick:
|
|
623
|
-
doesSuperclusterContainActiveMarker:
|
|
646
|
+
clusters: l,
|
|
647
|
+
onClick: d,
|
|
648
|
+
doesSuperclusterContainActiveMarker: g,
|
|
624
649
|
...e
|
|
625
650
|
}
|
|
626
651
|
) : null;
|
|
627
652
|
}
|
|
628
|
-
const Zt =
|
|
629
|
-
function
|
|
630
|
-
const { mapProvider: n } =
|
|
653
|
+
const Zt = w(() => import("./index-BSGAziKb.js")), Ft = w(() => import("./index-BxSLdO8P.js")), Bt = w(() => import("./index-BVm_ZeWH.js"));
|
|
654
|
+
function Nt({ children: r, anchor: t = "bottom", ...e }) {
|
|
655
|
+
const { mapProvider: n } = R(), o = S(() => {
|
|
631
656
|
switch (n?.name) {
|
|
632
657
|
case "maptiler":
|
|
633
658
|
return Zt;
|
|
634
659
|
case "google":
|
|
635
|
-
return
|
|
660
|
+
return Ft;
|
|
636
661
|
case "mapbox":
|
|
637
662
|
return Bt;
|
|
638
663
|
default:
|
|
@@ -641,46 +666,58 @@ function Ft({ children: r, anchor: t = "bottom", ...e }) {
|
|
|
641
666
|
}, [n]);
|
|
642
667
|
return o ? /* @__PURE__ */ O(o, { ...e, anchor: t, children: r }) : null;
|
|
643
668
|
}
|
|
644
|
-
const zt =
|
|
645
|
-
function
|
|
646
|
-
const { mapProvider: t } =
|
|
669
|
+
const zt = w(() => import("./index-GGtrKiJn.js")), jt = w(() => import("./index-CEDpofgZ.js")), Gt = w(() => import("./index-CIE9YlvM.js"));
|
|
670
|
+
function $t(r) {
|
|
671
|
+
const { mapProvider: t } = R(), e = S(() => {
|
|
647
672
|
switch (t?.name) {
|
|
648
673
|
case "maptiler":
|
|
649
674
|
return zt;
|
|
650
675
|
case "google":
|
|
651
|
-
return
|
|
676
|
+
return jt;
|
|
652
677
|
case "mapbox":
|
|
653
|
-
return
|
|
678
|
+
return Gt;
|
|
654
679
|
default:
|
|
655
680
|
return null;
|
|
656
681
|
}
|
|
657
682
|
}, [t]);
|
|
658
683
|
return e ? /* @__PURE__ */ O(e, { ...r }) : null;
|
|
659
684
|
}
|
|
660
|
-
function
|
|
661
|
-
const [t, e] = L([]), [n, o] = L(
|
|
685
|
+
function kt(r) {
|
|
686
|
+
const [t, e] = L([]), [n, o] = L([]), [i, a] = L(r.zoom || C.zoom);
|
|
662
687
|
return /* @__PURE__ */ O(
|
|
663
|
-
|
|
688
|
+
et.Provider,
|
|
664
689
|
{
|
|
665
|
-
value: {
|
|
690
|
+
value: {
|
|
691
|
+
...r,
|
|
692
|
+
mapPadding: r.mapPadding || ut,
|
|
693
|
+
markerPoints: t,
|
|
694
|
+
setMarkerPoints: e,
|
|
695
|
+
clusterPoints: n,
|
|
696
|
+
setClusterPoints: o,
|
|
697
|
+
zoom: i,
|
|
698
|
+
setZoom: a
|
|
699
|
+
},
|
|
666
700
|
children: r.children
|
|
667
701
|
}
|
|
668
702
|
);
|
|
669
703
|
}
|
|
670
|
-
const
|
|
704
|
+
const Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
671
705
|
__proto__: null,
|
|
672
|
-
BaseMap:
|
|
673
|
-
CenterPin:
|
|
674
|
-
Layers:
|
|
675
|
-
Markers:
|
|
676
|
-
Popup:
|
|
677
|
-
Root:
|
|
706
|
+
BaseMap: Mt,
|
|
707
|
+
CenterPin: Et,
|
|
708
|
+
Layers: $t,
|
|
709
|
+
Markers: Dt,
|
|
710
|
+
Popup: Nt,
|
|
711
|
+
Root: kt
|
|
678
712
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
679
713
|
export {
|
|
680
|
-
|
|
714
|
+
C as D,
|
|
715
|
+
Jt as M,
|
|
716
|
+
Wt as P,
|
|
717
|
+
ft as W,
|
|
681
718
|
V as a,
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
719
|
+
ut as b,
|
|
720
|
+
Kt as i,
|
|
721
|
+
Yt as m,
|
|
722
|
+
R as u
|
|
686
723
|
};
|