vue3-google-map 0.20.0 → 0.21.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 -0
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +428 -379
- package/dist/index.umd.js +5 -5
- package/dist/types/components/AdvancedMarker.d.ts +26 -0
- package/dist/types/components/GoogleMap.vue.d.ts +4 -3
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/shared/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.mjs
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-
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var se = (n, e, t) => (
|
|
5
|
-
import { defineComponent as P, ref as y, provide as
|
|
6
|
-
const
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-d05fc6bc]{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(d){console.error("vite-plugin-css-injected-by-js",d)}})();
|
|
2
|
+
var Be = Object.defineProperty;
|
|
3
|
+
var Ze = (n, e, t) => e in n ? Be(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
4
|
+
var se = (n, e, t) => (Ze(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
5
|
+
import { defineComponent as P, ref as y, provide as U, watch as x, onMounted as Pe, onBeforeUnmount as q, markRaw as S, toRef as $, openBlock as Y, createElementBlock as X, createElementVNode as ae, renderSlot as Q, normalizeProps as Ne, guardReactiveProps as Ue, inject as b, computed as H, Comment as xe, mergeProps as Le, createCommentVNode as Se } from "vue";
|
|
6
|
+
const B = Symbol("map"), Z = Symbol("api"), le = Symbol("marker"), ce = Symbol("markerCluster"), ee = Symbol("CustomMarker"), Ae = Symbol("mapTilesLoaded"), F = [
|
|
7
7
|
"click",
|
|
8
8
|
"dblclick",
|
|
9
9
|
"drag",
|
|
@@ -30,34 +30,34 @@ 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 De(n, e, t, s) {
|
|
34
34
|
function r(o) {
|
|
35
|
-
return o instanceof t ? o : new t(function(
|
|
36
|
-
|
|
35
|
+
return o instanceof t ? o : new t(function(i) {
|
|
36
|
+
i(o);
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
return new (t || (t = Promise))(function(o,
|
|
39
|
+
return new (t || (t = Promise))(function(o, i) {
|
|
40
40
|
function l(u) {
|
|
41
41
|
try {
|
|
42
42
|
d(s.next(u));
|
|
43
43
|
} catch (c) {
|
|
44
|
-
|
|
44
|
+
i(c);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function a(u) {
|
|
48
48
|
try {
|
|
49
49
|
d(s.throw(u));
|
|
50
50
|
} catch (c) {
|
|
51
|
-
|
|
51
|
+
i(c);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
function d(u) {
|
|
55
|
-
u.done ? o(u.value) : r(u.value).then(l,
|
|
55
|
+
u.done ? o(u.value) : r(u.value).then(l, a);
|
|
56
56
|
}
|
|
57
57
|
d((s = s.apply(n, e || [])).next());
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
var
|
|
60
|
+
var Fe = function n(e, t) {
|
|
61
61
|
if (e === t)
|
|
62
62
|
return !0;
|
|
63
63
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
@@ -84,20 +84,20 @@ var De = function n(e, t) {
|
|
|
84
84
|
if (!Object.prototype.hasOwnProperty.call(t, o[r]))
|
|
85
85
|
return !1;
|
|
86
86
|
for (r = s; r-- !== 0; ) {
|
|
87
|
-
var
|
|
88
|
-
if (!n(e[
|
|
87
|
+
var i = o[r];
|
|
88
|
+
if (!n(e[i], t[i]))
|
|
89
89
|
return !1;
|
|
90
90
|
}
|
|
91
91
|
return !0;
|
|
92
92
|
}
|
|
93
93
|
return e !== e && t !== t;
|
|
94
94
|
};
|
|
95
|
-
const
|
|
96
|
-
var
|
|
95
|
+
const pe = "__googleMapsScriptId";
|
|
96
|
+
var N;
|
|
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
|
-
})(
|
|
100
|
-
class
|
|
99
|
+
})(N || (N = {}));
|
|
100
|
+
class j {
|
|
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 T {
|
|
|
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 = pe, language: i, libraries: l = [], mapIds: a, 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 || pe, this.language = i, this.libraries = l, this.mapIds = a, this.nonce = d, this.region = u, this.retries = c, this.url = h, this.version = p, j.instance) {
|
|
112
|
+
if (!Fe(this.options, j.instance.options))
|
|
113
|
+
throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(j.instance.options)}`);
|
|
114
|
+
return j.instance;
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
j.instance = this;
|
|
117
117
|
}
|
|
118
118
|
get options() {
|
|
119
119
|
return {
|
|
@@ -132,7 +132,7 @@ class T {
|
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
134
|
get status() {
|
|
135
|
-
return this.errors.length ?
|
|
135
|
+
return this.errors.length ? N.FAILURE : this.done ? N.SUCCESS : this.loading ? N.LOADING : N.INITIALIZED;
|
|
136
136
|
}
|
|
137
137
|
get failed() {
|
|
138
138
|
return this.done && !this.loading && this.errors.length >= this.retries + 1;
|
|
@@ -205,24 +205,24 @@ class T {
|
|
|
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
|
|
208
|
+
let i, l, a, d = "The Google Maps JavaScript API", u = "google", c = "importLibrary", h = "__ib__", p = document, m = window;
|
|
209
209
|
m = m[u] || (m[u] = {});
|
|
210
210
|
const f = m.maps || (m.maps = {}), g = /* @__PURE__ */ new Set(), v = new URLSearchParams(), w = () => (
|
|
211
211
|
// @ts-ignore
|
|
212
|
-
|
|
213
|
-
var
|
|
212
|
+
i || (i = new Promise((_, O) => De(this, void 0, void 0, function* () {
|
|
213
|
+
var M;
|
|
214
214
|
yield l = p.createElement("script"), l.id = this.id, v.set("libraries", [...g] + "");
|
|
215
|
-
for (
|
|
216
|
-
v.set(
|
|
217
|
-
v.set("callback", u + ".maps." + h), l.src = this.url + "?" + v, f[h] = _, l.onerror = () =>
|
|
215
|
+
for (a in o)
|
|
216
|
+
v.set(a.replace(/[A-Z]/g, (E) => "_" + E[0].toLowerCase()), o[a]);
|
|
217
|
+
v.set("callback", u + ".maps." + h), l.src = this.url + "?" + v, f[h] = _, l.onerror = () => i = O(Error(d + " could not load.")), l.nonce = this.nonce || ((M = p.querySelector("script[nonce]")) === null || M === void 0 ? void 0 : M.nonce) || "", p.head.append(l);
|
|
218
218
|
})))
|
|
219
219
|
);
|
|
220
|
-
f[c] ? console.warn(d + " only loads once. Ignoring:", o) : f[c] = (_, ...
|
|
220
|
+
f[c] ? console.warn(d + " only loads once. Ignoring:", o) : f[c] = (_, ...O) => g.add(_) && w().then(() => f[c](_, ...O));
|
|
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) => {
|
|
224
|
-
const
|
|
225
|
-
this.loadErrorCallback(
|
|
224
|
+
const i = new ErrorEvent("error", { error: o });
|
|
225
|
+
this.loadErrorCallback(i);
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
@@ -260,7 +260,7 @@ class T {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function Ve(n) {
|
|
264
264
|
return class extends n.OverlayView {
|
|
265
265
|
constructor(s) {
|
|
266
266
|
super();
|
|
@@ -290,37 +290,37 @@ function Fe(n) {
|
|
|
290
290
|
const s = this.getProjection(), r = s == null ? void 0 : s.fromLatLngToDivPixel(this.getPosition());
|
|
291
291
|
if (r) {
|
|
292
292
|
this.element.style.position = "absolute";
|
|
293
|
-
const o = this.element.offsetHeight,
|
|
294
|
-
let l,
|
|
293
|
+
const o = this.element.offsetHeight, i = this.element.offsetWidth;
|
|
294
|
+
let l, a;
|
|
295
295
|
switch (this.opts.anchorPoint) {
|
|
296
296
|
case "TOP_CENTER":
|
|
297
|
-
l = r.x -
|
|
297
|
+
l = r.x - i / 2, a = r.y;
|
|
298
298
|
break;
|
|
299
299
|
case "BOTTOM_CENTER":
|
|
300
|
-
l = r.x -
|
|
300
|
+
l = r.x - i / 2, a = r.y - o;
|
|
301
301
|
break;
|
|
302
302
|
case "LEFT_CENTER":
|
|
303
|
-
l = r.x,
|
|
303
|
+
l = r.x, a = r.y - o / 2;
|
|
304
304
|
break;
|
|
305
305
|
case "RIGHT_CENTER":
|
|
306
|
-
l = r.x -
|
|
306
|
+
l = r.x - i, a = r.y - o / 2;
|
|
307
307
|
break;
|
|
308
308
|
case "TOP_LEFT":
|
|
309
|
-
l = r.x,
|
|
309
|
+
l = r.x, a = r.y;
|
|
310
310
|
break;
|
|
311
311
|
case "TOP_RIGHT":
|
|
312
|
-
l = r.x -
|
|
312
|
+
l = r.x - i, a = r.y;
|
|
313
313
|
break;
|
|
314
314
|
case "BOTTOM_LEFT":
|
|
315
|
-
l = r.x,
|
|
315
|
+
l = r.x, a = r.y - o;
|
|
316
316
|
break;
|
|
317
317
|
case "BOTTOM_RIGHT":
|
|
318
|
-
l = r.x -
|
|
318
|
+
l = r.x - i, a = r.y - o;
|
|
319
319
|
break;
|
|
320
320
|
default:
|
|
321
|
-
l = r.x -
|
|
321
|
+
l = r.x - i / 2, a = r.y - o / 2;
|
|
322
322
|
}
|
|
323
|
-
this.element.style.left = l + "px", this.element.style.top =
|
|
323
|
+
this.element.style.left = l + "px", this.element.style.top = a + "px", this.element.style.transform = `translateX(${this.opts.offsetX || 0}px) translateY(${this.opts.offsetY || 0}px)`, this.opts.zIndex && (this.element.style.zIndex = this.opts.zIndex.toString());
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
onRemove() {
|
|
@@ -332,8 +332,8 @@ function Fe(n) {
|
|
|
332
332
|
}
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
|
-
let
|
|
336
|
-
const
|
|
335
|
+
let fe;
|
|
336
|
+
const me = [
|
|
337
337
|
"bounds_changed",
|
|
338
338
|
"center_changed",
|
|
339
339
|
"click",
|
|
@@ -356,7 +356,7 @@ const pe = [
|
|
|
356
356
|
"tilesloaded",
|
|
357
357
|
"tilt_changed",
|
|
358
358
|
"zoom_changed"
|
|
359
|
-
],
|
|
359
|
+
], ze = P({
|
|
360
360
|
props: {
|
|
361
361
|
apiPromise: {
|
|
362
362
|
type: Promise
|
|
@@ -371,7 +371,7 @@ const pe = [
|
|
|
371
371
|
},
|
|
372
372
|
libraries: {
|
|
373
373
|
type: Array,
|
|
374
|
-
default: () => ["places"]
|
|
374
|
+
default: () => ["places", "marker"]
|
|
375
375
|
},
|
|
376
376
|
region: {
|
|
377
377
|
type: String,
|
|
@@ -553,10 +553,10 @@ const pe = [
|
|
|
553
553
|
default: ""
|
|
554
554
|
}
|
|
555
555
|
},
|
|
556
|
-
emits:
|
|
556
|
+
emits: me,
|
|
557
557
|
setup(n, { emit: e }) {
|
|
558
|
-
const t = y(), s = y(!1), r = y(), o = y(),
|
|
559
|
-
|
|
558
|
+
const t = y(), s = y(!1), r = y(), o = y(), i = y(!1);
|
|
559
|
+
U(B, r), U(Z, o), U(Ae, i);
|
|
560
560
|
const l = () => {
|
|
561
561
|
const c = { ...n };
|
|
562
562
|
Object.keys(c).forEach((f) => {
|
|
@@ -575,49 +575,49 @@ const pe = [
|
|
|
575
575
|
disableDefaultUI: n.disableDefaultUi
|
|
576
576
|
};
|
|
577
577
|
return { ...c, ...m };
|
|
578
|
-
},
|
|
578
|
+
}, a = x(
|
|
579
579
|
[o, r],
|
|
580
580
|
([c, h]) => {
|
|
581
581
|
const p = c, m = h;
|
|
582
582
|
p && m && (p.event.addListenerOnce(m, "tilesloaded", () => {
|
|
583
|
-
|
|
584
|
-
}), setTimeout(
|
|
583
|
+
i.value = !0;
|
|
584
|
+
}), setTimeout(a, 0));
|
|
585
585
|
},
|
|
586
586
|
{ immediate: !0 }
|
|
587
587
|
), d = () => {
|
|
588
588
|
try {
|
|
589
589
|
const { apiKey: c, region: h, version: p, language: m, libraries: f, nonce: g } = n;
|
|
590
|
-
|
|
590
|
+
fe = new j({ apiKey: c, region: h, version: p, language: m, libraries: f, nonce: g });
|
|
591
591
|
} catch (c) {
|
|
592
592
|
console.error(c);
|
|
593
593
|
}
|
|
594
594
|
}, u = (c) => {
|
|
595
|
-
o.value =
|
|
596
|
-
const h =
|
|
597
|
-
o.value[ee] = h,
|
|
595
|
+
o.value = S(c.maps), r.value = S(new c.maps.Map(t.value, l()));
|
|
596
|
+
const h = Ve(o.value);
|
|
597
|
+
o.value[ee] = h, me.forEach((m) => {
|
|
598
598
|
var f;
|
|
599
599
|
(f = r.value) == null || f.addListener(m, (g) => e(m, g));
|
|
600
600
|
}), s.value = !0;
|
|
601
601
|
const p = Object.keys(n).filter(
|
|
602
602
|
(m) => !["apiPromise", "apiKey", "version", "libraries", "region", "language", "center", "zoom", "nonce"].includes(m)
|
|
603
|
-
).map((m) =>
|
|
604
|
-
|
|
603
|
+
).map((m) => $(n, m));
|
|
604
|
+
x(
|
|
605
605
|
[() => n.center, () => n.zoom, ...p],
|
|
606
606
|
([m, f], [g, v]) => {
|
|
607
|
-
var
|
|
608
|
-
const { center: w, zoom: _, ...
|
|
609
|
-
(
|
|
610
|
-
const
|
|
611
|
-
m &&
|
|
607
|
+
var E, k, L;
|
|
608
|
+
const { center: w, zoom: _, ...O } = l();
|
|
609
|
+
(E = r.value) == null || E.setOptions(O), f !== void 0 && f !== v && ((k = r.value) == null || k.setZoom(f));
|
|
610
|
+
const M = !g || m.lng !== g.lng || m.lat !== g.lat;
|
|
611
|
+
m && M && ((L = r.value) == null || L.panTo(m));
|
|
612
612
|
}
|
|
613
613
|
);
|
|
614
614
|
};
|
|
615
|
-
return
|
|
616
|
-
n.apiPromise && n.apiPromise instanceof Promise ? n.apiPromise.then(u) : (d(),
|
|
617
|
-
}),
|
|
615
|
+
return Pe(() => {
|
|
616
|
+
n.apiPromise && n.apiPromise instanceof Promise ? n.apiPromise.then(u) : (d(), fe.load().then(u));
|
|
617
|
+
}), q(() => {
|
|
618
618
|
var c;
|
|
619
|
-
|
|
620
|
-
}), { mapRef: t, ready: s, map: r, api: o, mapTilesLoaded:
|
|
619
|
+
i.value = !1, r.value && ((c = o.value) == null || c.event.clearInstanceListeners(r.value));
|
|
620
|
+
}), { mapRef: t, ready: s, map: r, api: o, mapTilesLoaded: i };
|
|
621
621
|
}
|
|
622
622
|
});
|
|
623
623
|
const te = (n, e) => {
|
|
@@ -625,21 +625,21 @@ const te = (n, e) => {
|
|
|
625
625
|
for (const [s, r] of e)
|
|
626
626
|
t[s] = r;
|
|
627
627
|
return t;
|
|
628
|
-
},
|
|
628
|
+
}, Ge = {
|
|
629
629
|
ref: "mapRef",
|
|
630
630
|
class: "mapdiv"
|
|
631
631
|
};
|
|
632
|
-
function
|
|
632
|
+
function He(n, e, t, s, r, o) {
|
|
633
633
|
return Y(), X("div", null, [
|
|
634
|
-
ae("div",
|
|
635
|
-
Q(n.$slots, "default",
|
|
634
|
+
ae("div", Ge, null, 512),
|
|
635
|
+
Q(n.$slots, "default", Ne(Ue({ ready: n.ready, map: n.map, api: n.api, mapTilesLoaded: n.mapTilesLoaded })), void 0, !0)
|
|
636
636
|
]);
|
|
637
637
|
}
|
|
638
|
-
const Et = /* @__PURE__ */ te(
|
|
639
|
-
function
|
|
638
|
+
const Et = /* @__PURE__ */ te(ze, [["render", He], ["__scopeId", "data-v-d05fc6bc"]]);
|
|
639
|
+
function We(n) {
|
|
640
640
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
641
641
|
}
|
|
642
|
-
var
|
|
642
|
+
var Ke = function n(e, t) {
|
|
643
643
|
if (e === t)
|
|
644
644
|
return !0;
|
|
645
645
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
@@ -666,33 +666,81 @@ var We = function n(e, t) {
|
|
|
666
666
|
if (!Object.prototype.hasOwnProperty.call(t, o[r]))
|
|
667
667
|
return !1;
|
|
668
668
|
for (r = s; r-- !== 0; ) {
|
|
669
|
-
var
|
|
670
|
-
if (!n(e[
|
|
669
|
+
var i = o[r];
|
|
670
|
+
if (!n(e[i], t[i]))
|
|
671
671
|
return !1;
|
|
672
672
|
}
|
|
673
673
|
return !0;
|
|
674
674
|
}
|
|
675
675
|
return e !== e && t !== t;
|
|
676
676
|
};
|
|
677
|
-
const
|
|
678
|
-
|
|
679
|
-
|
|
677
|
+
const A = /* @__PURE__ */ We(Ke), ge = ["click", "drag", "dragend", "dragstart", "gmp-click"], Pt = P({
|
|
678
|
+
name: "AdvancedMarker",
|
|
679
|
+
props: {
|
|
680
|
+
options: {
|
|
681
|
+
type: Object,
|
|
682
|
+
required: !0
|
|
683
|
+
},
|
|
684
|
+
pinOptions: {
|
|
685
|
+
type: Object,
|
|
686
|
+
required: !1
|
|
687
|
+
}
|
|
688
|
+
},
|
|
689
|
+
emits: ge,
|
|
690
|
+
setup(n, { emit: e, expose: t, slots: s }) {
|
|
691
|
+
const r = $(n, "options"), o = $(n, "pinOptions"), i = y(), l = b(B, y()), a = b(Z, y()), d = b(ce, y()), u = H(
|
|
692
|
+
() => !!(d.value && a.value && i.value instanceof google.maps.marker.AdvancedMarkerElement)
|
|
693
|
+
);
|
|
694
|
+
return x(
|
|
695
|
+
[l, r, o],
|
|
696
|
+
async (c, [h, p, m]) => {
|
|
697
|
+
var _, O, M;
|
|
698
|
+
const g = !A(r.value, p) || !A(o.value, m) || l.value !== h;
|
|
699
|
+
if (!l.value || !a.value || !g)
|
|
700
|
+
return;
|
|
701
|
+
const { AdvancedMarkerElement: v, PinElement: w } = a.value.marker;
|
|
702
|
+
if (i.value) {
|
|
703
|
+
const { map: E, content: k, ...L } = r.value;
|
|
704
|
+
Object.assign(i.value, {
|
|
705
|
+
content: o.value ? new w(o.value).element : k,
|
|
706
|
+
...L
|
|
707
|
+
}), u.value && ((_ = d.value) == null || _.removeMarker(i.value), (O = d.value) == null || O.addMarker(i.value));
|
|
708
|
+
} else
|
|
709
|
+
o.value && (r.value.content = new w(o.value).element), i.value = S(new v(r.value)), u.value ? (M = d.value) == null || M.addMarker(i.value) : i.value.map = l.value, ge.forEach((E) => {
|
|
710
|
+
var k;
|
|
711
|
+
(k = i.value) == null || k.addListener(E, (L) => e(E, L));
|
|
712
|
+
});
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
immediate: !0
|
|
716
|
+
}
|
|
717
|
+
), q(() => {
|
|
718
|
+
var c, h;
|
|
719
|
+
i.value && ((c = a.value) == null || c.event.clearInstanceListeners(i.value), u.value ? (h = d.value) == null || h.removeMarker(i.value) : i.value.map = null);
|
|
720
|
+
}), U(le, i), t({ marker: i }), () => {
|
|
721
|
+
var c;
|
|
722
|
+
return (c = s.default) == null ? void 0 : c.call(s);
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
}), Je = (n) => n === "Marker", Ye = (n) => n === ee, V = (n, e, t, s) => {
|
|
726
|
+
const r = y(), o = b(B, y()), i = b(Z, y()), l = b(ce, y()), a = H(
|
|
727
|
+
() => !!(l.value && i.value && (r.value instanceof i.value.Marker || r.value instanceof i.value[ee]))
|
|
680
728
|
);
|
|
681
|
-
return
|
|
729
|
+
return x(
|
|
682
730
|
[o, t],
|
|
683
731
|
(d, [u, c]) => {
|
|
684
732
|
var p, m, f;
|
|
685
|
-
const h =
|
|
686
|
-
!o.value || !
|
|
687
|
-
new
|
|
688
|
-
) :
|
|
689
|
-
new
|
|
690
|
-
) : r.value =
|
|
691
|
-
new
|
|
733
|
+
const h = !A(t.value, c) || o.value !== u;
|
|
734
|
+
!o.value || !i.value || !h || (r.value ? (r.value.setOptions(t.value), a.value && ((p = l.value) == null || p.removeMarker(r.value), (m = l.value) == null || m.addMarker(r.value))) : (Je(n) ? r.value = S(
|
|
735
|
+
new i.value[n](t.value)
|
|
736
|
+
) : Ye(n) ? r.value = S(
|
|
737
|
+
new i.value[n](t.value)
|
|
738
|
+
) : r.value = S(
|
|
739
|
+
new i.value[n]({
|
|
692
740
|
...t.value,
|
|
693
741
|
map: o.value
|
|
694
742
|
})
|
|
695
|
-
),
|
|
743
|
+
), a.value ? (f = l.value) == null || f.addMarker(r.value) : r.value.setMap(o.value), e.forEach((g) => {
|
|
696
744
|
var v;
|
|
697
745
|
(v = r.value) == null || v.addListener(g, (w) => s(g, w));
|
|
698
746
|
})));
|
|
@@ -700,11 +748,11 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
|
|
|
700
748
|
{
|
|
701
749
|
immediate: !0
|
|
702
750
|
}
|
|
703
|
-
),
|
|
751
|
+
), q(() => {
|
|
704
752
|
var d, u;
|
|
705
|
-
r.value && ((d =
|
|
753
|
+
r.value && ((d = i.value) == null || d.event.clearInstanceListeners(r.value), a.value ? (u = l.value) == null || u.removeMarker(r.value) : r.value.setMap(null));
|
|
706
754
|
}), r;
|
|
707
|
-
},
|
|
755
|
+
}, ve = [
|
|
708
756
|
"animation_changed",
|
|
709
757
|
"click",
|
|
710
758
|
"dblclick",
|
|
@@ -728,7 +776,7 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
|
|
|
728
776
|
"shape_changed",
|
|
729
777
|
"title_changed",
|
|
730
778
|
"visible_changed"
|
|
731
|
-
],
|
|
779
|
+
], xt = P({
|
|
732
780
|
name: "Marker",
|
|
733
781
|
props: {
|
|
734
782
|
options: {
|
|
@@ -736,15 +784,15 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
|
|
|
736
784
|
required: !0
|
|
737
785
|
}
|
|
738
786
|
},
|
|
739
|
-
emits:
|
|
787
|
+
emits: ve,
|
|
740
788
|
setup(n, { emit: e, expose: t, slots: s }) {
|
|
741
|
-
const r =
|
|
742
|
-
return
|
|
743
|
-
var
|
|
744
|
-
return (
|
|
789
|
+
const r = $(n, "options"), o = V("Marker", ve, r, e);
|
|
790
|
+
return U(le, o), t({ marker: o }), () => {
|
|
791
|
+
var i;
|
|
792
|
+
return (i = s.default) == null ? void 0 : i.call(s);
|
|
745
793
|
};
|
|
746
794
|
}
|
|
747
|
-
}),
|
|
795
|
+
}), Lt = P({
|
|
748
796
|
name: "Polyline",
|
|
749
797
|
props: {
|
|
750
798
|
options: {
|
|
@@ -752,13 +800,13 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
|
|
|
752
800
|
required: !0
|
|
753
801
|
}
|
|
754
802
|
},
|
|
755
|
-
emits:
|
|
803
|
+
emits: F,
|
|
756
804
|
setup(n, { emit: e }) {
|
|
757
|
-
const t =
|
|
758
|
-
return { polyline:
|
|
805
|
+
const t = $(n, "options");
|
|
806
|
+
return { polyline: V("Polyline", F, t, e) };
|
|
759
807
|
},
|
|
760
808
|
render: () => null
|
|
761
|
-
}),
|
|
809
|
+
}), St = P({
|
|
762
810
|
name: "Polygon",
|
|
763
811
|
props: {
|
|
764
812
|
options: {
|
|
@@ -766,13 +814,13 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
|
|
|
766
814
|
required: !0
|
|
767
815
|
}
|
|
768
816
|
},
|
|
769
|
-
emits:
|
|
817
|
+
emits: F,
|
|
770
818
|
setup(n, { emit: e }) {
|
|
771
|
-
const t =
|
|
772
|
-
return { polygon:
|
|
819
|
+
const t = $(n, "options");
|
|
820
|
+
return { polygon: V("Polygon", F, t, e) };
|
|
773
821
|
},
|
|
774
822
|
render: () => null
|
|
775
|
-
}),
|
|
823
|
+
}), ye = F.concat(["bounds_changed"]), At = P({
|
|
776
824
|
name: "Rectangle",
|
|
777
825
|
props: {
|
|
778
826
|
options: {
|
|
@@ -780,13 +828,13 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
|
|
|
780
828
|
required: !0
|
|
781
829
|
}
|
|
782
830
|
},
|
|
783
|
-
emits:
|
|
831
|
+
emits: ye,
|
|
784
832
|
setup(n, { emit: e }) {
|
|
785
|
-
const t =
|
|
786
|
-
return { rectangle:
|
|
833
|
+
const t = $(n, "options");
|
|
834
|
+
return { rectangle: V("Rectangle", ye, t, e) };
|
|
787
835
|
},
|
|
788
836
|
render: () => null
|
|
789
|
-
}),
|
|
837
|
+
}), we = F.concat(["center_changed", "radius_changed"]), It = P({
|
|
790
838
|
name: "Circle",
|
|
791
839
|
props: {
|
|
792
840
|
options: {
|
|
@@ -794,13 +842,13 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
|
|
|
794
842
|
required: !0
|
|
795
843
|
}
|
|
796
844
|
},
|
|
797
|
-
emits:
|
|
845
|
+
emits: we,
|
|
798
846
|
setup(n, { emit: e }) {
|
|
799
|
-
const t =
|
|
800
|
-
return { circle:
|
|
847
|
+
const t = $(n, "options");
|
|
848
|
+
return { circle: V("Circle", we, t, e) };
|
|
801
849
|
},
|
|
802
850
|
render: () => null
|
|
803
|
-
}),
|
|
851
|
+
}), Xe = P({
|
|
804
852
|
props: {
|
|
805
853
|
position: {
|
|
806
854
|
type: String,
|
|
@@ -813,10 +861,10 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
|
|
|
813
861
|
},
|
|
814
862
|
emits: ["content:loaded"],
|
|
815
863
|
setup(n, { emit: e }) {
|
|
816
|
-
const t = y(null), s =
|
|
864
|
+
const t = y(null), s = b(B, y()), r = b(Z, y()), o = b(Ae, y(!1)), i = x(
|
|
817
865
|
[o, r, t],
|
|
818
866
|
([d, u, c]) => {
|
|
819
|
-
u && d && c && (l(n.position), e("content:loaded"), setTimeout(
|
|
867
|
+
u && d && c && (l(n.position), e("content:loaded"), setTimeout(i, 0));
|
|
820
868
|
},
|
|
821
869
|
{ immediate: !0 }
|
|
822
870
|
), l = (d) => {
|
|
@@ -824,7 +872,7 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
|
|
|
824
872
|
const u = r.value.ControlPosition[d];
|
|
825
873
|
s.value.controls[u].push(t.value);
|
|
826
874
|
}
|
|
827
|
-
},
|
|
875
|
+
}, a = (d) => {
|
|
828
876
|
if (s.value && r.value) {
|
|
829
877
|
let u = null;
|
|
830
878
|
const c = r.value.ControlPosition[d];
|
|
@@ -833,12 +881,12 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
|
|
|
833
881
|
}), u !== null && s.value.controls[c].removeAt(u);
|
|
834
882
|
}
|
|
835
883
|
};
|
|
836
|
-
return
|
|
884
|
+
return q(() => a(n.position)), x(
|
|
837
885
|
() => n.position,
|
|
838
886
|
(d, u) => {
|
|
839
|
-
|
|
887
|
+
a(u), l(d);
|
|
840
888
|
}
|
|
841
|
-
),
|
|
889
|
+
), x(
|
|
842
890
|
() => n.index,
|
|
843
891
|
(d) => {
|
|
844
892
|
d && t.value && (t.value.index = n.index);
|
|
@@ -846,16 +894,16 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
|
|
|
846
894
|
), { controlRef: t };
|
|
847
895
|
}
|
|
848
896
|
});
|
|
849
|
-
const
|
|
897
|
+
const Qe = {
|
|
850
898
|
ref: "controlRef",
|
|
851
899
|
class: "custom-control-wrapper"
|
|
852
900
|
};
|
|
853
|
-
function
|
|
854
|
-
return Y(), X("div",
|
|
901
|
+
function et(n, e, t, s, r, o) {
|
|
902
|
+
return Y(), X("div", Qe, [
|
|
855
903
|
Q(n.$slots, "default", {}, void 0, !0)
|
|
856
904
|
], 512);
|
|
857
905
|
}
|
|
858
|
-
const
|
|
906
|
+
const Tt = /* @__PURE__ */ te(Xe, [["render", et], ["__scopeId", "data-v-d099a3a6"]]), _e = ["closeclick", "content_changed", "domready", "position_changed", "visible", "zindex_changed"], tt = P({
|
|
859
907
|
inheritAttrs: !1,
|
|
860
908
|
props: {
|
|
861
909
|
options: {
|
|
@@ -866,68 +914,68 @@ const It = /* @__PURE__ */ te(Ye, [["render", Qe], ["__scopeId", "data-v-d099a3a
|
|
|
866
914
|
type: Boolean
|
|
867
915
|
}
|
|
868
916
|
},
|
|
869
|
-
emits: [...
|
|
917
|
+
emits: [..._e, "update:modelValue"],
|
|
870
918
|
setup(n, { slots: e, emit: t, expose: s }) {
|
|
871
|
-
const r = y(), o = y(),
|
|
919
|
+
const r = y(), o = y(), i = b(B, y()), l = b(Z, y()), a = b(le, y());
|
|
872
920
|
let d, u = n.modelValue;
|
|
873
|
-
const c =
|
|
921
|
+
const c = H(() => {
|
|
874
922
|
var f;
|
|
875
|
-
return (f = e.default) == null ? void 0 : f.call(e).some((g) => g.type !==
|
|
923
|
+
return (f = e.default) == null ? void 0 : f.call(e).some((g) => g.type !== xe);
|
|
876
924
|
}), h = (f) => {
|
|
877
925
|
u = f, t("update:modelValue", f);
|
|
878
926
|
}, p = (f) => {
|
|
879
|
-
r.value && (r.value.open({ map:
|
|
927
|
+
r.value && (r.value.open({ map: i.value, anchor: a.value, ...f }), h(!0));
|
|
880
928
|
}, m = () => {
|
|
881
929
|
r.value && (r.value.close(), h(!1));
|
|
882
930
|
};
|
|
883
|
-
return
|
|
884
|
-
|
|
885
|
-
[
|
|
931
|
+
return Pe(() => {
|
|
932
|
+
x(
|
|
933
|
+
[i, () => n.options],
|
|
886
934
|
([f, g], [v, w]) => {
|
|
887
|
-
var
|
|
888
|
-
const _ =
|
|
889
|
-
|
|
935
|
+
var O;
|
|
936
|
+
const _ = !A(g, w) || i.value !== v;
|
|
937
|
+
i.value && l.value && _ && (r.value ? (r.value.setOptions({
|
|
890
938
|
...g,
|
|
891
939
|
content: c.value ? o.value : g.content
|
|
892
|
-
}),
|
|
940
|
+
}), a.value || p()) : (r.value = S(
|
|
893
941
|
new l.value.InfoWindow({
|
|
894
942
|
...g,
|
|
895
943
|
content: c.value ? o.value : g.content
|
|
896
944
|
})
|
|
897
|
-
),
|
|
945
|
+
), a.value && (d = a.value.addListener("click", () => {
|
|
898
946
|
p();
|
|
899
|
-
})), (!
|
|
900
|
-
var
|
|
901
|
-
(
|
|
902
|
-
}), (
|
|
947
|
+
})), (!a.value || u) && p(), _e.forEach((M) => {
|
|
948
|
+
var E;
|
|
949
|
+
(E = r.value) == null || E.addListener(M, (k) => t(M, k));
|
|
950
|
+
}), (O = r.value) == null || O.addListener("closeclick", () => h(!1))));
|
|
903
951
|
},
|
|
904
952
|
{
|
|
905
953
|
immediate: !0
|
|
906
954
|
}
|
|
907
|
-
),
|
|
955
|
+
), x(
|
|
908
956
|
() => n.modelValue,
|
|
909
957
|
(f) => {
|
|
910
958
|
f !== u && (f ? p() : m());
|
|
911
959
|
}
|
|
912
960
|
);
|
|
913
|
-
}),
|
|
961
|
+
}), q(() => {
|
|
914
962
|
var f;
|
|
915
963
|
d && d.remove(), r.value && ((f = l.value) == null || f.event.clearInstanceListeners(r.value), m());
|
|
916
964
|
}), s({ infoWindow: r, open: p, close: m }), { infoWindow: r, infoWindowRef: o, hasSlotContent: c, open: p, close: m };
|
|
917
965
|
}
|
|
918
966
|
});
|
|
919
|
-
const
|
|
967
|
+
const st = {
|
|
920
968
|
key: 0,
|
|
921
969
|
class: "info-window-wrapper"
|
|
922
970
|
};
|
|
923
|
-
function
|
|
924
|
-
return n.hasSlotContent ? (Y(), X("div",
|
|
925
|
-
ae("div",
|
|
971
|
+
function rt(n, e, t, s, r, o) {
|
|
972
|
+
return n.hasSlotContent ? (Y(), X("div", st, [
|
|
973
|
+
ae("div", Le({ ref: "infoWindowRef" }, n.$attrs), [
|
|
926
974
|
Q(n.$slots, "default", {}, void 0, !0)
|
|
927
975
|
], 16)
|
|
928
|
-
])) :
|
|
976
|
+
])) : Se("", !0);
|
|
929
977
|
}
|
|
930
|
-
const
|
|
978
|
+
const $t = /* @__PURE__ */ te(tt, [["render", rt], ["__scopeId", "data-v-cbe1707b"]]), ke = [
|
|
931
979
|
Int8Array,
|
|
932
980
|
Uint8Array,
|
|
933
981
|
Uint8ClampedArray,
|
|
@@ -937,8 +985,8 @@ const At = /* @__PURE__ */ te(et, [["render", st], ["__scopeId", "data-v-cbe1707
|
|
|
937
985
|
Uint32Array,
|
|
938
986
|
Float32Array,
|
|
939
987
|
Float64Array
|
|
940
|
-
], re = 1,
|
|
941
|
-
class
|
|
988
|
+
], re = 1, z = 8;
|
|
989
|
+
class ue {
|
|
942
990
|
/**
|
|
943
991
|
* Creates an index from raw `ArrayBuffer` data.
|
|
944
992
|
* @param {ArrayBuffer} data
|
|
@@ -952,11 +1000,11 @@ class le {
|
|
|
952
1000
|
const r = s >> 4;
|
|
953
1001
|
if (r !== re)
|
|
954
1002
|
throw new Error(`Got v${r} data when expected v${re}.`);
|
|
955
|
-
const o =
|
|
1003
|
+
const o = ke[s & 15];
|
|
956
1004
|
if (!o)
|
|
957
1005
|
throw new Error("Unrecognized array type.");
|
|
958
|
-
const [
|
|
959
|
-
return new
|
|
1006
|
+
const [i] = new Uint16Array(e, 2, 1), [l] = new Uint32Array(e, 4, 1);
|
|
1007
|
+
return new ue(l, i, o, e);
|
|
960
1008
|
}
|
|
961
1009
|
/**
|
|
962
1010
|
* Creates an index that will hold a given number of items.
|
|
@@ -969,10 +1017,10 @@ class le {
|
|
|
969
1017
|
if (isNaN(e) || e < 0)
|
|
970
1018
|
throw new Error(`Unpexpected numItems value: ${e}.`);
|
|
971
1019
|
this.numItems = +e, this.nodeSize = Math.min(Math.max(+t, 2), 65535), this.ArrayType = s, this.IndexArrayType = e < 65536 ? Uint16Array : Uint32Array;
|
|
972
|
-
const o =
|
|
1020
|
+
const o = ke.indexOf(this.ArrayType), i = e * 2 * this.ArrayType.BYTES_PER_ELEMENT, l = e * this.IndexArrayType.BYTES_PER_ELEMENT, a = (8 - l % 8) % 8;
|
|
973
1021
|
if (o < 0)
|
|
974
1022
|
throw new Error(`Unexpected typed array class: ${s}.`);
|
|
975
|
-
r && r instanceof ArrayBuffer ? (this.data = r, this.ids = new this.IndexArrayType(this.data,
|
|
1023
|
+
r && r instanceof ArrayBuffer ? (this.data = r, this.ids = new this.IndexArrayType(this.data, z, e), this.coords = new this.ArrayType(this.data, z + l + a, e * 2), this._pos = e * 2, this._finished = !0) : (this.data = new ArrayBuffer(z + i + l + a), this.ids = new this.IndexArrayType(this.data, z, e), this.coords = new this.ArrayType(this.data, z + l + a, 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);
|
|
976
1024
|
}
|
|
977
1025
|
/**
|
|
978
1026
|
* Add a point to the index.
|
|
@@ -1004,18 +1052,18 @@ class le {
|
|
|
1004
1052
|
range(e, t, s, r) {
|
|
1005
1053
|
if (!this._finished)
|
|
1006
1054
|
throw new Error("Data not yet indexed - call index.finish().");
|
|
1007
|
-
const { ids: o, coords:
|
|
1008
|
-
for (;
|
|
1009
|
-
const u =
|
|
1055
|
+
const { ids: o, coords: i, nodeSize: l } = this, a = [0, o.length - 1, 0], d = [];
|
|
1056
|
+
for (; a.length; ) {
|
|
1057
|
+
const u = a.pop() || 0, c = a.pop() || 0, h = a.pop() || 0;
|
|
1010
1058
|
if (c - h <= l) {
|
|
1011
1059
|
for (let g = h; g <= c; g++) {
|
|
1012
|
-
const v =
|
|
1060
|
+
const v = i[2 * g], w = i[2 * g + 1];
|
|
1013
1061
|
v >= e && v <= s && w >= t && w <= r && d.push(o[g]);
|
|
1014
1062
|
}
|
|
1015
1063
|
continue;
|
|
1016
1064
|
}
|
|
1017
|
-
const p = h + c >> 1, m =
|
|
1018
|
-
m >= e && m <= s && f >= t && f <= r && d.push(o[p]), (u === 0 ? e <= m : t <= f) && (
|
|
1065
|
+
const p = h + c >> 1, m = i[2 * p], f = i[2 * p + 1];
|
|
1066
|
+
m >= e && m <= s && f >= t && f <= r && d.push(o[p]), (u === 0 ? e <= m : t <= f) && (a.push(h), a.push(p - 1), a.push(1 - u)), (u === 0 ? s >= m : r >= f) && (a.push(p + 1), a.push(c), a.push(1 - u));
|
|
1019
1067
|
}
|
|
1020
1068
|
return d;
|
|
1021
1069
|
}
|
|
@@ -1029,25 +1077,25 @@ class le {
|
|
|
1029
1077
|
within(e, t, s) {
|
|
1030
1078
|
if (!this._finished)
|
|
1031
1079
|
throw new Error("Data not yet indexed - call index.finish().");
|
|
1032
|
-
const { ids: r, coords: o, nodeSize:
|
|
1080
|
+
const { ids: r, coords: o, nodeSize: i } = this, l = [0, r.length - 1, 0], a = [], d = s * s;
|
|
1033
1081
|
for (; l.length; ) {
|
|
1034
1082
|
const u = l.pop() || 0, c = l.pop() || 0, h = l.pop() || 0;
|
|
1035
|
-
if (c - h <=
|
|
1083
|
+
if (c - h <= i) {
|
|
1036
1084
|
for (let g = h; g <= c; g++)
|
|
1037
|
-
|
|
1085
|
+
Ce(o[2 * g], o[2 * g + 1], e, t) <= d && a.push(r[g]);
|
|
1038
1086
|
continue;
|
|
1039
1087
|
}
|
|
1040
1088
|
const p = h + c >> 1, m = o[2 * p], f = o[2 * p + 1];
|
|
1041
|
-
|
|
1089
|
+
Ce(m, f, e, t) <= d && a.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));
|
|
1042
1090
|
}
|
|
1043
|
-
return
|
|
1091
|
+
return a;
|
|
1044
1092
|
}
|
|
1045
1093
|
}
|
|
1046
1094
|
function ie(n, e, t, s, r, o) {
|
|
1047
1095
|
if (r - s <= t)
|
|
1048
1096
|
return;
|
|
1049
|
-
const
|
|
1050
|
-
Ie(n, e,
|
|
1097
|
+
const i = s + r >> 1;
|
|
1098
|
+
Ie(n, e, i, s, r, o), ie(n, e, t, s, i - 1, 1 - o), ie(n, e, t, i + 1, r, 1 - o);
|
|
1051
1099
|
}
|
|
1052
1100
|
function Ie(n, e, t, s, r, o) {
|
|
1053
1101
|
for (; r > s; ) {
|
|
@@ -1055,29 +1103,29 @@ function Ie(n, e, t, s, r, o) {
|
|
|
1055
1103
|
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));
|
|
1056
1104
|
Ie(n, e, t, m, f, o);
|
|
1057
1105
|
}
|
|
1058
|
-
const
|
|
1059
|
-
let l = s,
|
|
1060
|
-
for (
|
|
1061
|
-
for (
|
|
1106
|
+
const i = e[2 * t + o];
|
|
1107
|
+
let l = s, a = r;
|
|
1108
|
+
for (G(n, e, s, t), e[2 * r + o] > i && G(n, e, s, r); l < a; ) {
|
|
1109
|
+
for (G(n, e, l, a), l++, a--; e[2 * l + o] < i; )
|
|
1062
1110
|
l++;
|
|
1063
|
-
for (; e[2 *
|
|
1064
|
-
|
|
1111
|
+
for (; e[2 * a + o] > i; )
|
|
1112
|
+
a--;
|
|
1065
1113
|
}
|
|
1066
|
-
e[2 * s + o] ===
|
|
1114
|
+
e[2 * s + o] === i ? G(n, e, s, a) : (a++, G(n, e, a, r)), a <= t && (s = a + 1), t <= a && (r = a - 1);
|
|
1067
1115
|
}
|
|
1068
1116
|
}
|
|
1069
|
-
function
|
|
1117
|
+
function G(n, e, t, s) {
|
|
1070
1118
|
ne(n, t, s), ne(e, 2 * t, 2 * s), ne(e, 2 * t + 1, 2 * s + 1);
|
|
1071
1119
|
}
|
|
1072
1120
|
function ne(n, e, t) {
|
|
1073
1121
|
const s = n[e];
|
|
1074
1122
|
n[e] = n[t], n[t] = s;
|
|
1075
1123
|
}
|
|
1076
|
-
function
|
|
1124
|
+
function Ce(n, e, t, s) {
|
|
1077
1125
|
const r = n - t, o = e - s;
|
|
1078
1126
|
return r * r + o * o;
|
|
1079
1127
|
}
|
|
1080
|
-
const
|
|
1128
|
+
const nt = {
|
|
1081
1129
|
minZoom: 0,
|
|
1082
1130
|
// min zoom to generate clusters on
|
|
1083
1131
|
maxZoom: 16,
|
|
@@ -1100,41 +1148,41 @@ const rt = {
|
|
|
1100
1148
|
// properties to use for individual points when running the reducer
|
|
1101
1149
|
map: (n) => n
|
|
1102
1150
|
// props => ({sum: props.my_value})
|
|
1103
|
-
},
|
|
1104
|
-
class
|
|
1151
|
+
}, be = Math.fround || ((n) => (e) => (n[0] = +e, n[0]))(new Float32Array(1)), R = 2, T = 3, oe = 4, I = 5, Te = 6;
|
|
1152
|
+
class $e {
|
|
1105
1153
|
constructor(e) {
|
|
1106
|
-
this.options = Object.assign(Object.create(
|
|
1154
|
+
this.options = Object.assign(Object.create(nt), e), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
|
|
1107
1155
|
}
|
|
1108
1156
|
load(e) {
|
|
1109
1157
|
const { log: t, minZoom: s, maxZoom: r } = this.options;
|
|
1110
1158
|
t && console.time("total time");
|
|
1111
1159
|
const o = `prepare ${e.length} points`;
|
|
1112
1160
|
t && console.time(o), this.points = e;
|
|
1113
|
-
const
|
|
1114
|
-
for (let
|
|
1115
|
-
const d = e[
|
|
1161
|
+
const i = [];
|
|
1162
|
+
for (let a = 0; a < e.length; a++) {
|
|
1163
|
+
const d = e[a];
|
|
1116
1164
|
if (!d.geometry)
|
|
1117
1165
|
continue;
|
|
1118
|
-
const [u, c] = d.geometry.coordinates, h =
|
|
1119
|
-
|
|
1166
|
+
const [u, c] = d.geometry.coordinates, h = be(K(u)), p = be(J(c));
|
|
1167
|
+
i.push(
|
|
1120
1168
|
h,
|
|
1121
1169
|
p,
|
|
1122
1170
|
// projected point coordinates
|
|
1123
1171
|
1 / 0,
|
|
1124
1172
|
// the last zoom the point was processed at
|
|
1125
|
-
|
|
1173
|
+
a,
|
|
1126
1174
|
// index of the source feature in the original input array
|
|
1127
1175
|
-1,
|
|
1128
1176
|
// parent cluster id
|
|
1129
1177
|
1
|
|
1130
1178
|
// number of points in a cluster
|
|
1131
|
-
), this.options.reduce &&
|
|
1179
|
+
), this.options.reduce && i.push(0);
|
|
1132
1180
|
}
|
|
1133
|
-
let l = this.trees[r + 1] = this._createTree(
|
|
1181
|
+
let l = this.trees[r + 1] = this._createTree(i);
|
|
1134
1182
|
t && console.timeEnd(o);
|
|
1135
|
-
for (let
|
|
1183
|
+
for (let a = r; a >= s; a--) {
|
|
1136
1184
|
const d = +Date.now();
|
|
1137
|
-
l = this.trees[
|
|
1185
|
+
l = this.trees[a] = this._createTree(this._cluster(l, a)), t && console.log("z%d: %d clusters in %dms", a, l.numItems, +Date.now() - d);
|
|
1138
1186
|
}
|
|
1139
1187
|
return t && console.timeEnd("total time"), this;
|
|
1140
1188
|
}
|
|
@@ -1142,17 +1190,17 @@ class Te {
|
|
|
1142
1190
|
let s = ((e[0] + 180) % 360 + 360) % 360 - 180;
|
|
1143
1191
|
const r = Math.max(-90, Math.min(90, e[1]));
|
|
1144
1192
|
let o = e[2] === 180 ? 180 : ((e[2] + 180) % 360 + 360) % 360 - 180;
|
|
1145
|
-
const
|
|
1193
|
+
const i = Math.max(-90, Math.min(90, e[3]));
|
|
1146
1194
|
if (e[2] - e[0] >= 360)
|
|
1147
1195
|
s = -180, o = 180;
|
|
1148
1196
|
else if (s > o) {
|
|
1149
|
-
const c = this.getClusters([s, r, 180,
|
|
1197
|
+
const c = this.getClusters([s, r, 180, i], t), h = this.getClusters([-180, r, o, i], t);
|
|
1150
1198
|
return c.concat(h);
|
|
1151
1199
|
}
|
|
1152
|
-
const l = this.trees[this._limitZoom(t)],
|
|
1153
|
-
for (const c of
|
|
1200
|
+
const l = this.trees[this._limitZoom(t)], a = l.range(K(s), J(i), K(o), J(r)), d = l.data, u = [];
|
|
1201
|
+
for (const c of a) {
|
|
1154
1202
|
const h = this.stride * c;
|
|
1155
|
-
u.push(d[h +
|
|
1203
|
+
u.push(d[h + I] > 1 ? Me(d, h, this.clusterProps) : this.points[d[h + T]]);
|
|
1156
1204
|
}
|
|
1157
1205
|
return u;
|
|
1158
1206
|
}
|
|
@@ -1160,13 +1208,13 @@ class Te {
|
|
|
1160
1208
|
const t = this._getOriginId(e), s = this._getOriginZoom(e), r = "No cluster with the specified id.", o = this.trees[s];
|
|
1161
1209
|
if (!o)
|
|
1162
1210
|
throw new Error(r);
|
|
1163
|
-
const
|
|
1164
|
-
if (t * this.stride >=
|
|
1211
|
+
const i = o.data;
|
|
1212
|
+
if (t * this.stride >= i.length)
|
|
1165
1213
|
throw new Error(r);
|
|
1166
|
-
const l = this.options.radius / (this.options.extent * Math.pow(2, s - 1)),
|
|
1214
|
+
const l = this.options.radius / (this.options.extent * Math.pow(2, s - 1)), a = i[t * this.stride], d = i[t * this.stride + 1], u = o.within(a, d, l), c = [];
|
|
1167
1215
|
for (const h of u) {
|
|
1168
1216
|
const p = h * this.stride;
|
|
1169
|
-
|
|
1217
|
+
i[p + oe] === e && c.push(i[p + I] > 1 ? Me(i, p, this.clusterProps) : this.points[i[p + T]]);
|
|
1170
1218
|
}
|
|
1171
1219
|
if (c.length === 0)
|
|
1172
1220
|
throw new Error(r);
|
|
@@ -1178,25 +1226,25 @@ class Te {
|
|
|
1178
1226
|
return this._appendLeaves(r, e, t, s, 0), r;
|
|
1179
1227
|
}
|
|
1180
1228
|
getTile(e, t, s) {
|
|
1181
|
-
const r = this.trees[this._limitZoom(e)], o = Math.pow(2, e), { extent:
|
|
1229
|
+
const r = this.trees[this._limitZoom(e)], o = Math.pow(2, e), { extent: i, radius: l } = this.options, a = l / i, d = (s - a) / o, u = (s + 1 + a) / o, c = {
|
|
1182
1230
|
features: []
|
|
1183
1231
|
};
|
|
1184
1232
|
return this._addTileFeatures(
|
|
1185
|
-
r.range((t -
|
|
1233
|
+
r.range((t - a) / o, d, (t + 1 + a) / o, u),
|
|
1186
1234
|
r.data,
|
|
1187
1235
|
t,
|
|
1188
1236
|
s,
|
|
1189
1237
|
o,
|
|
1190
1238
|
c
|
|
1191
1239
|
), t === 0 && this._addTileFeatures(
|
|
1192
|
-
r.range(1 -
|
|
1240
|
+
r.range(1 - a / o, d, 1, u),
|
|
1193
1241
|
r.data,
|
|
1194
1242
|
o,
|
|
1195
1243
|
s,
|
|
1196
1244
|
o,
|
|
1197
1245
|
c
|
|
1198
1246
|
), t === o - 1 && this._addTileFeatures(
|
|
1199
|
-
r.range(0, d,
|
|
1247
|
+
r.range(0, d, a / o, u),
|
|
1200
1248
|
r.data,
|
|
1201
1249
|
-1,
|
|
1202
1250
|
s,
|
|
@@ -1215,31 +1263,31 @@ class Te {
|
|
|
1215
1263
|
return t;
|
|
1216
1264
|
}
|
|
1217
1265
|
_appendLeaves(e, t, s, r, o) {
|
|
1218
|
-
const
|
|
1219
|
-
for (const l of
|
|
1220
|
-
const
|
|
1221
|
-
if (
|
|
1266
|
+
const i = this.getChildren(t);
|
|
1267
|
+
for (const l of i) {
|
|
1268
|
+
const a = l.properties;
|
|
1269
|
+
if (a && a.cluster ? o + a.point_count <= r ? o += a.point_count : o = this._appendLeaves(e, a.cluster_id, s, r, o) : o < r ? o++ : e.push(l), e.length === s)
|
|
1222
1270
|
break;
|
|
1223
1271
|
}
|
|
1224
1272
|
return o;
|
|
1225
1273
|
}
|
|
1226
1274
|
_createTree(e) {
|
|
1227
|
-
const t = new
|
|
1275
|
+
const t = new ue(e.length / this.stride | 0, this.options.nodeSize, Float32Array);
|
|
1228
1276
|
for (let s = 0; s < e.length; s += this.stride)
|
|
1229
1277
|
t.add(e[s], e[s + 1]);
|
|
1230
1278
|
return t.finish(), t.data = e, t;
|
|
1231
1279
|
}
|
|
1232
|
-
_addTileFeatures(e, t, s, r, o,
|
|
1280
|
+
_addTileFeatures(e, t, s, r, o, i) {
|
|
1233
1281
|
for (const l of e) {
|
|
1234
|
-
const
|
|
1282
|
+
const a = l * this.stride, d = t[a + I] > 1;
|
|
1235
1283
|
let u, c, h;
|
|
1236
1284
|
if (d)
|
|
1237
|
-
u =
|
|
1285
|
+
u = Re(t, a, this.clusterProps), c = t[a], h = t[a + 1];
|
|
1238
1286
|
else {
|
|
1239
|
-
const f = this.points[t[
|
|
1287
|
+
const f = this.points[t[a + T]];
|
|
1240
1288
|
u = f.properties;
|
|
1241
1289
|
const [g, v] = f.geometry.coordinates;
|
|
1242
|
-
c =
|
|
1290
|
+
c = K(g), h = J(v);
|
|
1243
1291
|
}
|
|
1244
1292
|
const p = {
|
|
1245
1293
|
type: 1,
|
|
@@ -1250,46 +1298,46 @@ class Te {
|
|
|
1250
1298
|
tags: u
|
|
1251
1299
|
};
|
|
1252
1300
|
let m;
|
|
1253
|
-
d || this.options.generateId ? m = t[
|
|
1301
|
+
d || this.options.generateId ? m = t[a + T] : m = this.points[t[a + T]].id, m !== void 0 && (p.id = m), i.features.push(p);
|
|
1254
1302
|
}
|
|
1255
1303
|
}
|
|
1256
1304
|
_limitZoom(e) {
|
|
1257
1305
|
return Math.max(this.options.minZoom, Math.min(Math.floor(+e), this.options.maxZoom + 1));
|
|
1258
1306
|
}
|
|
1259
1307
|
_cluster(e, t) {
|
|
1260
|
-
const { radius: s, extent: r, reduce: o, minPoints:
|
|
1261
|
-
for (let c = 0; c <
|
|
1262
|
-
if (
|
|
1308
|
+
const { radius: s, extent: r, reduce: o, minPoints: i } = this.options, l = s / (r * Math.pow(2, t)), a = e.data, d = [], u = this.stride;
|
|
1309
|
+
for (let c = 0; c < a.length; c += u) {
|
|
1310
|
+
if (a[c + R] <= t)
|
|
1263
1311
|
continue;
|
|
1264
|
-
|
|
1265
|
-
const h =
|
|
1312
|
+
a[c + R] = t;
|
|
1313
|
+
const h = a[c], p = a[c + 1], m = e.within(a[c], a[c + 1], l), f = a[c + I];
|
|
1266
1314
|
let g = f;
|
|
1267
1315
|
for (const v of m) {
|
|
1268
1316
|
const w = v * u;
|
|
1269
|
-
|
|
1317
|
+
a[w + R] > t && (g += a[w + I]);
|
|
1270
1318
|
}
|
|
1271
|
-
if (g > f && g >=
|
|
1272
|
-
let v = h * f, w = p * f, _,
|
|
1273
|
-
const
|
|
1274
|
-
for (const
|
|
1275
|
-
const
|
|
1276
|
-
if (
|
|
1319
|
+
if (g > f && g >= i) {
|
|
1320
|
+
let v = h * f, w = p * f, _, O = -1;
|
|
1321
|
+
const M = ((c / u | 0) << 5) + (t + 1) + this.points.length;
|
|
1322
|
+
for (const E of m) {
|
|
1323
|
+
const k = E * u;
|
|
1324
|
+
if (a[k + R] <= t)
|
|
1277
1325
|
continue;
|
|
1278
|
-
|
|
1279
|
-
const
|
|
1280
|
-
v +=
|
|
1326
|
+
a[k + R] = t;
|
|
1327
|
+
const L = a[k + I];
|
|
1328
|
+
v += a[k] * L, w += a[k + 1] * L, a[k + oe] = M, o && (_ || (_ = this._map(a, c, !0), O = this.clusterProps.length, this.clusterProps.push(_)), o(_, this._map(a, k)));
|
|
1281
1329
|
}
|
|
1282
|
-
|
|
1330
|
+
a[c + oe] = M, d.push(v / g, w / g, 1 / 0, M, -1, g), o && d.push(O);
|
|
1283
1331
|
} else {
|
|
1284
1332
|
for (let v = 0; v < u; v++)
|
|
1285
|
-
d.push(
|
|
1333
|
+
d.push(a[c + v]);
|
|
1286
1334
|
if (g > 1)
|
|
1287
1335
|
for (const v of m) {
|
|
1288
1336
|
const w = v * u;
|
|
1289
|
-
if (!(
|
|
1290
|
-
|
|
1337
|
+
if (!(a[w + R] <= t)) {
|
|
1338
|
+
a[w + R] = t;
|
|
1291
1339
|
for (let _ = 0; _ < u; _++)
|
|
1292
|
-
d.push(
|
|
1340
|
+
d.push(a[w + _]);
|
|
1293
1341
|
}
|
|
1294
1342
|
}
|
|
1295
1343
|
}
|
|
@@ -1305,45 +1353,45 @@ class Te {
|
|
|
1305
1353
|
return (e - this.points.length) % 32;
|
|
1306
1354
|
}
|
|
1307
1355
|
_map(e, t, s) {
|
|
1308
|
-
if (e[t +
|
|
1309
|
-
const
|
|
1310
|
-
return s ? Object.assign({},
|
|
1356
|
+
if (e[t + I] > 1) {
|
|
1357
|
+
const i = this.clusterProps[e[t + Te]];
|
|
1358
|
+
return s ? Object.assign({}, i) : i;
|
|
1311
1359
|
}
|
|
1312
|
-
const r = this.points[e[t +
|
|
1360
|
+
const r = this.points[e[t + T]].properties, o = this.options.map(r);
|
|
1313
1361
|
return s && o === r ? Object.assign({}, o) : o;
|
|
1314
1362
|
}
|
|
1315
1363
|
}
|
|
1316
|
-
function
|
|
1364
|
+
function Me(n, e, t) {
|
|
1317
1365
|
return {
|
|
1318
1366
|
type: "Feature",
|
|
1319
|
-
id: n[e +
|
|
1320
|
-
properties:
|
|
1367
|
+
id: n[e + T],
|
|
1368
|
+
properties: Re(n, e, t),
|
|
1321
1369
|
geometry: {
|
|
1322
1370
|
type: "Point",
|
|
1323
|
-
coordinates: [
|
|
1371
|
+
coordinates: [ot(n[e]), it(n[e + 1])]
|
|
1324
1372
|
}
|
|
1325
1373
|
};
|
|
1326
1374
|
}
|
|
1327
|
-
function
|
|
1328
|
-
const s = n[e +
|
|
1329
|
-
return Object.assign(
|
|
1375
|
+
function Re(n, e, t) {
|
|
1376
|
+
const s = n[e + I], r = s >= 1e4 ? `${Math.round(s / 1e3)}k` : s >= 1e3 ? `${Math.round(s / 100) / 10}k` : s, o = n[e + Te], i = o === -1 ? {} : Object.assign({}, t[o]);
|
|
1377
|
+
return Object.assign(i, {
|
|
1330
1378
|
cluster: !0,
|
|
1331
|
-
cluster_id: n[e +
|
|
1379
|
+
cluster_id: n[e + T],
|
|
1332
1380
|
point_count: s,
|
|
1333
1381
|
point_count_abbreviated: r
|
|
1334
1382
|
});
|
|
1335
1383
|
}
|
|
1336
|
-
function
|
|
1384
|
+
function K(n) {
|
|
1337
1385
|
return n / 360 + 0.5;
|
|
1338
1386
|
}
|
|
1339
|
-
function
|
|
1387
|
+
function J(n) {
|
|
1340
1388
|
const e = Math.sin(n * Math.PI / 180), t = 0.5 - 0.25 * Math.log((1 + e) / (1 - e)) / Math.PI;
|
|
1341
1389
|
return t < 0 ? 0 : t > 1 ? 1 : t;
|
|
1342
1390
|
}
|
|
1343
|
-
function
|
|
1391
|
+
function ot(n) {
|
|
1344
1392
|
return (n - 0.5) * 360;
|
|
1345
1393
|
}
|
|
1346
|
-
function
|
|
1394
|
+
function it(n) {
|
|
1347
1395
|
const e = (180 - n * 360) * Math.PI / 180;
|
|
1348
1396
|
return 360 * Math.atan(Math.exp(e)) / Math.PI - 90;
|
|
1349
1397
|
}
|
|
@@ -1361,7 +1409,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
1361
1409
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1362
1410
|
PERFORMANCE OF THIS SOFTWARE.
|
|
1363
1411
|
***************************************************************************** */
|
|
1364
|
-
function
|
|
1412
|
+
function de(n, e) {
|
|
1365
1413
|
var t = {};
|
|
1366
1414
|
for (var s in n)
|
|
1367
1415
|
Object.prototype.hasOwnProperty.call(n, s) && e.indexOf(s) < 0 && (t[s] = n[s]);
|
|
@@ -1370,7 +1418,7 @@ function ce(n, e) {
|
|
|
1370
1418
|
e.indexOf(s[r]) < 0 && Object.prototype.propertyIsEnumerable.call(n, s[r]) && (t[s[r]] = n[s[r]]);
|
|
1371
1419
|
return t;
|
|
1372
1420
|
}
|
|
1373
|
-
class
|
|
1421
|
+
class C {
|
|
1374
1422
|
static isAdvancedMarkerAvailable(e) {
|
|
1375
1423
|
return google.maps.marker && e.getMapCapabilities().isAdvancedMarkersAvailable === !0;
|
|
1376
1424
|
}
|
|
@@ -1396,7 +1444,7 @@ class k {
|
|
|
1396
1444
|
return this.isAdvancedMarker(e) ? !0 : e.getVisible();
|
|
1397
1445
|
}
|
|
1398
1446
|
}
|
|
1399
|
-
class
|
|
1447
|
+
class W {
|
|
1400
1448
|
constructor({ markers: e, position: t }) {
|
|
1401
1449
|
this.markers = e, t && (t instanceof google.maps.LatLng ? this._position = t : this._position = new google.maps.LatLng(t));
|
|
1402
1450
|
}
|
|
@@ -1405,7 +1453,7 @@ class H {
|
|
|
1405
1453
|
return;
|
|
1406
1454
|
const e = new google.maps.LatLngBounds(this._position, this._position);
|
|
1407
1455
|
for (const t of this.markers)
|
|
1408
|
-
e.extend(
|
|
1456
|
+
e.extend(C.getPosition(t));
|
|
1409
1457
|
return e;
|
|
1410
1458
|
}
|
|
1411
1459
|
get position() {
|
|
@@ -1415,7 +1463,7 @@ class H {
|
|
|
1415
1463
|
* Get the count of **visible** markers.
|
|
1416
1464
|
*/
|
|
1417
1465
|
get count() {
|
|
1418
|
-
return this.markers.filter((e) =>
|
|
1466
|
+
return this.markers.filter((e) => C.getVisible(e)).length;
|
|
1419
1467
|
}
|
|
1420
1468
|
/**
|
|
1421
1469
|
* Add a marker to the cluster.
|
|
@@ -1427,26 +1475,26 @@ class H {
|
|
|
1427
1475
|
* Cleanup references and remove marker from map.
|
|
1428
1476
|
*/
|
|
1429
1477
|
delete() {
|
|
1430
|
-
this.marker && (
|
|
1478
|
+
this.marker && (C.setMap(this.marker, null), this.marker = void 0), this.markers.length = 0;
|
|
1431
1479
|
}
|
|
1432
1480
|
}
|
|
1433
|
-
const
|
|
1434
|
-
const r =
|
|
1435
|
-
return t.filter((o) => r.contains(
|
|
1436
|
-
},
|
|
1437
|
-
const { northEast: s, southWest: r } =
|
|
1438
|
-
return
|
|
1439
|
-
},
|
|
1440
|
-
const s =
|
|
1481
|
+
const at = (n, e, t, s) => {
|
|
1482
|
+
const r = je(n.getBounds(), e, s);
|
|
1483
|
+
return t.filter((o) => r.contains(C.getPosition(o)));
|
|
1484
|
+
}, je = (n, e, t) => {
|
|
1485
|
+
const { northEast: s, southWest: r } = lt(n, e), o = ct({ northEast: s, southWest: r }, t);
|
|
1486
|
+
return ut(o, e);
|
|
1487
|
+
}, Oe = (n, e, t) => {
|
|
1488
|
+
const s = je(n, e, t), r = s.getNorthEast(), o = s.getSouthWest();
|
|
1441
1489
|
return [o.lng(), o.lat(), r.lng(), r.lat()];
|
|
1442
|
-
},
|
|
1490
|
+
}, lt = (n, e) => ({
|
|
1443
1491
|
northEast: e.fromLatLngToDivPixel(n.getNorthEast()),
|
|
1444
1492
|
southWest: e.fromLatLngToDivPixel(n.getSouthWest())
|
|
1445
|
-
}),
|
|
1493
|
+
}), ct = ({ northEast: n, southWest: e }, t) => (n.x += t, n.y -= t, e.x -= t, e.y += t, { northEast: n, southWest: e }), ut = ({ northEast: n, southWest: e }, t) => {
|
|
1446
1494
|
const s = t.fromDivPixelToLatLng(e), r = t.fromDivPixelToLatLng(n);
|
|
1447
1495
|
return new google.maps.LatLngBounds(s, r);
|
|
1448
1496
|
};
|
|
1449
|
-
class
|
|
1497
|
+
class qe {
|
|
1450
1498
|
constructor({ maxZoom: e = 16 }) {
|
|
1451
1499
|
this.maxZoom = e;
|
|
1452
1500
|
}
|
|
@@ -1463,12 +1511,12 @@ class je {
|
|
|
1463
1511
|
* ```
|
|
1464
1512
|
*/
|
|
1465
1513
|
noop({ markers: e }) {
|
|
1466
|
-
return
|
|
1514
|
+
return ht(e);
|
|
1467
1515
|
}
|
|
1468
1516
|
}
|
|
1469
|
-
class
|
|
1517
|
+
class dt extends qe {
|
|
1470
1518
|
constructor(e) {
|
|
1471
|
-
var { viewportPadding: t = 60 } = e, s =
|
|
1519
|
+
var { viewportPadding: t = 60 } = e, s = de(e, ["viewportPadding"]);
|
|
1472
1520
|
super(s), this.viewportPadding = 60, this.viewportPadding = t;
|
|
1473
1521
|
}
|
|
1474
1522
|
calculate({ markers: e, map: t, mapCanvasProjection: s }) {
|
|
@@ -1479,78 +1527,78 @@ class ut extends je {
|
|
|
1479
1527
|
changed: !1
|
|
1480
1528
|
} : {
|
|
1481
1529
|
clusters: this.cluster({
|
|
1482
|
-
markers:
|
|
1530
|
+
markers: at(t, s, e, this.viewportPadding),
|
|
1483
1531
|
map: t,
|
|
1484
1532
|
mapCanvasProjection: s
|
|
1485
1533
|
})
|
|
1486
1534
|
};
|
|
1487
1535
|
}
|
|
1488
1536
|
}
|
|
1489
|
-
const
|
|
1490
|
-
position:
|
|
1537
|
+
const ht = (n) => n.map((t) => new W({
|
|
1538
|
+
position: C.getPosition(t),
|
|
1491
1539
|
markers: [t]
|
|
1492
1540
|
}));
|
|
1493
|
-
class
|
|
1541
|
+
class pt extends qe {
|
|
1494
1542
|
constructor(e) {
|
|
1495
|
-
var { maxZoom: t, radius: s = 60 } = e, r =
|
|
1496
|
-
super({ maxZoom: t }), this.state = { zoom: -1 }, this.superCluster = new
|
|
1543
|
+
var { maxZoom: t, radius: s = 60 } = e, r = de(e, ["maxZoom", "radius"]);
|
|
1544
|
+
super({ maxZoom: t }), this.state = { zoom: -1 }, this.superCluster = new $e(Object.assign({ maxZoom: this.maxZoom, radius: s }, r));
|
|
1497
1545
|
}
|
|
1498
1546
|
calculate(e) {
|
|
1499
1547
|
let t = !1;
|
|
1500
1548
|
const s = { zoom: e.map.getZoom() };
|
|
1501
|
-
if (
|
|
1549
|
+
if (!A(e.markers, this.markers)) {
|
|
1502
1550
|
t = !0, this.markers = [...e.markers];
|
|
1503
1551
|
const r = this.markers.map((o) => {
|
|
1504
|
-
const
|
|
1552
|
+
const i = C.getPosition(o);
|
|
1505
1553
|
return {
|
|
1506
1554
|
type: "Feature",
|
|
1507
1555
|
geometry: {
|
|
1508
1556
|
type: "Point",
|
|
1509
|
-
coordinates: [
|
|
1557
|
+
coordinates: [i.lng(), i.lat()]
|
|
1510
1558
|
},
|
|
1511
1559
|
properties: { marker: o }
|
|
1512
1560
|
};
|
|
1513
1561
|
});
|
|
1514
1562
|
this.superCluster.load(r);
|
|
1515
1563
|
}
|
|
1516
|
-
return t || (this.state.zoom <= this.maxZoom || s.zoom <= this.maxZoom) && (t =
|
|
1564
|
+
return t || (this.state.zoom <= this.maxZoom || s.zoom <= this.maxZoom) && (t = !A(this.state, s)), this.state = s, t && (this.clusters = this.cluster(e)), { clusters: this.clusters, changed: t };
|
|
1517
1565
|
}
|
|
1518
1566
|
cluster({ map: e }) {
|
|
1519
1567
|
return this.superCluster.getClusters([-180, -90, 180, 90], Math.round(e.getZoom())).map((t) => this.transformCluster(t));
|
|
1520
1568
|
}
|
|
1521
1569
|
transformCluster({ geometry: { coordinates: [e, t] }, properties: s }) {
|
|
1522
1570
|
if (s.cluster)
|
|
1523
|
-
return new
|
|
1571
|
+
return new W({
|
|
1524
1572
|
markers: this.superCluster.getLeaves(s.cluster_id, 1 / 0).map((o) => o.properties.marker),
|
|
1525
1573
|
position: { lat: t, lng: e }
|
|
1526
1574
|
});
|
|
1527
1575
|
const r = s.marker;
|
|
1528
|
-
return new
|
|
1576
|
+
return new W({
|
|
1529
1577
|
markers: [r],
|
|
1530
|
-
position:
|
|
1578
|
+
position: C.getPosition(r)
|
|
1531
1579
|
});
|
|
1532
1580
|
}
|
|
1533
1581
|
}
|
|
1534
|
-
class
|
|
1582
|
+
class ft extends dt {
|
|
1535
1583
|
constructor(e) {
|
|
1536
|
-
var { maxZoom: t, radius: s = 60, viewportPadding: r = 60 } = e, o =
|
|
1537
|
-
super({ maxZoom: t, viewportPadding: r }), this.superCluster = new
|
|
1584
|
+
var { maxZoom: t, radius: s = 60, viewportPadding: r = 60 } = e, o = de(e, ["maxZoom", "radius", "viewportPadding"]);
|
|
1585
|
+
super({ maxZoom: t, viewportPadding: r }), this.superCluster = new $e(Object.assign({ maxZoom: this.maxZoom, radius: s }, o)), this.state = { zoom: -1, view: [0, 0, 0, 0] };
|
|
1538
1586
|
}
|
|
1539
1587
|
calculate(e) {
|
|
1540
1588
|
const t = {
|
|
1541
1589
|
zoom: Math.round(e.map.getZoom()),
|
|
1542
|
-
view:
|
|
1590
|
+
view: Oe(e.map.getBounds(), e.mapCanvasProjection, this.viewportPadding)
|
|
1543
1591
|
};
|
|
1544
|
-
let s =
|
|
1545
|
-
if (
|
|
1592
|
+
let s = !A(this.state, t);
|
|
1593
|
+
if (!A(e.markers, this.markers)) {
|
|
1546
1594
|
s = !0, this.markers = [...e.markers];
|
|
1547
1595
|
const r = this.markers.map((o) => {
|
|
1548
|
-
const
|
|
1596
|
+
const i = C.getPosition(o);
|
|
1549
1597
|
return {
|
|
1550
1598
|
type: "Feature",
|
|
1551
1599
|
geometry: {
|
|
1552
1600
|
type: "Point",
|
|
1553
|
-
coordinates: [
|
|
1601
|
+
coordinates: [i.lng(), i.lat()]
|
|
1554
1602
|
},
|
|
1555
1603
|
properties: { marker: o }
|
|
1556
1604
|
};
|
|
@@ -1562,27 +1610,27 @@ class pt extends ut {
|
|
|
1562
1610
|
cluster({ map: e, mapCanvasProjection: t }) {
|
|
1563
1611
|
const s = {
|
|
1564
1612
|
zoom: Math.round(e.getZoom()),
|
|
1565
|
-
view:
|
|
1613
|
+
view: Oe(e.getBounds(), t, this.viewportPadding)
|
|
1566
1614
|
};
|
|
1567
1615
|
return this.superCluster.getClusters(s.view, s.zoom).map((r) => this.transformCluster(r));
|
|
1568
1616
|
}
|
|
1569
1617
|
transformCluster({ geometry: { coordinates: [e, t] }, properties: s }) {
|
|
1570
1618
|
if (s.cluster)
|
|
1571
|
-
return new
|
|
1619
|
+
return new W({
|
|
1572
1620
|
markers: this.superCluster.getLeaves(s.cluster_id, 1 / 0).map((o) => o.properties.marker),
|
|
1573
1621
|
position: { lat: t, lng: e }
|
|
1574
1622
|
});
|
|
1575
1623
|
const r = s.marker;
|
|
1576
|
-
return new
|
|
1624
|
+
return new W({
|
|
1577
1625
|
markers: [r],
|
|
1578
|
-
position:
|
|
1626
|
+
position: C.getPosition(r)
|
|
1579
1627
|
});
|
|
1580
1628
|
}
|
|
1581
1629
|
}
|
|
1582
|
-
class
|
|
1630
|
+
class mt {
|
|
1583
1631
|
constructor(e, t) {
|
|
1584
1632
|
this.markers = { sum: e.length };
|
|
1585
|
-
const s = t.map((o) => o.count), r = s.reduce((o,
|
|
1633
|
+
const s = t.map((o) => o.count), r = s.reduce((o, i) => o + i, 0);
|
|
1586
1634
|
this.clusters = {
|
|
1587
1635
|
count: t.length,
|
|
1588
1636
|
markers: {
|
|
@@ -1594,7 +1642,7 @@ class ft {
|
|
|
1594
1642
|
};
|
|
1595
1643
|
}
|
|
1596
1644
|
}
|
|
1597
|
-
class
|
|
1645
|
+
class gt {
|
|
1598
1646
|
/**
|
|
1599
1647
|
* The default render function for the library used by {@link MarkerClusterer}.
|
|
1600
1648
|
*
|
|
@@ -1634,21 +1682,21 @@ class mt {
|
|
|
1634
1682
|
* ```
|
|
1635
1683
|
*/
|
|
1636
1684
|
render({ count: e, position: t }, s, r) {
|
|
1637
|
-
const
|
|
1685
|
+
const i = `<svg fill="${e > Math.max(10, s.clusters.markers.mean) ? "#ff0000" : "#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
|
|
1638
1686
|
<circle cx="120" cy="120" opacity=".6" r="70" />
|
|
1639
1687
|
<circle cx="120" cy="120" opacity=".3" r="90" />
|
|
1640
1688
|
<circle cx="120" cy="120" opacity=".2" r="110" />
|
|
1641
1689
|
<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
|
|
1642
|
-
</svg>`, l = `Cluster of ${e} markers`,
|
|
1643
|
-
if (
|
|
1690
|
+
</svg>`, l = `Cluster of ${e} markers`, a = Number(google.maps.Marker.MAX_ZINDEX) + e;
|
|
1691
|
+
if (C.isAdvancedMarkerAvailable(r)) {
|
|
1644
1692
|
const u = document.createElement("div");
|
|
1645
|
-
u.innerHTML =
|
|
1693
|
+
u.innerHTML = i;
|
|
1646
1694
|
const c = u.firstElementChild;
|
|
1647
1695
|
c.setAttribute("transform", "translate(0 25)");
|
|
1648
1696
|
const h = {
|
|
1649
1697
|
map: r,
|
|
1650
1698
|
position: t,
|
|
1651
|
-
zIndex:
|
|
1699
|
+
zIndex: a,
|
|
1652
1700
|
title: l,
|
|
1653
1701
|
content: c
|
|
1654
1702
|
};
|
|
@@ -1656,35 +1704,35 @@ class mt {
|
|
|
1656
1704
|
}
|
|
1657
1705
|
const d = {
|
|
1658
1706
|
position: t,
|
|
1659
|
-
zIndex:
|
|
1707
|
+
zIndex: a,
|
|
1660
1708
|
title: l,
|
|
1661
1709
|
icon: {
|
|
1662
|
-
url: `data:image/svg+xml;base64,${btoa(
|
|
1710
|
+
url: `data:image/svg+xml;base64,${btoa(i)}`,
|
|
1663
1711
|
anchor: new google.maps.Point(25, 25)
|
|
1664
1712
|
}
|
|
1665
1713
|
};
|
|
1666
1714
|
return new google.maps.Marker(d);
|
|
1667
1715
|
}
|
|
1668
1716
|
}
|
|
1669
|
-
function
|
|
1717
|
+
function vt(n, e) {
|
|
1670
1718
|
for (let t in e.prototype)
|
|
1671
1719
|
n.prototype[t] = e.prototype[t];
|
|
1672
1720
|
}
|
|
1673
|
-
class
|
|
1721
|
+
class he {
|
|
1674
1722
|
constructor() {
|
|
1675
|
-
|
|
1723
|
+
vt(he, google.maps.OverlayView);
|
|
1676
1724
|
}
|
|
1677
1725
|
}
|
|
1678
|
-
var
|
|
1726
|
+
var D;
|
|
1679
1727
|
(function(n) {
|
|
1680
1728
|
n.CLUSTERING_BEGIN = "clusteringbegin", n.CLUSTERING_END = "clusteringend", n.CLUSTER_CLICK = "click";
|
|
1681
|
-
})(
|
|
1682
|
-
const
|
|
1729
|
+
})(D || (D = {}));
|
|
1730
|
+
const yt = (n, e, t) => {
|
|
1683
1731
|
t.fitBounds(e.bounds);
|
|
1684
1732
|
};
|
|
1685
|
-
class
|
|
1686
|
-
constructor({ map: e, markers: t = [], algorithmOptions: s = {}, algorithm: r = new
|
|
1687
|
-
super(), this.markers = [...t], this.clusters = [], this.algorithm = r, this.renderer = o, this.onClusterClick =
|
|
1733
|
+
class wt extends he {
|
|
1734
|
+
constructor({ map: e, markers: t = [], algorithmOptions: s = {}, algorithm: r = new pt(s), renderer: o = new gt(), onClusterClick: i = yt }) {
|
|
1735
|
+
super(), this.markers = [...t], this.clusters = [], this.algorithm = r, this.renderer = o, this.onClusterClick = i, e && this.setMap(e);
|
|
1688
1736
|
}
|
|
1689
1737
|
addMarker(e, t) {
|
|
1690
1738
|
this.markers.includes(e) || (this.markers.push(e), t || this.render());
|
|
@@ -1696,7 +1744,7 @@ class yt extends ue {
|
|
|
1696
1744
|
}
|
|
1697
1745
|
removeMarker(e, t) {
|
|
1698
1746
|
const s = this.markers.indexOf(e);
|
|
1699
|
-
return s === -1 ? !1 : (
|
|
1747
|
+
return s === -1 ? !1 : (C.setMap(e, null), this.markers.splice(s, 1), t || this.render(), !0);
|
|
1700
1748
|
}
|
|
1701
1749
|
removeMarkers(e, t) {
|
|
1702
1750
|
let s = !1;
|
|
@@ -1713,7 +1761,7 @@ class yt extends ue {
|
|
|
1713
1761
|
render() {
|
|
1714
1762
|
const e = this.getMap();
|
|
1715
1763
|
if (e instanceof google.maps.Map && e.getProjection()) {
|
|
1716
|
-
google.maps.event.trigger(this,
|
|
1764
|
+
google.maps.event.trigger(this, D.CLUSTERING_BEGIN, this);
|
|
1717
1765
|
const { clusters: t, changed: s } = this.algorithm.calculate({
|
|
1718
1766
|
markers: this.markers,
|
|
1719
1767
|
map: e,
|
|
@@ -1721,14 +1769,14 @@ class yt extends ue {
|
|
|
1721
1769
|
});
|
|
1722
1770
|
if (s || s == null) {
|
|
1723
1771
|
const r = /* @__PURE__ */ new Set();
|
|
1724
|
-
for (const
|
|
1725
|
-
|
|
1772
|
+
for (const i of t)
|
|
1773
|
+
i.markers.length == 1 && r.add(i.markers[0]);
|
|
1726
1774
|
const o = [];
|
|
1727
|
-
for (const
|
|
1728
|
-
|
|
1729
|
-
this.clusters = t, this.renderClusters(), requestAnimationFrame(() => o.forEach((
|
|
1775
|
+
for (const i of this.clusters)
|
|
1776
|
+
i.marker != null && (i.markers.length == 1 ? r.has(i.marker) || C.setMap(i.marker, null) : o.push(i.marker));
|
|
1777
|
+
this.clusters = t, this.renderClusters(), requestAnimationFrame(() => o.forEach((i) => C.setMap(i, null)));
|
|
1730
1778
|
}
|
|
1731
|
-
google.maps.event.trigger(this,
|
|
1779
|
+
google.maps.event.trigger(this, D.CLUSTERING_END, this);
|
|
1732
1780
|
}
|
|
1733
1781
|
}
|
|
1734
1782
|
onAdd() {
|
|
@@ -1738,22 +1786,22 @@ class yt extends ue {
|
|
|
1738
1786
|
google.maps.event.removeListener(this.idleListener), this.reset();
|
|
1739
1787
|
}
|
|
1740
1788
|
reset() {
|
|
1741
|
-
this.markers.forEach((e) =>
|
|
1789
|
+
this.markers.forEach((e) => C.setMap(e, null)), this.clusters.forEach((e) => e.delete()), this.clusters = [];
|
|
1742
1790
|
}
|
|
1743
1791
|
renderClusters() {
|
|
1744
|
-
const e = new
|
|
1792
|
+
const e = new mt(this.markers, this.clusters), t = this.getMap();
|
|
1745
1793
|
this.clusters.forEach((s) => {
|
|
1746
|
-
s.markers.length === 1 ? s.marker = s.markers[0] : (s.marker = this.renderer.render(s, e, t), s.markers.forEach((r) =>
|
|
1794
|
+
s.markers.length === 1 ? s.marker = s.markers[0] : (s.marker = this.renderer.render(s, e, t), s.markers.forEach((r) => C.setMap(r, null)), this.onClusterClick && s.marker.addListener(
|
|
1747
1795
|
"click",
|
|
1748
1796
|
/* istanbul ignore next */
|
|
1749
1797
|
(r) => {
|
|
1750
|
-
google.maps.event.trigger(this,
|
|
1798
|
+
google.maps.event.trigger(this, D.CLUSTER_CLICK, s), this.onClusterClick(r, s, t);
|
|
1751
1799
|
}
|
|
1752
|
-
)),
|
|
1800
|
+
)), C.setMap(s.marker, t);
|
|
1753
1801
|
});
|
|
1754
1802
|
}
|
|
1755
1803
|
}
|
|
1756
|
-
const
|
|
1804
|
+
const Ee = Object.values(D), Rt = P({
|
|
1757
1805
|
name: "MarkerCluster",
|
|
1758
1806
|
props: {
|
|
1759
1807
|
options: {
|
|
@@ -1761,37 +1809,37 @@ const be = Object.values(j), Tt = P({
|
|
|
1761
1809
|
default: () => ({})
|
|
1762
1810
|
}
|
|
1763
1811
|
},
|
|
1764
|
-
emits:
|
|
1812
|
+
emits: Ee,
|
|
1765
1813
|
setup(n, { emit: e, expose: t, slots: s }) {
|
|
1766
|
-
const r = y(), o =
|
|
1767
|
-
return
|
|
1814
|
+
const r = y(), o = b(B, y()), i = b(Z, y());
|
|
1815
|
+
return U(ce, r), x(
|
|
1768
1816
|
o,
|
|
1769
1817
|
() => {
|
|
1770
|
-
o.value && (r.value =
|
|
1771
|
-
new
|
|
1818
|
+
o.value && (r.value = S(
|
|
1819
|
+
new wt({
|
|
1772
1820
|
map: o.value,
|
|
1773
1821
|
// Better perf than the default `SuperClusterAlgorithm`. See:
|
|
1774
1822
|
// https://github.com/googlemaps/js-markerclusterer/pull/640
|
|
1775
|
-
algorithm: new
|
|
1823
|
+
algorithm: new ft(n.options.algorithmOptions ?? {}),
|
|
1776
1824
|
...n.options
|
|
1777
1825
|
})
|
|
1778
|
-
),
|
|
1779
|
-
var
|
|
1780
|
-
(
|
|
1826
|
+
), Ee.forEach((l) => {
|
|
1827
|
+
var a;
|
|
1828
|
+
(a = r.value) == null || a.addListener(l, (d) => e(l, d));
|
|
1781
1829
|
}));
|
|
1782
1830
|
},
|
|
1783
1831
|
{
|
|
1784
1832
|
immediate: !0
|
|
1785
1833
|
}
|
|
1786
|
-
),
|
|
1834
|
+
), q(() => {
|
|
1787
1835
|
var l;
|
|
1788
|
-
r.value && ((l =
|
|
1836
|
+
r.value && ((l = i.value) == null || l.event.clearInstanceListeners(r.value), r.value.clearMarkers(), r.value.setMap(null));
|
|
1789
1837
|
}), t({ markerCluster: r }), () => {
|
|
1790
1838
|
var l;
|
|
1791
1839
|
return (l = s.default) == null ? void 0 : l.call(s);
|
|
1792
1840
|
};
|
|
1793
1841
|
}
|
|
1794
|
-
}),
|
|
1842
|
+
}), _t = P({
|
|
1795
1843
|
inheritAttrs: !1,
|
|
1796
1844
|
props: {
|
|
1797
1845
|
options: {
|
|
@@ -1800,33 +1848,33 @@ const be = Object.values(j), Tt = P({
|
|
|
1800
1848
|
}
|
|
1801
1849
|
},
|
|
1802
1850
|
setup(n, { slots: e, emit: t, expose: s }) {
|
|
1803
|
-
const r = y(), o =
|
|
1804
|
-
var
|
|
1805
|
-
return (
|
|
1806
|
-
}),
|
|
1851
|
+
const r = y(), o = H(() => {
|
|
1852
|
+
var a;
|
|
1853
|
+
return (a = e.default) == null ? void 0 : a.call(e).some((d) => d.type !== xe);
|
|
1854
|
+
}), i = H(() => ({
|
|
1807
1855
|
...n.options,
|
|
1808
1856
|
element: r.value
|
|
1809
|
-
})), l =
|
|
1857
|
+
})), l = V(ee, [], i, t);
|
|
1810
1858
|
return s({
|
|
1811
1859
|
customMarker: l
|
|
1812
1860
|
}), { customMarkerRef: r, customMarker: l, hasSlotContent: o };
|
|
1813
1861
|
}
|
|
1814
1862
|
});
|
|
1815
|
-
const
|
|
1863
|
+
const kt = {
|
|
1816
1864
|
key: 0,
|
|
1817
1865
|
class: "custom-marker-wrapper"
|
|
1818
1866
|
};
|
|
1819
|
-
function
|
|
1820
|
-
return n.hasSlotContent ? (Y(), X("div",
|
|
1821
|
-
ae("div",
|
|
1867
|
+
function Ct(n, e, t, s, r, o) {
|
|
1868
|
+
return n.hasSlotContent ? (Y(), X("div", kt, [
|
|
1869
|
+
ae("div", Le({
|
|
1822
1870
|
ref: "customMarkerRef",
|
|
1823
1871
|
style: { cursor: n.$attrs.onClick ? "pointer" : void 0 }
|
|
1824
1872
|
}, n.$attrs), [
|
|
1825
1873
|
Q(n.$slots, "default", {}, void 0, !0)
|
|
1826
1874
|
], 16)
|
|
1827
|
-
])) :
|
|
1875
|
+
])) : Se("", !0);
|
|
1828
1876
|
}
|
|
1829
|
-
const
|
|
1877
|
+
const jt = /* @__PURE__ */ te(_t, [["render", Ct], ["__scopeId", "data-v-2d2d343a"]]), qt = P({
|
|
1830
1878
|
name: "HeatmapLayer",
|
|
1831
1879
|
props: {
|
|
1832
1880
|
options: {
|
|
@@ -1835,19 +1883,19 @@ const $t = /* @__PURE__ */ te(wt, [["render", kt], ["__scopeId", "data-v-2d2d343
|
|
|
1835
1883
|
}
|
|
1836
1884
|
},
|
|
1837
1885
|
setup(n) {
|
|
1838
|
-
const e = y(), t =
|
|
1839
|
-
return
|
|
1886
|
+
const e = y(), t = b(B, y()), s = b(Z, y());
|
|
1887
|
+
return x(
|
|
1840
1888
|
[t, () => n.options],
|
|
1841
|
-
([r, o], [
|
|
1889
|
+
([r, o], [i, l]) => {
|
|
1842
1890
|
var d;
|
|
1843
|
-
const
|
|
1844
|
-
if (t.value && s.value &&
|
|
1891
|
+
const a = !A(o, l) || t.value !== i;
|
|
1892
|
+
if (t.value && s.value && a) {
|
|
1845
1893
|
const u = structuredClone(o);
|
|
1846
1894
|
if (u.data && !(u.data instanceof s.value.MVCArray)) {
|
|
1847
1895
|
const c = s.value.LatLng;
|
|
1848
1896
|
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));
|
|
1849
1897
|
}
|
|
1850
|
-
e.value ? e.value.setOptions(u) : e.value =
|
|
1898
|
+
e.value ? e.value.setOptions(u) : e.value = S(
|
|
1851
1899
|
new s.value.visualization.HeatmapLayer({
|
|
1852
1900
|
...u,
|
|
1853
1901
|
map: t.value
|
|
@@ -1856,22 +1904,23 @@ const $t = /* @__PURE__ */ te(wt, [["render", kt], ["__scopeId", "data-v-2d2d343
|
|
|
1856
1904
|
}
|
|
1857
1905
|
},
|
|
1858
1906
|
{ immediate: !0 }
|
|
1859
|
-
),
|
|
1907
|
+
), q(() => {
|
|
1860
1908
|
e.value && e.value.setMap(null);
|
|
1861
1909
|
}), { heatmapLayer: e };
|
|
1862
1910
|
},
|
|
1863
1911
|
render: () => null
|
|
1864
1912
|
});
|
|
1865
1913
|
export {
|
|
1866
|
-
|
|
1867
|
-
It as
|
|
1868
|
-
|
|
1914
|
+
Pt as AdvancedMarker,
|
|
1915
|
+
It as Circle,
|
|
1916
|
+
Tt as CustomControl,
|
|
1917
|
+
jt as CustomMarker,
|
|
1869
1918
|
Et as GoogleMap,
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1919
|
+
qt as HeatmapLayer,
|
|
1920
|
+
$t as InfoWindow,
|
|
1921
|
+
xt as Marker,
|
|
1922
|
+
Rt as MarkerCluster,
|
|
1923
|
+
St as Polygon,
|
|
1924
|
+
Lt as Polyline,
|
|
1925
|
+
At as Rectangle
|
|
1877
1926
|
};
|