tg-map-vue3 3.7.12 → 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 +320 -318
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +5 -5
- package/dist/tg-map.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/tg-map.js
CHANGED
|
@@ -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;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)}})();
|
|
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, R =
|
|
82
|
+
var E = h + f, R = m + M;
|
|
83
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) {
|
|
@@ -370,15 +370,15 @@ const de = class {
|
|
|
370
370
|
}
|
|
371
371
|
};
|
|
372
372
|
let V = de;
|
|
373
|
-
|
|
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() {
|
|
@@ -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();
|
|
@@ -974,7 +974,7 @@ const ge = class extends ht {
|
|
|
974
974
|
}
|
|
975
975
|
};
|
|
976
976
|
let Ve = ge;
|
|
977
|
-
|
|
977
|
+
g(Ve, "type2google");
|
|
978
978
|
class It extends Pt {
|
|
979
979
|
static create(t) {
|
|
980
980
|
const e = new BMap.ScaleControl({
|
|
@@ -1024,14 +1024,14 @@ class Dt 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,14 +1176,14 @@ 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,
|
|
1184
|
+
_organiseData: function(y, m) {
|
|
1185
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 ? (
|
|
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,
|
|
@@ -1193,14 +1193,14 @@ var Lr = { exports: {} };
|
|
|
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() {
|
|
@@ -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
|
},
|
|
@@ -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);
|
|
@@ -1699,7 +1699,7 @@ const it = class extends Br {
|
|
|
1699
1699
|
}
|
|
1700
1700
|
};
|
|
1701
1701
|
let Fe = it;
|
|
1702
|
-
|
|
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
|
});
|
|
@@ -2978,7 +2978,7 @@ 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),
|
|
@@ -3000,7 +3000,7 @@ 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) {
|
|
@@ -3194,9 +3194,9 @@ class Ai extends zr {
|
|
|
3194
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
|
});
|
|
@@ -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
|
-
d.
|
|
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", () => {
|
|
@@ -3937,11 +3939,11 @@ var De = /* @__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() {
|
|
@@ -4016,7 +4018,7 @@ function is() {
|
|
|
4016
4018
|
return class extends google.maps.OverlayView {
|
|
4017
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) {
|
|
@@ -4741,21 +4743,21 @@ 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
|
-
|
|
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);
|
|
4759
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,
|
|
@@ -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,21 +4928,21 @@ 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
|
-
|
|
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);
|
|
4944
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, {
|
|
@@ -5120,8 +5122,8 @@ 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
5128
|
const s = Vr().here;
|
|
5127
5129
|
tt.includes(s.version) || B(`不支持${s.version}, HereMap当前只支持如下版本: ${tt}`);
|
|
@@ -6701,21 +6703,21 @@ 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 -
|
|
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)));
|
|
6719
6721
|
return { lng: i.lng + mr(J), lat: mr(R) };
|
|
6720
6722
|
}
|
|
6721
6723
|
const On = {
|