tg-map-vue3 3.5.2 → 3.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/dist/src/components/controls/TgCustomControl.vue.d.ts +3 -1
- package/dist/src/components/controls/TgMapTypeControl.vue.d.ts +3 -1
- package/dist/src/components/controls/TgScaleControl.vue.d.ts +3 -1
- package/dist/src/components/extra/TgMarkerClusterer.vue.d.ts +3 -1
- package/dist/src/components/layers/TgTrafficLayer.vue.d.ts +3 -1
- package/dist/src/components/map-mixin.d.ts +3 -1
- package/dist/src/components/overlays/TgCircle.vue.d.ts +3 -1
- package/dist/src/components/overlays/TgElementOverlay.vue.d.ts +3 -1
- package/dist/src/components/overlays/TgInfoBox.vue.d.ts +3 -1
- package/dist/src/components/overlays/TgInfoWindow.vue.d.ts +3 -1
- package/dist/src/components/overlays/TgLabel.vue.d.ts +3 -1
- package/dist/src/components/overlays/TgMarker.vue.d.ts +12 -4
- package/dist/src/components/overlays/TgPolygon.vue.d.ts +3 -1
- package/dist/src/components/overlays/TgPolyline.vue.d.ts +3 -1
- package/dist/src/components/overlays/TgRectangle.vue.d.ts +3 -1
- package/dist/tg-map.js +131 -122
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +5 -5
- package/dist/tg-map.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/tg-map.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var br = Object.defineProperty;
|
|
3
3
|
var Mr = (i, t, e) => t in i ? br(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
4
4
|
var c = (i, t, e) => (Mr(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
5
|
-
import { createCommentVNode as Ve, computed as zt, defineComponent as C, markRaw as Tr, watch as Nt, openBlock as W, createElementBlock as j, mergeProps as
|
|
5
|
+
import { createCommentVNode as Ve, computed as zt, defineComponent as C, markRaw as Tr, watch as Nt, openBlock as W, createElementBlock as j, mergeProps as ue, createElementVNode as Or, normalizeClass as Re, renderSlot as G, normalizeStyle as Cr, getCurrentInstance as wr, inject as Er, onMounted as Lr, onBeforeUnmount as xr, toRaw as $e, withDirectives as Pr, vShow as kr } from "vue";
|
|
6
6
|
function V(i, t, e) {
|
|
7
7
|
Object.keys(i).forEach((r) => {
|
|
8
8
|
r.startsWith("update:") || e != null && e.includes(r) || t.addEventListener(r, i[r]);
|
|
@@ -58,8 +58,8 @@ var Zt = { exports: {} };
|
|
|
58
58
|
return !1;
|
|
59
59
|
}
|
|
60
60
|
function l(g, f) {
|
|
61
|
-
var v = g - 65e-4, O = f - 6e-3, x = Math.sqrt(v * v + O * O) - 2e-5 * Math.sin(O * t), w = Math.atan2(O, v) - 3e-6 * Math.cos(v * t), K = x * Math.cos(w),
|
|
62
|
-
return [K,
|
|
61
|
+
var v = g - 65e-4, O = f - 6e-3, x = Math.sqrt(v * v + O * O) - 2e-5 * Math.sin(O * t), w = Math.atan2(O, v) - 3e-6 * Math.cos(v * t), K = x * Math.cos(w), ie = x * Math.sin(w);
|
|
62
|
+
return [K, ie];
|
|
63
63
|
}
|
|
64
64
|
function d(g, f) {
|
|
65
65
|
var v = Math.sqrt(g * g + f * f) + 2e-5 * Math.sin(f * t), O = Math.atan2(f, g) + 3e-6 * Math.cos(g * t), x = v * Math.cos(O) + 65e-4, w = v * Math.sin(O) + 6e-3;
|
|
@@ -79,8 +79,8 @@ var Zt = { exports: {} };
|
|
|
79
79
|
w = 1 - s * w * w;
|
|
80
80
|
var K = Math.sqrt(w);
|
|
81
81
|
v = v * 180 / (r * (1 - s) / (w * K) * e), O = O * 180 / (r / K * Math.cos(x) * e);
|
|
82
|
-
var
|
|
83
|
-
return [Ge,
|
|
82
|
+
var ie = f + v, Ge = g + O;
|
|
83
|
+
return [Ge, ie];
|
|
84
84
|
}
|
|
85
85
|
function _(g, f) {
|
|
86
86
|
var v = -100 + 2 * g + 3 * f + 0.2 * f * f + 0.1 * g * f + 0.2 * Math.sqrt(Math.abs(g));
|
|
@@ -117,8 +117,8 @@ var Zt = { exports: {} };
|
|
|
117
117
|
});
|
|
118
118
|
})(Zt);
|
|
119
119
|
var Sr = Zt.exports;
|
|
120
|
-
const
|
|
121
|
-
function
|
|
120
|
+
const se = /* @__PURE__ */ Xe(Sr);
|
|
121
|
+
function oe(i, t) {
|
|
122
122
|
if (!i)
|
|
123
123
|
throw new Error(`AssertionError: ${t}`);
|
|
124
124
|
}
|
|
@@ -156,7 +156,7 @@ function gs(i) {
|
|
|
156
156
|
function ms(i) {
|
|
157
157
|
return i;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function ye(...i) {
|
|
160
160
|
}
|
|
161
161
|
function fs(i) {
|
|
162
162
|
return i != null;
|
|
@@ -218,11 +218,11 @@ const We = "wgs84", D = class {
|
|
|
218
218
|
_convert(t) {
|
|
219
219
|
switch (this.coord) {
|
|
220
220
|
case "bd09":
|
|
221
|
-
return t === "gcj02" ?
|
|
221
|
+
return t === "gcj02" ? se.bd09ToGcj02(this.lng, this.lat) : se.bd09ToWgs84(this.lng, this.lat);
|
|
222
222
|
case "gcj02":
|
|
223
|
-
return t === "wgs84" ?
|
|
223
|
+
return t === "wgs84" ? se.gcj02ToWgs84(this.lng, this.lat) : se.gcj02ToBd09(this.lng, this.lat);
|
|
224
224
|
case "wgs84":
|
|
225
|
-
return t === "bd09" ?
|
|
225
|
+
return t === "bd09" ? se.wgs84ToBd09(this.lng, this.lat) : se.wgs84ToGcj02(this.lng, this.lat);
|
|
226
226
|
}
|
|
227
227
|
throw new Error(`不支持的坐标转换: ${this.coord}=>${t}`);
|
|
228
228
|
}
|
|
@@ -243,7 +243,7 @@ const J = class {
|
|
|
243
243
|
*/
|
|
244
244
|
constructor(t, e) {
|
|
245
245
|
c(this, "coord");
|
|
246
|
-
this.sw = t, this.ne = e,
|
|
246
|
+
this.sw = t, this.ne = e, oe(t.coord === e.coord, "sw和ne的coord应该相同"), oe(Number.isFinite(t.lat) && Number.isFinite(t.lng) && Number.isFinite(e.lat) && Number.isFinite(e.lng), `sw(${t})和ne(${e})不能包含NaN或Infinite`), oe(t.lat <= e.lat, `sw.lat(${t.lat})应该比ne.lat(${e.lat})小`), this.coord = t.coord;
|
|
247
247
|
}
|
|
248
248
|
static isBetweenLng(t, e, r) {
|
|
249
249
|
return t <= e ? t <= r && r <= e : t <= r || r <= e;
|
|
@@ -363,19 +363,19 @@ function Nr(i) {
|
|
|
363
363
|
function Gr(i) {
|
|
364
364
|
return Array.isArray(i) ? [] : {};
|
|
365
365
|
}
|
|
366
|
-
function
|
|
367
|
-
return t.clone !== !1 && t.isMergeableObject(i) ?
|
|
366
|
+
function ve(i, t) {
|
|
367
|
+
return t.clone !== !1 && t.isMergeableObject(i) ? le(Gr(i), i, t) : i;
|
|
368
368
|
}
|
|
369
369
|
function Zr(i, t, e) {
|
|
370
370
|
return i.concat(t).map(function(r) {
|
|
371
|
-
return
|
|
371
|
+
return ve(r, e);
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
374
|
function Wr(i, t) {
|
|
375
375
|
if (!t.customMerge)
|
|
376
|
-
return
|
|
376
|
+
return le;
|
|
377
377
|
var e = t.customMerge(i);
|
|
378
|
-
return typeof e == "function" ? e :
|
|
378
|
+
return typeof e == "function" ? e : le;
|
|
379
379
|
}
|
|
380
380
|
function Hr(i) {
|
|
381
381
|
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(t) {
|
|
@@ -398,24 +398,24 @@ function jr(i, t) {
|
|
|
398
398
|
function Vr(i, t, e) {
|
|
399
399
|
var r = {};
|
|
400
400
|
return e.isMergeableObject(i) && xt(i).forEach(function(s) {
|
|
401
|
-
r[s] =
|
|
401
|
+
r[s] = ve(i[s], e);
|
|
402
402
|
}), xt(t).forEach(function(s) {
|
|
403
|
-
jr(i, s) || (Ht(i, s) && e.isMergeableObject(t[s]) ? r[s] = Wr(s, e)(i[s], t[s], e) : r[s] =
|
|
403
|
+
jr(i, s) || (Ht(i, s) && e.isMergeableObject(t[s]) ? r[s] = Wr(s, e)(i[s], t[s], e) : r[s] = ve(t[s], e));
|
|
404
404
|
}), r;
|
|
405
405
|
}
|
|
406
|
-
function
|
|
407
|
-
e = e || {}, e.arrayMerge = e.arrayMerge || Zr, e.isMergeableObject = e.isMergeableObject || Ar, e.cloneUnlessOtherwiseSpecified =
|
|
406
|
+
function le(i, t, e) {
|
|
407
|
+
e = e || {}, e.arrayMerge = e.arrayMerge || Zr, e.isMergeableObject = e.isMergeableObject || Ar, e.cloneUnlessOtherwiseSpecified = ve;
|
|
408
408
|
var r = Array.isArray(t), s = Array.isArray(i), n = r === s;
|
|
409
|
-
return n ? r ? e.arrayMerge(i, t, e) : Vr(i, t, e) :
|
|
409
|
+
return n ? r ? e.arrayMerge(i, t, e) : Vr(i, t, e) : ve(t, e);
|
|
410
410
|
}
|
|
411
|
-
|
|
411
|
+
le.all = function(t, e) {
|
|
412
412
|
if (!Array.isArray(t))
|
|
413
413
|
throw new Error("first argument should be an array");
|
|
414
414
|
return t.reduce(function(r, s) {
|
|
415
|
-
return
|
|
415
|
+
return le(r, s, e);
|
|
416
416
|
}, {});
|
|
417
417
|
};
|
|
418
|
-
var Fr =
|
|
418
|
+
var Fr = le, Ur = Fr;
|
|
419
419
|
const jt = /* @__PURE__ */ Xe(Ur), Pe = ["3.0"], qr = {
|
|
420
420
|
baidu: {
|
|
421
421
|
version: "3.0",
|
|
@@ -449,7 +449,7 @@ var qe;
|
|
|
449
449
|
}
|
|
450
450
|
i.isScrollable = t;
|
|
451
451
|
})(qe || (qe = {}));
|
|
452
|
-
var
|
|
452
|
+
var he;
|
|
453
453
|
((i) => {
|
|
454
454
|
function t(h, o) {
|
|
455
455
|
return h.length === o.length && h.every((l, d) => l === o[d]);
|
|
@@ -482,8 +482,8 @@ var ae;
|
|
|
482
482
|
return h.length > 0;
|
|
483
483
|
}
|
|
484
484
|
i.isNotEmpty = a;
|
|
485
|
-
})(
|
|
486
|
-
var
|
|
485
|
+
})(he || (he = {}));
|
|
486
|
+
var ce;
|
|
487
487
|
((i) => {
|
|
488
488
|
function t(s, n) {
|
|
489
489
|
const a = s.getLength();
|
|
@@ -507,7 +507,7 @@ var le;
|
|
|
507
507
|
];
|
|
508
508
|
}
|
|
509
509
|
i.listenChanged = r;
|
|
510
|
-
})(
|
|
510
|
+
})(ce || (ce = {}));
|
|
511
511
|
function Ut(i, t, e) {
|
|
512
512
|
return i.addListener(t, e).remove;
|
|
513
513
|
}
|
|
@@ -545,14 +545,14 @@ class De {
|
|
|
545
545
|
return this.delegate.setTarget(t), this;
|
|
546
546
|
}
|
|
547
547
|
addEventListener(t, e) {
|
|
548
|
-
if (
|
|
548
|
+
if (he.includesTyped(this.options.types, t)) {
|
|
549
549
|
this.eventHub.hasListener(t) || this.options.onListen(t), this.eventHub.addEventListener(t, e);
|
|
550
550
|
return;
|
|
551
551
|
}
|
|
552
552
|
this.delegate.addEventListener(t, e);
|
|
553
553
|
}
|
|
554
554
|
removeEventListener(t, e) {
|
|
555
|
-
if (
|
|
555
|
+
if (he.includesTyped(this.options.types, t)) {
|
|
556
556
|
this.eventHub.removeEventListener(t, e), this.eventHub.hasListener(t) || this.options.onCancel(t);
|
|
557
557
|
return;
|
|
558
558
|
}
|
|
@@ -619,10 +619,10 @@ const Ae = class extends qt {
|
|
|
619
619
|
s ? (this.inner.removeEventListener(Ae.EVENT_TYPE_MAP[t] || t, s), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
|
|
620
620
|
}
|
|
621
621
|
};
|
|
622
|
-
let
|
|
622
|
+
let ae = Ae;
|
|
623
623
|
// cSpell:words clickclose
|
|
624
624
|
// 事件类型映射, tg => baidu
|
|
625
|
-
c(
|
|
625
|
+
c(ae, "EVENT_TYPE_MAP", {
|
|
626
626
|
drag: "dragging",
|
|
627
627
|
closeclick: "clickclose",
|
|
628
628
|
"zoom-changed": "zoomend",
|
|
@@ -638,7 +638,7 @@ class Yt {
|
|
|
638
638
|
}
|
|
639
639
|
removeEventListener(t, e) {
|
|
640
640
|
const r = this.typeMap.get(t);
|
|
641
|
-
r &&
|
|
641
|
+
r && he.remove(r, e);
|
|
642
642
|
}
|
|
643
643
|
hasListener(t) {
|
|
644
644
|
const e = this.typeMap.get(t);
|
|
@@ -656,7 +656,7 @@ class kt {
|
|
|
656
656
|
constructor(t, e) {
|
|
657
657
|
c(this, "keyToValue", /* @__PURE__ */ new Map());
|
|
658
658
|
c(this, "valueToKey", /* @__PURE__ */ new Map());
|
|
659
|
-
|
|
659
|
+
oe(t.length === e.length);
|
|
660
660
|
for (let r = t.length - 1; r >= 0; r--)
|
|
661
661
|
this.keyToValue.set(t[r], e[r]), this.valueToKey.set(e[r], t[r]);
|
|
662
662
|
}
|
|
@@ -902,20 +902,20 @@ class et extends Je {
|
|
|
902
902
|
return t.position && s.setAnchor(A.getBaidu().toValue(t.position)), new et(s, t.position);
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
|
-
const
|
|
905
|
+
const ne = class extends Qe {
|
|
906
906
|
constructor(t = "default", e = k.TOP_LEFT, r = Qt) {
|
|
907
|
-
super("mapType", e), this.type = t, this.mapTypes = r,
|
|
907
|
+
super("mapType", e), this.type = t, this.mapTypes = r, ne.type2google || (ne.type2google = {
|
|
908
908
|
default: google.maps.MapTypeControlStyle.DEFAULT,
|
|
909
909
|
horizontal: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
|
|
910
910
|
dropdown: google.maps.MapTypeControlStyle.DROPDOWN_MENU
|
|
911
911
|
});
|
|
912
912
|
}
|
|
913
913
|
static create(t) {
|
|
914
|
-
return new
|
|
914
|
+
return new ne(t.type, t.position, t.mapTypes);
|
|
915
915
|
}
|
|
916
916
|
onCreateOptions() {
|
|
917
917
|
const t = super.onCreateOptions();
|
|
918
|
-
return t.style =
|
|
918
|
+
return t.style = ne.type2google[this.type], t.mapTypeIds = this.mapTypes.map((e) => e instanceof B ? e.getGoogleMapTypeId() : e.id), t;
|
|
919
919
|
}
|
|
920
920
|
addTo(t) {
|
|
921
921
|
super.addTo(t), this.mapTypes.forEach((e) => {
|
|
@@ -923,7 +923,7 @@ const ie = class extends Qe {
|
|
|
923
923
|
});
|
|
924
924
|
}
|
|
925
925
|
};
|
|
926
|
-
let Le =
|
|
926
|
+
let Le = ne;
|
|
927
927
|
c(Le, "type2google");
|
|
928
928
|
class tt extends Je {
|
|
929
929
|
static create(t) {
|
|
@@ -2482,7 +2482,7 @@ class cr {
|
|
|
2482
2482
|
* @mustCallSuper 子类必须调用一次`super.setSearchListener`, 用来保存{@link onData}和{@link onError}
|
|
2483
2483
|
* */
|
|
2484
2484
|
setSearchListener(t, e) {
|
|
2485
|
-
return this.onData && E("setSearchListener只能调用一次"), this.onData = t, this.onError = e,
|
|
2485
|
+
return this.onData && E("setSearchListener只能调用一次"), this.onData = t, this.onError = e, ye;
|
|
2486
2486
|
}
|
|
2487
2487
|
}
|
|
2488
2488
|
class gi extends cr {
|
|
@@ -2590,7 +2590,7 @@ function dr(i) {
|
|
|
2590
2590
|
var t, e;
|
|
2591
2591
|
return !(St(i) === !1 || (t = i.constructor, typeof t != "function") || (e = t.prototype, St(e) === !1) || e.hasOwnProperty("isPrototypeOf") === !1);
|
|
2592
2592
|
}
|
|
2593
|
-
var
|
|
2593
|
+
var _e;
|
|
2594
2594
|
((i) => {
|
|
2595
2595
|
function t(h, o) {
|
|
2596
2596
|
return h.reduce((l, d) => (l[o(d)] = d, l), {});
|
|
@@ -2624,7 +2624,7 @@ var ye;
|
|
|
2624
2624
|
return d;
|
|
2625
2625
|
}
|
|
2626
2626
|
i.pick = a;
|
|
2627
|
-
})(
|
|
2627
|
+
})(_e || (_e = {}));
|
|
2628
2628
|
function At(i) {
|
|
2629
2629
|
if (i.length <= 4)
|
|
2630
2630
|
return i.includes.bind(i);
|
|
@@ -2633,12 +2633,12 @@ function At(i) {
|
|
|
2633
2633
|
return t.has.bind(t);
|
|
2634
2634
|
}
|
|
2635
2635
|
}
|
|
2636
|
-
|
|
2636
|
+
_e.toJsonSafely;
|
|
2637
2637
|
const vi = ["single", "multi"];
|
|
2638
2638
|
var Z = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(Z || {}), Ye;
|
|
2639
2639
|
((i) => {
|
|
2640
2640
|
function t(e) {
|
|
2641
|
-
|
|
2641
|
+
_e.deleteUndefinedPropertyOnPlainObjectDeeply(e);
|
|
2642
2642
|
const r = { center: y.ZERO, zoom: 5 };
|
|
2643
2643
|
return jt(r, e || {}, {
|
|
2644
2644
|
isMergeableObject: dr
|
|
@@ -2683,7 +2683,7 @@ class ze extends ur {
|
|
|
2683
2683
|
super(t, e, r);
|
|
2684
2684
|
}
|
|
2685
2685
|
createDelegate() {
|
|
2686
|
-
return new
|
|
2686
|
+
return new ae(this.innerOverlay, this.map);
|
|
2687
2687
|
}
|
|
2688
2688
|
/** 仅限内部使用; 设为private时, 生成的d.ts文件中, 方法返回值会变成any, 故改成了public */
|
|
2689
2689
|
get overlay() {
|
|
@@ -2937,7 +2937,7 @@ class ct {
|
|
|
2937
2937
|
}
|
|
2938
2938
|
class dt extends ct {
|
|
2939
2939
|
constructor(t, e, r) {
|
|
2940
|
-
super(new
|
|
2940
|
+
super(new ae(t, e)), this.inner = t, this.map = e, this.state = r;
|
|
2941
2941
|
}
|
|
2942
2942
|
static create(t) {
|
|
2943
2943
|
const e = t.position || y.ZERO, r = new BMap.InfoWindow(t.content, {
|
|
@@ -3102,7 +3102,7 @@ class gt extends ct {
|
|
|
3102
3102
|
this.inner.setZIndex(t);
|
|
3103
3103
|
}
|
|
3104
3104
|
}
|
|
3105
|
-
var
|
|
3105
|
+
var be;
|
|
3106
3106
|
((i) => {
|
|
3107
3107
|
function t(s, n) {
|
|
3108
3108
|
if (s !== void 0)
|
|
@@ -3119,7 +3119,7 @@ var ve;
|
|
|
3119
3119
|
return s.replace(/([^A-Z]?)([A-Z])/g, (n, a, h) => a ? `${a}-${h.toLowerCase()}` : h.toLowerCase());
|
|
3120
3120
|
}
|
|
3121
3121
|
i.pascal2kebab = r;
|
|
3122
|
-
})(
|
|
3122
|
+
})(be || (be = {}));
|
|
3123
3123
|
const Mi = {
|
|
3124
3124
|
/** @see https://nodejs.org/docs/v10.3.0/api/path.html#path_path_basename_path_ext */
|
|
3125
3125
|
basename(i, t) {
|
|
@@ -3127,7 +3127,7 @@ const Mi = {
|
|
|
3127
3127
|
return t && s.endsWith(t) ? s.slice(0, -t.length) : s;
|
|
3128
3128
|
}
|
|
3129
3129
|
};
|
|
3130
|
-
var
|
|
3130
|
+
var Me = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overlayMouseTarget = "overlayMouseTarget", i.float = "float", i))(Me || {}), Te;
|
|
3131
3131
|
((i) => {
|
|
3132
3132
|
function t(r, s) {
|
|
3133
3133
|
switch (r) {
|
|
@@ -3159,7 +3159,7 @@ var _e = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overla
|
|
|
3159
3159
|
}
|
|
3160
3160
|
}
|
|
3161
3161
|
i.toBaidu = e;
|
|
3162
|
-
})(
|
|
3162
|
+
})(Te || (Te = {}));
|
|
3163
3163
|
class Ti {
|
|
3164
3164
|
constructor(t, e) {
|
|
3165
3165
|
c(this, "baidu");
|
|
@@ -3186,7 +3186,7 @@ class Ti {
|
|
|
3186
3186
|
initialize(n) {
|
|
3187
3187
|
var o;
|
|
3188
3188
|
const a = t.create(), h = n.getPanes();
|
|
3189
|
-
return (o =
|
|
3189
|
+
return (o = Te.toBaidu(t.mapPane, h)) == null || o.appendChild(a), a;
|
|
3190
3190
|
}
|
|
3191
3191
|
draw() {
|
|
3192
3192
|
t.draw();
|
|
@@ -3211,7 +3211,7 @@ class Ti {
|
|
|
3211
3211
|
class e extends google.maps.OverlayView {
|
|
3212
3212
|
onAdd() {
|
|
3213
3213
|
const s = t.create(), n = this.getPanes() ?? E("onAdd回调中一定会有panes");
|
|
3214
|
-
|
|
3214
|
+
Te.toGoogle(t.mapPane, n).appendChild(s);
|
|
3215
3215
|
}
|
|
3216
3216
|
draw() {
|
|
3217
3217
|
t.draw();
|
|
@@ -3239,7 +3239,7 @@ function Oi(i, t, e, r, s) {
|
|
|
3239
3239
|
}
|
|
3240
3240
|
function Ci() {
|
|
3241
3241
|
return class extends google.maps.OverlayView {
|
|
3242
|
-
constructor(e, r, s, n =
|
|
3242
|
+
constructor(e, r, s, n = Me.overlayMouseTarget, a) {
|
|
3243
3243
|
super();
|
|
3244
3244
|
c(this, "container");
|
|
3245
3245
|
this.position = r, this.offset = s, this._mapPane = n, this.container = document.createElement("div"), this.container.className = "label-container", this.container.style.position = "absolute", a && this.setZIndex(a), this.container.addEventListener("click", () => {
|
|
@@ -3255,7 +3255,7 @@ function Ci() {
|
|
|
3255
3255
|
}
|
|
3256
3256
|
onAdd() {
|
|
3257
3257
|
const e = this.getPanes() ?? E("onAdd回调中一定能够获取panes");
|
|
3258
|
-
|
|
3258
|
+
Te.toGoogle(this._mapPane, e).appendChild(this.container);
|
|
3259
3259
|
}
|
|
3260
3260
|
draw() {
|
|
3261
3261
|
var e, r;
|
|
@@ -3291,7 +3291,7 @@ function Ci() {
|
|
|
3291
3291
|
}
|
|
3292
3292
|
};
|
|
3293
3293
|
}
|
|
3294
|
-
var
|
|
3294
|
+
var de;
|
|
3295
3295
|
((i) => {
|
|
3296
3296
|
function t(r) {
|
|
3297
3297
|
return typeof r == "string" ? r : r.outerHTML;
|
|
@@ -3305,7 +3305,7 @@ var he;
|
|
|
3305
3305
|
return r;
|
|
3306
3306
|
}
|
|
3307
3307
|
i.toElement = e;
|
|
3308
|
-
})(
|
|
3308
|
+
})(de || (de = {}));
|
|
3309
3309
|
class mt extends ze {
|
|
3310
3310
|
constructor(e, r, s, n) {
|
|
3311
3311
|
super(e, r, s);
|
|
@@ -3317,7 +3317,7 @@ class mt extends ze {
|
|
|
3317
3317
|
}
|
|
3318
3318
|
static create(e) {
|
|
3319
3319
|
var a;
|
|
3320
|
-
const r = this.coordType, s = new BMap.Label(
|
|
3320
|
+
const r = this.coordType, s = new BMap.Label(de.toString(e.content), {
|
|
3321
3321
|
position: (a = e.position) == null ? void 0 : a.toBaidu(r),
|
|
3322
3322
|
offset: e.offset && new BMap.Size(e.offset.x, e.offset.y)
|
|
3323
3323
|
});
|
|
@@ -3337,7 +3337,7 @@ class mt extends ze {
|
|
|
3337
3337
|
characterData: !0,
|
|
3338
3338
|
childList: !0,
|
|
3339
3339
|
subtree: !0
|
|
3340
|
-
})), r || this.innerOverlay.setContent(
|
|
3340
|
+
})), r || this.innerOverlay.setContent(de.toString(e)), this.content = e);
|
|
3341
3341
|
}
|
|
3342
3342
|
setZIndex(e) {
|
|
3343
3343
|
this.innerOverlay.setZIndex(e);
|
|
@@ -3379,7 +3379,7 @@ class mt extends ze {
|
|
|
3379
3379
|
height: e.style.anchor.height + o.y
|
|
3380
3380
|
}, process.env.NODE_ENV !== "production" && setTimeout(() => {
|
|
3381
3381
|
var u, p;
|
|
3382
|
-
if (
|
|
3382
|
+
if (oe(e.__icon__, `${e}必须是由'SymbolIcon.toBaidu()'创建的`), !e.anchor) {
|
|
3383
3383
|
console.log("BaiduLabelOverlay.attachIcon", "Bmap.Symbol.anchor尚未计算完成");
|
|
3384
3384
|
return;
|
|
3385
3385
|
}
|
|
@@ -3392,7 +3392,7 @@ class mt extends ze {
|
|
|
3392
3392
|
e.__icon__.scale,
|
|
3393
3393
|
e.__icon__.strokeWeight
|
|
3394
3394
|
].map((_) => _ ?? "").join(",");
|
|
3395
|
-
console.warn("BaiduLabelOverlay.attachIcon", e.__icon__,
|
|
3395
|
+
console.warn("BaiduLabelOverlay.attachIcon", e.__icon__, be.trimIndent(
|
|
3396
3396
|
`
|
|
3397
3397
|
为了保证Label的位置正确, 请将SymbolIcon(${b})中baiduLabelOffset的值改写成:
|
|
3398
3398
|
${JSON.stringify({ x: l, y: d })}
|
|
@@ -3410,7 +3410,7 @@ class ft extends at {
|
|
|
3410
3410
|
static create(t) {
|
|
3411
3411
|
var s;
|
|
3412
3412
|
const e = this.coordType, r = Oi(
|
|
3413
|
-
|
|
3413
|
+
de.toElement(t.content),
|
|
3414
3414
|
(s = t.position) == null ? void 0 : s.toGoogle(e),
|
|
3415
3415
|
t.offset,
|
|
3416
3416
|
t.mapPane,
|
|
@@ -3422,7 +3422,7 @@ class ft extends at {
|
|
|
3422
3422
|
this.innerOverlay.setZIndex(t);
|
|
3423
3423
|
}
|
|
3424
3424
|
setContent(t) {
|
|
3425
|
-
this.innerOverlay.setElement(
|
|
3425
|
+
this.innerOverlay.setElement(de.toElement(t));
|
|
3426
3426
|
}
|
|
3427
3427
|
getPosition() {
|
|
3428
3428
|
const t = this.innerOverlay.getPosition();
|
|
@@ -3506,7 +3506,7 @@ const bs = {
|
|
|
3506
3506
|
FORWARD_CLOSED_ARROW: { baidu: () => BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW, google: () => google.maps.SymbolPath.FORWARD_CLOSED_ARROW },
|
|
3507
3507
|
FORWARD_OPEN_ARROW: { baidu: () => BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW, google: () => google.maps.SymbolPath.FORWARD_OPEN_ARROW }
|
|
3508
3508
|
};
|
|
3509
|
-
class
|
|
3509
|
+
class Oe extends ze {
|
|
3510
3510
|
constructor(t, e, r, s) {
|
|
3511
3511
|
super(t, e, r), this.state = s;
|
|
3512
3512
|
}
|
|
@@ -3522,7 +3522,7 @@ class Me extends ze {
|
|
|
3522
3522
|
}, n = new BMap.Marker(t.position.toBaidu(e), s);
|
|
3523
3523
|
t.zIndex !== void 0 && n.setZIndex(t.zIndex);
|
|
3524
3524
|
const a = t.clickable === void 0 ? !0 : t.clickable, h = !!t.draggable;
|
|
3525
|
-
return new
|
|
3525
|
+
return new Oe(n, e, this, { clickable: a, draggable: h, zIndex: t.zIndex }).visibleOptionInternal(t.visible);
|
|
3526
3526
|
}
|
|
3527
3527
|
getPosition() {
|
|
3528
3528
|
return y.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
|
|
@@ -3730,7 +3730,7 @@ class bt extends Ne {
|
|
|
3730
3730
|
var s;
|
|
3731
3731
|
return (s = this.eventHubDelegate) == null ? void 0 : s.notify({ type: "path-edited", target: this });
|
|
3732
3732
|
}, r = this.innerOverlay.getPath();
|
|
3733
|
-
this.pathChangedListeners =
|
|
3733
|
+
this.pathChangedListeners = ce.listenChanged(r, e);
|
|
3734
3734
|
}
|
|
3735
3735
|
clearPathChangedListeners() {
|
|
3736
3736
|
var e;
|
|
@@ -3806,7 +3806,7 @@ class Tt extends Ne {
|
|
|
3806
3806
|
return (s = this.eventHubDelegate) == null ? void 0 : s.notify({ type: "paths-edited", target: this });
|
|
3807
3807
|
}, r = this.innerOverlay.getPaths();
|
|
3808
3808
|
this.pathChangedListeners = [], r.forEach((s) => {
|
|
3809
|
-
this.pathChangedListeners.push(...
|
|
3809
|
+
this.pathChangedListeners.push(...ce.listenChanged(s, e));
|
|
3810
3810
|
});
|
|
3811
3811
|
}
|
|
3812
3812
|
clearPathChangedListeners() {
|
|
@@ -3932,7 +3932,7 @@ class wi extends ot {
|
|
|
3932
3932
|
c(this, "createRectangle", Ot.create);
|
|
3933
3933
|
c(this, "createInfoWindow", dt.create);
|
|
3934
3934
|
c(this, "createInfoBox", pt.create);
|
|
3935
|
-
c(this, "createMarker",
|
|
3935
|
+
c(this, "createMarker", Oe.create);
|
|
3936
3936
|
c(this, "createMapTypeControl", et.create);
|
|
3937
3937
|
c(this, "createZoomControl", it.create);
|
|
3938
3938
|
c(this, "createScaleControl", tt.create);
|
|
@@ -3942,7 +3942,7 @@ class wi extends ot {
|
|
|
3942
3942
|
mapType: r.buildInMapTypeId && ((s = this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId)) == null ? void 0 : s.asBaiduMapType()),
|
|
3943
3943
|
enableMapClick: !1
|
|
3944
3944
|
// 关闭底图点击功能
|
|
3945
|
-
}), this.map.centerAndZoom(r.center.toBaidu(this.coordType), r.zoom + X), this.setGestureHandling(r.gestureHandling), r.infoWindowMode === "multi" && console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"), r.mapStyle && this.map.setMapStyleV2(r.mapStyle.toBaidu()), this.setEventTargetDelegate(new
|
|
3945
|
+
}), this.map.centerAndZoom(r.center.toBaidu(this.coordType), r.zoom + X), this.setGestureHandling(r.gestureHandling), r.infoWindowMode === "multi" && console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"), r.mapStyle && this.map.setMapStyleV2(r.mapStyle.toBaidu()), this.setEventTargetDelegate(new ae(this.map, this)), this.map.addEventListener("addoverlay", (n) => {
|
|
3946
3946
|
const a = n.target.__info_box__;
|
|
3947
3947
|
a && (console.debug("add:info-box", a), this.map.addOverlay(a));
|
|
3948
3948
|
}), this.map.addEventListener("removeoverlay", (n) => {
|
|
@@ -4081,7 +4081,7 @@ class wi extends ot {
|
|
|
4081
4081
|
}
|
|
4082
4082
|
}
|
|
4083
4083
|
removeCustomControl(e) {
|
|
4084
|
-
e.inner && (
|
|
4084
|
+
e.inner && (oe(e.inner instanceof BMap.Control, `control.inner(${e.inner})需要是BMap.Control`), this.map.removeControl(e.inner));
|
|
4085
4085
|
}
|
|
4086
4086
|
createMarkerClusterer(e) {
|
|
4087
4087
|
return new ci(this, e);
|
|
@@ -4199,7 +4199,7 @@ class Ei extends ot {
|
|
|
4199
4199
|
this.map.overlayMapTypes.push(e.asGoogleMapType());
|
|
4200
4200
|
}
|
|
4201
4201
|
removeOverlayMapType(e) {
|
|
4202
|
-
|
|
4202
|
+
ce.remove(this.map.overlayMapTypes, e.asGoogleMapType());
|
|
4203
4203
|
}
|
|
4204
4204
|
addLayer(e) {
|
|
4205
4205
|
e.asGoogleLayer().setMap(this.map);
|
|
@@ -4238,7 +4238,7 @@ class Ei extends ot {
|
|
|
4238
4238
|
removeCustomControl(e) {
|
|
4239
4239
|
if (e.inner) {
|
|
4240
4240
|
const r = this.map.controls[A.getGoogle().toValue(e.position)];
|
|
4241
|
-
|
|
4241
|
+
ce.remove(r, e.inner);
|
|
4242
4242
|
}
|
|
4243
4243
|
}
|
|
4244
4244
|
createMarkerClusterer(e) {
|
|
@@ -4432,18 +4432,18 @@ function xi({ type: i, config: t }) {
|
|
|
4432
4432
|
case z.baidu:
|
|
4433
4433
|
return $t(`https://api.map.baidu.com/api?v=${t.version}&ak=${t.key}`);
|
|
4434
4434
|
case z.here:
|
|
4435
|
-
return
|
|
4435
|
+
return ge(pe("core", t.version)).then(() => Promise.all([
|
|
4436
4436
|
// 其他大多数模块都可以同时载入
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4437
|
+
ge(pe("service", t.version)),
|
|
4438
|
+
ge(pe("mapevents", t.version)),
|
|
4439
|
+
ge(pe("clustering", t.version)),
|
|
4440
|
+
ge(pe("ui", t.version))
|
|
4441
4441
|
])).catch((s) => (delete e[r], Promise.reject(s)));
|
|
4442
4442
|
default:
|
|
4443
4443
|
Fe(i);
|
|
4444
4444
|
}
|
|
4445
4445
|
}
|
|
4446
|
-
function
|
|
4446
|
+
function pe(i, t = Pe[0]) {
|
|
4447
4447
|
return `https://js.api.here.com/v3/${t}/mapsjs-${i}.js`;
|
|
4448
4448
|
}
|
|
4449
4449
|
function Pi(i) {
|
|
@@ -4465,7 +4465,7 @@ function $t(i, t = "callback") {
|
|
|
4465
4465
|
n.src = `${i}&${t}=${s}`, n.onerror = r, document.body.appendChild(n);
|
|
4466
4466
|
});
|
|
4467
4467
|
}
|
|
4468
|
-
function
|
|
4468
|
+
function ge(i) {
|
|
4469
4469
|
return new Promise((t, e) => {
|
|
4470
4470
|
const r = document.createElement("script");
|
|
4471
4471
|
r.src = i, r.onload = t, r.onerror = e, document.body.appendChild(r);
|
|
@@ -4514,17 +4514,17 @@ function Ms(i) {
|
|
|
4514
4514
|
};
|
|
4515
4515
|
}), t;
|
|
4516
4516
|
}
|
|
4517
|
-
const
|
|
4517
|
+
const me = {
|
|
4518
4518
|
enumerable: !0,
|
|
4519
4519
|
configurable: !0,
|
|
4520
|
-
get:
|
|
4521
|
-
set:
|
|
4520
|
+
get: ye,
|
|
4521
|
+
set: ye
|
|
4522
4522
|
};
|
|
4523
4523
|
function Ii(i) {
|
|
4524
4524
|
return Object.keys(i).forEach((t) => {
|
|
4525
4525
|
const e = i[t];
|
|
4526
4526
|
let r = !1;
|
|
4527
|
-
typeof e == "function" ? (
|
|
4527
|
+
typeof e == "function" ? (me.get = e, me.set = ye, r = !0) : typeof e == "object" && typeof e.get == "function" && (me.get = e.get, me.set = e.set, r = !0), r && (i[t] = Object.defineProperty(i, t, me));
|
|
4528
4528
|
}), i;
|
|
4529
4529
|
}
|
|
4530
4530
|
function Ts(i) {
|
|
@@ -4555,9 +4555,9 @@ function Cs(i, t) {
|
|
|
4555
4555
|
function Si(i, t) {
|
|
4556
4556
|
const e = {}, r = {}, s = {};
|
|
4557
4557
|
return Object.keys(i).forEach((n) => {
|
|
4558
|
-
n.startsWith("on") ? e[
|
|
4558
|
+
n.startsWith("on") ? e[be.pascal2kebab(n.substring(2))] = i[n] : r[n] = i[n];
|
|
4559
4559
|
}), t && Object.keys(t).forEach((n) => {
|
|
4560
|
-
n.startsWith("on") && (s[
|
|
4560
|
+
n.startsWith("on") && (s[be.pascal2kebab(n.substring(2))] = t[n]);
|
|
4561
4561
|
}), {
|
|
4562
4562
|
/** class/style/未声明的属性 等 */
|
|
4563
4563
|
binds: r,
|
|
@@ -4582,17 +4582,18 @@ const ws = () => {
|
|
|
4582
4582
|
((s && s.type) !== i || Date.now() - (t ?? 0) > 1e3) && e(s);
|
|
4583
4583
|
}
|
|
4584
4584
|
return { eventLog: e, eventLogLess: r };
|
|
4585
|
-
}, wt = "$map",
|
|
4585
|
+
}, wt = "$map", te = "onCreate", re = "onDestroy", P = C({
|
|
4586
4586
|
inject: [wt],
|
|
4587
|
+
data: () => ({ $_isCreated: !1 }),
|
|
4587
4588
|
mounted() {
|
|
4588
|
-
Ee(this,
|
|
4589
|
+
this.$_isCreated ? process.env.NODE_ENV !== "production" && console.warn(`${te}调用时机不对, 原因未知, 虚拟DOM太过频繁的刷新可能导致该问题🤔️`) : (Ee(this, te), this.$_isCreated = !0);
|
|
4589
4590
|
},
|
|
4590
4591
|
beforeUnmount() {
|
|
4591
|
-
Ee(this,
|
|
4592
|
+
this.$_isCreated ? (Ee(this, re), this.$_isCreated = !1) : process.env.NODE_ENV !== "production" && console.warn(`${re}调用时机不对, 原因未知, 虚拟DOM太过频繁的刷新可能导致该问题🤔️`);
|
|
4592
4593
|
},
|
|
4593
4594
|
methods: {
|
|
4594
4595
|
recreate() {
|
|
4595
|
-
Ee(this,
|
|
4596
|
+
Ee(this, re), Ee(this, te);
|
|
4596
4597
|
}
|
|
4597
4598
|
},
|
|
4598
4599
|
render() {
|
|
@@ -4669,7 +4670,7 @@ const ws = () => {
|
|
|
4669
4670
|
},
|
|
4670
4671
|
computed: {
|
|
4671
4672
|
propsJson() {
|
|
4672
|
-
return
|
|
4673
|
+
return _e.toJsonSafely(this.$props);
|
|
4673
4674
|
}
|
|
4674
4675
|
},
|
|
4675
4676
|
watch: {
|
|
@@ -4765,7 +4766,7 @@ const U = (i, t) => {
|
|
|
4765
4766
|
return e;
|
|
4766
4767
|
};
|
|
4767
4768
|
function Ri(i, t, e, r, s, n) {
|
|
4768
|
-
return W(), j("div",
|
|
4769
|
+
return W(), j("div", ue({ class: "tg-map" }, i.attrs.binds), [
|
|
4769
4770
|
Or("div", {
|
|
4770
4771
|
ref: "map",
|
|
4771
4772
|
class: Re({
|
|
@@ -4932,19 +4933,27 @@ function fr() {
|
|
|
4932
4933
|
function Wi() {
|
|
4933
4934
|
const i = Er(wt);
|
|
4934
4935
|
let t, e;
|
|
4935
|
-
|
|
4936
|
+
i == null && E(`<${fr() || "unknown"}>必须作为<tg-map>的子代组件`);
|
|
4937
|
+
let r = !1;
|
|
4938
|
+
return {
|
|
4936
4939
|
mapRef: i,
|
|
4937
4940
|
/** 读取map对象, 只要放在<tg-map>里面的组件(除#overlay插槽外)都能够立即读取到map对象 */
|
|
4938
4941
|
get map() {
|
|
4939
4942
|
return i.value ?? E("map尚未初始化");
|
|
4940
4943
|
},
|
|
4941
4944
|
/** 地图元素创建回调 */
|
|
4942
|
-
[
|
|
4943
|
-
|
|
4945
|
+
[te](s) {
|
|
4946
|
+
const n = () => {
|
|
4947
|
+
r ? process.env.NODE_ENV !== "production" && console.warn(`${te}调用时机不对, 原因未知, 虚拟DOM太过频繁的刷新可能导致该问题🤔️`) : (s(), r = !0);
|
|
4948
|
+
};
|
|
4949
|
+
Lr(n), t && E(`${te}只能调用一次`), t = n;
|
|
4944
4950
|
},
|
|
4945
4951
|
/** 地图元素销毁回调 */
|
|
4946
|
-
[
|
|
4947
|
-
|
|
4952
|
+
[re](s) {
|
|
4953
|
+
const n = () => {
|
|
4954
|
+
r ? (s(), r = !1) : process.env.NODE_ENV !== "production" && console.warn(`${re}调用时机不对, 原因未知, 虚拟DOM太过频繁的刷新可能导致该问题🤔️`);
|
|
4955
|
+
};
|
|
4956
|
+
xr(n), e && E(`${re}只能调用一次`), e = n;
|
|
4948
4957
|
},
|
|
4949
4958
|
/** 重新创建地图元素 */
|
|
4950
4959
|
recreate() {
|
|
@@ -5028,7 +5037,7 @@ const ks = C({
|
|
|
5028
5037
|
this.markers.push(i), this.isInitiated() && this.clusterer.addMarker(i);
|
|
5029
5038
|
},
|
|
5030
5039
|
onRemoveMarker(i) {
|
|
5031
|
-
this.isInitiated() && this.clusterer.removeMarker(i),
|
|
5040
|
+
this.isInitiated() && this.clusterer.removeMarker(i), he.remove(this.markers, i);
|
|
5032
5041
|
}
|
|
5033
5042
|
}
|
|
5034
5043
|
});
|
|
@@ -5156,7 +5165,7 @@ const Ui = C({
|
|
|
5156
5165
|
name: "tg-element-overlay",
|
|
5157
5166
|
mixins: [P],
|
|
5158
5167
|
props: {
|
|
5159
|
-
mapPane: N(
|
|
5168
|
+
mapPane: N(Me, Me.overlayMouseTarget),
|
|
5160
5169
|
position: R(y)
|
|
5161
5170
|
},
|
|
5162
5171
|
setup() {
|
|
@@ -5185,7 +5194,7 @@ const Ui = C({
|
|
|
5185
5194
|
}
|
|
5186
5195
|
});
|
|
5187
5196
|
function qi(i, t, e, r, s, n) {
|
|
5188
|
-
return W(), j("div",
|
|
5197
|
+
return W(), j("div", ue({
|
|
5189
5198
|
class: i.$options.name
|
|
5190
5199
|
}, i.$attrs), [
|
|
5191
5200
|
G(i.$slots, "default")
|
|
@@ -5233,7 +5242,7 @@ const Ss = /* @__PURE__ */ U(Ui, [["render", qi]]), Yi = C({
|
|
|
5233
5242
|
i ? this.marker.setIcon(i) : this.recreate();
|
|
5234
5243
|
},
|
|
5235
5244
|
clickable(i) {
|
|
5236
|
-
this.marker instanceof
|
|
5245
|
+
this.marker instanceof Oe ? this.recreate() : this.marker.setClickable(i);
|
|
5237
5246
|
},
|
|
5238
5247
|
draggable(i) {
|
|
5239
5248
|
this.marker.setDraggable(i);
|
|
@@ -5245,7 +5254,7 @@ const Ss = /* @__PURE__ */ U(Ui, [["render", qi]]), Yi = C({
|
|
|
5245
5254
|
this.recreate();
|
|
5246
5255
|
},
|
|
5247
5256
|
zIndex(i) {
|
|
5248
|
-
this.marker instanceof
|
|
5257
|
+
this.marker instanceof Oe ? this.recreate() : this.marker.setZIndex(i);
|
|
5249
5258
|
},
|
|
5250
5259
|
visible(i) {
|
|
5251
5260
|
this.marker.setVisible(i);
|
|
@@ -5281,7 +5290,7 @@ const Ss = /* @__PURE__ */ U(Ui, [["render", qi]]), Yi = C({
|
|
|
5281
5290
|
}
|
|
5282
5291
|
});
|
|
5283
5292
|
function Ki(i, t, e, r, s, n) {
|
|
5284
|
-
return W(), j("div",
|
|
5293
|
+
return W(), j("div", ue({
|
|
5285
5294
|
class: i.$options.name
|
|
5286
5295
|
}, i.attrs.binds), [
|
|
5287
5296
|
G(i.$slots, "default")
|
|
@@ -5361,7 +5370,7 @@ const Et = /* @__PURE__ */ U(Yi, [["render", Ki]]), Xi = C({
|
|
|
5361
5370
|
}
|
|
5362
5371
|
});
|
|
5363
5372
|
function Ji(i, t, e, r, s, n) {
|
|
5364
|
-
return W(), j("div",
|
|
5373
|
+
return W(), j("div", ue({
|
|
5365
5374
|
class: i.$options.name
|
|
5366
5375
|
}, i.attrs.binds), [
|
|
5367
5376
|
G(i.$slots, "default")
|
|
@@ -5432,7 +5441,7 @@ const As = /* @__PURE__ */ U(Xi, [["render", Ji]]), Qi = C({
|
|
|
5432
5441
|
}
|
|
5433
5442
|
});
|
|
5434
5443
|
function es(i, t, e, r, s, n) {
|
|
5435
|
-
return Pr((W(), j("div",
|
|
5444
|
+
return Pr((W(), j("div", ue({
|
|
5436
5445
|
class: i.$options.name
|
|
5437
5446
|
}, i.attrs.binds), [
|
|
5438
5447
|
G(i.$slots, "default")
|
|
@@ -5448,7 +5457,7 @@ const Rs = /* @__PURE__ */ U(Qi, [["render", es]]), ts = C({
|
|
|
5448
5457
|
position: m(y),
|
|
5449
5458
|
offset: m(Object),
|
|
5450
5459
|
zIndex: m(Number),
|
|
5451
|
-
mapPane: N(
|
|
5460
|
+
mapPane: N(Me)
|
|
5452
5461
|
},
|
|
5453
5462
|
emits: void 0,
|
|
5454
5463
|
setup(i, { attrs: t }) {
|
|
@@ -5503,7 +5512,7 @@ const Rs = /* @__PURE__ */ U(Qi, [["render", es]]), ts = C({
|
|
|
5503
5512
|
}
|
|
5504
5513
|
});
|
|
5505
5514
|
function rs(i, t, e, r, s, n) {
|
|
5506
|
-
return W(), j("div",
|
|
5515
|
+
return W(), j("div", ue({
|
|
5507
5516
|
class: i.$options.name
|
|
5508
5517
|
}, i.attrs.binds), [
|
|
5509
5518
|
G(i.$slots, "default")
|
|
@@ -5712,7 +5721,7 @@ const $s = /* @__PURE__ */ U(ts, [["render", rs]]), Ds = C({
|
|
|
5712
5721
|
beforeCreate() {
|
|
5713
5722
|
const r = fr() ?? "", n = (t.nameRegex || /^[A-Z]/).test(r) ? (a) => {
|
|
5714
5723
|
t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : is.includes(a) || console.debug("[lifecycle]", r, a);
|
|
5715
|
-
} :
|
|
5724
|
+
} : ye;
|
|
5716
5725
|
n("beforeCreate"), this.__life_impl = n;
|
|
5717
5726
|
},
|
|
5718
5727
|
created() {
|
|
@@ -5752,7 +5761,7 @@ const $s = /* @__PURE__ */ U(ts, [["render", rs]]), Ds = C({
|
|
|
5752
5761
|
}
|
|
5753
5762
|
}
|
|
5754
5763
|
}, ss = 6378137;
|
|
5755
|
-
function
|
|
5764
|
+
function fe(i) {
|
|
5756
5765
|
return i * Math.PI / 180;
|
|
5757
5766
|
}
|
|
5758
5767
|
function Dt(i) {
|
|
@@ -5761,7 +5770,7 @@ function Dt(i) {
|
|
|
5761
5770
|
function ns(i, t) {
|
|
5762
5771
|
if (i.lat === t.lat && i.lng === t.lng)
|
|
5763
5772
|
return 0;
|
|
5764
|
-
const e =
|
|
5773
|
+
const e = fe((i.lat + t.lat) / 2), r = fe((i.lat - t.lat) / 2), s = fe((i.lng - t.lng) / 2);
|
|
5765
5774
|
let n = Math.sin(r), a = Math.sin(s), h = Math.sin(e);
|
|
5766
5775
|
const o = ss, l = 1 / 298.257;
|
|
5767
5776
|
n = n * n, a = a * a, h = h * h;
|
|
@@ -5769,16 +5778,16 @@ function ns(i, t) {
|
|
|
5769
5778
|
return _ * (1 + l * (M * h * (1 - n) - g * (1 - h) * n));
|
|
5770
5779
|
}
|
|
5771
5780
|
function os(i, t, e) {
|
|
5772
|
-
const s = 63567523142e-4, n = 1 / 298.257223563, a =
|
|
5781
|
+
const s = 63567523142e-4, n = 1 / 298.257223563, a = fe(t), h = Math.sin(a), o = Math.cos(a), l = (1 - n) * Math.tan(fe(i.lat)), d = 1 / Math.sqrt(1 + l * l), u = l * d, p = Math.atan2(l, o), b = d * h, _ = 1 - b * b, M = _ * (6378137 * 6378137 - s * s) / (s * s), g = 1 + M / 16384 * (4096 + M * (-768 + M * (320 - 175 * M))), f = M / 1024 * (256 + M * (-128 + M * (74 - 47 * M)));
|
|
5773
5782
|
let v = 0, O = 0, x = 0, w = e / (s * g), K = 2 * Math.PI;
|
|
5774
5783
|
for (; Math.abs(w - K) > 1e-12; ) {
|
|
5775
5784
|
v = Math.cos(2 * p + w), O = Math.sin(w), x = Math.cos(w);
|
|
5776
5785
|
const _r = f * O * (v + f / 4 * (x * (-1 + 2 * v * v) - f / 6 * v * (-3 + 4 * O * O) * (-3 + 4 * v * v)));
|
|
5777
5786
|
K = w, w = e / (s * g) + _r;
|
|
5778
5787
|
}
|
|
5779
|
-
const
|
|
5788
|
+
const ie = u * O - d * x * o, Ge = Math.atan2(
|
|
5780
5789
|
u * x + d * O * o,
|
|
5781
|
-
(1 - n) * Math.sqrt(b * b +
|
|
5790
|
+
(1 - n) * Math.sqrt(b * b + ie * ie)
|
|
5782
5791
|
), yr = Math.atan2(O * h, d * x - u * O * o), Ze = n / 16 * _ * (4 + n * (4 - 3 * _)), vr = yr - (1 - Ze) * n * b * (w + Ze * O * (v + Ze * x * (-1 + 2 * v * v)));
|
|
5783
5792
|
return { lng: i.lng + Dt(vr), lat: Dt(Ge) };
|
|
5784
5793
|
}
|
|
@@ -5789,13 +5798,13 @@ const Zs = {
|
|
|
5789
5798
|
install(i, t) {
|
|
5790
5799
|
Yr(t);
|
|
5791
5800
|
const e = i.config.optionMergeStrategies;
|
|
5792
|
-
e[
|
|
5801
|
+
e[te] = e[re] = (r, s) => r ? [...new Set([].concat(r, s))] : Array.isArray(s) ? s : [s];
|
|
5793
5802
|
}
|
|
5794
5803
|
};
|
|
5795
5804
|
export {
|
|
5796
5805
|
Kt as AbstractControl,
|
|
5797
5806
|
ot as AbstractMap,
|
|
5798
|
-
|
|
5807
|
+
he as Arrays,
|
|
5799
5808
|
rr as Autocomplete,
|
|
5800
5809
|
ni as BaiduAutocomplete,
|
|
5801
5810
|
lt as BaiduCircle,
|
|
@@ -5803,7 +5812,7 @@ export {
|
|
|
5803
5812
|
pt as BaiduInfoBoxOverlay,
|
|
5804
5813
|
dt as BaiduInfoWindow,
|
|
5805
5814
|
et as BaiduMapTypeControl,
|
|
5806
|
-
|
|
5815
|
+
Oe as BaiduMarker,
|
|
5807
5816
|
ci as BaiduMarkerClusterer,
|
|
5808
5817
|
ze as BaiduOverlay,
|
|
5809
5818
|
pi as BaiduPlacesService,
|
|
@@ -5842,21 +5851,21 @@ export {
|
|
|
5842
5851
|
y as LatLng,
|
|
5843
5852
|
I as LatLngBounds,
|
|
5844
5853
|
Gs as LifecycleLogPlugin,
|
|
5845
|
-
|
|
5846
|
-
|
|
5854
|
+
te as MIXIN_HOOK_CREATE,
|
|
5855
|
+
re as MIXIN_HOOK_DESTROY,
|
|
5847
5856
|
wt as MIXIN_MAP_NAME,
|
|
5848
|
-
|
|
5857
|
+
ce as MVCArrays,
|
|
5849
5858
|
P as MapMixin,
|
|
5850
5859
|
Jt as MapTypeControlType,
|
|
5851
5860
|
fi as MapZoom,
|
|
5852
5861
|
lr as MarkerClusterer,
|
|
5853
|
-
|
|
5862
|
+
_e as Objects,
|
|
5854
5863
|
ur as Overlay,
|
|
5855
5864
|
hr as PlacesService,
|
|
5856
5865
|
q as Point,
|
|
5857
5866
|
cr as SearchBox,
|
|
5858
5867
|
Zs as SphericalUtils,
|
|
5859
|
-
|
|
5868
|
+
be as Strings,
|
|
5860
5869
|
Se as SymbolIcon,
|
|
5861
5870
|
bs as SymbolPath,
|
|
5862
5871
|
Is as TgCircle,
|
|
@@ -5879,7 +5888,7 @@ export {
|
|
|
5879
5888
|
Bs as TgTrafficLayer,
|
|
5880
5889
|
ks as TgZoomControl,
|
|
5881
5890
|
Be as UnionIcon,
|
|
5882
|
-
|
|
5891
|
+
oe as assert,
|
|
5883
5892
|
Fe as assertNever,
|
|
5884
5893
|
Ee as callHook,
|
|
5885
5894
|
Ms as computedSaveOnThis,
|
|
@@ -5896,7 +5905,7 @@ export {
|
|
|
5896
5905
|
fs as isDef,
|
|
5897
5906
|
ds as isInstanceOf,
|
|
5898
5907
|
cs as lateinit,
|
|
5899
|
-
|
|
5908
|
+
ye as noop,
|
|
5900
5909
|
m as optionalProp,
|
|
5901
5910
|
Mi as path,
|
|
5902
5911
|
R as requiredProp,
|