tg-map-vue3 3.8.7 → 3.8.9
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 +1 -0
- package/dist/src/map/map/overlay/info-box.d.ts +1 -0
- package/dist/src/map/map/overlay/info-window.d.ts +1 -0
- package/dist/src/utils/baidu-utils.d.ts +14 -0
- package/dist/tg-map.js +329 -321
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +6 -6
- package/dist/tg-map.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/tg-map.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.baidu-info-box-container{transform:translateY(-11px);font-size:13px;font-weight:300;width:100vw;cursor:auto;-webkit-user-select:auto!important;user-select:auto!important}.baidu-info-box-container__border{position:absolute;padding:12px;background-color:#fff;box-shadow:0 2px 7px 1px #0000004d;border-radius:8px;transform:translate(-50%,-100%)}.baidu-info-box-container__inner{overflow:auto}.baidu-info-box-container__close{position:absolute;right:-6px;top:-6px;width:14px;height:14px;margin:8px;opacity:.6;cursor:pointer;-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22/%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22/%3E%3C/svg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22/%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22/%3E%3C/svg%3E);background-color:#000}.baidu-info-box-container__close:hover{opacity:1}.baidu-info-box-container:after{position:absolute;background-color:#fff;content:"";width:15px;height:15px;left:0;top:0;box-shadow:-2px 2px 2px #b2b2b266;transform:translate(-50%,-50%) rotate(-45deg)}.gm-style-iw-c .gm-style-iw-chr{display:block}.gm-style-iw-c .gm-style-iw-chr .gm-style-iw-ch{padding-top:12px}.gm-style-iw-c .gm-style-iw-chr button.gm-ui-hover-effect{position:absolute!important;right:-6px;top:-6px;width:14px!important;height:14px!important;margin:8px!important}.gm-style-iw-c .gm-style-iw-chr button.gm-ui-hover-effect span{width:14px!important;height:14px!important;margin:0!important}.element-overlay{position:absolute}.tg-map{height:100%;position:relative}.tg-map__map{width:100%;height:100%}.tg-map__map--hide-logo-google .gm-style a[target=_blank]:has(>div>img){display:none!important}.tg-map__map--hide-logo-google .gm-style>div:last-child>div:last-child>div{display:none}.tg-map__map--hide-logo-baidu div.anchorBL>a[target=_blank]>img{display:none}.tg-map__map--hide-logo-baidu div.BMap_cpyCtrl{display:none}.tg-map-widget{position:absolute}.tg-map>.tg-custom-control{display:none}.tg-map .tg-element-overlay{display:none}.tg-map__map .tg-element-overlay{display:block}.tg-map .tg-info-box{display:none}.tg-map__map .tg-info-box{display:block}.tg-map .tg-label{display:none}.tg-map__map .tg-label{display:block}')),document.head.appendChild(t)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
2
|
var Yr = Object.defineProperty;
|
|
3
3
|
var qr = (i, t, e) => t in i ? Yr(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
4
4
|
var m = (i, t, e) => (qr(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
@@ -194,15 +194,15 @@ function me(i, t) {
|
|
|
194
194
|
function vt(i) {
|
|
195
195
|
throw new Error(`Unexpected object: ${i}`);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function hn() {
|
|
198
198
|
}
|
|
199
199
|
function yt(i) {
|
|
200
200
|
return i;
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function cn(i, t) {
|
|
203
203
|
return i instanceof t;
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function dn(i, t) {
|
|
206
206
|
if (i instanceof t)
|
|
207
207
|
return i;
|
|
208
208
|
}
|
|
@@ -222,7 +222,7 @@ function Et(i, t, e) {
|
|
|
222
222
|
r = r.$parent;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function un(i) {
|
|
226
226
|
return i;
|
|
227
227
|
}
|
|
228
228
|
function B(i) {
|
|
@@ -231,15 +231,15 @@ function B(i) {
|
|
|
231
231
|
function Pt(i) {
|
|
232
232
|
throw new Error(`Unsupported: ${i}`);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function pn(i) {
|
|
235
235
|
throw new Error(`todo: ${i}`);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function gn(i) {
|
|
238
238
|
return i;
|
|
239
239
|
}
|
|
240
240
|
function De(...i) {
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function mn(i) {
|
|
243
243
|
return i != null;
|
|
244
244
|
}
|
|
245
245
|
function li(i) {
|
|
@@ -484,6 +484,23 @@ var te;
|
|
|
484
484
|
}
|
|
485
485
|
i.getCoordType = e;
|
|
486
486
|
})(te || (te = {}));
|
|
487
|
+
function _r() {
|
|
488
|
+
BMap.OverlayV3 || (BMap.OverlayV3 = BMap.Overlay);
|
|
489
|
+
}
|
|
490
|
+
function ci() {
|
|
491
|
+
const i = window.$BAIDU$;
|
|
492
|
+
"kT" in i || Object.defineProperty(i, "kT", {
|
|
493
|
+
get: () => i._instances,
|
|
494
|
+
enumerable: !0,
|
|
495
|
+
configurable: !0
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
const or = {
|
|
499
|
+
/** {@link BMap.Point.equals} 无效, 故需要自己写一个 */
|
|
500
|
+
equals(i, t) {
|
|
501
|
+
return i.lat === t.lat && i.lng === t.lng;
|
|
502
|
+
}
|
|
503
|
+
};
|
|
487
504
|
var bt;
|
|
488
505
|
((i) => {
|
|
489
506
|
function t(e) {
|
|
@@ -491,19 +508,19 @@ var bt;
|
|
|
491
508
|
}
|
|
492
509
|
i.isScrollable = t;
|
|
493
510
|
})(bt || (bt = {}));
|
|
494
|
-
function
|
|
511
|
+
function br(i, t, e) {
|
|
495
512
|
return i.addListener(t, e).remove;
|
|
496
513
|
}
|
|
497
|
-
function
|
|
514
|
+
function di(i, t, e) {
|
|
498
515
|
return i.addEventListener(t, e), () => i.removeEventListener(t, e);
|
|
499
516
|
}
|
|
500
|
-
function
|
|
517
|
+
function ui(i, t, e, r) {
|
|
501
518
|
return i.addEventListener(t, e, r), () => i.removeEventListener(t, e, r);
|
|
502
519
|
}
|
|
503
|
-
function
|
|
520
|
+
function ar(i, t, e) {
|
|
504
521
|
return i.addEventListener(t, e), () => i.removeEventListener(t, e);
|
|
505
522
|
}
|
|
506
|
-
class
|
|
523
|
+
class Tr {
|
|
507
524
|
constructor(t, e) {
|
|
508
525
|
m(this, "eventMap", /* @__PURE__ */ new Map());
|
|
509
526
|
m(this, "target", void 0);
|
|
@@ -515,7 +532,7 @@ class br {
|
|
|
515
532
|
}
|
|
516
533
|
class ot {
|
|
517
534
|
constructor(t, e) {
|
|
518
|
-
m(this, "eventHub", new
|
|
535
|
+
m(this, "eventHub", new Mr());
|
|
519
536
|
this.delegate = t, this.options = e;
|
|
520
537
|
}
|
|
521
538
|
notify(t) {
|
|
@@ -542,7 +559,7 @@ class ot {
|
|
|
542
559
|
this.delegate.removeEventListener(t, e);
|
|
543
560
|
}
|
|
544
561
|
}
|
|
545
|
-
const rt = class rt extends
|
|
562
|
+
const rt = class rt extends Tr {
|
|
546
563
|
addEventListener(t, e) {
|
|
547
564
|
const r = Ye(t, e);
|
|
548
565
|
if (this.eventMap.get(r)) {
|
|
@@ -582,7 +599,7 @@ m(rt, "EVENT_TYPE_MAP", {
|
|
|
582
599
|
"map-dblclick": "dblclick"
|
|
583
600
|
});
|
|
584
601
|
let ye = rt;
|
|
585
|
-
const Ie = class Ie extends
|
|
602
|
+
const Ie = class Ie extends Tr {
|
|
586
603
|
addEventListener(t, e) {
|
|
587
604
|
const r = Ye(t, e);
|
|
588
605
|
if (this.eventMap.get(r)) {
|
|
@@ -615,7 +632,7 @@ m(Ie, "EVENT_TYPE_MAP", {
|
|
|
615
632
|
"map-type-changed": "maptypechange"
|
|
616
633
|
});
|
|
617
634
|
let Re = Ie;
|
|
618
|
-
class
|
|
635
|
+
class Mr {
|
|
619
636
|
constructor() {
|
|
620
637
|
m(this, "typeMap", /* @__PURE__ */ new Map());
|
|
621
638
|
}
|
|
@@ -636,7 +653,7 @@ class Tr {
|
|
|
636
653
|
e && e.forEach((r) => r.call(t.target, t));
|
|
637
654
|
}
|
|
638
655
|
}
|
|
639
|
-
class
|
|
656
|
+
class lr {
|
|
640
657
|
/**
|
|
641
658
|
* `keys`和`values`数组中可以有相同的值, 若存在相同值, 则index越小的优先级越高
|
|
642
659
|
*/
|
|
@@ -654,7 +671,7 @@ class ar {
|
|
|
654
671
|
return this.keyToValue.get(t) ?? B();
|
|
655
672
|
}
|
|
656
673
|
}
|
|
657
|
-
class
|
|
674
|
+
class pi {
|
|
658
675
|
constructor(t, e = 10) {
|
|
659
676
|
m(this, "map", /* @__PURE__ */ new Map());
|
|
660
677
|
this.values = t, this.maxSize4Debug = e;
|
|
@@ -711,7 +728,7 @@ var A = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
711
728
|
/* RIGHT_BOTTOM */
|
|
712
729
|
];
|
|
713
730
|
function s() {
|
|
714
|
-
return t || (t = new
|
|
731
|
+
return t || (t = new lr(r, [
|
|
715
732
|
/* | @tg/map |名字相同| baidu | */
|
|
716
733
|
/* TOP_LEFT = */
|
|
717
734
|
BMAP_ANCHOR_TOP_LEFT,
|
|
@@ -741,7 +758,7 @@ var A = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
741
758
|
}
|
|
742
759
|
i.getBaidu = s;
|
|
743
760
|
function n() {
|
|
744
|
-
return e || (e = new
|
|
761
|
+
return e || (e = new lr(r, [
|
|
745
762
|
google.maps.ControlPosition.TOP_LEFT,
|
|
746
763
|
google.maps.ControlPosition.TOP_CENTER,
|
|
747
764
|
google.maps.ControlPosition.TOP_RIGHT,
|
|
@@ -758,7 +775,7 @@ var A = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
758
775
|
}
|
|
759
776
|
i.getGoogle = n;
|
|
760
777
|
})(U || (U = {}));
|
|
761
|
-
class
|
|
778
|
+
class gi {
|
|
762
779
|
constructor(t) {
|
|
763
780
|
/** 实际添加到地图中的control对象 */
|
|
764
781
|
m(this, "inner");
|
|
@@ -767,7 +784,7 @@ class pi {
|
|
|
767
784
|
}
|
|
768
785
|
class Lt {
|
|
769
786
|
}
|
|
770
|
-
class
|
|
787
|
+
class mi extends Lt {
|
|
771
788
|
constructor(t, e) {
|
|
772
789
|
super(), this.visible = t, this.position = e;
|
|
773
790
|
}
|
|
@@ -848,7 +865,7 @@ class at extends Lt {
|
|
|
848
865
|
});
|
|
849
866
|
}
|
|
850
867
|
}
|
|
851
|
-
var
|
|
868
|
+
var Or = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))(Or || {});
|
|
852
869
|
class W {
|
|
853
870
|
constructor(t, e, r, s) {
|
|
854
871
|
this.id = t, this.baidu = e, this.google = r, this.googleCoordType = s;
|
|
@@ -873,7 +890,7 @@ class W {
|
|
|
873
890
|
Pt("google的内置地图没有对应的实例");
|
|
874
891
|
}
|
|
875
892
|
}
|
|
876
|
-
class
|
|
893
|
+
class fn {
|
|
877
894
|
constructor(t, e) {
|
|
878
895
|
m(this, "baiduLayerCached", new Pe(() => {
|
|
879
896
|
const t = new BMap.TileLayer({});
|
|
@@ -925,7 +942,7 @@ class mn {
|
|
|
925
942
|
Pt("这个方法不会被调用");
|
|
926
943
|
}
|
|
927
944
|
}
|
|
928
|
-
class
|
|
945
|
+
class fi {
|
|
929
946
|
constructor() {
|
|
930
947
|
m(this, "baiduCache", new Pe(() => new BMap.TrafficLayer()));
|
|
931
948
|
m(this, "googleCache", new Pe(() => new google.maps.TrafficLayer()));
|
|
@@ -945,13 +962,13 @@ var V;
|
|
|
945
962
|
), () => (
|
|
946
963
|
/* 地形 */
|
|
947
964
|
google.maps.MapTypeId.TERRAIN
|
|
948
|
-
), D.wgs84), i.BUILD_IN_MAP_TYPES = new
|
|
965
|
+
), D.wgs84), i.BUILD_IN_MAP_TYPES = new pi([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
|
|
949
966
|
})(V || (V = {}));
|
|
950
|
-
var
|
|
951
|
-
const
|
|
967
|
+
var Cr = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(Cr || {});
|
|
968
|
+
const wr = [V.NORMAL, V.SATELLITE, V.HYBRID];
|
|
952
969
|
class It extends Bt {
|
|
953
970
|
static create(t) {
|
|
954
|
-
const e = t.mapTypes ??
|
|
971
|
+
const e = t.mapTypes ?? wr, r = {
|
|
955
972
|
default: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
|
|
956
973
|
horizontal: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
|
|
957
974
|
dropdown: BMAP_MAPTYPE_CONTROL_DROPDOWN
|
|
@@ -963,7 +980,7 @@ class It extends Bt {
|
|
|
963
980
|
}
|
|
964
981
|
}
|
|
965
982
|
const ue = class ue extends at {
|
|
966
|
-
constructor(t = "default", e = A.TOP_LEFT, r =
|
|
983
|
+
constructor(t = "default", e = A.TOP_LEFT, r = wr) {
|
|
967
984
|
super("mapType", e), this.type = t, this.mapTypes = r, ue.type2google || (ue.type2google = {
|
|
968
985
|
default: google.maps.MapTypeControlStyle.DEFAULT,
|
|
969
986
|
horizontal: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
|
|
@@ -1001,7 +1018,7 @@ class kt extends at {
|
|
|
1001
1018
|
super("scale", t);
|
|
1002
1019
|
}
|
|
1003
1020
|
}
|
|
1004
|
-
class At extends
|
|
1021
|
+
class At extends mi {
|
|
1005
1022
|
static create(t) {
|
|
1006
1023
|
return new At(!0, t.position ?? A.RIGHT_BOTTOM);
|
|
1007
1024
|
}
|
|
@@ -1032,7 +1049,7 @@ class $t extends at {
|
|
|
1032
1049
|
super("zoom", t);
|
|
1033
1050
|
}
|
|
1034
1051
|
}
|
|
1035
|
-
function
|
|
1052
|
+
function vi(i) {
|
|
1036
1053
|
let t, e, r;
|
|
1037
1054
|
const s = "The Google Maps JavaScript API", n = "google", a = "importLibrary", c = "__ib__", o = document, h = window, d = h[n] || (h[n] = {}), p = d.maps || (d.maps = {}), g = /* @__PURE__ */ new Set(), f = new URLSearchParams(), T = () => t || (t = new Promise(async (_, M) => {
|
|
1038
1055
|
var l;
|
|
@@ -1043,17 +1060,17 @@ function fi(i) {
|
|
|
1043
1060
|
}));
|
|
1044
1061
|
p[a] ? console.warn(s + " only loads once. Ignoring:", i) : p[a] = (_, ...M) => g.add(_) && T().then(() => p[a](_, ...M));
|
|
1045
1062
|
}
|
|
1046
|
-
let
|
|
1063
|
+
let yi, _i;
|
|
1047
1064
|
const ae = {
|
|
1048
1065
|
/** Google的坐标0点 */
|
|
1049
1066
|
get LATLNG_ZERO() {
|
|
1050
|
-
return
|
|
1067
|
+
return yi ?? (yi = new google.maps.LatLng({ lat: 0, lng: 0 }));
|
|
1051
1068
|
},
|
|
1052
1069
|
get BOUNDS_ZERO() {
|
|
1053
|
-
return
|
|
1070
|
+
return _i ?? (_i = new google.maps.LatLngBounds(this.LATLNG_ZERO, this.LATLNG_ZERO));
|
|
1054
1071
|
}
|
|
1055
1072
|
};
|
|
1056
|
-
function
|
|
1073
|
+
function xr(i, t = { country: "", province: "", city: "", district: "", street: "", streetNumber: "" }) {
|
|
1057
1074
|
for (const e of i)
|
|
1058
1075
|
for (const r of e.types)
|
|
1059
1076
|
switch (r) {
|
|
@@ -1078,9 +1095,9 @@ function wr(i, t = { country: "", province: "", city: "", district: "", street:
|
|
|
1078
1095
|
}
|
|
1079
1096
|
return t;
|
|
1080
1097
|
}
|
|
1081
|
-
function
|
|
1098
|
+
function Er(i, t) {
|
|
1082
1099
|
var r;
|
|
1083
|
-
const e = i.address_components &&
|
|
1100
|
+
const e = i.address_components && xr(i.address_components);
|
|
1084
1101
|
return {
|
|
1085
1102
|
country: (e == null ? void 0 : e.country) ?? "",
|
|
1086
1103
|
province: (e == null ? void 0 : e.province) ?? "",
|
|
@@ -1091,9 +1108,9 @@ function xr(i, t) {
|
|
|
1091
1108
|
title: i.name ?? ""
|
|
1092
1109
|
};
|
|
1093
1110
|
}
|
|
1094
|
-
class
|
|
1111
|
+
class Pr {
|
|
1095
1112
|
}
|
|
1096
|
-
class
|
|
1113
|
+
class bi extends Pr {
|
|
1097
1114
|
constructor(e, r) {
|
|
1098
1115
|
super();
|
|
1099
1116
|
m(this, "inner");
|
|
@@ -1109,7 +1126,7 @@ class _i extends Er {
|
|
|
1109
1126
|
this.inner.setBounds(e.toGoogle(this.map.coordType));
|
|
1110
1127
|
}
|
|
1111
1128
|
addResultListener(e) {
|
|
1112
|
-
return
|
|
1129
|
+
return br(this.inner, "place_changed", () => {
|
|
1113
1130
|
const r = this.inner.getPlace(), s = {
|
|
1114
1131
|
title: r.name ?? "",
|
|
1115
1132
|
province: "",
|
|
@@ -1119,11 +1136,11 @@ class _i extends Er {
|
|
|
1119
1136
|
streetNumber: "",
|
|
1120
1137
|
country: ""
|
|
1121
1138
|
};
|
|
1122
|
-
r.address_components &&
|
|
1139
|
+
r.address_components && xr(r.address_components, s), e(s);
|
|
1123
1140
|
});
|
|
1124
1141
|
}
|
|
1125
1142
|
}
|
|
1126
|
-
class
|
|
1143
|
+
class Ti extends Pr {
|
|
1127
1144
|
constructor(e, r) {
|
|
1128
1145
|
super();
|
|
1129
1146
|
m(this, "inner");
|
|
@@ -1137,7 +1154,7 @@ class bi extends Er {
|
|
|
1137
1154
|
const s = () => {
|
|
1138
1155
|
this.inner.setLocation(this.map.innerMap);
|
|
1139
1156
|
};
|
|
1140
|
-
this.removeableArray.push(
|
|
1157
|
+
this.removeableArray.push(ar(this.map, "center-changed", s)), this.removeableArray.push(ar(this.map, "zoom-changed", s));
|
|
1141
1158
|
}
|
|
1142
1159
|
}
|
|
1143
1160
|
setBounds(e) {
|
|
@@ -1145,14 +1162,14 @@ class bi extends Er {
|
|
|
1145
1162
|
}
|
|
1146
1163
|
addResultListener(e) {
|
|
1147
1164
|
let r = 0;
|
|
1148
|
-
const s =
|
|
1165
|
+
const s = di(this.inner, "confirm", (a) => {
|
|
1149
1166
|
const c = a.item.value;
|
|
1150
1167
|
r = Date.now(), e(Object.assign({
|
|
1151
1168
|
title: c.business,
|
|
1152
1169
|
country: ""
|
|
1153
1170
|
// Baidu的自动完成只支持中国
|
|
1154
1171
|
}, c));
|
|
1155
|
-
}), n =
|
|
1172
|
+
}), n = ui(this.input, "keyup", (a) => {
|
|
1156
1173
|
a.key === "Enter" && Date.now() - r > 100 && e({
|
|
1157
1174
|
title: this.input.value,
|
|
1158
1175
|
country: "",
|
|
@@ -1168,7 +1185,7 @@ class bi extends Er {
|
|
|
1168
1185
|
};
|
|
1169
1186
|
}
|
|
1170
1187
|
}
|
|
1171
|
-
var
|
|
1188
|
+
var Lr = { exports: {} };
|
|
1172
1189
|
(function(i, t) {
|
|
1173
1190
|
(function(e, r) {
|
|
1174
1191
|
i.exports = r();
|
|
@@ -1595,12 +1612,12 @@ var Pr = { exports: {} };
|
|
|
1595
1612
|
}
|
|
1596
1613
|
return r;
|
|
1597
1614
|
});
|
|
1598
|
-
})(
|
|
1599
|
-
var
|
|
1600
|
-
const
|
|
1615
|
+
})(Lr);
|
|
1616
|
+
var Mi = Lr.exports;
|
|
1617
|
+
const Oi = /* @__PURE__ */ nt(Mi), hr = 10, qe = {
|
|
1601
1618
|
toGoogle: (i, t) => ({
|
|
1602
1619
|
opacity: i.opacity,
|
|
1603
|
-
radius: i.radius ??
|
|
1620
|
+
radius: i.radius ?? hr,
|
|
1604
1621
|
// key是小数和整数的混合, 故读取出来时不会维持
|
|
1605
1622
|
gradient: i.gradient && Object.entries(i.gradient).sort(([e], [r]) => +e - +r).map(([e, r]) => r),
|
|
1606
1623
|
maxIntensity: i.maxIntensity,
|
|
@@ -1608,7 +1625,7 @@ const Mi = /* @__PURE__ */ nt(Ti), lr = 10, qe = {
|
|
|
1608
1625
|
}),
|
|
1609
1626
|
toBaidu: (i, t, e) => ({
|
|
1610
1627
|
opacity: i.opacity,
|
|
1611
|
-
radius: i.radius ??
|
|
1628
|
+
radius: i.radius ?? hr,
|
|
1612
1629
|
gradient: i.gradient,
|
|
1613
1630
|
data: Ke.toBaidu(i.data, t, e)
|
|
1614
1631
|
})
|
|
@@ -1624,9 +1641,9 @@ const Mi = /* @__PURE__ */ nt(Ti), lr = 10, qe = {
|
|
|
1624
1641
|
}), max: e ?? r };
|
|
1625
1642
|
}
|
|
1626
1643
|
};
|
|
1627
|
-
class
|
|
1644
|
+
class Br {
|
|
1628
1645
|
}
|
|
1629
|
-
class
|
|
1646
|
+
class Ci extends Br {
|
|
1630
1647
|
constructor(e, r) {
|
|
1631
1648
|
super();
|
|
1632
1649
|
m(this, "inner");
|
|
@@ -1642,13 +1659,13 @@ class Oi extends Lr {
|
|
|
1642
1659
|
this.inner.setMap(null);
|
|
1643
1660
|
}
|
|
1644
1661
|
}
|
|
1645
|
-
class
|
|
1662
|
+
class wi extends Br {
|
|
1646
1663
|
constructor(e, r) {
|
|
1647
1664
|
super();
|
|
1648
1665
|
m(this, "inner");
|
|
1649
1666
|
this.map = e;
|
|
1650
1667
|
const s = qe.toBaidu(r, this.map.coordType, r.maxIntensity);
|
|
1651
|
-
this.inner = new
|
|
1668
|
+
this.inner = new Oi(s), e.innerMap.addOverlay(this.inner), this.inner.setDataSet(s.data);
|
|
1652
1669
|
}
|
|
1653
1670
|
/**
|
|
1654
1671
|
* 当前的最大值
|
|
@@ -1673,7 +1690,7 @@ class Ci extends Lr {
|
|
|
1673
1690
|
this.map.innerMap.removeOverlay(this.inner);
|
|
1674
1691
|
}
|
|
1675
1692
|
}
|
|
1676
|
-
class
|
|
1693
|
+
class Ir {
|
|
1677
1694
|
constructor(t) {
|
|
1678
1695
|
this.options = t;
|
|
1679
1696
|
}
|
|
@@ -1686,7 +1703,7 @@ function pt() {
|
|
|
1686
1703
|
const i = window.location.hostname.split(".").filter((t) => !be.isInt(t));
|
|
1687
1704
|
return i.length === 3 ? i.join(".") : [...i, "tg", "map", "urls"].slice(0, 3).join(".");
|
|
1688
1705
|
}
|
|
1689
|
-
const Se = class Se extends
|
|
1706
|
+
const Se = class Se extends Ir {
|
|
1690
1707
|
/** @see https://developers.google.com/maps/documentation/urls/get-started#directions-action */
|
|
1691
1708
|
directions(t, e, r) {
|
|
1692
1709
|
return Le(Se.BASE_URL, "dir/", {
|
|
@@ -1710,7 +1727,7 @@ const Se = class Se extends Br {
|
|
|
1710
1727
|
};
|
|
1711
1728
|
m(Se, "BASE_URL", "https://www.google.com/maps/");
|
|
1712
1729
|
let Mt = Se;
|
|
1713
|
-
const ge = class ge extends
|
|
1730
|
+
const ge = class ge extends Ir {
|
|
1714
1731
|
/**
|
|
1715
1732
|
* 导航
|
|
1716
1733
|
* @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#:~:text=%E6%9C%8D%E5%8A%A1%E5%9C%B0%E5%9D%80-,http%3A//api.map.baidu.com/direction,-//PC%26Webapp%E6%9C%8D%E5%8A%A1
|
|
@@ -1772,9 +1789,9 @@ const ge = class ge extends Br {
|
|
|
1772
1789
|
}
|
|
1773
1790
|
};
|
|
1774
1791
|
m(ge, "BASE_URL", "https://api.map.baidu.com/");
|
|
1775
|
-
let Ot = ge,
|
|
1792
|
+
let Ot = ge, xi = class Sr {
|
|
1776
1793
|
constructor(t, e, r) {
|
|
1777
|
-
this.extend(
|
|
1794
|
+
this.extend(Sr, google.maps.OverlayView), this.map_ = t, this.MARKER_CLUSTER_IMAGE_PATH_ = "../images/m", this.MARKER_CLUSTER_IMAGE_EXTENSION_ = "png", this.markers_ = [], this.clusters_ = [], this.sizes = [53, 56, 66, 78, 90], this.styles_ = [], this.ready_ = !1;
|
|
1778
1795
|
var s = r || {};
|
|
1779
1796
|
this.zIndex_ = s.zIndex || google.maps.Marker.MAX_ZINDEX + 1, this.gridSize_ = s.gridSize || 60, this.minClusterSize_ = s.minimumClusterSize || 2, this.maxZoom_ = s.maxZoom || null, this.styles_ = s.styles || [], this.imagePath_ = s.imagePath || this.MARKER_CLUSTER_IMAGE_PATH_, this.imageExtension_ = s.imageExtension || this.MARKER_CLUSTER_IMAGE_EXTENSION_, this.zoomOnClick_ = !0, s.zoomOnClick != null && (this.zoomOnClick_ = s.zoomOnClick), this.averageCenter_ = !1, s.averageCenter != null && (this.averageCenter_ = s.averageCenter), this.setupStyles_(), this.setMap(t), this.prevZoom_ = this.map_.getZoom();
|
|
1780
1797
|
var n = this;
|
|
@@ -2193,7 +2210,7 @@ let Ot = ge, wi = class Ir {
|
|
|
2193
2210
|
if (r && r.isMarkerInClusterBounds(t))
|
|
2194
2211
|
r.addMarker(t);
|
|
2195
2212
|
else {
|
|
2196
|
-
var o = new
|
|
2213
|
+
var o = new Ei(this);
|
|
2197
2214
|
o.addMarker(t), this.clusters_.push(o);
|
|
2198
2215
|
}
|
|
2199
2216
|
}
|
|
@@ -2210,7 +2227,7 @@ let Ot = ge, wi = class Ir {
|
|
|
2210
2227
|
), e = this.getExtendedBounds(t), r = 0, s; s = this.markers_[r]; r++)
|
|
2211
2228
|
!s.isAdded && this.isMarkerInBounds_(s, e) && this.addToClosestCluster_(s);
|
|
2212
2229
|
}
|
|
2213
|
-
},
|
|
2230
|
+
}, Ei = class {
|
|
2214
2231
|
constructor(t) {
|
|
2215
2232
|
this.markerClusterer_ = t, this.map_ = t.getMap(), this.gridSize_ = t.getGridSize(), this.minClusterSize_ = t.getMinClusterSize(), this.averageCenter_ = t.isAverageCenter(), this.center_ = null, this.markers_ = [], this.bounds_ = null, this.clusterIcon_ = new zt(
|
|
2216
2233
|
this,
|
|
@@ -2479,7 +2496,7 @@ class zt {
|
|
|
2479
2496
|
), e.join("");
|
|
2480
2497
|
}
|
|
2481
2498
|
}
|
|
2482
|
-
var
|
|
2499
|
+
var kr = { exports: {} };
|
|
2483
2500
|
(function(i, t) {
|
|
2484
2501
|
(function(e, r) {
|
|
2485
2502
|
i.exports = r();
|
|
@@ -2672,25 +2689,25 @@ var Sr = { exports: {} };
|
|
|
2672
2689
|
});
|
|
2673
2690
|
}, c;
|
|
2674
2691
|
});
|
|
2675
|
-
})(
|
|
2676
|
-
var
|
|
2677
|
-
const
|
|
2678
|
-
var
|
|
2679
|
-
t =
|
|
2692
|
+
})(kr);
|
|
2693
|
+
var Pi = kr.exports;
|
|
2694
|
+
const cr = /* @__PURE__ */ nt(Pi);
|
|
2695
|
+
var Ar = function(i, t, e) {
|
|
2696
|
+
t = Li(t);
|
|
2680
2697
|
var r = i.pointToPixel(t.getNorthEast()), s = i.pointToPixel(t.getSouthWest());
|
|
2681
2698
|
r.x += e, r.y -= e, s.x -= e, s.y += e;
|
|
2682
2699
|
var n = i.pixelToPoint(r), a = i.pixelToPoint(s);
|
|
2683
2700
|
return new BMap.Bounds(a, n);
|
|
2684
|
-
},
|
|
2701
|
+
}, Li = function(i) {
|
|
2685
2702
|
var t = Fe(i.getNorthEast().lng, -180, 180), e = Fe(i.getSouthWest().lng, -180, 180), r = Fe(i.getNorthEast().lat, -74, 74), s = Fe(i.getSouthWest().lat, -74, 74);
|
|
2686
2703
|
return new BMap.Bounds(new BMap.Point(e, s), new BMap.Point(t, r));
|
|
2687
2704
|
}, Fe = function(i, t, e) {
|
|
2688
2705
|
return t && (i = Math.max(i, t)), e && (i = Math.min(i, e)), i;
|
|
2689
|
-
},
|
|
2706
|
+
}, Dr = function(i) {
|
|
2690
2707
|
return Object.prototype.toString.call(i) === "[object Array]";
|
|
2691
|
-
},
|
|
2708
|
+
}, Rr = function(i, t) {
|
|
2692
2709
|
var e = -1;
|
|
2693
|
-
if (
|
|
2710
|
+
if (Dr(t)) {
|
|
2694
2711
|
if (t.indexOf)
|
|
2695
2712
|
e = t.indexOf(i);
|
|
2696
2713
|
else
|
|
@@ -2718,7 +2735,7 @@ var kr = function(i, t, e) {
|
|
|
2718
2735
|
r._redraw();
|
|
2719
2736
|
});
|
|
2720
2737
|
var s = e.markers;
|
|
2721
|
-
|
|
2738
|
+
Dr(s) && this.addMarkers(s);
|
|
2722
2739
|
}
|
|
2723
2740
|
};
|
|
2724
2741
|
x.prototype.addMarkers = function(i) {
|
|
@@ -2729,7 +2746,7 @@ x.prototype.addMarkers = function(i) {
|
|
|
2729
2746
|
}
|
|
2730
2747
|
};
|
|
2731
2748
|
x.prototype._pushMarkerTo = function(i) {
|
|
2732
|
-
var t =
|
|
2749
|
+
var t = Rr(i, this._markers);
|
|
2733
2750
|
t === -1 && (i.isInCluster = !1, this._markers.push(i));
|
|
2734
2751
|
};
|
|
2735
2752
|
x.prototype.addMarker = function(i) {
|
|
@@ -2738,7 +2755,7 @@ x.prototype.addMarker = function(i) {
|
|
|
2738
2755
|
x.prototype._createClusters = function() {
|
|
2739
2756
|
var i = this._map.getBounds();
|
|
2740
2757
|
if (i.getCenter()) {
|
|
2741
|
-
for (var t =
|
|
2758
|
+
for (var t = Ar(this._map, i, this._gridSize), e = 0, r; r = this._markers[e]; e++)
|
|
2742
2759
|
!r.isInCluster && t.containsPoint(r.getPosition()) && this._addToClosestCluster(r);
|
|
2743
2760
|
for (var s = this._markers.length, e = 0; e < s; e++)
|
|
2744
2761
|
this._clusters[e] && this._clusters[e].render();
|
|
@@ -2778,7 +2795,7 @@ x.prototype._removeMarkersFromMap = function() {
|
|
|
2778
2795
|
}
|
|
2779
2796
|
};
|
|
2780
2797
|
x.prototype._removeMarker = function(i) {
|
|
2781
|
-
var t =
|
|
2798
|
+
var t = Rr(i, this._markers);
|
|
2782
2799
|
return t === -1 ? !1 : (this._map.removeOverlay(i), this._markers.splice(t, 1), !0);
|
|
2783
2800
|
};
|
|
2784
2801
|
x.prototype.removeMarker = function(i) {
|
|
@@ -2854,7 +2871,7 @@ x.prototype.setStylesIndexCalculator = function(i) {
|
|
|
2854
2871
|
};
|
|
2855
2872
|
function Y(i) {
|
|
2856
2873
|
var t = this;
|
|
2857
|
-
this._markerClusterer = i, this._map = i.getMap(), this._minClusterSize = i.getMinClusterSize(), this._isAverageCenter = i.isAverageCenter(), this._center = null, this._markers = [], this._gridBounds = null, this._isReal = !1, this._clusterMarker = new
|
|
2874
|
+
this._markerClusterer = i, this._map = i.getMap(), this._minClusterSize = i.getMinClusterSize(), this._isAverageCenter = i.isAverageCenter(), this._center = null, this._markers = [], this._gridBounds = null, this._isReal = !1, this._clusterMarker = new cr(this._center, this._markers.length, {
|
|
2858
2875
|
styles: this._markerClusterer.getStyles(),
|
|
2859
2876
|
zIndex: i._zIndex
|
|
2860
2877
|
}), this._clusterMarker.getStyleByText = function(e, r) {
|
|
@@ -2862,7 +2879,7 @@ function Y(i) {
|
|
|
2862
2879
|
var s = t._markerClusterer._stylesIndexCalculator(t._markers, r.length);
|
|
2863
2880
|
return r[s];
|
|
2864
2881
|
}
|
|
2865
|
-
return
|
|
2882
|
+
return cr.prototype.getStyleByText.call(this, e, r);
|
|
2866
2883
|
}, this._clusterMarker.addEventListener && this._clusterMarker.addEventListener("click", function(e) {
|
|
2867
2884
|
t._map.setViewport(t.getBounds());
|
|
2868
2885
|
});
|
|
@@ -2902,7 +2919,7 @@ Y.prototype.isReal = function(i) {
|
|
|
2902
2919
|
};
|
|
2903
2920
|
Y.prototype.updateGridBounds = function() {
|
|
2904
2921
|
var i = new BMap.Bounds(this._center, this._center);
|
|
2905
|
-
this._gridBounds =
|
|
2922
|
+
this._gridBounds = Ar(this._map, i, this._markerClusterer.getGridSize());
|
|
2906
2923
|
};
|
|
2907
2924
|
Y.prototype.updateClusterMarker = function() {
|
|
2908
2925
|
if (this._map.getZoom() > this._markerClusterer.getMaxZoom()) {
|
|
@@ -2958,7 +2975,7 @@ var Xe;
|
|
|
2958
2975
|
}
|
|
2959
2976
|
i.toGoogle = e;
|
|
2960
2977
|
})(Xe || (Xe = {}));
|
|
2961
|
-
class
|
|
2978
|
+
class $r {
|
|
2962
2979
|
constructor(t) {
|
|
2963
2980
|
this.map = t;
|
|
2964
2981
|
}
|
|
@@ -2983,7 +3000,7 @@ class Rr {
|
|
|
2983
3000
|
return this.inner.removeMarkers(t.map((e) => e.innerOverlay));
|
|
2984
3001
|
}
|
|
2985
3002
|
}
|
|
2986
|
-
class
|
|
3003
|
+
class Bi extends $r {
|
|
2987
3004
|
constructor(e, r) {
|
|
2988
3005
|
var n;
|
|
2989
3006
|
super(e);
|
|
@@ -3005,12 +3022,12 @@ class Li extends Rr {
|
|
|
3005
3022
|
this.inner._redraw();
|
|
3006
3023
|
}
|
|
3007
3024
|
}
|
|
3008
|
-
class
|
|
3025
|
+
class Ii extends $r {
|
|
3009
3026
|
constructor(e, r) {
|
|
3010
3027
|
var n, a;
|
|
3011
3028
|
super(e);
|
|
3012
3029
|
m(this, "inner");
|
|
3013
|
-
this.inner = new
|
|
3030
|
+
this.inner = new xi(
|
|
3014
3031
|
e.innerMap,
|
|
3015
3032
|
// google的构造器中的markers,不会触发重绘, 第一次绘制通过监听地图的'idle'事件触发, 可以直接设置
|
|
3016
3033
|
(n = r.markers) == null ? void 0 : n.map((c) => c.innerOverlay),
|
|
@@ -3034,11 +3051,11 @@ class Bi extends Rr {
|
|
|
3034
3051
|
this.inner.repaint();
|
|
3035
3052
|
}
|
|
3036
3053
|
}
|
|
3037
|
-
class
|
|
3054
|
+
class zr {
|
|
3038
3055
|
constructor() {
|
|
3039
3056
|
}
|
|
3040
3057
|
}
|
|
3041
|
-
class
|
|
3058
|
+
class Si extends zr {
|
|
3042
3059
|
constructor(e, r) {
|
|
3043
3060
|
super();
|
|
3044
3061
|
m(this, "inner");
|
|
@@ -3072,7 +3089,7 @@ class Ii extends $r {
|
|
|
3072
3089
|
switch (c) {
|
|
3073
3090
|
case google.maps.places.PlacesServiceStatus.ZERO_RESULTS:
|
|
3074
3091
|
case google.maps.places.PlacesServiceStatus.OK: {
|
|
3075
|
-
const o = (a ?? []).map((h) =>
|
|
3092
|
+
const o = (a ?? []).map((h) => Er(h, this.map));
|
|
3076
3093
|
s(o);
|
|
3077
3094
|
break;
|
|
3078
3095
|
}
|
|
@@ -3084,7 +3101,7 @@ class Ii extends $r {
|
|
|
3084
3101
|
});
|
|
3085
3102
|
}
|
|
3086
3103
|
}
|
|
3087
|
-
class
|
|
3104
|
+
class ki extends zr {
|
|
3088
3105
|
constructor(e, r) {
|
|
3089
3106
|
super();
|
|
3090
3107
|
m(this, "searchRequestMap", /* @__PURE__ */ new Map());
|
|
@@ -3150,7 +3167,7 @@ class Si extends $r {
|
|
|
3150
3167
|
});
|
|
3151
3168
|
}
|
|
3152
3169
|
}
|
|
3153
|
-
class
|
|
3170
|
+
class Nr {
|
|
3154
3171
|
constructor(t, e) {
|
|
3155
3172
|
m(this, "onData");
|
|
3156
3173
|
m(this, "onError");
|
|
@@ -3165,23 +3182,23 @@ class zr {
|
|
|
3165
3182
|
return this.onData && B("setSearchListener只能调用一次"), this.onData = t, this.onError = e, De;
|
|
3166
3183
|
}
|
|
3167
3184
|
}
|
|
3168
|
-
class
|
|
3185
|
+
class Ai extends Nr {
|
|
3169
3186
|
constructor(e, r) {
|
|
3170
3187
|
super(e, r.input);
|
|
3171
3188
|
m(this, "searchBox");
|
|
3172
3189
|
this.searchBox = new google.maps.places.SearchBox(r.input), this.searchBox.bindTo("bounds", e.innerMap);
|
|
3173
3190
|
}
|
|
3174
3191
|
setSearchListener(e, r) {
|
|
3175
|
-
return super.setSearchListener(e, r),
|
|
3192
|
+
return super.setSearchListener(e, r), br(this.searchBox, "places_changed", () => {
|
|
3176
3193
|
const s = this.searchBox.getPlaces();
|
|
3177
|
-
e((s ?? []).map((n) =>
|
|
3194
|
+
e((s ?? []).map((n) => Er(n, this.map)));
|
|
3178
3195
|
});
|
|
3179
3196
|
}
|
|
3180
3197
|
search() {
|
|
3181
3198
|
this.input.value && (google.maps.event.trigger(this.input, "focus", {}), google.maps.event.trigger(this.input, "keydown", { keyCode: 13 }));
|
|
3182
3199
|
}
|
|
3183
3200
|
}
|
|
3184
|
-
class
|
|
3201
|
+
class Di extends Nr {
|
|
3185
3202
|
constructor(e, r) {
|
|
3186
3203
|
super(e, r.input);
|
|
3187
3204
|
m(this, "autocomplete");
|
|
@@ -3200,7 +3217,7 @@ class Ai extends zr {
|
|
|
3200
3217
|
this.placesService.search(e).then(this.onData, this.onError);
|
|
3201
3218
|
}
|
|
3202
3219
|
}
|
|
3203
|
-
var
|
|
3220
|
+
var Ri = /* @__PURE__ */ ((i) => (i[i.WORLD = 1] = "WORLD", i[i.STATE = 5] = "STATE", i[i.CITY = 10] = "CITY", i[i.STREET = 15] = "STREET", i[i.BUILDING = 20] = "BUILDING", i))(Ri || {});
|
|
3204
3221
|
class Nt {
|
|
3205
3222
|
constructor(t) {
|
|
3206
3223
|
m(this, "latestInfoWindow");
|
|
@@ -3248,67 +3265,67 @@ class Nt {
|
|
|
3248
3265
|
this.innerMap.setZoom(t);
|
|
3249
3266
|
}
|
|
3250
3267
|
}
|
|
3251
|
-
var
|
|
3252
|
-
return
|
|
3268
|
+
var $i = function(t) {
|
|
3269
|
+
return zi(t) && !Ni(t);
|
|
3253
3270
|
};
|
|
3254
|
-
function
|
|
3271
|
+
function zi(i) {
|
|
3255
3272
|
return !!i && typeof i == "object";
|
|
3256
3273
|
}
|
|
3257
|
-
function
|
|
3274
|
+
function Ni(i) {
|
|
3258
3275
|
var t = Object.prototype.toString.call(i);
|
|
3259
|
-
return t === "[object RegExp]" || t === "[object Date]" ||
|
|
3260
|
-
}
|
|
3261
|
-
var Ni = typeof Symbol == "function" && Symbol.for, Gi = Ni ? Symbol.for("react.element") : 60103;
|
|
3262
|
-
function Zi(i) {
|
|
3263
|
-
return i.$$typeof === Gi;
|
|
3276
|
+
return t === "[object RegExp]" || t === "[object Date]" || Wi(i);
|
|
3264
3277
|
}
|
|
3278
|
+
var Gi = typeof Symbol == "function" && Symbol.for, Zi = Gi ? Symbol.for("react.element") : 60103;
|
|
3265
3279
|
function Wi(i) {
|
|
3280
|
+
return i.$$typeof === Zi;
|
|
3281
|
+
}
|
|
3282
|
+
function Hi(i) {
|
|
3266
3283
|
return Array.isArray(i) ? [] : {};
|
|
3267
3284
|
}
|
|
3268
3285
|
function $e(i, t) {
|
|
3269
|
-
return t.clone !== !1 && t.isMergeableObject(i) ? _e(
|
|
3286
|
+
return t.clone !== !1 && t.isMergeableObject(i) ? _e(Hi(i), i, t) : i;
|
|
3270
3287
|
}
|
|
3271
|
-
function
|
|
3288
|
+
function Vi(i, t, e) {
|
|
3272
3289
|
return i.concat(t).map(function(r) {
|
|
3273
3290
|
return $e(r, e);
|
|
3274
3291
|
});
|
|
3275
3292
|
}
|
|
3276
|
-
function
|
|
3293
|
+
function ji(i, t) {
|
|
3277
3294
|
if (!t.customMerge)
|
|
3278
3295
|
return _e;
|
|
3279
3296
|
var e = t.customMerge(i);
|
|
3280
3297
|
return typeof e == "function" ? e : _e;
|
|
3281
3298
|
}
|
|
3282
|
-
function
|
|
3299
|
+
function Fi(i) {
|
|
3283
3300
|
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(t) {
|
|
3284
3301
|
return Object.propertyIsEnumerable.call(i, t);
|
|
3285
3302
|
}) : [];
|
|
3286
3303
|
}
|
|
3287
|
-
function
|
|
3288
|
-
return Object.keys(i).concat(
|
|
3304
|
+
function dr(i) {
|
|
3305
|
+
return Object.keys(i).concat(Fi(i));
|
|
3289
3306
|
}
|
|
3290
|
-
function
|
|
3307
|
+
function Gr(i, t) {
|
|
3291
3308
|
try {
|
|
3292
3309
|
return t in i;
|
|
3293
3310
|
} catch {
|
|
3294
3311
|
return !1;
|
|
3295
3312
|
}
|
|
3296
3313
|
}
|
|
3297
|
-
function
|
|
3298
|
-
return
|
|
3314
|
+
function Ui(i, t) {
|
|
3315
|
+
return Gr(i, t) && !(Object.hasOwnProperty.call(i, t) && Object.propertyIsEnumerable.call(i, t));
|
|
3299
3316
|
}
|
|
3300
|
-
function
|
|
3317
|
+
function Yi(i, t, e) {
|
|
3301
3318
|
var r = {};
|
|
3302
|
-
return e.isMergeableObject(i) &&
|
|
3319
|
+
return e.isMergeableObject(i) && dr(i).forEach(function(s) {
|
|
3303
3320
|
r[s] = $e(i[s], e);
|
|
3304
|
-
}),
|
|
3305
|
-
|
|
3321
|
+
}), dr(t).forEach(function(s) {
|
|
3322
|
+
Ui(i, s) || (Gr(i, s) && e.isMergeableObject(t[s]) ? r[s] = ji(s, e)(i[s], t[s], e) : r[s] = $e(t[s], e));
|
|
3306
3323
|
}), r;
|
|
3307
3324
|
}
|
|
3308
3325
|
function _e(i, t, e) {
|
|
3309
|
-
e = e || {}, e.arrayMerge = e.arrayMerge ||
|
|
3326
|
+
e = e || {}, e.arrayMerge = e.arrayMerge || Vi, e.isMergeableObject = e.isMergeableObject || $i, e.cloneUnlessOtherwiseSpecified = $e;
|
|
3310
3327
|
var r = Array.isArray(t), s = Array.isArray(i), n = r === s;
|
|
3311
|
-
return n ? r ? e.arrayMerge(i, t, e) :
|
|
3328
|
+
return n ? r ? e.arrayMerge(i, t, e) : Yi(i, t, e) : $e(t, e);
|
|
3312
3329
|
}
|
|
3313
3330
|
_e.all = function(t, e) {
|
|
3314
3331
|
if (!Array.isArray(t))
|
|
@@ -3317,15 +3334,15 @@ _e.all = function(t, e) {
|
|
|
3317
3334
|
return _e(r, s, e);
|
|
3318
3335
|
}, {});
|
|
3319
3336
|
};
|
|
3320
|
-
var
|
|
3321
|
-
const
|
|
3337
|
+
var qi = _e, Ki = qi;
|
|
3338
|
+
const Zr = /* @__PURE__ */ nt(Ki);
|
|
3322
3339
|
/*!
|
|
3323
3340
|
* isobject <https://github.com/jonschlinkert/isobject>
|
|
3324
3341
|
*
|
|
3325
3342
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
3326
3343
|
* Released under the MIT License.
|
|
3327
3344
|
*/
|
|
3328
|
-
function
|
|
3345
|
+
function Xi(i) {
|
|
3329
3346
|
return i != null && typeof i == "object" && Array.isArray(i) === !1;
|
|
3330
3347
|
}
|
|
3331
3348
|
/*!
|
|
@@ -3334,12 +3351,12 @@ function Ki(i) {
|
|
|
3334
3351
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
3335
3352
|
* Released under the MIT License.
|
|
3336
3353
|
*/
|
|
3337
|
-
function
|
|
3338
|
-
return
|
|
3354
|
+
function ur(i) {
|
|
3355
|
+
return Xi(i) === !0 && Object.prototype.toString.call(i) === "[object Object]";
|
|
3339
3356
|
}
|
|
3340
|
-
function
|
|
3357
|
+
function Wr(i) {
|
|
3341
3358
|
var t, e;
|
|
3342
|
-
return !(
|
|
3359
|
+
return !(ur(i) === !1 || (t = i.constructor, typeof t != "function") || (e = t.prototype, ur(e) === !1) || e.hasOwnProperty("isPrototypeOf") === !1);
|
|
3343
3360
|
}
|
|
3344
3361
|
var le;
|
|
3345
3362
|
((i) => {
|
|
@@ -3356,7 +3373,7 @@ var le;
|
|
|
3356
3373
|
}
|
|
3357
3374
|
i.toJsonSafely = r;
|
|
3358
3375
|
function s(d) {
|
|
3359
|
-
|
|
3376
|
+
Wr(d) && Object.keys(d).forEach((p) => {
|
|
3360
3377
|
d[p] === void 0 ? delete d[p] : s(d[p]);
|
|
3361
3378
|
});
|
|
3362
3379
|
}
|
|
@@ -3367,14 +3384,14 @@ var le;
|
|
|
3367
3384
|
}
|
|
3368
3385
|
i.putIfAbsent = n;
|
|
3369
3386
|
function a(d, ...p) {
|
|
3370
|
-
const g =
|
|
3387
|
+
const g = pr(p), f = {};
|
|
3371
3388
|
for (const T in d)
|
|
3372
3389
|
g(T) || (f[T] = d[T]);
|
|
3373
3390
|
return f;
|
|
3374
3391
|
}
|
|
3375
3392
|
i.omit = a;
|
|
3376
3393
|
function c(d, ...p) {
|
|
3377
|
-
const g =
|
|
3394
|
+
const g = pr(p), f = {};
|
|
3378
3395
|
for (const T in d)
|
|
3379
3396
|
g(T) && (f[T] = d[T]);
|
|
3380
3397
|
return f;
|
|
@@ -3397,7 +3414,7 @@ var le;
|
|
|
3397
3414
|
}
|
|
3398
3415
|
i.del = h;
|
|
3399
3416
|
})(le || (le = {}));
|
|
3400
|
-
function
|
|
3417
|
+
function pr(i) {
|
|
3401
3418
|
if (i.length <= 4)
|
|
3402
3419
|
return i.includes.bind(i);
|
|
3403
3420
|
{
|
|
@@ -3406,19 +3423,19 @@ function ur(i) {
|
|
|
3406
3423
|
}
|
|
3407
3424
|
}
|
|
3408
3425
|
le.toJsonSafely;
|
|
3409
|
-
const
|
|
3426
|
+
const Ji = ["single", "multi"];
|
|
3410
3427
|
var ee = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(ee || {}), Ct;
|
|
3411
3428
|
((i) => {
|
|
3412
3429
|
function t(e) {
|
|
3413
3430
|
le.deleteUndefinedPropertyOnPlainObjectDeeply(e);
|
|
3414
3431
|
const r = { center: O.ZERO, zoom: 5 };
|
|
3415
|
-
return
|
|
3416
|
-
isMergeableObject:
|
|
3432
|
+
return Zr(r, e || {}, {
|
|
3433
|
+
isMergeableObject: Wr
|
|
3417
3434
|
});
|
|
3418
3435
|
}
|
|
3419
3436
|
i.create = t;
|
|
3420
3437
|
})(Ct || (Ct = {}));
|
|
3421
|
-
class
|
|
3438
|
+
class Hr {
|
|
3422
3439
|
constructor(t, e) {
|
|
3423
3440
|
m(this, "_delegate");
|
|
3424
3441
|
this.innerOverlay = t, this.coordType = e;
|
|
@@ -3436,7 +3453,7 @@ class Wr {
|
|
|
3436
3453
|
this.map.removeOverlay(this);
|
|
3437
3454
|
}
|
|
3438
3455
|
}
|
|
3439
|
-
class Gt extends
|
|
3456
|
+
class Gt extends Hr {
|
|
3440
3457
|
constructor(t, e, r) {
|
|
3441
3458
|
super(t, e), this.map = r;
|
|
3442
3459
|
}
|
|
@@ -3450,7 +3467,7 @@ class Gt extends Wr {
|
|
|
3450
3467
|
this.innerOverlay.setVisible(t);
|
|
3451
3468
|
}
|
|
3452
3469
|
}
|
|
3453
|
-
class lt extends
|
|
3470
|
+
class lt extends Hr {
|
|
3454
3471
|
constructor(t, e, r) {
|
|
3455
3472
|
super(t, e), this.map = r;
|
|
3456
3473
|
}
|
|
@@ -3620,25 +3637,16 @@ class Wt extends ht {
|
|
|
3620
3637
|
return this.innerOverlay.getRadius();
|
|
3621
3638
|
}
|
|
3622
3639
|
}
|
|
3623
|
-
function Hr() {
|
|
3624
|
-
BMap.OverlayV3 || (BMap.OverlayV3 = BMap.Overlay);
|
|
3625
|
-
}
|
|
3626
|
-
const pr = {
|
|
3627
|
-
/** {@link BMap.Point.equals} 无效, 故需要自己写一个 */
|
|
3628
|
-
equals(i, t) {
|
|
3629
|
-
return i.lat === t.lat && i.lng === t.lng;
|
|
3630
|
-
}
|
|
3631
|
-
};
|
|
3632
3640
|
var oe;
|
|
3633
3641
|
((i) => {
|
|
3634
3642
|
i.ZERO = { x: 0, y: 0 };
|
|
3635
3643
|
})(oe || (oe = {}));
|
|
3636
3644
|
let gt;
|
|
3637
|
-
function
|
|
3638
|
-
return gt || (gt =
|
|
3645
|
+
function Qi(i, t, e, r, s, n) {
|
|
3646
|
+
return gt || (gt = es()), new gt(i, t, e, r, s, n);
|
|
3639
3647
|
}
|
|
3640
|
-
function
|
|
3641
|
-
|
|
3648
|
+
function es() {
|
|
3649
|
+
_r();
|
|
3642
3650
|
const i = new BMap.Point(0, 0);
|
|
3643
3651
|
return class extends BMap.OverlayV3 {
|
|
3644
3652
|
constructor(r, s = i, n = oe.ZERO, a, c = 654, o = "") {
|
|
@@ -3749,7 +3757,7 @@ class Vt extends Ht {
|
|
|
3749
3757
|
class jt extends Ht {
|
|
3750
3758
|
constructor(e, r) {
|
|
3751
3759
|
super(new ye(e, r));
|
|
3752
|
-
m(this, "eventHub", new
|
|
3760
|
+
m(this, "eventHub", new Mr());
|
|
3753
3761
|
m(this, "isOpened", !1);
|
|
3754
3762
|
this.inner = e, this.map = r, e.addListener("closeclick", () => {
|
|
3755
3763
|
this.isOpened = !1, this.eventHub.hasListener("close") && this.eventHub.notify({ type: "close", target: this });
|
|
@@ -3810,7 +3818,7 @@ class Ft extends lt {
|
|
|
3810
3818
|
}
|
|
3811
3819
|
static create(t) {
|
|
3812
3820
|
var s;
|
|
3813
|
-
const e = this.coordType, r =
|
|
3821
|
+
const e = this.coordType, r = Qi(
|
|
3814
3822
|
t.content,
|
|
3815
3823
|
(s = t.position) == null ? void 0 : s.toBaidu(e),
|
|
3816
3824
|
t.offset,
|
|
@@ -3906,7 +3914,7 @@ var be;
|
|
|
3906
3914
|
}
|
|
3907
3915
|
i.isInt = s;
|
|
3908
3916
|
})(be || (be = {}));
|
|
3909
|
-
const
|
|
3917
|
+
const ts = {
|
|
3910
3918
|
/** @see https://nodejs.org/docs/v10.3.0/api/path.html#path_path_basename_path_ext */
|
|
3911
3919
|
basename(i, t) {
|
|
3912
3920
|
const e = i.endsWith("/") ? i.slice(0, -1) : i, r = e.lastIndexOf("/"), s = r >= 0 ? e.substring(r + 1) : e;
|
|
@@ -3946,7 +3954,7 @@ var ze = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overla
|
|
|
3946
3954
|
}
|
|
3947
3955
|
i.toBaidu = e;
|
|
3948
3956
|
})(Ne || (Ne = {}));
|
|
3949
|
-
class
|
|
3957
|
+
class rs {
|
|
3950
3958
|
constructor(t, e) {
|
|
3951
3959
|
m(this, "baidu");
|
|
3952
3960
|
m(this, "google");
|
|
@@ -3967,7 +3975,7 @@ class ts {
|
|
|
3967
3975
|
asBaidu() {
|
|
3968
3976
|
if (!this.baidu) {
|
|
3969
3977
|
const t = this;
|
|
3970
|
-
|
|
3978
|
+
_r();
|
|
3971
3979
|
class e extends BMap.OverlayV3 {
|
|
3972
3980
|
initialize(n) {
|
|
3973
3981
|
var o;
|
|
@@ -4020,10 +4028,10 @@ class ts {
|
|
|
4020
4028
|
}
|
|
4021
4029
|
}
|
|
4022
4030
|
let mt;
|
|
4023
|
-
function
|
|
4024
|
-
return mt || (mt =
|
|
4031
|
+
function is(i, t, e, r, s) {
|
|
4032
|
+
return mt || (mt = ss()), new mt(i, t, e, r, s);
|
|
4025
4033
|
}
|
|
4026
|
-
function
|
|
4034
|
+
function ss() {
|
|
4027
4035
|
return class extends google.maps.OverlayView {
|
|
4028
4036
|
constructor(e, r, s, n = ze.overlayMouseTarget, a) {
|
|
4029
4037
|
super();
|
|
@@ -4195,7 +4203,7 @@ class Yt extends lt {
|
|
|
4195
4203
|
class qt extends Gt {
|
|
4196
4204
|
static create(t) {
|
|
4197
4205
|
var s;
|
|
4198
|
-
const e = this.coordType, r =
|
|
4206
|
+
const e = this.coordType, r = is(
|
|
4199
4207
|
Te.toElement(t.content),
|
|
4200
4208
|
(s = t.position) == null ? void 0 : s.toGoogle(e),
|
|
4201
4209
|
t.offset,
|
|
@@ -4285,7 +4293,7 @@ var Me;
|
|
|
4285
4293
|
}
|
|
4286
4294
|
i.toBaidu = e;
|
|
4287
4295
|
})(Me || (Me = {}));
|
|
4288
|
-
const
|
|
4296
|
+
const bn = {
|
|
4289
4297
|
CIRCLE: { baidu: () => BMap_Symbol_SHAPE_CIRCLE, google: () => google.maps.SymbolPath.CIRCLE },
|
|
4290
4298
|
BACKWARD_CLOSED_ARROW: { baidu: () => BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW, google: () => google.maps.SymbolPath.BACKWARD_CLOSED_ARROW },
|
|
4291
4299
|
BACKWARD_OPEN_ARROW: { baidu: () => BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW, google: () => google.maps.SymbolPath.BACKWARD_OPEN_ARROW },
|
|
@@ -4679,7 +4687,7 @@ class rr extends Xt {
|
|
|
4679
4687
|
if (r.length === 4)
|
|
4680
4688
|
if (a > r.length) {
|
|
4681
4689
|
for (let o = 0; o < a; o++)
|
|
4682
|
-
if (r[o] == null || !
|
|
4690
|
+
if (r[o] == null || !or.equals(s[o], r[o])) {
|
|
4683
4691
|
const h = s[(o - 2 + a) % a], d = s[(o - 1 + a) % a], p = s[o], g = s[(o + 1) % a], f = s[(o + 2) % a];
|
|
4684
4692
|
let T;
|
|
4685
4693
|
d.lat === g.lat ? T = new BMap.Point(d.lng, p.lat) : d.lng === g.lng ? T = new BMap.Point(p.lng, d.lat) : T = p, n = [h, f, T];
|
|
@@ -4687,7 +4695,7 @@ class rr extends Xt {
|
|
|
4687
4695
|
}
|
|
4688
4696
|
} else if (a === r.length) {
|
|
4689
4697
|
for (let o = 0; o < a; o++)
|
|
4690
|
-
if (!
|
|
4698
|
+
if (!or.equals(s[o], r[o])) {
|
|
4691
4699
|
n = [
|
|
4692
4700
|
s[o],
|
|
4693
4701
|
s[(o + 2) % 4]
|
|
@@ -4748,7 +4756,7 @@ class ir extends ht {
|
|
|
4748
4756
|
}
|
|
4749
4757
|
}
|
|
4750
4758
|
const de = 1;
|
|
4751
|
-
class
|
|
4759
|
+
class ns extends Nt {
|
|
4752
4760
|
constructor(e, r) {
|
|
4753
4761
|
var s;
|
|
4754
4762
|
super(e);
|
|
@@ -4767,7 +4775,7 @@ class ss extends Nt {
|
|
|
4767
4775
|
m(this, "createZoomControl", Rt.create);
|
|
4768
4776
|
m(this, "createStreetViewControl", At.create);
|
|
4769
4777
|
m(this, "createScaleControl", St.create);
|
|
4770
|
-
this.buildInMapTypeId2BIMT = V.BUILD_IN_MAP_TYPES.getValueMap(W.prototype.getId), this.baiduMapType2BIMT = V.BUILD_IN_MAP_TYPES.getValueMap(W.prototype.asBaiduMapType), this.map = new BMap.Map(e, {
|
|
4778
|
+
this.buildInMapTypeId2BIMT = V.BUILD_IN_MAP_TYPES.getValueMap(W.prototype.getId), this.baiduMapType2BIMT = V.BUILD_IN_MAP_TYPES.getValueMap(W.prototype.asBaiduMapType), ci(), this.map = new BMap.Map(e, {
|
|
4771
4779
|
minZoom: r.minZoom && r.minZoom + de,
|
|
4772
4780
|
maxZoom: r.maxZoom && r.maxZoom + de,
|
|
4773
4781
|
mapType: r.buildInMapTypeId && ((s = this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId)) == null ? void 0 : s.asBaiduMapType()),
|
|
@@ -4915,25 +4923,25 @@ class ss extends Nt {
|
|
|
4915
4923
|
e.inner && (me(e.inner instanceof BMap.Control, `control.inner(${e.inner})需要是BMap.Control`), this.map.removeControl(e.inner));
|
|
4916
4924
|
}
|
|
4917
4925
|
createMarkerClusterer(e) {
|
|
4918
|
-
return new
|
|
4926
|
+
return new Bi(this, e);
|
|
4919
4927
|
}
|
|
4920
4928
|
createHeatmap(e) {
|
|
4921
|
-
return new
|
|
4929
|
+
return new wi(this, e);
|
|
4922
4930
|
}
|
|
4923
4931
|
createAutocomplete(e) {
|
|
4924
|
-
return new
|
|
4932
|
+
return new Ti(this, e);
|
|
4925
4933
|
}
|
|
4926
4934
|
createSearchBox(e) {
|
|
4927
|
-
return new
|
|
4935
|
+
return new Di(this, e);
|
|
4928
4936
|
}
|
|
4929
4937
|
createPlacesService(e) {
|
|
4930
|
-
return new
|
|
4938
|
+
return new ki(this, e);
|
|
4931
4939
|
}
|
|
4932
4940
|
createMapUrls(e) {
|
|
4933
4941
|
return new Ot(e);
|
|
4934
4942
|
}
|
|
4935
4943
|
}
|
|
4936
|
-
class
|
|
4944
|
+
class os extends Nt {
|
|
4937
4945
|
constructor(e, r) {
|
|
4938
4946
|
var n, a;
|
|
4939
4947
|
super(e);
|
|
@@ -5083,25 +5091,25 @@ class ns extends Nt {
|
|
|
5083
5091
|
}
|
|
5084
5092
|
}
|
|
5085
5093
|
createMarkerClusterer(e) {
|
|
5086
|
-
return new
|
|
5094
|
+
return new Ii(this, e);
|
|
5087
5095
|
}
|
|
5088
5096
|
createHeatmap(e) {
|
|
5089
|
-
return new
|
|
5097
|
+
return new Ci(this, e);
|
|
5090
5098
|
}
|
|
5091
5099
|
createAutocomplete(e) {
|
|
5092
|
-
return new
|
|
5100
|
+
return new bi(this, e);
|
|
5093
5101
|
}
|
|
5094
5102
|
createSearchBox(e) {
|
|
5095
|
-
return new
|
|
5103
|
+
return new Ai(this, e);
|
|
5096
5104
|
}
|
|
5097
5105
|
createPlacesService(e) {
|
|
5098
|
-
return new
|
|
5106
|
+
return new Si(this, e);
|
|
5099
5107
|
}
|
|
5100
5108
|
createMapUrls(e) {
|
|
5101
5109
|
return new Mt(e);
|
|
5102
5110
|
}
|
|
5103
5111
|
}
|
|
5104
|
-
const tt = ["3.0"],
|
|
5112
|
+
const tt = ["3.0"], as = {
|
|
5105
5113
|
baidu: {
|
|
5106
5114
|
version: "3.0",
|
|
5107
5115
|
// 在build时会被静态替换, 导致使用者不能无法设置它
|
|
@@ -5124,10 +5132,10 @@ let Vr;
|
|
|
5124
5132
|
function jr() {
|
|
5125
5133
|
return Vr || B("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
|
|
5126
5134
|
}
|
|
5127
|
-
function
|
|
5128
|
-
i != null && (Vr =
|
|
5135
|
+
function ls(i) {
|
|
5136
|
+
i != null && (Vr = Zr(as, i));
|
|
5129
5137
|
}
|
|
5130
|
-
class
|
|
5138
|
+
class hs extends Nt {
|
|
5131
5139
|
constructor(e, r) {
|
|
5132
5140
|
var a;
|
|
5133
5141
|
super(e);
|
|
@@ -5291,27 +5299,27 @@ var q = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here
|
|
|
5291
5299
|
const n = Ct.create(s);
|
|
5292
5300
|
switch (e) {
|
|
5293
5301
|
case "google":
|
|
5294
|
-
return new
|
|
5302
|
+
return new os(r, n);
|
|
5295
5303
|
case "baidu":
|
|
5296
|
-
return new
|
|
5304
|
+
return new ns(r, n);
|
|
5297
5305
|
case "here":
|
|
5298
|
-
return new
|
|
5306
|
+
return new hs(r, n);
|
|
5299
5307
|
}
|
|
5300
5308
|
}
|
|
5301
5309
|
i.createMap = t;
|
|
5302
5310
|
})(wt || (wt = {}));
|
|
5303
|
-
var
|
|
5304
|
-
const
|
|
5305
|
-
function
|
|
5306
|
-
return le.putIfAbsent(
|
|
5311
|
+
var cs = { VITE_APP_DEV_KEY_BAIDU: "kXOq8Hg9BZbZEWAjXKuzd1oGreynup8h", VITE_APP_DEV_KEY_GOOGLE: "AIzaSyBcyzMel3dYFNcfcr0LOklbBQNpWycyZXo", VITE_APP_DEV_KEY_HERE: "", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
5312
|
+
const ds = {};
|
|
5313
|
+
function us(i) {
|
|
5314
|
+
return le.putIfAbsent(ds, i, () => hi(() => ps({ type: i, config: jr()[i] })))();
|
|
5307
5315
|
}
|
|
5308
|
-
function
|
|
5309
|
-
const e = window, r =
|
|
5316
|
+
function ps({ type: i, config: t }) {
|
|
5317
|
+
const e = window, r = gs(i);
|
|
5310
5318
|
if (le.get(e, r))
|
|
5311
5319
|
return Promise.resolve();
|
|
5312
5320
|
switch (i !== q.here && !t.key && B(`请先配置${i}地图的key`), i) {
|
|
5313
5321
|
case q.google:
|
|
5314
|
-
return
|
|
5322
|
+
return cs.VITE_FALSE ? (vi({
|
|
5315
5323
|
key: t.key,
|
|
5316
5324
|
v: "3.52"
|
|
5317
5325
|
// v: config.version,
|
|
@@ -5333,7 +5341,7 @@ function us({ type: i, config: t }) {
|
|
|
5333
5341
|
function we(i, t = tt[0]) {
|
|
5334
5342
|
return `https://js.api.here.com/v3/${t}/mapsjs-${i}.js`;
|
|
5335
5343
|
}
|
|
5336
|
-
function
|
|
5344
|
+
function gs(i) {
|
|
5337
5345
|
switch (i) {
|
|
5338
5346
|
case q.google:
|
|
5339
5347
|
return "google.maps";
|
|
@@ -5343,10 +5351,10 @@ function ps(i) {
|
|
|
5343
5351
|
return "H";
|
|
5344
5352
|
}
|
|
5345
5353
|
}
|
|
5346
|
-
let
|
|
5354
|
+
let ms = 0;
|
|
5347
5355
|
function gr(i, t = "callback") {
|
|
5348
5356
|
return new Promise((e, r) => {
|
|
5349
|
-
const s = `__callback${
|
|
5357
|
+
const s = `__callback${ms++}`;
|
|
5350
5358
|
window[s] = e;
|
|
5351
5359
|
const n = document.createElement("script");
|
|
5352
5360
|
n.src = `${i}&${t}=${s}`, n.onerror = r, document.body.appendChild(n);
|
|
@@ -5365,7 +5373,7 @@ function F(i, t) {
|
|
|
5365
5373
|
validator: (e) => Object.values(i).includes(e)
|
|
5366
5374
|
};
|
|
5367
5375
|
}
|
|
5368
|
-
function
|
|
5376
|
+
function fs(i, t) {
|
|
5369
5377
|
return {
|
|
5370
5378
|
type: String,
|
|
5371
5379
|
default: t,
|
|
@@ -5384,7 +5392,7 @@ function b(i, t) {
|
|
|
5384
5392
|
default: t
|
|
5385
5393
|
};
|
|
5386
5394
|
}
|
|
5387
|
-
function
|
|
5395
|
+
function Tn(i) {
|
|
5388
5396
|
const t = {};
|
|
5389
5397
|
return Object.entries(i).forEach(([e, r]) => {
|
|
5390
5398
|
const s = `__${e}`;
|
|
@@ -5407,15 +5415,15 @@ const Ee = {
|
|
|
5407
5415
|
get: De,
|
|
5408
5416
|
set: De
|
|
5409
5417
|
};
|
|
5410
|
-
function
|
|
5418
|
+
function vs(i) {
|
|
5411
5419
|
return Object.keys(i).forEach((t) => {
|
|
5412
5420
|
const e = i[t];
|
|
5413
5421
|
let r = !1;
|
|
5414
5422
|
typeof e == "function" ? (Ee.get = e, Ee.set = De, r = !0) : typeof e == "object" && typeof e.get == "function" && (Ee.get = e.get, Ee.set = e.set, r = !0), r && (i[t] = Object.defineProperty(i, t, Ee));
|
|
5415
5423
|
}), i;
|
|
5416
5424
|
}
|
|
5417
|
-
function
|
|
5418
|
-
return
|
|
5425
|
+
function Mn(i) {
|
|
5426
|
+
return vs(i);
|
|
5419
5427
|
}
|
|
5420
5428
|
function ct() {
|
|
5421
5429
|
return ft();
|
|
@@ -5426,12 +5434,12 @@ function Ue(i, t) {
|
|
|
5426
5434
|
for (const r of e)
|
|
5427
5435
|
r.call(i);
|
|
5428
5436
|
}
|
|
5429
|
-
function
|
|
5437
|
+
function On(i, t) {
|
|
5430
5438
|
for (const e of i)
|
|
5431
5439
|
if (e.$options.name === t.name)
|
|
5432
5440
|
return e;
|
|
5433
5441
|
}
|
|
5434
|
-
function
|
|
5442
|
+
function Cn(i, t) {
|
|
5435
5443
|
if (!i.default)
|
|
5436
5444
|
return;
|
|
5437
5445
|
const e = i.default();
|
|
@@ -5439,7 +5447,7 @@ function On(i, t) {
|
|
|
5439
5447
|
if ((r == null ? void 0 : r.type).name === t.name)
|
|
5440
5448
|
return r;
|
|
5441
5449
|
}
|
|
5442
|
-
function
|
|
5450
|
+
function ys(i, t) {
|
|
5443
5451
|
const e = {}, r = {}, s = {};
|
|
5444
5452
|
return Object.keys(i).forEach((n) => {
|
|
5445
5453
|
n.startsWith("on") ? e[be.pascal2kebab(n.substring(2))] = i[n] : r[n] = i[n];
|
|
@@ -5455,12 +5463,12 @@ function vs(i, t) {
|
|
|
5455
5463
|
};
|
|
5456
5464
|
}
|
|
5457
5465
|
function ie(i, t) {
|
|
5458
|
-
return fr(() =>
|
|
5466
|
+
return fr(() => ys(i, t));
|
|
5459
5467
|
}
|
|
5460
5468
|
function k() {
|
|
5461
5469
|
return Function;
|
|
5462
5470
|
}
|
|
5463
|
-
const
|
|
5471
|
+
const wn = () => {
|
|
5464
5472
|
let i, t;
|
|
5465
5473
|
function e(s) {
|
|
5466
5474
|
console.log(s), i = s && s.type, t = Date.now();
|
|
@@ -5485,7 +5493,7 @@ const Cn = () => {
|
|
|
5485
5493
|
render() {
|
|
5486
5494
|
return ct();
|
|
5487
5495
|
}
|
|
5488
|
-
}),
|
|
5496
|
+
}), _s = P({
|
|
5489
5497
|
name: "tg-map",
|
|
5490
5498
|
provide() {
|
|
5491
5499
|
return {
|
|
@@ -5526,12 +5534,12 @@ const Cn = () => {
|
|
|
5526
5534
|
* 该属性不会响应式更新, 要让它立即生效, 请参考{@link file://./../views/map/InfoDemo.vue#L3}
|
|
5527
5535
|
* @see MapOptions.infoWindowMode
|
|
5528
5536
|
*/
|
|
5529
|
-
infoWindowMode:
|
|
5537
|
+
infoWindowMode: fs(Ji),
|
|
5530
5538
|
gestureHandling: F(ee),
|
|
5531
5539
|
minZoom: b(Number),
|
|
5532
5540
|
maxZoom: b(Number),
|
|
5533
5541
|
mapStyle: b(Object),
|
|
5534
|
-
mapTypeId: F(
|
|
5542
|
+
mapTypeId: F(Or),
|
|
5535
5543
|
/** 地图类型对象, 优先级比mapTypeId高 */
|
|
5536
5544
|
mapType: b(Object),
|
|
5537
5545
|
hideLogo: b(Boolean),
|
|
@@ -5592,7 +5600,7 @@ const Cn = () => {
|
|
|
5592
5600
|
async mounted() {
|
|
5593
5601
|
const i = this.type;
|
|
5594
5602
|
try {
|
|
5595
|
-
await
|
|
5603
|
+
await us(i);
|
|
5596
5604
|
} catch (s) {
|
|
5597
5605
|
this.$emit("error", s);
|
|
5598
5606
|
return;
|
|
@@ -5654,7 +5662,7 @@ const Cn = () => {
|
|
|
5654
5662
|
e[r] = s;
|
|
5655
5663
|
return e;
|
|
5656
5664
|
};
|
|
5657
|
-
function
|
|
5665
|
+
function bs(i, t, e, r, s, n) {
|
|
5658
5666
|
return he(), ce("div", He({ class: "tg-map" }, i.attrs.binds), [
|
|
5659
5667
|
Xr("div", {
|
|
5660
5668
|
ref: "map",
|
|
@@ -5668,8 +5676,8 @@ function _s(i, t, e, r, s, n) {
|
|
|
5668
5676
|
K(i.$slots, "overlay")
|
|
5669
5677
|
], 16);
|
|
5670
5678
|
}
|
|
5671
|
-
const Ve = /* @__PURE__ */ se(
|
|
5672
|
-
function
|
|
5679
|
+
const Ve = /* @__PURE__ */ se(_s, [["render", bs]]);
|
|
5680
|
+
function Ts(i) {
|
|
5673
5681
|
if (i == null)
|
|
5674
5682
|
return;
|
|
5675
5683
|
let t;
|
|
@@ -5680,7 +5688,7 @@ function bs(i) {
|
|
|
5680
5688
|
t = i;
|
|
5681
5689
|
return `${t}px`;
|
|
5682
5690
|
}
|
|
5683
|
-
const
|
|
5691
|
+
const Ms = P({
|
|
5684
5692
|
name: "tg-map-widget",
|
|
5685
5693
|
props: {
|
|
5686
5694
|
left: {
|
|
@@ -5706,10 +5714,10 @@ const Ts = P({
|
|
|
5706
5714
|
}
|
|
5707
5715
|
},
|
|
5708
5716
|
methods: {
|
|
5709
|
-
dimen:
|
|
5717
|
+
dimen: Ts
|
|
5710
5718
|
}
|
|
5711
5719
|
});
|
|
5712
|
-
function
|
|
5720
|
+
function Os(i, t, e, r, s, n) {
|
|
5713
5721
|
return he(), ce("div", {
|
|
5714
5722
|
class: it(i.$options.name),
|
|
5715
5723
|
style: Jr({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
|
|
@@ -5717,7 +5725,7 @@ function Ms(i, t, e, r, s, n) {
|
|
|
5717
5725
|
K(i.$slots, "default")
|
|
5718
5726
|
], 6);
|
|
5719
5727
|
}
|
|
5720
|
-
const
|
|
5728
|
+
const Cs = /* @__PURE__ */ se(Ms, [["render", Os]]), ws = P({
|
|
5721
5729
|
name: "tg-custom-control",
|
|
5722
5730
|
mixins: [$],
|
|
5723
5731
|
props: {
|
|
@@ -5735,7 +5743,7 @@ const Os = /* @__PURE__ */ se(Ts, [["render", Ms]]), Cs = P({
|
|
|
5735
5743
|
},
|
|
5736
5744
|
onCreate() {
|
|
5737
5745
|
yr(this.$parent, Ve) || console.warn("请将tg-custom-control放到tg-map中");
|
|
5738
|
-
const { $el: i } = this, t = class extends
|
|
5746
|
+
const { $el: i } = this, t = class extends gi {
|
|
5739
5747
|
onCreateElement() {
|
|
5740
5748
|
return i;
|
|
5741
5749
|
}
|
|
@@ -5746,19 +5754,19 @@ const Os = /* @__PURE__ */ se(Ts, [["render", Ms]]), Cs = P({
|
|
|
5746
5754
|
this.$map.removeCustomControl(this.control);
|
|
5747
5755
|
}
|
|
5748
5756
|
});
|
|
5749
|
-
function
|
|
5757
|
+
function xs(i, t, e, r, s, n) {
|
|
5750
5758
|
return he(), ce("div", {
|
|
5751
5759
|
class: it(i.$options.name)
|
|
5752
5760
|
}, [
|
|
5753
5761
|
K(i.$slots, "default")
|
|
5754
5762
|
], 2);
|
|
5755
5763
|
}
|
|
5756
|
-
const
|
|
5764
|
+
const Es = /* @__PURE__ */ se(ws, [["render", xs]]), Ps = P({
|
|
5757
5765
|
name: "tg-map-type-control",
|
|
5758
5766
|
mixins: [$],
|
|
5759
5767
|
props: {
|
|
5760
5768
|
position: F(A, A.TOP_LEFT),
|
|
5761
|
-
type: F(
|
|
5769
|
+
type: F(Cr),
|
|
5762
5770
|
mapTypes: b(Array)
|
|
5763
5771
|
},
|
|
5764
5772
|
setup() {
|
|
@@ -5786,7 +5794,7 @@ const xs = /* @__PURE__ */ se(Cs, [["render", ws]]), Es = P({
|
|
|
5786
5794
|
onDestroy() {
|
|
5787
5795
|
this.$map.removeControl(this.control);
|
|
5788
5796
|
}
|
|
5789
|
-
}),
|
|
5797
|
+
}), Ls = P({
|
|
5790
5798
|
name: "tg-scale-control",
|
|
5791
5799
|
mixins: [$],
|
|
5792
5800
|
props: {
|
|
@@ -5815,7 +5823,7 @@ function Fr() {
|
|
|
5815
5823
|
let t = (i == null ? void 0 : i.name) ?? (i == null ? void 0 : i.__name);
|
|
5816
5824
|
if (!t) {
|
|
5817
5825
|
const r = i == null ? void 0 : i.__file;
|
|
5818
|
-
r && (t =
|
|
5826
|
+
r && (t = ts.basename(r, ".vue"));
|
|
5819
5827
|
}
|
|
5820
5828
|
return t;
|
|
5821
5829
|
}
|
|
@@ -5842,7 +5850,7 @@ function nr() {
|
|
|
5842
5850
|
}
|
|
5843
5851
|
};
|
|
5844
5852
|
}
|
|
5845
|
-
const
|
|
5853
|
+
const Bs = P({
|
|
5846
5854
|
name: "tg-street-view-control",
|
|
5847
5855
|
props: {
|
|
5848
5856
|
position: F(A, A.RIGHT_BOTTOM)
|
|
@@ -5858,7 +5866,7 @@ const Ls = P({
|
|
|
5858
5866
|
t.setPosition(n);
|
|
5859
5867
|
}), ct;
|
|
5860
5868
|
}
|
|
5861
|
-
}),
|
|
5869
|
+
}), Is = P({
|
|
5862
5870
|
name: "tg-zoom-control",
|
|
5863
5871
|
props: {
|
|
5864
5872
|
position: F(A, A.RIGHT_BOTTOM)
|
|
@@ -5874,7 +5882,7 @@ const Ls = P({
|
|
|
5874
5882
|
t.setPosition(n);
|
|
5875
5883
|
}), ct;
|
|
5876
5884
|
}
|
|
5877
|
-
}),
|
|
5885
|
+
}), Ss = P({
|
|
5878
5886
|
name: "tg-heatmap",
|
|
5879
5887
|
props: {
|
|
5880
5888
|
maxIntensity: b(Number),
|
|
@@ -5895,7 +5903,7 @@ const Ls = P({
|
|
|
5895
5903
|
() => s.setOptions(i)
|
|
5896
5904
|
), ct;
|
|
5897
5905
|
}
|
|
5898
|
-
}),
|
|
5906
|
+
}), ks = P({
|
|
5899
5907
|
name: "tg-marker-clusterer",
|
|
5900
5908
|
mixins: [$],
|
|
5901
5909
|
// markers从this.$children中读取, 故需要省略(Omit)
|
|
@@ -5959,14 +5967,14 @@ const Ls = P({
|
|
|
5959
5967
|
}
|
|
5960
5968
|
}
|
|
5961
5969
|
});
|
|
5962
|
-
function
|
|
5970
|
+
function As(i, t, e, r, s, n) {
|
|
5963
5971
|
return he(), ce("div", {
|
|
5964
5972
|
class: it(i.$options.name)
|
|
5965
5973
|
}, [
|
|
5966
5974
|
K(i.$slots, "default")
|
|
5967
5975
|
], 2);
|
|
5968
5976
|
}
|
|
5969
|
-
const Ur = /* @__PURE__ */ se(
|
|
5977
|
+
const Ur = /* @__PURE__ */ se(ks, [["render", As]]), Ds = P({
|
|
5970
5978
|
name: "tg-traffic-layer",
|
|
5971
5979
|
mixins: [$],
|
|
5972
5980
|
// 请直接使用v-if来控制它的显隐
|
|
@@ -5979,12 +5987,12 @@ const Ur = /* @__PURE__ */ se(Ss, [["render", ks]]), As = P({
|
|
|
5979
5987
|
},
|
|
5980
5988
|
watch: {},
|
|
5981
5989
|
onCreate() {
|
|
5982
|
-
this.layer = new
|
|
5990
|
+
this.layer = new fi(), this.$map.addLayer(this.layer);
|
|
5983
5991
|
},
|
|
5984
5992
|
onDestroy() {
|
|
5985
5993
|
this.$map.removeLayer(this.layer);
|
|
5986
5994
|
}
|
|
5987
|
-
}),
|
|
5995
|
+
}), Rs = P({
|
|
5988
5996
|
name: "tg-circle",
|
|
5989
5997
|
mixins: [$],
|
|
5990
5998
|
inheritAttrs: !1,
|
|
@@ -6064,7 +6072,7 @@ const Ur = /* @__PURE__ */ se(Ss, [["render", ks]]), As = P({
|
|
|
6064
6072
|
this.$map.removeOverlay(this.overlay);
|
|
6065
6073
|
}
|
|
6066
6074
|
});
|
|
6067
|
-
class
|
|
6075
|
+
class $s extends rs {
|
|
6068
6076
|
constructor(t, e, r, s) {
|
|
6069
6077
|
super(t, e), this.content = r, this.position = s;
|
|
6070
6078
|
}
|
|
@@ -6079,7 +6087,7 @@ class Rs extends ts {
|
|
|
6079
6087
|
this.position = t, this.draw();
|
|
6080
6088
|
}
|
|
6081
6089
|
}
|
|
6082
|
-
const
|
|
6090
|
+
const zs = P({
|
|
6083
6091
|
name: "tg-element-overlay",
|
|
6084
6092
|
mixins: [$],
|
|
6085
6093
|
props: {
|
|
@@ -6105,20 +6113,20 @@ const $s = P({
|
|
|
6105
6113
|
}
|
|
6106
6114
|
},
|
|
6107
6115
|
onCreate() {
|
|
6108
|
-
this.overlay = new
|
|
6116
|
+
this.overlay = new $s(this.$map, this, this.content(), this.position), this.$map.addElementOverlay(this.overlay);
|
|
6109
6117
|
},
|
|
6110
6118
|
onDestroy() {
|
|
6111
6119
|
this.$map.removeElementOverlay(this.overlay);
|
|
6112
6120
|
}
|
|
6113
6121
|
});
|
|
6114
|
-
function
|
|
6122
|
+
function Ns(i, t, e, r, s, n) {
|
|
6115
6123
|
return he(), ce("div", He({
|
|
6116
6124
|
class: i.$options.name
|
|
6117
6125
|
}, i.$attrs), [
|
|
6118
6126
|
K(i.$slots, "default")
|
|
6119
6127
|
], 16);
|
|
6120
6128
|
}
|
|
6121
|
-
const
|
|
6129
|
+
const Gs = /* @__PURE__ */ se(zs, [["render", Ns]]), Zs = P({
|
|
6122
6130
|
name: "tg-marker",
|
|
6123
6131
|
mixins: [$],
|
|
6124
6132
|
inheritAttrs: !1,
|
|
@@ -6220,10 +6228,10 @@ const Ns = /* @__PURE__ */ se($s, [["render", zs]]), Gs = P({
|
|
|
6220
6228
|
}
|
|
6221
6229
|
}
|
|
6222
6230
|
});
|
|
6223
|
-
function
|
|
6231
|
+
function Ws(i, t, e, r, s, n) {
|
|
6224
6232
|
return K(i.$slots, "default");
|
|
6225
6233
|
}
|
|
6226
|
-
const dt = /* @__PURE__ */ se(
|
|
6234
|
+
const dt = /* @__PURE__ */ se(Zs, [["render", Ws]]), Hs = P({
|
|
6227
6235
|
name: "tg-info-box",
|
|
6228
6236
|
mixins: [$],
|
|
6229
6237
|
inheritAttrs: !1,
|
|
@@ -6296,14 +6304,14 @@ const dt = /* @__PURE__ */ se(Gs, [["render", Zs]]), Ws = P({
|
|
|
6296
6304
|
}
|
|
6297
6305
|
}
|
|
6298
6306
|
});
|
|
6299
|
-
function
|
|
6307
|
+
function Vs(i, t, e, r, s, n) {
|
|
6300
6308
|
return he(), ce("div", He({
|
|
6301
6309
|
class: i.$options.name
|
|
6302
6310
|
}, i.attrs.binds), [
|
|
6303
6311
|
K(i.$slots, "default")
|
|
6304
6312
|
], 16);
|
|
6305
6313
|
}
|
|
6306
|
-
const
|
|
6314
|
+
const js = /* @__PURE__ */ se(Hs, [["render", Vs]]), Fs = P({
|
|
6307
6315
|
name: "tg-info-window",
|
|
6308
6316
|
mixins: [$],
|
|
6309
6317
|
inheritAttrs: !1,
|
|
@@ -6367,7 +6375,7 @@ const Vs = /* @__PURE__ */ se(Ws, [["render", Hs]]), js = P({
|
|
|
6367
6375
|
this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
|
|
6368
6376
|
}
|
|
6369
6377
|
});
|
|
6370
|
-
function
|
|
6378
|
+
function Us(i, t, e, r, s, n) {
|
|
6371
6379
|
return ii((he(), ce("div", He({
|
|
6372
6380
|
class: i.$options.name
|
|
6373
6381
|
}, i.attrs.binds), [
|
|
@@ -6376,7 +6384,7 @@ function Fs(i, t, e, r, s, n) {
|
|
|
6376
6384
|
[si, i.show]
|
|
6377
6385
|
]);
|
|
6378
6386
|
}
|
|
6379
|
-
const
|
|
6387
|
+
const Ys = /* @__PURE__ */ se(Fs, [["render", Us]]), qs = P({
|
|
6380
6388
|
name: "tg-label",
|
|
6381
6389
|
mixins: [$],
|
|
6382
6390
|
inheritAttrs: !1,
|
|
@@ -6438,14 +6446,14 @@ const Us = /* @__PURE__ */ se(js, [["render", Fs]]), Ys = P({
|
|
|
6438
6446
|
this.$marker() ? this.$marker().onRemoveLabel(this) : this.$map.removeOverlay(this.overlay);
|
|
6439
6447
|
}
|
|
6440
6448
|
});
|
|
6441
|
-
function
|
|
6449
|
+
function Ks(i, t, e, r, s, n) {
|
|
6442
6450
|
return he(), ce("div", He({
|
|
6443
6451
|
class: i.$options.name
|
|
6444
6452
|
}, i.attrs.binds), [
|
|
6445
6453
|
K(i.$slots, "default")
|
|
6446
6454
|
], 16);
|
|
6447
6455
|
}
|
|
6448
|
-
const
|
|
6456
|
+
const Xs = /* @__PURE__ */ se(qs, [["render", Ks]]), Js = P({
|
|
6449
6457
|
name: "tg-polygon",
|
|
6450
6458
|
mixins: [$],
|
|
6451
6459
|
inheritAttrs: !1,
|
|
@@ -6514,7 +6522,7 @@ const Ks = /* @__PURE__ */ se(Ys, [["render", qs]]), Xs = P({
|
|
|
6514
6522
|
onDestroy() {
|
|
6515
6523
|
this.$map.removeOverlay(this.overlay);
|
|
6516
6524
|
}
|
|
6517
|
-
}),
|
|
6525
|
+
}), Qs = P({
|
|
6518
6526
|
name: "tg-polyline",
|
|
6519
6527
|
mixins: [$],
|
|
6520
6528
|
inheritAttrs: !1,
|
|
@@ -6582,7 +6590,7 @@ const Ks = /* @__PURE__ */ se(Ys, [["render", qs]]), Xs = P({
|
|
|
6582
6590
|
onDestroy() {
|
|
6583
6591
|
this.overlay.remove();
|
|
6584
6592
|
}
|
|
6585
|
-
}),
|
|
6593
|
+
}), en = P({
|
|
6586
6594
|
name: "tg-rectangle",
|
|
6587
6595
|
mixins: [$],
|
|
6588
6596
|
inheritAttrs: !1,
|
|
@@ -6648,13 +6656,13 @@ const Ks = /* @__PURE__ */ se(Ys, [["render", qs]]), Xs = P({
|
|
|
6648
6656
|
onDestroy() {
|
|
6649
6657
|
this.$map.removeOverlay(this.overlay);
|
|
6650
6658
|
}
|
|
6651
|
-
}),
|
|
6659
|
+
}), tn = ["beforeUpdate", "updated"], xn = {
|
|
6652
6660
|
install(i, t = {}) {
|
|
6653
6661
|
if (t.enable !== !1) {
|
|
6654
6662
|
const e = P({
|
|
6655
6663
|
beforeCreate() {
|
|
6656
6664
|
const r = Fr() ?? "", n = (t.nameRegex || /^[A-Z]/).test(r) ? (a) => {
|
|
6657
|
-
t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) :
|
|
6665
|
+
t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : tn.includes(a) || console.debug("[lifecycle]", r, a);
|
|
6658
6666
|
} : De;
|
|
6659
6667
|
n("beforeCreate"), this.__life_impl = n;
|
|
6660
6668
|
},
|
|
@@ -6694,24 +6702,24 @@ const Ks = /* @__PURE__ */ se(Ys, [["render", qs]]), Xs = P({
|
|
|
6694
6702
|
i.mixin(e);
|
|
6695
6703
|
}
|
|
6696
6704
|
}
|
|
6697
|
-
},
|
|
6705
|
+
}, rn = 6378137;
|
|
6698
6706
|
function Be(i) {
|
|
6699
6707
|
return i * Math.PI / 180;
|
|
6700
6708
|
}
|
|
6701
6709
|
function mr(i) {
|
|
6702
6710
|
return i * 180 / Math.PI;
|
|
6703
6711
|
}
|
|
6704
|
-
function
|
|
6712
|
+
function sn(i, t) {
|
|
6705
6713
|
if (i.lat === t.lat && i.lng === t.lng)
|
|
6706
6714
|
return 0;
|
|
6707
6715
|
const e = Be((i.lat + t.lat) / 2), r = Be((i.lat - t.lat) / 2), s = Be((i.lng - t.lng) / 2);
|
|
6708
6716
|
let n = Math.sin(r), a = Math.sin(s), c = Math.sin(e);
|
|
6709
|
-
const o =
|
|
6717
|
+
const o = rn, h = 1 / 298.257;
|
|
6710
6718
|
n = n * n, a = a * a, c = c * c;
|
|
6711
6719
|
const d = n * (1 - a) + (1 - c) * a, p = (1 - n) * (1 - a) + c * a, g = Math.atan(Math.sqrt(d / p)), f = Math.sqrt(d * p) / g, T = 2 * g * o, _ = (3 * f - 1) / 2 / p, M = (3 * f + 1) / 2 / d;
|
|
6712
6720
|
return T * (1 + h * (_ * c * (1 - n) - M * (1 - c) * n));
|
|
6713
6721
|
}
|
|
6714
|
-
function
|
|
6722
|
+
function nn(i, t, e) {
|
|
6715
6723
|
const s = 63567523142e-4, n = 1 / 298.257223563, a = Be(t), c = Math.sin(a), o = Math.cos(a), h = (1 - n) * Math.tan(Be(i.lat)), d = 1 / Math.sqrt(1 + h * h), p = h * d, g = Math.atan2(h, o), f = d * c, T = 1 - f * f, _ = T * (6378137 * 6378137 - s * s) / (s * s), M = 1 + _ / 16384 * (4096 + _ * (-768 + _ * (320 - 175 * _))), l = _ / 1024 * (256 + _ * (-128 + _ * (74 - 47 * _)));
|
|
6716
6724
|
let u = 0, v = 0, y = 0, C = e / (s * M), w = 2 * Math.PI;
|
|
6717
6725
|
for (; Math.abs(C - w) > 1e-12; ) {
|
|
@@ -6725,15 +6733,15 @@ function sn(i, t, e) {
|
|
|
6725
6733
|
), z = Math.atan2(v * c, d * y - p * v * o), L = n / 16 * T * (4 + n * (4 - 3 * T)), J = z - (1 - L) * n * f * (C + L * v * (u + L * y * (-1 + 2 * u * u)));
|
|
6726
6734
|
return { lng: i.lng + mr(J), lat: mr(S) };
|
|
6727
6735
|
}
|
|
6728
|
-
const xn = {
|
|
6729
|
-
getDistance: rn,
|
|
6730
|
-
getDestination: sn
|
|
6731
|
-
};
|
|
6732
|
-
var nn = { VITE_APP_DEV_KEY_BAIDU: "kXOq8Hg9BZbZEWAjXKuzd1oGreynup8h", VITE_APP_DEV_KEY_GOOGLE: "AIzaSyBcyzMel3dYFNcfcr0LOklbBQNpWycyZXo", VITE_APP_DEV_KEY_HERE: "", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
6733
6736
|
const En = {
|
|
6737
|
+
getDistance: sn,
|
|
6738
|
+
getDestination: nn
|
|
6739
|
+
};
|
|
6740
|
+
var on = { VITE_APP_DEV_KEY_BAIDU: "kXOq8Hg9BZbZEWAjXKuzd1oGreynup8h", VITE_APP_DEV_KEY_GOOGLE: "AIzaSyBcyzMel3dYFNcfcr0LOklbBQNpWycyZXo", VITE_APP_DEV_KEY_HERE: "", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
6741
|
+
const Pn = {
|
|
6734
6742
|
install(i, t) {
|
|
6735
|
-
if (
|
|
6736
|
-
const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Ve, "./TgMapWidget.vue":
|
|
6743
|
+
if (ls(t), on.VITE_FALSE) {
|
|
6744
|
+
const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Ve, "./TgMapWidget.vue": Cs, "./controls/TgCustomControl.vue": Es, "./controls/TgMapTypeControl.vue": Ps, "./controls/TgScaleControl.vue": Ls, "./controls/TgStreetViewControl.vue": Bs, "./controls/TgZoomControl.vue": Is, "./extra/TgHeatmap.vue": Ss, "./extra/TgMarkerClusterer.vue": Ur, "./layers/TgTrafficLayer.vue": Ds, "./overlays/TgCircle.vue": Rs, "./overlays/TgElementOverlay.vue": Gs, "./overlays/TgInfoBox.vue": js, "./overlays/TgInfoWindow.vue": Ys, "./overlays/TgLabel.vue": Xs, "./overlays/TgMarker.vue": dt, "./overlays/TgPolygon.vue": Js, "./overlays/TgPolyline.vue": Qs, "./overlays/TgRectangle.vue": en });
|
|
6737
6745
|
Object.keys(r).forEach((s) => {
|
|
6738
6746
|
const n = r[s];
|
|
6739
6747
|
i.component(n.name ?? B(`Tg开头的组件必须设置name: ${s}`), n);
|
|
@@ -6747,67 +6755,67 @@ export {
|
|
|
6747
6755
|
Lt as AbstractControl,
|
|
6748
6756
|
Nt as AbstractMap,
|
|
6749
6757
|
fe as Arrays,
|
|
6750
|
-
|
|
6751
|
-
|
|
6758
|
+
Pr as Autocomplete,
|
|
6759
|
+
Ti as BaiduAutocomplete,
|
|
6752
6760
|
Zt as BaiduCircle,
|
|
6753
6761
|
Bt as BaiduControl,
|
|
6754
|
-
|
|
6762
|
+
wi as BaiduHeatmap,
|
|
6755
6763
|
Ft as BaiduInfoBoxOverlay,
|
|
6756
6764
|
Vt as BaiduInfoWindow,
|
|
6757
6765
|
It as BaiduMapTypeControl,
|
|
6758
6766
|
Ot as BaiduMapUrls,
|
|
6759
6767
|
Ge as BaiduMarker,
|
|
6760
|
-
|
|
6768
|
+
Bi as BaiduMarkerClusterer,
|
|
6761
6769
|
lt as BaiduOverlay,
|
|
6762
|
-
|
|
6770
|
+
ki as BaiduPlacesService,
|
|
6763
6771
|
Xt as BaiduPolyShape,
|
|
6764
6772
|
er as BaiduPolygon,
|
|
6765
6773
|
Jt as BaiduPolyline,
|
|
6766
6774
|
rr as BaiduRectangle,
|
|
6767
6775
|
St as BaiduScaleControl,
|
|
6768
|
-
|
|
6776
|
+
Di as BaiduSearchBox,
|
|
6769
6777
|
At as BaiduStreetViewControl,
|
|
6770
6778
|
Rt as BaiduZoomControl,
|
|
6771
6779
|
W as BuildInMapType,
|
|
6772
|
-
|
|
6780
|
+
Or as BuildInMapTypeId,
|
|
6773
6781
|
Pe as CachedValue,
|
|
6774
6782
|
A as ControlPosition,
|
|
6775
6783
|
U as ControlPositionConverter,
|
|
6776
6784
|
D as CoordType,
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6785
|
+
gi as CustomControl,
|
|
6786
|
+
rs as ElementOverlay,
|
|
6787
|
+
mi as EmptyControl,
|
|
6788
|
+
pi as FastFindValues,
|
|
6781
6789
|
ee as GestureHandlingOptions,
|
|
6782
|
-
|
|
6790
|
+
bi as GoogleAutocomplete,
|
|
6783
6791
|
Wt as GoogleCircle,
|
|
6784
6792
|
at as GoogleControl,
|
|
6785
|
-
|
|
6793
|
+
Ci as GoogleHeatmap,
|
|
6786
6794
|
Ut as GoogleInfoBoxOverlay,
|
|
6787
6795
|
jt as GoogleInfoWindow,
|
|
6788
6796
|
Tt as GoogleMapTypeControl,
|
|
6789
6797
|
Mt as GoogleMapUrls,
|
|
6790
6798
|
Kt as GoogleMarker,
|
|
6791
|
-
|
|
6799
|
+
Ii as GoogleMarkerClusterer,
|
|
6792
6800
|
Gt as GoogleOverlay,
|
|
6793
|
-
|
|
6801
|
+
Si as GooglePlacesService,
|
|
6794
6802
|
tr as GooglePolygon,
|
|
6795
6803
|
Qt as GooglePolyline,
|
|
6796
6804
|
ir as GoogleRectangle,
|
|
6797
6805
|
kt as GoogleScaleControl,
|
|
6798
|
-
|
|
6806
|
+
Ai as GoogleSearchBox,
|
|
6799
6807
|
Dt as GoogleStreetViewControl,
|
|
6800
6808
|
$t as GoogleZoomControl,
|
|
6801
|
-
|
|
6809
|
+
Br as Heatmap,
|
|
6802
6810
|
Qe as Icon,
|
|
6803
6811
|
et as IconSequence,
|
|
6804
|
-
|
|
6812
|
+
fn as ImageMapType,
|
|
6805
6813
|
Ht as InfoWindow,
|
|
6806
|
-
|
|
6807
|
-
|
|
6814
|
+
Ji as InfoWindowModeValues,
|
|
6815
|
+
lr as KeyValue,
|
|
6808
6816
|
O as LatLng,
|
|
6809
6817
|
X as LatLngBounds,
|
|
6810
|
-
|
|
6818
|
+
xn as LifecycleLogPlugin,
|
|
6811
6819
|
te as Location,
|
|
6812
6820
|
Ze as MIXIN_HOOK_CREATE,
|
|
6813
6821
|
We as MIXIN_HOOK_DESTROY,
|
|
@@ -6818,80 +6826,80 @@ export {
|
|
|
6818
6826
|
ze as MapPane,
|
|
6819
6827
|
Ne as MapPanes,
|
|
6820
6828
|
V as MapType,
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6829
|
+
Cr as MapTypeControlType,
|
|
6830
|
+
Ir as MapUrls,
|
|
6831
|
+
Ri as MapZoom,
|
|
6832
|
+
$r as MarkerClusterer,
|
|
6825
6833
|
le as Objects,
|
|
6826
|
-
|
|
6827
|
-
|
|
6834
|
+
Hr as Overlay,
|
|
6835
|
+
zr as PlacesService,
|
|
6828
6836
|
oe as Point,
|
|
6829
|
-
|
|
6830
|
-
|
|
6837
|
+
Nr as SearchBox,
|
|
6838
|
+
En as SphericalUtils,
|
|
6831
6839
|
be as Strings,
|
|
6832
6840
|
Me as SymbolIcon,
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
+
bn as SymbolPath,
|
|
6842
|
+
Rs as TgCircle,
|
|
6843
|
+
Es as TgCustomControl,
|
|
6844
|
+
Gs as TgElementOverlay,
|
|
6845
|
+
Ss as TgHeatmap,
|
|
6846
|
+
js as TgInfoBox,
|
|
6847
|
+
Ys as TgInfoWindow,
|
|
6848
|
+
Xs as TgLabel,
|
|
6841
6849
|
Ve as TgMap,
|
|
6842
6850
|
wt as TgMapFactory,
|
|
6843
6851
|
q as TgMapType,
|
|
6844
|
-
|
|
6845
|
-
|
|
6852
|
+
Ps as TgMapTypeControl,
|
|
6853
|
+
Cs as TgMapWidget,
|
|
6846
6854
|
dt as TgMarker,
|
|
6847
6855
|
Ur as TgMarkerClusterer,
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
+
Js as TgPolygon,
|
|
6857
|
+
Qs as TgPolyline,
|
|
6858
|
+
en as TgRectangle,
|
|
6859
|
+
Ls as TgScaleControl,
|
|
6860
|
+
Bs as TgStreetViewControl,
|
|
6861
|
+
Ds as TgTrafficLayer,
|
|
6862
|
+
Is as TgZoomControl,
|
|
6863
|
+
fi as TrafficLayer,
|
|
6856
6864
|
Je as UnionIcon,
|
|
6857
6865
|
me as assert,
|
|
6858
6866
|
vt as assertNever,
|
|
6859
6867
|
Ue as callHook,
|
|
6860
|
-
|
|
6868
|
+
Tn as computedSaveOnThis,
|
|
6861
6869
|
hi as createAsyncSingleton,
|
|
6862
6870
|
ct as createEmptyVNode,
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6871
|
+
vs as createPropertyObject,
|
|
6872
|
+
Mn as createPropertyObjectTyped,
|
|
6873
|
+
gn as debug,
|
|
6874
|
+
Pn as default,
|
|
6867
6875
|
k as eventProp,
|
|
6868
|
-
|
|
6876
|
+
Cn as extractVNodeFromSlotsByComponent,
|
|
6869
6877
|
Et as findAncestorComponentByType,
|
|
6870
|
-
|
|
6871
|
-
|
|
6878
|
+
On as findByComponentType,
|
|
6879
|
+
nn as getDestination,
|
|
6872
6880
|
jr as getTgMapConfig,
|
|
6873
6881
|
_t as isComponentByType,
|
|
6874
|
-
|
|
6882
|
+
mn as isDef,
|
|
6875
6883
|
li as isEntryValueDef,
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6884
|
+
cn as isInstanceOf,
|
|
6885
|
+
hn as lateinit,
|
|
6886
|
+
us as loadCachedMap,
|
|
6879
6887
|
De as noop,
|
|
6880
6888
|
b as optionalProp,
|
|
6881
|
-
|
|
6889
|
+
ts as path,
|
|
6882
6890
|
N as requiredProp,
|
|
6883
|
-
|
|
6891
|
+
dn as safeAs,
|
|
6884
6892
|
yr as safeAsComponent,
|
|
6885
|
-
|
|
6886
|
-
|
|
6893
|
+
ls as setTgMapConfig,
|
|
6894
|
+
ys as splitAttrs,
|
|
6887
6895
|
F as stringEnumProp,
|
|
6888
|
-
|
|
6896
|
+
fs as stringUnionPropFromValues,
|
|
6889
6897
|
B as throwError,
|
|
6890
6898
|
Pt as throwUnsupported,
|
|
6891
|
-
|
|
6899
|
+
pn as todo,
|
|
6892
6900
|
yt as typed,
|
|
6893
|
-
|
|
6894
|
-
|
|
6901
|
+
un as unwrapStringEnumValue,
|
|
6902
|
+
wn as useEventLogMethods,
|
|
6895
6903
|
ie as useSplittedAttrs,
|
|
6896
6904
|
nr as useTgMapInner
|
|
6897
6905
|
};
|