vue3-google-map 0.17.1 → 0.19.0
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/README.md +40 -2
- package/dist/index.cjs.js +5 -5
- package/dist/index.es.js +310 -291
- package/dist/index.umd.js +5 -5
- package/dist/types/components/CustomControl.vue.d.ts +0 -1
- package/dist/types/components/GoogleMap.vue.d.ts +11 -0
- package/dist/types/components/InfoWindow.vue.d.ts +9 -2
- package/package.json +4 -2
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-f29e129b]{width:100%;height:100%}.custom-control-wrapper[data-v-d099a3a6]{display:none}.mapdiv .custom-control-wrapper[data-v-d099a3a6]{display:inline-block}.info-window-wrapper[data-v-cbe1707b]{display:none}.mapdiv .info-window-wrapper[data-v-cbe1707b]{display:inline-block}.custom-marker-wrapper[data-v-2d2d343a]{display:none}.mapdiv .custom-marker-wrapper[data-v-2d2d343a]{display:inline-block}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
2
|
var qe = Object.defineProperty;
|
|
3
3
|
var Be = (n, e, t) => e in n ? qe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
4
4
|
var se = (n, e, t) => (Be(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
5
|
-
import { defineComponent as
|
|
6
|
-
const
|
|
5
|
+
import { defineComponent as P, ref as y, provide as G, watch as O, onMounted as Me, onBeforeUnmount as B, markRaw as I, toRef as Z, openBlock as Y, createElementBlock as X, createElementVNode as ae, renderSlot as Q, normalizeProps as Ze, guardReactiveProps as Ne, inject as C, computed as J, Comment as Ee, mergeProps as Pe, createCommentVNode as Oe } from "vue";
|
|
6
|
+
const N = Symbol("map"), U = Symbol("api"), xe = Symbol("marker"), Le = Symbol("markerCluster"), ee = Symbol("CustomMarker"), Se = Symbol("mapTilesLoaded"), q = [
|
|
7
7
|
"click",
|
|
8
8
|
"dblclick",
|
|
9
9
|
"drag",
|
|
@@ -30,7 +30,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
30
30
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
31
31
|
PERFORMANCE OF THIS SOFTWARE.
|
|
32
32
|
***************************************************************************** */
|
|
33
|
-
function
|
|
33
|
+
function Ue(n, e, t, s) {
|
|
34
34
|
function r(o) {
|
|
35
35
|
return o instanceof t ? o : new t(function(a) {
|
|
36
36
|
a(o);
|
|
@@ -39,25 +39,25 @@ function Fe(n, e, t, s) {
|
|
|
39
39
|
return new (t || (t = Promise))(function(o, a) {
|
|
40
40
|
function l(u) {
|
|
41
41
|
try {
|
|
42
|
-
|
|
42
|
+
d(s.next(u));
|
|
43
43
|
} catch (c) {
|
|
44
44
|
a(c);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
function i(u) {
|
|
48
48
|
try {
|
|
49
|
-
|
|
49
|
+
d(s.throw(u));
|
|
50
50
|
} catch (c) {
|
|
51
51
|
a(c);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function d(u) {
|
|
55
55
|
u.done ? o(u.value) : r(u.value).then(l, i);
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
d((s = s.apply(n, e || [])).next());
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
var
|
|
60
|
+
var De = function n(e, t) {
|
|
61
61
|
if (e === t)
|
|
62
62
|
return !0;
|
|
63
63
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
@@ -92,12 +92,12 @@ var ze = function n(e, t) {
|
|
|
92
92
|
}
|
|
93
93
|
return e !== e && t !== t;
|
|
94
94
|
};
|
|
95
|
-
const
|
|
95
|
+
const de = "__googleMapsScriptId";
|
|
96
96
|
var R;
|
|
97
97
|
(function(n) {
|
|
98
98
|
n[n.INITIALIZED = 0] = "INITIALIZED", n[n.LOADING = 1] = "LOADING", n[n.SUCCESS = 2] = "SUCCESS", n[n.FAILURE = 3] = "FAILURE";
|
|
99
99
|
})(R || (R = {}));
|
|
100
|
-
class
|
|
100
|
+
class T {
|
|
101
101
|
/**
|
|
102
102
|
* Creates an instance of Loader using [[LoaderOptions]]. No defaults are set
|
|
103
103
|
* using this library, instead the defaults are set by the Google Maps
|
|
@@ -107,13 +107,13 @@ class A {
|
|
|
107
107
|
* const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});
|
|
108
108
|
* ```
|
|
109
109
|
*/
|
|
110
|
-
constructor({ apiKey: e, authReferrerPolicy: t, channel: s, client: r, id: o =
|
|
111
|
-
if (this.callbacks = [], this.done = !1, this.loading = !1, this.errors = [], this.apiKey = e, this.authReferrerPolicy = t, this.channel = s, this.client = r, this.id = o ||
|
|
112
|
-
if (!
|
|
113
|
-
throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(
|
|
114
|
-
return
|
|
110
|
+
constructor({ apiKey: e, authReferrerPolicy: t, channel: s, client: r, id: o = de, language: a, libraries: l = [], mapIds: i, nonce: d, region: u, retries: c = 3, url: h = "https://maps.googleapis.com/maps/api/js", version: p }) {
|
|
111
|
+
if (this.callbacks = [], this.done = !1, this.loading = !1, this.errors = [], this.apiKey = e, this.authReferrerPolicy = t, this.channel = s, this.client = r, this.id = o || de, this.language = a, this.libraries = l, this.mapIds = i, this.nonce = d, this.region = u, this.retries = c, this.url = h, this.version = p, T.instance) {
|
|
112
|
+
if (!De(this.options, T.instance.options))
|
|
113
|
+
throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(T.instance.options)}`);
|
|
114
|
+
return T.instance;
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
T.instance = this;
|
|
117
117
|
}
|
|
118
118
|
get options() {
|
|
119
119
|
return {
|
|
@@ -205,19 +205,19 @@ class A {
|
|
|
205
205
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
206
206
|
(o) => !s[o] && delete s[o]
|
|
207
207
|
), !((t = (e = window == null ? void 0 : window.google) === null || e === void 0 ? void 0 : e.maps) === null || t === void 0) && t.importLibrary || ((o) => {
|
|
208
|
-
let a, l, i,
|
|
209
|
-
|
|
210
|
-
const
|
|
208
|
+
let a, l, i, d = "The Google Maps JavaScript API", u = "google", c = "importLibrary", h = "__ib__", p = document, m = window;
|
|
209
|
+
m = m[u] || (m[u] = {});
|
|
210
|
+
const f = m.maps || (m.maps = {}), g = /* @__PURE__ */ new Set(), v = new URLSearchParams(), w = () => (
|
|
211
211
|
// @ts-ignore
|
|
212
|
-
a || (a = new Promise((_,
|
|
213
|
-
var
|
|
212
|
+
a || (a = new Promise((_, E) => Ue(this, void 0, void 0, function* () {
|
|
213
|
+
var b;
|
|
214
214
|
yield l = p.createElement("script"), l.id = this.id, v.set("libraries", [...g] + "");
|
|
215
215
|
for (i in o)
|
|
216
|
-
v.set(i.replace(/[A-Z]/g, (
|
|
217
|
-
v.set("callback", u + ".maps." +
|
|
216
|
+
v.set(i.replace(/[A-Z]/g, (x) => "_" + x[0].toLowerCase()), o[i]);
|
|
217
|
+
v.set("callback", u + ".maps." + h), l.src = this.url + "?" + v, f[h] = _, l.onerror = () => a = E(Error(d + " could not load.")), l.nonce = this.nonce || ((b = p.querySelector("script[nonce]")) === null || b === void 0 ? void 0 : b.nonce) || "", p.head.append(l);
|
|
218
218
|
})))
|
|
219
219
|
);
|
|
220
|
-
|
|
220
|
+
f[c] ? console.warn(d + " only loads once. Ignoring:", o) : f[c] = (_, ...E) => g.add(_) && w().then(() => f[c](_, ...E));
|
|
221
221
|
})(s);
|
|
222
222
|
const r = this.libraries.map((o) => this.importLibrary(o));
|
|
223
223
|
r.length || r.push(this.importLibrary("core")), Promise.all(r).then(() => this.callback(), (o) => {
|
|
@@ -260,7 +260,7 @@ class A {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function Fe(n) {
|
|
264
264
|
return class extends n.OverlayView {
|
|
265
265
|
constructor(s) {
|
|
266
266
|
super();
|
|
@@ -332,28 +332,31 @@ function Ve(n) {
|
|
|
332
332
|
}
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
|
-
let
|
|
335
|
+
let he;
|
|
336
336
|
const pe = [
|
|
337
337
|
"bounds_changed",
|
|
338
338
|
"center_changed",
|
|
339
339
|
"click",
|
|
340
|
+
"contextmenu",
|
|
340
341
|
"dblclick",
|
|
341
342
|
"drag",
|
|
342
343
|
"dragend",
|
|
343
344
|
"dragstart",
|
|
344
345
|
"heading_changed",
|
|
345
346
|
"idle",
|
|
347
|
+
"isfractionalzoomenabled_changed",
|
|
348
|
+
"mapcapabilities_changed",
|
|
346
349
|
"maptypeid_changed",
|
|
347
350
|
"mousemove",
|
|
348
351
|
"mouseout",
|
|
349
352
|
"mouseover",
|
|
350
353
|
"projection_changed",
|
|
351
|
-
"
|
|
354
|
+
"renderingtype_changed",
|
|
352
355
|
"rightclick",
|
|
353
356
|
"tilesloaded",
|
|
354
357
|
"tilt_changed",
|
|
355
358
|
"zoom_changed"
|
|
356
|
-
],
|
|
359
|
+
], Ve = P({
|
|
357
360
|
props: {
|
|
358
361
|
apiPromise: {
|
|
359
362
|
type: Promise
|
|
@@ -435,6 +438,11 @@ const pe = [
|
|
|
435
438
|
type: Number,
|
|
436
439
|
required: !1
|
|
437
440
|
},
|
|
441
|
+
isFractionalZoomEnabled: {
|
|
442
|
+
type: Boolean,
|
|
443
|
+
required: !1,
|
|
444
|
+
default: void 0
|
|
445
|
+
},
|
|
438
446
|
keyboardShortcuts: {
|
|
439
447
|
type: Boolean,
|
|
440
448
|
required: !1,
|
|
@@ -544,16 +552,16 @@ const pe = [
|
|
|
544
552
|
emits: pe,
|
|
545
553
|
setup(n, { emit: e }) {
|
|
546
554
|
const t = y(), s = y(!1), r = y(), o = y(), a = y(!1);
|
|
547
|
-
G(
|
|
555
|
+
G(N, r), G(U, o), G(Se, a);
|
|
548
556
|
const l = () => {
|
|
549
557
|
const c = { ...n };
|
|
550
|
-
Object.keys(c).forEach((
|
|
551
|
-
c[
|
|
558
|
+
Object.keys(c).forEach((f) => {
|
|
559
|
+
c[f] === void 0 && delete c[f];
|
|
552
560
|
});
|
|
553
|
-
const p = (
|
|
561
|
+
const p = (f) => {
|
|
554
562
|
var g;
|
|
555
|
-
return
|
|
556
|
-
},
|
|
563
|
+
return f ? { position: (g = o.value) == null ? void 0 : g.ControlPosition[f] } : {};
|
|
564
|
+
}, m = {
|
|
557
565
|
scaleControlOptions: n.scaleControlStyle ? { style: n.scaleControlStyle } : {},
|
|
558
566
|
panControlOptions: p(n.panControlPosition),
|
|
559
567
|
zoomControlOptions: p(n.zoomControlPosition),
|
|
@@ -562,46 +570,46 @@ const pe = [
|
|
|
562
570
|
fullscreenControlOptions: p(n.fullscreenControlPosition),
|
|
563
571
|
disableDefaultUI: n.disableDefaultUi
|
|
564
572
|
};
|
|
565
|
-
return { ...c, ...
|
|
573
|
+
return { ...c, ...m };
|
|
566
574
|
}, i = O(
|
|
567
575
|
[o, r],
|
|
568
|
-
([c,
|
|
569
|
-
const p = c,
|
|
570
|
-
p &&
|
|
576
|
+
([c, h]) => {
|
|
577
|
+
const p = c, m = h;
|
|
578
|
+
p && m && (p.event.addListenerOnce(m, "tilesloaded", () => {
|
|
571
579
|
a.value = !0;
|
|
572
580
|
}), setTimeout(i, 0));
|
|
573
581
|
},
|
|
574
582
|
{ immediate: !0 }
|
|
575
|
-
),
|
|
583
|
+
), d = () => {
|
|
576
584
|
try {
|
|
577
|
-
const { apiKey: c, region:
|
|
578
|
-
|
|
585
|
+
const { apiKey: c, region: h, version: p, language: m, libraries: f } = n;
|
|
586
|
+
he = new T({ apiKey: c, region: h, version: p, language: m, libraries: f });
|
|
579
587
|
} catch (c) {
|
|
580
588
|
console.error(c);
|
|
581
589
|
}
|
|
582
590
|
}, u = (c) => {
|
|
583
|
-
o.value =
|
|
584
|
-
const
|
|
585
|
-
o.value[ee] =
|
|
586
|
-
var
|
|
587
|
-
(
|
|
591
|
+
o.value = I(c.maps), r.value = I(new c.maps.Map(t.value, l()));
|
|
592
|
+
const h = Fe(o.value);
|
|
593
|
+
o.value[ee] = h, pe.forEach((m) => {
|
|
594
|
+
var f;
|
|
595
|
+
(f = r.value) == null || f.addListener(m, (g) => e(m, g));
|
|
588
596
|
}), s.value = !0;
|
|
589
597
|
const p = Object.keys(n).filter(
|
|
590
|
-
(
|
|
591
|
-
).map((
|
|
598
|
+
(m) => !["apiPromise", "apiKey", "version", "libraries", "region", "language", "center", "zoom"].includes(m)
|
|
599
|
+
).map((m) => Z(n, m));
|
|
592
600
|
O(
|
|
593
601
|
[() => n.center, () => n.zoom, ...p],
|
|
594
|
-
([
|
|
595
|
-
var
|
|
596
|
-
const { center: w, zoom: _, ...
|
|
597
|
-
(
|
|
598
|
-
const
|
|
599
|
-
|
|
602
|
+
([m, f], [g, v]) => {
|
|
603
|
+
var x, M, F;
|
|
604
|
+
const { center: w, zoom: _, ...E } = l();
|
|
605
|
+
(x = r.value) == null || x.setOptions(E), f !== void 0 && f !== v && ((M = r.value) == null || M.setZoom(f));
|
|
606
|
+
const b = !g || m.lng !== g.lng || m.lat !== g.lat;
|
|
607
|
+
m && b && ((F = r.value) == null || F.panTo(m));
|
|
600
608
|
}
|
|
601
609
|
);
|
|
602
610
|
};
|
|
603
611
|
return Me(() => {
|
|
604
|
-
n.apiPromise && n.apiPromise instanceof Promise ? n.apiPromise.then(u) : (
|
|
612
|
+
n.apiPromise && n.apiPromise instanceof Promise ? n.apiPromise.then(u) : (d(), he.load().then(u));
|
|
605
613
|
}), B(() => {
|
|
606
614
|
var c;
|
|
607
615
|
a.value = !1, r.value && ((c = o.value) == null || c.event.clearInstanceListeners(r.value));
|
|
@@ -613,21 +621,21 @@ const te = (n, e) => {
|
|
|
613
621
|
for (const [s, r] of e)
|
|
614
622
|
t[s] = r;
|
|
615
623
|
return t;
|
|
616
|
-
},
|
|
624
|
+
}, ze = {
|
|
617
625
|
ref: "mapRef",
|
|
618
626
|
class: "mapdiv"
|
|
619
627
|
};
|
|
620
|
-
function
|
|
628
|
+
function Ge(n, e, t, s, r, o) {
|
|
621
629
|
return Y(), X("div", null, [
|
|
622
|
-
ae("div",
|
|
623
|
-
Q(n.$slots, "default", Ne(
|
|
630
|
+
ae("div", ze, null, 512),
|
|
631
|
+
Q(n.$slots, "default", Ze(Ne({ ready: n.ready, map: n.map, api: n.api, mapTilesLoaded: n.mapTilesLoaded })), void 0, !0)
|
|
624
632
|
]);
|
|
625
633
|
}
|
|
626
|
-
const
|
|
627
|
-
function
|
|
634
|
+
const Et = /* @__PURE__ */ te(Ve, [["render", Ge], ["__scopeId", "data-v-f29e129b"]]);
|
|
635
|
+
function He(n) {
|
|
628
636
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
629
637
|
}
|
|
630
|
-
var
|
|
638
|
+
var We = function n(e, t) {
|
|
631
639
|
if (e === t)
|
|
632
640
|
return !0;
|
|
633
641
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
@@ -662,25 +670,25 @@ var Je = function n(e, t) {
|
|
|
662
670
|
}
|
|
663
671
|
return e !== e && t !== t;
|
|
664
672
|
};
|
|
665
|
-
const
|
|
666
|
-
const r = y(), o = C(
|
|
673
|
+
const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n === ee, D = (n, e, t, s) => {
|
|
674
|
+
const r = y(), o = C(N, y()), a = C(U, y()), l = C(Le, y()), i = J(
|
|
667
675
|
() => !!(l.value && a.value && (r.value instanceof a.value.Marker || r.value instanceof a.value[ee]))
|
|
668
676
|
);
|
|
669
677
|
return O(
|
|
670
678
|
[o, t],
|
|
671
|
-
(
|
|
672
|
-
var p,
|
|
673
|
-
const
|
|
674
|
-
!o.value || !a.value || !
|
|
679
|
+
(d, [u, c]) => {
|
|
680
|
+
var p, m, f;
|
|
681
|
+
const h = !$(t.value, c) || o.value !== u;
|
|
682
|
+
!o.value || !a.value || !h || (r.value ? (r.value.setOptions(t.value), i.value && ((p = l.value) == null || p.removeMarker(r.value), (m = l.value) == null || m.addMarker(r.value))) : (Ke(n) ? r.value = I(
|
|
675
683
|
new a.value[n](t.value)
|
|
676
|
-
) :
|
|
684
|
+
) : Je(n) ? r.value = I(
|
|
677
685
|
new a.value[n](t.value)
|
|
678
|
-
) : r.value =
|
|
686
|
+
) : r.value = I(
|
|
679
687
|
new a.value[n]({
|
|
680
688
|
...t.value,
|
|
681
689
|
map: o.value
|
|
682
690
|
})
|
|
683
|
-
), i.value ? (
|
|
691
|
+
), i.value ? (f = l.value) == null || f.addMarker(r.value) : r.value.setMap(o.value), e.forEach((g) => {
|
|
684
692
|
var v;
|
|
685
693
|
(v = r.value) == null || v.addListener(g, (w) => s(g, w));
|
|
686
694
|
})));
|
|
@@ -689,8 +697,8 @@ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n ===
|
|
|
689
697
|
immediate: !0
|
|
690
698
|
}
|
|
691
699
|
), B(() => {
|
|
692
|
-
var
|
|
693
|
-
r.value && ((
|
|
700
|
+
var d, u;
|
|
701
|
+
r.value && ((d = a.value) == null || d.event.clearInstanceListeners(r.value), i.value ? (u = l.value) == null || u.removeMarker(r.value) : r.value.setMap(null));
|
|
694
702
|
}), r;
|
|
695
703
|
}, fe = [
|
|
696
704
|
"animation_changed",
|
|
@@ -716,7 +724,7 @@ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n ===
|
|
|
716
724
|
"shape_changed",
|
|
717
725
|
"title_changed",
|
|
718
726
|
"visible_changed"
|
|
719
|
-
],
|
|
727
|
+
], Pt = P({
|
|
720
728
|
name: "Marker",
|
|
721
729
|
props: {
|
|
722
730
|
options: {
|
|
@@ -726,13 +734,13 @@ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n ===
|
|
|
726
734
|
},
|
|
727
735
|
emits: fe,
|
|
728
736
|
setup(n, { emit: e, expose: t, slots: s }) {
|
|
729
|
-
const r =
|
|
737
|
+
const r = Z(n, "options"), o = D("Marker", fe, r, e);
|
|
730
738
|
return G(xe, o), t({ marker: o }), () => {
|
|
731
739
|
var a;
|
|
732
740
|
return (a = s.default) == null ? void 0 : a.call(s);
|
|
733
741
|
};
|
|
734
742
|
}
|
|
735
|
-
}),
|
|
743
|
+
}), Ot = P({
|
|
736
744
|
name: "Polyline",
|
|
737
745
|
props: {
|
|
738
746
|
options: {
|
|
@@ -742,11 +750,11 @@ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n ===
|
|
|
742
750
|
},
|
|
743
751
|
emits: q,
|
|
744
752
|
setup(n, { emit: e }) {
|
|
745
|
-
const t =
|
|
746
|
-
return { polyline:
|
|
753
|
+
const t = Z(n, "options");
|
|
754
|
+
return { polyline: D("Polyline", q, t, e) };
|
|
747
755
|
},
|
|
748
756
|
render: () => null
|
|
749
|
-
}),
|
|
757
|
+
}), xt = P({
|
|
750
758
|
name: "Polygon",
|
|
751
759
|
props: {
|
|
752
760
|
options: {
|
|
@@ -756,11 +764,11 @@ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n ===
|
|
|
756
764
|
},
|
|
757
765
|
emits: q,
|
|
758
766
|
setup(n, { emit: e }) {
|
|
759
|
-
const t =
|
|
760
|
-
return { polygon:
|
|
767
|
+
const t = Z(n, "options");
|
|
768
|
+
return { polygon: D("Polygon", q, t, e) };
|
|
761
769
|
},
|
|
762
770
|
render: () => null
|
|
763
|
-
}), me = q.concat(["bounds_changed"]),
|
|
771
|
+
}), me = q.concat(["bounds_changed"]), Lt = P({
|
|
764
772
|
name: "Rectangle",
|
|
765
773
|
props: {
|
|
766
774
|
options: {
|
|
@@ -770,11 +778,11 @@ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n ===
|
|
|
770
778
|
},
|
|
771
779
|
emits: me,
|
|
772
780
|
setup(n, { emit: e }) {
|
|
773
|
-
const t =
|
|
774
|
-
return { rectangle:
|
|
781
|
+
const t = Z(n, "options");
|
|
782
|
+
return { rectangle: D("Rectangle", me, t, e) };
|
|
775
783
|
},
|
|
776
784
|
render: () => null
|
|
777
|
-
}), ge = q.concat(["center_changed", "radius_changed"]),
|
|
785
|
+
}), ge = q.concat(["center_changed", "radius_changed"]), St = P({
|
|
778
786
|
name: "Circle",
|
|
779
787
|
props: {
|
|
780
788
|
options: {
|
|
@@ -784,11 +792,11 @@ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n ===
|
|
|
784
792
|
},
|
|
785
793
|
emits: ge,
|
|
786
794
|
setup(n, { emit: e }) {
|
|
787
|
-
const t =
|
|
788
|
-
return { circle:
|
|
795
|
+
const t = Z(n, "options");
|
|
796
|
+
return { circle: D("Circle", ge, t, e) };
|
|
789
797
|
},
|
|
790
798
|
render: () => null
|
|
791
|
-
}),
|
|
799
|
+
}), Ye = P({
|
|
792
800
|
props: {
|
|
793
801
|
position: {
|
|
794
802
|
type: String,
|
|
@@ -801,110 +809,121 @@ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n ===
|
|
|
801
809
|
},
|
|
802
810
|
emits: ["content:loaded"],
|
|
803
811
|
setup(n, { emit: e }) {
|
|
804
|
-
const t = y(null), s = C(
|
|
812
|
+
const t = y(null), s = C(N, y()), r = C(U, y()), o = C(Se, y(!1)), a = O(
|
|
805
813
|
[o, r, t],
|
|
806
|
-
([u, c
|
|
807
|
-
|
|
814
|
+
([d, u, c]) => {
|
|
815
|
+
u && d && c && (l(n.position), e("content:loaded"), setTimeout(a, 0));
|
|
808
816
|
},
|
|
809
817
|
{ immediate: !0 }
|
|
810
|
-
),
|
|
818
|
+
), l = (d) => {
|
|
811
819
|
if (s.value && r.value && t.value) {
|
|
812
|
-
const
|
|
813
|
-
s.value.controls[
|
|
820
|
+
const u = r.value.ControlPosition[d];
|
|
821
|
+
s.value.controls[u].push(t.value);
|
|
814
822
|
}
|
|
815
|
-
},
|
|
823
|
+
}, i = (d) => {
|
|
816
824
|
if (s.value && r.value) {
|
|
817
|
-
let
|
|
818
|
-
const
|
|
819
|
-
s.value.controls[
|
|
820
|
-
|
|
821
|
-
}),
|
|
825
|
+
let u = null;
|
|
826
|
+
const c = r.value.ControlPosition[d];
|
|
827
|
+
s.value.controls[c].forEach((h, p) => {
|
|
828
|
+
h === t.value && (u = p);
|
|
829
|
+
}), u !== null && s.value.controls[c].removeAt(u);
|
|
822
830
|
}
|
|
823
831
|
};
|
|
824
|
-
return B(() =>
|
|
832
|
+
return B(() => i(n.position)), O(
|
|
825
833
|
() => n.position,
|
|
826
|
-
(
|
|
827
|
-
|
|
834
|
+
(d, u) => {
|
|
835
|
+
i(u), l(d);
|
|
828
836
|
}
|
|
829
837
|
), O(
|
|
830
838
|
() => n.index,
|
|
831
|
-
(
|
|
832
|
-
|
|
839
|
+
(d) => {
|
|
840
|
+
d && t.value && (t.value.index = n.index);
|
|
833
841
|
}
|
|
834
|
-
), { controlRef: t
|
|
835
|
-
}
|
|
836
|
-
})
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
842
|
+
), { controlRef: t };
|
|
843
|
+
}
|
|
844
|
+
});
|
|
845
|
+
const Xe = {
|
|
846
|
+
ref: "controlRef",
|
|
847
|
+
class: "custom-control-wrapper"
|
|
848
|
+
};
|
|
849
|
+
function Qe(n, e, t, s, r, o) {
|
|
850
|
+
return Y(), X("div", Xe, [
|
|
851
|
+
Q(n.$slots, "default", {}, void 0, !0)
|
|
852
|
+
], 512);
|
|
843
853
|
}
|
|
844
|
-
const
|
|
854
|
+
const It = /* @__PURE__ */ te(Ye, [["render", Qe], ["__scopeId", "data-v-d099a3a6"]]), ve = ["closeclick", "content_changed", "domready", "position_changed", "visible", "zindex_changed"], et = P({
|
|
845
855
|
inheritAttrs: !1,
|
|
846
856
|
props: {
|
|
847
857
|
options: {
|
|
848
858
|
type: Object,
|
|
849
859
|
default: () => ({})
|
|
860
|
+
},
|
|
861
|
+
modelValue: {
|
|
862
|
+
type: Boolean
|
|
850
863
|
}
|
|
851
864
|
},
|
|
852
|
-
emits: ve,
|
|
865
|
+
emits: [...ve, "update:modelValue"],
|
|
853
866
|
setup(n, { slots: e, emit: t, expose: s }) {
|
|
854
|
-
const r = y(), o = y(), a = C(
|
|
855
|
-
let
|
|
856
|
-
const
|
|
857
|
-
var p;
|
|
858
|
-
return (p = e.default) == null ? void 0 : p.call(e).some((f) => f.type !== Ee);
|
|
859
|
-
}), c = (p) => {
|
|
867
|
+
const r = y(), o = y(), a = C(N, y()), l = C(U, y()), i = C(xe, y());
|
|
868
|
+
let d, u = n.modelValue;
|
|
869
|
+
const c = J(() => {
|
|
860
870
|
var f;
|
|
861
|
-
return (f =
|
|
862
|
-
},
|
|
863
|
-
|
|
864
|
-
|
|
871
|
+
return (f = e.default) == null ? void 0 : f.call(e).some((g) => g.type !== Ee);
|
|
872
|
+
}), h = (f) => {
|
|
873
|
+
u = f, t("update:modelValue", f);
|
|
874
|
+
}, p = (f) => {
|
|
875
|
+
r.value && (r.value.open({ map: a.value, anchor: i.value, ...f }), h(!0));
|
|
876
|
+
}, m = () => {
|
|
877
|
+
r.value && (r.value.close(), h(!1));
|
|
865
878
|
};
|
|
866
879
|
return Me(() => {
|
|
867
880
|
O(
|
|
868
881
|
[a, () => n.options],
|
|
869
|
-
([
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
882
|
+
([f, g], [v, w]) => {
|
|
883
|
+
var E;
|
|
884
|
+
const _ = !$(g, w) || a.value !== v;
|
|
885
|
+
a.value && l.value && _ && (r.value ? (r.value.setOptions({
|
|
886
|
+
...g,
|
|
887
|
+
content: c.value ? o.value : g.content
|
|
888
|
+
}), i.value || p()) : (r.value = I(
|
|
875
889
|
new l.value.InfoWindow({
|
|
876
|
-
...
|
|
877
|
-
content:
|
|
890
|
+
...g,
|
|
891
|
+
content: c.value ? o.value : g.content
|
|
878
892
|
})
|
|
879
|
-
), i.value
|
|
880
|
-
|
|
881
|
-
})
|
|
882
|
-
var
|
|
883
|
-
(
|
|
884
|
-
})));
|
|
893
|
+
), i.value && (d = i.value.addListener("click", () => {
|
|
894
|
+
p();
|
|
895
|
+
})), (!i.value || u) && p(), ve.forEach((b) => {
|
|
896
|
+
var x;
|
|
897
|
+
(x = r.value) == null || x.addListener(b, (M) => t(b, M));
|
|
898
|
+
}), (E = r.value) == null || E.addListener("closeclick", () => h(!1))));
|
|
885
899
|
},
|
|
886
900
|
{
|
|
887
901
|
immediate: !0
|
|
888
902
|
}
|
|
903
|
+
), O(
|
|
904
|
+
() => n.modelValue,
|
|
905
|
+
(f) => {
|
|
906
|
+
f !== u && (f ? p() : m());
|
|
907
|
+
}
|
|
889
908
|
);
|
|
890
909
|
}), B(() => {
|
|
891
|
-
var
|
|
892
|
-
|
|
893
|
-
}), s({ infoWindow: r, open:
|
|
910
|
+
var f;
|
|
911
|
+
d && d.remove(), r.value && ((f = l.value) == null || f.event.clearInstanceListeners(r.value), m());
|
|
912
|
+
}), s({ infoWindow: r, open: p, close: m }), { infoWindow: r, infoWindowRef: o, hasSlotContent: c, open: p, close: m };
|
|
894
913
|
}
|
|
895
914
|
});
|
|
896
|
-
const
|
|
915
|
+
const tt = {
|
|
897
916
|
key: 0,
|
|
898
917
|
class: "info-window-wrapper"
|
|
899
918
|
};
|
|
900
|
-
function
|
|
901
|
-
return n.hasSlotContent ? (Y(), X("div",
|
|
919
|
+
function st(n, e, t, s, r, o) {
|
|
920
|
+
return n.hasSlotContent ? (Y(), X("div", tt, [
|
|
902
921
|
ae("div", Pe({ ref: "infoWindowRef" }, n.$attrs), [
|
|
903
922
|
Q(n.$slots, "default", {}, void 0, !0)
|
|
904
923
|
], 16)
|
|
905
924
|
])) : Oe("", !0);
|
|
906
925
|
}
|
|
907
|
-
const
|
|
926
|
+
const At = /* @__PURE__ */ te(et, [["render", st], ["__scopeId", "data-v-cbe1707b"]]), ye = [
|
|
908
927
|
Int8Array,
|
|
909
928
|
Uint8Array,
|
|
910
929
|
Uint8ClampedArray,
|
|
@@ -914,7 +933,7 @@ const $t = /* @__PURE__ */ te(st, [["render", nt], ["__scopeId", "data-v-45a4606
|
|
|
914
933
|
Uint32Array,
|
|
915
934
|
Float32Array,
|
|
916
935
|
Float64Array
|
|
917
|
-
], re = 1,
|
|
936
|
+
], re = 1, V = 8;
|
|
918
937
|
class le {
|
|
919
938
|
/**
|
|
920
939
|
* Creates an index from raw `ArrayBuffer` data.
|
|
@@ -949,7 +968,7 @@ class le {
|
|
|
949
968
|
const o = ye.indexOf(this.ArrayType), a = e * 2 * this.ArrayType.BYTES_PER_ELEMENT, l = e * this.IndexArrayType.BYTES_PER_ELEMENT, i = (8 - l % 8) % 8;
|
|
950
969
|
if (o < 0)
|
|
951
970
|
throw new Error(`Unexpected typed array class: ${s}.`);
|
|
952
|
-
r && r instanceof ArrayBuffer ? (this.data = r, this.ids = new this.IndexArrayType(this.data,
|
|
971
|
+
r && r instanceof ArrayBuffer ? (this.data = r, this.ids = new this.IndexArrayType(this.data, V, e), this.coords = new this.ArrayType(this.data, V + l + i, e * 2), this._pos = e * 2, this._finished = !0) : (this.data = new ArrayBuffer(V + a + l + i), this.ids = new this.IndexArrayType(this.data, V, e), this.coords = new this.ArrayType(this.data, V + l + i, e * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (re << 4) + o]), new Uint16Array(this.data, 2, 1)[0] = t, new Uint32Array(this.data, 4, 1)[0] = e);
|
|
953
972
|
}
|
|
954
973
|
/**
|
|
955
974
|
* Add a point to the index.
|
|
@@ -981,20 +1000,20 @@ class le {
|
|
|
981
1000
|
range(e, t, s, r) {
|
|
982
1001
|
if (!this._finished)
|
|
983
1002
|
throw new Error("Data not yet indexed - call index.finish().");
|
|
984
|
-
const { ids: o, coords: a, nodeSize: l } = this, i = [0, o.length - 1, 0],
|
|
1003
|
+
const { ids: o, coords: a, nodeSize: l } = this, i = [0, o.length - 1, 0], d = [];
|
|
985
1004
|
for (; i.length; ) {
|
|
986
|
-
const u = i.pop() || 0, c = i.pop() || 0,
|
|
987
|
-
if (c -
|
|
988
|
-
for (let g =
|
|
1005
|
+
const u = i.pop() || 0, c = i.pop() || 0, h = i.pop() || 0;
|
|
1006
|
+
if (c - h <= l) {
|
|
1007
|
+
for (let g = h; g <= c; g++) {
|
|
989
1008
|
const v = a[2 * g], w = a[2 * g + 1];
|
|
990
|
-
v >= e && v <= s && w >= t && w <= r &&
|
|
1009
|
+
v >= e && v <= s && w >= t && w <= r && d.push(o[g]);
|
|
991
1010
|
}
|
|
992
1011
|
continue;
|
|
993
1012
|
}
|
|
994
|
-
const p =
|
|
995
|
-
|
|
1013
|
+
const p = h + c >> 1, m = a[2 * p], f = a[2 * p + 1];
|
|
1014
|
+
m >= e && m <= s && f >= t && f <= r && d.push(o[p]), (u === 0 ? e <= m : t <= f) && (i.push(h), i.push(p - 1), i.push(1 - u)), (u === 0 ? s >= m : r >= f) && (i.push(p + 1), i.push(c), i.push(1 - u));
|
|
996
1015
|
}
|
|
997
|
-
return
|
|
1016
|
+
return d;
|
|
998
1017
|
}
|
|
999
1018
|
/**
|
|
1000
1019
|
* Search the index for items within a given radius.
|
|
@@ -1006,16 +1025,16 @@ class le {
|
|
|
1006
1025
|
within(e, t, s) {
|
|
1007
1026
|
if (!this._finished)
|
|
1008
1027
|
throw new Error("Data not yet indexed - call index.finish().");
|
|
1009
|
-
const { ids: r, coords: o, nodeSize: a } = this, l = [0, r.length - 1, 0], i = [],
|
|
1028
|
+
const { ids: r, coords: o, nodeSize: a } = this, l = [0, r.length - 1, 0], i = [], d = s * s;
|
|
1010
1029
|
for (; l.length; ) {
|
|
1011
|
-
const u = l.pop() || 0, c = l.pop() || 0,
|
|
1012
|
-
if (c -
|
|
1013
|
-
for (let g =
|
|
1014
|
-
we(o[2 * g], o[2 * g + 1], e, t) <=
|
|
1030
|
+
const u = l.pop() || 0, c = l.pop() || 0, h = l.pop() || 0;
|
|
1031
|
+
if (c - h <= a) {
|
|
1032
|
+
for (let g = h; g <= c; g++)
|
|
1033
|
+
we(o[2 * g], o[2 * g + 1], e, t) <= d && i.push(r[g]);
|
|
1015
1034
|
continue;
|
|
1016
1035
|
}
|
|
1017
|
-
const p =
|
|
1018
|
-
we(
|
|
1036
|
+
const p = h + c >> 1, m = o[2 * p], f = o[2 * p + 1];
|
|
1037
|
+
we(m, f, e, t) <= d && i.push(r[p]), (u === 0 ? e - s <= m : t - s <= f) && (l.push(h), l.push(p - 1), l.push(1 - u)), (u === 0 ? e + s >= m : t + s >= f) && (l.push(p + 1), l.push(c), l.push(1 - u));
|
|
1019
1038
|
}
|
|
1020
1039
|
return i;
|
|
1021
1040
|
}
|
|
@@ -1029,21 +1048,21 @@ function ie(n, e, t, s, r, o) {
|
|
|
1029
1048
|
function Ie(n, e, t, s, r, o) {
|
|
1030
1049
|
for (; r > s; ) {
|
|
1031
1050
|
if (r - s > 600) {
|
|
1032
|
-
const
|
|
1033
|
-
Ie(n, e, t,
|
|
1051
|
+
const d = r - s + 1, u = t - s + 1, c = Math.log(d), h = 0.5 * Math.exp(2 * c / 3), p = 0.5 * Math.sqrt(c * h * (d - h) / d) * (u - d / 2 < 0 ? -1 : 1), m = Math.max(s, Math.floor(t - u * h / d + p)), f = Math.min(r, Math.floor(t + (d - u) * h / d + p));
|
|
1052
|
+
Ie(n, e, t, m, f, o);
|
|
1034
1053
|
}
|
|
1035
1054
|
const a = e[2 * t + o];
|
|
1036
1055
|
let l = s, i = r;
|
|
1037
|
-
for (
|
|
1038
|
-
for (
|
|
1056
|
+
for (z(n, e, s, t), e[2 * r + o] > a && z(n, e, s, r); l < i; ) {
|
|
1057
|
+
for (z(n, e, l, i), l++, i--; e[2 * l + o] < a; )
|
|
1039
1058
|
l++;
|
|
1040
1059
|
for (; e[2 * i + o] > a; )
|
|
1041
1060
|
i--;
|
|
1042
1061
|
}
|
|
1043
|
-
e[2 * s + o] === a ?
|
|
1062
|
+
e[2 * s + o] === a ? z(n, e, s, i) : (i++, z(n, e, i, r)), i <= t && (s = i + 1), t <= i && (r = i - 1);
|
|
1044
1063
|
}
|
|
1045
1064
|
}
|
|
1046
|
-
function
|
|
1065
|
+
function z(n, e, t, s) {
|
|
1047
1066
|
ne(n, t, s), ne(e, 2 * t, 2 * s), ne(e, 2 * t + 1, 2 * s + 1);
|
|
1048
1067
|
}
|
|
1049
1068
|
function ne(n, e, t) {
|
|
@@ -1054,7 +1073,7 @@ function we(n, e, t, s) {
|
|
|
1054
1073
|
const r = n - t, o = e - s;
|
|
1055
1074
|
return r * r + o * o;
|
|
1056
1075
|
}
|
|
1057
|
-
const
|
|
1076
|
+
const rt = {
|
|
1058
1077
|
minZoom: 0,
|
|
1059
1078
|
// min zoom to generate clusters on
|
|
1060
1079
|
maxZoom: 16,
|
|
@@ -1077,10 +1096,10 @@ const ot = {
|
|
|
1077
1096
|
// properties to use for individual points when running the reducer
|
|
1078
1097
|
map: (n) => n
|
|
1079
1098
|
// props => ({sum: props.my_value})
|
|
1080
|
-
}, _e = Math.fround || ((n) => (e) => (n[0] = +e, n[0]))(new Float32Array(1)),
|
|
1099
|
+
}, _e = Math.fround || ((n) => (e) => (n[0] = +e, n[0]))(new Float32Array(1)), A = 2, S = 3, oe = 4, L = 5, Ae = 6;
|
|
1081
1100
|
class Te {
|
|
1082
1101
|
constructor(e) {
|
|
1083
|
-
this.options = Object.assign(Object.create(
|
|
1102
|
+
this.options = Object.assign(Object.create(rt), e), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
|
|
1084
1103
|
}
|
|
1085
1104
|
load(e) {
|
|
1086
1105
|
const { log: t, minZoom: s, maxZoom: r } = this.options;
|
|
@@ -1089,12 +1108,12 @@ class Te {
|
|
|
1089
1108
|
t && console.time(o), this.points = e;
|
|
1090
1109
|
const a = [];
|
|
1091
1110
|
for (let i = 0; i < e.length; i++) {
|
|
1092
|
-
const
|
|
1093
|
-
if (!
|
|
1111
|
+
const d = e[i];
|
|
1112
|
+
if (!d.geometry)
|
|
1094
1113
|
continue;
|
|
1095
|
-
const [u, c] =
|
|
1114
|
+
const [u, c] = d.geometry.coordinates, h = _e(W(u)), p = _e(K(c));
|
|
1096
1115
|
a.push(
|
|
1097
|
-
|
|
1116
|
+
h,
|
|
1098
1117
|
p,
|
|
1099
1118
|
// projected point coordinates
|
|
1100
1119
|
1 / 0,
|
|
@@ -1110,8 +1129,8 @@ class Te {
|
|
|
1110
1129
|
let l = this.trees[r + 1] = this._createTree(a);
|
|
1111
1130
|
t && console.timeEnd(o);
|
|
1112
1131
|
for (let i = r; i >= s; i--) {
|
|
1113
|
-
const
|
|
1114
|
-
l = this.trees[i] = this._createTree(this._cluster(l, i)), t && console.log("z%d: %d clusters in %dms", i, l.numItems, +Date.now() -
|
|
1132
|
+
const d = +Date.now();
|
|
1133
|
+
l = this.trees[i] = this._createTree(this._cluster(l, i)), t && console.log("z%d: %d clusters in %dms", i, l.numItems, +Date.now() - d);
|
|
1115
1134
|
}
|
|
1116
1135
|
return t && console.timeEnd("total time"), this;
|
|
1117
1136
|
}
|
|
@@ -1123,13 +1142,13 @@ class Te {
|
|
|
1123
1142
|
if (e[2] - e[0] >= 360)
|
|
1124
1143
|
s = -180, o = 180;
|
|
1125
1144
|
else if (s > o) {
|
|
1126
|
-
const c = this.getClusters([s, r, 180, a], t),
|
|
1127
|
-
return c.concat(
|
|
1145
|
+
const c = this.getClusters([s, r, 180, a], t), h = this.getClusters([-180, r, o, a], t);
|
|
1146
|
+
return c.concat(h);
|
|
1128
1147
|
}
|
|
1129
|
-
const l = this.trees[this._limitZoom(t)], i = l.range(W(s), K(a), W(o), K(r)),
|
|
1148
|
+
const l = this.trees[this._limitZoom(t)], i = l.range(W(s), K(a), W(o), K(r)), d = l.data, u = [];
|
|
1130
1149
|
for (const c of i) {
|
|
1131
|
-
const
|
|
1132
|
-
u.push(h
|
|
1150
|
+
const h = this.stride * c;
|
|
1151
|
+
u.push(d[h + L] > 1 ? ke(d, h, this.clusterProps) : this.points[d[h + S]]);
|
|
1133
1152
|
}
|
|
1134
1153
|
return u;
|
|
1135
1154
|
}
|
|
@@ -1140,10 +1159,10 @@ class Te {
|
|
|
1140
1159
|
const a = o.data;
|
|
1141
1160
|
if (t * this.stride >= a.length)
|
|
1142
1161
|
throw new Error(r);
|
|
1143
|
-
const l = this.options.radius / (this.options.extent * Math.pow(2, s - 1)), i = a[t * this.stride],
|
|
1144
|
-
for (const
|
|
1145
|
-
const p =
|
|
1146
|
-
a[p + oe] === e && c.push(a[p +
|
|
1162
|
+
const l = this.options.radius / (this.options.extent * Math.pow(2, s - 1)), i = a[t * this.stride], d = a[t * this.stride + 1], u = o.within(i, d, l), c = [];
|
|
1163
|
+
for (const h of u) {
|
|
1164
|
+
const p = h * this.stride;
|
|
1165
|
+
a[p + oe] === e && c.push(a[p + L] > 1 ? ke(a, p, this.clusterProps) : this.points[a[p + S]]);
|
|
1147
1166
|
}
|
|
1148
1167
|
if (c.length === 0)
|
|
1149
1168
|
throw new Error(r);
|
|
@@ -1155,25 +1174,25 @@ class Te {
|
|
|
1155
1174
|
return this._appendLeaves(r, e, t, s, 0), r;
|
|
1156
1175
|
}
|
|
1157
1176
|
getTile(e, t, s) {
|
|
1158
|
-
const r = this.trees[this._limitZoom(e)], o = Math.pow(2, e), { extent: a, radius: l } = this.options, i = l / a,
|
|
1177
|
+
const r = this.trees[this._limitZoom(e)], o = Math.pow(2, e), { extent: a, radius: l } = this.options, i = l / a, d = (s - i) / o, u = (s + 1 + i) / o, c = {
|
|
1159
1178
|
features: []
|
|
1160
1179
|
};
|
|
1161
1180
|
return this._addTileFeatures(
|
|
1162
|
-
r.range((t - i) / o,
|
|
1181
|
+
r.range((t - i) / o, d, (t + 1 + i) / o, u),
|
|
1163
1182
|
r.data,
|
|
1164
1183
|
t,
|
|
1165
1184
|
s,
|
|
1166
1185
|
o,
|
|
1167
1186
|
c
|
|
1168
1187
|
), t === 0 && this._addTileFeatures(
|
|
1169
|
-
r.range(1 - i / o,
|
|
1188
|
+
r.range(1 - i / o, d, 1, u),
|
|
1170
1189
|
r.data,
|
|
1171
1190
|
o,
|
|
1172
1191
|
s,
|
|
1173
1192
|
o,
|
|
1174
1193
|
c
|
|
1175
1194
|
), t === o - 1 && this._addTileFeatures(
|
|
1176
|
-
r.range(0,
|
|
1195
|
+
r.range(0, d, i / o, u),
|
|
1177
1196
|
r.data,
|
|
1178
1197
|
-1,
|
|
1179
1198
|
s,
|
|
@@ -1208,70 +1227,70 @@ class Te {
|
|
|
1208
1227
|
}
|
|
1209
1228
|
_addTileFeatures(e, t, s, r, o, a) {
|
|
1210
1229
|
for (const l of e) {
|
|
1211
|
-
const i = l * this.stride,
|
|
1212
|
-
let u, c,
|
|
1213
|
-
if (
|
|
1214
|
-
u = $e(t, i, this.clusterProps), c = t[i],
|
|
1230
|
+
const i = l * this.stride, d = t[i + L] > 1;
|
|
1231
|
+
let u, c, h;
|
|
1232
|
+
if (d)
|
|
1233
|
+
u = $e(t, i, this.clusterProps), c = t[i], h = t[i + 1];
|
|
1215
1234
|
else {
|
|
1216
|
-
const
|
|
1217
|
-
u =
|
|
1218
|
-
const [g, v] =
|
|
1219
|
-
c = W(g),
|
|
1235
|
+
const f = this.points[t[i + S]];
|
|
1236
|
+
u = f.properties;
|
|
1237
|
+
const [g, v] = f.geometry.coordinates;
|
|
1238
|
+
c = W(g), h = K(v);
|
|
1220
1239
|
}
|
|
1221
1240
|
const p = {
|
|
1222
1241
|
type: 1,
|
|
1223
1242
|
geometry: [[
|
|
1224
1243
|
Math.round(this.options.extent * (c * o - s)),
|
|
1225
|
-
Math.round(this.options.extent * (
|
|
1244
|
+
Math.round(this.options.extent * (h * o - r))
|
|
1226
1245
|
]],
|
|
1227
1246
|
tags: u
|
|
1228
1247
|
};
|
|
1229
|
-
let
|
|
1230
|
-
|
|
1248
|
+
let m;
|
|
1249
|
+
d || this.options.generateId ? m = t[i + S] : m = this.points[t[i + S]].id, m !== void 0 && (p.id = m), a.features.push(p);
|
|
1231
1250
|
}
|
|
1232
1251
|
}
|
|
1233
1252
|
_limitZoom(e) {
|
|
1234
1253
|
return Math.max(this.options.minZoom, Math.min(Math.floor(+e), this.options.maxZoom + 1));
|
|
1235
1254
|
}
|
|
1236
1255
|
_cluster(e, t) {
|
|
1237
|
-
const { radius: s, extent: r, reduce: o, minPoints: a } = this.options, l = s / (r * Math.pow(2, t)), i = e.data,
|
|
1256
|
+
const { radius: s, extent: r, reduce: o, minPoints: a } = this.options, l = s / (r * Math.pow(2, t)), i = e.data, d = [], u = this.stride;
|
|
1238
1257
|
for (let c = 0; c < i.length; c += u) {
|
|
1239
|
-
if (i[c +
|
|
1258
|
+
if (i[c + A] <= t)
|
|
1240
1259
|
continue;
|
|
1241
|
-
i[c +
|
|
1242
|
-
const
|
|
1243
|
-
let g =
|
|
1244
|
-
for (const v of
|
|
1260
|
+
i[c + A] = t;
|
|
1261
|
+
const h = i[c], p = i[c + 1], m = e.within(i[c], i[c + 1], l), f = i[c + L];
|
|
1262
|
+
let g = f;
|
|
1263
|
+
for (const v of m) {
|
|
1245
1264
|
const w = v * u;
|
|
1246
|
-
i[w +
|
|
1265
|
+
i[w + A] > t && (g += i[w + L]);
|
|
1247
1266
|
}
|
|
1248
|
-
if (g >
|
|
1249
|
-
let v =
|
|
1250
|
-
const
|
|
1251
|
-
for (const
|
|
1252
|
-
const
|
|
1253
|
-
if (i[
|
|
1267
|
+
if (g > f && g >= a) {
|
|
1268
|
+
let v = h * f, w = p * f, _, E = -1;
|
|
1269
|
+
const b = ((c / u | 0) << 5) + (t + 1) + this.points.length;
|
|
1270
|
+
for (const x of m) {
|
|
1271
|
+
const M = x * u;
|
|
1272
|
+
if (i[M + A] <= t)
|
|
1254
1273
|
continue;
|
|
1255
|
-
i[
|
|
1256
|
-
const F = i[
|
|
1257
|
-
v += i[
|
|
1274
|
+
i[M + A] = t;
|
|
1275
|
+
const F = i[M + L];
|
|
1276
|
+
v += i[M] * F, w += i[M + 1] * F, i[M + oe] = b, o && (_ || (_ = this._map(i, c, !0), E = this.clusterProps.length, this.clusterProps.push(_)), o(_, this._map(i, M)));
|
|
1258
1277
|
}
|
|
1259
|
-
i[c + oe] =
|
|
1278
|
+
i[c + oe] = b, d.push(v / g, w / g, 1 / 0, b, -1, g), o && d.push(E);
|
|
1260
1279
|
} else {
|
|
1261
1280
|
for (let v = 0; v < u; v++)
|
|
1262
|
-
|
|
1281
|
+
d.push(i[c + v]);
|
|
1263
1282
|
if (g > 1)
|
|
1264
|
-
for (const v of
|
|
1283
|
+
for (const v of m) {
|
|
1265
1284
|
const w = v * u;
|
|
1266
|
-
if (!(i[w +
|
|
1267
|
-
i[w +
|
|
1285
|
+
if (!(i[w + A] <= t)) {
|
|
1286
|
+
i[w + A] = t;
|
|
1268
1287
|
for (let _ = 0; _ < u; _++)
|
|
1269
|
-
|
|
1288
|
+
d.push(i[w + _]);
|
|
1270
1289
|
}
|
|
1271
1290
|
}
|
|
1272
1291
|
}
|
|
1273
1292
|
}
|
|
1274
|
-
return
|
|
1293
|
+
return d;
|
|
1275
1294
|
}
|
|
1276
1295
|
// get index of the point from which the cluster originated
|
|
1277
1296
|
_getOriginId(e) {
|
|
@@ -1282,30 +1301,30 @@ class Te {
|
|
|
1282
1301
|
return (e - this.points.length) % 32;
|
|
1283
1302
|
}
|
|
1284
1303
|
_map(e, t, s) {
|
|
1285
|
-
if (e[t +
|
|
1304
|
+
if (e[t + L] > 1) {
|
|
1286
1305
|
const a = this.clusterProps[e[t + Ae]];
|
|
1287
1306
|
return s ? Object.assign({}, a) : a;
|
|
1288
1307
|
}
|
|
1289
|
-
const r = this.points[e[t +
|
|
1308
|
+
const r = this.points[e[t + S]].properties, o = this.options.map(r);
|
|
1290
1309
|
return s && o === r ? Object.assign({}, o) : o;
|
|
1291
1310
|
}
|
|
1292
1311
|
}
|
|
1293
1312
|
function ke(n, e, t) {
|
|
1294
1313
|
return {
|
|
1295
1314
|
type: "Feature",
|
|
1296
|
-
id: n[e +
|
|
1315
|
+
id: n[e + S],
|
|
1297
1316
|
properties: $e(n, e, t),
|
|
1298
1317
|
geometry: {
|
|
1299
1318
|
type: "Point",
|
|
1300
|
-
coordinates: [
|
|
1319
|
+
coordinates: [nt(n[e]), ot(n[e + 1])]
|
|
1301
1320
|
}
|
|
1302
1321
|
};
|
|
1303
1322
|
}
|
|
1304
1323
|
function $e(n, e, t) {
|
|
1305
|
-
const s = n[e +
|
|
1324
|
+
const s = n[e + L], r = s >= 1e4 ? `${Math.round(s / 1e3)}k` : s >= 1e3 ? `${Math.round(s / 100) / 10}k` : s, o = n[e + Ae], a = o === -1 ? {} : Object.assign({}, t[o]);
|
|
1306
1325
|
return Object.assign(a, {
|
|
1307
1326
|
cluster: !0,
|
|
1308
|
-
cluster_id: n[e +
|
|
1327
|
+
cluster_id: n[e + S],
|
|
1309
1328
|
point_count: s,
|
|
1310
1329
|
point_count_abbreviated: r
|
|
1311
1330
|
});
|
|
@@ -1317,10 +1336,10 @@ function K(n) {
|
|
|
1317
1336
|
const e = Math.sin(n * Math.PI / 180), t = 0.5 - 0.25 * Math.log((1 + e) / (1 - e)) / Math.PI;
|
|
1318
1337
|
return t < 0 ? 0 : t > 1 ? 1 : t;
|
|
1319
1338
|
}
|
|
1320
|
-
function
|
|
1339
|
+
function nt(n) {
|
|
1321
1340
|
return (n - 0.5) * 360;
|
|
1322
1341
|
}
|
|
1323
|
-
function
|
|
1342
|
+
function ot(n) {
|
|
1324
1343
|
const e = (180 - n * 360) * Math.PI / 180;
|
|
1325
1344
|
return 360 * Math.atan(Math.exp(e)) / Math.PI - 90;
|
|
1326
1345
|
}
|
|
@@ -1407,19 +1426,19 @@ class H {
|
|
|
1407
1426
|
this.marker && (k.setMap(this.marker, null), this.marker = void 0), this.markers.length = 0;
|
|
1408
1427
|
}
|
|
1409
1428
|
}
|
|
1410
|
-
const
|
|
1429
|
+
const it = (n, e, t, s) => {
|
|
1411
1430
|
const r = Re(n.getBounds(), e, s);
|
|
1412
1431
|
return t.filter((o) => r.contains(k.getPosition(o)));
|
|
1413
1432
|
}, Re = (n, e, t) => {
|
|
1414
|
-
const { northEast: s, southWest: r } =
|
|
1415
|
-
return
|
|
1433
|
+
const { northEast: s, southWest: r } = at(n, e), o = lt({ northEast: s, southWest: r }, t);
|
|
1434
|
+
return ct(o, e);
|
|
1416
1435
|
}, Ce = (n, e, t) => {
|
|
1417
1436
|
const s = Re(n, e, t), r = s.getNorthEast(), o = s.getSouthWest();
|
|
1418
1437
|
return [o.lng(), o.lat(), r.lng(), r.lat()];
|
|
1419
|
-
},
|
|
1438
|
+
}, at = (n, e) => ({
|
|
1420
1439
|
northEast: e.fromLatLngToDivPixel(n.getNorthEast()),
|
|
1421
1440
|
southWest: e.fromLatLngToDivPixel(n.getSouthWest())
|
|
1422
|
-
}),
|
|
1441
|
+
}), lt = ({ northEast: n, southWest: e }, t) => (n.x += t, n.y -= t, e.x -= t, e.y += t, { northEast: n, southWest: e }), ct = ({ northEast: n, southWest: e }, t) => {
|
|
1423
1442
|
const s = t.fromDivPixelToLatLng(e), r = t.fromDivPixelToLatLng(n);
|
|
1424
1443
|
return new google.maps.LatLngBounds(s, r);
|
|
1425
1444
|
};
|
|
@@ -1440,10 +1459,10 @@ class je {
|
|
|
1440
1459
|
* ```
|
|
1441
1460
|
*/
|
|
1442
1461
|
noop({ markers: e }) {
|
|
1443
|
-
return
|
|
1462
|
+
return dt(e);
|
|
1444
1463
|
}
|
|
1445
1464
|
}
|
|
1446
|
-
class
|
|
1465
|
+
class ut extends je {
|
|
1447
1466
|
constructor(e) {
|
|
1448
1467
|
var { viewportPadding: t = 60 } = e, s = ce(e, ["viewportPadding"]);
|
|
1449
1468
|
super(s), this.viewportPadding = 60, this.viewportPadding = t;
|
|
@@ -1456,18 +1475,18 @@ class dt extends je {
|
|
|
1456
1475
|
changed: !1
|
|
1457
1476
|
} : {
|
|
1458
1477
|
clusters: this.cluster({
|
|
1459
|
-
markers:
|
|
1478
|
+
markers: it(t, s, e, this.viewportPadding),
|
|
1460
1479
|
map: t,
|
|
1461
1480
|
mapCanvasProjection: s
|
|
1462
1481
|
})
|
|
1463
1482
|
};
|
|
1464
1483
|
}
|
|
1465
1484
|
}
|
|
1466
|
-
const
|
|
1485
|
+
const dt = (n) => n.map((t) => new H({
|
|
1467
1486
|
position: k.getPosition(t),
|
|
1468
1487
|
markers: [t]
|
|
1469
1488
|
}));
|
|
1470
|
-
class
|
|
1489
|
+
class ht extends je {
|
|
1471
1490
|
constructor(e) {
|
|
1472
1491
|
var { maxZoom: t, radius: s = 60 } = e, r = ce(e, ["maxZoom", "radius"]);
|
|
1473
1492
|
super({ maxZoom: t }), this.state = { zoom: -1 }, this.superCluster = new Te(Object.assign({ maxZoom: this.maxZoom, radius: s }, r));
|
|
@@ -1475,7 +1494,7 @@ class ft extends je {
|
|
|
1475
1494
|
calculate(e) {
|
|
1476
1495
|
let t = !1;
|
|
1477
1496
|
const s = { zoom: e.map.getZoom() };
|
|
1478
|
-
if (
|
|
1497
|
+
if (!$(e.markers, this.markers)) {
|
|
1479
1498
|
t = !0, this.markers = [...e.markers];
|
|
1480
1499
|
const r = this.markers.map((o) => {
|
|
1481
1500
|
const a = k.getPosition(o);
|
|
@@ -1490,7 +1509,7 @@ class ft extends je {
|
|
|
1490
1509
|
});
|
|
1491
1510
|
this.superCluster.load(r);
|
|
1492
1511
|
}
|
|
1493
|
-
return t || (this.state.zoom <= this.maxZoom || s.zoom <= this.maxZoom) && (t =
|
|
1512
|
+
return t || (this.state.zoom <= this.maxZoom || s.zoom <= this.maxZoom) && (t = !$(this.state, s)), this.state = s, t && (this.clusters = this.cluster(e)), { clusters: this.clusters, changed: t };
|
|
1494
1513
|
}
|
|
1495
1514
|
cluster({ map: e }) {
|
|
1496
1515
|
return this.superCluster.getClusters([-180, -90, 180, 90], Math.round(e.getZoom())).map((t) => this.transformCluster(t));
|
|
@@ -1508,7 +1527,7 @@ class ft extends je {
|
|
|
1508
1527
|
});
|
|
1509
1528
|
}
|
|
1510
1529
|
}
|
|
1511
|
-
class
|
|
1530
|
+
class pt extends ut {
|
|
1512
1531
|
constructor(e) {
|
|
1513
1532
|
var { maxZoom: t, radius: s = 60, viewportPadding: r = 60 } = e, o = ce(e, ["maxZoom", "radius", "viewportPadding"]);
|
|
1514
1533
|
super({ maxZoom: t, viewportPadding: r }), this.superCluster = new Te(Object.assign({ maxZoom: this.maxZoom, radius: s }, o)), this.state = { zoom: -1, view: [0, 0, 0, 0] };
|
|
@@ -1518,8 +1537,8 @@ class mt extends dt {
|
|
|
1518
1537
|
zoom: Math.round(e.map.getZoom()),
|
|
1519
1538
|
view: Ce(e.map.getBounds(), e.mapCanvasProjection, this.viewportPadding)
|
|
1520
1539
|
};
|
|
1521
|
-
let s =
|
|
1522
|
-
if (
|
|
1540
|
+
let s = !$(this.state, t);
|
|
1541
|
+
if (!$(e.markers, this.markers)) {
|
|
1523
1542
|
s = !0, this.markers = [...e.markers];
|
|
1524
1543
|
const r = this.markers.map((o) => {
|
|
1525
1544
|
const a = k.getPosition(o);
|
|
@@ -1556,7 +1575,7 @@ class mt extends dt {
|
|
|
1556
1575
|
});
|
|
1557
1576
|
}
|
|
1558
1577
|
}
|
|
1559
|
-
class
|
|
1578
|
+
class ft {
|
|
1560
1579
|
constructor(e, t) {
|
|
1561
1580
|
this.markers = { sum: e.length };
|
|
1562
1581
|
const s = t.map((o) => o.count), r = s.reduce((o, a) => o + a, 0);
|
|
@@ -1571,7 +1590,7 @@ class gt {
|
|
|
1571
1590
|
};
|
|
1572
1591
|
}
|
|
1573
1592
|
}
|
|
1574
|
-
class
|
|
1593
|
+
class mt {
|
|
1575
1594
|
/**
|
|
1576
1595
|
* The default render function for the library used by {@link MarkerClusterer}.
|
|
1577
1596
|
*
|
|
@@ -1622,16 +1641,16 @@ class vt {
|
|
|
1622
1641
|
u.innerHTML = a;
|
|
1623
1642
|
const c = u.firstElementChild;
|
|
1624
1643
|
c.setAttribute("transform", "translate(0 25)");
|
|
1625
|
-
const
|
|
1644
|
+
const h = {
|
|
1626
1645
|
map: r,
|
|
1627
1646
|
position: t,
|
|
1628
1647
|
zIndex: i,
|
|
1629
1648
|
title: l,
|
|
1630
1649
|
content: c
|
|
1631
1650
|
};
|
|
1632
|
-
return new google.maps.marker.AdvancedMarkerElement(
|
|
1651
|
+
return new google.maps.marker.AdvancedMarkerElement(h);
|
|
1633
1652
|
}
|
|
1634
|
-
const
|
|
1653
|
+
const d = {
|
|
1635
1654
|
position: t,
|
|
1636
1655
|
zIndex: i,
|
|
1637
1656
|
title: l,
|
|
@@ -1640,27 +1659,27 @@ class vt {
|
|
|
1640
1659
|
anchor: new google.maps.Point(25, 25)
|
|
1641
1660
|
}
|
|
1642
1661
|
};
|
|
1643
|
-
return new google.maps.Marker(
|
|
1662
|
+
return new google.maps.Marker(d);
|
|
1644
1663
|
}
|
|
1645
1664
|
}
|
|
1646
|
-
function
|
|
1665
|
+
function gt(n, e) {
|
|
1647
1666
|
for (let t in e.prototype)
|
|
1648
1667
|
n.prototype[t] = e.prototype[t];
|
|
1649
1668
|
}
|
|
1650
1669
|
class ue {
|
|
1651
1670
|
constructor() {
|
|
1652
|
-
|
|
1671
|
+
gt(ue, google.maps.OverlayView);
|
|
1653
1672
|
}
|
|
1654
1673
|
}
|
|
1655
1674
|
var j;
|
|
1656
1675
|
(function(n) {
|
|
1657
1676
|
n.CLUSTERING_BEGIN = "clusteringbegin", n.CLUSTERING_END = "clusteringend", n.CLUSTER_CLICK = "click";
|
|
1658
1677
|
})(j || (j = {}));
|
|
1659
|
-
const
|
|
1678
|
+
const vt = (n, e, t) => {
|
|
1660
1679
|
t.fitBounds(e.bounds);
|
|
1661
1680
|
};
|
|
1662
|
-
class
|
|
1663
|
-
constructor({ map: e, markers: t = [], algorithmOptions: s = {}, algorithm: r = new
|
|
1681
|
+
class yt extends ue {
|
|
1682
|
+
constructor({ map: e, markers: t = [], algorithmOptions: s = {}, algorithm: r = new ht(s), renderer: o = new mt(), onClusterClick: a = vt }) {
|
|
1664
1683
|
super(), this.markers = [...t], this.clusters = [], this.algorithm = r, this.renderer = o, this.onClusterClick = a, e && this.setMap(e);
|
|
1665
1684
|
}
|
|
1666
1685
|
addMarker(e, t) {
|
|
@@ -1718,7 +1737,7 @@ class _t extends ue {
|
|
|
1718
1737
|
this.markers.forEach((e) => k.setMap(e, null)), this.clusters.forEach((e) => e.delete()), this.clusters = [];
|
|
1719
1738
|
}
|
|
1720
1739
|
renderClusters() {
|
|
1721
|
-
const e = new
|
|
1740
|
+
const e = new ft(this.markers, this.clusters), t = this.getMap();
|
|
1722
1741
|
this.clusters.forEach((s) => {
|
|
1723
1742
|
s.markers.length === 1 ? s.marker = s.markers[0] : (s.marker = this.renderer.render(s, e, t), s.markers.forEach((r) => k.setMap(r, null)), this.onClusterClick && s.marker.addListener(
|
|
1724
1743
|
"click",
|
|
@@ -1730,7 +1749,7 @@ class _t extends ue {
|
|
|
1730
1749
|
});
|
|
1731
1750
|
}
|
|
1732
1751
|
}
|
|
1733
|
-
const be = Object.values(j),
|
|
1752
|
+
const be = Object.values(j), Tt = P({
|
|
1734
1753
|
name: "MarkerCluster",
|
|
1735
1754
|
props: {
|
|
1736
1755
|
options: {
|
|
@@ -1740,21 +1759,21 @@ const be = Object.values(j), Rt = b({
|
|
|
1740
1759
|
},
|
|
1741
1760
|
emits: be,
|
|
1742
1761
|
setup(n, { emit: e, expose: t, slots: s }) {
|
|
1743
|
-
const r = y(), o = C(
|
|
1762
|
+
const r = y(), o = C(N, y()), a = C(U, y());
|
|
1744
1763
|
return G(Le, r), O(
|
|
1745
1764
|
o,
|
|
1746
1765
|
() => {
|
|
1747
|
-
o.value && (r.value =
|
|
1748
|
-
new
|
|
1766
|
+
o.value && (r.value = I(
|
|
1767
|
+
new yt({
|
|
1749
1768
|
map: o.value,
|
|
1750
1769
|
// Better perf than the default `SuperClusterAlgorithm`. See:
|
|
1751
1770
|
// https://github.com/googlemaps/js-markerclusterer/pull/640
|
|
1752
|
-
algorithm: new
|
|
1771
|
+
algorithm: new pt(n.options.algorithmOptions ?? {}),
|
|
1753
1772
|
...n.options
|
|
1754
1773
|
})
|
|
1755
1774
|
), be.forEach((l) => {
|
|
1756
1775
|
var i;
|
|
1757
|
-
(i = r.value) == null || i.addListener(l, (
|
|
1776
|
+
(i = r.value) == null || i.addListener(l, (d) => e(l, d));
|
|
1758
1777
|
}));
|
|
1759
1778
|
},
|
|
1760
1779
|
{
|
|
@@ -1768,7 +1787,7 @@ const be = Object.values(j), Rt = b({
|
|
|
1768
1787
|
return (l = s.default) == null ? void 0 : l.call(s);
|
|
1769
1788
|
};
|
|
1770
1789
|
}
|
|
1771
|
-
}),
|
|
1790
|
+
}), wt = P({
|
|
1772
1791
|
inheritAttrs: !1,
|
|
1773
1792
|
props: {
|
|
1774
1793
|
options: {
|
|
@@ -1779,22 +1798,22 @@ const be = Object.values(j), Rt = b({
|
|
|
1779
1798
|
setup(n, { slots: e, emit: t, expose: s }) {
|
|
1780
1799
|
const r = y(), o = J(() => {
|
|
1781
1800
|
var i;
|
|
1782
|
-
return (i = e.default) == null ? void 0 : i.call(e).some((
|
|
1801
|
+
return (i = e.default) == null ? void 0 : i.call(e).some((d) => d.type !== Ee);
|
|
1783
1802
|
}), a = J(() => ({
|
|
1784
1803
|
...n.options,
|
|
1785
1804
|
element: r.value
|
|
1786
|
-
})), l =
|
|
1805
|
+
})), l = D(ee, [], a, t);
|
|
1787
1806
|
return s({
|
|
1788
1807
|
customMarker: l
|
|
1789
1808
|
}), { customMarkerRef: r, customMarker: l, hasSlotContent: o };
|
|
1790
1809
|
}
|
|
1791
1810
|
});
|
|
1792
|
-
const
|
|
1811
|
+
const _t = {
|
|
1793
1812
|
key: 0,
|
|
1794
1813
|
class: "custom-marker-wrapper"
|
|
1795
1814
|
};
|
|
1796
|
-
function
|
|
1797
|
-
return n.hasSlotContent ? (Y(), X("div",
|
|
1815
|
+
function kt(n, e, t, s, r, o) {
|
|
1816
|
+
return n.hasSlotContent ? (Y(), X("div", _t, [
|
|
1798
1817
|
ae("div", Pe({
|
|
1799
1818
|
ref: "customMarkerRef",
|
|
1800
1819
|
style: { cursor: n.$attrs.onClick ? "pointer" : void 0 }
|
|
@@ -1803,7 +1822,7 @@ function bt(n, e, t, s, r, o) {
|
|
|
1803
1822
|
], 16)
|
|
1804
1823
|
])) : Oe("", !0);
|
|
1805
1824
|
}
|
|
1806
|
-
const
|
|
1825
|
+
const $t = /* @__PURE__ */ te(wt, [["render", kt], ["__scopeId", "data-v-2d2d343a"]]), Rt = P({
|
|
1807
1826
|
name: "HeatmapLayer",
|
|
1808
1827
|
props: {
|
|
1809
1828
|
options: {
|
|
@@ -1812,19 +1831,19 @@ const jt = /* @__PURE__ */ te(kt, [["render", bt], ["__scopeId", "data-v-2d2d343
|
|
|
1812
1831
|
}
|
|
1813
1832
|
},
|
|
1814
1833
|
setup(n) {
|
|
1815
|
-
const e = y(), t = C(
|
|
1834
|
+
const e = y(), t = C(N, y()), s = C(U, y());
|
|
1816
1835
|
return O(
|
|
1817
1836
|
[t, () => n.options],
|
|
1818
1837
|
([r, o], [a, l]) => {
|
|
1819
|
-
var
|
|
1820
|
-
const i =
|
|
1838
|
+
var d;
|
|
1839
|
+
const i = !$(o, l) || t.value !== a;
|
|
1821
1840
|
if (t.value && s.value && i) {
|
|
1822
1841
|
const u = structuredClone(o);
|
|
1823
1842
|
if (u.data && !(u.data instanceof s.value.MVCArray)) {
|
|
1824
1843
|
const c = s.value.LatLng;
|
|
1825
|
-
u.data = (
|
|
1844
|
+
u.data = (d = u.data) == null ? void 0 : d.map((h) => h instanceof c || "location" in h && (h.location instanceof c || h.location === null) ? h : "location" in h ? { ...h, location: new c(h.location) } : new c(h));
|
|
1826
1845
|
}
|
|
1827
|
-
e.value ? e.value.setOptions(u) : e.value =
|
|
1846
|
+
e.value ? e.value.setOptions(u) : e.value = I(
|
|
1828
1847
|
new s.value.visualization.HeatmapLayer({
|
|
1829
1848
|
...u,
|
|
1830
1849
|
map: t.value
|
|
@@ -1840,15 +1859,15 @@ const jt = /* @__PURE__ */ te(kt, [["render", bt], ["__scopeId", "data-v-2d2d343
|
|
|
1840
1859
|
render: () => null
|
|
1841
1860
|
});
|
|
1842
1861
|
export {
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1862
|
+
St as Circle,
|
|
1863
|
+
It as CustomControl,
|
|
1864
|
+
$t as CustomMarker,
|
|
1865
|
+
Et as GoogleMap,
|
|
1866
|
+
Rt as HeatmapLayer,
|
|
1867
|
+
At as InfoWindow,
|
|
1868
|
+
Pt as Marker,
|
|
1869
|
+
Tt as MarkerCluster,
|
|
1870
|
+
xt as Polygon,
|
|
1871
|
+
Ot as Polyline,
|
|
1872
|
+
Lt as Rectangle
|
|
1854
1873
|
};
|