tg-map-vue3 3.8.5 → 3.8.6
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/lat-lng.d.ts +1 -0
- package/dist/tg-map.js +129 -126
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +3 -3
- 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 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);
|
|
5
|
-
import { createCommentVNode as ft, computed as fr, defineComponent as P, markRaw as Kr, watch as Ae, openBlock as he, createElementBlock as ce, mergeProps as He, createElementVNode as Xr, normalizeClass as
|
|
5
|
+
import { createCommentVNode as ft, computed as fr, defineComponent as P, markRaw as Kr, watch as Ae, openBlock as he, createElementBlock as ce, mergeProps as He, createElementVNode as Xr, normalizeClass as st, renderSlot as K, normalizeStyle as Jr, getCurrentInstance as Qr, inject as ei, onMounted as ti, onBeforeUnmount as ri, toRaw as nt, withDirectives as ii, vShow as si } from "vue";
|
|
6
6
|
function re(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]);
|
|
@@ -12,11 +12,11 @@ let ni = 1;
|
|
|
12
12
|
function oi() {
|
|
13
13
|
return ni++;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function qe(i, t) {
|
|
16
16
|
return t.__id__ || (t.__id__ = oi()), `${i}::${t.__id__}`;
|
|
17
17
|
}
|
|
18
18
|
var xt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
19
|
-
function
|
|
19
|
+
function ot(i) {
|
|
20
20
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
21
21
|
}
|
|
22
22
|
var vr = { exports: {} };
|
|
@@ -127,7 +127,7 @@ var vr = { exports: {} };
|
|
|
127
127
|
});
|
|
128
128
|
})(vr);
|
|
129
129
|
var ai = vr.exports;
|
|
130
|
-
const pe = /* @__PURE__ */
|
|
130
|
+
const pe = /* @__PURE__ */ ot(ai);
|
|
131
131
|
var fe;
|
|
132
132
|
((i) => {
|
|
133
133
|
function t(c, o) {
|
|
@@ -249,8 +249,8 @@ function hi(i) {
|
|
|
249
249
|
let t = null;
|
|
250
250
|
return () => t ?? (t = i().catch((e) => (t = null, Promise.reject(e))));
|
|
251
251
|
}
|
|
252
|
-
var
|
|
253
|
-
const
|
|
252
|
+
var R = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(R || {});
|
|
253
|
+
const Fe = "wgs84", D = class D {
|
|
254
254
|
constructor(t, e, r) {
|
|
255
255
|
this.lat = t, this.lng = e, this.coord = r;
|
|
256
256
|
}
|
|
@@ -272,23 +272,26 @@ const ut = "wgs84", R = class R {
|
|
|
272
272
|
}
|
|
273
273
|
/** @param coord Baidu Map的坐标一般都是bd09 */
|
|
274
274
|
static fromBaidu(t, e) {
|
|
275
|
-
return new
|
|
275
|
+
return new D(t.lat, t.lng, e);
|
|
276
276
|
}
|
|
277
277
|
/** @param coord Google Map的坐标依据地图类型不同是不一样的 */
|
|
278
278
|
static fromGoogle(t, e) {
|
|
279
|
-
return new
|
|
279
|
+
return new D(t.lat(), t.lng(), e);
|
|
280
280
|
}
|
|
281
281
|
static fromHere(t, e) {
|
|
282
|
-
return new
|
|
282
|
+
return new D(t.lat, t.lng, e);
|
|
283
283
|
}
|
|
284
284
|
static fromLiteral(t) {
|
|
285
|
-
return new
|
|
285
|
+
return new D(t.lat, t.lng, t.coord || Fe);
|
|
286
|
+
}
|
|
287
|
+
static fromPartialLiteral(t) {
|
|
288
|
+
return new D((t == null ? void 0 : t.lat) ?? 0, (t == null ? void 0 : t.lng) ?? 0, (t == null ? void 0 : t.coord) || Fe);
|
|
286
289
|
}
|
|
287
|
-
static fromLngLat(t, e, r =
|
|
288
|
-
return new
|
|
290
|
+
static fromLngLat(t, e, r = Fe) {
|
|
291
|
+
return new D(e, t, r);
|
|
289
292
|
}
|
|
290
|
-
static create(t, e, r =
|
|
291
|
-
return new
|
|
293
|
+
static create(t, e, r = Fe) {
|
|
294
|
+
return new D(t, e, r);
|
|
292
295
|
}
|
|
293
296
|
/** 转换坐标到指定坐标系 */
|
|
294
297
|
to(t) {
|
|
@@ -296,7 +299,7 @@ const ut = "wgs84", R = class R {
|
|
|
296
299
|
if (this.coord === e)
|
|
297
300
|
return this;
|
|
298
301
|
const [r, s] = this._convert(e);
|
|
299
|
-
return new
|
|
302
|
+
return new D(s, r, e);
|
|
300
303
|
}
|
|
301
304
|
/**
|
|
302
305
|
* TODO: normalize要不要默认设为true, 和google的行为保持一致?
|
|
@@ -306,7 +309,7 @@ const ut = "wgs84", R = class R {
|
|
|
306
309
|
*/
|
|
307
310
|
toBaidu(t, e = !1) {
|
|
308
311
|
let r = this.lat, s = this.lng;
|
|
309
|
-
return this.coord !== t && ([s, r] = this._convert(t)), e && ([s, r] =
|
|
312
|
+
return this.coord !== t && ([s, r] = this._convert(t)), e && ([s, r] = D._normalize(s, r)), new BMap.Point(s, r);
|
|
310
313
|
}
|
|
311
314
|
/**
|
|
312
315
|
* 转换成google的经纬度, 内部会自动进行标准化
|
|
@@ -345,8 +348,8 @@ const ut = "wgs84", R = class R {
|
|
|
345
348
|
* @see _normalize {@macro latlng_normalize}
|
|
346
349
|
*/
|
|
347
350
|
normalize() {
|
|
348
|
-
const [t, e] =
|
|
349
|
-
return e === this.lat && t === this.lng ? this : new
|
|
351
|
+
const [t, e] = D._normalize(this.lng, this.lat);
|
|
352
|
+
return e === this.lat && t === this.lng ? this : new D(e, t, this.coord);
|
|
350
353
|
}
|
|
351
354
|
equals(t) {
|
|
352
355
|
return this === t ? !0 : this.lat === t.lat && this.lng === t.lng && this.coord === t.coord;
|
|
@@ -355,8 +358,8 @@ const ut = "wgs84", R = class R {
|
|
|
355
358
|
return JSON.stringify(this);
|
|
356
359
|
}
|
|
357
360
|
};
|
|
358
|
-
m(
|
|
359
|
-
let O =
|
|
361
|
+
m(D, "ZERO", D.create(0, 0));
|
|
362
|
+
let O = D;
|
|
360
363
|
const ne = class ne {
|
|
361
364
|
/**
|
|
362
365
|
* 不推荐直接创建LatLngBounds, sw和ne的大小关系可能没法保证, 推荐用LatLngBounds.Builder或者LatLngBounds.from等静态方法来创建
|
|
@@ -513,7 +516,7 @@ class br {
|
|
|
513
516
|
return this.target = t, this;
|
|
514
517
|
}
|
|
515
518
|
}
|
|
516
|
-
class
|
|
519
|
+
class at {
|
|
517
520
|
constructor(t, e) {
|
|
518
521
|
m(this, "eventHub", new Tr());
|
|
519
522
|
this.delegate = t, this.options = e;
|
|
@@ -542,14 +545,14 @@ class ot {
|
|
|
542
545
|
this.delegate.removeEventListener(t, e);
|
|
543
546
|
}
|
|
544
547
|
}
|
|
545
|
-
const
|
|
548
|
+
const it = class it extends br {
|
|
546
549
|
addEventListener(t, e) {
|
|
547
|
-
const r =
|
|
550
|
+
const r = qe(t, e);
|
|
548
551
|
if (this.eventMap.get(r)) {
|
|
549
552
|
console.warn("listener已经添加过了", r, e);
|
|
550
553
|
return;
|
|
551
554
|
}
|
|
552
|
-
const s = this.inner.addListener(
|
|
555
|
+
const s = this.inner.addListener(it.EVENT_TYPE_MAP[t] || t, (n) => {
|
|
553
556
|
const a = {
|
|
554
557
|
type: t,
|
|
555
558
|
target: this.target,
|
|
@@ -560,12 +563,12 @@ const rt = class rt extends br {
|
|
|
560
563
|
this.eventMap.set(r, s);
|
|
561
564
|
}
|
|
562
565
|
removeEventListener(t, e) {
|
|
563
|
-
const r =
|
|
566
|
+
const r = qe(t, e), s = this.eventMap.get(r);
|
|
564
567
|
s ? (s.remove(), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
|
|
565
568
|
}
|
|
566
569
|
};
|
|
567
570
|
// 事件类型映射: tg => google
|
|
568
|
-
m(
|
|
571
|
+
m(it, "EVENT_TYPE_MAP", {
|
|
569
572
|
"center-changed": "center_changed",
|
|
570
573
|
"zoom-changed": "zoom_changed",
|
|
571
574
|
"radius-changed": "radius_changed",
|
|
@@ -581,10 +584,10 @@ m(rt, "EVENT_TYPE_MAP", {
|
|
|
581
584
|
"map-mouseup": "mouseup",
|
|
582
585
|
"map-dblclick": "dblclick"
|
|
583
586
|
});
|
|
584
|
-
let ye =
|
|
587
|
+
let ye = it;
|
|
585
588
|
const Ie = class Ie extends br {
|
|
586
589
|
addEventListener(t, e) {
|
|
587
|
-
const r =
|
|
590
|
+
const r = qe(t, e);
|
|
588
591
|
if (this.eventMap.get(r)) {
|
|
589
592
|
console.warn("listener已经添加过了", r, e);
|
|
590
593
|
return;
|
|
@@ -600,7 +603,7 @@ const Ie = class Ie extends br {
|
|
|
600
603
|
this.inner.addEventListener(Ie.EVENT_TYPE_MAP[t] || t, s), this.eventMap.set(r, s);
|
|
601
604
|
}
|
|
602
605
|
removeEventListener(t, e) {
|
|
603
|
-
const r =
|
|
606
|
+
const r = qe(t, e), s = this.eventMap.get(r);
|
|
604
607
|
s ? (this.inner.removeEventListener(Ie.EVENT_TYPE_MAP[t] || t, s), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
|
|
605
608
|
}
|
|
606
609
|
};
|
|
@@ -811,7 +814,7 @@ class Bt extends Lt {
|
|
|
811
814
|
t.innerMap.removeControl(this.inner);
|
|
812
815
|
}
|
|
813
816
|
}
|
|
814
|
-
class
|
|
817
|
+
class lt extends Lt {
|
|
815
818
|
constructor(e, r) {
|
|
816
819
|
super();
|
|
817
820
|
m(this, "visible", !1);
|
|
@@ -857,7 +860,7 @@ class W {
|
|
|
857
860
|
return this.id;
|
|
858
861
|
}
|
|
859
862
|
getBaiduCoordType() {
|
|
860
|
-
return
|
|
863
|
+
return R.bd09;
|
|
861
864
|
}
|
|
862
865
|
asBaiduMapType() {
|
|
863
866
|
return this.baidu();
|
|
@@ -939,13 +942,13 @@ class mi {
|
|
|
939
942
|
}
|
|
940
943
|
var V;
|
|
941
944
|
((i) => {
|
|
942
|
-
i.NORMAL = new W("normal", () => BMAP_NORMAL_MAP, () => google.maps.MapTypeId.ROADMAP,
|
|
945
|
+
i.NORMAL = new W("normal", () => BMAP_NORMAL_MAP, () => google.maps.MapTypeId.ROADMAP, R.gcj02), i.SATELLITE = new W("satellite", () => BMAP_SATELLITE_MAP, () => google.maps.MapTypeId.SATELLITE, R.wgs84), i.HYBRID = new W("hybrid", () => BMAP_HYBRID_MAP, () => google.maps.MapTypeId.HYBRID, R.gcj02), i.TERRAIN = new W("terrain", () => (
|
|
943
946
|
/* 三维 */
|
|
944
947
|
BMAP_PERSPECTIVE_MAP
|
|
945
948
|
), () => (
|
|
946
949
|
/* 地形 */
|
|
947
950
|
google.maps.MapTypeId.TERRAIN
|
|
948
|
-
),
|
|
951
|
+
), R.wgs84), i.BUILD_IN_MAP_TYPES = new ui([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
|
|
949
952
|
})(V || (V = {}));
|
|
950
953
|
var Or = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(Or || {});
|
|
951
954
|
const Cr = [V.NORMAL, V.SATELLITE, V.HYBRID];
|
|
@@ -962,7 +965,7 @@ class It extends Bt {
|
|
|
962
965
|
return t.position && s.setAnchor(U.getBaidu().toValue(t.position)), new It(s, t.position);
|
|
963
966
|
}
|
|
964
967
|
}
|
|
965
|
-
const ue = class ue extends
|
|
968
|
+
const ue = class ue extends lt {
|
|
966
969
|
constructor(t = "default", e = A.TOP_LEFT, r = Cr) {
|
|
967
970
|
super("mapType", e), this.type = t, this.mapTypes = r, ue.type2google || (ue.type2google = {
|
|
968
971
|
default: google.maps.MapTypeControlStyle.DEFAULT,
|
|
@@ -993,7 +996,7 @@ class St extends Bt {
|
|
|
993
996
|
return new St(e, t.position);
|
|
994
997
|
}
|
|
995
998
|
}
|
|
996
|
-
class kt extends
|
|
999
|
+
class kt extends lt {
|
|
997
1000
|
static create(t) {
|
|
998
1001
|
return new kt(t.position);
|
|
999
1002
|
}
|
|
@@ -1006,7 +1009,7 @@ class At extends gi {
|
|
|
1006
1009
|
return new At(!0, t.position ?? A.RIGHT_BOTTOM);
|
|
1007
1010
|
}
|
|
1008
1011
|
}
|
|
1009
|
-
class Dt extends
|
|
1012
|
+
class Dt extends lt {
|
|
1010
1013
|
static create(t) {
|
|
1011
1014
|
return new Dt(t.position);
|
|
1012
1015
|
}
|
|
@@ -1024,7 +1027,7 @@ class Rt extends Bt {
|
|
|
1024
1027
|
return new Rt(e, t.position);
|
|
1025
1028
|
}
|
|
1026
1029
|
}
|
|
1027
|
-
class $t extends
|
|
1030
|
+
class $t extends lt {
|
|
1028
1031
|
static create(t) {
|
|
1029
1032
|
return new $t(t.position);
|
|
1030
1033
|
}
|
|
@@ -1597,22 +1600,22 @@ var Pr = { exports: {} };
|
|
|
1597
1600
|
});
|
|
1598
1601
|
})(Pr);
|
|
1599
1602
|
var Ti = Pr.exports;
|
|
1600
|
-
const Mi = /* @__PURE__ */
|
|
1603
|
+
const Mi = /* @__PURE__ */ ot(Ti), lr = 10, Ke = {
|
|
1601
1604
|
toGoogle: (i, t) => ({
|
|
1602
1605
|
opacity: i.opacity,
|
|
1603
1606
|
radius: i.radius ?? lr,
|
|
1604
1607
|
// key是小数和整数的混合, 故读取出来时不会维持
|
|
1605
1608
|
gradient: i.gradient && Object.entries(i.gradient).sort(([e], [r]) => +e - +r).map(([e, r]) => r),
|
|
1606
1609
|
maxIntensity: i.maxIntensity,
|
|
1607
|
-
data:
|
|
1610
|
+
data: Xe.toGoogle(i.data, t)
|
|
1608
1611
|
}),
|
|
1609
1612
|
toBaidu: (i, t, e) => ({
|
|
1610
1613
|
opacity: i.opacity,
|
|
1611
1614
|
radius: i.radius ?? lr,
|
|
1612
1615
|
gradient: i.gradient,
|
|
1613
|
-
data:
|
|
1616
|
+
data: Xe.toBaidu(i.data, t, e)
|
|
1614
1617
|
})
|
|
1615
|
-
},
|
|
1618
|
+
}, Xe = {
|
|
1616
1619
|
toGoogle: (i, t) => i.map(
|
|
1617
1620
|
(e) => "weight" in e ? { weight: e.weight, location: e.position.toGoogle(t) } : e.toGoogle(t)
|
|
1618
1621
|
),
|
|
@@ -1630,13 +1633,13 @@ class Oi extends Lr {
|
|
|
1630
1633
|
constructor(e, r) {
|
|
1631
1634
|
super();
|
|
1632
1635
|
m(this, "inner");
|
|
1633
|
-
this.map = e, this.inner = new google.maps.visualization.HeatmapLayer(
|
|
1636
|
+
this.map = e, this.inner = new google.maps.visualization.HeatmapLayer(Ke.toGoogle(r, this.map.coordType)), this.inner.setMap(e.innerMap);
|
|
1634
1637
|
}
|
|
1635
1638
|
setData(e) {
|
|
1636
|
-
this.inner.setData(
|
|
1639
|
+
this.inner.setData(Xe.toGoogle(e, this.map.coordType));
|
|
1637
1640
|
}
|
|
1638
1641
|
setOptions(e) {
|
|
1639
|
-
this.inner.setOptions(
|
|
1642
|
+
this.inner.setOptions(Ke.toGoogle(e, this.map.coordType));
|
|
1640
1643
|
}
|
|
1641
1644
|
remove() {
|
|
1642
1645
|
this.inner.setMap(null);
|
|
@@ -1647,7 +1650,7 @@ class Ci extends Lr {
|
|
|
1647
1650
|
super();
|
|
1648
1651
|
m(this, "inner");
|
|
1649
1652
|
this.map = e;
|
|
1650
|
-
const s =
|
|
1653
|
+
const s = Ke.toBaidu(r, this.map.coordType, r.maxIntensity);
|
|
1651
1654
|
this.inner = new Mi(s), e.innerMap.addOverlay(this.inner), this.inner.setDataSet(s.data);
|
|
1652
1655
|
}
|
|
1653
1656
|
/**
|
|
@@ -1663,10 +1666,10 @@ class Ci extends Lr {
|
|
|
1663
1666
|
((r = this.inner).data ?? (r.data = {})).max = e;
|
|
1664
1667
|
}
|
|
1665
1668
|
setData(e) {
|
|
1666
|
-
this.inner.setDataSet(
|
|
1669
|
+
this.inner.setDataSet(Xe.toBaidu(e, this.map.coordType, this.innerDataMax));
|
|
1667
1670
|
}
|
|
1668
1671
|
setOptions(e) {
|
|
1669
|
-
const r =
|
|
1672
|
+
const r = Ke.toBaidu(e, this.map.coordType, e.maxIntensity ?? this.innerDataMax);
|
|
1670
1673
|
e.data !== this.inner.data ? this.inner.setDataSet(r.data) : e.maxIntensity && (this.innerDataMax = e.maxIntensity), this.inner.setOptions(r);
|
|
1671
1674
|
}
|
|
1672
1675
|
remove() {
|
|
@@ -1694,8 +1697,8 @@ const Se = class Se extends Br {
|
|
|
1694
1697
|
// {@template google_map_normal_gcj02}
|
|
1695
1698
|
// google地图的普通地图, 在国内其实上是gcj02坐标, 卫星地图是wgs84坐标, 因为这里打开的是基础地图, 故使用gcj02
|
|
1696
1699
|
// {@endtemplate}
|
|
1697
|
-
origin: te.toString(t,
|
|
1698
|
-
destination: te.toString(e,
|
|
1700
|
+
origin: te.toString(t, R.gcj02),
|
|
1701
|
+
destination: te.toString(e, R.gcj02),
|
|
1699
1702
|
travelmode: r
|
|
1700
1703
|
});
|
|
1701
1704
|
}
|
|
@@ -1704,7 +1707,7 @@ const Se = class Se extends Br {
|
|
|
1704
1707
|
return Le(Se.BASE_URL, "search/", {
|
|
1705
1708
|
api: "1",
|
|
1706
1709
|
// {@macro google_map_normal_gcj02}
|
|
1707
|
-
query: te.toString(t,
|
|
1710
|
+
query: te.toString(t, R.gcj02)
|
|
1708
1711
|
});
|
|
1709
1712
|
}
|
|
1710
1713
|
};
|
|
@@ -1716,13 +1719,13 @@ const ge = class ge extends Br {
|
|
|
1716
1719
|
* @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
|
|
1717
1720
|
* */
|
|
1718
1721
|
directions(t, e, r = "driving") {
|
|
1719
|
-
const s = te.getCoordType(e) ?? te.getCoordType(t) ??
|
|
1722
|
+
const s = te.getCoordType(e) ?? te.getCoordType(t) ?? R.bd09, n = te.toString(e, s);
|
|
1720
1723
|
return Le(ge.BASE_URL, "direction", {
|
|
1721
1724
|
// baidu地图, 一定要有起点, 故这里用终点当起点, 防止导航失败
|
|
1722
1725
|
origin: te.toString(t, s) ?? (typeof e != "string" ? `name:请选择起点|latlng:${n}` : n),
|
|
1723
1726
|
destination: n,
|
|
1724
1727
|
// 默认就是bd09
|
|
1725
|
-
coord_type: s ===
|
|
1728
|
+
coord_type: s === R.bd09 ? void 0 : s,
|
|
1726
1729
|
mode: r,
|
|
1727
1730
|
output: "html",
|
|
1728
1731
|
region: "中国",
|
|
@@ -1736,7 +1739,7 @@ const ge = class ge extends Br {
|
|
|
1736
1739
|
* 显示经纬度, {@link markerApi}中途跳转的url, 一定能够定位到
|
|
1737
1740
|
* */
|
|
1738
1741
|
latlngApi(t) {
|
|
1739
|
-
const e = t.to(
|
|
1742
|
+
const e = t.to(R.bd09);
|
|
1740
1743
|
return new URL(`https://map.baidu.com/?latlng=${e.lat},${e.lng}`);
|
|
1741
1744
|
}
|
|
1742
1745
|
/**
|
|
@@ -1746,7 +1749,7 @@ const ge = class ge extends Br {
|
|
|
1746
1749
|
markerApi(t, e, r) {
|
|
1747
1750
|
return Le(ge.BASE_URL, "marker", {
|
|
1748
1751
|
location: `${t.lat},${t.lng}`,
|
|
1749
|
-
coord_type: t.coord ===
|
|
1752
|
+
coord_type: t.coord === R.bd09 ? void 0 : t.coord,
|
|
1750
1753
|
title: e,
|
|
1751
1754
|
content: r,
|
|
1752
1755
|
output: "html",
|
|
@@ -1764,7 +1767,7 @@ const ge = class ge extends Br {
|
|
|
1764
1767
|
} : {
|
|
1765
1768
|
location: `${t.lat},${t.lng}`,
|
|
1766
1769
|
// 默认就是bd09
|
|
1767
|
-
coord_type: t.coord ===
|
|
1770
|
+
coord_type: t.coord === R.bd09 ? void 0 : t.coord
|
|
1768
1771
|
},
|
|
1769
1772
|
output: "html",
|
|
1770
1773
|
src: pt()
|
|
@@ -2674,7 +2677,7 @@ var Sr = { exports: {} };
|
|
|
2674
2677
|
});
|
|
2675
2678
|
})(Sr);
|
|
2676
2679
|
var Ei = Sr.exports;
|
|
2677
|
-
const hr = /* @__PURE__ */
|
|
2680
|
+
const hr = /* @__PURE__ */ ot(Ei);
|
|
2678
2681
|
var kr = function(i, t, e) {
|
|
2679
2682
|
t = Pi(t);
|
|
2680
2683
|
var r = i.pointToPixel(t.getNorthEast()), s = i.pointToPixel(t.getSouthWest());
|
|
@@ -2682,9 +2685,9 @@ var kr = function(i, t, e) {
|
|
|
2682
2685
|
var n = i.pixelToPoint(r), a = i.pixelToPoint(s);
|
|
2683
2686
|
return new BMap.Bounds(a, n);
|
|
2684
2687
|
}, Pi = function(i) {
|
|
2685
|
-
var t =
|
|
2688
|
+
var t = Ue(i.getNorthEast().lng, -180, 180), e = Ue(i.getSouthWest().lng, -180, 180), r = Ue(i.getNorthEast().lat, -74, 74), s = Ue(i.getSouthWest().lat, -74, 74);
|
|
2686
2689
|
return new BMap.Bounds(new BMap.Point(e, s), new BMap.Point(t, r));
|
|
2687
|
-
},
|
|
2690
|
+
}, Ue = function(i, t, e) {
|
|
2688
2691
|
return t && (i = Math.max(i, t)), e && (i = Math.min(i, e)), i;
|
|
2689
2692
|
}, Ar = function(i) {
|
|
2690
2693
|
return Object.prototype.toString.call(i) === "[object Array]";
|
|
@@ -2932,7 +2935,7 @@ Y.prototype.getBounds = function() {
|
|
|
2932
2935
|
Y.prototype.getCenter = function() {
|
|
2933
2936
|
return this._center;
|
|
2934
2937
|
};
|
|
2935
|
-
var
|
|
2938
|
+
var Je;
|
|
2936
2939
|
((i) => {
|
|
2937
2940
|
function t(r) {
|
|
2938
2941
|
return {
|
|
@@ -2957,7 +2960,7 @@ var Xe;
|
|
|
2957
2960
|
};
|
|
2958
2961
|
}
|
|
2959
2962
|
i.toGoogle = e;
|
|
2960
|
-
})(
|
|
2963
|
+
})(Je || (Je = {}));
|
|
2961
2964
|
class Rr {
|
|
2962
2965
|
constructor(t) {
|
|
2963
2966
|
this.map = t;
|
|
@@ -2995,7 +2998,7 @@ class Li extends Rr {
|
|
|
2995
2998
|
maxZoom: r.maxZoom,
|
|
2996
2999
|
minClusterSize: r.minClusterSize,
|
|
2997
3000
|
isAverageCenter: r.averageCenter,
|
|
2998
|
-
styles: (n = r.styles) == null ? void 0 : n.map((a) =>
|
|
3001
|
+
styles: (n = r.styles) == null ? void 0 : n.map((a) => Je.toBaidu(a)),
|
|
2999
3002
|
zIndex: r.zIndex
|
|
3000
3003
|
});
|
|
3001
3004
|
const s = r.stylesIndexCalculator;
|
|
@@ -3019,7 +3022,7 @@ class Bi extends Rr {
|
|
|
3019
3022
|
maxZoom: r.maxZoom,
|
|
3020
3023
|
minimumClusterSize: r.minClusterSize,
|
|
3021
3024
|
averageCenter: r.averageCenter,
|
|
3022
|
-
styles: (a = r.styles) == null ? void 0 : a.map((c) =>
|
|
3025
|
+
styles: (a = r.styles) == null ? void 0 : a.map((c) => Je.toGoogle(c)),
|
|
3023
3026
|
zIndex: r.zIndex
|
|
3024
3027
|
}
|
|
3025
3028
|
);
|
|
@@ -3318,7 +3321,7 @@ _e.all = function(t, e) {
|
|
|
3318
3321
|
}, {});
|
|
3319
3322
|
};
|
|
3320
3323
|
var Yi = _e, qi = Yi;
|
|
3321
|
-
const Gr = /* @__PURE__ */
|
|
3324
|
+
const Gr = /* @__PURE__ */ ot(qi);
|
|
3322
3325
|
/*!
|
|
3323
3326
|
* isobject <https://github.com/jonschlinkert/isobject>
|
|
3324
3327
|
*
|
|
@@ -3450,7 +3453,7 @@ class Gt extends Wr {
|
|
|
3450
3453
|
this.innerOverlay.setVisible(t);
|
|
3451
3454
|
}
|
|
3452
3455
|
}
|
|
3453
|
-
class
|
|
3456
|
+
class ht extends Wr {
|
|
3454
3457
|
constructor(t, e, r) {
|
|
3455
3458
|
super(t, e), this.map = r;
|
|
3456
3459
|
}
|
|
@@ -3472,7 +3475,7 @@ class lt extends Wr {
|
|
|
3472
3475
|
return t !== void 0 && (t || this.setVisible(!1)), this;
|
|
3473
3476
|
}
|
|
3474
3477
|
}
|
|
3475
|
-
const ke = class ke extends
|
|
3478
|
+
const ke = class ke extends ht {
|
|
3476
3479
|
constructor(t, e, r, s) {
|
|
3477
3480
|
super(t, e, r), this.state = s;
|
|
3478
3481
|
}
|
|
@@ -3506,7 +3509,7 @@ const ke = class ke extends lt {
|
|
|
3506
3509
|
*/
|
|
3507
3510
|
m(ke, "OPACITY_DELTA", 1e-3);
|
|
3508
3511
|
let j = ke;
|
|
3509
|
-
class
|
|
3512
|
+
class ct extends Gt {
|
|
3510
3513
|
isEditable() {
|
|
3511
3514
|
return this.innerOverlay.getEditable();
|
|
3512
3515
|
}
|
|
@@ -3566,7 +3569,7 @@ class Zt extends j {
|
|
|
3566
3569
|
}, 0), n;
|
|
3567
3570
|
}
|
|
3568
3571
|
createDelegate() {
|
|
3569
|
-
return this.eventHubDelegate = new
|
|
3572
|
+
return this.eventHubDelegate = new at(super.createDelegate(), {
|
|
3570
3573
|
types: ["radius-changed", "center-changed"],
|
|
3571
3574
|
onListen: (e) => {
|
|
3572
3575
|
e === "radius-changed" ? (this.prevRadius = this.innerOverlay.getRadius(), this.innerOverlay.addEventListener("lineupdate", this.onRadiusChanged)) : (this.prevCenter = this.innerOverlay.getCenter(), this.innerOverlay.addEventListener("lineupdate", this.onCenterChanged));
|
|
@@ -3591,7 +3594,7 @@ class Zt extends j {
|
|
|
3591
3594
|
return this.innerOverlay.getRadius();
|
|
3592
3595
|
}
|
|
3593
3596
|
}
|
|
3594
|
-
class Wt extends
|
|
3597
|
+
class Wt extends ct {
|
|
3595
3598
|
static create(t) {
|
|
3596
3599
|
const e = this.coordType, r = new google.maps.Circle({
|
|
3597
3600
|
center: t.center.toGoogle(e),
|
|
@@ -3804,7 +3807,7 @@ class jt extends Ht {
|
|
|
3804
3807
|
this.inner.setPosition(e.toGoogle(this.map.coordType));
|
|
3805
3808
|
}
|
|
3806
3809
|
}
|
|
3807
|
-
class Ft extends
|
|
3810
|
+
class Ft extends ht {
|
|
3808
3811
|
constructor(t, e, r) {
|
|
3809
3812
|
super(t, e, r), this.baiduMap = r;
|
|
3810
3813
|
}
|
|
@@ -4092,7 +4095,7 @@ var Te;
|
|
|
4092
4095
|
}
|
|
4093
4096
|
i.toElement = e;
|
|
4094
4097
|
})(Te || (Te = {}));
|
|
4095
|
-
class Yt extends
|
|
4098
|
+
class Yt extends ht {
|
|
4096
4099
|
constructor(e, r, s, n) {
|
|
4097
4100
|
super(e, r, s);
|
|
4098
4101
|
m(this, "icon");
|
|
@@ -4224,11 +4227,11 @@ class qt extends Gt {
|
|
|
4224
4227
|
this.innerOverlay.setOffset(t);
|
|
4225
4228
|
}
|
|
4226
4229
|
}
|
|
4227
|
-
const
|
|
4228
|
-
toGoogle: (i) => "url" in i ?
|
|
4229
|
-
toBaidu: (i) => "url" in i ?
|
|
4230
|
+
const Qe = {
|
|
4231
|
+
toGoogle: (i) => "url" in i ? et.toGoogle(i) : Me.toGoogle(i),
|
|
4232
|
+
toBaidu: (i) => "url" in i ? et.toBaidu(i) : Me.toBaidu(i)
|
|
4230
4233
|
};
|
|
4231
|
-
var
|
|
4234
|
+
var et;
|
|
4232
4235
|
((i) => {
|
|
4233
4236
|
function t(r) {
|
|
4234
4237
|
return {
|
|
@@ -4252,7 +4255,7 @@ var Qe;
|
|
|
4252
4255
|
});
|
|
4253
4256
|
}
|
|
4254
4257
|
i.toBaidu = e;
|
|
4255
|
-
})(
|
|
4258
|
+
})(et || (et = {}));
|
|
4256
4259
|
var Me;
|
|
4257
4260
|
((i) => {
|
|
4258
4261
|
function t(r) {
|
|
@@ -4292,7 +4295,7 @@ const _n = {
|
|
|
4292
4295
|
FORWARD_CLOSED_ARROW: { baidu: () => BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW, google: () => google.maps.SymbolPath.FORWARD_CLOSED_ARROW },
|
|
4293
4296
|
FORWARD_OPEN_ARROW: { baidu: () => BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW, google: () => google.maps.SymbolPath.FORWARD_OPEN_ARROW }
|
|
4294
4297
|
};
|
|
4295
|
-
var
|
|
4298
|
+
var tt;
|
|
4296
4299
|
((i) => {
|
|
4297
4300
|
function t(r) {
|
|
4298
4301
|
return {
|
|
@@ -4312,15 +4315,15 @@ var et;
|
|
|
4312
4315
|
);
|
|
4313
4316
|
}
|
|
4314
4317
|
i.toBaidu = e;
|
|
4315
|
-
})(
|
|
4316
|
-
class Ge extends
|
|
4318
|
+
})(tt || (tt = {}));
|
|
4319
|
+
class Ge extends ht {
|
|
4317
4320
|
constructor(t, e, r, s) {
|
|
4318
4321
|
super(t, e, r), this.state = s;
|
|
4319
4322
|
}
|
|
4320
4323
|
static create(t) {
|
|
4321
4324
|
const e = this.coordType, r = t.icon, s = {
|
|
4322
4325
|
title: t.title,
|
|
4323
|
-
icon: r &&
|
|
4326
|
+
icon: r && Qe.toBaidu(r),
|
|
4324
4327
|
enableClicking: t.clickable,
|
|
4325
4328
|
enableDragging: t.draggable,
|
|
4326
4329
|
// baidu的raiseOnDrag属性, 默认为false, 而我们的options.crossOnDrag默认为true, 故这里需要转换下
|
|
@@ -4345,7 +4348,7 @@ class Ge extends lt {
|
|
|
4345
4348
|
return this.innerOverlay.getTitle();
|
|
4346
4349
|
}
|
|
4347
4350
|
setIcon(t) {
|
|
4348
|
-
const e =
|
|
4351
|
+
const e = Qe.toBaidu(t);
|
|
4349
4352
|
this.innerOverlay.setIcon(e);
|
|
4350
4353
|
const r = this.getLabel();
|
|
4351
4354
|
r && r.attachIcon(e);
|
|
@@ -4394,7 +4397,7 @@ class Kt extends Gt {
|
|
|
4394
4397
|
title: e.title,
|
|
4395
4398
|
zIndex: e.zIndex,
|
|
4396
4399
|
visible: e.visible,
|
|
4397
|
-
icon: s &&
|
|
4400
|
+
icon: s && Qe.toGoogle(s),
|
|
4398
4401
|
clickable: e.clickable,
|
|
4399
4402
|
draggable: e.draggable,
|
|
4400
4403
|
// google的crossOnDrag和我们的crossOnDrag是匹配的, 不需要转换
|
|
@@ -4418,7 +4421,7 @@ class Kt extends Gt {
|
|
|
4418
4421
|
return this.innerOverlay.getTitle() || "";
|
|
4419
4422
|
}
|
|
4420
4423
|
setIcon(e) {
|
|
4421
|
-
this.innerOverlay.setIcon(
|
|
4424
|
+
this.innerOverlay.setIcon(Qe.toGoogle(e));
|
|
4422
4425
|
}
|
|
4423
4426
|
getIcon() {
|
|
4424
4427
|
return this.innerOverlay.getIcon();
|
|
@@ -4481,7 +4484,7 @@ class Xt extends j {
|
|
|
4481
4484
|
this.isDoingSetPath = !0, this.innerOverlay.setPath(e), this.isDoingSetPath = !1;
|
|
4482
4485
|
}
|
|
4483
4486
|
createDelegate() {
|
|
4484
|
-
return this.eventHubDelegate = new
|
|
4487
|
+
return this.eventHubDelegate = new at(super.createDelegate(), {
|
|
4485
4488
|
types: [this.pathEditedEventType],
|
|
4486
4489
|
onListen: () => {
|
|
4487
4490
|
this.prevPath = this.innerOverlay.getPath(), this.innerOverlay.addEventListener("lineupdate", this.onLineUpdate);
|
|
@@ -4505,7 +4508,7 @@ class Jt extends Xt {
|
|
|
4505
4508
|
strokeColor: e.strokeColor,
|
|
4506
4509
|
strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + j.OPACITY_DELTA : void 0,
|
|
4507
4510
|
strokeWeight: e.strokeWeight,
|
|
4508
|
-
icons: (n = e.icons) == null ? void 0 : n.map(
|
|
4511
|
+
icons: (n = e.icons) == null ? void 0 : n.map(tt.toBaidu)
|
|
4509
4512
|
});
|
|
4510
4513
|
return new Jt(s, r, this, {
|
|
4511
4514
|
editable: !!e.editable,
|
|
@@ -4535,7 +4538,7 @@ class Jt extends Xt {
|
|
|
4535
4538
|
}).forEach((s) => this.map.innerMap.removeOverlay(s));
|
|
4536
4539
|
}
|
|
4537
4540
|
}
|
|
4538
|
-
class Qt extends
|
|
4541
|
+
class Qt extends ct {
|
|
4539
4542
|
constructor() {
|
|
4540
4543
|
super(...arguments);
|
|
4541
4544
|
m(this, "pathChangedListeners");
|
|
@@ -4551,7 +4554,7 @@ class Qt extends ht {
|
|
|
4551
4554
|
strokeOpacity: e.strokeOpacity,
|
|
4552
4555
|
strokeWeight: e.strokeWeight,
|
|
4553
4556
|
visible: e.visible,
|
|
4554
|
-
icons: (n = e.icons) == null ? void 0 : n.map(
|
|
4557
|
+
icons: (n = e.icons) == null ? void 0 : n.map(tt.toGoogle)
|
|
4555
4558
|
});
|
|
4556
4559
|
return new Qt(s, r, this);
|
|
4557
4560
|
}
|
|
@@ -4567,7 +4570,7 @@ class Qt extends ht {
|
|
|
4567
4570
|
(e = this.pathChangedListeners) == null || e.forEach((r) => r.remove()), this.pathChangedListeners = void 0;
|
|
4568
4571
|
}
|
|
4569
4572
|
createDelegate() {
|
|
4570
|
-
return this.eventHubDelegate = new
|
|
4573
|
+
return this.eventHubDelegate = new at(super.createDelegate(), {
|
|
4571
4574
|
types: ["path-edited"],
|
|
4572
4575
|
onListen: () => this.setupPathChangedListeners(),
|
|
4573
4576
|
onCancel: () => this.clearPathChangedListeners()
|
|
@@ -4610,7 +4613,7 @@ class er extends Xt {
|
|
|
4610
4613
|
e.length > 1 && console.warn("baidu不支持多path, 只会显示paths[0]"), this.coordType = this.map.coordType, this.setPathInternal((e[0] || []).map((r) => r.toBaidu(this.coordType)));
|
|
4611
4614
|
}
|
|
4612
4615
|
}
|
|
4613
|
-
class tr extends
|
|
4616
|
+
class tr extends ct {
|
|
4614
4617
|
constructor() {
|
|
4615
4618
|
super(...arguments);
|
|
4616
4619
|
m(this, "pathChangedListeners");
|
|
@@ -4644,7 +4647,7 @@ class tr extends ht {
|
|
|
4644
4647
|
(e = this.pathChangedListeners) == null || e.forEach((r) => r.remove()), this.pathChangedListeners = void 0;
|
|
4645
4648
|
}
|
|
4646
4649
|
createDelegate() {
|
|
4647
|
-
return this.eventHubDelegate = new
|
|
4650
|
+
return this.eventHubDelegate = new at(super.createDelegate(), {
|
|
4648
4651
|
types: ["paths-edited"],
|
|
4649
4652
|
onListen: () => this.setupPathChangedListeners(),
|
|
4650
4653
|
onCancel: () => this.clearPathChangedListeners()
|
|
@@ -4724,7 +4727,7 @@ class rr extends Xt {
|
|
|
4724
4727
|
}) : this.setPathInternal(r.map((s) => s.toBaidu(this.coordType)));
|
|
4725
4728
|
}
|
|
4726
4729
|
}
|
|
4727
|
-
class ir extends
|
|
4730
|
+
class ir extends ct {
|
|
4728
4731
|
static create(t) {
|
|
4729
4732
|
const e = this.coordType, r = new google.maps.Rectangle({
|
|
4730
4733
|
bounds: t.bounds.toGoogle(e),
|
|
@@ -5101,7 +5104,7 @@ class ns extends Nt {
|
|
|
5101
5104
|
return new Mt(e);
|
|
5102
5105
|
}
|
|
5103
5106
|
}
|
|
5104
|
-
const
|
|
5107
|
+
const rt = ["3.0"], os = {
|
|
5105
5108
|
baidu: {
|
|
5106
5109
|
version: "3.0",
|
|
5107
5110
|
// 在build时会被静态替换, 导致使用者不能无法设置它
|
|
@@ -5116,7 +5119,7 @@ const tt = ["3.0"], os = {
|
|
|
5116
5119
|
libraries: ["places", "visualization"]
|
|
5117
5120
|
},
|
|
5118
5121
|
here: {
|
|
5119
|
-
version:
|
|
5122
|
+
version: rt[0],
|
|
5120
5123
|
key: ""
|
|
5121
5124
|
}
|
|
5122
5125
|
};
|
|
@@ -5135,7 +5138,7 @@ class ls extends Nt {
|
|
|
5135
5138
|
m(this, "defaultLayers");
|
|
5136
5139
|
this.mapOptions = r;
|
|
5137
5140
|
const s = jr().here;
|
|
5138
|
-
|
|
5141
|
+
rt.includes(s.version) || B(`不支持${s.version}, HereMap当前只支持如下版本: ${rt}`);
|
|
5139
5142
|
const n = new H.service.Platform({
|
|
5140
5143
|
app_id: s.key.split(",")[0],
|
|
5141
5144
|
app_code: s.key.split(",")[1]
|
|
@@ -5149,7 +5152,7 @@ class ls extends Nt {
|
|
|
5149
5152
|
return this.map;
|
|
5150
5153
|
}
|
|
5151
5154
|
get coordType() {
|
|
5152
|
-
return
|
|
5155
|
+
return R.wgs84;
|
|
5153
5156
|
}
|
|
5154
5157
|
getCenter() {
|
|
5155
5158
|
return O.fromHere(this.map.getCenter(), this.coordType);
|
|
@@ -5330,7 +5333,7 @@ function us({ type: i, config: t }) {
|
|
|
5330
5333
|
vt(i);
|
|
5331
5334
|
}
|
|
5332
5335
|
}
|
|
5333
|
-
function we(i, t =
|
|
5336
|
+
function we(i, t = rt[0]) {
|
|
5334
5337
|
return `https://js.api.here.com/v3/${t}/mapsjs-${i}.js`;
|
|
5335
5338
|
}
|
|
5336
5339
|
function ps(i) {
|
|
@@ -5417,10 +5420,10 @@ function fs(i) {
|
|
|
5417
5420
|
function Tn(i) {
|
|
5418
5421
|
return fs(i);
|
|
5419
5422
|
}
|
|
5420
|
-
function
|
|
5423
|
+
function dt() {
|
|
5421
5424
|
return ft();
|
|
5422
5425
|
}
|
|
5423
|
-
function
|
|
5426
|
+
function Ye(i, t) {
|
|
5424
5427
|
const e = i.$options[t];
|
|
5425
5428
|
if (e)
|
|
5426
5429
|
for (const r of e)
|
|
@@ -5472,18 +5475,18 @@ const Cn = () => {
|
|
|
5472
5475
|
}, sr = "$map", Ze = "onCreate", We = "onDestroy", $ = P({
|
|
5473
5476
|
inject: [sr],
|
|
5474
5477
|
mounted() {
|
|
5475
|
-
|
|
5478
|
+
Ye(this, Ze);
|
|
5476
5479
|
},
|
|
5477
5480
|
beforeUnmount() {
|
|
5478
|
-
|
|
5481
|
+
Ye(this, We);
|
|
5479
5482
|
},
|
|
5480
5483
|
methods: {
|
|
5481
5484
|
recreate() {
|
|
5482
|
-
|
|
5485
|
+
Ye(this, We), Ye(this, Ze);
|
|
5483
5486
|
}
|
|
5484
5487
|
},
|
|
5485
5488
|
render() {
|
|
5486
|
-
return
|
|
5489
|
+
return dt();
|
|
5487
5490
|
}
|
|
5488
5491
|
}), ys = P({
|
|
5489
5492
|
name: "tg-map",
|
|
@@ -5658,7 +5661,7 @@ function _s(i, t, e, r, s, n) {
|
|
|
5658
5661
|
return he(), ce("div", He({ class: "tg-map" }, i.attrs.binds), [
|
|
5659
5662
|
Xr("div", {
|
|
5660
5663
|
ref: "map",
|
|
5661
|
-
class:
|
|
5664
|
+
class: st({
|
|
5662
5665
|
"tg-map__map": !0,
|
|
5663
5666
|
[`tg-map__map--hide-logo-${i.type}`]: i.hideLogo
|
|
5664
5667
|
})
|
|
@@ -5711,7 +5714,7 @@ const Ts = P({
|
|
|
5711
5714
|
});
|
|
5712
5715
|
function Ms(i, t, e, r, s, n) {
|
|
5713
5716
|
return he(), ce("div", {
|
|
5714
|
-
class:
|
|
5717
|
+
class: st(i.$options.name),
|
|
5715
5718
|
style: Jr({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
|
|
5716
5719
|
}, [
|
|
5717
5720
|
K(i.$slots, "default")
|
|
@@ -5748,7 +5751,7 @@ const Os = /* @__PURE__ */ se(Ts, [["render", Ms]]), Cs = P({
|
|
|
5748
5751
|
});
|
|
5749
5752
|
function ws(i, t, e, r, s, n) {
|
|
5750
5753
|
return he(), ce("div", {
|
|
5751
|
-
class:
|
|
5754
|
+
class: st(i.$options.name)
|
|
5752
5755
|
}, [
|
|
5753
5756
|
K(i.$slots, "default")
|
|
5754
5757
|
], 2);
|
|
@@ -5856,7 +5859,7 @@ const Ls = P({
|
|
|
5856
5859
|
e.removeControl(t);
|
|
5857
5860
|
}), Ae(() => i.position, (n) => {
|
|
5858
5861
|
t.setPosition(n);
|
|
5859
|
-
}),
|
|
5862
|
+
}), dt;
|
|
5860
5863
|
}
|
|
5861
5864
|
}), Bs = P({
|
|
5862
5865
|
name: "tg-zoom-control",
|
|
@@ -5872,7 +5875,7 @@ const Ls = P({
|
|
|
5872
5875
|
e.removeControl(t);
|
|
5873
5876
|
}), Ae(() => i.position, (n) => {
|
|
5874
5877
|
t.setPosition(n);
|
|
5875
|
-
}),
|
|
5878
|
+
}), dt;
|
|
5876
5879
|
}
|
|
5877
5880
|
}), Is = P({
|
|
5878
5881
|
name: "tg-heatmap",
|
|
@@ -5893,7 +5896,7 @@ const Ls = P({
|
|
|
5893
5896
|
}), Ae(() => i.data, (n) => s.setData(n)), Ae(
|
|
5894
5897
|
[() => i.maxIntensity, () => i.gradient, () => i.opacity, () => i.radius],
|
|
5895
5898
|
() => s.setOptions(i)
|
|
5896
|
-
),
|
|
5899
|
+
), dt;
|
|
5897
5900
|
}
|
|
5898
5901
|
}), Ss = P({
|
|
5899
5902
|
name: "tg-marker-clusterer",
|
|
@@ -5961,7 +5964,7 @@ const Ls = P({
|
|
|
5961
5964
|
});
|
|
5962
5965
|
function ks(i, t, e, r, s, n) {
|
|
5963
5966
|
return he(), ce("div", {
|
|
5964
|
-
class:
|
|
5967
|
+
class: st(i.$options.name)
|
|
5965
5968
|
}, [
|
|
5966
5969
|
K(i.$slots, "default")
|
|
5967
5970
|
], 2);
|
|
@@ -6015,7 +6018,7 @@ const Ur = /* @__PURE__ */ se(Ss, [["render", ks]]), As = P({
|
|
|
6015
6018
|
center(i) {
|
|
6016
6019
|
if (this.emittedCenter != null) {
|
|
6017
6020
|
const t = this.emittedCenter;
|
|
6018
|
-
if (this.emittedCenter = void 0, t ===
|
|
6021
|
+
if (this.emittedCenter = void 0, t === nt(i))
|
|
6019
6022
|
return;
|
|
6020
6023
|
}
|
|
6021
6024
|
this.overlay.setCenter(i);
|
|
@@ -6155,7 +6158,7 @@ const Ns = /* @__PURE__ */ se($s, [["render", zs]]), Gs = P({
|
|
|
6155
6158
|
position(i) {
|
|
6156
6159
|
if (this.emittedPosition != null) {
|
|
6157
6160
|
const t = this.emittedPosition;
|
|
6158
|
-
if (this.emittedPosition = void 0, t ===
|
|
6161
|
+
if (this.emittedPosition = void 0, t === nt(i))
|
|
6159
6162
|
return;
|
|
6160
6163
|
}
|
|
6161
6164
|
this.marker.setPosition(i);
|
|
@@ -6223,7 +6226,7 @@ const Ns = /* @__PURE__ */ se($s, [["render", zs]]), Gs = P({
|
|
|
6223
6226
|
function Zs(i, t, e, r, s, n) {
|
|
6224
6227
|
return K(i.$slots, "default");
|
|
6225
6228
|
}
|
|
6226
|
-
const
|
|
6229
|
+
const ut = /* @__PURE__ */ se(Gs, [["render", Zs]]), Ws = P({
|
|
6227
6230
|
name: "tg-info-box",
|
|
6228
6231
|
mixins: [$],
|
|
6229
6232
|
inheritAttrs: !1,
|
|
@@ -6286,7 +6289,7 @@ const dt = /* @__PURE__ */ se(Gs, [["render", Zs]]), Ws = P({
|
|
|
6286
6289
|
return this.$el;
|
|
6287
6290
|
},
|
|
6288
6291
|
$marker() {
|
|
6289
|
-
return Et(
|
|
6292
|
+
return Et(ut, this.$parent, Ve);
|
|
6290
6293
|
},
|
|
6291
6294
|
open(i) {
|
|
6292
6295
|
this.overlay.open(i);
|
|
@@ -6344,7 +6347,7 @@ const Vs = /* @__PURE__ */ se(Ws, [["render", Hs]]), js = P({
|
|
|
6344
6347
|
return this.$el;
|
|
6345
6348
|
},
|
|
6346
6349
|
$marker() {
|
|
6347
|
-
return Et(
|
|
6350
|
+
return Et(ut, this.$parent, Ve);
|
|
6348
6351
|
},
|
|
6349
6352
|
getOptions() {
|
|
6350
6353
|
return {
|
|
@@ -6419,7 +6422,7 @@ const Us = /* @__PURE__ */ se(js, [["render", Fs]]), Ys = P({
|
|
|
6419
6422
|
return (i = this.$marker()) == null ? void 0 : i.marker;
|
|
6420
6423
|
},
|
|
6421
6424
|
$marker() {
|
|
6422
|
-
return Et(
|
|
6425
|
+
return Et(ut, this.$parent, Ve);
|
|
6423
6426
|
},
|
|
6424
6427
|
getOptions() {
|
|
6425
6428
|
return {
|
|
@@ -6474,7 +6477,7 @@ const Ks = /* @__PURE__ */ se(Ys, [["render", qs]]), Xs = P({
|
|
|
6474
6477
|
handler(i) {
|
|
6475
6478
|
if (this.emittedPaths != null) {
|
|
6476
6479
|
const t = this.emittedPaths;
|
|
6477
|
-
if (this.emittedPaths = void 0, t.length === i.length && t.every((e, r) => e ===
|
|
6480
|
+
if (this.emittedPaths = void 0, t.length === i.length && t.every((e, r) => e === nt(i[r])))
|
|
6478
6481
|
return;
|
|
6479
6482
|
}
|
|
6480
6483
|
this.overlay.setPaths(i);
|
|
@@ -6542,7 +6545,7 @@ const Ks = /* @__PURE__ */ se(Ys, [["render", qs]]), Xs = P({
|
|
|
6542
6545
|
handler(i) {
|
|
6543
6546
|
if (this.emittedPath != null) {
|
|
6544
6547
|
const t = this.emittedPath;
|
|
6545
|
-
if (this.emittedPath = void 0, t ===
|
|
6548
|
+
if (this.emittedPath = void 0, t === nt(i))
|
|
6546
6549
|
return;
|
|
6547
6550
|
}
|
|
6548
6551
|
this.overlay.setPath(i);
|
|
@@ -6733,7 +6736,7 @@ var nn = { VITE_APP_DEV_KEY_BAIDU: "kXOq8Hg9BZbZEWAjXKuzd1oGreynup8h", VITE_APP_
|
|
|
6733
6736
|
const En = {
|
|
6734
6737
|
install(i, t) {
|
|
6735
6738
|
if (as(t), nn.VITE_FALSE) {
|
|
6736
|
-
const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Ve, "./TgMapWidget.vue": Os, "./controls/TgCustomControl.vue": xs, "./controls/TgMapTypeControl.vue": Es, "./controls/TgScaleControl.vue": Ps, "./controls/TgStreetViewControl.vue": Ls, "./controls/TgZoomControl.vue": Bs, "./extra/TgHeatmap.vue": Is, "./extra/TgMarkerClusterer.vue": Ur, "./layers/TgTrafficLayer.vue": As, "./overlays/TgCircle.vue": Ds, "./overlays/TgElementOverlay.vue": Ns, "./overlays/TgInfoBox.vue": Vs, "./overlays/TgInfoWindow.vue": Us, "./overlays/TgLabel.vue": Ks, "./overlays/TgMarker.vue":
|
|
6739
|
+
const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Ve, "./TgMapWidget.vue": Os, "./controls/TgCustomControl.vue": xs, "./controls/TgMapTypeControl.vue": Es, "./controls/TgScaleControl.vue": Ps, "./controls/TgStreetViewControl.vue": Ls, "./controls/TgZoomControl.vue": Bs, "./extra/TgHeatmap.vue": Is, "./extra/TgMarkerClusterer.vue": Ur, "./layers/TgTrafficLayer.vue": As, "./overlays/TgCircle.vue": Ds, "./overlays/TgElementOverlay.vue": Ns, "./overlays/TgInfoBox.vue": Vs, "./overlays/TgInfoWindow.vue": Us, "./overlays/TgLabel.vue": Ks, "./overlays/TgMarker.vue": ut, "./overlays/TgPolygon.vue": Xs, "./overlays/TgPolyline.vue": Js, "./overlays/TgRectangle.vue": Qs });
|
|
6737
6740
|
Object.keys(r).forEach((s) => {
|
|
6738
6741
|
const n = r[s];
|
|
6739
6742
|
i.component(n.name ?? B(`Tg开头的组件必须设置name: ${s}`), n);
|
|
@@ -6758,7 +6761,7 @@ export {
|
|
|
6758
6761
|
Ot as BaiduMapUrls,
|
|
6759
6762
|
Ge as BaiduMarker,
|
|
6760
6763
|
Li as BaiduMarkerClusterer,
|
|
6761
|
-
|
|
6764
|
+
ht as BaiduOverlay,
|
|
6762
6765
|
Si as BaiduPlacesService,
|
|
6763
6766
|
Xt as BaiduPolyShape,
|
|
6764
6767
|
er as BaiduPolygon,
|
|
@@ -6773,7 +6776,7 @@ export {
|
|
|
6773
6776
|
Pe as CachedValue,
|
|
6774
6777
|
A as ControlPosition,
|
|
6775
6778
|
U as ControlPositionConverter,
|
|
6776
|
-
|
|
6779
|
+
R as CoordType,
|
|
6777
6780
|
pi as CustomControl,
|
|
6778
6781
|
ts as ElementOverlay,
|
|
6779
6782
|
gi as EmptyControl,
|
|
@@ -6781,7 +6784,7 @@ export {
|
|
|
6781
6784
|
ee as GestureHandlingOptions,
|
|
6782
6785
|
_i as GoogleAutocomplete,
|
|
6783
6786
|
Wt as GoogleCircle,
|
|
6784
|
-
|
|
6787
|
+
lt as GoogleControl,
|
|
6785
6788
|
Oi as GoogleHeatmap,
|
|
6786
6789
|
Ut as GoogleInfoBoxOverlay,
|
|
6787
6790
|
jt as GoogleInfoWindow,
|
|
@@ -6799,8 +6802,8 @@ export {
|
|
|
6799
6802
|
Dt as GoogleStreetViewControl,
|
|
6800
6803
|
$t as GoogleZoomControl,
|
|
6801
6804
|
Lr as Heatmap,
|
|
6802
|
-
|
|
6803
|
-
|
|
6805
|
+
et as Icon,
|
|
6806
|
+
tt as IconSequence,
|
|
6804
6807
|
mn as ImageMapType,
|
|
6805
6808
|
Ht as InfoWindow,
|
|
6806
6809
|
Xi as InfoWindowModeValues,
|
|
@@ -6843,7 +6846,7 @@ export {
|
|
|
6843
6846
|
q as TgMapType,
|
|
6844
6847
|
Es as TgMapTypeControl,
|
|
6845
6848
|
Os as TgMapWidget,
|
|
6846
|
-
|
|
6849
|
+
ut as TgMarker,
|
|
6847
6850
|
Ur as TgMarkerClusterer,
|
|
6848
6851
|
Xs as TgPolygon,
|
|
6849
6852
|
Js as TgPolyline,
|
|
@@ -6853,13 +6856,13 @@ export {
|
|
|
6853
6856
|
As as TgTrafficLayer,
|
|
6854
6857
|
Bs as TgZoomControl,
|
|
6855
6858
|
mi as TrafficLayer,
|
|
6856
|
-
|
|
6859
|
+
Qe as UnionIcon,
|
|
6857
6860
|
me as assert,
|
|
6858
6861
|
vt as assertNever,
|
|
6859
|
-
|
|
6862
|
+
Ye as callHook,
|
|
6860
6863
|
bn as computedSaveOnThis,
|
|
6861
6864
|
hi as createAsyncSingleton,
|
|
6862
|
-
|
|
6865
|
+
dt as createEmptyVNode,
|
|
6863
6866
|
fs as createPropertyObject,
|
|
6864
6867
|
Tn as createPropertyObjectTyped,
|
|
6865
6868
|
pn as debug,
|