tg-map-vue3 3.8.3 → 3.8.5
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/dist/tg-map.js +170 -174
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +1 -1
- package/dist/tg-map.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/tg-map.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
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
|
|
6
|
-
function
|
|
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 it, renderSlot as K, normalizeStyle as Jr, getCurrentInstance as Qr, inject as ei, onMounted as ti, onBeforeUnmount as ri, toRaw as st, withDirectives as ii, vShow as si } from "vue";
|
|
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]);
|
|
9
9
|
});
|
|
@@ -237,7 +237,7 @@ function un(i) {
|
|
|
237
237
|
function pn(i) {
|
|
238
238
|
return i;
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function De(...i) {
|
|
241
241
|
}
|
|
242
242
|
function gn(i) {
|
|
243
243
|
return i != null;
|
|
@@ -357,7 +357,7 @@ const ut = "wgs84", R = class R {
|
|
|
357
357
|
};
|
|
358
358
|
m(R, "ZERO", R.create(0, 0));
|
|
359
359
|
let O = R;
|
|
360
|
-
const
|
|
360
|
+
const ne = class ne {
|
|
361
361
|
/**
|
|
362
362
|
* 不推荐直接创建LatLngBounds, sw和ne的大小关系可能没法保证, 推荐用LatLngBounds.Builder或者LatLngBounds.from等静态方法来创建
|
|
363
363
|
* @param sw 西南, lat/lng更小
|
|
@@ -373,7 +373,7 @@ const ae = class ae {
|
|
|
373
373
|
static fromArray(t) {
|
|
374
374
|
if (t.length === 0)
|
|
375
375
|
return;
|
|
376
|
-
const e = new
|
|
376
|
+
const e = new ne.Builder(t[0]);
|
|
377
377
|
for (let r = 1; r < t.length; r++)
|
|
378
378
|
e.include(t[r]);
|
|
379
379
|
return e.build();
|
|
@@ -382,13 +382,13 @@ const ae = class ae {
|
|
|
382
382
|
return this.fromArray(t) ?? B("positions中没有点");
|
|
383
383
|
}
|
|
384
384
|
static fromGoogle(t, e) {
|
|
385
|
-
return new
|
|
385
|
+
return new ne(
|
|
386
386
|
O.fromGoogle(t.getSouthWest(), e),
|
|
387
387
|
O.fromGoogle(t.getNorthEast(), e)
|
|
388
388
|
);
|
|
389
389
|
}
|
|
390
390
|
static fromBaidu(t, e) {
|
|
391
|
-
return new
|
|
391
|
+
return new ne(
|
|
392
392
|
O.fromBaidu(t.getSouthWest(), e),
|
|
393
393
|
O.fromBaidu(t.getNorthEast(), e)
|
|
394
394
|
);
|
|
@@ -401,7 +401,7 @@ const ae = class ae {
|
|
|
401
401
|
}
|
|
402
402
|
contains(t) {
|
|
403
403
|
const { lat: e, lng: r } = t.to(this.coord);
|
|
404
|
-
return this.sw.lat <= e && e <= this.ne.lat &&
|
|
404
|
+
return this.sw.lat <= e && e <= this.ne.lat && ne.isBetweenLng(this.sw.lng, this.ne.lng, r);
|
|
405
405
|
}
|
|
406
406
|
getCenter() {
|
|
407
407
|
if (this.sw.equals(this.ne))
|
|
@@ -438,8 +438,8 @@ const ae = class ae {
|
|
|
438
438
|
return [this.sw.toBaidu(t), this.ne.toBaidu(t)];
|
|
439
439
|
}
|
|
440
440
|
};
|
|
441
|
-
m(
|
|
442
|
-
let X =
|
|
441
|
+
m(ne, "EMPTY", new ne(O.ZERO, O.ZERO));
|
|
442
|
+
let X = ne;
|
|
443
443
|
((i) => {
|
|
444
444
|
class t {
|
|
445
445
|
constructor(r) {
|
|
@@ -582,7 +582,7 @@ m(rt, "EVENT_TYPE_MAP", {
|
|
|
582
582
|
"map-dblclick": "dblclick"
|
|
583
583
|
});
|
|
584
584
|
let ye = rt;
|
|
585
|
-
const
|
|
585
|
+
const Ie = class Ie extends br {
|
|
586
586
|
addEventListener(t, e) {
|
|
587
587
|
const r = Ye(t, e);
|
|
588
588
|
if (this.eventMap.get(r)) {
|
|
@@ -597,16 +597,16 @@ const Se = class Se extends br {
|
|
|
597
597
|
};
|
|
598
598
|
n.point && (a.position = O.fromBaidu(n.point, this.coordTypeSupplier.coordType)), e.call(this.target, a);
|
|
599
599
|
};
|
|
600
|
-
this.inner.addEventListener(
|
|
600
|
+
this.inner.addEventListener(Ie.EVENT_TYPE_MAP[t] || t, s), this.eventMap.set(r, s);
|
|
601
601
|
}
|
|
602
602
|
removeEventListener(t, e) {
|
|
603
603
|
const r = Ye(t, e), s = this.eventMap.get(r);
|
|
604
|
-
s ? (this.inner.removeEventListener(
|
|
604
|
+
s ? (this.inner.removeEventListener(Ie.EVENT_TYPE_MAP[t] || t, s), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
|
|
605
605
|
}
|
|
606
606
|
};
|
|
607
607
|
// cSpell:words clickclose
|
|
608
608
|
// 事件类型映射, tg => baidu
|
|
609
|
-
m(
|
|
609
|
+
m(Ie, "EVENT_TYPE_MAP", {
|
|
610
610
|
drag: "dragging",
|
|
611
611
|
closeclick: "clickclose",
|
|
612
612
|
// baidu不支持contextmenu事件, 将其映射为rightclick
|
|
@@ -614,7 +614,7 @@ m(Se, "EVENT_TYPE_MAP", {
|
|
|
614
614
|
"zoom-changed": "zoomend",
|
|
615
615
|
"map-type-changed": "maptypechange"
|
|
616
616
|
});
|
|
617
|
-
let
|
|
617
|
+
let Re = Ie;
|
|
618
618
|
class Tr {
|
|
619
619
|
constructor() {
|
|
620
620
|
m(this, "typeMap", /* @__PURE__ */ new Map());
|
|
@@ -683,7 +683,7 @@ class ui {
|
|
|
683
683
|
return this.getOrNull(t, e) ?? B(`key(${e})不存在与valueMap(${this.getValueMap(t)})中`);
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
|
-
class
|
|
686
|
+
class Pe {
|
|
687
687
|
constructor(t) {
|
|
688
688
|
m(this, "value");
|
|
689
689
|
this.creator = t;
|
|
@@ -875,14 +875,14 @@ class W {
|
|
|
875
875
|
}
|
|
876
876
|
class mn {
|
|
877
877
|
constructor(t, e) {
|
|
878
|
-
m(this, "baiduLayerCached", new
|
|
878
|
+
m(this, "baiduLayerCached", new Pe(() => {
|
|
879
879
|
const t = new BMap.TileLayer({});
|
|
880
880
|
return t.getTilesUrl = (e, r) => {
|
|
881
881
|
const s = Math.pow(2, r - 1), n = e.x + s, a = s - 1 - e.y;
|
|
882
882
|
return this.options.getTileUrl({ x: n, y: a }, r);
|
|
883
883
|
}, t;
|
|
884
884
|
}));
|
|
885
|
-
m(this, "baiduMapTypeCached", new
|
|
885
|
+
m(this, "baiduMapTypeCached", new Pe(() => {
|
|
886
886
|
const t = new BMap.MapType(this.options.name, this.baiduLayerCached.get(), {
|
|
887
887
|
maxZoom: this.options.maxZoom,
|
|
888
888
|
minZoom: this.options.minZoom,
|
|
@@ -890,7 +890,7 @@ class mn {
|
|
|
890
890
|
});
|
|
891
891
|
return t.__baidu_map_type__ = this, t;
|
|
892
892
|
}));
|
|
893
|
-
m(this, "googleCached", new
|
|
893
|
+
m(this, "googleCached", new Pe(() => {
|
|
894
894
|
const t = new google.maps.ImageMapType({
|
|
895
895
|
getTileUrl: (e, r) => this.options.getTileUrl(e, r),
|
|
896
896
|
tileSize: new google.maps.Size(256, 256),
|
|
@@ -927,8 +927,8 @@ class mn {
|
|
|
927
927
|
}
|
|
928
928
|
class mi {
|
|
929
929
|
constructor() {
|
|
930
|
-
m(this, "baiduCache", new
|
|
931
|
-
m(this, "googleCache", new
|
|
930
|
+
m(this, "baiduCache", new Pe(() => new BMap.TrafficLayer()));
|
|
931
|
+
m(this, "googleCache", new Pe(() => new google.maps.TrafficLayer()));
|
|
932
932
|
}
|
|
933
933
|
asBaiduLayer() {
|
|
934
934
|
return this.baiduCache.get();
|
|
@@ -1044,7 +1044,7 @@ function fi(i) {
|
|
|
1044
1044
|
p[a] ? console.warn(s + " only loads once. Ignoring:", i) : p[a] = (_, ...M) => g.add(_) && T().then(() => p[a](_, ...M));
|
|
1045
1045
|
}
|
|
1046
1046
|
let vi, yi;
|
|
1047
|
-
const
|
|
1047
|
+
const ae = {
|
|
1048
1048
|
/** Google的坐标0点 */
|
|
1049
1049
|
get LATLNG_ZERO() {
|
|
1050
1050
|
return vi ?? (vi = new google.maps.LatLng({ lat: 0, lng: 0 }));
|
|
@@ -1087,7 +1087,7 @@ function xr(i, t) {
|
|
|
1087
1087
|
city: (e == null ? void 0 : e.city) ?? "",
|
|
1088
1088
|
id: i.place_id ?? "",
|
|
1089
1089
|
address: i.formatted_address ?? "",
|
|
1090
|
-
position: O.fromGoogle(((r = i.geometry) == null ? void 0 : r.location) ??
|
|
1090
|
+
position: O.fromGoogle(((r = i.geometry) == null ? void 0 : r.location) ?? ae.LATLNG_ZERO, t.coordType),
|
|
1091
1091
|
title: i.name ?? ""
|
|
1092
1092
|
};
|
|
1093
1093
|
}
|
|
@@ -1378,10 +1378,10 @@ var Pr = { exports: {} };
|
|
|
1378
1378
|
var l = this._renderBoundaries[0], u = this._renderBoundaries[1], v = this._renderBoundaries[2] - l, y = this._renderBoundaries[3] - u, C = this._width, w = this._height, E = this._opacity, S = this._maxOpacity, z = this._minOpacity, L = this._useGradientOpacity;
|
|
1379
1379
|
l < 0 && (l = 0), u < 0 && (u = 0), l + v > C && (v = C - l), u + y > w && (y = w - u);
|
|
1380
1380
|
for (var J = this.shadowCtx.getImageData(l, u, v, y), I = J.data, G = I.length, Q = this._palette, Z = 3; Z < G; Z += 4) {
|
|
1381
|
-
var je = I[Z],
|
|
1382
|
-
if (
|
|
1383
|
-
var
|
|
1384
|
-
E > 0 ?
|
|
1381
|
+
var je = I[Z], Oe = je * 4;
|
|
1382
|
+
if (Oe) {
|
|
1383
|
+
var Ce;
|
|
1384
|
+
E > 0 ? Ce = E : je < S ? je < z ? Ce = z : Ce = je : Ce = S, I[Z - 3] = Q[Oe], I[Z - 2] = Q[Oe + 1], I[Z - 1] = Q[Oe + 2], I[Z] = L ? Q[Oe + 3] : Ce;
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
1387
|
this.ctx.putImageData(J, l, u), this._renderBoundaries = [1e3, 1e3, 0, 0];
|
|
@@ -1678,7 +1678,7 @@ class Br {
|
|
|
1678
1678
|
this.options = t;
|
|
1679
1679
|
}
|
|
1680
1680
|
}
|
|
1681
|
-
function
|
|
1681
|
+
function Le(i, t, e) {
|
|
1682
1682
|
const r = new URL(t, i), s = new URLSearchParams(Object.entries(e).filter(li));
|
|
1683
1683
|
return r.search = "?" + s.toString(), r;
|
|
1684
1684
|
}
|
|
@@ -1686,10 +1686,10 @@ function pt() {
|
|
|
1686
1686
|
const i = window.location.hostname.split(".").filter((t) => !be.isInt(t));
|
|
1687
1687
|
return i.length === 3 ? i.join(".") : [...i, "tg", "map", "urls"].slice(0, 3).join(".");
|
|
1688
1688
|
}
|
|
1689
|
-
const
|
|
1689
|
+
const Se = class Se extends Br {
|
|
1690
1690
|
/** @see https://developers.google.com/maps/documentation/urls/get-started#directions-action */
|
|
1691
1691
|
directions(t, e, r) {
|
|
1692
|
-
return
|
|
1692
|
+
return Le(Se.BASE_URL, "dir/", {
|
|
1693
1693
|
api: "1",
|
|
1694
1694
|
// {@template google_map_normal_gcj02}
|
|
1695
1695
|
// google地图的普通地图, 在国内其实上是gcj02坐标, 卫星地图是wgs84坐标, 因为这里打开的是基础地图, 故使用gcj02
|
|
@@ -1701,15 +1701,15 @@ const ke = class ke extends Br {
|
|
|
1701
1701
|
}
|
|
1702
1702
|
/** @see https://developers.google.com/maps/documentation/urls/get-started#search-action */
|
|
1703
1703
|
search(t) {
|
|
1704
|
-
return
|
|
1704
|
+
return Le(Se.BASE_URL, "search/", {
|
|
1705
1705
|
api: "1",
|
|
1706
1706
|
// {@macro google_map_normal_gcj02}
|
|
1707
1707
|
query: te.toString(t, D.gcj02)
|
|
1708
1708
|
});
|
|
1709
1709
|
}
|
|
1710
1710
|
};
|
|
1711
|
-
m(
|
|
1712
|
-
let Mt =
|
|
1711
|
+
m(Se, "BASE_URL", "https://www.google.com/maps/");
|
|
1712
|
+
let Mt = Se;
|
|
1713
1713
|
const ge = class ge extends Br {
|
|
1714
1714
|
/**
|
|
1715
1715
|
* 导航
|
|
@@ -1717,7 +1717,7 @@ const ge = class ge extends Br {
|
|
|
1717
1717
|
* */
|
|
1718
1718
|
directions(t, e, r = "driving") {
|
|
1719
1719
|
const s = te.getCoordType(e) ?? te.getCoordType(t) ?? D.bd09, n = te.toString(e, s);
|
|
1720
|
-
return
|
|
1720
|
+
return Le(ge.BASE_URL, "direction", {
|
|
1721
1721
|
// baidu地图, 一定要有起点, 故这里用终点当起点, 防止导航失败
|
|
1722
1722
|
origin: te.toString(t, s) ?? (typeof e != "string" ? `name:请选择起点|latlng:${n}` : n),
|
|
1723
1723
|
destination: n,
|
|
@@ -1744,7 +1744,7 @@ const ge = class ge extends Br {
|
|
|
1744
1744
|
* @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#%E5%9B%BE%E5%8C%BA%E5%8A%9F%E8%83%BD
|
|
1745
1745
|
*/
|
|
1746
1746
|
markerApi(t, e, r) {
|
|
1747
|
-
return
|
|
1747
|
+
return Le(ge.BASE_URL, "marker", {
|
|
1748
1748
|
location: `${t.lat},${t.lng}`,
|
|
1749
1749
|
coord_type: t.coord === D.bd09 ? void 0 : t.coord,
|
|
1750
1750
|
title: e,
|
|
@@ -1758,7 +1758,7 @@ const ge = class ge extends Br {
|
|
|
1758
1758
|
* @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#%E5%9B%BE%E5%8C%BA%E5%8A%9F%E8%83%BD:~:text=%E4%B8%8D%E4%BF%9D%E8%AF%81%E6%9C%8D%E5%8A%A1%E3%80%82-,2.1.2%20%E5%9C%B0%E5%9D%80%E8%A7%A3%E6%9E%90,-%E8%B0%83%E7%94%A8%E8%AF%A5
|
|
1759
1759
|
* */
|
|
1760
1760
|
geocoderApi(t) {
|
|
1761
|
-
return
|
|
1761
|
+
return Le(ge.BASE_URL, "geocoder", {
|
|
1762
1762
|
...typeof t == "string" ? {
|
|
1763
1763
|
address: t
|
|
1764
1764
|
} : {
|
|
@@ -3162,7 +3162,7 @@ class zr {
|
|
|
3162
3162
|
* @mustCallSuper 子类必须调用一次`super.setSearchListener`, 用来保存{@link onData}和{@link onError}
|
|
3163
3163
|
* */
|
|
3164
3164
|
setSearchListener(t, e) {
|
|
3165
|
-
return this.onData && B("setSearchListener只能调用一次"), this.onData = t, this.onError = e,
|
|
3165
|
+
return this.onData && B("setSearchListener只能调用一次"), this.onData = t, this.onError = e, De;
|
|
3166
3166
|
}
|
|
3167
3167
|
}
|
|
3168
3168
|
class ki extends zr {
|
|
@@ -3265,12 +3265,12 @@ function Zi(i) {
|
|
|
3265
3265
|
function Wi(i) {
|
|
3266
3266
|
return Array.isArray(i) ? [] : {};
|
|
3267
3267
|
}
|
|
3268
|
-
function
|
|
3268
|
+
function $e(i, t) {
|
|
3269
3269
|
return t.clone !== !1 && t.isMergeableObject(i) ? _e(Wi(i), i, t) : i;
|
|
3270
3270
|
}
|
|
3271
3271
|
function Hi(i, t, e) {
|
|
3272
3272
|
return i.concat(t).map(function(r) {
|
|
3273
|
-
return
|
|
3273
|
+
return $e(r, e);
|
|
3274
3274
|
});
|
|
3275
3275
|
}
|
|
3276
3276
|
function Vi(i, t) {
|
|
@@ -3300,15 +3300,15 @@ function Fi(i, t) {
|
|
|
3300
3300
|
function Ui(i, t, e) {
|
|
3301
3301
|
var r = {};
|
|
3302
3302
|
return e.isMergeableObject(i) && cr(i).forEach(function(s) {
|
|
3303
|
-
r[s] =
|
|
3303
|
+
r[s] = $e(i[s], e);
|
|
3304
3304
|
}), cr(t).forEach(function(s) {
|
|
3305
|
-
Fi(i, s) || (Nr(i, s) && e.isMergeableObject(t[s]) ? r[s] = Vi(s, e)(i[s], t[s], e) : r[s] =
|
|
3305
|
+
Fi(i, s) || (Nr(i, s) && e.isMergeableObject(t[s]) ? r[s] = Vi(s, e)(i[s], t[s], e) : r[s] = $e(t[s], e));
|
|
3306
3306
|
}), r;
|
|
3307
3307
|
}
|
|
3308
3308
|
function _e(i, t, e) {
|
|
3309
|
-
e = e || {}, e.arrayMerge = e.arrayMerge || Hi, e.isMergeableObject = e.isMergeableObject || Ri, e.cloneUnlessOtherwiseSpecified =
|
|
3309
|
+
e = e || {}, e.arrayMerge = e.arrayMerge || Hi, e.isMergeableObject = e.isMergeableObject || Ri, e.cloneUnlessOtherwiseSpecified = $e;
|
|
3310
3310
|
var r = Array.isArray(t), s = Array.isArray(i), n = r === s;
|
|
3311
|
-
return n ? r ? e.arrayMerge(i, t, e) : Ui(i, t, e) :
|
|
3311
|
+
return n ? r ? e.arrayMerge(i, t, e) : Ui(i, t, e) : $e(t, e);
|
|
3312
3312
|
}
|
|
3313
3313
|
_e.all = function(t, e) {
|
|
3314
3314
|
if (!Array.isArray(t))
|
|
@@ -3341,7 +3341,7 @@ function Zr(i) {
|
|
|
3341
3341
|
var t, e;
|
|
3342
3342
|
return !(dr(i) === !1 || (t = i.constructor, typeof t != "function") || (e = t.prototype, dr(e) === !1) || e.hasOwnProperty("isPrototypeOf") === !1);
|
|
3343
3343
|
}
|
|
3344
|
-
var
|
|
3344
|
+
var le;
|
|
3345
3345
|
((i) => {
|
|
3346
3346
|
function t(d, p) {
|
|
3347
3347
|
return d.reduce((g, f) => (g[p(f)] = f, g), {});
|
|
@@ -3396,7 +3396,7 @@ var ce;
|
|
|
3396
3396
|
f != null && delete f[T];
|
|
3397
3397
|
}
|
|
3398
3398
|
i.del = h;
|
|
3399
|
-
})(
|
|
3399
|
+
})(le || (le = {}));
|
|
3400
3400
|
function ur(i) {
|
|
3401
3401
|
if (i.length <= 4)
|
|
3402
3402
|
return i.includes.bind(i);
|
|
@@ -3405,12 +3405,12 @@ function ur(i) {
|
|
|
3405
3405
|
return t.has.bind(t);
|
|
3406
3406
|
}
|
|
3407
3407
|
}
|
|
3408
|
-
|
|
3408
|
+
le.toJsonSafely;
|
|
3409
3409
|
const Xi = ["single", "multi"];
|
|
3410
3410
|
var ee = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(ee || {}), Ct;
|
|
3411
3411
|
((i) => {
|
|
3412
3412
|
function t(e) {
|
|
3413
|
-
|
|
3413
|
+
le.deleteUndefinedPropertyOnPlainObjectDeeply(e);
|
|
3414
3414
|
const r = { center: O.ZERO, zoom: 5 };
|
|
3415
3415
|
return Gr(r, e || {}, {
|
|
3416
3416
|
isMergeableObject: Zr
|
|
@@ -3455,7 +3455,7 @@ class lt extends Wr {
|
|
|
3455
3455
|
super(t, e), this.map = r;
|
|
3456
3456
|
}
|
|
3457
3457
|
createDelegate() {
|
|
3458
|
-
return new
|
|
3458
|
+
return new Re(this.innerOverlay, this.map);
|
|
3459
3459
|
}
|
|
3460
3460
|
/** 仅限内部使用; 设为private时, 生成的d.ts文件中, 方法返回值会变成any, 故改成了public */
|
|
3461
3461
|
get overlay() {
|
|
@@ -3472,7 +3472,7 @@ class lt extends Wr {
|
|
|
3472
3472
|
return t !== void 0 && (t || this.setVisible(!1)), this;
|
|
3473
3473
|
}
|
|
3474
3474
|
}
|
|
3475
|
-
const
|
|
3475
|
+
const ke = class ke extends lt {
|
|
3476
3476
|
constructor(t, e, r, s) {
|
|
3477
3477
|
super(t, e, r), this.state = s;
|
|
3478
3478
|
}
|
|
@@ -3486,7 +3486,7 @@ const Ae = class Ae extends lt {
|
|
|
3486
3486
|
this.innerOverlay.setStrokeColor(t);
|
|
3487
3487
|
}
|
|
3488
3488
|
setStrokeOpacity(t) {
|
|
3489
|
-
this.innerOverlay.setStrokeOpacity(t +
|
|
3489
|
+
this.innerOverlay.setStrokeOpacity(t + ke.OPACITY_DELTA);
|
|
3490
3490
|
}
|
|
3491
3491
|
setStrokeWeight(t) {
|
|
3492
3492
|
this.innerOverlay.setStrokeWeight(t);
|
|
@@ -3495,7 +3495,7 @@ const Ae = class Ae extends lt {
|
|
|
3495
3495
|
this.innerOverlay.setFillColor(t);
|
|
3496
3496
|
}
|
|
3497
3497
|
setFillOpacity(t) {
|
|
3498
|
-
this.innerOverlay.setFillOpacity(t +
|
|
3498
|
+
this.innerOverlay.setFillOpacity(t + ke.OPACITY_DELTA);
|
|
3499
3499
|
}
|
|
3500
3500
|
};
|
|
3501
3501
|
/**
|
|
@@ -3504,8 +3504,8 @@ const Ae = class Ae extends lt {
|
|
|
3504
3504
|
* - 透明度为0.7和0.8时, 在maintain的发布模式下, polyline的线条会不可见 (原因未知, 在tg-map中无法复现)
|
|
3505
3505
|
* 故统一加个0.001, 规避这些问题...
|
|
3506
3506
|
*/
|
|
3507
|
-
m(
|
|
3508
|
-
let j =
|
|
3507
|
+
m(ke, "OPACITY_DELTA", 1e-3);
|
|
3508
|
+
let j = ke;
|
|
3509
3509
|
class ht extends Gt {
|
|
3510
3510
|
isEditable() {
|
|
3511
3511
|
return this.innerOverlay.getEditable();
|
|
@@ -3611,7 +3611,7 @@ class Wt extends ht {
|
|
|
3611
3611
|
this.coordType = this.map.coordType, this.innerOverlay.setCenter(t.toGoogle(this.coordType));
|
|
3612
3612
|
}
|
|
3613
3613
|
getCenter() {
|
|
3614
|
-
return O.fromGoogle(this.innerOverlay.getCenter() ??
|
|
3614
|
+
return O.fromGoogle(this.innerOverlay.getCenter() ?? ae.LATLNG_ZERO, this.coordType);
|
|
3615
3615
|
}
|
|
3616
3616
|
setRadius(t) {
|
|
3617
3617
|
this.innerOverlay.setRadius(t);
|
|
@@ -3629,10 +3629,10 @@ const pr = {
|
|
|
3629
3629
|
return i.lat === t.lat && i.lng === t.lng;
|
|
3630
3630
|
}
|
|
3631
3631
|
};
|
|
3632
|
-
var
|
|
3632
|
+
var oe;
|
|
3633
3633
|
((i) => {
|
|
3634
3634
|
i.ZERO = { x: 0, y: 0 };
|
|
3635
|
-
})(
|
|
3635
|
+
})(oe || (oe = {}));
|
|
3636
3636
|
let gt;
|
|
3637
3637
|
function Ji(i, t, e, r, s, n) {
|
|
3638
3638
|
return gt || (gt = Qi()), new gt(i, t, e, r, s, n);
|
|
@@ -3641,7 +3641,7 @@ function Qi() {
|
|
|
3641
3641
|
Hr();
|
|
3642
3642
|
const i = new BMap.Point(0, 0);
|
|
3643
3643
|
return class extends BMap.OverlayV3 {
|
|
3644
|
-
constructor(r, s = i, n =
|
|
3644
|
+
constructor(r, s = i, n = oe.ZERO, a, c = 654, o = "") {
|
|
3645
3645
|
super();
|
|
3646
3646
|
// 类表达式不能有私有成员, 故改成public
|
|
3647
3647
|
m(this, "container");
|
|
@@ -3719,7 +3719,7 @@ class Ht {
|
|
|
3719
3719
|
}
|
|
3720
3720
|
class Vt extends Ht {
|
|
3721
3721
|
constructor(t, e, r) {
|
|
3722
|
-
super(new
|
|
3722
|
+
super(new Re(t, e)), this.inner = t, this.map = e, this.state = r;
|
|
3723
3723
|
}
|
|
3724
3724
|
static create(t) {
|
|
3725
3725
|
const e = t.position || O.ZERO, r = new BMap.InfoWindow(t.content, {
|
|
@@ -3798,7 +3798,7 @@ class jt extends Ht {
|
|
|
3798
3798
|
this.isOpened && (this.isOpened = !1, this.inner.close(), this.eventHub.notify({ type: "close", target: this }));
|
|
3799
3799
|
}
|
|
3800
3800
|
getPosition() {
|
|
3801
|
-
return O.fromGoogle(this.inner.getPosition() ??
|
|
3801
|
+
return O.fromGoogle(this.inner.getPosition() ?? ae.LATLNG_ZERO, this.map.coordType);
|
|
3802
3802
|
}
|
|
3803
3803
|
setPosition(e) {
|
|
3804
3804
|
this.inner.setPosition(e.toGoogle(this.map.coordType));
|
|
@@ -3865,7 +3865,7 @@ class Ut extends Ht {
|
|
|
3865
3865
|
this.inner.close();
|
|
3866
3866
|
}
|
|
3867
3867
|
getPosition() {
|
|
3868
|
-
return O.fromGoogle(this.inner.getPosition() ??
|
|
3868
|
+
return O.fromGoogle(this.inner.getPosition() ?? ae.LATLNG_ZERO, this.coordType);
|
|
3869
3869
|
}
|
|
3870
3870
|
setPosition(t) {
|
|
3871
3871
|
this.coordType = this.map.coordType, this.inner.setPosition(t.toGoogle(this.coordType));
|
|
@@ -3913,7 +3913,7 @@ const es = {
|
|
|
3913
3913
|
return t && s.endsWith(t) ? s.slice(0, -t.length) : s;
|
|
3914
3914
|
}
|
|
3915
3915
|
};
|
|
3916
|
-
var
|
|
3916
|
+
var ze = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overlayMouseTarget = "overlayMouseTarget", i.float = "float", i))(ze || {}), Ne;
|
|
3917
3917
|
((i) => {
|
|
3918
3918
|
function t(r, s) {
|
|
3919
3919
|
switch (r) {
|
|
@@ -3945,7 +3945,7 @@ var Ne = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overla
|
|
|
3945
3945
|
}
|
|
3946
3946
|
}
|
|
3947
3947
|
i.toBaidu = e;
|
|
3948
|
-
})(
|
|
3948
|
+
})(Ne || (Ne = {}));
|
|
3949
3949
|
class ts {
|
|
3950
3950
|
constructor(t, e) {
|
|
3951
3951
|
m(this, "baidu");
|
|
@@ -3972,7 +3972,7 @@ class ts {
|
|
|
3972
3972
|
initialize(n) {
|
|
3973
3973
|
var o;
|
|
3974
3974
|
const a = t.create(), c = n.getPanes();
|
|
3975
|
-
return (o =
|
|
3975
|
+
return (o = Ne.toBaidu(t.mapPane, c)) == null || o.appendChild(a), a;
|
|
3976
3976
|
}
|
|
3977
3977
|
draw() {
|
|
3978
3978
|
t.draw();
|
|
@@ -3997,7 +3997,7 @@ class ts {
|
|
|
3997
3997
|
class e extends google.maps.OverlayView {
|
|
3998
3998
|
onAdd() {
|
|
3999
3999
|
const s = t.create(), n = this.getPanes() ?? B("onAdd回调中一定会有panes");
|
|
4000
|
-
|
|
4000
|
+
Ne.toGoogle(t.mapPane, n).appendChild(s);
|
|
4001
4001
|
}
|
|
4002
4002
|
draw() {
|
|
4003
4003
|
t.draw();
|
|
@@ -4009,10 +4009,10 @@ class ts {
|
|
|
4009
4009
|
}
|
|
4010
4010
|
this.google = new e(), this.projection = {
|
|
4011
4011
|
fromLatLngToOverlayPoint(r) {
|
|
4012
|
-
return t.google.getProjection().fromLatLngToDivPixel(r.toGoogle(t.map.coordType)) ??
|
|
4012
|
+
return t.google.getProjection().fromLatLngToDivPixel(r.toGoogle(t.map.coordType)) ?? oe.ZERO;
|
|
4013
4013
|
},
|
|
4014
4014
|
fromOverlayPointToLatLng(r) {
|
|
4015
|
-
return O.fromGoogle(t.google.getProjection().fromDivPixelToLatLng(new google.maps.Point(r.x, r.y)) ??
|
|
4015
|
+
return O.fromGoogle(t.google.getProjection().fromDivPixelToLatLng(new google.maps.Point(r.x, r.y)) ?? ae.LATLNG_ZERO, t.map.coordType);
|
|
4016
4016
|
}
|
|
4017
4017
|
};
|
|
4018
4018
|
}
|
|
@@ -4025,7 +4025,7 @@ function rs(i, t, e, r, s) {
|
|
|
4025
4025
|
}
|
|
4026
4026
|
function is() {
|
|
4027
4027
|
return class extends google.maps.OverlayView {
|
|
4028
|
-
constructor(e, r, s, n =
|
|
4028
|
+
constructor(e, r, s, n = ze.overlayMouseTarget, a) {
|
|
4029
4029
|
super();
|
|
4030
4030
|
m(this, "container");
|
|
4031
4031
|
this.position = r, this.offset = s, this._mapPane = n, this.container = document.createElement("div"), this.container.className = "label-container", this.container.style.position = "absolute", a && this.setZIndex(a), this.container.addEventListener("click", () => {
|
|
@@ -4041,7 +4041,7 @@ function is() {
|
|
|
4041
4041
|
}
|
|
4042
4042
|
onAdd() {
|
|
4043
4043
|
const e = this.getPanes() ?? B("onAdd回调中一定能够获取panes");
|
|
4044
|
-
|
|
4044
|
+
Ne.toGoogle(this._mapPane, e).appendChild(this.container);
|
|
4045
4045
|
}
|
|
4046
4046
|
draw() {
|
|
4047
4047
|
var e, r;
|
|
@@ -4218,7 +4218,7 @@ class qt extends Gt {
|
|
|
4218
4218
|
this.coordType = this.map.coordType, this.innerOverlay.setPosition(t.toGoogle(this.coordType));
|
|
4219
4219
|
}
|
|
4220
4220
|
getOffset() {
|
|
4221
|
-
return this.innerOverlay.getOffset() ??
|
|
4221
|
+
return this.innerOverlay.getOffset() ?? oe.ZERO;
|
|
4222
4222
|
}
|
|
4223
4223
|
setOffset(t) {
|
|
4224
4224
|
this.innerOverlay.setOffset(t);
|
|
@@ -4313,7 +4313,7 @@ var et;
|
|
|
4313
4313
|
}
|
|
4314
4314
|
i.toBaidu = e;
|
|
4315
4315
|
})(et || (et = {}));
|
|
4316
|
-
class
|
|
4316
|
+
class Ge extends lt {
|
|
4317
4317
|
constructor(t, e, r, s) {
|
|
4318
4318
|
super(t, e, r), this.state = s;
|
|
4319
4319
|
}
|
|
@@ -4329,7 +4329,7 @@ class Ze extends lt {
|
|
|
4329
4329
|
}, n = new BMap.Marker(t.position.toBaidu(e, t.normalizePositionForBaidu), s);
|
|
4330
4330
|
n.__create_by_tg__ = !0, t.zIndex !== void 0 && n.setZIndex(t.zIndex);
|
|
4331
4331
|
const a = t.clickable === void 0 ? !0 : t.clickable, c = !!t.draggable;
|
|
4332
|
-
return new
|
|
4332
|
+
return new Ge(n, e, this, { clickable: a, draggable: c, zIndex: t.zIndex, normalize: t.normalizePositionForBaidu }).visibleOptionInternal(t.visible);
|
|
4333
4333
|
}
|
|
4334
4334
|
getPosition() {
|
|
4335
4335
|
return O.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
|
|
@@ -4740,7 +4740,7 @@ class ir extends ht {
|
|
|
4740
4740
|
return new ir(r, e, this);
|
|
4741
4741
|
}
|
|
4742
4742
|
getBounds() {
|
|
4743
|
-
return X.fromGoogle(this.innerOverlay.getBounds() ??
|
|
4743
|
+
return X.fromGoogle(this.innerOverlay.getBounds() ?? ae.BOUNDS_ZERO, this.coordType);
|
|
4744
4744
|
}
|
|
4745
4745
|
setBounds(t) {
|
|
4746
4746
|
const e = t.toGoogle(this.coordType);
|
|
@@ -4762,7 +4762,7 @@ class ss extends Nt {
|
|
|
4762
4762
|
m(this, "createRectangle", rr.create);
|
|
4763
4763
|
m(this, "createInfoWindow", Vt.create);
|
|
4764
4764
|
m(this, "createInfoBox", Ft.create);
|
|
4765
|
-
m(this, "createMarker",
|
|
4765
|
+
m(this, "createMarker", Ge.create);
|
|
4766
4766
|
m(this, "createMapTypeControl", It.create);
|
|
4767
4767
|
m(this, "createZoomControl", Rt.create);
|
|
4768
4768
|
m(this, "createStreetViewControl", At.create);
|
|
@@ -4773,7 +4773,7 @@ class ss extends Nt {
|
|
|
4773
4773
|
mapType: r.buildInMapTypeId && ((s = this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId)) == null ? void 0 : s.asBaiduMapType()),
|
|
4774
4774
|
enableMapClick: !1
|
|
4775
4775
|
// 关闭底图点击功能
|
|
4776
|
-
}), this.map.centerAndZoom(r.center.toBaidu(this.coordType), r.zoom + de), this.setGestureHandling(r.gestureHandling), r.infoWindowMode === "multi" && console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"), r.mapStyle && this.map.setMapStyleV2(r.mapStyle.baidu), this.setEventTargetDelegate(new
|
|
4776
|
+
}), this.map.centerAndZoom(r.center.toBaidu(this.coordType), r.zoom + de), this.setGestureHandling(r.gestureHandling), r.infoWindowMode === "multi" && console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"), r.mapStyle && this.map.setMapStyleV2(r.mapStyle.baidu), this.setEventTargetDelegate(new Re(this.map, this)), this.map.addEventListener("addoverlay", (n) => {
|
|
4777
4777
|
const a = n.target.__info_box__;
|
|
4778
4778
|
a && (console.debug("add:info-box", a), this.map.addOverlay(a));
|
|
4779
4779
|
}), this.map.addEventListener("removeoverlay", (n) => {
|
|
@@ -4985,17 +4985,17 @@ class ns extends Nt {
|
|
|
4985
4985
|
if (n == null || a == null || c == null)
|
|
4986
4986
|
return O.ZERO;
|
|
4987
4987
|
const o = Math.pow(2, c), h = new google.maps.Point(e.x / o + n.x, e.y / o + a.y);
|
|
4988
|
-
return O.fromGoogle(r.fromPointToLatLng(h) ??
|
|
4988
|
+
return O.fromGoogle(r.fromPointToLatLng(h) ?? ae.LATLNG_ZERO, this.coordType);
|
|
4989
4989
|
}
|
|
4990
4990
|
fromLatLngToContainerPoint(e) {
|
|
4991
4991
|
const r = this.innerMap.getProjection(), s = this.innerMap.getBounds();
|
|
4992
4992
|
if (r == null || s == null)
|
|
4993
|
-
return
|
|
4993
|
+
return oe.ZERO;
|
|
4994
4994
|
const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), c = this.innerMap.getZoom();
|
|
4995
4995
|
if (n == null || a == null || c == null)
|
|
4996
|
-
return
|
|
4996
|
+
return oe.ZERO;
|
|
4997
4997
|
const o = Math.pow(2, c), h = r.fromLatLngToPoint(e.toGoogle(this.coordType));
|
|
4998
|
-
return h == null ?
|
|
4998
|
+
return h == null ? oe.ZERO : { x: (h.x - n.x) * o, y: (h.y - a.y) * o };
|
|
4999
4999
|
}
|
|
5000
5000
|
setDefaultCursor(e) {
|
|
5001
5001
|
this.innerMap.setOptions({ draggableCursor: e });
|
|
@@ -5007,7 +5007,7 @@ class ns extends Nt {
|
|
|
5007
5007
|
this.map.setOptions({ disableDoubleClickZoom: !e });
|
|
5008
5008
|
}
|
|
5009
5009
|
getCenter() {
|
|
5010
|
-
return O.fromGoogle(this.map.getCenter() ??
|
|
5010
|
+
return O.fromGoogle(this.map.getCenter() ?? ae.LATLNG_ZERO, this.coordType);
|
|
5011
5011
|
}
|
|
5012
5012
|
setCenter(e) {
|
|
5013
5013
|
this.map.setCenter(e.toGoogle(this.coordType));
|
|
@@ -5303,11 +5303,11 @@ var q = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here
|
|
|
5303
5303
|
var hs = { 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 };
|
|
5304
5304
|
const cs = {};
|
|
5305
5305
|
function ds(i) {
|
|
5306
|
-
return
|
|
5306
|
+
return le.putIfAbsent(cs, i, () => hi(() => us({ type: i, config: jr()[i] })))();
|
|
5307
5307
|
}
|
|
5308
5308
|
function us({ type: i, config: t }) {
|
|
5309
5309
|
const e = window, r = ps(i);
|
|
5310
|
-
if (
|
|
5310
|
+
if (le.get(e, r))
|
|
5311
5311
|
return Promise.resolve();
|
|
5312
5312
|
switch (i !== q.here && !t.key && B(`请先配置${i}地图的key`), i) {
|
|
5313
5313
|
case q.google:
|
|
@@ -5319,18 +5319,18 @@ function us({ type: i, config: t }) {
|
|
|
5319
5319
|
case q.baidu:
|
|
5320
5320
|
return gr(`https://api.map.baidu.com/api?v=${t.version}&ak=${t.key}`);
|
|
5321
5321
|
case q.here:
|
|
5322
|
-
return
|
|
5322
|
+
return xe(we("core", t.version)).then(() => Promise.all([
|
|
5323
5323
|
// 其他大多数模块都可以同时载入
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
])).catch((s) => (
|
|
5324
|
+
xe(we("service", t.version)),
|
|
5325
|
+
xe(we("mapevents", t.version)),
|
|
5326
|
+
xe(we("clustering", t.version)),
|
|
5327
|
+
xe(we("ui", t.version))
|
|
5328
|
+
])).catch((s) => (le.del(e, r), Promise.reject(s)));
|
|
5329
5329
|
default:
|
|
5330
5330
|
vt(i);
|
|
5331
5331
|
}
|
|
5332
5332
|
}
|
|
5333
|
-
function
|
|
5333
|
+
function we(i, t = tt[0]) {
|
|
5334
5334
|
return `https://js.api.here.com/v3/${t}/mapsjs-${i}.js`;
|
|
5335
5335
|
}
|
|
5336
5336
|
function ps(i) {
|
|
@@ -5352,7 +5352,7 @@ function gr(i, t = "callback") {
|
|
|
5352
5352
|
n.src = `${i}&${t}=${s}`, n.onerror = r, document.body.appendChild(n);
|
|
5353
5353
|
});
|
|
5354
5354
|
}
|
|
5355
|
-
function
|
|
5355
|
+
function xe(i) {
|
|
5356
5356
|
return new Promise((t, e) => {
|
|
5357
5357
|
const r = document.createElement("script");
|
|
5358
5358
|
r.src = i, r.onload = t, r.onerror = e, document.body.appendChild(r);
|
|
@@ -5401,17 +5401,17 @@ function bn(i) {
|
|
|
5401
5401
|
};
|
|
5402
5402
|
}), t;
|
|
5403
5403
|
}
|
|
5404
|
-
const
|
|
5404
|
+
const Ee = {
|
|
5405
5405
|
enumerable: !0,
|
|
5406
5406
|
configurable: !0,
|
|
5407
|
-
get:
|
|
5408
|
-
set:
|
|
5407
|
+
get: De,
|
|
5408
|
+
set: De
|
|
5409
5409
|
};
|
|
5410
5410
|
function fs(i) {
|
|
5411
5411
|
return Object.keys(i).forEach((t) => {
|
|
5412
5412
|
const e = i[t];
|
|
5413
5413
|
let r = !1;
|
|
5414
|
-
typeof e == "function" ? (
|
|
5414
|
+
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
5415
|
}), i;
|
|
5416
5416
|
}
|
|
5417
5417
|
function Tn(i) {
|
|
@@ -5454,7 +5454,7 @@ function vs(i, t) {
|
|
|
5454
5454
|
listenerProps: s
|
|
5455
5455
|
};
|
|
5456
5456
|
}
|
|
5457
|
-
function
|
|
5457
|
+
function ie(i, t) {
|
|
5458
5458
|
return fr(() => vs(i, t));
|
|
5459
5459
|
}
|
|
5460
5460
|
function k() {
|
|
@@ -5469,17 +5469,17 @@ const Cn = () => {
|
|
|
5469
5469
|
((s && s.type) !== i || Date.now() - (t ?? 0) > 1e3) && e(s);
|
|
5470
5470
|
}
|
|
5471
5471
|
return { eventLog: e, eventLogLess: r };
|
|
5472
|
-
}, sr = "$map",
|
|
5472
|
+
}, sr = "$map", Ze = "onCreate", We = "onDestroy", $ = P({
|
|
5473
5473
|
inject: [sr],
|
|
5474
5474
|
mounted() {
|
|
5475
|
-
Ue(this,
|
|
5475
|
+
Ue(this, Ze);
|
|
5476
5476
|
},
|
|
5477
5477
|
beforeUnmount() {
|
|
5478
|
-
Ue(this,
|
|
5478
|
+
Ue(this, We);
|
|
5479
5479
|
},
|
|
5480
5480
|
methods: {
|
|
5481
5481
|
recreate() {
|
|
5482
|
-
Ue(this,
|
|
5482
|
+
Ue(this, We), Ue(this, Ze);
|
|
5483
5483
|
}
|
|
5484
5484
|
},
|
|
5485
5485
|
render() {
|
|
@@ -5548,7 +5548,7 @@ const Cn = () => {
|
|
|
5548
5548
|
emits: void 0,
|
|
5549
5549
|
setup(i, { attrs: t }) {
|
|
5550
5550
|
return {
|
|
5551
|
-
attrs:
|
|
5551
|
+
attrs: ie(t, i),
|
|
5552
5552
|
centerSyncTimeoutId: void 0
|
|
5553
5553
|
};
|
|
5554
5554
|
},
|
|
@@ -5560,7 +5560,7 @@ const Cn = () => {
|
|
|
5560
5560
|
},
|
|
5561
5561
|
computed: {
|
|
5562
5562
|
propsJson() {
|
|
5563
|
-
return
|
|
5563
|
+
return le.toJsonSafely(this.$props);
|
|
5564
5564
|
}
|
|
5565
5565
|
},
|
|
5566
5566
|
watch: {
|
|
@@ -5616,46 +5616,46 @@ const Cn = () => {
|
|
|
5616
5616
|
buildInMapTypeId: this.mapTypeId
|
|
5617
5617
|
}
|
|
5618
5618
|
);
|
|
5619
|
-
if (this.map = Kr(t), this.mapType && t.setMapType(this.mapType), "ready" in this.attrs.listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"),
|
|
5619
|
+
if (this.map = Kr(t), this.mapType && t.setMapType(this.mapType), "ready" in this.attrs.listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"), re(
|
|
5620
5620
|
this.attrs.listeners,
|
|
5621
5621
|
t,
|
|
5622
5622
|
/* excludes: */
|
|
5623
5623
|
["load"]
|
|
5624
|
-
), this.$emit("load", t),
|
|
5624
|
+
), this.$emit("load", t), Ae([
|
|
5625
5625
|
() => this.zoom,
|
|
5626
5626
|
() => this.center
|
|
5627
5627
|
//
|
|
5628
5628
|
], ([s, n], [a, c]) => {
|
|
5629
5629
|
s !== a && t.setZoom(s), n !== c && (t.getCenter().equals(n) || t.setCenter(n));
|
|
5630
|
-
}), "update:center"
|
|
5630
|
+
}), this.attrs.listenerProps["update:center"]) {
|
|
5631
5631
|
const s = () => this.$emit("update:center", t.getCenter());
|
|
5632
5632
|
t.addEventListener("center-changed", () => {
|
|
5633
5633
|
this.centerSyncDelay > 0 ? (clearTimeout(this.centerSyncTimeoutId), this.centerSyncTimeoutId = setTimeout(s, this.centerSyncDelay)) : s();
|
|
5634
5634
|
});
|
|
5635
5635
|
}
|
|
5636
|
-
"update:current-center"
|
|
5636
|
+
this.attrs.listenerProps["update:current-center"] && (this.$emit("update:current-center", this.center), t.addEventListener("center-changed", () => {
|
|
5637
5637
|
this.$emit("update:current-center", t.getCenter());
|
|
5638
|
-
})), "update:zoom"
|
|
5638
|
+
})), this.attrs.listenerProps["update:zoom"] && t.addEventListener("zoom-changed", () => {
|
|
5639
5639
|
this.$emit("update:zoom", t.getZoom());
|
|
5640
5640
|
});
|
|
5641
|
-
const e = "update:map-type"
|
|
5641
|
+
const e = this.attrs.listenerProps["update:map-type"], r = this.attrs.listenerProps["update:map-type-id"];
|
|
5642
5642
|
(e || r) && t.addEventListener("map-type-changed", () => {
|
|
5643
5643
|
const s = t.getMapType();
|
|
5644
5644
|
e && this.$emit("update:map-type", s), r && this.$emit("update:map-type-id", s.id);
|
|
5645
5645
|
});
|
|
5646
5646
|
},
|
|
5647
5647
|
unmounted() {
|
|
5648
|
-
this.isDestroyed = !0, this.map && ("update:last-center"
|
|
5648
|
+
this.isDestroyed = !0, this.map && (this.attrs.listenerProps["update:last-center"] && this.$emit("update:last-center", this.map.getCenter()), this.attrs.listenerProps["update:center"] && (clearTimeout(this.centerSyncTimeoutId), this.$emit("update:center", this.map.getCenter())));
|
|
5649
5649
|
},
|
|
5650
5650
|
methods: {}
|
|
5651
|
-
}),
|
|
5651
|
+
}), se = (i, t) => {
|
|
5652
5652
|
const e = i.__vccOpts || i;
|
|
5653
5653
|
for (const [r, s] of t)
|
|
5654
5654
|
e[r] = s;
|
|
5655
5655
|
return e;
|
|
5656
5656
|
};
|
|
5657
5657
|
function _s(i, t, e, r, s, n) {
|
|
5658
|
-
return
|
|
5658
|
+
return he(), ce("div", He({ class: "tg-map" }, i.attrs.binds), [
|
|
5659
5659
|
Xr("div", {
|
|
5660
5660
|
ref: "map",
|
|
5661
5661
|
class: it({
|
|
@@ -5668,7 +5668,7 @@ function _s(i, t, e, r, s, n) {
|
|
|
5668
5668
|
K(i.$slots, "overlay")
|
|
5669
5669
|
], 16);
|
|
5670
5670
|
}
|
|
5671
|
-
const Ve = /* @__PURE__ */
|
|
5671
|
+
const Ve = /* @__PURE__ */ se(ys, [["render", _s]]);
|
|
5672
5672
|
function bs(i) {
|
|
5673
5673
|
if (i == null)
|
|
5674
5674
|
return;
|
|
@@ -5710,14 +5710,14 @@ const Ts = P({
|
|
|
5710
5710
|
}
|
|
5711
5711
|
});
|
|
5712
5712
|
function Ms(i, t, e, r, s, n) {
|
|
5713
|
-
return
|
|
5713
|
+
return he(), ce("div", {
|
|
5714
5714
|
class: it(i.$options.name),
|
|
5715
5715
|
style: Jr({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
|
|
5716
5716
|
}, [
|
|
5717
5717
|
K(i.$slots, "default")
|
|
5718
5718
|
], 6);
|
|
5719
5719
|
}
|
|
5720
|
-
const Os = /* @__PURE__ */
|
|
5720
|
+
const Os = /* @__PURE__ */ se(Ts, [["render", Ms]]), Cs = P({
|
|
5721
5721
|
name: "tg-custom-control",
|
|
5722
5722
|
mixins: [$],
|
|
5723
5723
|
props: {
|
|
@@ -5747,13 +5747,13 @@ const Os = /* @__PURE__ */ oe(Ts, [["render", Ms]]), Cs = P({
|
|
|
5747
5747
|
}
|
|
5748
5748
|
});
|
|
5749
5749
|
function ws(i, t, e, r, s, n) {
|
|
5750
|
-
return
|
|
5750
|
+
return he(), ce("div", {
|
|
5751
5751
|
class: it(i.$options.name)
|
|
5752
5752
|
}, [
|
|
5753
5753
|
K(i.$slots, "default")
|
|
5754
5754
|
], 2);
|
|
5755
5755
|
}
|
|
5756
|
-
const xs = /* @__PURE__ */
|
|
5756
|
+
const xs = /* @__PURE__ */ se(Cs, [["render", ws]]), Es = P({
|
|
5757
5757
|
name: "tg-map-type-control",
|
|
5758
5758
|
mixins: [$],
|
|
5759
5759
|
props: {
|
|
@@ -5829,12 +5829,12 @@ function nr() {
|
|
|
5829
5829
|
return i.value ?? B("map尚未初始化");
|
|
5830
5830
|
},
|
|
5831
5831
|
/** 地图元素创建回调 */
|
|
5832
|
-
[
|
|
5833
|
-
ti(r), t && B(`${
|
|
5832
|
+
[Ze](r) {
|
|
5833
|
+
ti(r), t && B(`${Ze}只能调用一次`), t = r;
|
|
5834
5834
|
},
|
|
5835
5835
|
/** 地图元素销毁回调 */
|
|
5836
|
-
[
|
|
5837
|
-
ri(r), e && B(`${
|
|
5836
|
+
[We](r) {
|
|
5837
|
+
ri(r), e && B(`${We}只能调用一次`), e = r;
|
|
5838
5838
|
},
|
|
5839
5839
|
/** 重新创建地图元素 */
|
|
5840
5840
|
recreate() {
|
|
@@ -5854,7 +5854,7 @@ const Ls = P({
|
|
|
5854
5854
|
t = e.createStreetViewControl(i), e.addControl(t);
|
|
5855
5855
|
}), s(() => {
|
|
5856
5856
|
e.removeControl(t);
|
|
5857
|
-
}),
|
|
5857
|
+
}), Ae(() => i.position, (n) => {
|
|
5858
5858
|
t.setPosition(n);
|
|
5859
5859
|
}), ct;
|
|
5860
5860
|
}
|
|
@@ -5870,7 +5870,7 @@ const Ls = P({
|
|
|
5870
5870
|
t = e.createZoomControl(i), e.addControl(t);
|
|
5871
5871
|
}), s(() => {
|
|
5872
5872
|
e.removeControl(t);
|
|
5873
|
-
}),
|
|
5873
|
+
}), Ae(() => i.position, (n) => {
|
|
5874
5874
|
t.setPosition(n);
|
|
5875
5875
|
}), ct;
|
|
5876
5876
|
}
|
|
@@ -5890,7 +5890,7 @@ const Ls = P({
|
|
|
5890
5890
|
s = t.createHeatmap(i);
|
|
5891
5891
|
}), r(() => {
|
|
5892
5892
|
s.remove();
|
|
5893
|
-
}),
|
|
5893
|
+
}), Ae(() => i.data, (n) => s.setData(n)), Ae(
|
|
5894
5894
|
[() => i.maxIntensity, () => i.gradient, () => i.opacity, () => i.radius],
|
|
5895
5895
|
() => s.setOptions(i)
|
|
5896
5896
|
), ct;
|
|
@@ -5960,13 +5960,13 @@ const Ls = P({
|
|
|
5960
5960
|
}
|
|
5961
5961
|
});
|
|
5962
5962
|
function ks(i, t, e, r, s, n) {
|
|
5963
|
-
return
|
|
5963
|
+
return he(), ce("div", {
|
|
5964
5964
|
class: it(i.$options.name)
|
|
5965
5965
|
}, [
|
|
5966
5966
|
K(i.$slots, "default")
|
|
5967
5967
|
], 2);
|
|
5968
5968
|
}
|
|
5969
|
-
const Ur = /* @__PURE__ */
|
|
5969
|
+
const Ur = /* @__PURE__ */ se(Ss, [["render", ks]]), As = P({
|
|
5970
5970
|
name: "tg-traffic-layer",
|
|
5971
5971
|
mixins: [$],
|
|
5972
5972
|
// 请直接使用v-if来控制它的显隐
|
|
@@ -6005,7 +6005,7 @@ const Ur = /* @__PURE__ */ oe(Ss, [["render", ks]]), As = P({
|
|
|
6005
6005
|
emits: void 0,
|
|
6006
6006
|
setup(i, { attrs: t }) {
|
|
6007
6007
|
return {
|
|
6008
|
-
attrs:
|
|
6008
|
+
attrs: ie(t, i),
|
|
6009
6009
|
overlay: void 0,
|
|
6010
6010
|
emittedRadius: void 0,
|
|
6011
6011
|
emittedCenter: void 0
|
|
@@ -6054,9 +6054,9 @@ const Ur = /* @__PURE__ */ oe(Ss, [["render", ks]]), As = P({
|
|
|
6054
6054
|
}
|
|
6055
6055
|
},
|
|
6056
6056
|
onCreate() {
|
|
6057
|
-
this.overlay = this.$map.createCircle(this), this.$map.addOverlay(this.overlay),
|
|
6057
|
+
this.overlay = this.$map.createCircle(this), this.$map.addOverlay(this.overlay), re(this.attrs.listeners, this.overlay), this.attrs.listenerProps["update:center"] && this.overlay.addEventListener("center-changed", () => {
|
|
6058
6058
|
this.$emit("update:center", this.emittedCenter = this.overlay.getCenter());
|
|
6059
|
-
}), "update:radius"
|
|
6059
|
+
}), this.attrs.listenerProps["update:radius"] && this.overlay.addEventListener("radius-changed", () => {
|
|
6060
6060
|
this.$emit("update:radius", this.emittedRadius = this.overlay.getRadius());
|
|
6061
6061
|
});
|
|
6062
6062
|
},
|
|
@@ -6083,7 +6083,7 @@ const $s = P({
|
|
|
6083
6083
|
name: "tg-element-overlay",
|
|
6084
6084
|
mixins: [$],
|
|
6085
6085
|
props: {
|
|
6086
|
-
mapPane: F(
|
|
6086
|
+
mapPane: F(ze, ze.overlayMouseTarget),
|
|
6087
6087
|
position: N(O)
|
|
6088
6088
|
},
|
|
6089
6089
|
setup() {
|
|
@@ -6112,13 +6112,13 @@ const $s = P({
|
|
|
6112
6112
|
}
|
|
6113
6113
|
});
|
|
6114
6114
|
function zs(i, t, e, r, s, n) {
|
|
6115
|
-
return
|
|
6115
|
+
return he(), ce("div", He({
|
|
6116
6116
|
class: i.$options.name
|
|
6117
6117
|
}, i.$attrs), [
|
|
6118
6118
|
K(i.$slots, "default")
|
|
6119
6119
|
], 16);
|
|
6120
6120
|
}
|
|
6121
|
-
const Ns = /* @__PURE__ */
|
|
6121
|
+
const Ns = /* @__PURE__ */ se($s, [["render", zs]]), Gs = P({
|
|
6122
6122
|
name: "tg-marker",
|
|
6123
6123
|
mixins: [$],
|
|
6124
6124
|
inheritAttrs: !1,
|
|
@@ -6143,7 +6143,7 @@ const Ns = /* @__PURE__ */ oe($s, [["render", zs]]), Gs = P({
|
|
|
6143
6143
|
emits: void 0,
|
|
6144
6144
|
setup(i, { attrs: t }) {
|
|
6145
6145
|
return {
|
|
6146
|
-
attrs:
|
|
6146
|
+
attrs: ie(t, i),
|
|
6147
6147
|
marker: void 0,
|
|
6148
6148
|
label: yt(),
|
|
6149
6149
|
info: yt(),
|
|
@@ -6167,7 +6167,7 @@ const Ns = /* @__PURE__ */ oe($s, [["render", zs]]), Gs = P({
|
|
|
6167
6167
|
i ? this.marker.setIcon(i) : this.recreate();
|
|
6168
6168
|
},
|
|
6169
6169
|
clickable(i) {
|
|
6170
|
-
this.marker instanceof
|
|
6170
|
+
this.marker instanceof Ge ? this.recreate() : this.marker.setClickable(i);
|
|
6171
6171
|
},
|
|
6172
6172
|
draggable(i) {
|
|
6173
6173
|
this.marker.setDraggable(i);
|
|
@@ -6179,7 +6179,7 @@ const Ns = /* @__PURE__ */ oe($s, [["render", zs]]), Gs = P({
|
|
|
6179
6179
|
this.recreate();
|
|
6180
6180
|
},
|
|
6181
6181
|
zIndex(i) {
|
|
6182
|
-
this.marker instanceof
|
|
6182
|
+
this.marker instanceof Ge ? this.recreate() : this.marker.setZIndex(i);
|
|
6183
6183
|
},
|
|
6184
6184
|
visible(i) {
|
|
6185
6185
|
this.marker.setVisible(i);
|
|
@@ -6192,7 +6192,7 @@ const Ns = /* @__PURE__ */ oe($s, [["render", zs]]), Gs = P({
|
|
|
6192
6192
|
}
|
|
6193
6193
|
},
|
|
6194
6194
|
onCreate() {
|
|
6195
|
-
this.marker = this.$map.createMarker(this), this.label && this.marker.setLabel(this.label.overlay), this.$clusterer() && this.autoAddToClusterer ? this.$clusterer().onAddMarker(this.marker) : this.$map.addOverlay(this.marker), this.autoAddToClustererWhenCreate = this.autoAddToClusterer, this.info && this.info.show && this.info.overlay.open(this.marker),
|
|
6195
|
+
this.marker = this.$map.createMarker(this), this.label && this.marker.setLabel(this.label.overlay), this.$clusterer() && this.autoAddToClusterer ? this.$clusterer().onAddMarker(this.marker) : this.$map.addOverlay(this.marker), this.autoAddToClustererWhenCreate = this.autoAddToClusterer, this.info && this.info.show && this.info.overlay.open(this.marker), re(this.attrs.listeners, this.marker), this.attrs.listenerProps["update:position"] && this.marker.addEventListener("dragend", (i) => {
|
|
6196
6196
|
this.$emit("update:position", this.emittedPosition = i.position);
|
|
6197
6197
|
});
|
|
6198
6198
|
},
|
|
@@ -6221,13 +6221,9 @@ const Ns = /* @__PURE__ */ oe($s, [["render", zs]]), Gs = P({
|
|
|
6221
6221
|
}
|
|
6222
6222
|
});
|
|
6223
6223
|
function Zs(i, t, e, r, s, n) {
|
|
6224
|
-
return
|
|
6225
|
-
class: i.$options.name
|
|
6226
|
-
}, i.attrs.binds), [
|
|
6227
|
-
K(i.$slots, "default")
|
|
6228
|
-
], 16);
|
|
6224
|
+
return K(i.$slots, "default");
|
|
6229
6225
|
}
|
|
6230
|
-
const dt = /* @__PURE__ */
|
|
6226
|
+
const dt = /* @__PURE__ */ se(Gs, [["render", Zs]]), Ws = P({
|
|
6231
6227
|
name: "tg-info-box",
|
|
6232
6228
|
mixins: [$],
|
|
6233
6229
|
inheritAttrs: !1,
|
|
@@ -6243,7 +6239,7 @@ const dt = /* @__PURE__ */ oe(Gs, [["render", Zs]]), Ws = P({
|
|
|
6243
6239
|
emits: void 0,
|
|
6244
6240
|
setup(i, { attrs: t }) {
|
|
6245
6241
|
return {
|
|
6246
|
-
attrs:
|
|
6242
|
+
attrs: ie(t, i),
|
|
6247
6243
|
overlay: void 0
|
|
6248
6244
|
};
|
|
6249
6245
|
},
|
|
@@ -6268,9 +6264,9 @@ const dt = /* @__PURE__ */ oe(Gs, [["render", Zs]]), Ws = P({
|
|
|
6268
6264
|
}
|
|
6269
6265
|
},
|
|
6270
6266
|
onCreate() {
|
|
6271
|
-
this.overlay = this.$map.createInfoBox(this.getOptions()), this.$marker() ? this.$marker().onAddInfo(this) : this.show && this.overlay.open(), "update:show"
|
|
6267
|
+
this.overlay = this.$map.createInfoBox(this.getOptions()), this.$marker() ? this.$marker().onAddInfo(this) : this.show && this.overlay.open(), this.attrs.listenerProps["update:show"] && this.overlay.addEventListener("closeclick", () => {
|
|
6272
6268
|
this.$emit("update:show", !1);
|
|
6273
|
-
}),
|
|
6269
|
+
}), re(this.attrs.listeners, this.overlay);
|
|
6274
6270
|
},
|
|
6275
6271
|
onDestroy() {
|
|
6276
6272
|
this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
|
|
@@ -6301,13 +6297,13 @@ const dt = /* @__PURE__ */ oe(Gs, [["render", Zs]]), Ws = P({
|
|
|
6301
6297
|
}
|
|
6302
6298
|
});
|
|
6303
6299
|
function Hs(i, t, e, r, s, n) {
|
|
6304
|
-
return
|
|
6300
|
+
return he(), ce("div", He({
|
|
6305
6301
|
class: i.$options.name
|
|
6306
6302
|
}, i.attrs.binds), [
|
|
6307
6303
|
K(i.$slots, "default")
|
|
6308
6304
|
], 16);
|
|
6309
6305
|
}
|
|
6310
|
-
const Vs = /* @__PURE__ */
|
|
6306
|
+
const Vs = /* @__PURE__ */ se(Ws, [["render", Hs]]), js = P({
|
|
6311
6307
|
name: "tg-info-window",
|
|
6312
6308
|
mixins: [$],
|
|
6313
6309
|
inheritAttrs: !1,
|
|
@@ -6322,7 +6318,7 @@ const Vs = /* @__PURE__ */ oe(Ws, [["render", Hs]]), js = P({
|
|
|
6322
6318
|
emits: void 0,
|
|
6323
6319
|
setup(i, { attrs: t }) {
|
|
6324
6320
|
return {
|
|
6325
|
-
attrs:
|
|
6321
|
+
attrs: ie(t, i),
|
|
6326
6322
|
overlay: void 0
|
|
6327
6323
|
};
|
|
6328
6324
|
},
|
|
@@ -6365,14 +6361,14 @@ const Vs = /* @__PURE__ */ oe(Ws, [["render", Hs]]), js = P({
|
|
|
6365
6361
|
this.$emit("update:show", !0);
|
|
6366
6362
|
}), this.overlay.addEventListener("close", () => {
|
|
6367
6363
|
this.$emit("update:show", !1);
|
|
6368
|
-
}),
|
|
6364
|
+
}), re(this.attrs.listeners, this.overlay);
|
|
6369
6365
|
},
|
|
6370
6366
|
onDestroy() {
|
|
6371
6367
|
this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
|
|
6372
6368
|
}
|
|
6373
6369
|
});
|
|
6374
6370
|
function Fs(i, t, e, r, s, n) {
|
|
6375
|
-
return ii((
|
|
6371
|
+
return ii((he(), ce("div", He({
|
|
6376
6372
|
class: i.$options.name
|
|
6377
6373
|
}, i.attrs.binds), [
|
|
6378
6374
|
K(i.$slots, "default")
|
|
@@ -6380,7 +6376,7 @@ function Fs(i, t, e, r, s, n) {
|
|
|
6380
6376
|
[si, i.show]
|
|
6381
6377
|
]);
|
|
6382
6378
|
}
|
|
6383
|
-
const Us = /* @__PURE__ */
|
|
6379
|
+
const Us = /* @__PURE__ */ se(js, [["render", Fs]]), Ys = P({
|
|
6384
6380
|
name: "tg-label",
|
|
6385
6381
|
mixins: [$],
|
|
6386
6382
|
inheritAttrs: !1,
|
|
@@ -6388,12 +6384,12 @@ const Us = /* @__PURE__ */ oe(js, [["render", Fs]]), Ys = P({
|
|
|
6388
6384
|
position: b(O),
|
|
6389
6385
|
offset: b(Object),
|
|
6390
6386
|
zIndex: b(Number),
|
|
6391
|
-
mapPane: F(
|
|
6387
|
+
mapPane: F(ze)
|
|
6392
6388
|
},
|
|
6393
6389
|
emits: void 0,
|
|
6394
6390
|
setup(i, { attrs: t }) {
|
|
6395
6391
|
return {
|
|
6396
|
-
attrs:
|
|
6392
|
+
attrs: ie(t),
|
|
6397
6393
|
overlay: void 0
|
|
6398
6394
|
};
|
|
6399
6395
|
},
|
|
@@ -6436,20 +6432,20 @@ const Us = /* @__PURE__ */ oe(js, [["render", Fs]]), Ys = P({
|
|
|
6436
6432
|
}
|
|
6437
6433
|
},
|
|
6438
6434
|
onCreate() {
|
|
6439
|
-
this.overlay = this.$map.createLabel(this.getOptions()), this.$marker() ? this.$marker().onAddLabel(this) : this.$map.addOverlay(this.overlay),
|
|
6435
|
+
this.overlay = this.$map.createLabel(this.getOptions()), this.$marker() ? this.$marker().onAddLabel(this) : this.$map.addOverlay(this.overlay), re(this.attrs.listeners, this.overlay);
|
|
6440
6436
|
},
|
|
6441
6437
|
onDestroy() {
|
|
6442
6438
|
this.$marker() ? this.$marker().onRemoveLabel(this) : this.$map.removeOverlay(this.overlay);
|
|
6443
6439
|
}
|
|
6444
6440
|
});
|
|
6445
6441
|
function qs(i, t, e, r, s, n) {
|
|
6446
|
-
return
|
|
6442
|
+
return he(), ce("div", He({
|
|
6447
6443
|
class: i.$options.name
|
|
6448
6444
|
}, i.attrs.binds), [
|
|
6449
6445
|
K(i.$slots, "default")
|
|
6450
6446
|
], 16);
|
|
6451
6447
|
}
|
|
6452
|
-
const Ks = /* @__PURE__ */
|
|
6448
|
+
const Ks = /* @__PURE__ */ se(Ys, [["render", qs]]), Xs = P({
|
|
6453
6449
|
name: "tg-polygon",
|
|
6454
6450
|
mixins: [$],
|
|
6455
6451
|
inheritAttrs: !1,
|
|
@@ -6468,7 +6464,7 @@ const Ks = /* @__PURE__ */ oe(Ys, [["render", qs]]), Xs = P({
|
|
|
6468
6464
|
emits: void 0,
|
|
6469
6465
|
setup(i, { attrs: t }) {
|
|
6470
6466
|
return {
|
|
6471
|
-
attrs:
|
|
6467
|
+
attrs: ie(t, i),
|
|
6472
6468
|
overlay: void 0,
|
|
6473
6469
|
emittedPaths: void 0
|
|
6474
6470
|
};
|
|
@@ -6511,7 +6507,7 @@ const Ks = /* @__PURE__ */ oe(Ys, [["render", qs]]), Xs = P({
|
|
|
6511
6507
|
}
|
|
6512
6508
|
},
|
|
6513
6509
|
onCreate() {
|
|
6514
|
-
this.overlay = this.$map.createPolygon(this), this.$map.addOverlay(this.overlay),
|
|
6510
|
+
this.overlay = this.$map.createPolygon(this), this.$map.addOverlay(this.overlay), re(this.attrs.listeners, this.overlay), this.attrs.listenerProps["update:paths"] && this.overlay.addEventListener("paths-edited", () => {
|
|
6515
6511
|
this.$emit("update:paths", this.emittedPaths = this.overlay.getPaths());
|
|
6516
6512
|
});
|
|
6517
6513
|
},
|
|
@@ -6536,7 +6532,7 @@ const Ks = /* @__PURE__ */ oe(Ys, [["render", qs]]), Xs = P({
|
|
|
6536
6532
|
emits: void 0,
|
|
6537
6533
|
setup(i, { attrs: t }) {
|
|
6538
6534
|
return {
|
|
6539
|
-
attrs:
|
|
6535
|
+
attrs: ie(t, i),
|
|
6540
6536
|
overlay: void 0,
|
|
6541
6537
|
emittedPath: void 0
|
|
6542
6538
|
};
|
|
@@ -6579,7 +6575,7 @@ const Ks = /* @__PURE__ */ oe(Ys, [["render", qs]]), Xs = P({
|
|
|
6579
6575
|
}
|
|
6580
6576
|
},
|
|
6581
6577
|
onCreate() {
|
|
6582
|
-
this.overlay = this.$map.createPolyline(this), this.$map.addOverlay(this.overlay),
|
|
6578
|
+
this.overlay = this.$map.createPolyline(this), this.$map.addOverlay(this.overlay), re(this.attrs.listeners, this.overlay), this.attrs.listenerProps["update:path"] && this.overlay.addEventListener("path-edited", () => {
|
|
6583
6579
|
this.$emit("update:path", this.emittedPath = this.overlay.getPath());
|
|
6584
6580
|
});
|
|
6585
6581
|
},
|
|
@@ -6605,7 +6601,7 @@ const Ks = /* @__PURE__ */ oe(Ys, [["render", qs]]), Xs = P({
|
|
|
6605
6601
|
emits: void 0,
|
|
6606
6602
|
setup(i, { attrs: t }) {
|
|
6607
6603
|
return {
|
|
6608
|
-
attrs:
|
|
6604
|
+
attrs: ie(t, i),
|
|
6609
6605
|
overlay: void 0,
|
|
6610
6606
|
emittedBounds: void 0
|
|
6611
6607
|
};
|
|
@@ -6645,7 +6641,7 @@ const Ks = /* @__PURE__ */ oe(Ys, [["render", qs]]), Xs = P({
|
|
|
6645
6641
|
}
|
|
6646
6642
|
},
|
|
6647
6643
|
onCreate() {
|
|
6648
|
-
this.overlay = this.$map.createRectangle(this), this.$map.addOverlay(this.overlay),
|
|
6644
|
+
this.overlay = this.$map.createRectangle(this), this.$map.addOverlay(this.overlay), re(this.attrs.listeners, this.overlay), this.attrs.listenerProps["update:bounds"] && this.overlay.addEventListener("bounds-changed", () => {
|
|
6649
6645
|
this.$emit("update:bounds", this.emittedBounds = this.overlay.getBounds());
|
|
6650
6646
|
});
|
|
6651
6647
|
},
|
|
@@ -6659,7 +6655,7 @@ const Ks = /* @__PURE__ */ oe(Ys, [["render", qs]]), Xs = P({
|
|
|
6659
6655
|
beforeCreate() {
|
|
6660
6656
|
const r = Fr() ?? "", n = (t.nameRegex || /^[A-Z]/).test(r) ? (a) => {
|
|
6661
6657
|
t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : en.includes(a) || console.debug("[lifecycle]", r, a);
|
|
6662
|
-
} :
|
|
6658
|
+
} : De;
|
|
6663
6659
|
n("beforeCreate"), this.__life_impl = n;
|
|
6664
6660
|
},
|
|
6665
6661
|
created() {
|
|
@@ -6699,7 +6695,7 @@ const Ks = /* @__PURE__ */ oe(Ys, [["render", qs]]), Xs = P({
|
|
|
6699
6695
|
}
|
|
6700
6696
|
}
|
|
6701
6697
|
}, tn = 6378137;
|
|
6702
|
-
function
|
|
6698
|
+
function Be(i) {
|
|
6703
6699
|
return i * Math.PI / 180;
|
|
6704
6700
|
}
|
|
6705
6701
|
function mr(i) {
|
|
@@ -6708,7 +6704,7 @@ function mr(i) {
|
|
|
6708
6704
|
function rn(i, t) {
|
|
6709
6705
|
if (i.lat === t.lat && i.lng === t.lng)
|
|
6710
6706
|
return 0;
|
|
6711
|
-
const e =
|
|
6707
|
+
const e = Be((i.lat + t.lat) / 2), r = Be((i.lat - t.lat) / 2), s = Be((i.lng - t.lng) / 2);
|
|
6712
6708
|
let n = Math.sin(r), a = Math.sin(s), c = Math.sin(e);
|
|
6713
6709
|
const o = tn, h = 1 / 298.257;
|
|
6714
6710
|
n = n * n, a = a * a, c = c * c;
|
|
@@ -6716,7 +6712,7 @@ function rn(i, t) {
|
|
|
6716
6712
|
return T * (1 + h * (_ * c * (1 - n) - M * (1 - c) * n));
|
|
6717
6713
|
}
|
|
6718
6714
|
function sn(i, t, e) {
|
|
6719
|
-
const s = 63567523142e-4, n = 1 / 298.257223563, a =
|
|
6715
|
+
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 * _)));
|
|
6720
6716
|
let u = 0, v = 0, y = 0, C = e / (s * M), w = 2 * Math.PI;
|
|
6721
6717
|
for (; Math.abs(C - w) > 1e-12; ) {
|
|
6722
6718
|
u = Math.cos(2 * g + C), v = Math.sin(C), y = Math.cos(C);
|
|
@@ -6744,7 +6740,7 @@ const En = {
|
|
|
6744
6740
|
});
|
|
6745
6741
|
}
|
|
6746
6742
|
const e = i.config.optionMergeStrategies;
|
|
6747
|
-
e[
|
|
6743
|
+
e[Ze] = e[We] = (r, s) => r ? [...new Set([].concat(r, s))] : Array.isArray(s) ? s : [s];
|
|
6748
6744
|
}
|
|
6749
6745
|
};
|
|
6750
6746
|
export {
|
|
@@ -6760,7 +6756,7 @@ export {
|
|
|
6760
6756
|
Vt as BaiduInfoWindow,
|
|
6761
6757
|
It as BaiduMapTypeControl,
|
|
6762
6758
|
Ot as BaiduMapUrls,
|
|
6763
|
-
|
|
6759
|
+
Ge as BaiduMarker,
|
|
6764
6760
|
Li as BaiduMarkerClusterer,
|
|
6765
6761
|
lt as BaiduOverlay,
|
|
6766
6762
|
Si as BaiduPlacesService,
|
|
@@ -6774,7 +6770,7 @@ export {
|
|
|
6774
6770
|
Rt as BaiduZoomControl,
|
|
6775
6771
|
W as BuildInMapType,
|
|
6776
6772
|
Mr as BuildInMapTypeId,
|
|
6777
|
-
|
|
6773
|
+
Pe as CachedValue,
|
|
6778
6774
|
A as ControlPosition,
|
|
6779
6775
|
U as ControlPositionConverter,
|
|
6780
6776
|
D as CoordType,
|
|
@@ -6813,23 +6809,23 @@ export {
|
|
|
6813
6809
|
X as LatLngBounds,
|
|
6814
6810
|
wn as LifecycleLogPlugin,
|
|
6815
6811
|
te as Location,
|
|
6816
|
-
|
|
6817
|
-
|
|
6812
|
+
Ze as MIXIN_HOOK_CREATE,
|
|
6813
|
+
We as MIXIN_HOOK_DESTROY,
|
|
6818
6814
|
sr as MIXIN_MAP_NAME,
|
|
6819
6815
|
ve as MVCArrays,
|
|
6820
6816
|
$ as MapMixin,
|
|
6821
6817
|
Ct as MapOptions,
|
|
6822
|
-
|
|
6823
|
-
|
|
6818
|
+
ze as MapPane,
|
|
6819
|
+
Ne as MapPanes,
|
|
6824
6820
|
V as MapType,
|
|
6825
6821
|
Or as MapTypeControlType,
|
|
6826
6822
|
Br as MapUrls,
|
|
6827
6823
|
Di as MapZoom,
|
|
6828
6824
|
Rr as MarkerClusterer,
|
|
6829
|
-
|
|
6825
|
+
le as Objects,
|
|
6830
6826
|
Wr as Overlay,
|
|
6831
6827
|
$r as PlacesService,
|
|
6832
|
-
|
|
6828
|
+
oe as Point,
|
|
6833
6829
|
zr as SearchBox,
|
|
6834
6830
|
xn as SphericalUtils,
|
|
6835
6831
|
be as Strings,
|
|
@@ -6880,7 +6876,7 @@ export {
|
|
|
6880
6876
|
hn as isInstanceOf,
|
|
6881
6877
|
ln as lateinit,
|
|
6882
6878
|
ds as loadCachedMap,
|
|
6883
|
-
|
|
6879
|
+
De as noop,
|
|
6884
6880
|
b as optionalProp,
|
|
6885
6881
|
es as path,
|
|
6886
6882
|
N as requiredProp,
|
|
@@ -6896,7 +6892,7 @@ export {
|
|
|
6896
6892
|
yt as typed,
|
|
6897
6893
|
dn as unwrapStringEnumValue,
|
|
6898
6894
|
Cn as useEventLogMethods,
|
|
6899
|
-
|
|
6895
|
+
ie as useSplittedAttrs,
|
|
6900
6896
|
nr as useTgMapInner
|
|
6901
6897
|
};
|
|
6902
6898
|
//# sourceMappingURL=tg-map.js.map
|