tg-map-vue3 3.7.11 → 3.7.13
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/tg-map.js +417 -415
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +5 -5
- package/dist/tg-map.umd.cjs.map +1 -1
- package/package.json +3 -4
package/dist/tg-map.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.baidu-info-box-container{transform:translateY(-11px);font-size:13px;font-weight:300;width:100vw}.baidu-info-box-container__border{position:absolute;padding:12px;background-color:#fff;box-shadow:0 2px 7px 1px #0000004d;border-radius:8px;transform:translate(-50%,-100%)}.baidu-info-box-container__inner{overflow:auto}.baidu-info-box-container__close{position:absolute;right:-6px;top:-6px;width:14px;height:14px;margin:8px;opacity:.6;cursor:pointer}.baidu-info-box-container__close:hover{opacity:1}.baidu-info-box-container:after{position:absolute;background-color:#fff;content:"";width:15px;height:15px;left:0px;top:0px;box-shadow:-2px 2px 2px #b2b2b266;transform:translate(-50%,-50%) rotate(-45deg)}.element-overlay{position:absolute}.tg-map{height:100%;position:relative}.tg-map__map{width:100%;height:100%}.tg-map__map--hide-logo-google .gm-style a[target=_blank]:has(> div > img){display:none!important}.tg-map__map--hide-logo-google .gm-style>div:last-child>div:last-child>div{display:none}.tg-map__map--hide-logo-baidu div.anchorBL>a[target=_blank]>img{display:none}.tg-map__map--hide-logo-baidu div.BMap_cpyCtrl{display:none}.tg-map-widget{position:absolute}.tg-map>.tg-custom-control{display:none}.tg-map .tg-element-overlay{display:none}.tg-map__map .tg-element-overlay{display:block}.tg-map .tg-info-box{display:none}.tg-map__map .tg-info-box{display:block}.tg-map .tg-label{display:none}.tg-map__map .tg-label{display:block}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.baidu-info-box-container{transform:translateY(-11px);font-size:13px;font-weight:300;width:100vw;cursor:auto;user-select:auto!important}.baidu-info-box-container__border{position:absolute;padding:12px;background-color:#fff;box-shadow:0 2px 7px 1px #0000004d;border-radius:8px;transform:translate(-50%,-100%)}.baidu-info-box-container__inner{overflow:auto}.baidu-info-box-container__close{position:absolute;right:-6px;top:-6px;width:14px;height:14px;margin:8px;opacity:.6;cursor:pointer;mask-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22/%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22/%3E%3C/svg%3E);background-color:#000}.baidu-info-box-container__close:hover{opacity:1}.baidu-info-box-container:after{position:absolute;background-color:#fff;content:"";width:15px;height:15px;left:0px;top:0px;box-shadow:-2px 2px 2px #b2b2b266;transform:translate(-50%,-50%) rotate(-45deg)}.element-overlay{position:absolute}.tg-map{height:100%;position:relative}.tg-map__map{width:100%;height:100%}.tg-map__map--hide-logo-google .gm-style a[target=_blank]:has(> div > img){display:none!important}.tg-map__map--hide-logo-google .gm-style>div:last-child>div:last-child>div{display:none}.tg-map__map--hide-logo-baidu div.anchorBL>a[target=_blank]>img{display:none}.tg-map__map--hide-logo-baidu div.BMap_cpyCtrl{display:none}.tg-map-widget{position:absolute}.tg-map>.tg-custom-control{display:none}.tg-map .tg-element-overlay{display:none}.tg-map__map .tg-element-overlay{display:block}.tg-map .tg-info-box{display:none}.tg-map__map .tg-info-box{display:block}.tg-map .tg-label{display:none}.tg-map__map .tg-label{display:block}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
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
|
-
var
|
|
4
|
+
var g = (i, t, e) => (qr(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
5
5
|
import { createCommentVNode as yt, computed as fr, defineComponent as L, markRaw as Kr, watch as ke, openBlock as re, createElementBlock as ie, mergeProps as Ce, createElementVNode as Xr, normalizeClass as nt, renderSlot as X, normalizeStyle as Jr, getCurrentInstance as Qr, inject as ei, onMounted as ti, onBeforeUnmount as ri, toRaw as ot, withDirectives as ii, vShow as si } from "vue";
|
|
6
6
|
function se(i, t, e) {
|
|
7
7
|
Object.keys(i).forEach((r) => {
|
|
@@ -25,11 +25,11 @@ var vr = { exports: {} };
|
|
|
25
25
|
i.exports ? i.exports = e() : t.coordtransform = e();
|
|
26
26
|
})(wt, function() {
|
|
27
27
|
var t = 52.35987755982988, e = 3.141592653589793, r = 6378245, s = 0.006693421622965943;
|
|
28
|
-
function n(
|
|
29
|
-
this.west = Math.min(
|
|
28
|
+
function n(m, h, f, M) {
|
|
29
|
+
this.west = Math.min(m, f), this.north = Math.max(h, M), this.east = Math.max(m, f), this.south = Math.min(h, M);
|
|
30
30
|
}
|
|
31
|
-
n.prototype.contain = function(
|
|
32
|
-
return this.west <=
|
|
31
|
+
n.prototype.contain = function(m, h) {
|
|
32
|
+
return this.west <= m && this.east >= m && this.north >= h && this.south <= h;
|
|
33
33
|
};
|
|
34
34
|
var a = [
|
|
35
35
|
new n(79.4462, 49.2204, 96.33, 42.8899),
|
|
@@ -47,70 +47,70 @@ var vr = { exports: {} };
|
|
|
47
47
|
new n(131.2662, 44.8922, 137.0227, 42.5692),
|
|
48
48
|
new n(73.1246, 35.398637, 77.948114, 29.5297)
|
|
49
49
|
];
|
|
50
|
-
function o(
|
|
50
|
+
function o(m, h) {
|
|
51
51
|
for (var f = 0; f < a.length; f++)
|
|
52
|
-
if (a[f].contain(
|
|
52
|
+
if (a[f].contain(m, h)) {
|
|
53
53
|
for (var M = 0; M < c.length; M++)
|
|
54
|
-
if (c[M].contain(
|
|
54
|
+
if (c[M].contain(m, h))
|
|
55
55
|
return !1;
|
|
56
56
|
return !0;
|
|
57
57
|
}
|
|
58
58
|
return !1;
|
|
59
59
|
}
|
|
60
|
-
function l(
|
|
61
|
-
var f =
|
|
60
|
+
function l(m, h) {
|
|
61
|
+
var f = m - 65e-4, M = h - 6e-3, T = Math.sqrt(f * f + M * M) - 2e-5 * Math.sin(M * t), O = Math.atan2(M, f) - 3e-6 * Math.cos(f * t), w = T * Math.cos(O), E = T * Math.sin(O);
|
|
62
62
|
return [w, E];
|
|
63
63
|
}
|
|
64
|
-
function d(
|
|
65
|
-
var f = Math.sqrt(
|
|
64
|
+
function d(m, h) {
|
|
65
|
+
var f = Math.sqrt(m * m + h * h) + 2e-5 * Math.sin(h * t), M = Math.atan2(h, m) + 3e-6 * Math.cos(m * t), T = f * Math.cos(M) + 65e-4, O = f * Math.sin(M) + 6e-3;
|
|
66
66
|
return [T, O];
|
|
67
67
|
}
|
|
68
|
-
function m
|
|
69
|
-
return o(
|
|
68
|
+
function u(m, h) {
|
|
69
|
+
return o(m, h) ? v(m, h) : [m, h];
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
if (!o(
|
|
73
|
-
return [
|
|
74
|
-
var f = v(
|
|
75
|
-
return [
|
|
71
|
+
function p(m, h) {
|
|
72
|
+
if (!o(m, h))
|
|
73
|
+
return [m, h];
|
|
74
|
+
var f = v(m, h);
|
|
75
|
+
return [m * 2 - f[0], h * 2 - f[1]];
|
|
76
76
|
}
|
|
77
|
-
function v(
|
|
78
|
-
var f = b(
|
|
77
|
+
function v(m, h) {
|
|
78
|
+
var f = b(m - 105, h - 35), M = y(m - 105, h - 35), T = h / 180 * e, O = Math.sin(T);
|
|
79
79
|
O = 1 - s * O * O;
|
|
80
80
|
var w = Math.sqrt(O);
|
|
81
81
|
f = f * 180 / (r * (1 - s) / (O * w) * e), M = M * 180 / (r / w * Math.cos(T) * e);
|
|
82
|
-
var E = h + f,
|
|
83
|
-
return [
|
|
82
|
+
var E = h + f, R = m + M;
|
|
83
|
+
return [R, E];
|
|
84
84
|
}
|
|
85
|
-
function b(
|
|
86
|
-
var f = -100 + 2 *
|
|
87
|
-
return f += (20 * Math.sin(6 *
|
|
85
|
+
function b(m, h) {
|
|
86
|
+
var f = -100 + 2 * m + 3 * h + 0.2 * h * h + 0.1 * m * h + 0.2 * Math.sqrt(Math.abs(m));
|
|
87
|
+
return f += (20 * Math.sin(6 * m * e) + 20 * Math.sin(2 * m * e)) * 2 / 3, f += (20 * Math.sin(h * e) + 40 * Math.sin(h / 3 * e)) * 2 / 3, f += (160 * Math.sin(h / 12 * e) + 320 * Math.sin(h * e / 30)) * 2 / 3, f;
|
|
88
88
|
}
|
|
89
|
-
function y(
|
|
90
|
-
var f = 300 +
|
|
91
|
-
return f += (20 * Math.sin(6 *
|
|
89
|
+
function y(m, h) {
|
|
90
|
+
var f = 300 + m + 2 * h + 0.1 * m * m + 0.1 * m * h + 0.1 * Math.sqrt(Math.abs(m));
|
|
91
|
+
return f += (20 * Math.sin(6 * m * e) + 20 * Math.sin(2 * m * e)) * 2 / 3, f += (20 * Math.sin(m * e) + 40 * Math.sin(m / 3 * e)) * 2 / 3, f += (150 * Math.sin(m / 12 * e) + 300 * Math.sin(m / 30 * e)) * 2 / 3, f;
|
|
92
92
|
}
|
|
93
93
|
return {
|
|
94
94
|
// 向前兼容
|
|
95
95
|
bd09togcj02: l,
|
|
96
96
|
gcj02tobd09: d,
|
|
97
|
-
wgs84togcj02:
|
|
98
|
-
gcj02towgs84:
|
|
97
|
+
wgs84togcj02: u,
|
|
98
|
+
gcj02towgs84: p,
|
|
99
99
|
// 小驼峰命名风格
|
|
100
100
|
bd09ToGcj02: l,
|
|
101
101
|
gcj02ToBd09: d,
|
|
102
|
-
wgs84ToGcj02:
|
|
103
|
-
gcj02ToWgs84:
|
|
104
|
-
bd09ToWgs84: function(
|
|
105
|
-
if (!o(
|
|
106
|
-
return [
|
|
107
|
-
var f = l(
|
|
108
|
-
return
|
|
102
|
+
wgs84ToGcj02: u,
|
|
103
|
+
gcj02ToWgs84: p,
|
|
104
|
+
bd09ToWgs84: function(m, h) {
|
|
105
|
+
if (!o(m, h))
|
|
106
|
+
return [m, h];
|
|
107
|
+
var f = l(m, h);
|
|
108
|
+
return p(f[0], f[1]);
|
|
109
109
|
},
|
|
110
|
-
wgs84ToBd09: function(
|
|
111
|
-
if (!o(
|
|
112
|
-
return [
|
|
113
|
-
var f = m
|
|
110
|
+
wgs84ToBd09: function(m, h) {
|
|
111
|
+
if (!o(m, h))
|
|
112
|
+
return [m, h];
|
|
113
|
+
var f = u(m, h);
|
|
114
114
|
return d(f[0], f[1]);
|
|
115
115
|
}
|
|
116
116
|
};
|
|
@@ -287,7 +287,7 @@ const gt = "wgs84", $ = class {
|
|
|
287
287
|
}
|
|
288
288
|
};
|
|
289
289
|
let C = $;
|
|
290
|
-
|
|
290
|
+
g(C, "ZERO", $.create(0, 0));
|
|
291
291
|
const de = class {
|
|
292
292
|
/**
|
|
293
293
|
* 不推荐直接创建LatLngBounds, sw和ne的大小关系可能没法保证, 推荐用LatLngBounds.Builder或者LatLngBounds.from等静态方法来创建
|
|
@@ -295,7 +295,7 @@ const de = class {
|
|
|
295
295
|
* @param ne 东北, lat/lng更大
|
|
296
296
|
*/
|
|
297
297
|
constructor(t, e) {
|
|
298
|
-
|
|
298
|
+
g(this, "coord");
|
|
299
299
|
this.sw = t, this.ne = e, me(t.coord === e.coord, "sw和ne的coord应该相同"), me(Number.isFinite(t.lat) && Number.isFinite(t.lng) && Number.isFinite(e.lat) && Number.isFinite(e.lng), `sw(${t})和ne(${e})不能包含NaN或Infinite`), me(t.lat <= e.lat, `sw.lat(${t.lat})应该比ne.lat(${e.lat})小`), this.coord = t.coord;
|
|
300
300
|
}
|
|
301
301
|
static isBetweenLng(t, e, r) {
|
|
@@ -369,16 +369,16 @@ const de = class {
|
|
|
369
369
|
return [this.sw.toBaidu(t), this.ne.toBaidu(t)];
|
|
370
370
|
}
|
|
371
371
|
};
|
|
372
|
-
let
|
|
373
|
-
|
|
372
|
+
let V = de;
|
|
373
|
+
g(V, "EMPTY", new de(C.ZERO, C.ZERO));
|
|
374
374
|
((i) => {
|
|
375
375
|
class t {
|
|
376
376
|
constructor(r) {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
377
|
+
g(this, "coord");
|
|
378
|
+
g(this, "minLat");
|
|
379
|
+
g(this, "minLng");
|
|
380
|
+
g(this, "maxLat");
|
|
381
|
+
g(this, "maxLng");
|
|
382
382
|
this.coord = r.coord, this.minLat = this.maxLat = r.lat, this.minLng = this.maxLng = r.lng;
|
|
383
383
|
}
|
|
384
384
|
build() {
|
|
@@ -398,7 +398,7 @@ u(F, "EMPTY", new de(C.ZERO, C.ZERO));
|
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
i.Builder = t;
|
|
401
|
-
})(
|
|
401
|
+
})(V || (V = {}));
|
|
402
402
|
var te;
|
|
403
403
|
((i) => {
|
|
404
404
|
function t(r, s) {
|
|
@@ -495,8 +495,8 @@ function or(i, t, e) {
|
|
|
495
495
|
}
|
|
496
496
|
class br {
|
|
497
497
|
constructor(t, e) {
|
|
498
|
-
|
|
499
|
-
|
|
498
|
+
g(this, "eventMap", /* @__PURE__ */ new Map());
|
|
499
|
+
g(this, "target", void 0);
|
|
500
500
|
this.inner = t, this.coordTypeSupplier = e, this.addEventListener = this.addEventListener.bind(this), this.removeEventListener = this.removeEventListener.bind(this);
|
|
501
501
|
}
|
|
502
502
|
setTarget(t) {
|
|
@@ -505,7 +505,7 @@ class br {
|
|
|
505
505
|
}
|
|
506
506
|
class lt {
|
|
507
507
|
constructor(t, e) {
|
|
508
|
-
|
|
508
|
+
g(this, "eventHub", new Tr());
|
|
509
509
|
this.delegate = t, this.options = e;
|
|
510
510
|
}
|
|
511
511
|
notify(t) {
|
|
@@ -556,7 +556,7 @@ const nr = class extends br {
|
|
|
556
556
|
};
|
|
557
557
|
let ue = nr;
|
|
558
558
|
// 事件类型映射: tg => google
|
|
559
|
-
|
|
559
|
+
g(ue, "EVENT_TYPE_MAP", {
|
|
560
560
|
"center-changed": "center_changed",
|
|
561
561
|
"zoom-changed": "zoom_changed",
|
|
562
562
|
"radius-changed": "radius_changed",
|
|
@@ -597,7 +597,7 @@ const rt = class extends br {
|
|
|
597
597
|
let fe = rt;
|
|
598
598
|
// cSpell:words clickclose
|
|
599
599
|
// 事件类型映射, tg => baidu
|
|
600
|
-
|
|
600
|
+
g(fe, "EVENT_TYPE_MAP", {
|
|
601
601
|
drag: "dragging",
|
|
602
602
|
closeclick: "clickclose",
|
|
603
603
|
// baidu不支持contextmenu事件, 将其映射为rightclick
|
|
@@ -607,7 +607,7 @@ u(fe, "EVENT_TYPE_MAP", {
|
|
|
607
607
|
});
|
|
608
608
|
class Tr {
|
|
609
609
|
constructor() {
|
|
610
|
-
|
|
610
|
+
g(this, "typeMap", /* @__PURE__ */ new Map());
|
|
611
611
|
}
|
|
612
612
|
addEventListener(t, e) {
|
|
613
613
|
let r = this.typeMap.get(t);
|
|
@@ -631,8 +631,8 @@ class ar {
|
|
|
631
631
|
* `keys`和`values`数组中可以有相同的值, 若存在相同值, 则index越小的优先级越高
|
|
632
632
|
*/
|
|
633
633
|
constructor(t, e) {
|
|
634
|
-
|
|
635
|
-
|
|
634
|
+
g(this, "keyToValue", /* @__PURE__ */ new Map());
|
|
635
|
+
g(this, "valueToKey", /* @__PURE__ */ new Map());
|
|
636
636
|
me(t.length === e.length);
|
|
637
637
|
for (let r = t.length - 1; r >= 0; r--)
|
|
638
638
|
this.keyToValue.set(t[r], e[r]), this.valueToKey.set(e[r], t[r]);
|
|
@@ -646,7 +646,7 @@ class ar {
|
|
|
646
646
|
}
|
|
647
647
|
class ui {
|
|
648
648
|
constructor(t, e = 10) {
|
|
649
|
-
|
|
649
|
+
g(this, "map", /* @__PURE__ */ new Map());
|
|
650
650
|
this.values = t, this.maxSize4Debug = e;
|
|
651
651
|
}
|
|
652
652
|
/** 获取保存key-value映射的Map */
|
|
@@ -675,7 +675,7 @@ class ui {
|
|
|
675
675
|
}
|
|
676
676
|
class Pe {
|
|
677
677
|
constructor(t) {
|
|
678
|
-
|
|
678
|
+
g(this, "value");
|
|
679
679
|
this.creator = t;
|
|
680
680
|
}
|
|
681
681
|
get() {
|
|
@@ -751,7 +751,7 @@ var k = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
751
751
|
class pi {
|
|
752
752
|
constructor(t) {
|
|
753
753
|
/** 实际添加到地图中的control对象 */
|
|
754
|
-
|
|
754
|
+
g(this, "inner");
|
|
755
755
|
this.position = t;
|
|
756
756
|
}
|
|
757
757
|
}
|
|
@@ -804,8 +804,8 @@ class Pt extends Lt {
|
|
|
804
804
|
class ht extends Lt {
|
|
805
805
|
constructor(e, r) {
|
|
806
806
|
super();
|
|
807
|
-
|
|
808
|
-
|
|
807
|
+
g(this, "visible", !1);
|
|
808
|
+
g(this, "map");
|
|
809
809
|
this._type = e, this.position = r;
|
|
810
810
|
}
|
|
811
811
|
isVisible() {
|
|
@@ -865,14 +865,14 @@ class j {
|
|
|
865
865
|
}
|
|
866
866
|
class pn {
|
|
867
867
|
constructor(t, e) {
|
|
868
|
-
|
|
868
|
+
g(this, "baiduLayerCached", new Pe(() => {
|
|
869
869
|
const t = new BMap.TileLayer({});
|
|
870
870
|
return t.getTilesUrl = (e, r) => {
|
|
871
871
|
const s = Math.pow(2, r - 1), n = e.x + s, a = s - 1 - e.y;
|
|
872
872
|
return this.options.getTileUrl({ x: n, y: a }, r);
|
|
873
873
|
}, t;
|
|
874
874
|
}));
|
|
875
|
-
|
|
875
|
+
g(this, "baiduMapTypeCached", new Pe(() => {
|
|
876
876
|
const t = new BMap.MapType(this.options.name, this.baiduLayerCached.get(), {
|
|
877
877
|
maxZoom: this.options.maxZoom,
|
|
878
878
|
minZoom: this.options.minZoom,
|
|
@@ -880,7 +880,7 @@ class pn {
|
|
|
880
880
|
});
|
|
881
881
|
return t.__baidu_map_type__ = this, t;
|
|
882
882
|
}));
|
|
883
|
-
|
|
883
|
+
g(this, "googleCached", new Pe(() => {
|
|
884
884
|
const t = new google.maps.ImageMapType({
|
|
885
885
|
getTileUrl: (e, r) => this.options.getTileUrl(e, r),
|
|
886
886
|
tileSize: new google.maps.Size(256, 256),
|
|
@@ -917,8 +917,8 @@ class pn {
|
|
|
917
917
|
}
|
|
918
918
|
class mi {
|
|
919
919
|
constructor() {
|
|
920
|
-
|
|
921
|
-
|
|
920
|
+
g(this, "baiduCache", new Pe(() => new BMap.TrafficLayer()));
|
|
921
|
+
g(this, "googleCache", new Pe(() => new google.maps.TrafficLayer()));
|
|
922
922
|
}
|
|
923
923
|
asBaiduLayer() {
|
|
924
924
|
return this.baiduCache.get();
|
|
@@ -927,7 +927,7 @@ class mi {
|
|
|
927
927
|
return this.googleCache.get();
|
|
928
928
|
}
|
|
929
929
|
}
|
|
930
|
-
var
|
|
930
|
+
var F;
|
|
931
931
|
((i) => {
|
|
932
932
|
i.NORMAL = new j("normal", () => BMAP_NORMAL_MAP, () => google.maps.MapTypeId.ROADMAP, A.gcj02), i.SATELLITE = new j("satellite", () => BMAP_SATELLITE_MAP, () => google.maps.MapTypeId.SATELLITE, A.wgs84), i.HYBRID = new j("hybrid", () => BMAP_HYBRID_MAP, () => google.maps.MapTypeId.HYBRID, A.gcj02), i.TERRAIN = new j("terrain", () => (
|
|
933
933
|
/* 三维 */
|
|
@@ -936,9 +936,9 @@ var V;
|
|
|
936
936
|
/* 地形 */
|
|
937
937
|
google.maps.MapTypeId.TERRAIN
|
|
938
938
|
), A.wgs84), i.BUILD_IN_MAP_TYPES = new ui([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
|
|
939
|
-
})(
|
|
939
|
+
})(F || (F = {}));
|
|
940
940
|
var Cr = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(Cr || {});
|
|
941
|
-
const Or = [
|
|
941
|
+
const Or = [F.NORMAL, F.SATELLITE, F.HYBRID];
|
|
942
942
|
class Bt extends Pt {
|
|
943
943
|
static create(t) {
|
|
944
944
|
const e = t.mapTypes ?? Or, r = {
|
|
@@ -973,8 +973,8 @@ const ge = class extends ht {
|
|
|
973
973
|
});
|
|
974
974
|
}
|
|
975
975
|
};
|
|
976
|
-
let
|
|
977
|
-
|
|
976
|
+
let Ve = ge;
|
|
977
|
+
g(Ve, "type2google");
|
|
978
978
|
class It extends Pt {
|
|
979
979
|
static create(t) {
|
|
980
980
|
const e = new BMap.ScaleControl({
|
|
@@ -1004,19 +1004,19 @@ class At extends ht {
|
|
|
1004
1004
|
super("streetView", t);
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
|
-
class
|
|
1007
|
+
class Rt extends Pt {
|
|
1008
1008
|
static create(t) {
|
|
1009
1009
|
const e = new BMap.NavigationControl({
|
|
1010
1010
|
type: BMAP_NAVIGATION_CONTROL_ZOOM,
|
|
1011
1011
|
// enableGeolocation: true,
|
|
1012
1012
|
anchor: t.position && Y.getBaidu().toValue(t.position)
|
|
1013
1013
|
});
|
|
1014
|
-
return new
|
|
1014
|
+
return new Rt(e, t.position);
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
|
-
class
|
|
1017
|
+
class Dt extends ht {
|
|
1018
1018
|
static create(t) {
|
|
1019
|
-
return new
|
|
1019
|
+
return new Dt(t.position);
|
|
1020
1020
|
}
|
|
1021
1021
|
constructor(t = k.RIGHT_BOTTOM) {
|
|
1022
1022
|
super("zoom", t);
|
|
@@ -1024,14 +1024,14 @@ class Rt extends ht {
|
|
|
1024
1024
|
}
|
|
1025
1025
|
function fi(i) {
|
|
1026
1026
|
let t, e, r;
|
|
1027
|
-
const s = "The Google Maps JavaScript API", n = "google", a = "importLibrary", c = "__ib__", o = document, l = window, d = l[n] || (l[n] = {}),
|
|
1027
|
+
const s = "The Google Maps JavaScript API", n = "google", a = "importLibrary", c = "__ib__", o = document, l = window, d = l[n] || (l[n] = {}), u = d.maps || (d.maps = {}), p = /* @__PURE__ */ new Set(), v = new URLSearchParams(), b = () => t || (t = new Promise(async (y, m) => {
|
|
1028
1028
|
var h;
|
|
1029
|
-
await (e = o.createElement("script")), v.set("libraries", [...
|
|
1029
|
+
await (e = o.createElement("script")), v.set("libraries", [...p] + "");
|
|
1030
1030
|
for (r in i)
|
|
1031
1031
|
v.set(r.replace(/[A-Z]/g, (f) => "_" + f[0].toLowerCase()), i[r]);
|
|
1032
|
-
v.set("callback", n + ".maps." + c), e.src = `https://maps.${n}apis.com/maps/api/js?` + v,
|
|
1032
|
+
v.set("callback", n + ".maps." + c), e.src = `https://maps.${n}apis.com/maps/api/js?` + v, u[c] = y, e.onerror = () => t = m(Error(s + " could not load.")), e.nonce = ((h = o.querySelector("script[nonce]")) == null ? void 0 : h.nonce) || "", o.head.append(e);
|
|
1033
1033
|
}));
|
|
1034
|
-
|
|
1034
|
+
u[a] ? console.warn(s + " only loads once. Ignoring:", i) : u[a] = (y, ...m) => p.add(y) && b().then(() => u[a](y, ...m));
|
|
1035
1035
|
}
|
|
1036
1036
|
let vi, yi;
|
|
1037
1037
|
const le = {
|
|
@@ -1086,7 +1086,7 @@ class Er {
|
|
|
1086
1086
|
class _i extends Er {
|
|
1087
1087
|
constructor(e, r) {
|
|
1088
1088
|
super();
|
|
1089
|
-
|
|
1089
|
+
g(this, "inner");
|
|
1090
1090
|
this.map = e, this.inner = new google.maps.places.Autocomplete(r.input, {
|
|
1091
1091
|
fields: [
|
|
1092
1092
|
"address_components",
|
|
@@ -1116,10 +1116,10 @@ class _i extends Er {
|
|
|
1116
1116
|
class bi extends Er {
|
|
1117
1117
|
constructor(e, r) {
|
|
1118
1118
|
super();
|
|
1119
|
-
|
|
1120
|
-
|
|
1119
|
+
g(this, "inner");
|
|
1120
|
+
g(this, "input");
|
|
1121
1121
|
// TODO: 要不要添加个移除监听的方法?
|
|
1122
|
-
|
|
1122
|
+
g(this, "removeableArray", []);
|
|
1123
1123
|
if (this.map = e, this.input = r.input, this.inner = new BMap.Autocomplete({
|
|
1124
1124
|
input: r.input,
|
|
1125
1125
|
location: r.bindToMap ? e.innerMap : void 0
|
|
@@ -1176,31 +1176,31 @@ var Lr = { exports: {} };
|
|
|
1176
1176
|
defaultValueField: "value",
|
|
1177
1177
|
plugins: {}
|
|
1178
1178
|
}, a = function() {
|
|
1179
|
-
var v = function(
|
|
1180
|
-
this._coordinator = {}, this._data = [], this._radi = [], this._min = 0, this._max = 1, this._xField =
|
|
1179
|
+
var v = function(m) {
|
|
1180
|
+
this._coordinator = {}, this._data = [], this._radi = [], this._min = 0, this._max = 1, this._xField = m.xField || m.defaultXField, this._yField = m.yField || m.defaultYField, this._valueField = m.valueField || m.defaultValueField, m.radius && (this._cfgRadius = m.radius);
|
|
1181
1181
|
}, b = n.defaultRadius;
|
|
1182
1182
|
return v.prototype = {
|
|
1183
1183
|
// when forceRender = false -> called from setData, omits renderall event
|
|
1184
|
-
_organiseData: function(y,
|
|
1185
|
-
var h = y[this._xField], f = y[this._yField], M = this._radi, T = this._data, O = this._max, w = this._min, E = y[this._valueField] || 1,
|
|
1186
|
-
return T[h] || (T[h] = [], M[h] = []), T[h][f] ? T[h][f] += E : (T[h][f] = E, M[h][f] =
|
|
1184
|
+
_organiseData: function(y, m) {
|
|
1185
|
+
var h = y[this._xField], f = y[this._yField], M = this._radi, T = this._data, O = this._max, w = this._min, E = y[this._valueField] || 1, R = y.radius || this._cfgRadius || b;
|
|
1186
|
+
return T[h] || (T[h] = [], M[h] = []), T[h][f] ? T[h][f] += E : (T[h][f] = E, M[h][f] = R), T[h][f] > O ? (m ? this.setDataMax(T[h][f]) : this._max = T[h][f], !1) : {
|
|
1187
1187
|
x: h,
|
|
1188
1188
|
y: f,
|
|
1189
1189
|
value: E,
|
|
1190
|
-
radius:
|
|
1190
|
+
radius: R,
|
|
1191
1191
|
min: w,
|
|
1192
1192
|
max: O
|
|
1193
1193
|
};
|
|
1194
1194
|
},
|
|
1195
1195
|
_unOrganizeData: function() {
|
|
1196
|
-
var y = [],
|
|
1197
|
-
for (var f in
|
|
1198
|
-
for (var M in
|
|
1196
|
+
var y = [], m = this._data, h = this._radi;
|
|
1197
|
+
for (var f in m)
|
|
1198
|
+
for (var M in m[f])
|
|
1199
1199
|
y.push({
|
|
1200
1200
|
x: f,
|
|
1201
1201
|
y: M,
|
|
1202
1202
|
radius: h[f][M],
|
|
1203
|
-
value:
|
|
1203
|
+
value: m[f][M]
|
|
1204
1204
|
});
|
|
1205
1205
|
return {
|
|
1206
1206
|
min: this._min,
|
|
@@ -1216,8 +1216,8 @@ var Lr = { exports: {} };
|
|
|
1216
1216
|
},
|
|
1217
1217
|
addData: function() {
|
|
1218
1218
|
if (arguments[0].length > 0)
|
|
1219
|
-
for (var y = arguments[0],
|
|
1220
|
-
this.addData.call(this, y[
|
|
1219
|
+
for (var y = arguments[0], m = y.length; m--; )
|
|
1220
|
+
this.addData.call(this, y[m]);
|
|
1221
1221
|
else {
|
|
1222
1222
|
var h = this._organiseData(arguments[0], !0);
|
|
1223
1223
|
h && this._coordinator.emit("renderpartial", {
|
|
@@ -1229,10 +1229,10 @@ var Lr = { exports: {} };
|
|
|
1229
1229
|
return this;
|
|
1230
1230
|
},
|
|
1231
1231
|
setData: function(y) {
|
|
1232
|
-
var
|
|
1232
|
+
var m = y.data, h = m.length;
|
|
1233
1233
|
this._data = [], this._radi = [];
|
|
1234
1234
|
for (var f = 0; f < h; f++)
|
|
1235
|
-
this._organiseData(
|
|
1235
|
+
this._organiseData(m[f], !1);
|
|
1236
1236
|
return this._max = y.max, this._min = y.min || 0, this._onExtremaChange(), this._coordinator.emit("renderall", this._getInternalData()), this;
|
|
1237
1237
|
},
|
|
1238
1238
|
removeData: function() {
|
|
@@ -1314,8 +1314,8 @@ var Lr = { exports: {} };
|
|
|
1314
1314
|
}
|
|
1315
1315
|
return M;
|
|
1316
1316
|
}, y = function(w) {
|
|
1317
|
-
for (var f = [], M = w.min, T = w.max, O = w.radi, w = w.data, E = Object.keys(w),
|
|
1318
|
-
for (var G = E[
|
|
1317
|
+
for (var f = [], M = w.min, T = w.max, O = w.radi, w = w.data, E = Object.keys(w), R = E.length; R--; )
|
|
1318
|
+
for (var G = E[R], P = Object.keys(w[G]), J = P.length; J--; ) {
|
|
1319
1319
|
var I = P[J], Z = w[G][I], Q = O[G][I];
|
|
1320
1320
|
f.push({
|
|
1321
1321
|
x: G,
|
|
@@ -1330,13 +1330,13 @@ var Lr = { exports: {} };
|
|
|
1330
1330
|
data: f
|
|
1331
1331
|
};
|
|
1332
1332
|
};
|
|
1333
|
-
function
|
|
1333
|
+
function m(h) {
|
|
1334
1334
|
var f = h.element, M = this.shadowCanvas = document.createElement("canvas"), T = this.canvas = h.canvas || document.createElement("canvas");
|
|
1335
1335
|
this._renderBoundaries = [1e4, 1e4, 0, 0];
|
|
1336
1336
|
var O = getComputedStyle(h.element) || {};
|
|
1337
1337
|
T.className = "heatmap-canvas", this._width = T.width = M.width = +O.width.replace(/px/, ""), this._height = T.height = M.height = +O.height.replace(/px/, ""), this.shadowCtx = M.getContext("2d"), this.ctx = T.getContext("2d"), T.style.cssText = M.style.cssText = "position:absolute;left:0;top:0;", f.style.position = "relative", f.appendChild(T), this._palette = v(h), this._templates = {}, this._setStyles(h);
|
|
1338
1338
|
}
|
|
1339
|
-
return
|
|
1339
|
+
return m.prototype = {
|
|
1340
1340
|
renderPartial: function(h) {
|
|
1341
1341
|
this._drawAlpha(h), this._colorize();
|
|
1342
1342
|
},
|
|
@@ -1360,18 +1360,18 @@ var Lr = { exports: {} };
|
|
|
1360
1360
|
},
|
|
1361
1361
|
_drawAlpha: function(T) {
|
|
1362
1362
|
for (var f = this._min = T.min, M = this._max = T.max, T = T.data || [], O = T.length, w = 1 - this._blur; O--; ) {
|
|
1363
|
-
var E = T[O],
|
|
1363
|
+
var E = T[O], R = E.x, G = E.y, P = E.radius, J = Math.min(E.value, M), I = R - P, Z = G - P, Q = this.shadowCtx, W;
|
|
1364
1364
|
this._templates[P] ? W = this._templates[P] : this._templates[P] = W = b(P, w), Q.globalAlpha = (J - f) / (M - f), Q.drawImage(W, I, Z), I < this._renderBoundaries[0] && (this._renderBoundaries[0] = I), Z < this._renderBoundaries[1] && (this._renderBoundaries[1] = Z), I + 2 * P > this._renderBoundaries[2] && (this._renderBoundaries[2] = I + 2 * P), Z + 2 * P > this._renderBoundaries[3] && (this._renderBoundaries[3] = Z + 2 * P);
|
|
1365
1365
|
}
|
|
1366
1366
|
},
|
|
1367
1367
|
_colorize: function() {
|
|
1368
|
-
var h = this._renderBoundaries[0], f = this._renderBoundaries[1], M = this._renderBoundaries[2] - h, T = this._renderBoundaries[3] - f, O = this._width, w = this._height, E = this._opacity,
|
|
1368
|
+
var h = this._renderBoundaries[0], f = this._renderBoundaries[1], M = this._renderBoundaries[2] - h, T = this._renderBoundaries[3] - f, O = this._width, w = this._height, E = this._opacity, R = this._maxOpacity, G = this._minOpacity, P = this._useGradientOpacity;
|
|
1369
1369
|
h < 0 && (h = 0), f < 0 && (f = 0), h + M > O && (M = O - h), f + T > w && (T = w - f);
|
|
1370
1370
|
for (var J = this.shadowCtx.getImageData(h, f, M, T), I = J.data, Z = I.length, Q = this._palette, W = 3; W < Z; W += 4) {
|
|
1371
1371
|
var We = I[W], Oe = We * 4;
|
|
1372
1372
|
if (Oe) {
|
|
1373
1373
|
var we;
|
|
1374
|
-
E > 0 ? we = E : We <
|
|
1374
|
+
E > 0 ? we = E : We < R ? We < G ? we = G : we = We : we = R, I[W - 3] = Q[Oe], I[W - 2] = Q[Oe + 1], I[W - 1] = Q[Oe + 2], I[W] = P ? Q[Oe + 3] : we;
|
|
1375
1375
|
}
|
|
1376
1376
|
}
|
|
1377
1377
|
this.ctx.putImageData(J, h, f), this._renderBoundaries = [1e3, 1e3, 0, 0];
|
|
@@ -1383,18 +1383,18 @@ var Lr = { exports: {} };
|
|
|
1383
1383
|
getDataURL: function() {
|
|
1384
1384
|
return this.canvas.toDataURL();
|
|
1385
1385
|
}
|
|
1386
|
-
},
|
|
1386
|
+
}, m;
|
|
1387
1387
|
}(), o = function() {
|
|
1388
1388
|
var v = !1;
|
|
1389
1389
|
return n.defaultRenderer === "canvas2d" && (v = c), v;
|
|
1390
1390
|
}(), l = {
|
|
1391
1391
|
merge: function() {
|
|
1392
|
-
for (var
|
|
1392
|
+
for (var p = {}, v = arguments.length, b = 0; b < v; b++) {
|
|
1393
1393
|
var y = arguments[b];
|
|
1394
|
-
for (var
|
|
1395
|
-
|
|
1394
|
+
for (var m in y)
|
|
1395
|
+
p[m] = y[m];
|
|
1396
1396
|
}
|
|
1397
|
-
return
|
|
1397
|
+
return p;
|
|
1398
1398
|
}
|
|
1399
1399
|
}, d = function() {
|
|
1400
1400
|
var v = function() {
|
|
@@ -1417,27 +1417,27 @@ var Lr = { exports: {} };
|
|
|
1417
1417
|
}
|
|
1418
1418
|
}
|
|
1419
1419
|
}, h;
|
|
1420
|
-
}(), b = function(
|
|
1421
|
-
var h =
|
|
1420
|
+
}(), b = function(m) {
|
|
1421
|
+
var h = m._renderer, f = m._coordinator, M = m._store;
|
|
1422
1422
|
f.on("renderpartial", h.renderPartial, h), f.on("renderall", h.renderAll, h), f.on("extremachange", function(T) {
|
|
1423
|
-
|
|
1423
|
+
m._config.onExtremaChange && m._config.onExtremaChange({
|
|
1424
1424
|
min: T.min,
|
|
1425
1425
|
max: T.max,
|
|
1426
|
-
gradient:
|
|
1426
|
+
gradient: m._config.gradient || m._config.defaultGradient
|
|
1427
1427
|
});
|
|
1428
1428
|
}), M.setCoordinator(f);
|
|
1429
1429
|
};
|
|
1430
1430
|
function y() {
|
|
1431
|
-
var
|
|
1432
|
-
if (this._coordinator = new v(),
|
|
1433
|
-
var h =
|
|
1431
|
+
var m = this._config = l.merge(n, arguments[0] || {});
|
|
1432
|
+
if (this._coordinator = new v(), m.plugin) {
|
|
1433
|
+
var h = m.plugin;
|
|
1434
1434
|
if (n.plugins[h]) {
|
|
1435
1435
|
var f = n.plugins[h];
|
|
1436
|
-
this._renderer = new f.renderer(
|
|
1436
|
+
this._renderer = new f.renderer(m), this._store = new f.store(m);
|
|
1437
1437
|
} else
|
|
1438
1438
|
throw new Error("Plugin '" + h + "' not found. Maybe it was not registered.");
|
|
1439
1439
|
} else
|
|
1440
|
-
this._renderer = new o(
|
|
1440
|
+
this._renderer = new o(m), this._store = new a(m);
|
|
1441
1441
|
b(this);
|
|
1442
1442
|
}
|
|
1443
1443
|
return y.prototype = {
|
|
@@ -1456,9 +1456,9 @@ var Lr = { exports: {} };
|
|
|
1456
1456
|
setDataMin: function() {
|
|
1457
1457
|
return this._store.setDataMin.apply(this._store, arguments), this;
|
|
1458
1458
|
},
|
|
1459
|
-
configure: function(
|
|
1459
|
+
configure: function(m) {
|
|
1460
1460
|
const h = this._config;
|
|
1461
|
-
return this._config = l.merge(this._config,
|
|
1461
|
+
return this._config = l.merge(this._config, m), this._renderer.updateConfig(this._config, h), this._coordinator.emit("renderall", this._store._getInternalData()), this;
|
|
1462
1462
|
},
|
|
1463
1463
|
repaint: function() {
|
|
1464
1464
|
return this._coordinator.emit("renderall", this._store._getInternalData()), this;
|
|
@@ -1469,19 +1469,19 @@ var Lr = { exports: {} };
|
|
|
1469
1469
|
getDataURL: function() {
|
|
1470
1470
|
return this._renderer.getDataURL();
|
|
1471
1471
|
},
|
|
1472
|
-
getValueAt: function(
|
|
1473
|
-
return this._store.getValueAt ? this._store.getValueAt(
|
|
1472
|
+
getValueAt: function(m) {
|
|
1473
|
+
return this._store.getValueAt ? this._store.getValueAt(m) : this._renderer.getValueAt ? this._renderer.getValueAt(m) : null;
|
|
1474
1474
|
}
|
|
1475
1475
|
}, y;
|
|
1476
|
-
}(),
|
|
1477
|
-
create: function(
|
|
1478
|
-
return new d(
|
|
1476
|
+
}(), u = {
|
|
1477
|
+
create: function(p) {
|
|
1478
|
+
return new d(p);
|
|
1479
1479
|
},
|
|
1480
|
-
register: function(
|
|
1481
|
-
n.plugins[
|
|
1480
|
+
register: function(p, v) {
|
|
1481
|
+
n.plugins[p] = v;
|
|
1482
1482
|
}
|
|
1483
1483
|
};
|
|
1484
|
-
return
|
|
1484
|
+
return u;
|
|
1485
1485
|
}();
|
|
1486
1486
|
var r = function(n) {
|
|
1487
1487
|
Reflect.getPrototypeOf(r.prototype) !== BMap.Overlay.prototype && Reflect.setPrototypeOf(r.prototype, BMap.Overlay.prototype), this.conf = n, this.conf.visible = n.visible === void 0 ? !0 : n.visible, this.heatmap = null, this.latlngs = [], this.bounds = null;
|
|
@@ -1502,22 +1502,22 @@ var Lr = { exports: {} };
|
|
|
1502
1502
|
var n = this._map.getBounds();
|
|
1503
1503
|
if (!n.equals(this.bounds)) {
|
|
1504
1504
|
this.bounds = n;
|
|
1505
|
-
var a = this._map.pointToOverlayPixel(n.getNorthEast()), c = this._map.pointToOverlayPixel(n.getSouthWest()), o = a.y, l = c.x, d = c.y - a.y,
|
|
1506
|
-
if (this.conf.element.style.left = l + "px", this.conf.element.style.top = o + "px", this.conf.element.style.width =
|
|
1505
|
+
var a = this._map.pointToOverlayPixel(n.getNorthEast()), c = this._map.pointToOverlayPixel(n.getSouthWest()), o = a.y, l = c.x, d = c.y - a.y, u = a.x - c.x;
|
|
1506
|
+
if (this.conf.element.style.left = l + "px", this.conf.element.style.top = o + "px", this.conf.element.style.width = u + "px", this.conf.element.style.height = d + "px", this.latlngs.length > 0) {
|
|
1507
1507
|
this.heatmap.removeData();
|
|
1508
|
-
var
|
|
1508
|
+
var p = this.latlngs.length;
|
|
1509
1509
|
const h = {
|
|
1510
1510
|
max: this.heatmap._store.getData().max,
|
|
1511
1511
|
data: []
|
|
1512
1512
|
};
|
|
1513
|
-
for (;
|
|
1514
|
-
var v = this.latlngs[
|
|
1513
|
+
for (; p--; ) {
|
|
1514
|
+
var v = this.latlngs[p].latlng;
|
|
1515
1515
|
if (n.containsPoint(v)) {
|
|
1516
|
-
var b = this._map.pointToOverlayPixel(v), l = this._map.pointToOverlayPixel(n.getSouthWest()).x, o = this._map.pointToOverlayPixel(n.getNorthEast()).y, y = new BMap.Pixel(b.x - l, b.y - o),
|
|
1516
|
+
var b = this._map.pointToOverlayPixel(v), l = this._map.pointToOverlayPixel(n.getSouthWest()).x, o = this._map.pointToOverlayPixel(n.getNorthEast()).y, y = new BMap.Pixel(b.x - l, b.y - o), m = this.pixelTransform(y);
|
|
1517
1517
|
h.data.push({
|
|
1518
|
-
x:
|
|
1519
|
-
y:
|
|
1520
|
-
count: this.latlngs[
|
|
1518
|
+
x: m.x,
|
|
1519
|
+
y: m.y,
|
|
1520
|
+
count: this.latlngs[p].c
|
|
1521
1521
|
});
|
|
1522
1522
|
}
|
|
1523
1523
|
}
|
|
@@ -1547,7 +1547,7 @@ var Lr = { exports: {} };
|
|
|
1547
1547
|
latlng: d,
|
|
1548
1548
|
c: o[l].count
|
|
1549
1549
|
}), !!a.containsPoint(d)) {
|
|
1550
|
-
var
|
|
1550
|
+
var u = this._map.pointToOverlayPixel(d), p = this._map.pointToOverlayPixel(a.getSouthWest()).x, v = this._map.pointToOverlayPixel(a.getNorthEast()).y, b = new BMap.Pixel(u.x - p, u.y - v), y = this.pixelTransform(b);
|
|
1551
1551
|
c.data.push({
|
|
1552
1552
|
x: y.x,
|
|
1553
1553
|
y: y.y,
|
|
@@ -1619,7 +1619,7 @@ class Pr {
|
|
|
1619
1619
|
class Ci extends Pr {
|
|
1620
1620
|
constructor(e, r) {
|
|
1621
1621
|
super();
|
|
1622
|
-
|
|
1622
|
+
g(this, "inner");
|
|
1623
1623
|
this.map = e, this.inner = new google.maps.visualization.HeatmapLayer(qe.toGoogle(r, this.map.coordType)), this.inner.setMap(e.innerMap);
|
|
1624
1624
|
}
|
|
1625
1625
|
setData(e) {
|
|
@@ -1635,7 +1635,7 @@ class Ci extends Pr {
|
|
|
1635
1635
|
class Oi extends Pr {
|
|
1636
1636
|
constructor(e, r) {
|
|
1637
1637
|
super();
|
|
1638
|
-
|
|
1638
|
+
g(this, "inner");
|
|
1639
1639
|
this.map = e;
|
|
1640
1640
|
const s = qe.toBaidu(r, this.map.coordType, r.maxIntensity);
|
|
1641
1641
|
this.inner = new Mi(s), e.innerMap.addOverlay(this.inner), this.inner.setDataSet(s.data);
|
|
@@ -1698,8 +1698,8 @@ const it = class extends Br {
|
|
|
1698
1698
|
});
|
|
1699
1699
|
}
|
|
1700
1700
|
};
|
|
1701
|
-
let
|
|
1702
|
-
|
|
1701
|
+
let Fe = it;
|
|
1702
|
+
g(Fe, "BASE_URL", "https://www.google.com/maps/");
|
|
1703
1703
|
const Se = class extends Br {
|
|
1704
1704
|
/**
|
|
1705
1705
|
* 导航
|
|
@@ -1762,7 +1762,7 @@ const Se = class extends Br {
|
|
|
1762
1762
|
}
|
|
1763
1763
|
};
|
|
1764
1764
|
let Ue = Se;
|
|
1765
|
-
|
|
1765
|
+
g(Ue, "BASE_URL", "https://api.map.baidu.com/");
|
|
1766
1766
|
let wi = class Ir {
|
|
1767
1767
|
constructor(t, e, r) {
|
|
1768
1768
|
this.extend(Ir, google.maps.OverlayView), this.map_ = t, this.MARKER_CLUSTER_IMAGE_PATH_ = "../images/m", this.MARKER_CLUSTER_IMAGE_EXTENSION_ = "png", this.markers_ = [], this.clusters_ = [], this.sizes = [53, 56, 66, 78, 90], this.styles_ = [], this.ready_ = !1;
|
|
@@ -2486,10 +2486,10 @@ var Sr = { exports: {} };
|
|
|
2486
2486
|
return r.lang.isString(o) ? document.getElementById(o) : o;
|
|
2487
2487
|
}, r._g = r.dom._g, r.browser = r.browser || {}, /msie (\d+\.\d)/i.test(navigator.userAgent) && (r.browser.ie = r.ie = document.documentMode || +RegExp.$1), r.dom.getComputedStyle = function(o, l) {
|
|
2488
2488
|
o = r.dom._g(o);
|
|
2489
|
-
var d = r.dom.getDocument(o),
|
|
2490
|
-
return d.defaultView && d.defaultView.getComputedStyle && (
|
|
2489
|
+
var d = r.dom.getDocument(o), u;
|
|
2490
|
+
return d.defaultView && d.defaultView.getComputedStyle && (u = d.defaultView.getComputedStyle(o, null), u) ? u[l] || u.getPropertyValue(l) : "";
|
|
2491
2491
|
}, r.dom._styleFixer = r.dom._styleFixer || {}, r.dom._styleFilter = r.dom._styleFilter || [], r.dom._styleFilter.filter = function(o, l, d) {
|
|
2492
|
-
for (var
|
|
2492
|
+
for (var u = 0, p = r.dom._styleFilter, v; v = p[u]; u++)
|
|
2493
2493
|
(v = v[d]) && (l = v(o, l));
|
|
2494
2494
|
return l;
|
|
2495
2495
|
}, r.string = r.string || {}, r.string.toCamelCase = function(o) {
|
|
@@ -2499,42 +2499,42 @@ var Sr = { exports: {} };
|
|
|
2499
2499
|
}, r.dom.getStyle = function(o, l) {
|
|
2500
2500
|
var d = r.dom;
|
|
2501
2501
|
o = d.g(o), l = r.string.toCamelCase(l);
|
|
2502
|
-
var
|
|
2503
|
-
if (!
|
|
2504
|
-
var
|
|
2505
|
-
|
|
2502
|
+
var u = o.style[l] || (o.currentStyle ? o.currentStyle[l] : "") || d.getComputedStyle(o, l);
|
|
2503
|
+
if (!u) {
|
|
2504
|
+
var p = d._styleFixer[l];
|
|
2505
|
+
p && (u = p.get ? p.get(o) : r.dom.getStyle(o, p));
|
|
2506
2506
|
}
|
|
2507
|
-
return (
|
|
2507
|
+
return (p = d._styleFilter) && (u = p.filter(l, u, "get")), u;
|
|
2508
2508
|
}, r.getStyle = r.dom.getStyle, /opera\/(\d+\.\d)/i.test(navigator.userAgent) && (r.browser.opera = +RegExp.$1), r.browser.isWebkit = /webkit/i.test(navigator.userAgent), r.browser.isGecko = /gecko/i.test(navigator.userAgent) && !/like gecko/i.test(navigator.userAgent), r.browser.isStrict = document.compatMode == "CSS1Compat", r.dom.getPosition = function(o) {
|
|
2509
2509
|
o = r.dom.g(o);
|
|
2510
|
-
var l = r.dom.getDocument(o), d = r.browser,
|
|
2511
|
-
d.isGecko > 0 && l.getBoxObjectFor &&
|
|
2512
|
-
var
|
|
2510
|
+
var l = r.dom.getDocument(o), d = r.browser, u = r.dom.getStyle;
|
|
2511
|
+
d.isGecko > 0 && l.getBoxObjectFor && u(o, "position") == "absolute" && (o.style.top === "" || o.style.left);
|
|
2512
|
+
var p = { left: 0, top: 0 }, v = d.ie && !d.isStrict ? l.body : l.documentElement, b, y;
|
|
2513
2513
|
if (o == v)
|
|
2514
|
-
return
|
|
2514
|
+
return p;
|
|
2515
2515
|
if (o.getBoundingClientRect) {
|
|
2516
|
-
y = o.getBoundingClientRect(),
|
|
2517
|
-
var
|
|
2518
|
-
d.ie && !d.isStrict && (
|
|
2516
|
+
y = o.getBoundingClientRect(), p.left = Math.floor(y.left) + Math.max(l.documentElement.scrollLeft, l.body.scrollLeft), p.top = Math.floor(y.top) + Math.max(l.documentElement.scrollTop, l.body.scrollTop), p.left -= l.documentElement.clientLeft, p.top -= l.documentElement.clientTop;
|
|
2517
|
+
var m = l.body, h = parseInt(u(m, "borderLeftWidth")), f = parseInt(u(m, "borderTopWidth"));
|
|
2518
|
+
d.ie && !d.isStrict && (p.left -= isNaN(h) ? 2 : h, p.top -= isNaN(f) ? 2 : f);
|
|
2519
2519
|
} else {
|
|
2520
2520
|
b = o;
|
|
2521
2521
|
do {
|
|
2522
|
-
if (
|
|
2523
|
-
|
|
2522
|
+
if (p.left += b.offsetLeft, p.top += b.offsetTop, d.isWebkit > 0 && u(b, "position") == "fixed") {
|
|
2523
|
+
p.left += l.body.scrollLeft, p.top += l.body.scrollTop;
|
|
2524
2524
|
break;
|
|
2525
2525
|
}
|
|
2526
2526
|
b = b.offsetParent;
|
|
2527
2527
|
} while (b && b != o);
|
|
2528
|
-
for ((d.opera > 0 || d.isWebkit > 0 &&
|
|
2529
|
-
|
|
2528
|
+
for ((d.opera > 0 || d.isWebkit > 0 && u(o, "position") == "absolute") && (p.top -= l.body.offsetTop), b = o.offsetParent; b && b != l.body; )
|
|
2529
|
+
p.left -= b.scrollLeft, (!d.opera || b.tagName != "TR") && (p.top -= b.scrollTop), b = b.offsetParent;
|
|
2530
2530
|
}
|
|
2531
|
-
return
|
|
2531
|
+
return p;
|
|
2532
2532
|
}, r.event = r.event || {}, r.event._listeners = r.event._listeners || [], r.event.on = function(o, l, d) {
|
|
2533
2533
|
l = l.replace(/^on/i, ""), o = r.dom._g(o);
|
|
2534
|
-
var
|
|
2535
|
-
d.call(o,
|
|
2536
|
-
},
|
|
2537
|
-
return l = l.toLowerCase(), v && v[l] && (b = v[l](o, l,
|
|
2534
|
+
var u = function(m) {
|
|
2535
|
+
d.call(o, m);
|
|
2536
|
+
}, p = r.event._listeners, v = r.event._eventFilter, b, y = l;
|
|
2537
|
+
return l = l.toLowerCase(), v && v[l] && (b = v[l](o, l, u), y = b.type, u = b.listener), o.addEventListener ? o.addEventListener(y, u, !1) : o.attachEvent && o.attachEvent("on" + y, u), p[p.length] = [o, l, d, u, y], o;
|
|
2538
2538
|
}, r.on = r.event.on, function() {
|
|
2539
2539
|
var o = s[r.guid];
|
|
2540
2540
|
r.lang.guid = function() {
|
|
@@ -2556,13 +2556,13 @@ var Sr = { exports: {} };
|
|
|
2556
2556
|
}, r.lang.Class.prototype.addEventListener = function(o, l, d) {
|
|
2557
2557
|
if (r.lang.isFunction(l)) {
|
|
2558
2558
|
!this.__listeners && (this.__listeners = {});
|
|
2559
|
-
var
|
|
2559
|
+
var u = this.__listeners, p;
|
|
2560
2560
|
if (typeof d == "string" && d) {
|
|
2561
2561
|
if (/[^\w\-]/.test(d))
|
|
2562
2562
|
throw "nonstandard key:" + d;
|
|
2563
|
-
l.hashCode = d,
|
|
2563
|
+
l.hashCode = d, p = d;
|
|
2564
2564
|
}
|
|
2565
|
-
o.indexOf("on") != 0 && (o = "on" + o), typeof
|
|
2565
|
+
o.indexOf("on") != 0 && (o = "on" + o), typeof u[o] != "object" && (u[o] = {}), p = p || r.lang.guid(), l.hashCode = p, u[o][p] = l;
|
|
2566
2566
|
}
|
|
2567
2567
|
}, r.lang.Class.prototype.removeEventListener = function(o, l) {
|
|
2568
2568
|
if (!(typeof l < "u" && (r.lang.isFunction(l) && !(l = l.hashCode) || !r.lang.isString(l)))) {
|
|
@@ -2572,24 +2572,24 @@ var Sr = { exports: {} };
|
|
|
2572
2572
|
if (typeof l < "u")
|
|
2573
2573
|
d[o][l] && delete d[o][l];
|
|
2574
2574
|
else
|
|
2575
|
-
for (var
|
|
2576
|
-
delete d[o][
|
|
2575
|
+
for (var u in d[o])
|
|
2576
|
+
delete d[o][u];
|
|
2577
2577
|
}
|
|
2578
2578
|
}, r.lang.Class.prototype.dispatchEvent = function(o, l) {
|
|
2579
2579
|
r.lang.isString(o) && (o = new r.lang.Event(o)), !this.__listeners && (this.__listeners = {}), l = l || {};
|
|
2580
2580
|
for (var d in l)
|
|
2581
2581
|
o[d] = l[d];
|
|
2582
|
-
var d,
|
|
2583
|
-
if (o.target = o.target || this, o.currentTarget = this,
|
|
2584
|
-
for (d in
|
|
2585
|
-
|
|
2582
|
+
var d, u = this.__listeners, p = o.type;
|
|
2583
|
+
if (o.target = o.target || this, o.currentTarget = this, p.indexOf("on") != 0 && (p = "on" + p), r.lang.isFunction(this[p]) && this[p].apply(this, arguments), typeof u[p] == "object")
|
|
2584
|
+
for (d in u[p])
|
|
2585
|
+
u[p][d].apply(this, arguments);
|
|
2586
2586
|
return o.returnValue;
|
|
2587
2587
|
}, r.lang.inherits = function(o, l, d) {
|
|
2588
|
-
var
|
|
2589
|
-
b.prototype = l.prototype,
|
|
2590
|
-
for (
|
|
2591
|
-
|
|
2592
|
-
o.prototype.constructor = o, o.superClass = l.prototype, typeof d == "string" && (
|
|
2588
|
+
var u, p, v = o.prototype, b = new Function();
|
|
2589
|
+
b.prototype = l.prototype, p = o.prototype = new b();
|
|
2590
|
+
for (u in v)
|
|
2591
|
+
p[u] = v[u];
|
|
2592
|
+
o.prototype.constructor = o, o.superClass = l.prototype, typeof d == "string" && (p._className = d);
|
|
2593
2593
|
}, r.inherits = r.lang.inherits;
|
|
2594
2594
|
var n = "http://api.map.baidu.com/library/TextIconOverlay/1.2/src/images/m", a = "png", c = function(o, l, d) {
|
|
2595
2595
|
try {
|
|
@@ -2618,8 +2618,8 @@ var Sr = { exports: {} };
|
|
|
2618
2618
|
}, c.prototype.setPosition = function(o) {
|
|
2619
2619
|
o && (!this._position || !this._position.equals(o)) && (this._position = o, this._updatePosition());
|
|
2620
2620
|
}, c.prototype.getStyleByText = function(o, l) {
|
|
2621
|
-
var d = parseInt(o),
|
|
2622
|
-
return
|
|
2621
|
+
var d = parseInt(o), u = parseInt(d / 10);
|
|
2622
|
+
return u = Math.max(0, u), u = Math.min(u, l.length - 1), l[u];
|
|
2623
2623
|
}, c.prototype._updateCss = function() {
|
|
2624
2624
|
if (this._domElement) {
|
|
2625
2625
|
var o = this.getStyleByText(this._text, this._styles);
|
|
@@ -2633,33 +2633,33 @@ var Sr = { exports: {} };
|
|
|
2633
2633
|
l.x -= Math.ceil(parseInt(o.width) / 2), l.y -= Math.ceil(parseInt(o.height) / 2), o.left = l.x + "px", o.top = l.y + "px";
|
|
2634
2634
|
}
|
|
2635
2635
|
}, c.prototype._buildCssText = function(o) {
|
|
2636
|
-
var l = o.url, d = o.size,
|
|
2636
|
+
var l = o.url, d = o.size, u = o.anchor, p = o.offset, v = o.textColor || "black", b = o.textSize || 10, y = [];
|
|
2637
2637
|
if (this._zIndex && y.push("z-index:" + this._zIndex + ";"), e.browser.ie < 7)
|
|
2638
2638
|
y.push('filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="' + l + '");');
|
|
2639
2639
|
else {
|
|
2640
2640
|
y.push("background-image:url(" + l + ");");
|
|
2641
|
-
var
|
|
2642
|
-
|
|
2641
|
+
var m = "0 0";
|
|
2642
|
+
p instanceof BMap.Size && (m = p.width + "px " + p.height + "px"), y.push("background-position:" + m + ";");
|
|
2643
2643
|
}
|
|
2644
|
-
return d instanceof BMap.Size && (
|
|
2644
|
+
return d instanceof BMap.Size && (u instanceof BMap.Size ? (u.height > 0 && u.height < d.height && y.push("height:" + (d.height - u.height) + "px; padding-top:" + u.height + "px;"), u.width > 0 && u.width < d.width && y.push("width:" + (d.width - u.width) + "px; padding-left:" + u.width + "px;")) : (y.push("height:" + d.height + "px; line-height:" + d.height + "px;"), y.push("width:" + d.width + "px; text-align:center;"))), y.push("cursor:pointer; color:" + v + "; position:absolute; font-size:" + b + "px; font-family:Arial,sans-serif; font-weight:bold"), y.join("");
|
|
2645
2645
|
}, c.prototype._bind = function() {
|
|
2646
2646
|
if (!this._domElement)
|
|
2647
2647
|
return;
|
|
2648
2648
|
var o = this, l = this._map, d = e.lang.Event;
|
|
2649
|
-
function
|
|
2650
|
-
var b =
|
|
2651
|
-
if (
|
|
2649
|
+
function u(p, v) {
|
|
2650
|
+
var b = p.srcElement || p.target, y = p.clientX || p.pageX, m = p.clientY || p.pageY;
|
|
2651
|
+
if (p && v && y && m && b) {
|
|
2652
2652
|
var h = e.dom.getPosition(l.getContainer());
|
|
2653
|
-
v.pixel = new BMap.Pixel(y - h.left,
|
|
2653
|
+
v.pixel = new BMap.Pixel(y - h.left, m - h.top), v.point = l.pixelToPoint(v.pixel);
|
|
2654
2654
|
}
|
|
2655
2655
|
return v;
|
|
2656
2656
|
}
|
|
2657
|
-
e.event.on(this._domElement, "mouseover", function(
|
|
2658
|
-
o.dispatchEvent(
|
|
2659
|
-
}), e.event.on(this._domElement, "mouseout", function(
|
|
2660
|
-
o.dispatchEvent(
|
|
2661
|
-
}), e.event.on(this._domElement, "click", function(
|
|
2662
|
-
o.dispatchEvent(
|
|
2657
|
+
e.event.on(this._domElement, "mouseover", function(p) {
|
|
2658
|
+
o.dispatchEvent(u(p, new d("onmouseover")));
|
|
2659
|
+
}), e.event.on(this._domElement, "mouseout", function(p) {
|
|
2660
|
+
o.dispatchEvent(u(p, new d("onmouseout")));
|
|
2661
|
+
}), e.event.on(this._domElement, "click", function(p) {
|
|
2662
|
+
o.dispatchEvent(u(p, new d("onclick")));
|
|
2663
2663
|
});
|
|
2664
2664
|
}, c;
|
|
2665
2665
|
});
|
|
@@ -2679,7 +2679,7 @@ var kr = function(i, t, e) {
|
|
|
2679
2679
|
return t && (i = Math.max(i, t)), e && (i = Math.min(i, e)), i;
|
|
2680
2680
|
}, Ar = function(i) {
|
|
2681
2681
|
return Object.prototype.toString.call(i) === "[object Array]";
|
|
2682
|
-
},
|
|
2682
|
+
}, Rr = function(i, t) {
|
|
2683
2683
|
var e = -1;
|
|
2684
2684
|
if (Ar(t)) {
|
|
2685
2685
|
if (t.indexOf)
|
|
@@ -2720,7 +2720,7 @@ x.prototype.addMarkers = function(i) {
|
|
|
2720
2720
|
}
|
|
2721
2721
|
};
|
|
2722
2722
|
x.prototype._pushMarkerTo = function(i) {
|
|
2723
|
-
var t =
|
|
2723
|
+
var t = Rr(i, this._markers);
|
|
2724
2724
|
t === -1 && (i.isInCluster = !1, this._markers.push(i));
|
|
2725
2725
|
};
|
|
2726
2726
|
x.prototype.addMarker = function(i) {
|
|
@@ -2769,7 +2769,7 @@ x.prototype._removeMarkersFromMap = function() {
|
|
|
2769
2769
|
}
|
|
2770
2770
|
};
|
|
2771
2771
|
x.prototype._removeMarker = function(i) {
|
|
2772
|
-
var t =
|
|
2772
|
+
var t = Rr(i, this._markers);
|
|
2773
2773
|
return t === -1 ? !1 : (this._map.removeOverlay(i), this._markers.splice(t, 1), !0);
|
|
2774
2774
|
};
|
|
2775
2775
|
x.prototype.removeMarker = function(i) {
|
|
@@ -2949,7 +2949,7 @@ var Xe;
|
|
|
2949
2949
|
}
|
|
2950
2950
|
i.toGoogle = e;
|
|
2951
2951
|
})(Xe || (Xe = {}));
|
|
2952
|
-
class
|
|
2952
|
+
class Dr {
|
|
2953
2953
|
constructor(t) {
|
|
2954
2954
|
this.map = t;
|
|
2955
2955
|
}
|
|
@@ -2974,11 +2974,11 @@ class Rr {
|
|
|
2974
2974
|
return this.inner.removeMarkers(t.map((e) => e.innerOverlay));
|
|
2975
2975
|
}
|
|
2976
2976
|
}
|
|
2977
|
-
class Pi extends
|
|
2977
|
+
class Pi extends Dr {
|
|
2978
2978
|
constructor(e, r) {
|
|
2979
2979
|
var n;
|
|
2980
2980
|
super(e);
|
|
2981
|
-
|
|
2981
|
+
g(this, "inner");
|
|
2982
2982
|
this.inner = new x(e.innerMap, {
|
|
2983
2983
|
// baidu的构造器中的markers, 会触发重绘, 会导致使用旧的calculator计算cluster
|
|
2984
2984
|
// markers: options.markers?.map(it => (it as BaiduMarker).innerOverlay),
|
|
@@ -2996,11 +2996,11 @@ class Pi extends Rr {
|
|
|
2996
2996
|
this.inner._redraw();
|
|
2997
2997
|
}
|
|
2998
2998
|
}
|
|
2999
|
-
class Bi extends
|
|
2999
|
+
class Bi extends Dr {
|
|
3000
3000
|
constructor(e, r) {
|
|
3001
3001
|
var n, a;
|
|
3002
3002
|
super(e);
|
|
3003
|
-
|
|
3003
|
+
g(this, "inner");
|
|
3004
3004
|
this.inner = new wi(
|
|
3005
3005
|
e.innerMap,
|
|
3006
3006
|
// google的构造器中的markers,不会触发重绘, 第一次绘制通过监听地图的'idle'事件触发, 可以直接设置
|
|
@@ -3032,7 +3032,7 @@ class $r {
|
|
|
3032
3032
|
class Ii extends $r {
|
|
3033
3033
|
constructor(e, r) {
|
|
3034
3034
|
super();
|
|
3035
|
-
|
|
3035
|
+
g(this, "inner");
|
|
3036
3036
|
this.map = e, this.inner = new google.maps.places.PlacesService(e.innerMap);
|
|
3037
3037
|
}
|
|
3038
3038
|
search(e, r) {
|
|
@@ -3078,8 +3078,8 @@ class Ii extends $r {
|
|
|
3078
3078
|
class Si extends $r {
|
|
3079
3079
|
constructor(e, r) {
|
|
3080
3080
|
super();
|
|
3081
|
-
|
|
3082
|
-
|
|
3081
|
+
g(this, "searchRequestMap", /* @__PURE__ */ new Map());
|
|
3082
|
+
g(this, "currentSearch");
|
|
3083
3083
|
this.map = e;
|
|
3084
3084
|
}
|
|
3085
3085
|
get inner() {
|
|
@@ -3113,16 +3113,16 @@ class Si extends $r {
|
|
|
3113
3113
|
case BMAP_STATUS_SUCCESS: {
|
|
3114
3114
|
const l = [];
|
|
3115
3115
|
for (let d = 0; d < c.getCurrentNumPois(); d++) {
|
|
3116
|
-
const
|
|
3116
|
+
const u = c.getPoi(d);
|
|
3117
3117
|
l.push({
|
|
3118
|
-
id:
|
|
3119
|
-
city:
|
|
3118
|
+
id: u.uid,
|
|
3119
|
+
city: u.city,
|
|
3120
3120
|
country: "",
|
|
3121
3121
|
// 百度地图只支持中国
|
|
3122
|
-
position: C.fromBaidu(
|
|
3123
|
-
province:
|
|
3124
|
-
title:
|
|
3125
|
-
address:
|
|
3122
|
+
position: C.fromBaidu(u.point, this.map.coordType),
|
|
3123
|
+
province: u.province,
|
|
3124
|
+
title: u.title,
|
|
3125
|
+
address: u.address
|
|
3126
3126
|
});
|
|
3127
3127
|
}
|
|
3128
3128
|
s(l);
|
|
@@ -3143,8 +3143,8 @@ class Si extends $r {
|
|
|
3143
3143
|
}
|
|
3144
3144
|
class zr {
|
|
3145
3145
|
constructor(t, e) {
|
|
3146
|
-
|
|
3147
|
-
|
|
3146
|
+
g(this, "onData");
|
|
3147
|
+
g(this, "onError");
|
|
3148
3148
|
this.map = t, this.input = e;
|
|
3149
3149
|
}
|
|
3150
3150
|
/**
|
|
@@ -3159,7 +3159,7 @@ class zr {
|
|
|
3159
3159
|
class ki extends zr {
|
|
3160
3160
|
constructor(e, r) {
|
|
3161
3161
|
super(e, r.input);
|
|
3162
|
-
|
|
3162
|
+
g(this, "searchBox");
|
|
3163
3163
|
this.searchBox = new google.maps.places.SearchBox(r.input), this.searchBox.bindTo("bounds", e.innerMap);
|
|
3164
3164
|
}
|
|
3165
3165
|
setSearchListener(e, r) {
|
|
@@ -3175,8 +3175,8 @@ class ki extends zr {
|
|
|
3175
3175
|
class Ai extends zr {
|
|
3176
3176
|
constructor(e, r) {
|
|
3177
3177
|
super(e, r.input);
|
|
3178
|
-
|
|
3179
|
-
|
|
3178
|
+
g(this, "autocomplete");
|
|
3179
|
+
g(this, "placesService");
|
|
3180
3180
|
this.autocomplete = e.createAutocomplete({ input: r.input, bindToMap: !0 }), this.placesService = e.createPlacesService({});
|
|
3181
3181
|
}
|
|
3182
3182
|
setSearchListener(e, r) {
|
|
@@ -3191,12 +3191,12 @@ class Ai extends zr {
|
|
|
3191
3191
|
this.placesService.search(e).then(this.onData, this.onError);
|
|
3192
3192
|
}
|
|
3193
3193
|
}
|
|
3194
|
-
var
|
|
3194
|
+
var Ri = /* @__PURE__ */ ((i) => (i[i.WORLD = 1] = "WORLD", i[i.STATE = 5] = "STATE", i[i.CITY = 10] = "CITY", i[i.STREET = 15] = "STREET", i[i.BUILDING = 20] = "BUILDING", i))(Ri || {});
|
|
3195
3195
|
class zt {
|
|
3196
3196
|
constructor(t) {
|
|
3197
|
-
|
|
3197
|
+
g(this, "latestInfoWindow");
|
|
3198
3198
|
/** 使用{@link setEventTargetDelegate}初始化 */
|
|
3199
|
-
|
|
3199
|
+
g(this, "delegate", void 0);
|
|
3200
3200
|
this.element = t, process.env.NODE_ENV !== "production" && setTimeout(() => {
|
|
3201
3201
|
this.delegate || console.warn(`${this.constructor.name}继承了AbstractMap, 但未调用setEventTargetDelegate(delegate)`);
|
|
3202
3202
|
});
|
|
@@ -3239,7 +3239,7 @@ class zt {
|
|
|
3239
3239
|
this.innerMap.setZoom(t);
|
|
3240
3240
|
}
|
|
3241
3241
|
}
|
|
3242
|
-
var
|
|
3242
|
+
var Di = function(t) {
|
|
3243
3243
|
return $i(t) && !zi(t);
|
|
3244
3244
|
};
|
|
3245
3245
|
function $i(i) {
|
|
@@ -3256,12 +3256,12 @@ function Zi(i) {
|
|
|
3256
3256
|
function Wi(i) {
|
|
3257
3257
|
return Array.isArray(i) ? [] : {};
|
|
3258
3258
|
}
|
|
3259
|
-
function
|
|
3259
|
+
function Re(i, t) {
|
|
3260
3260
|
return t.clone !== !1 && t.isMergeableObject(i) ? _e(Wi(i), i, t) : i;
|
|
3261
3261
|
}
|
|
3262
3262
|
function Hi(i, t, e) {
|
|
3263
3263
|
return i.concat(t).map(function(r) {
|
|
3264
|
-
return
|
|
3264
|
+
return Re(r, e);
|
|
3265
3265
|
});
|
|
3266
3266
|
}
|
|
3267
3267
|
function ji(i, t) {
|
|
@@ -3270,13 +3270,13 @@ function ji(i, t) {
|
|
|
3270
3270
|
var e = t.customMerge(i);
|
|
3271
3271
|
return typeof e == "function" ? e : _e;
|
|
3272
3272
|
}
|
|
3273
|
-
function
|
|
3273
|
+
function Vi(i) {
|
|
3274
3274
|
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(t) {
|
|
3275
3275
|
return Object.propertyIsEnumerable.call(i, t);
|
|
3276
3276
|
}) : [];
|
|
3277
3277
|
}
|
|
3278
3278
|
function cr(i) {
|
|
3279
|
-
return Object.keys(i).concat(
|
|
3279
|
+
return Object.keys(i).concat(Vi(i));
|
|
3280
3280
|
}
|
|
3281
3281
|
function Nr(i, t) {
|
|
3282
3282
|
try {
|
|
@@ -3285,21 +3285,21 @@ function Nr(i, t) {
|
|
|
3285
3285
|
return !1;
|
|
3286
3286
|
}
|
|
3287
3287
|
}
|
|
3288
|
-
function
|
|
3288
|
+
function Fi(i, t) {
|
|
3289
3289
|
return Nr(i, t) && !(Object.hasOwnProperty.call(i, t) && Object.propertyIsEnumerable.call(i, t));
|
|
3290
3290
|
}
|
|
3291
3291
|
function Ui(i, t, e) {
|
|
3292
3292
|
var r = {};
|
|
3293
3293
|
return e.isMergeableObject(i) && cr(i).forEach(function(s) {
|
|
3294
|
-
r[s] =
|
|
3294
|
+
r[s] = Re(i[s], e);
|
|
3295
3295
|
}), cr(t).forEach(function(s) {
|
|
3296
|
-
|
|
3296
|
+
Fi(i, s) || (Nr(i, s) && e.isMergeableObject(t[s]) ? r[s] = ji(s, e)(i[s], t[s], e) : r[s] = Re(t[s], e));
|
|
3297
3297
|
}), r;
|
|
3298
3298
|
}
|
|
3299
3299
|
function _e(i, t, e) {
|
|
3300
|
-
e = e || {}, e.arrayMerge = e.arrayMerge || Hi, e.isMergeableObject = e.isMergeableObject ||
|
|
3300
|
+
e = e || {}, e.arrayMerge = e.arrayMerge || Hi, e.isMergeableObject = e.isMergeableObject || Di, e.cloneUnlessOtherwiseSpecified = Re;
|
|
3301
3301
|
var r = Array.isArray(t), s = Array.isArray(i), n = r === s;
|
|
3302
|
-
return n ? r ? e.arrayMerge(i, t, e) : Ui(i, t, e) :
|
|
3302
|
+
return n ? r ? e.arrayMerge(i, t, e) : Ui(i, t, e) : Re(t, e);
|
|
3303
3303
|
}
|
|
3304
3304
|
_e.all = function(t, e) {
|
|
3305
3305
|
if (!Array.isArray(t))
|
|
@@ -3334,47 +3334,47 @@ function Zr(i) {
|
|
|
3334
3334
|
}
|
|
3335
3335
|
var he;
|
|
3336
3336
|
((i) => {
|
|
3337
|
-
function t(d,
|
|
3338
|
-
return d.reduce((
|
|
3337
|
+
function t(d, u) {
|
|
3338
|
+
return d.reduce((p, v) => (p[u(v)] = v, p), {});
|
|
3339
3339
|
}
|
|
3340
3340
|
i.fromArray = t;
|
|
3341
3341
|
function e(d) {
|
|
3342
|
-
return d.reduce((
|
|
3342
|
+
return d.reduce((u, p) => (u[p[0]] = p[1], u), {});
|
|
3343
3343
|
}
|
|
3344
3344
|
i.fromEntries = e;
|
|
3345
3345
|
function r(d) {
|
|
3346
|
-
return JSON.stringify(d, (
|
|
3346
|
+
return JSON.stringify(d, (u, p) => typeof p == "object" && Object.getPrototypeOf(p) !== Object.prototype ? p.toString !== Object.prototype.toString ? p.toString() : `[object ${Object.getPrototypeOf(p).constructor.name}]` : p);
|
|
3347
3347
|
}
|
|
3348
3348
|
i.toJsonSafely = r;
|
|
3349
3349
|
function s(d) {
|
|
3350
|
-
Zr(d) && Object.keys(d).forEach((
|
|
3351
|
-
d[
|
|
3350
|
+
Zr(d) && Object.keys(d).forEach((u) => {
|
|
3351
|
+
d[u] === void 0 ? delete d[u] : s(d[u]);
|
|
3352
3352
|
});
|
|
3353
3353
|
}
|
|
3354
3354
|
i.deleteUndefinedPropertyOnPlainObjectDeeply = s;
|
|
3355
|
-
function n(d,
|
|
3356
|
-
let v = d[
|
|
3357
|
-
return v === void 0 && (v =
|
|
3355
|
+
function n(d, u, p) {
|
|
3356
|
+
let v = d[u];
|
|
3357
|
+
return v === void 0 && (v = p(), d[u] = v), v;
|
|
3358
3358
|
}
|
|
3359
3359
|
i.putIfAbsent = n;
|
|
3360
|
-
function a(d, ...
|
|
3361
|
-
const
|
|
3360
|
+
function a(d, ...u) {
|
|
3361
|
+
const p = ur(u), v = {};
|
|
3362
3362
|
for (const b in d)
|
|
3363
|
-
|
|
3363
|
+
p(b) || (v[b] = d[b]);
|
|
3364
3364
|
return v;
|
|
3365
3365
|
}
|
|
3366
3366
|
i.omit = a;
|
|
3367
|
-
function c(d, ...
|
|
3368
|
-
const
|
|
3367
|
+
function c(d, ...u) {
|
|
3368
|
+
const p = ur(u), v = {};
|
|
3369
3369
|
for (const b in d)
|
|
3370
|
-
|
|
3370
|
+
p(b) && (v[b] = d[b]);
|
|
3371
3371
|
return v;
|
|
3372
3372
|
}
|
|
3373
3373
|
i.pick = c;
|
|
3374
|
-
function o(d,
|
|
3375
|
-
const
|
|
3374
|
+
function o(d, u) {
|
|
3375
|
+
const p = typeof u == "string" ? u.split(".") : u;
|
|
3376
3376
|
let v = d;
|
|
3377
|
-
for (const b of
|
|
3377
|
+
for (const b of p) {
|
|
3378
3378
|
if (v == null)
|
|
3379
3379
|
return;
|
|
3380
3380
|
v = v[b];
|
|
@@ -3382,8 +3382,8 @@ var he;
|
|
|
3382
3382
|
return v;
|
|
3383
3383
|
}
|
|
3384
3384
|
i.get = o;
|
|
3385
|
-
function l(d,
|
|
3386
|
-
const
|
|
3385
|
+
function l(d, u) {
|
|
3386
|
+
const p = typeof u == "string" ? u.split(".") : u, v = o(d, p.slice(0, -1)), b = p[p.length - 1];
|
|
3387
3387
|
v != null && delete v[b];
|
|
3388
3388
|
}
|
|
3389
3389
|
i.del = l;
|
|
@@ -3411,7 +3411,7 @@ var ee = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "
|
|
|
3411
3411
|
})(Ct || (Ct = {}));
|
|
3412
3412
|
class Wr {
|
|
3413
3413
|
constructor(t, e) {
|
|
3414
|
-
|
|
3414
|
+
g(this, "_delegate");
|
|
3415
3415
|
this.innerOverlay = t, this.coordType = e;
|
|
3416
3416
|
}
|
|
3417
3417
|
get delegate() {
|
|
@@ -3496,7 +3496,7 @@ let z = st;
|
|
|
3496
3496
|
* - 透明度为0.7和0.8时, 在maintain的发布模式下, polyline的线条会不可见 (原因未知, 在tg-map中无法复现)
|
|
3497
3497
|
* 故统一加个0.001, 规避这些问题...
|
|
3498
3498
|
*/
|
|
3499
|
-
|
|
3499
|
+
g(z, "OPACITY_DELTA", 1e-3);
|
|
3500
3500
|
class dt extends Nt {
|
|
3501
3501
|
isEditable() {
|
|
3502
3502
|
return this.innerOverlay.getEditable();
|
|
@@ -3523,22 +3523,22 @@ class dt extends Nt {
|
|
|
3523
3523
|
class Gt extends z {
|
|
3524
3524
|
constructor() {
|
|
3525
3525
|
super(...arguments);
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3526
|
+
g(this, "prevCenter");
|
|
3527
|
+
g(this, "prevRadius");
|
|
3528
|
+
g(this, "isDoingSetCenter", !1);
|
|
3529
|
+
g(this, "isDoingSetRadius", !1);
|
|
3530
|
+
g(this, "eventHubDelegate");
|
|
3531
|
+
g(this, "onRadiusChanged", () => {
|
|
3532
3532
|
var r;
|
|
3533
3533
|
const e = this.innerOverlay.getRadius();
|
|
3534
3534
|
this.prevRadius !== e && (this.isDoingSetRadius || (r = this.eventHubDelegate) == null || r.notify({ type: "radius-changed", target: this }), this.prevRadius = e);
|
|
3535
3535
|
});
|
|
3536
|
-
|
|
3536
|
+
g(this, "onCenterChanged", () => {
|
|
3537
3537
|
var r;
|
|
3538
3538
|
const e = this.innerOverlay.getCenter();
|
|
3539
3539
|
this.prevCenter !== e && (this.isDoingSetCenter || (r = this.eventHubDelegate) == null || r.notify({ type: "center-changed", target: this }), this.prevCenter = e);
|
|
3540
3540
|
});
|
|
3541
|
-
|
|
3541
|
+
g(this, "resetEditableTimeoutId");
|
|
3542
3542
|
}
|
|
3543
3543
|
static create(e) {
|
|
3544
3544
|
const r = this.coordType, s = new BMap.Circle(e.center.toBaidu(r), e.radius, {
|
|
@@ -3635,18 +3635,20 @@ function Qi() {
|
|
|
3635
3635
|
constructor(r, s = i, n = ae.ZERO, a, c = 654, o = "") {
|
|
3636
3636
|
super();
|
|
3637
3637
|
// 类表达式不能有私有成员, 故改成public
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3638
|
+
g(this, "container");
|
|
3639
|
+
g(this, "border");
|
|
3640
|
+
g(this, "inner");
|
|
3641
|
+
g(this, "map");
|
|
3642
|
+
g(this, "marker");
|
|
3643
3643
|
this.content = r, this.position = s, this.offset = n;
|
|
3644
3644
|
const l = "baidu-info-box-container";
|
|
3645
|
-
this.container = document.createElement("div"), this.container.className = l, this.container.style.position = "absolute"
|
|
3646
|
-
const d =
|
|
3647
|
-
|
|
3645
|
+
this.container = document.createElement("div"), this.container.className = l, this.container.style.position = "absolute";
|
|
3646
|
+
const d = (p) => p.stopPropagation();
|
|
3647
|
+
this.container.onclick = d, this.container.ondblclick = d, this.container.onmousedown = d, this.container.onmousemove = d, this.container.onmousewheel = d, this.border = document.createElement("div"), this.border.className = `${l}__border ${o}`, this.inner = document.createElement("div"), this.inner.className = l + "__inner";
|
|
3648
|
+
const u = document.createElement("span");
|
|
3649
|
+
u.className = l + "__close", u.addEventListener("click", () => {
|
|
3648
3650
|
this.close(), this.dispatchEvent({ type: "onclickclose" });
|
|
3649
|
-
}), this.inner.appendChild(r), this.border.appendChild(this.inner), this.border.appendChild(
|
|
3651
|
+
}), this.inner.appendChild(r), this.border.appendChild(this.inner), this.border.appendChild(u), this.container.appendChild(this.border), a && this.setZIndex(a), this.setMaxWidth(c), this.onMarkerPositionChanged = this.onMarkerPositionChanged.bind(this);
|
|
3650
3652
|
}
|
|
3651
3653
|
initialize(r) {
|
|
3652
3654
|
return this.map = r, r.getPanes().floatPane.appendChild(this.container), this.container;
|
|
@@ -3738,8 +3740,8 @@ class Ht extends Wt {
|
|
|
3738
3740
|
class jt extends Wt {
|
|
3739
3741
|
constructor(e, r) {
|
|
3740
3742
|
super(new ue(e, r));
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
+
g(this, "eventHub", new Tr());
|
|
3744
|
+
g(this, "isOpened", !1);
|
|
3743
3745
|
this.inner = e, this.map = r, e.addListener("closeclick", () => {
|
|
3744
3746
|
this.isOpened = !1, this.eventHub.hasListener("close") && this.eventHub.notify({ type: "close", target: this });
|
|
3745
3747
|
}), e.addListener("map_changed", () => {
|
|
@@ -3793,7 +3795,7 @@ class jt extends Wt {
|
|
|
3793
3795
|
this.inner.setPosition(e.toGoogle(this.map.coordType));
|
|
3794
3796
|
}
|
|
3795
3797
|
}
|
|
3796
|
-
class
|
|
3798
|
+
class Vt extends ct {
|
|
3797
3799
|
constructor(t, e, r) {
|
|
3798
3800
|
super(t, e, r), this.baiduMap = r;
|
|
3799
3801
|
}
|
|
@@ -3807,7 +3809,7 @@ class Ft extends ct {
|
|
|
3807
3809
|
t.maxWidth,
|
|
3808
3810
|
t.borderClass
|
|
3809
3811
|
);
|
|
3810
|
-
return new
|
|
3812
|
+
return new Vt(r, e, this);
|
|
3811
3813
|
}
|
|
3812
3814
|
open(t) {
|
|
3813
3815
|
this.innerOverlay.open(this.baiduMap.innerMap, t == null ? void 0 : t.innerOverlay);
|
|
@@ -3828,7 +3830,7 @@ class Ft extends ct {
|
|
|
3828
3830
|
this.innerOverlay.setZIndex(t);
|
|
3829
3831
|
}
|
|
3830
3832
|
}
|
|
3831
|
-
class
|
|
3833
|
+
class Ft extends Wt {
|
|
3832
3834
|
constructor(t, e, r) {
|
|
3833
3835
|
super(new ue(t, r)), this.inner = t, this.coordType = e, this.map = r;
|
|
3834
3836
|
}
|
|
@@ -3845,7 +3847,7 @@ class Vt extends Wt {
|
|
|
3845
3847
|
var c;
|
|
3846
3848
|
const a = (c = t.content.parentElement) == null ? void 0 : c.parentElement;
|
|
3847
3849
|
a && a.className.includes("gm-style-iw-c") && !a.className.includes(s) && (a.className += ` ${s}`);
|
|
3848
|
-
}), new
|
|
3850
|
+
}), new Ft(r, e, this);
|
|
3849
3851
|
}
|
|
3850
3852
|
open(t) {
|
|
3851
3853
|
this.inner.open(this.map.innerMap, t == null ? void 0 : t.innerOverlay);
|
|
@@ -3902,7 +3904,7 @@ const es = {
|
|
|
3902
3904
|
return t && s.endsWith(t) ? s.slice(0, -t.length) : s;
|
|
3903
3905
|
}
|
|
3904
3906
|
};
|
|
3905
|
-
var
|
|
3907
|
+
var De = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overlayMouseTarget = "overlayMouseTarget", i.float = "float", i))(De || {}), $e;
|
|
3906
3908
|
((i) => {
|
|
3907
3909
|
function t(r, s) {
|
|
3908
3910
|
switch (r) {
|
|
@@ -3937,11 +3939,11 @@ var Re = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overla
|
|
|
3937
3939
|
})($e || ($e = {}));
|
|
3938
3940
|
class ts {
|
|
3939
3941
|
constructor(t, e) {
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3942
|
+
g(this, "baidu");
|
|
3943
|
+
g(this, "google");
|
|
3944
|
+
g(this, "projection");
|
|
3945
|
+
g(this, "element", void 0);
|
|
3946
|
+
g(this, "mapPane");
|
|
3945
3947
|
this.map = t, this.mapPane = e.mapPane;
|
|
3946
3948
|
}
|
|
3947
3949
|
create() {
|
|
@@ -4014,9 +4016,9 @@ function rs(i, t, e, r, s) {
|
|
|
4014
4016
|
}
|
|
4015
4017
|
function is() {
|
|
4016
4018
|
return class extends google.maps.OverlayView {
|
|
4017
|
-
constructor(e, r, s, n =
|
|
4019
|
+
constructor(e, r, s, n = De.overlayMouseTarget, a) {
|
|
4018
4020
|
super();
|
|
4019
|
-
|
|
4021
|
+
g(this, "container");
|
|
4020
4022
|
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", () => {
|
|
4021
4023
|
google.maps.event.trigger(this, "click");
|
|
4022
4024
|
}), this.setElement(e);
|
|
@@ -4084,10 +4086,10 @@ var Te;
|
|
|
4084
4086
|
class Ut extends ct {
|
|
4085
4087
|
constructor(e, r, s, n) {
|
|
4086
4088
|
super(e, r, s);
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4089
|
+
g(this, "icon");
|
|
4090
|
+
g(this, "iconAnchor");
|
|
4091
|
+
g(this, "content", void 0);
|
|
4092
|
+
g(this, "contentObserver");
|
|
4091
4093
|
this.setContentInternal(n, !0);
|
|
4092
4094
|
}
|
|
4093
4095
|
static create(e) {
|
|
@@ -4153,7 +4155,7 @@ class Ut extends ct {
|
|
|
4153
4155
|
width: e.style.anchor.width + o.x,
|
|
4154
4156
|
height: e.style.anchor.height + o.y
|
|
4155
4157
|
}, process.env.NODE_ENV !== "production" && setTimeout(() => {
|
|
4156
|
-
var
|
|
4158
|
+
var u, p;
|
|
4157
4159
|
if (me(e.__icon__, `${e}必须是由'SymbolIcon.toBaidu()'创建的`), !e.anchor) {
|
|
4158
4160
|
console.log("BaiduLabelOverlay.attachIcon", "Bmap.Symbol.anchor尚未计算完成");
|
|
4159
4161
|
return;
|
|
@@ -4161,8 +4163,8 @@ class Ut extends ct {
|
|
|
4161
4163
|
const l = e.anchor.width - e.style.anchor.width, d = e.anchor.height - e.style.anchor.height;
|
|
4162
4164
|
if (o.x !== l || o.y !== d) {
|
|
4163
4165
|
const v = [
|
|
4164
|
-
(
|
|
4165
|
-
(
|
|
4166
|
+
(u = e.__icon__.anchor) == null ? void 0 : u.x,
|
|
4167
|
+
(p = e.__icon__.anchor) == null ? void 0 : p.y,
|
|
4166
4168
|
e.__icon__.rotation,
|
|
4167
4169
|
e.__icon__.scale,
|
|
4168
4170
|
e.__icon__.strokeWeight
|
|
@@ -4372,10 +4374,10 @@ class ze extends ct {
|
|
|
4372
4374
|
class qt extends Nt {
|
|
4373
4375
|
constructor() {
|
|
4374
4376
|
super(...arguments);
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4377
|
+
g(this, "label");
|
|
4378
|
+
g(this, "labelPositionListener");
|
|
4379
|
+
g(this, "labelVisibleListener");
|
|
4380
|
+
g(this, "labelMapChangedListener");
|
|
4379
4381
|
}
|
|
4380
4382
|
static create(e) {
|
|
4381
4383
|
const r = this.coordType, s = e.icon, n = {
|
|
@@ -4448,10 +4450,10 @@ class qt extends Nt {
|
|
|
4448
4450
|
class Kt extends z {
|
|
4449
4451
|
constructor() {
|
|
4450
4452
|
super(...arguments);
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4453
|
+
g(this, "eventHubDelegate");
|
|
4454
|
+
g(this, "prevPath");
|
|
4455
|
+
g(this, "isDoingSetPath", !1);
|
|
4456
|
+
g(this, "onLineUpdate", () => {
|
|
4455
4457
|
var r;
|
|
4456
4458
|
const e = this.innerOverlay.getPath();
|
|
4457
4459
|
e !== this.prevPath && (this.isDoingSetPath || (r = this.eventHubDelegate) == null || r.notify({
|
|
@@ -4484,7 +4486,7 @@ class Kt extends z {
|
|
|
4484
4486
|
class Xt extends Kt {
|
|
4485
4487
|
constructor() {
|
|
4486
4488
|
super(...arguments);
|
|
4487
|
-
|
|
4489
|
+
g(this, "pathEditedEventType", "path-edited");
|
|
4488
4490
|
}
|
|
4489
4491
|
static create(e) {
|
|
4490
4492
|
var n, a;
|
|
@@ -4527,8 +4529,8 @@ class Xt extends Kt {
|
|
|
4527
4529
|
class Jt extends dt {
|
|
4528
4530
|
constructor() {
|
|
4529
4531
|
super(...arguments);
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
+
g(this, "pathChangedListeners");
|
|
4533
|
+
g(this, "eventHubDelegate");
|
|
4532
4534
|
}
|
|
4533
4535
|
static create(e) {
|
|
4534
4536
|
var n;
|
|
@@ -4576,7 +4578,7 @@ class Jt extends dt {
|
|
|
4576
4578
|
class Qt extends Kt {
|
|
4577
4579
|
constructor() {
|
|
4578
4580
|
super(...arguments);
|
|
4579
|
-
|
|
4581
|
+
g(this, "pathEditedEventType", "paths-edited");
|
|
4580
4582
|
}
|
|
4581
4583
|
static create(e) {
|
|
4582
4584
|
const r = this.coordType;
|
|
@@ -4602,8 +4604,8 @@ class Qt extends Kt {
|
|
|
4602
4604
|
class er extends dt {
|
|
4603
4605
|
constructor() {
|
|
4604
4606
|
super(...arguments);
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
+
g(this, "pathChangedListeners");
|
|
4608
|
+
g(this, "eventHubDelegate");
|
|
4607
4609
|
}
|
|
4608
4610
|
static create(e) {
|
|
4609
4611
|
const r = this.coordType, s = new google.maps.Polygon({
|
|
@@ -4656,9 +4658,9 @@ class er extends dt {
|
|
|
4656
4658
|
class tr extends Kt {
|
|
4657
4659
|
constructor(e, r, s, n) {
|
|
4658
4660
|
super(e, r, s, n);
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4661
|
+
g(this, "pathEditedEventType", "bounds-changed");
|
|
4662
|
+
g(this, "isDoingUpdateRectangle", !1);
|
|
4663
|
+
g(this, "onBoundsChanged", ({ originalEvent: e }) => {
|
|
4662
4664
|
if (this.isDoingUpdateRectangle)
|
|
4663
4665
|
return;
|
|
4664
4666
|
const r = e.prevPath ?? [], s = e.path;
|
|
@@ -4669,9 +4671,9 @@ class tr extends Kt {
|
|
|
4669
4671
|
if (a > r.length) {
|
|
4670
4672
|
for (let o = 0; o < a; o++)
|
|
4671
4673
|
if (r[o] == null || !pr.equals(s[o], r[o])) {
|
|
4672
|
-
const l = s[(o - 2 + a) % a], d = s[(o - 1 + a) % a],
|
|
4674
|
+
const l = s[(o - 2 + a) % a], d = s[(o - 1 + a) % a], u = s[o], p = s[(o + 1) % a], v = s[(o + 2) % a];
|
|
4673
4675
|
let b;
|
|
4674
|
-
d.lat ===
|
|
4676
|
+
d.lat === p.lat ? b = new BMap.Point(d.lng, u.lat) : d.lng === p.lng ? b = new BMap.Point(u.lng, d.lat) : b = u, n = [l, v, b];
|
|
4675
4677
|
break;
|
|
4676
4678
|
}
|
|
4677
4679
|
} else if (a === r.length) {
|
|
@@ -4685,7 +4687,7 @@ class tr extends Kt {
|
|
|
4685
4687
|
}
|
|
4686
4688
|
} else
|
|
4687
4689
|
a < r.length;
|
|
4688
|
-
const c =
|
|
4690
|
+
const c = V.fromArray(n.map((o) => C.fromBaidu(o, this.coordType)));
|
|
4689
4691
|
c && (this.isDoingUpdateRectangle = !0, this.innerOverlay.setPath(c.toRectArray().map((o) => o.toBaidu(this.coordType))), this.isDoingUpdateRectangle = !1);
|
|
4690
4692
|
}, 0);
|
|
4691
4693
|
});
|
|
@@ -4704,7 +4706,7 @@ class tr extends Kt {
|
|
|
4704
4706
|
return new tr(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
|
|
4705
4707
|
}
|
|
4706
4708
|
getBounds() {
|
|
4707
|
-
return
|
|
4709
|
+
return V.fromBaidu(this.innerOverlay.getBounds(), this.coordType);
|
|
4708
4710
|
}
|
|
4709
4711
|
setBounds(e) {
|
|
4710
4712
|
const r = e.toRectArray();
|
|
@@ -4729,7 +4731,7 @@ class rr extends dt {
|
|
|
4729
4731
|
return new rr(r, e, this);
|
|
4730
4732
|
}
|
|
4731
4733
|
getBounds() {
|
|
4732
|
-
return
|
|
4734
|
+
return V.fromGoogle(this.innerOverlay.getBounds() ?? le.BOUNDS_ZERO, this.coordType);
|
|
4733
4735
|
}
|
|
4734
4736
|
setBounds(t) {
|
|
4735
4737
|
const e = t.toGoogle(this.coordType);
|
|
@@ -4741,22 +4743,22 @@ class ss extends zt {
|
|
|
4741
4743
|
constructor(e, r) {
|
|
4742
4744
|
var s;
|
|
4743
4745
|
super(e);
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
this.buildInMapTypeId2BIMT =
|
|
4746
|
+
g(this, "buildInMapTypeId2BIMT");
|
|
4747
|
+
g(this, "baiduMapType2BIMT");
|
|
4748
|
+
g(this, "map");
|
|
4749
|
+
g(this, "createLabel", Ut.create);
|
|
4750
|
+
g(this, "createCircle", Gt.create);
|
|
4751
|
+
g(this, "createPolygon", Qt.create);
|
|
4752
|
+
g(this, "createPolyline", Xt.create);
|
|
4753
|
+
g(this, "createRectangle", tr.create);
|
|
4754
|
+
g(this, "createInfoWindow", Ht.create);
|
|
4755
|
+
g(this, "createInfoBox", Vt.create);
|
|
4756
|
+
g(this, "createMarker", ze.create);
|
|
4757
|
+
g(this, "createMapTypeControl", Bt.create);
|
|
4758
|
+
g(this, "createZoomControl", Rt.create);
|
|
4759
|
+
g(this, "createStreetViewControl", kt.create);
|
|
4760
|
+
g(this, "createScaleControl", It.create);
|
|
4761
|
+
this.buildInMapTypeId2BIMT = F.BUILD_IN_MAP_TYPES.getValueMap(j.prototype.getId), this.baiduMapType2BIMT = F.BUILD_IN_MAP_TYPES.getValueMap(j.prototype.asBaiduMapType), this.map = new BMap.Map(e, {
|
|
4760
4762
|
minZoom: r.minZoom && r.minZoom + ce,
|
|
4761
4763
|
maxZoom: r.maxZoom && r.maxZoom + ce,
|
|
4762
4764
|
mapType: r.buildInMapTypeId && ((s = this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId)) == null ? void 0 : s.asBaiduMapType()),
|
|
@@ -4870,7 +4872,7 @@ class ss extends zt {
|
|
|
4870
4872
|
});
|
|
4871
4873
|
}
|
|
4872
4874
|
getBounds() {
|
|
4873
|
-
return
|
|
4875
|
+
return V.fromBaidu(this.map.getBounds(), this.coordType);
|
|
4874
4876
|
}
|
|
4875
4877
|
addElementOverlay(e) {
|
|
4876
4878
|
this.map.addOverlay(e.asBaidu());
|
|
@@ -4889,8 +4891,8 @@ class ss extends zt {
|
|
|
4889
4891
|
const r = class extends BMap.Control {
|
|
4890
4892
|
constructor() {
|
|
4891
4893
|
super(...arguments);
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
+
g(this, "defaultAnchor", Y.getBaidu().toValue(e.position));
|
|
4895
|
+
g(this, "defaultOffset", new BMap.Size(0, 0));
|
|
4894
4896
|
}
|
|
4895
4897
|
initialize(n) {
|
|
4896
4898
|
const a = e.onCreateElement();
|
|
@@ -4926,25 +4928,25 @@ class ns extends zt {
|
|
|
4926
4928
|
constructor(e, r) {
|
|
4927
4929
|
var n, a;
|
|
4928
4930
|
super(e);
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
this.mapOptions = r, this.buildInMapTypeId2BIMT =
|
|
4931
|
+
g(this, "buildInMapTypeId2BIMT");
|
|
4932
|
+
g(this, "googleMapTypeId2BIMT");
|
|
4933
|
+
g(this, "map");
|
|
4934
|
+
g(this, "createLabel", Yt.create);
|
|
4935
|
+
g(this, "createCircle", Zt.create);
|
|
4936
|
+
g(this, "createPolygon", er.create);
|
|
4937
|
+
g(this, "createPolyline", Jt.create);
|
|
4938
|
+
g(this, "createRectangle", rr.create);
|
|
4939
|
+
g(this, "createInfoWindow", jt.create);
|
|
4940
|
+
g(this, "createInfoBox", Ft.create);
|
|
4941
|
+
g(this, "createMarker", qt.create);
|
|
4942
|
+
g(this, "createMapTypeControl", Ve.create);
|
|
4943
|
+
g(this, "createZoomControl", Dt.create);
|
|
4944
|
+
g(this, "createStreetViewControl", At.create);
|
|
4945
|
+
g(this, "createScaleControl", St.create);
|
|
4946
|
+
this.mapOptions = r, this.buildInMapTypeId2BIMT = F.BUILD_IN_MAP_TYPES.getValueMap(j.prototype.getId), this.googleMapTypeId2BIMT = F.BUILD_IN_MAP_TYPES.getValueMap(j.prototype.getGoogleMapTypeId);
|
|
4945
4947
|
const s = r.buildInMapTypeId && this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId);
|
|
4946
4948
|
this.map = new google.maps.Map(e, {
|
|
4947
|
-
center: r.center.toGoogle((s ??
|
|
4949
|
+
center: r.center.toGoogle((s ?? F.NORMAL).getGoogleCoordType()),
|
|
4948
4950
|
zoom: r.zoom,
|
|
4949
4951
|
disableDefaultUI: !0,
|
|
4950
4952
|
gestureHandling: r.gestureHandling,
|
|
@@ -5048,7 +5050,7 @@ class ns extends zt {
|
|
|
5048
5050
|
}
|
|
5049
5051
|
getBounds() {
|
|
5050
5052
|
const e = this.map.getBounds();
|
|
5051
|
-
return e ?
|
|
5053
|
+
return e ? V.fromGoogle(e, this.coordType) : V.EMPTY;
|
|
5052
5054
|
}
|
|
5053
5055
|
addElementOverlay(e) {
|
|
5054
5056
|
e.asGoogle().setMap(this.map);
|
|
@@ -5087,7 +5089,7 @@ class ns extends zt {
|
|
|
5087
5089
|
return new Ii(this, e);
|
|
5088
5090
|
}
|
|
5089
5091
|
createMapUrls(e) {
|
|
5090
|
-
return new
|
|
5092
|
+
return new Fe(e);
|
|
5091
5093
|
}
|
|
5092
5094
|
}
|
|
5093
5095
|
const tt = ["3.0"], os = {
|
|
@@ -5110,7 +5112,7 @@ const tt = ["3.0"], os = {
|
|
|
5110
5112
|
}
|
|
5111
5113
|
};
|
|
5112
5114
|
let jr;
|
|
5113
|
-
function
|
|
5115
|
+
function Vr() {
|
|
5114
5116
|
return jr || B("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
|
|
5115
5117
|
}
|
|
5116
5118
|
function as(i) {
|
|
@@ -5120,10 +5122,10 @@ class ls extends zt {
|
|
|
5120
5122
|
constructor(e, r) {
|
|
5121
5123
|
var a;
|
|
5122
5124
|
super(e);
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
+
g(this, "map");
|
|
5126
|
+
g(this, "defaultLayers");
|
|
5125
5127
|
this.mapOptions = r;
|
|
5126
|
-
const s =
|
|
5128
|
+
const s = Vr().here;
|
|
5127
5129
|
tt.includes(s.version) || B(`不支持${s.version}, HereMap当前只支持如下版本: ${tt}`);
|
|
5128
5130
|
const n = new H.service.Platform({
|
|
5129
5131
|
app_id: s.key.split(",")[0],
|
|
@@ -5291,7 +5293,7 @@ var K = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here
|
|
|
5291
5293
|
})(Ot || (Ot = {}));
|
|
5292
5294
|
const hs = {};
|
|
5293
5295
|
function cs(i) {
|
|
5294
|
-
return he.putIfAbsent(hs, i, () => hi(() => ds({ type: i, config:
|
|
5296
|
+
return he.putIfAbsent(hs, i, () => hi(() => ds({ type: i, config: Vr()[i] })))();
|
|
5295
5297
|
}
|
|
5296
5298
|
function ds({ type: i, config: t }) {
|
|
5297
5299
|
const e = window, r = us(i);
|
|
@@ -5457,7 +5459,7 @@ const Mn = () => {
|
|
|
5457
5459
|
((s && s.type) !== i || Date.now() - (t ?? 0) > 1e3) && e(s);
|
|
5458
5460
|
}
|
|
5459
5461
|
return { eventLog: e, eventLogLess: r };
|
|
5460
|
-
}, ir = "$map", Ne = "onCreate", Ge = "onDestroy",
|
|
5462
|
+
}, ir = "$map", Ne = "onCreate", Ge = "onDestroy", D = L({
|
|
5461
5463
|
inject: [ir],
|
|
5462
5464
|
mounted() {
|
|
5463
5465
|
je(this, Ne);
|
|
@@ -5574,7 +5576,7 @@ const Mn = () => {
|
|
|
5574
5576
|
},
|
|
5575
5577
|
mapType(i) {
|
|
5576
5578
|
var t;
|
|
5577
|
-
(t = this.map) == null || t.setMapType(i ??
|
|
5579
|
+
(t = this.map) == null || t.setMapType(i ?? F.NORMAL);
|
|
5578
5580
|
}
|
|
5579
5581
|
},
|
|
5580
5582
|
async mounted() {
|
|
@@ -5708,7 +5710,7 @@ function Ts(i, t, e, r, s, n) {
|
|
|
5708
5710
|
}
|
|
5709
5711
|
const Ms = /* @__PURE__ */ oe(bs, [["render", Ts]]), Cs = L({
|
|
5710
5712
|
name: "tg-custom-control",
|
|
5711
|
-
mixins: [
|
|
5713
|
+
mixins: [D],
|
|
5712
5714
|
props: {
|
|
5713
5715
|
position: U(k, k.RIGHT_BOTTOM)
|
|
5714
5716
|
},
|
|
@@ -5744,7 +5746,7 @@ function Os(i, t, e, r, s, n) {
|
|
|
5744
5746
|
}
|
|
5745
5747
|
const ws = /* @__PURE__ */ oe(Cs, [["render", Os]]), xs = L({
|
|
5746
5748
|
name: "tg-map-type-control",
|
|
5747
|
-
mixins: [
|
|
5749
|
+
mixins: [D],
|
|
5748
5750
|
props: {
|
|
5749
5751
|
position: U(k, k.TOP_LEFT),
|
|
5750
5752
|
type: U(Cr),
|
|
@@ -5777,7 +5779,7 @@ const ws = /* @__PURE__ */ oe(Cs, [["render", Os]]), xs = L({
|
|
|
5777
5779
|
}
|
|
5778
5780
|
}), Es = L({
|
|
5779
5781
|
name: "tg-scale-control",
|
|
5780
|
-
mixins: [
|
|
5782
|
+
mixins: [D],
|
|
5781
5783
|
props: {
|
|
5782
5784
|
position: U(k, k.BOTTOM_RIGHT)
|
|
5783
5785
|
},
|
|
@@ -5798,7 +5800,7 @@ const ws = /* @__PURE__ */ oe(Cs, [["render", Os]]), xs = L({
|
|
|
5798
5800
|
this.$map.removeControl(this.control);
|
|
5799
5801
|
}
|
|
5800
5802
|
});
|
|
5801
|
-
function
|
|
5803
|
+
function Fr() {
|
|
5802
5804
|
var e;
|
|
5803
5805
|
const i = (e = Qr()) == null ? void 0 : e.type;
|
|
5804
5806
|
let t = (i == null ? void 0 : i.name) ?? (i == null ? void 0 : i.__name);
|
|
@@ -5811,7 +5813,7 @@ function Vr() {
|
|
|
5811
5813
|
function sr() {
|
|
5812
5814
|
const i = ei(ir);
|
|
5813
5815
|
let t, e;
|
|
5814
|
-
return i == null && B(`<${
|
|
5816
|
+
return i == null && B(`<${Fr() || "unknown"}>必须作为<tg-map>的子代组件`), {
|
|
5815
5817
|
mapRef: i,
|
|
5816
5818
|
/** 读取map对象, 只要放在<tg-map>里面的组件(除#overlay插槽外)都能够立即读取到map对象 */
|
|
5817
5819
|
get map() {
|
|
@@ -5886,7 +5888,7 @@ const Ls = L({
|
|
|
5886
5888
|
}
|
|
5887
5889
|
}), Is = L({
|
|
5888
5890
|
name: "tg-marker-clusterer",
|
|
5889
|
-
mixins: [
|
|
5891
|
+
mixins: [D],
|
|
5890
5892
|
// markers从this.$children中读取, 故需要省略(Omit)
|
|
5891
5893
|
props: {
|
|
5892
5894
|
gridSize: _(Number),
|
|
@@ -5957,7 +5959,7 @@ function Ss(i, t, e, r, s, n) {
|
|
|
5957
5959
|
}
|
|
5958
5960
|
const Ur = /* @__PURE__ */ oe(Is, [["render", Ss]]), ks = L({
|
|
5959
5961
|
name: "tg-traffic-layer",
|
|
5960
|
-
mixins: [
|
|
5962
|
+
mixins: [D],
|
|
5961
5963
|
// 请直接使用v-if来控制它的显隐
|
|
5962
5964
|
// 没有属性时, 写`{}`类型推断会有问题, 故注释掉
|
|
5963
5965
|
// props: {} satisfies Props<{}>,
|
|
@@ -5975,7 +5977,7 @@ const Ur = /* @__PURE__ */ oe(Is, [["render", Ss]]), ks = L({
|
|
|
5975
5977
|
}
|
|
5976
5978
|
}), As = L({
|
|
5977
5979
|
name: "tg-circle",
|
|
5978
|
-
mixins: [
|
|
5980
|
+
mixins: [D],
|
|
5979
5981
|
inheritAttrs: !1,
|
|
5980
5982
|
props: {
|
|
5981
5983
|
center: N(C),
|
|
@@ -6053,7 +6055,7 @@ const Ur = /* @__PURE__ */ oe(Is, [["render", Ss]]), ks = L({
|
|
|
6053
6055
|
this.$map.removeOverlay(this.overlay);
|
|
6054
6056
|
}
|
|
6055
6057
|
});
|
|
6056
|
-
class
|
|
6058
|
+
class Rs extends ts {
|
|
6057
6059
|
constructor(t, e, r, s) {
|
|
6058
6060
|
super(t, e), this.content = r, this.position = s;
|
|
6059
6061
|
}
|
|
@@ -6068,11 +6070,11 @@ class Ds extends ts {
|
|
|
6068
6070
|
this.position = t, this.draw();
|
|
6069
6071
|
}
|
|
6070
6072
|
}
|
|
6071
|
-
const
|
|
6073
|
+
const Ds = L({
|
|
6072
6074
|
name: "tg-element-overlay",
|
|
6073
|
-
mixins: [
|
|
6075
|
+
mixins: [D],
|
|
6074
6076
|
props: {
|
|
6075
|
-
mapPane: U(
|
|
6077
|
+
mapPane: U(De, De.overlayMouseTarget),
|
|
6076
6078
|
position: N(C)
|
|
6077
6079
|
},
|
|
6078
6080
|
setup() {
|
|
@@ -6094,7 +6096,7 @@ const Rs = L({
|
|
|
6094
6096
|
}
|
|
6095
6097
|
},
|
|
6096
6098
|
onCreate() {
|
|
6097
|
-
this.overlay = new
|
|
6099
|
+
this.overlay = new Rs(this.$map, this, this.content(), this.position), this.$map.addElementOverlay(this.overlay);
|
|
6098
6100
|
},
|
|
6099
6101
|
onDestroy() {
|
|
6100
6102
|
this.$map.removeElementOverlay(this.overlay);
|
|
@@ -6107,9 +6109,9 @@ function $s(i, t, e, r, s, n) {
|
|
|
6107
6109
|
X(i.$slots, "default")
|
|
6108
6110
|
], 16);
|
|
6109
6111
|
}
|
|
6110
|
-
const zs = /* @__PURE__ */ oe(
|
|
6112
|
+
const zs = /* @__PURE__ */ oe(Ds, [["render", $s]]), Ns = L({
|
|
6111
6113
|
name: "tg-marker",
|
|
6112
|
-
mixins: [
|
|
6114
|
+
mixins: [D],
|
|
6113
6115
|
inheritAttrs: !1,
|
|
6114
6116
|
props: {
|
|
6115
6117
|
position: N(C),
|
|
@@ -6218,7 +6220,7 @@ function Gs(i, t, e, r, s, n) {
|
|
|
6218
6220
|
}
|
|
6219
6221
|
const pt = /* @__PURE__ */ oe(Ns, [["render", Gs]]), Zs = L({
|
|
6220
6222
|
name: "tg-info-box",
|
|
6221
|
-
mixins: [
|
|
6223
|
+
mixins: [D],
|
|
6222
6224
|
inheritAttrs: !1,
|
|
6223
6225
|
props: {
|
|
6224
6226
|
show: N(Boolean),
|
|
@@ -6298,7 +6300,7 @@ function Ws(i, t, e, r, s, n) {
|
|
|
6298
6300
|
}
|
|
6299
6301
|
const Hs = /* @__PURE__ */ oe(Zs, [["render", Ws]]), js = L({
|
|
6300
6302
|
name: "tg-info-window",
|
|
6301
|
-
mixins: [
|
|
6303
|
+
mixins: [D],
|
|
6302
6304
|
inheritAttrs: !1,
|
|
6303
6305
|
props: {
|
|
6304
6306
|
show: N(Boolean),
|
|
@@ -6360,7 +6362,7 @@ const Hs = /* @__PURE__ */ oe(Zs, [["render", Ws]]), js = L({
|
|
|
6360
6362
|
this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
|
|
6361
6363
|
}
|
|
6362
6364
|
});
|
|
6363
|
-
function
|
|
6365
|
+
function Vs(i, t, e, r, s, n) {
|
|
6364
6366
|
return ii((re(), ie("div", Ce({
|
|
6365
6367
|
class: i.$options.name
|
|
6366
6368
|
}, i.attrs.binds), [
|
|
@@ -6369,15 +6371,15 @@ function Fs(i, t, e, r, s, n) {
|
|
|
6369
6371
|
[si, i.show]
|
|
6370
6372
|
]);
|
|
6371
6373
|
}
|
|
6372
|
-
const
|
|
6374
|
+
const Fs = /* @__PURE__ */ oe(js, [["render", Vs]]), Us = L({
|
|
6373
6375
|
name: "tg-label",
|
|
6374
|
-
mixins: [
|
|
6376
|
+
mixins: [D],
|
|
6375
6377
|
inheritAttrs: !1,
|
|
6376
6378
|
props: {
|
|
6377
6379
|
position: _(C),
|
|
6378
6380
|
offset: _(Object),
|
|
6379
6381
|
zIndex: _(Number),
|
|
6380
|
-
mapPane: U(
|
|
6382
|
+
mapPane: U(De)
|
|
6381
6383
|
},
|
|
6382
6384
|
emits: void 0,
|
|
6383
6385
|
setup(i, { attrs: t }) {
|
|
@@ -6440,7 +6442,7 @@ function Ys(i, t, e, r, s, n) {
|
|
|
6440
6442
|
}
|
|
6441
6443
|
const qs = /* @__PURE__ */ oe(Us, [["render", Ys]]), Ks = L({
|
|
6442
6444
|
name: "tg-polygon",
|
|
6443
|
-
mixins: [
|
|
6445
|
+
mixins: [D],
|
|
6444
6446
|
inheritAttrs: !1,
|
|
6445
6447
|
props: {
|
|
6446
6448
|
paths: N(Array),
|
|
@@ -6509,7 +6511,7 @@ const qs = /* @__PURE__ */ oe(Us, [["render", Ys]]), Ks = L({
|
|
|
6509
6511
|
}
|
|
6510
6512
|
}), Xs = L({
|
|
6511
6513
|
name: "tg-polyline",
|
|
6512
|
-
mixins: [
|
|
6514
|
+
mixins: [D],
|
|
6513
6515
|
inheritAttrs: !1,
|
|
6514
6516
|
props: {
|
|
6515
6517
|
path: N(Array),
|
|
@@ -6577,7 +6579,7 @@ const qs = /* @__PURE__ */ oe(Us, [["render", Ys]]), Ks = L({
|
|
|
6577
6579
|
}
|
|
6578
6580
|
}), Js = L({
|
|
6579
6581
|
name: "tg-rectangle",
|
|
6580
|
-
mixins: [
|
|
6582
|
+
mixins: [D],
|
|
6581
6583
|
inheritAttrs: !1,
|
|
6582
6584
|
props: {
|
|
6583
6585
|
bounds: N(Object),
|
|
@@ -6646,7 +6648,7 @@ const qs = /* @__PURE__ */ oe(Us, [["render", Ys]]), Ks = L({
|
|
|
6646
6648
|
if (t.enable !== !1) {
|
|
6647
6649
|
const e = L({
|
|
6648
6650
|
beforeCreate() {
|
|
6649
|
-
const r =
|
|
6651
|
+
const r = Fr() ?? "", n = (t.nameRegex || /^[A-Z]/).test(r) ? (a) => {
|
|
6650
6652
|
t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : Qs.includes(a) || console.debug("[lifecycle]", r, a);
|
|
6651
6653
|
} : Ae;
|
|
6652
6654
|
n("beforeCreate"), this.__life_impl = n;
|
|
@@ -6701,22 +6703,22 @@ function tn(i, t) {
|
|
|
6701
6703
|
let n = Math.sin(r), a = Math.sin(s), c = Math.sin(e);
|
|
6702
6704
|
const o = en, l = 1 / 298.257;
|
|
6703
6705
|
n = n * n, a = a * a, c = c * c;
|
|
6704
|
-
const d = n * (1 - a) + (1 - c) * a,
|
|
6705
|
-
return b * (1 + l * (y * c * (1 - n) -
|
|
6706
|
+
const d = n * (1 - a) + (1 - c) * a, u = (1 - n) * (1 - a) + c * a, p = Math.atan(Math.sqrt(d / u)), v = Math.sqrt(d * u) / p, b = 2 * p * o, y = (3 * v - 1) / 2 / u, m = (3 * v + 1) / 2 / d;
|
|
6707
|
+
return b * (1 + l * (y * c * (1 - n) - m * (1 - c) * n));
|
|
6706
6708
|
}
|
|
6707
6709
|
function rn(i, t, e) {
|
|
6708
|
-
const s = 63567523142e-4, n = 1 / 298.257223563, a = Ie(t), c = Math.sin(a), o = Math.cos(a), l = (1 - n) * Math.tan(Ie(i.lat)), d = 1 / Math.sqrt(1 + l * l),
|
|
6709
|
-
let f = 0, M = 0, T = 0, O = e / (s *
|
|
6710
|
+
const s = 63567523142e-4, n = 1 / 298.257223563, a = Ie(t), c = Math.sin(a), o = Math.cos(a), l = (1 - n) * Math.tan(Ie(i.lat)), d = 1 / Math.sqrt(1 + l * l), u = l * d, p = Math.atan2(l, o), v = d * c, b = 1 - v * v, y = b * (6378137 * 6378137 - s * s) / (s * s), m = 1 + y / 16384 * (4096 + y * (-768 + y * (320 - 175 * y))), h = y / 1024 * (256 + y * (-128 + y * (74 - 47 * y)));
|
|
6711
|
+
let f = 0, M = 0, T = 0, O = e / (s * m), w = 2 * Math.PI;
|
|
6710
6712
|
for (; Math.abs(O - w) > 1e-12; ) {
|
|
6711
|
-
f = Math.cos(2 *
|
|
6713
|
+
f = Math.cos(2 * p + O), M = Math.sin(O), T = Math.cos(O);
|
|
6712
6714
|
const Z = h * M * (f + h / 4 * (T * (-1 + 2 * f * f) - h / 6 * f * (-3 + 4 * M * M) * (-3 + 4 * f * f)));
|
|
6713
|
-
w = O, O = e / (s *
|
|
6715
|
+
w = O, O = e / (s * m) + Z;
|
|
6714
6716
|
}
|
|
6715
|
-
const E =
|
|
6716
|
-
|
|
6717
|
+
const E = u * M - d * T * o, R = Math.atan2(
|
|
6718
|
+
u * T + d * M * o,
|
|
6717
6719
|
(1 - n) * Math.sqrt(v * v + E * E)
|
|
6718
|
-
), G = Math.atan2(M * c, d * T -
|
|
6719
|
-
return { lng: i.lng + mr(J), lat: mr(
|
|
6720
|
+
), G = Math.atan2(M * c, d * T - u * M * o), P = n / 16 * b * (4 + n * (4 - 3 * b)), J = G - (1 - P) * n * v * (O + P * M * (f + P * T * (-1 + 2 * f * f)));
|
|
6721
|
+
return { lng: i.lng + mr(J), lat: mr(R) };
|
|
6720
6722
|
}
|
|
6721
6723
|
const On = {
|
|
6722
6724
|
getDistance: tn,
|
|
@@ -6724,7 +6726,7 @@ const On = {
|
|
|
6724
6726
|
}, wn = {
|
|
6725
6727
|
install(i, t) {
|
|
6726
6728
|
if (as(t), {}.VITE_FALSE) {
|
|
6727
|
-
const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Ze, "./TgMapWidget.vue": Ms, "./controls/TgCustomControl.vue": ws, "./controls/TgMapTypeControl.vue": xs, "./controls/TgScaleControl.vue": Es, "./controls/TgStreetViewControl.vue": Ls, "./controls/TgZoomControl.vue": Ps, "./extra/TgHeatmap.vue": Bs, "./extra/TgMarkerClusterer.vue": Ur, "./layers/TgTrafficLayer.vue": ks, "./overlays/TgCircle.vue": As, "./overlays/TgElementOverlay.vue": zs, "./overlays/TgInfoBox.vue": Hs, "./overlays/TgInfoWindow.vue":
|
|
6729
|
+
const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Ze, "./TgMapWidget.vue": Ms, "./controls/TgCustomControl.vue": ws, "./controls/TgMapTypeControl.vue": xs, "./controls/TgScaleControl.vue": Es, "./controls/TgStreetViewControl.vue": Ls, "./controls/TgZoomControl.vue": Ps, "./extra/TgHeatmap.vue": Bs, "./extra/TgMarkerClusterer.vue": Ur, "./layers/TgTrafficLayer.vue": ks, "./overlays/TgCircle.vue": As, "./overlays/TgElementOverlay.vue": zs, "./overlays/TgInfoBox.vue": Hs, "./overlays/TgInfoWindow.vue": Fs, "./overlays/TgLabel.vue": qs, "./overlays/TgMarker.vue": pt, "./overlays/TgPolygon.vue": Ks, "./overlays/TgPolyline.vue": Xs, "./overlays/TgRectangle.vue": Js });
|
|
6728
6730
|
Object.keys(r).forEach((s) => {
|
|
6729
6731
|
const n = r[s];
|
|
6730
6732
|
i.component(n.name ?? B(`Tg开头的组件必须设置name: ${s}`), n);
|
|
@@ -6743,7 +6745,7 @@ export {
|
|
|
6743
6745
|
Gt as BaiduCircle,
|
|
6744
6746
|
Pt as BaiduControl,
|
|
6745
6747
|
Oi as BaiduHeatmap,
|
|
6746
|
-
|
|
6748
|
+
Vt as BaiduInfoBoxOverlay,
|
|
6747
6749
|
Ht as BaiduInfoWindow,
|
|
6748
6750
|
Bt as BaiduMapTypeControl,
|
|
6749
6751
|
Ue as BaiduMapUrls,
|
|
@@ -6758,7 +6760,7 @@ export {
|
|
|
6758
6760
|
It as BaiduScaleControl,
|
|
6759
6761
|
Ai as BaiduSearchBox,
|
|
6760
6762
|
kt as BaiduStreetViewControl,
|
|
6761
|
-
|
|
6763
|
+
Rt as BaiduZoomControl,
|
|
6762
6764
|
j as BuildInMapType,
|
|
6763
6765
|
Mr as BuildInMapTypeId,
|
|
6764
6766
|
Pe as CachedValue,
|
|
@@ -6774,10 +6776,10 @@ export {
|
|
|
6774
6776
|
Zt as GoogleCircle,
|
|
6775
6777
|
ht as GoogleControl,
|
|
6776
6778
|
Ci as GoogleHeatmap,
|
|
6777
|
-
|
|
6779
|
+
Ft as GoogleInfoBoxOverlay,
|
|
6778
6780
|
jt as GoogleInfoWindow,
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
+
Ve as GoogleMapTypeControl,
|
|
6782
|
+
Fe as GoogleMapUrls,
|
|
6781
6783
|
qt as GoogleMarker,
|
|
6782
6784
|
Bi as GoogleMarkerClusterer,
|
|
6783
6785
|
Nt as GoogleOverlay,
|
|
@@ -6788,7 +6790,7 @@ export {
|
|
|
6788
6790
|
St as GoogleScaleControl,
|
|
6789
6791
|
ki as GoogleSearchBox,
|
|
6790
6792
|
At as GoogleStreetViewControl,
|
|
6791
|
-
|
|
6793
|
+
Dt as GoogleZoomControl,
|
|
6792
6794
|
Pr as Heatmap,
|
|
6793
6795
|
Qe as Icon,
|
|
6794
6796
|
et as IconSequence,
|
|
@@ -6797,22 +6799,22 @@ export {
|
|
|
6797
6799
|
Xi as InfoWindowModeValues,
|
|
6798
6800
|
ar as KeyValue,
|
|
6799
6801
|
C as LatLng,
|
|
6800
|
-
|
|
6802
|
+
V as LatLngBounds,
|
|
6801
6803
|
Cn as LifecycleLogPlugin,
|
|
6802
6804
|
te as Location,
|
|
6803
6805
|
Ne as MIXIN_HOOK_CREATE,
|
|
6804
6806
|
Ge as MIXIN_HOOK_DESTROY,
|
|
6805
6807
|
ir as MIXIN_MAP_NAME,
|
|
6806
6808
|
ye as MVCArrays,
|
|
6807
|
-
|
|
6809
|
+
D as MapMixin,
|
|
6808
6810
|
Ct as MapOptions,
|
|
6809
|
-
|
|
6811
|
+
De as MapPane,
|
|
6810
6812
|
$e as MapPanes,
|
|
6811
|
-
|
|
6813
|
+
F as MapType,
|
|
6812
6814
|
Cr as MapTypeControlType,
|
|
6813
6815
|
Br as MapUrls,
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
+
Ri as MapZoom,
|
|
6817
|
+
Dr as MarkerClusterer,
|
|
6816
6818
|
he as Objects,
|
|
6817
6819
|
Wr as Overlay,
|
|
6818
6820
|
$r as PlacesService,
|
|
@@ -6827,7 +6829,7 @@ export {
|
|
|
6827
6829
|
zs as TgElementOverlay,
|
|
6828
6830
|
Bs as TgHeatmap,
|
|
6829
6831
|
Hs as TgInfoBox,
|
|
6830
|
-
|
|
6832
|
+
Fs as TgInfoWindow,
|
|
6831
6833
|
qs as TgLabel,
|
|
6832
6834
|
Ze as TgMap,
|
|
6833
6835
|
Ot as TgMapFactory,
|
|
@@ -6860,7 +6862,7 @@ export {
|
|
|
6860
6862
|
xt as findAncestorComponentByType,
|
|
6861
6863
|
bn as findByComponentType,
|
|
6862
6864
|
rn as getDestination,
|
|
6863
|
-
|
|
6865
|
+
Vr as getTgMapConfig,
|
|
6864
6866
|
Tt as isComponentByType,
|
|
6865
6867
|
un as isDef,
|
|
6866
6868
|
li as isEntryValueDef,
|