tg-map-vue3 3.9.5 → 3.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/dist/src/components/overlays/TgMarker.vue.d.ts +8 -1
- package/dist/src/map/map/overlay/icon.d.ts +11 -5
- package/dist/src/map/map/overlay/label.d.ts +7 -2
- package/dist/src/map/map/overlay/marker-label.d.ts +19 -0
- package/dist/src/map/map/overlay/marker.d.ts +12 -4
- package/dist/tg-map.cjs +6 -6
- package/dist/tg-map.cjs.map +1 -1
- package/dist/tg-map.js +773 -730
- package/dist/tg-map.js.map +1 -1
- package/package.json +1 -1
package/dist/tg-map.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.baidu-info-box-container{transform:translateY(-11px);font-size:13px;font-weight:300;width:100vw;cursor:auto;-webkit-user-select:auto!important;user-select:auto!important}.baidu-info-box-container__border{position:absolute;padding:12px;background-color:#fff;box-shadow:0 2px 7px 1px #0000004d;border-radius:8px;transform:translate(-50%,-100%)}.baidu-info-box-container__inner{overflow:auto}.baidu-info-box-container__close{position:absolute;right:-6px;top:-6px;width:14px;height:14px;margin:8px;opacity:.6;cursor:pointer;-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22/%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22/%3E%3C/svg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22/%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22/%3E%3C/svg%3E);background-color:#000}.baidu-info-box-container__close:hover{opacity:1}.baidu-info-box-container:after{position:absolute;background-color:#fff;content:"";width:15px;height:15px;left:0;top:0;box-shadow:-2px 2px 2px #b2b2b266;transform:translate(-50%,-50%) rotate(-45deg)}.gm-style-iw-c .gm-style-iw-chr{display:block}.gm-style-iw-c .gm-style-iw-chr .gm-style-iw-ch{padding-top:12px}.gm-style-iw-c .gm-style-iw-chr button.gm-ui-hover-effect{position:absolute!important;right:-6px;top:-6px;width:14px!important;height:14px!important;margin:8px!important}.gm-style-iw-c .gm-style-iw-chr button.gm-ui-hover-effect span{width:14px!important;height:14px!important;margin:0!important}.gm-style-iw-c .gm-style-iw-d::-webkit-scrollbar{width:12px;height:12px}.element-overlay{position:absolute}.tg-map{height:100%;position:relative}.tg-map__map{width:100%;height:100%}.tg-map__map--hide-logo-google .gm-style a[target=_blank]:has(>div>img){display:none!important}.tg-map__map--hide-logo-google .gm-style>div:last-child>div:last-child>div{display:none}.tg-map__map--hide-logo-baidu div.anchorBL>a[target=_blank]>img{display:none}.tg-map__map--hide-logo-baidu div.BMap_cpyCtrl{display:none}.tg-map-widget{position:absolute}.tg-map>.tg-custom-control{display:none}.tg-map .tg-element-overlay{display:none}.tg-map__map .tg-element-overlay{display:block}.tg-map .tg-info-box{display:none}.tg-map__map .tg-info-box{display:block}.tg-map .tg-label{display:none}.tg-map__map .tg-label{display:block}')),document.head.appendChild(t)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var m = (i, t, e) => (
|
|
5
|
-
import { noop as z, assert as ve, throwError as I, Arrays as
|
|
6
|
-
import { createCommentVNode as _t, computed as
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.baidu-info-box-container{transform:translateY(-11px);font-size:13px;font-weight:300;width:100vw;cursor:auto;-webkit-user-select:auto!important;user-select:auto!important}.baidu-info-box-container__border{position:absolute;padding:12px;background-color:#fff;box-shadow:0 2px 7px 1px #0000004d;border-radius:8px;transform:translate(-50%,-100%)}.baidu-info-box-container__inner{overflow:auto}.baidu-info-box-container__close{position:absolute;right:-6px;top:-6px;width:14px;height:14px;margin:8px;opacity:.6;cursor:pointer;-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22/%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22/%3E%3C/svg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22/%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22/%3E%3C/svg%3E);background-color:#000}.baidu-info-box-container__close:hover{opacity:1}.baidu-info-box-container:after{position:absolute;background-color:#fff;content:"";width:15px;height:15px;left:0;top:0;box-shadow:-2px 2px 2px #b2b2b266;transform:translate(-50%,-50%) rotate(-45deg)}.gm-style-iw-c .gm-style-iw-chr{display:block}.gm-style-iw-c .gm-style-iw-chr .gm-style-iw-ch{padding-top:12px}.gm-style-iw-c .gm-style-iw-chr button.gm-ui-hover-effect{position:absolute!important;right:-6px;top:-6px;width:14px!important;height:14px!important;margin:8px!important}.gm-style-iw-c .gm-style-iw-chr button.gm-ui-hover-effect span{width:14px!important;height:14px!important;margin:0!important}.gm-style-iw-c .gm-style-iw-d::-webkit-scrollbar{width:12px;height:12px}.element-overlay{position:absolute}.baidu-marker-label{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.tg-map{height:100%;position:relative}.tg-map__map{width:100%;height:100%}.tg-map__map--hide-logo-google .gm-style a[target=_blank]:has(>div>img){display:none!important}.tg-map__map--hide-logo-google .gm-style>div:last-child>div:last-child>div{display:none}.tg-map__map--hide-logo-baidu div.anchorBL>a[target=_blank]>img{display:none}.tg-map__map--hide-logo-baidu div.BMap_cpyCtrl{display:none}.tg-map-widget{position:absolute}.tg-map>.tg-custom-control{display:none}.tg-map .tg-element-overlay{display:none}.tg-map__map .tg-element-overlay{display:block}.tg-map .tg-info-box{display:none}.tg-map__map .tg-info-box{display:block}.tg-map .tg-label{display:none}.tg-map__map .tg-label{display:block}')),document.head.appendChild(t)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
+
var Xr = Object.defineProperty;
|
|
3
|
+
var Jr = (i, t, e) => t in i ? Xr(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
4
|
+
var m = (i, t, e) => (Jr(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
5
|
+
import { noop as z, assert as ve, throwError as I, Arrays as yr, lateinit as L, throwUnsupported as Lt, assertNever as yt, typed as Ye, path as Qr } from "tg-commons";
|
|
6
|
+
import { createCommentVNode as _t, computed as _r, defineComponent as P, markRaw as ei, watch as De, openBlock as de, createElementBlock as ue, mergeProps as He, createElementVNode as ti, normalizeClass as nt, renderSlot as J, normalizeStyle as ri, getCurrentInstance as ii, inject as si, onMounted as ni, onBeforeUnmount as oi, toRaw as ot, withDirectives as ai, vShow as li } from "vue";
|
|
7
7
|
function se(i, t, e) {
|
|
8
8
|
Object.keys(i).forEach((r) => {
|
|
9
9
|
r.startsWith("update:") || e != null && e.includes(r) || t.addEventListener(r, i[r]);
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
let
|
|
13
|
-
function
|
|
14
|
-
return
|
|
12
|
+
let hi = 1;
|
|
13
|
+
function ci() {
|
|
14
|
+
return hi++;
|
|
15
15
|
}
|
|
16
16
|
function qe(i, t) {
|
|
17
|
-
return t.__id__ || (t.__id__ =
|
|
17
|
+
return t.__id__ || (t.__id__ = ci()), `${i}::${t.__id__}`;
|
|
18
18
|
}
|
|
19
19
|
var Pt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
20
20
|
function at(i) {
|
|
21
21
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
22
22
|
}
|
|
23
|
-
var
|
|
23
|
+
var br = { exports: {} };
|
|
24
24
|
(function(i) {
|
|
25
25
|
(function(t, e) {
|
|
26
26
|
i.exports ? i.exports = e() : t.coordtransform = e();
|
|
@@ -54,12 +54,12 @@ var _r = { exports: {} };
|
|
|
54
54
|
function h(l, d, v = !0) {
|
|
55
55
|
for (var y = 0; y < a.length; y++)
|
|
56
56
|
if (a[y].contain(l, d)) {
|
|
57
|
-
for (var
|
|
58
|
-
if (u[
|
|
57
|
+
for (var C = 0; C < u.length; C++)
|
|
58
|
+
if (u[C].contain(l, d))
|
|
59
59
|
return !1;
|
|
60
60
|
if (v) {
|
|
61
|
-
for (var
|
|
62
|
-
if (o[
|
|
61
|
+
for (var C = 0; C < o.length; C++)
|
|
62
|
+
if (o[C].contain(l, d))
|
|
63
63
|
return !1;
|
|
64
64
|
}
|
|
65
65
|
return !0;
|
|
@@ -67,33 +67,33 @@ var _r = { exports: {} };
|
|
|
67
67
|
return !1;
|
|
68
68
|
}
|
|
69
69
|
function c(l, d) {
|
|
70
|
-
var v = l - 65e-4, y = d - 6e-3,
|
|
70
|
+
var v = l - 65e-4, y = d - 6e-3, C = Math.sqrt(v * v + y * y) - 2e-5 * Math.sin(y * t), w = Math.atan2(y, v) - 3e-6 * Math.cos(v * t), E = C * Math.cos(w), k = C * Math.sin(w);
|
|
71
71
|
return [E, k];
|
|
72
72
|
}
|
|
73
73
|
function p(l, d) {
|
|
74
|
-
var v = Math.sqrt(l * l + d * d) + 2e-5 * Math.sin(d * t), y = Math.atan2(d, l) + 3e-6 * Math.cos(l * t),
|
|
75
|
-
return [
|
|
74
|
+
var v = Math.sqrt(l * l + d * d) + 2e-5 * Math.sin(d * t), y = Math.atan2(d, l) + 3e-6 * Math.cos(l * t), C = v * Math.cos(y) + 65e-4, w = v * Math.sin(y) + 6e-3;
|
|
75
|
+
return [C, w];
|
|
76
76
|
}
|
|
77
77
|
function g(l, d) {
|
|
78
|
-
return
|
|
78
|
+
return M(l, d);
|
|
79
79
|
}
|
|
80
80
|
function f(l, d) {
|
|
81
|
-
var v =
|
|
81
|
+
var v = M(l, d);
|
|
82
82
|
return [l * 2 - v[0], d * 2 - v[1]];
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
var v = _(l - 105, d - 35), y =
|
|
84
|
+
function M(l, d) {
|
|
85
|
+
var v = _(l - 105, d - 35), y = T(l - 105, d - 35), C = d / 180 * e, w = Math.sin(C);
|
|
86
86
|
w = 1 - s * w * w;
|
|
87
87
|
var E = Math.sqrt(w);
|
|
88
|
-
v = v * 180 / (r * (1 - s) / (w * E) * e), y = y * 180 / (r / E * Math.cos(
|
|
89
|
-
var k = d + v,
|
|
90
|
-
return [
|
|
88
|
+
v = v * 180 / (r * (1 - s) / (w * E) * e), y = y * 180 / (r / E * Math.cos(C) * e);
|
|
89
|
+
var k = d + v, G = l + y;
|
|
90
|
+
return [G, k];
|
|
91
91
|
}
|
|
92
92
|
function _(l, d) {
|
|
93
93
|
var v = -100 + 2 * l + 3 * d + 0.2 * d * d + 0.1 * l * d + 0.2 * Math.sqrt(Math.abs(l));
|
|
94
94
|
return v += (20 * Math.sin(6 * l * e) + 20 * Math.sin(2 * l * e)) * 2 / 3, v += (20 * Math.sin(d * e) + 40 * Math.sin(d / 3 * e)) * 2 / 3, v += (160 * Math.sin(d / 12 * e) + 320 * Math.sin(d * e / 30)) * 2 / 3, v;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function T(l, d) {
|
|
97
97
|
var v = 300 + l + 2 * d + 0.1 * l * l + 0.1 * l * d + 0.1 * Math.sqrt(Math.abs(l));
|
|
98
98
|
return v += (20 * Math.sin(6 * l * e) + 20 * Math.sin(2 * l * e)) * 2 / 3, v += (20 * Math.sin(l * e) + 40 * Math.sin(l / 3 * e)) * 2 / 3, v += (150 * Math.sin(l / 12 * e) + 300 * Math.sin(l / 30 * e)) * 2 / 3, v;
|
|
99
99
|
}
|
|
@@ -126,23 +126,23 @@ var _r = { exports: {} };
|
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
128
|
});
|
|
129
|
-
})(
|
|
130
|
-
var
|
|
131
|
-
const me = /* @__PURE__ */ at(
|
|
132
|
-
function
|
|
129
|
+
})(br);
|
|
130
|
+
var di = br.exports;
|
|
131
|
+
const me = /* @__PURE__ */ at(di);
|
|
132
|
+
function pn(i, t) {
|
|
133
133
|
return i instanceof t;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function gn(i, t) {
|
|
136
136
|
if (i instanceof t)
|
|
137
137
|
return i;
|
|
138
138
|
}
|
|
139
139
|
function bt(i, t) {
|
|
140
140
|
return (i == null ? void 0 : i.$options.name) === t.name;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function Mr(i, t) {
|
|
143
143
|
return bt(i, t) ? i : void 0;
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function Bt(i, t, e) {
|
|
146
146
|
let r = t;
|
|
147
147
|
for (; r; ) {
|
|
148
148
|
if (bt(r, i))
|
|
@@ -152,7 +152,7 @@ function Lt(i, t, e) {
|
|
|
152
152
|
r = r.$parent;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function mn(i) {
|
|
156
156
|
return i;
|
|
157
157
|
}
|
|
158
158
|
var R = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(R || {});
|
|
@@ -262,7 +262,7 @@ const gt = "wgs84", $ = class $ {
|
|
|
262
262
|
}
|
|
263
263
|
};
|
|
264
264
|
m($, "ZERO", $.create(0, 0));
|
|
265
|
-
let
|
|
265
|
+
let O = $;
|
|
266
266
|
const ae = class ae {
|
|
267
267
|
/**
|
|
268
268
|
* 不推荐直接创建LatLngBounds, sw和ne的大小关系可能没法保证, 推荐用LatLngBounds.Builder或者LatLngBounds.from等静态方法来创建
|
|
@@ -289,14 +289,14 @@ const ae = class ae {
|
|
|
289
289
|
}
|
|
290
290
|
static fromGoogle(t, e) {
|
|
291
291
|
return new ae(
|
|
292
|
-
|
|
293
|
-
|
|
292
|
+
O.fromGoogle(t.getSouthWest(), e),
|
|
293
|
+
O.fromGoogle(t.getNorthEast(), e)
|
|
294
294
|
);
|
|
295
295
|
}
|
|
296
296
|
static fromBaidu(t, e) {
|
|
297
297
|
return new ae(
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
O.fromBaidu(t.getSouthWest(), e),
|
|
299
|
+
O.fromBaidu(t.getNorthEast(), e)
|
|
300
300
|
);
|
|
301
301
|
}
|
|
302
302
|
static create(t, e) {
|
|
@@ -313,7 +313,7 @@ const ae = class ae {
|
|
|
313
313
|
if (this.sw.equals(this.ne))
|
|
314
314
|
return this.sw;
|
|
315
315
|
const t = (this.sw.lat + this.ne.lat) / 2, e = (this.sw.lng + this.ne.lng + (this.sw.lng < this.ne.lng ? 0 : 360)) / 2;
|
|
316
|
-
return
|
|
316
|
+
return O.create(t, e, this.coord);
|
|
317
317
|
}
|
|
318
318
|
toString() {
|
|
319
319
|
return JSON.stringify(this);
|
|
@@ -329,9 +329,9 @@ const ae = class ae {
|
|
|
329
329
|
const t = this.sw.coord;
|
|
330
330
|
return [
|
|
331
331
|
this.sw,
|
|
332
|
-
|
|
332
|
+
O.fromLngLat(this.sw.lng, this.ne.lat, t),
|
|
333
333
|
this.ne,
|
|
334
|
-
|
|
334
|
+
O.fromLngLat(this.ne.lng, this.sw.lat, t)
|
|
335
335
|
];
|
|
336
336
|
}
|
|
337
337
|
toGoogle(t) {
|
|
@@ -344,7 +344,7 @@ const ae = class ae {
|
|
|
344
344
|
return [this.sw.toBaidu(t), this.ne.toBaidu(t)];
|
|
345
345
|
}
|
|
346
346
|
};
|
|
347
|
-
m(ae, "EMPTY", new ae(
|
|
347
|
+
m(ae, "EMPTY", new ae(O.ZERO, O.ZERO));
|
|
348
348
|
let Q = ae;
|
|
349
349
|
((i) => {
|
|
350
350
|
class t {
|
|
@@ -359,9 +359,9 @@ let Q = ae;
|
|
|
359
359
|
build() {
|
|
360
360
|
return new i(
|
|
361
361
|
// sw对应min
|
|
362
|
-
|
|
362
|
+
O.create(this.minLat, this.minLng, this.coord),
|
|
363
363
|
// ne对应max
|
|
364
|
-
|
|
364
|
+
O.create(this.maxLat, this.maxLng, this.coord)
|
|
365
365
|
);
|
|
366
366
|
}
|
|
367
367
|
include(r) {
|
|
@@ -393,7 +393,7 @@ var ie;
|
|
|
393
393
|
function Tr() {
|
|
394
394
|
BMap.OverlayV3 || (BMap.OverlayV3 = BMap.Overlay);
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function ui() {
|
|
397
397
|
const i = window.$BAIDU$;
|
|
398
398
|
"kT" in i || Object.defineProperty(i, "kT", {
|
|
399
399
|
get: () => i._instances,
|
|
@@ -401,19 +401,19 @@ function di() {
|
|
|
401
401
|
configurable: !0
|
|
402
402
|
});
|
|
403
403
|
}
|
|
404
|
-
const
|
|
404
|
+
const lr = {
|
|
405
405
|
/** {@link BMap.Point.equals} 无效, 故需要自己写一个 */
|
|
406
406
|
equals(i, t) {
|
|
407
407
|
return i.lat === t.lat && i.lng === t.lng;
|
|
408
408
|
}
|
|
409
409
|
};
|
|
410
|
-
var
|
|
410
|
+
var Mt;
|
|
411
411
|
((i) => {
|
|
412
412
|
function t(e) {
|
|
413
413
|
return e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight;
|
|
414
414
|
}
|
|
415
415
|
i.isScrollable = t;
|
|
416
|
-
})(
|
|
416
|
+
})(Mt || (Mt = {}));
|
|
417
417
|
var Ke;
|
|
418
418
|
((i) => {
|
|
419
419
|
function t(s, n) {
|
|
@@ -459,22 +459,22 @@ var ye;
|
|
|
459
459
|
}
|
|
460
460
|
i.listenChanged = r;
|
|
461
461
|
})(ye || (ye = {}));
|
|
462
|
-
function
|
|
462
|
+
function Or(i, t, e) {
|
|
463
463
|
return i.addListener(t, e).remove;
|
|
464
464
|
}
|
|
465
|
-
function
|
|
465
|
+
function pi(i, t, e) {
|
|
466
466
|
return i.addEventListener(t, e), () => i.removeEventListener(t, e);
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function gi(i, t, e, r) {
|
|
469
469
|
return i.addEventListener(t, e, r), () => i.removeEventListener(t, e, r);
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function hr(i, t, e) {
|
|
472
472
|
return i.addEventListener(t, e), () => i.removeEventListener(t, e);
|
|
473
473
|
}
|
|
474
474
|
class Cr {
|
|
475
475
|
constructor(t, e) {
|
|
476
476
|
m(this, "eventMap", /* @__PURE__ */ new Map());
|
|
477
|
-
m(this, "target",
|
|
477
|
+
m(this, "target", L());
|
|
478
478
|
this.inner = t, this.coordTypeSupplier = e, this.addEventListener = this.addEventListener.bind(this), this.removeEventListener = this.removeEventListener.bind(this);
|
|
479
479
|
}
|
|
480
480
|
setTarget(t) {
|
|
@@ -483,7 +483,7 @@ class Cr {
|
|
|
483
483
|
}
|
|
484
484
|
class lt {
|
|
485
485
|
constructor(t, e) {
|
|
486
|
-
m(this, "eventHub", new
|
|
486
|
+
m(this, "eventHub", new wr());
|
|
487
487
|
this.delegate = t, this.options = e;
|
|
488
488
|
}
|
|
489
489
|
notify(t) {
|
|
@@ -523,7 +523,7 @@ const st = class st extends Cr {
|
|
|
523
523
|
target: this.target,
|
|
524
524
|
originalEvent: n
|
|
525
525
|
};
|
|
526
|
-
n != null && n.latLng && (a.position =
|
|
526
|
+
n != null && n.latLng && (a.position = O.fromGoogle(n.latLng, this.coordTypeSupplier.coordType)), e.call(this.target, a);
|
|
527
527
|
});
|
|
528
528
|
this.eventMap.set(r, s);
|
|
529
529
|
}
|
|
@@ -563,7 +563,7 @@ const Se = class Se extends Cr {
|
|
|
563
563
|
target: this.target,
|
|
564
564
|
originalEvent: n
|
|
565
565
|
};
|
|
566
|
-
n.point && (a.position =
|
|
566
|
+
n.point && (a.position = O.fromBaidu(n.point, this.coordTypeSupplier.coordType)), e.call(this.target, a);
|
|
567
567
|
};
|
|
568
568
|
this.inner.addEventListener(Se.EVENT_TYPE_MAP[t] || t, s), this.eventMap.set(r, s);
|
|
569
569
|
}
|
|
@@ -583,7 +583,7 @@ m(Se, "EVENT_TYPE_MAP", {
|
|
|
583
583
|
"map-type-changed": "maptypechange"
|
|
584
584
|
});
|
|
585
585
|
let Re = Se;
|
|
586
|
-
class
|
|
586
|
+
class wr {
|
|
587
587
|
constructor() {
|
|
588
588
|
m(this, "typeMap", /* @__PURE__ */ new Map());
|
|
589
589
|
}
|
|
@@ -593,7 +593,7 @@ class Or {
|
|
|
593
593
|
}
|
|
594
594
|
removeEventListener(t, e) {
|
|
595
595
|
const r = this.typeMap.get(t);
|
|
596
|
-
r &&
|
|
596
|
+
r && yr.remove(r, e);
|
|
597
597
|
}
|
|
598
598
|
hasListener(t) {
|
|
599
599
|
const e = this.typeMap.get(t);
|
|
@@ -604,7 +604,7 @@ class Or {
|
|
|
604
604
|
e && e.forEach((r) => r.call(t.target, t));
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
|
-
class
|
|
607
|
+
class cr {
|
|
608
608
|
/**
|
|
609
609
|
* `keys`和`values`数组中可以有相同的值, 若存在相同值, 则index越小的优先级越高
|
|
610
610
|
*/
|
|
@@ -622,7 +622,7 @@ class hr {
|
|
|
622
622
|
return this.keyToValue.get(t) ?? I();
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
|
-
class
|
|
625
|
+
class mi {
|
|
626
626
|
constructor(t, e = 10) {
|
|
627
627
|
m(this, "map", /* @__PURE__ */ new Map());
|
|
628
628
|
this.values = t, this.maxSize4Debug = e, z();
|
|
@@ -651,7 +651,7 @@ class gi {
|
|
|
651
651
|
return this.getOrNull(t, e) ?? I(`key(${e})不存在与valueMap(${this.getValueMap(t)})中`);
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
|
-
class
|
|
654
|
+
class Pe {
|
|
655
655
|
constructor(t) {
|
|
656
656
|
m(this, "value");
|
|
657
657
|
this.creator = t, z();
|
|
@@ -679,7 +679,7 @@ var D = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
679
679
|
/* RIGHT_BOTTOM */
|
|
680
680
|
];
|
|
681
681
|
function s() {
|
|
682
|
-
return t || (t = new
|
|
682
|
+
return t || (t = new cr(r, [
|
|
683
683
|
/* | @tg/map |名字相同| baidu | */
|
|
684
684
|
/* TOP_LEFT = */
|
|
685
685
|
BMAP_ANCHOR_TOP_LEFT,
|
|
@@ -709,7 +709,7 @@ var D = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
709
709
|
}
|
|
710
710
|
i.getBaidu = s;
|
|
711
711
|
function n() {
|
|
712
|
-
return e || (e = new
|
|
712
|
+
return e || (e = new cr(r, [
|
|
713
713
|
google.maps.ControlPosition.TOP_LEFT,
|
|
714
714
|
google.maps.ControlPosition.TOP_CENTER,
|
|
715
715
|
google.maps.ControlPosition.TOP_RIGHT,
|
|
@@ -726,16 +726,16 @@ var D = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
726
726
|
}
|
|
727
727
|
i.getGoogle = n;
|
|
728
728
|
})(q || (q = {}));
|
|
729
|
-
class
|
|
729
|
+
class fi {
|
|
730
730
|
constructor(t) {
|
|
731
731
|
/** 实际添加到地图中的control对象 */
|
|
732
732
|
m(this, "inner");
|
|
733
733
|
this.position = t, z();
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
|
-
class
|
|
736
|
+
class It {
|
|
737
737
|
}
|
|
738
|
-
class
|
|
738
|
+
class vi extends It {
|
|
739
739
|
constructor(t, e) {
|
|
740
740
|
super(), this.visible = t, this.position = e;
|
|
741
741
|
}
|
|
@@ -756,7 +756,7 @@ class fi extends Bt {
|
|
|
756
756
|
removeFrom(t) {
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
|
-
class
|
|
759
|
+
class St extends It {
|
|
760
760
|
constructor(t, e) {
|
|
761
761
|
super(), this.inner = t, this.position = e;
|
|
762
762
|
}
|
|
@@ -779,7 +779,7 @@ class It extends Bt {
|
|
|
779
779
|
t.innerMap.removeControl(this.inner);
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
|
-
class ht extends
|
|
782
|
+
class ht extends It {
|
|
783
783
|
constructor(e, r) {
|
|
784
784
|
super();
|
|
785
785
|
m(this, "visible", !1);
|
|
@@ -816,7 +816,7 @@ class ht extends Bt {
|
|
|
816
816
|
});
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
|
-
var
|
|
819
|
+
var xr = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))(xr || {});
|
|
820
820
|
class j {
|
|
821
821
|
constructor(t, e, r, s) {
|
|
822
822
|
this.id = t, this.baidu = e, this.google = r, this.googleCoordType = s, z();
|
|
@@ -838,19 +838,19 @@ class j {
|
|
|
838
838
|
return this.google();
|
|
839
839
|
}
|
|
840
840
|
asGoogleMapType() {
|
|
841
|
-
|
|
841
|
+
Lt("google的内置地图没有对应的实例");
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
|
-
class
|
|
844
|
+
class fn {
|
|
845
845
|
constructor(t, e) {
|
|
846
|
-
m(this, "baiduLayerCached", new
|
|
846
|
+
m(this, "baiduLayerCached", new Pe(() => {
|
|
847
847
|
const t = new BMap.TileLayer({});
|
|
848
848
|
return t.getTilesUrl = (e, r) => {
|
|
849
849
|
const s = Math.pow(2, r - 1), n = e.x + s, a = s - 1 - e.y;
|
|
850
850
|
return this.options.getTileUrl({ x: n, y: a }, r);
|
|
851
851
|
}, t;
|
|
852
852
|
}));
|
|
853
|
-
m(this, "baiduMapTypeCached", new
|
|
853
|
+
m(this, "baiduMapTypeCached", new Pe(() => {
|
|
854
854
|
const t = new BMap.MapType(this.options.name, this.baiduLayerCached.get(), {
|
|
855
855
|
maxZoom: this.options.maxZoom,
|
|
856
856
|
minZoom: this.options.minZoom,
|
|
@@ -858,7 +858,7 @@ class mn {
|
|
|
858
858
|
});
|
|
859
859
|
return t.__baidu_map_type__ = this, t;
|
|
860
860
|
}));
|
|
861
|
-
m(this, "googleCached", new
|
|
861
|
+
m(this, "googleCached", new Pe(() => {
|
|
862
862
|
const t = new google.maps.ImageMapType({
|
|
863
863
|
getTileUrl: (e, r) => this.options.getTileUrl(e, r),
|
|
864
864
|
tileSize: new google.maps.Size(256, 256),
|
|
@@ -890,13 +890,13 @@ class mn {
|
|
|
890
890
|
return this.googleCached.get();
|
|
891
891
|
}
|
|
892
892
|
asGoogleLayer() {
|
|
893
|
-
|
|
893
|
+
Lt("这个方法不会被调用");
|
|
894
894
|
}
|
|
895
895
|
}
|
|
896
|
-
class
|
|
896
|
+
class yi {
|
|
897
897
|
constructor() {
|
|
898
|
-
m(this, "baiduCache", new
|
|
899
|
-
m(this, "googleCache", new
|
|
898
|
+
m(this, "baiduCache", new Pe(() => new BMap.TrafficLayer()));
|
|
899
|
+
m(this, "googleCache", new Pe(() => new google.maps.TrafficLayer()));
|
|
900
900
|
}
|
|
901
901
|
asBaiduLayer() {
|
|
902
902
|
return this.baiduCache.get();
|
|
@@ -913,13 +913,13 @@ var F;
|
|
|
913
913
|
), () => (
|
|
914
914
|
/* 地形 */
|
|
915
915
|
google.maps.MapTypeId.TERRAIN
|
|
916
|
-
), R.wgs84), i.BUILD_IN_MAP_TYPES = new
|
|
916
|
+
), R.wgs84), i.BUILD_IN_MAP_TYPES = new mi([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
|
|
917
917
|
})(F || (F = {}));
|
|
918
|
-
var
|
|
919
|
-
const
|
|
920
|
-
class
|
|
918
|
+
var Er = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(Er || {});
|
|
919
|
+
const Lr = [F.NORMAL, F.SATELLITE, F.HYBRID];
|
|
920
|
+
class kt extends St {
|
|
921
921
|
static create(t) {
|
|
922
|
-
const e = t.mapTypes ??
|
|
922
|
+
const e = t.mapTypes ?? Lr, r = {
|
|
923
923
|
default: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
|
|
924
924
|
horizontal: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
|
|
925
925
|
dropdown: BMAP_MAPTYPE_CONTROL_DROPDOWN
|
|
@@ -927,11 +927,11 @@ class St extends It {
|
|
|
927
927
|
type: t.type && r[t.type],
|
|
928
928
|
mapTypes: e.map((n) => n.asBaiduMapType())
|
|
929
929
|
});
|
|
930
|
-
return t.position && s.setAnchor(q.getBaidu().toValue(t.position)), new
|
|
930
|
+
return t.position && s.setAnchor(q.getBaidu().toValue(t.position)), new kt(s, t.position);
|
|
931
931
|
}
|
|
932
932
|
}
|
|
933
933
|
const ge = class ge extends ht {
|
|
934
|
-
constructor(t = "default", e = D.TOP_LEFT, r =
|
|
934
|
+
constructor(t = "default", e = D.TOP_LEFT, r = Lr) {
|
|
935
935
|
super("mapType", e), this.type = t, this.mapTypes = r, ge.type2google || (ge.type2google = {
|
|
936
936
|
default: google.maps.MapTypeControlStyle.DEFAULT,
|
|
937
937
|
horizontal: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
|
|
@@ -952,73 +952,73 @@ const ge = class ge extends ht {
|
|
|
952
952
|
}
|
|
953
953
|
};
|
|
954
954
|
m(ge, "type2google");
|
|
955
|
-
let
|
|
956
|
-
class
|
|
955
|
+
let Tt = ge;
|
|
956
|
+
class At extends St {
|
|
957
957
|
static create(t) {
|
|
958
958
|
const e = new BMap.ScaleControl({
|
|
959
959
|
anchor: t.position && q.getBaidu().toValue(t.position)
|
|
960
960
|
});
|
|
961
|
-
return new
|
|
961
|
+
return new At(e, t.position);
|
|
962
962
|
}
|
|
963
963
|
}
|
|
964
|
-
class
|
|
964
|
+
class Dt extends ht {
|
|
965
965
|
static create(t) {
|
|
966
|
-
return new
|
|
966
|
+
return new Dt(t.position);
|
|
967
967
|
}
|
|
968
968
|
constructor(t = D.BOTTOM_RIGHT) {
|
|
969
969
|
super("scale", t);
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
|
-
class
|
|
972
|
+
class Rt extends vi {
|
|
973
973
|
static create(t) {
|
|
974
|
-
return new
|
|
974
|
+
return new Rt(!0, t.position ?? D.RIGHT_BOTTOM);
|
|
975
975
|
}
|
|
976
976
|
}
|
|
977
|
-
class
|
|
977
|
+
class $t extends ht {
|
|
978
978
|
static create(t) {
|
|
979
|
-
return new
|
|
979
|
+
return new $t(t.position);
|
|
980
980
|
}
|
|
981
981
|
constructor(t = D.RIGHT_BOTTOM) {
|
|
982
982
|
super("streetView", t);
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
|
-
class
|
|
985
|
+
class zt extends St {
|
|
986
986
|
static create(t) {
|
|
987
987
|
const e = new BMap.NavigationControl({
|
|
988
988
|
type: BMAP_NAVIGATION_CONTROL_ZOOM,
|
|
989
989
|
// enableGeolocation: true,
|
|
990
990
|
anchor: t.position && q.getBaidu().toValue(t.position)
|
|
991
991
|
});
|
|
992
|
-
return new
|
|
992
|
+
return new zt(e, t.position);
|
|
993
993
|
}
|
|
994
994
|
}
|
|
995
|
-
class
|
|
995
|
+
class Nt extends ht {
|
|
996
996
|
static create(t) {
|
|
997
|
-
return new
|
|
997
|
+
return new Nt(t.position);
|
|
998
998
|
}
|
|
999
999
|
constructor(t = D.RIGHT_BOTTOM) {
|
|
1000
1000
|
super("zoom", t);
|
|
1001
1001
|
}
|
|
1002
1002
|
}
|
|
1003
|
-
function
|
|
1003
|
+
function _i(i) {
|
|
1004
1004
|
let t, e, r;
|
|
1005
|
-
const s = "The Google Maps JavaScript API", n = "google", a = "importLibrary", u = "__ib__", o = document, h = window, c = h[n] || (h[n] = {}), p = c.maps || (c.maps = {}), g = /* @__PURE__ */ new Set(), f = new URLSearchParams(),
|
|
1005
|
+
const s = "The Google Maps JavaScript API", n = "google", a = "importLibrary", u = "__ib__", o = document, h = window, c = h[n] || (h[n] = {}), p = c.maps || (c.maps = {}), g = /* @__PURE__ */ new Set(), f = new URLSearchParams(), M = () => t || (t = new Promise(async (_, T) => {
|
|
1006
1006
|
var l;
|
|
1007
1007
|
await (e = o.createElement("script")), f.set("libraries", [...g] + "");
|
|
1008
1008
|
for (r in i)
|
|
1009
1009
|
f.set(r.replace(/[A-Z]/g, (d) => "_" + d[0].toLowerCase()), i[r]);
|
|
1010
|
-
f.set("callback", n + ".maps." + u), e.src = `https://maps.${n}apis.com/maps/api/js?` + f, p[u] = _, e.onerror = () => t =
|
|
1010
|
+
f.set("callback", n + ".maps." + u), e.src = `https://maps.${n}apis.com/maps/api/js?` + f, p[u] = _, e.onerror = () => t = T(Error(s + " could not load.")), e.nonce = ((l = o.querySelector("script[nonce]")) == null ? void 0 : l.nonce) || "", o.head.append(e);
|
|
1011
1011
|
}));
|
|
1012
|
-
p[a] ? console.warn(s + " only loads once. Ignoring:", i) : p[a] = (_, ...
|
|
1012
|
+
p[a] ? console.warn(s + " only loads once. Ignoring:", i) : p[a] = (_, ...T) => g.add(_) && M().then(() => p[a](_, ...T));
|
|
1013
1013
|
}
|
|
1014
|
-
let
|
|
1014
|
+
let bi, Mi;
|
|
1015
1015
|
const he = {
|
|
1016
1016
|
/** Google的坐标0点 */
|
|
1017
1017
|
get LATLNG_ZERO() {
|
|
1018
|
-
return
|
|
1018
|
+
return bi ?? (bi = new google.maps.LatLng({ lat: 0, lng: 0 }));
|
|
1019
1019
|
},
|
|
1020
1020
|
get BOUNDS_ZERO() {
|
|
1021
|
-
return
|
|
1021
|
+
return Mi ?? (Mi = new google.maps.LatLngBounds(this.LATLNG_ZERO, this.LATLNG_ZERO));
|
|
1022
1022
|
}
|
|
1023
1023
|
};
|
|
1024
1024
|
function Pr(i, t = { country: "", province: "", city: "", district: "", street: "", streetNumber: "" }) {
|
|
@@ -1046,7 +1046,7 @@ function Pr(i, t = { country: "", province: "", city: "", district: "", street:
|
|
|
1046
1046
|
}
|
|
1047
1047
|
return t;
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1049
|
+
function Br(i, t) {
|
|
1050
1050
|
var r;
|
|
1051
1051
|
const e = i.address_components && Pr(i.address_components);
|
|
1052
1052
|
return {
|
|
@@ -1055,13 +1055,13 @@ function Lr(i, t) {
|
|
|
1055
1055
|
city: (e == null ? void 0 : e.city) ?? "",
|
|
1056
1056
|
id: i.place_id ?? "",
|
|
1057
1057
|
address: i.formatted_address ?? "",
|
|
1058
|
-
position:
|
|
1058
|
+
position: O.fromGoogle(((r = i.geometry) == null ? void 0 : r.location) ?? he.LATLNG_ZERO, t.coordType),
|
|
1059
1059
|
title: i.name ?? ""
|
|
1060
1060
|
};
|
|
1061
1061
|
}
|
|
1062
|
-
class
|
|
1062
|
+
class Ir {
|
|
1063
1063
|
}
|
|
1064
|
-
class Ti extends
|
|
1064
|
+
class Ti extends Ir {
|
|
1065
1065
|
constructor(e, r) {
|
|
1066
1066
|
super();
|
|
1067
1067
|
m(this, "inner");
|
|
@@ -1077,7 +1077,7 @@ class Ti extends Br {
|
|
|
1077
1077
|
this.inner.setBounds(e.toGoogle(this.map.coordType));
|
|
1078
1078
|
}
|
|
1079
1079
|
addResultListener(e) {
|
|
1080
|
-
return
|
|
1080
|
+
return Or(this.inner, "place_changed", () => {
|
|
1081
1081
|
const r = this.inner.getPlace(), s = {
|
|
1082
1082
|
title: r.name ?? "",
|
|
1083
1083
|
province: "",
|
|
@@ -1091,7 +1091,7 @@ class Ti extends Br {
|
|
|
1091
1091
|
});
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
|
-
class
|
|
1094
|
+
class Oi extends Ir {
|
|
1095
1095
|
constructor(e, r) {
|
|
1096
1096
|
super();
|
|
1097
1097
|
m(this, "inner");
|
|
@@ -1105,7 +1105,7 @@ class Mi extends Br {
|
|
|
1105
1105
|
const s = () => {
|
|
1106
1106
|
this.inner.setLocation(this.map.innerMap);
|
|
1107
1107
|
};
|
|
1108
|
-
this.removeableArray.push(
|
|
1108
|
+
this.removeableArray.push(hr(this.map, "center-changed", s)), this.removeableArray.push(hr(this.map, "zoom-changed", s));
|
|
1109
1109
|
}
|
|
1110
1110
|
}
|
|
1111
1111
|
setBounds(e) {
|
|
@@ -1113,14 +1113,14 @@ class Mi extends Br {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
addResultListener(e) {
|
|
1115
1115
|
let r = 0;
|
|
1116
|
-
const s =
|
|
1116
|
+
const s = pi(this.inner, "confirm", (a) => {
|
|
1117
1117
|
const u = a.item.value;
|
|
1118
1118
|
r = Date.now(), e(Object.assign({
|
|
1119
1119
|
title: u.business,
|
|
1120
1120
|
country: ""
|
|
1121
1121
|
// Baidu的自动完成只支持中国
|
|
1122
1122
|
}, u));
|
|
1123
|
-
}), n =
|
|
1123
|
+
}), n = gi(this.input, "keyup", (a) => {
|
|
1124
1124
|
a.key === "Enter" && Date.now() - r > 100 && e({
|
|
1125
1125
|
title: this.input.value,
|
|
1126
1126
|
country: "",
|
|
@@ -1136,7 +1136,7 @@ class Mi extends Br {
|
|
|
1136
1136
|
};
|
|
1137
1137
|
}
|
|
1138
1138
|
}
|
|
1139
|
-
var
|
|
1139
|
+
var Sr = { exports: {} };
|
|
1140
1140
|
(function(i, t) {
|
|
1141
1141
|
(function(e, r) {
|
|
1142
1142
|
i.exports = r();
|
|
@@ -1154,31 +1154,31 @@ var Ir = { exports: {} };
|
|
|
1154
1154
|
defaultValueField: "value",
|
|
1155
1155
|
plugins: {}
|
|
1156
1156
|
}, a = function() {
|
|
1157
|
-
var f = function(
|
|
1158
|
-
this._coordinator = {}, this._data = [], this._radi = [], this._min = 0, this._max = 1, this._xField =
|
|
1159
|
-
},
|
|
1157
|
+
var f = function(T) {
|
|
1158
|
+
this._coordinator = {}, this._data = [], this._radi = [], this._min = 0, this._max = 1, this._xField = T.xField || T.defaultXField, this._yField = T.yField || T.defaultYField, this._valueField = T.valueField || T.defaultValueField, T.radius && (this._cfgRadius = T.radius);
|
|
1159
|
+
}, M = n.defaultRadius;
|
|
1160
1160
|
return f.prototype = {
|
|
1161
1161
|
// when forceRender = false -> called from setData, omits renderall event
|
|
1162
|
-
_organiseData: function(_,
|
|
1163
|
-
var l = _[this._xField], d = _[this._yField], v = this._radi, y = this._data,
|
|
1164
|
-
return y[l] || (y[l] = [], v[l] = []), y[l][d] ? y[l][d] += E : (y[l][d] = E, v[l][d] = k), y[l][d] >
|
|
1162
|
+
_organiseData: function(_, T) {
|
|
1163
|
+
var l = _[this._xField], d = _[this._yField], v = this._radi, y = this._data, C = this._max, w = this._min, E = _[this._valueField] || 1, k = _.radius || this._cfgRadius || M;
|
|
1164
|
+
return y[l] || (y[l] = [], v[l] = []), y[l][d] ? y[l][d] += E : (y[l][d] = E, v[l][d] = k), y[l][d] > C ? (T ? this.setDataMax(y[l][d]) : this._max = y[l][d], !1) : {
|
|
1165
1165
|
x: l,
|
|
1166
1166
|
y: d,
|
|
1167
1167
|
value: E,
|
|
1168
1168
|
radius: k,
|
|
1169
1169
|
min: w,
|
|
1170
|
-
max:
|
|
1170
|
+
max: C
|
|
1171
1171
|
};
|
|
1172
1172
|
},
|
|
1173
1173
|
_unOrganizeData: function() {
|
|
1174
|
-
var _ = [],
|
|
1175
|
-
for (var d in
|
|
1176
|
-
for (var v in
|
|
1174
|
+
var _ = [], T = this._data, l = this._radi;
|
|
1175
|
+
for (var d in T)
|
|
1176
|
+
for (var v in T[d])
|
|
1177
1177
|
_.push({
|
|
1178
1178
|
x: d,
|
|
1179
1179
|
y: v,
|
|
1180
1180
|
radius: l[d][v],
|
|
1181
|
-
value:
|
|
1181
|
+
value: T[d][v]
|
|
1182
1182
|
});
|
|
1183
1183
|
return {
|
|
1184
1184
|
min: this._min,
|
|
@@ -1194,8 +1194,8 @@ var Ir = { exports: {} };
|
|
|
1194
1194
|
},
|
|
1195
1195
|
addData: function() {
|
|
1196
1196
|
if (arguments[0].length > 0)
|
|
1197
|
-
for (var _ = arguments[0],
|
|
1198
|
-
this.addData.call(this, _[
|
|
1197
|
+
for (var _ = arguments[0], T = _.length; T--; )
|
|
1198
|
+
this.addData.call(this, _[T]);
|
|
1199
1199
|
else {
|
|
1200
1200
|
var l = this._organiseData(arguments[0], !0);
|
|
1201
1201
|
l && this._coordinator.emit("renderpartial", {
|
|
@@ -1207,10 +1207,10 @@ var Ir = { exports: {} };
|
|
|
1207
1207
|
return this;
|
|
1208
1208
|
},
|
|
1209
1209
|
setData: function(_) {
|
|
1210
|
-
var
|
|
1210
|
+
var T = _.data, l = T.length;
|
|
1211
1211
|
this._data = [], this._radi = [];
|
|
1212
1212
|
for (var d = 0; d < l; d++)
|
|
1213
|
-
this._organiseData(
|
|
1213
|
+
this._organiseData(T[d], !1);
|
|
1214
1214
|
return this._max = _.max, this._min = _.min || 0, this._onExtremaChange(), this._coordinator.emit("renderall", this._getInternalData()), this;
|
|
1215
1215
|
},
|
|
1216
1216
|
removeData: function() {
|
|
@@ -1278,25 +1278,25 @@ var Ir = { exports: {} };
|
|
|
1278
1278
|
var f = function(l) {
|
|
1279
1279
|
var d = l.gradient || l.defaultGradient, v = document.createElement("canvas"), y = v.getContext("2d");
|
|
1280
1280
|
v.width = 256, v.height = 1;
|
|
1281
|
-
var
|
|
1281
|
+
var C = y.createLinearGradient(0, 0, 256, 1);
|
|
1282
1282
|
for (var w in d)
|
|
1283
|
-
|
|
1284
|
-
return y.fillStyle =
|
|
1285
|
-
},
|
|
1286
|
-
var v = document.createElement("canvas"), y = v.getContext("2d"),
|
|
1283
|
+
C.addColorStop(w, d[w]);
|
|
1284
|
+
return y.fillStyle = C, y.fillRect(0, 0, 256, 1), y.getImageData(0, 0, 256, 1).data;
|
|
1285
|
+
}, M = function(l, d) {
|
|
1286
|
+
var v = document.createElement("canvas"), y = v.getContext("2d"), C = l, w = l;
|
|
1287
1287
|
if (v.width = v.height = l * 2, d == 1)
|
|
1288
|
-
y.beginPath(), y.arc(
|
|
1288
|
+
y.beginPath(), y.arc(C, w, l, 0, 2 * Math.PI, !1), y.fillStyle = "rgba(0,0,0,1)", y.fill();
|
|
1289
1289
|
else {
|
|
1290
|
-
var E = y.createRadialGradient(
|
|
1290
|
+
var E = y.createRadialGradient(C, w, l * d, C, w, l);
|
|
1291
1291
|
E.addColorStop(0, "rgba(0,0,0,1)"), E.addColorStop(1, "rgba(0,0,0,0)"), y.fillStyle = E, y.fillRect(0, 0, 2 * l, 2 * l);
|
|
1292
1292
|
}
|
|
1293
1293
|
return v;
|
|
1294
1294
|
}, _ = function(w) {
|
|
1295
|
-
for (var d = [], v = w.min, y = w.max,
|
|
1296
|
-
for (var
|
|
1297
|
-
var S = B[ee], W = w[
|
|
1295
|
+
for (var d = [], v = w.min, y = w.max, C = w.radi, w = w.data, E = Object.keys(w), k = E.length; k--; )
|
|
1296
|
+
for (var G = E[k], B = Object.keys(w[G]), ee = B.length; ee--; ) {
|
|
1297
|
+
var S = B[ee], W = w[G][S], te = C[G][S];
|
|
1298
1298
|
d.push({
|
|
1299
|
-
x:
|
|
1299
|
+
x: G,
|
|
1300
1300
|
y: S,
|
|
1301
1301
|
value: W,
|
|
1302
1302
|
radius: te
|
|
@@ -1308,13 +1308,13 @@ var Ir = { exports: {} };
|
|
|
1308
1308
|
data: d
|
|
1309
1309
|
};
|
|
1310
1310
|
};
|
|
1311
|
-
function
|
|
1311
|
+
function T(l) {
|
|
1312
1312
|
var d = l.element, v = this.shadowCanvas = document.createElement("canvas"), y = this.canvas = l.canvas || document.createElement("canvas");
|
|
1313
1313
|
this._renderBoundaries = [1e4, 1e4, 0, 0];
|
|
1314
|
-
var
|
|
1315
|
-
y.className = "heatmap-canvas", this._width = y.width = v.width = +
|
|
1314
|
+
var C = getComputedStyle(l.element) || {};
|
|
1315
|
+
y.className = "heatmap-canvas", this._width = y.width = v.width = +C.width.replace(/px/, ""), this._height = y.height = v.height = +C.height.replace(/px/, ""), this.shadowCtx = v.getContext("2d"), this.ctx = y.getContext("2d"), y.style.cssText = v.style.cssText = "position:absolute;left:0;top:0;", d.style.position = "relative", d.appendChild(y), this._palette = f(l), this._templates = {}, this._setStyles(l);
|
|
1316
1316
|
}
|
|
1317
|
-
return
|
|
1317
|
+
return T.prototype = {
|
|
1318
1318
|
renderPartial: function(l) {
|
|
1319
1319
|
this._drawAlpha(l), this._colorize();
|
|
1320
1320
|
},
|
|
@@ -1337,40 +1337,40 @@ var Ir = { exports: {} };
|
|
|
1337
1337
|
this._blur = l.blur == 0 ? 0 : l.blur || l.defaultBlur, l.backgroundColor && (this.canvas.style.backgroundColor = l.backgroundColor), this._opacity = (l.opacity || 0) * 255, this._maxOpacity = (l.maxOpacity || l.defaultMaxOpacity) * 255, this._minOpacity = (l.minOpacity || l.defaultMinOpacity) * 255, this._useGradientOpacity = !!l.useGradientOpacity;
|
|
1338
1338
|
},
|
|
1339
1339
|
_drawAlpha: function(y) {
|
|
1340
|
-
for (var d = this._min = y.min, v = this._max = y.max, y = y.data || [],
|
|
1341
|
-
var E = y[
|
|
1342
|
-
this._templates[B] ? V = this._templates[B] : this._templates[B] = V =
|
|
1340
|
+
for (var d = this._min = y.min, v = this._max = y.max, y = y.data || [], C = y.length, w = 1 - this._blur; C--; ) {
|
|
1341
|
+
var E = y[C], k = E.x, G = E.y, B = E.radius, ee = Math.min(E.value, v), S = k - B, W = G - B, te = this.shadowCtx, V;
|
|
1342
|
+
this._templates[B] ? V = this._templates[B] : this._templates[B] = V = M(B, w), te.globalAlpha = (ee - d) / (v - d), te.drawImage(V, S, W), S < this._renderBoundaries[0] && (this._renderBoundaries[0] = S), W < this._renderBoundaries[1] && (this._renderBoundaries[1] = W), S + 2 * B > this._renderBoundaries[2] && (this._renderBoundaries[2] = S + 2 * B), W + 2 * B > this._renderBoundaries[3] && (this._renderBoundaries[3] = W + 2 * B);
|
|
1343
1343
|
}
|
|
1344
1344
|
},
|
|
1345
1345
|
_colorize: function() {
|
|
1346
|
-
var l = this._renderBoundaries[0], d = this._renderBoundaries[1], v = this._renderBoundaries[2] - l, y = this._renderBoundaries[3] - d,
|
|
1347
|
-
l < 0 && (l = 0), d < 0 && (d = 0), l + v >
|
|
1346
|
+
var l = this._renderBoundaries[0], d = this._renderBoundaries[1], v = this._renderBoundaries[2] - l, y = this._renderBoundaries[3] - d, C = this._width, w = this._height, E = this._opacity, k = this._maxOpacity, G = this._minOpacity, B = this._useGradientOpacity;
|
|
1347
|
+
l < 0 && (l = 0), d < 0 && (d = 0), l + v > C && (v = C - l), d + y > w && (y = w - d);
|
|
1348
1348
|
for (var ee = this.shadowCtx.getImageData(l, d, v, y), S = ee.data, W = S.length, te = this._palette, V = 3; V < W; V += 4) {
|
|
1349
|
-
var je = S[V],
|
|
1350
|
-
if (
|
|
1349
|
+
var je = S[V], Ce = je * 4;
|
|
1350
|
+
if (Ce) {
|
|
1351
1351
|
var we;
|
|
1352
|
-
E > 0 ? we = E : je < k ? je <
|
|
1352
|
+
E > 0 ? we = E : je < k ? je < G ? we = G : we = je : we = k, S[V - 3] = te[Ce], S[V - 2] = te[Ce + 1], S[V - 1] = te[Ce + 2], S[V] = B ? te[Ce + 3] : we;
|
|
1353
1353
|
}
|
|
1354
1354
|
}
|
|
1355
1355
|
this.ctx.putImageData(ee, l, d), this._renderBoundaries = [1e3, 1e3, 0, 0];
|
|
1356
1356
|
},
|
|
1357
1357
|
getValueAt: function(l) {
|
|
1358
|
-
var d, v = this.shadowCtx, y = v.getImageData(l.x, l.y, 1, 1),
|
|
1359
|
-
return d = Math.abs(w - E) * (
|
|
1358
|
+
var d, v = this.shadowCtx, y = v.getImageData(l.x, l.y, 1, 1), C = y.data[3], w = this._max, E = this._min;
|
|
1359
|
+
return d = Math.abs(w - E) * (C / 255) >> 0, d;
|
|
1360
1360
|
},
|
|
1361
1361
|
getDataURL: function() {
|
|
1362
1362
|
return this.canvas.toDataURL();
|
|
1363
1363
|
}
|
|
1364
|
-
},
|
|
1364
|
+
}, T;
|
|
1365
1365
|
}(), o = function() {
|
|
1366
1366
|
var f = !1;
|
|
1367
1367
|
return n.defaultRenderer === "canvas2d" && (f = u), f;
|
|
1368
1368
|
}(), h = {
|
|
1369
1369
|
merge: function() {
|
|
1370
|
-
for (var g = {}, f = arguments.length,
|
|
1371
|
-
var _ = arguments[
|
|
1372
|
-
for (var
|
|
1373
|
-
g[
|
|
1370
|
+
for (var g = {}, f = arguments.length, M = 0; M < f; M++) {
|
|
1371
|
+
var _ = arguments[M];
|
|
1372
|
+
for (var T in _)
|
|
1373
|
+
g[T] = _[T];
|
|
1374
1374
|
}
|
|
1375
1375
|
return g;
|
|
1376
1376
|
}
|
|
@@ -1381,42 +1381,42 @@ var Ir = { exports: {} };
|
|
|
1381
1381
|
}
|
|
1382
1382
|
return l.prototype = {
|
|
1383
1383
|
on: function(d, v, y) {
|
|
1384
|
-
var
|
|
1385
|
-
|
|
1384
|
+
var C = this.cStore;
|
|
1385
|
+
C[d] || (C[d] = []), C[d].push(function(w) {
|
|
1386
1386
|
return v.call(y, w);
|
|
1387
1387
|
});
|
|
1388
1388
|
},
|
|
1389
1389
|
emit: function(d, v) {
|
|
1390
1390
|
var y = this.cStore;
|
|
1391
1391
|
if (y[d])
|
|
1392
|
-
for (var
|
|
1392
|
+
for (var C = y[d].length, w = 0; w < C; w++) {
|
|
1393
1393
|
var E = y[d][w];
|
|
1394
1394
|
E(v);
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
1397
|
}, l;
|
|
1398
|
-
}(),
|
|
1399
|
-
var l =
|
|
1398
|
+
}(), M = function(T) {
|
|
1399
|
+
var l = T._renderer, d = T._coordinator, v = T._store;
|
|
1400
1400
|
d.on("renderpartial", l.renderPartial, l), d.on("renderall", l.renderAll, l), d.on("extremachange", function(y) {
|
|
1401
|
-
|
|
1401
|
+
T._config.onExtremaChange && T._config.onExtremaChange({
|
|
1402
1402
|
min: y.min,
|
|
1403
1403
|
max: y.max,
|
|
1404
|
-
gradient:
|
|
1404
|
+
gradient: T._config.gradient || T._config.defaultGradient
|
|
1405
1405
|
});
|
|
1406
1406
|
}), v.setCoordinator(d);
|
|
1407
1407
|
};
|
|
1408
1408
|
function _() {
|
|
1409
|
-
var
|
|
1410
|
-
if (this._coordinator = new f(),
|
|
1411
|
-
var l =
|
|
1409
|
+
var T = this._config = h.merge(n, arguments[0] || {});
|
|
1410
|
+
if (this._coordinator = new f(), T.plugin) {
|
|
1411
|
+
var l = T.plugin;
|
|
1412
1412
|
if (n.plugins[l]) {
|
|
1413
1413
|
var d = n.plugins[l];
|
|
1414
|
-
this._renderer = new d.renderer(
|
|
1414
|
+
this._renderer = new d.renderer(T), this._store = new d.store(T);
|
|
1415
1415
|
} else
|
|
1416
1416
|
throw new Error("Plugin '" + l + "' not found. Maybe it was not registered.");
|
|
1417
1417
|
} else
|
|
1418
|
-
this._renderer = new o(
|
|
1419
|
-
|
|
1418
|
+
this._renderer = new o(T), this._store = new a(T);
|
|
1419
|
+
M(this);
|
|
1420
1420
|
}
|
|
1421
1421
|
return _.prototype = {
|
|
1422
1422
|
addData: function() {
|
|
@@ -1434,9 +1434,9 @@ var Ir = { exports: {} };
|
|
|
1434
1434
|
setDataMin: function() {
|
|
1435
1435
|
return this._store.setDataMin.apply(this._store, arguments), this;
|
|
1436
1436
|
},
|
|
1437
|
-
configure: function(
|
|
1437
|
+
configure: function(T) {
|
|
1438
1438
|
const l = this._config;
|
|
1439
|
-
return this._config = h.merge(this._config,
|
|
1439
|
+
return this._config = h.merge(this._config, T), this._renderer.updateConfig(this._config, l), this._coordinator.emit("renderall", this._store._getInternalData()), this;
|
|
1440
1440
|
},
|
|
1441
1441
|
repaint: function() {
|
|
1442
1442
|
return this._coordinator.emit("renderall", this._store._getInternalData()), this;
|
|
@@ -1447,8 +1447,8 @@ var Ir = { exports: {} };
|
|
|
1447
1447
|
getDataURL: function() {
|
|
1448
1448
|
return this._renderer.getDataURL();
|
|
1449
1449
|
},
|
|
1450
|
-
getValueAt: function(
|
|
1451
|
-
return this._store.getValueAt ? this._store.getValueAt(
|
|
1450
|
+
getValueAt: function(T) {
|
|
1451
|
+
return this._store.getValueAt ? this._store.getValueAt(T) : this._renderer.getValueAt ? this._renderer.getValueAt(T) : null;
|
|
1452
1452
|
}
|
|
1453
1453
|
}, _;
|
|
1454
1454
|
}(), p = {
|
|
@@ -1491,10 +1491,10 @@ var Ir = { exports: {} };
|
|
|
1491
1491
|
for (; g--; ) {
|
|
1492
1492
|
var f = this.latlngs[g].latlng;
|
|
1493
1493
|
if (n.containsPoint(f)) {
|
|
1494
|
-
var
|
|
1494
|
+
var M = this._map.pointToOverlayPixel(f), h = this._map.pointToOverlayPixel(n.getSouthWest()).x, o = this._map.pointToOverlayPixel(n.getNorthEast()).y, _ = new BMap.Pixel(M.x - h, M.y - o), T = this.pixelTransform(_);
|
|
1495
1495
|
l.data.push({
|
|
1496
|
-
x:
|
|
1497
|
-
y:
|
|
1496
|
+
x: T.x,
|
|
1497
|
+
y: T.y,
|
|
1498
1498
|
count: this.latlngs[g].c
|
|
1499
1499
|
});
|
|
1500
1500
|
}
|
|
@@ -1525,7 +1525,7 @@ var Ir = { exports: {} };
|
|
|
1525
1525
|
latlng: c,
|
|
1526
1526
|
c: o[h].count
|
|
1527
1527
|
}), !!a.containsPoint(c)) {
|
|
1528
|
-
var p = this._map.pointToOverlayPixel(c), g = this._map.pointToOverlayPixel(a.getSouthWest()).x, f = this._map.pointToOverlayPixel(a.getNorthEast()).y,
|
|
1528
|
+
var p = this._map.pointToOverlayPixel(c), g = this._map.pointToOverlayPixel(a.getSouthWest()).x, f = this._map.pointToOverlayPixel(a.getNorthEast()).y, M = new BMap.Pixel(p.x - g, p.y - f), _ = this.pixelTransform(M);
|
|
1529
1529
|
u.data.push({
|
|
1530
1530
|
x: _.x,
|
|
1531
1531
|
y: _.y,
|
|
@@ -1563,12 +1563,12 @@ var Ir = { exports: {} };
|
|
|
1563
1563
|
}
|
|
1564
1564
|
return r;
|
|
1565
1565
|
});
|
|
1566
|
-
})(
|
|
1567
|
-
var Ci =
|
|
1568
|
-
const
|
|
1566
|
+
})(Sr);
|
|
1567
|
+
var Ci = Sr.exports;
|
|
1568
|
+
const wi = /* @__PURE__ */ at(Ci), dr = 10, Xe = {
|
|
1569
1569
|
toGoogle: (i, t) => ({
|
|
1570
1570
|
opacity: i.opacity,
|
|
1571
|
-
radius: i.radius ??
|
|
1571
|
+
radius: i.radius ?? dr,
|
|
1572
1572
|
// key是小数和整数的混合, 故读取出来时不会维持
|
|
1573
1573
|
gradient: i.gradient && Object.entries(i.gradient).sort(([e], [r]) => +e - +r).map(([e, r]) => r),
|
|
1574
1574
|
maxIntensity: i.maxIntensity,
|
|
@@ -1576,7 +1576,7 @@ const Oi = /* @__PURE__ */ at(Ci), cr = 10, Xe = {
|
|
|
1576
1576
|
}),
|
|
1577
1577
|
toBaidu: (i, t, e) => ({
|
|
1578
1578
|
opacity: i.opacity,
|
|
1579
|
-
radius: i.radius ??
|
|
1579
|
+
radius: i.radius ?? dr,
|
|
1580
1580
|
gradient: i.gradient,
|
|
1581
1581
|
data: Je.toBaidu(i.data, t, e)
|
|
1582
1582
|
})
|
|
@@ -1592,9 +1592,9 @@ const Oi = /* @__PURE__ */ at(Ci), cr = 10, Xe = {
|
|
|
1592
1592
|
}), max: e ?? r };
|
|
1593
1593
|
}
|
|
1594
1594
|
};
|
|
1595
|
-
class
|
|
1595
|
+
class kr {
|
|
1596
1596
|
}
|
|
1597
|
-
class
|
|
1597
|
+
class xi extends kr {
|
|
1598
1598
|
constructor(e, r) {
|
|
1599
1599
|
super();
|
|
1600
1600
|
m(this, "inner");
|
|
@@ -1610,13 +1610,13 @@ class wi extends Sr {
|
|
|
1610
1610
|
this.inner.setMap(null);
|
|
1611
1611
|
}
|
|
1612
1612
|
}
|
|
1613
|
-
class
|
|
1613
|
+
class Ei extends kr {
|
|
1614
1614
|
constructor(e, r) {
|
|
1615
1615
|
super();
|
|
1616
1616
|
m(this, "inner");
|
|
1617
1617
|
this.map = e;
|
|
1618
1618
|
const s = Xe.toBaidu(r, this.map.coordType, r.maxIntensity);
|
|
1619
|
-
this.inner = new
|
|
1619
|
+
this.inner = new wi(s), e.innerMap.addOverlay(this.inner), this.inner.setDataSet(s.data);
|
|
1620
1620
|
}
|
|
1621
1621
|
/**
|
|
1622
1622
|
* 当前的最大值
|
|
@@ -1641,20 +1641,20 @@ class xi extends Sr {
|
|
|
1641
1641
|
this.map.innerMap.removeOverlay(this.inner);
|
|
1642
1642
|
}
|
|
1643
1643
|
}
|
|
1644
|
-
class
|
|
1644
|
+
class Ar {
|
|
1645
1645
|
constructor(t) {
|
|
1646
1646
|
this.options = t;
|
|
1647
1647
|
}
|
|
1648
1648
|
}
|
|
1649
1649
|
function Be(i, t, e) {
|
|
1650
|
-
const r = new URL(t, i), s = new URLSearchParams(Object.entries(e).filter(
|
|
1650
|
+
const r = new URL(t, i), s = new URLSearchParams(Object.entries(e).filter(ds));
|
|
1651
1651
|
return r.search = "?" + s.toString(), r;
|
|
1652
1652
|
}
|
|
1653
1653
|
function mt() {
|
|
1654
|
-
const i = window.location.hostname.split(".").filter((t) => !
|
|
1654
|
+
const i = window.location.hostname.split(".").filter((t) => !Me.isInt(t));
|
|
1655
1655
|
return i.length === 3 ? i.join(".") : [...i, "tg", "map", "urls"].slice(0, 3).join(".");
|
|
1656
1656
|
}
|
|
1657
|
-
const ke = class ke extends
|
|
1657
|
+
const ke = class ke extends Ar {
|
|
1658
1658
|
/** @see https://developers.google.com/maps/documentation/urls/get-started#directions-action */
|
|
1659
1659
|
directions(t, e, r) {
|
|
1660
1660
|
return Be(ke.BASE_URL, "dir/", {
|
|
@@ -1677,8 +1677,8 @@ const ke = class ke extends kr {
|
|
|
1677
1677
|
}
|
|
1678
1678
|
};
|
|
1679
1679
|
m(ke, "BASE_URL", "https://www.google.com/maps/");
|
|
1680
|
-
let
|
|
1681
|
-
const fe = class fe extends
|
|
1680
|
+
let Ot = ke;
|
|
1681
|
+
const fe = class fe extends Ar {
|
|
1682
1682
|
/**
|
|
1683
1683
|
* 导航
|
|
1684
1684
|
* @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#:~:text=%E6%9C%8D%E5%8A%A1%E5%9C%B0%E5%9D%80-,http%3A//api.map.baidu.com/direction,-//PC%26Webapp%E6%9C%8D%E5%8A%A1
|
|
@@ -1740,9 +1740,9 @@ const fe = class fe extends kr {
|
|
|
1740
1740
|
}
|
|
1741
1741
|
};
|
|
1742
1742
|
m(fe, "BASE_URL", "https://api.map.baidu.com/");
|
|
1743
|
-
let
|
|
1743
|
+
let Ct = fe, Li = class Dr {
|
|
1744
1744
|
constructor(t, e, r) {
|
|
1745
|
-
this.extend(
|
|
1745
|
+
this.extend(Dr, 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;
|
|
1746
1746
|
var s = r || {};
|
|
1747
1747
|
this.zIndex_ = s.zIndex || google.maps.Marker.MAX_ZINDEX + 1, this.gridSize_ = s.gridSize || 60, this.minClusterSize_ = s.minimumClusterSize || 2, this.maxZoom_ = s.maxZoom || null, this.styles_ = s.styles || [], this.imagePath_ = s.imagePath || this.MARKER_CLUSTER_IMAGE_PATH_, this.imageExtension_ = s.imageExtension || this.MARKER_CLUSTER_IMAGE_EXTENSION_, this.zoomOnClick_ = !0, s.zoomOnClick != null && (this.zoomOnClick_ = s.zoomOnClick), this.averageCenter_ = !1, s.averageCenter != null && (this.averageCenter_ = s.averageCenter), this.setupStyles_(), this.setMap(t), this.prevZoom_ = this.map_.getZoom();
|
|
1748
1748
|
var n = this;
|
|
@@ -2447,7 +2447,7 @@ class Gt {
|
|
|
2447
2447
|
), e.join("");
|
|
2448
2448
|
}
|
|
2449
2449
|
}
|
|
2450
|
-
var
|
|
2450
|
+
var Rr = { exports: {} };
|
|
2451
2451
|
(function(i, t) {
|
|
2452
2452
|
(function(e, r) {
|
|
2453
2453
|
i.exports = r();
|
|
@@ -2486,32 +2486,32 @@ var Dr = { exports: {} };
|
|
|
2486
2486
|
o = r.dom.g(o);
|
|
2487
2487
|
var h = r.dom.getDocument(o), c = r.browser, p = r.dom.getStyle;
|
|
2488
2488
|
c.isGecko > 0 && h.getBoxObjectFor && p(o, "position") == "absolute" && (o.style.top === "" || o.style.left);
|
|
2489
|
-
var g = { left: 0, top: 0 }, f = c.ie && !c.isStrict ? h.body : h.documentElement,
|
|
2489
|
+
var g = { left: 0, top: 0 }, f = c.ie && !c.isStrict ? h.body : h.documentElement, M, _;
|
|
2490
2490
|
if (o == f)
|
|
2491
2491
|
return g;
|
|
2492
2492
|
if (o.getBoundingClientRect) {
|
|
2493
2493
|
_ = o.getBoundingClientRect(), g.left = Math.floor(_.left) + Math.max(h.documentElement.scrollLeft, h.body.scrollLeft), g.top = Math.floor(_.top) + Math.max(h.documentElement.scrollTop, h.body.scrollTop), g.left -= h.documentElement.clientLeft, g.top -= h.documentElement.clientTop;
|
|
2494
|
-
var
|
|
2494
|
+
var T = h.body, l = parseInt(p(T, "borderLeftWidth")), d = parseInt(p(T, "borderTopWidth"));
|
|
2495
2495
|
c.ie && !c.isStrict && (g.left -= isNaN(l) ? 2 : l, g.top -= isNaN(d) ? 2 : d);
|
|
2496
2496
|
} else {
|
|
2497
|
-
|
|
2497
|
+
M = o;
|
|
2498
2498
|
do {
|
|
2499
|
-
if (g.left +=
|
|
2499
|
+
if (g.left += M.offsetLeft, g.top += M.offsetTop, c.isWebkit > 0 && p(M, "position") == "fixed") {
|
|
2500
2500
|
g.left += h.body.scrollLeft, g.top += h.body.scrollTop;
|
|
2501
2501
|
break;
|
|
2502
2502
|
}
|
|
2503
|
-
|
|
2504
|
-
} while (
|
|
2505
|
-
for ((c.opera > 0 || c.isWebkit > 0 && p(o, "position") == "absolute") && (g.top -= h.body.offsetTop),
|
|
2506
|
-
g.left -=
|
|
2503
|
+
M = M.offsetParent;
|
|
2504
|
+
} while (M && M != o);
|
|
2505
|
+
for ((c.opera > 0 || c.isWebkit > 0 && p(o, "position") == "absolute") && (g.top -= h.body.offsetTop), M = o.offsetParent; M && M != h.body; )
|
|
2506
|
+
g.left -= M.scrollLeft, (!c.opera || M.tagName != "TR") && (g.top -= M.scrollTop), M = M.offsetParent;
|
|
2507
2507
|
}
|
|
2508
2508
|
return g;
|
|
2509
2509
|
}, r.event = r.event || {}, r.event._listeners = r.event._listeners || [], r.event.on = function(o, h, c) {
|
|
2510
2510
|
h = h.replace(/^on/i, ""), o = r.dom._g(o);
|
|
2511
|
-
var p = function(
|
|
2512
|
-
c.call(o,
|
|
2513
|
-
}, g = r.event._listeners, f = r.event._eventFilter,
|
|
2514
|
-
return h = h.toLowerCase(), f && f[h] && (
|
|
2511
|
+
var p = function(T) {
|
|
2512
|
+
c.call(o, T);
|
|
2513
|
+
}, g = r.event._listeners, f = r.event._eventFilter, M, _ = h;
|
|
2514
|
+
return h = h.toLowerCase(), f && f[h] && (M = f[h](o, h, p), _ = M.type, p = M.listener), o.addEventListener ? o.addEventListener(_, p, !1) : o.attachEvent && o.attachEvent("on" + _, p), g[g.length] = [o, h, c, p, _], o;
|
|
2515
2515
|
}, r.on = r.event.on, function() {
|
|
2516
2516
|
var o = s[r.guid];
|
|
2517
2517
|
r.lang.guid = function() {
|
|
@@ -2562,8 +2562,8 @@ var Dr = { exports: {} };
|
|
|
2562
2562
|
p[g][c].apply(this, arguments);
|
|
2563
2563
|
return o.returnValue;
|
|
2564
2564
|
}, r.lang.inherits = function(o, h, c) {
|
|
2565
|
-
var p, g, f = o.prototype,
|
|
2566
|
-
|
|
2565
|
+
var p, g, f = o.prototype, M = new Function();
|
|
2566
|
+
M.prototype = h.prototype, g = o.prototype = new M();
|
|
2567
2567
|
for (p in f)
|
|
2568
2568
|
g[p] = f[p];
|
|
2569
2569
|
o.prototype.constructor = o, o.superClass = h.prototype, typeof c == "string" && (g._className = c);
|
|
@@ -2610,24 +2610,24 @@ var Dr = { exports: {} };
|
|
|
2610
2610
|
h.x -= Math.ceil(parseInt(o.width) / 2), h.y -= Math.ceil(parseInt(o.height) / 2), o.left = h.x + "px", o.top = h.y + "px";
|
|
2611
2611
|
}
|
|
2612
2612
|
}, u.prototype._buildCssText = function(o) {
|
|
2613
|
-
var h = o.url, c = o.size, p = o.anchor, g = o.offset, f = o.textColor || "black",
|
|
2613
|
+
var h = o.url, c = o.size, p = o.anchor, g = o.offset, f = o.textColor || "black", M = o.textSize || 10, _ = [];
|
|
2614
2614
|
if (this._zIndex && _.push("z-index:" + this._zIndex + ";"), e.browser.ie < 7)
|
|
2615
2615
|
_.push('filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="' + h + '");');
|
|
2616
2616
|
else {
|
|
2617
2617
|
_.push("background-image:url(" + h + ");");
|
|
2618
|
-
var
|
|
2619
|
-
g instanceof BMap.Size && (
|
|
2618
|
+
var T = "0 0";
|
|
2619
|
+
g instanceof BMap.Size && (T = g.width + "px " + g.height + "px"), _.push("background-position:" + T + ";");
|
|
2620
2620
|
}
|
|
2621
|
-
return c instanceof BMap.Size && (p instanceof BMap.Size ? (p.height > 0 && p.height < c.height && _.push("height:" + (c.height - p.height) + "px; padding-top:" + p.height + "px;"), p.width > 0 && p.width < c.width && _.push("width:" + (c.width - p.width) + "px; padding-left:" + p.width + "px;")) : (_.push("height:" + c.height + "px; line-height:" + c.height + "px;"), _.push("width:" + c.width + "px; text-align:center;"))), _.push("cursor:pointer; color:" + f + "; position:absolute; font-size:" +
|
|
2621
|
+
return c instanceof BMap.Size && (p instanceof BMap.Size ? (p.height > 0 && p.height < c.height && _.push("height:" + (c.height - p.height) + "px; padding-top:" + p.height + "px;"), p.width > 0 && p.width < c.width && _.push("width:" + (c.width - p.width) + "px; padding-left:" + p.width + "px;")) : (_.push("height:" + c.height + "px; line-height:" + c.height + "px;"), _.push("width:" + c.width + "px; text-align:center;"))), _.push("cursor:pointer; color:" + f + "; position:absolute; font-size:" + M + "px; font-family:Arial,sans-serif; font-weight:bold"), _.join("");
|
|
2622
2622
|
}, u.prototype._bind = function() {
|
|
2623
2623
|
if (!this._domElement)
|
|
2624
2624
|
return;
|
|
2625
2625
|
var o = this, h = this._map, c = e.lang.Event;
|
|
2626
2626
|
function p(g, f) {
|
|
2627
|
-
var
|
|
2628
|
-
if (g && f && _ &&
|
|
2627
|
+
var M = g.srcElement || g.target, _ = g.clientX || g.pageX, T = g.clientY || g.pageY;
|
|
2628
|
+
if (g && f && _ && T && M) {
|
|
2629
2629
|
var l = e.dom.getPosition(h.getContainer());
|
|
2630
|
-
f.pixel = new BMap.Pixel(_ - l.left,
|
|
2630
|
+
f.pixel = new BMap.Pixel(_ - l.left, T - l.top), f.point = h.pixelToPoint(f.pixel);
|
|
2631
2631
|
}
|
|
2632
2632
|
return f;
|
|
2633
2633
|
}
|
|
@@ -2640,25 +2640,25 @@ var Dr = { exports: {} };
|
|
|
2640
2640
|
});
|
|
2641
2641
|
}, u;
|
|
2642
2642
|
});
|
|
2643
|
-
})(
|
|
2644
|
-
var
|
|
2645
|
-
const
|
|
2646
|
-
var
|
|
2647
|
-
t =
|
|
2643
|
+
})(Rr);
|
|
2644
|
+
var Bi = Rr.exports;
|
|
2645
|
+
const ur = /* @__PURE__ */ at(Bi);
|
|
2646
|
+
var $r = function(i, t, e) {
|
|
2647
|
+
t = Ii(t);
|
|
2648
2648
|
var r = i.pointToPixel(t.getNorthEast()), s = i.pointToPixel(t.getSouthWest());
|
|
2649
2649
|
r.x += e, r.y -= e, s.x -= e, s.y += e;
|
|
2650
2650
|
var n = i.pixelToPoint(r), a = i.pixelToPoint(s);
|
|
2651
2651
|
return new BMap.Bounds(a, n);
|
|
2652
|
-
},
|
|
2652
|
+
}, Ii = function(i) {
|
|
2653
2653
|
var t = Fe(i.getNorthEast().lng, -180, 180), e = Fe(i.getSouthWest().lng, -180, 180), r = Fe(i.getNorthEast().lat, -74, 74), s = Fe(i.getSouthWest().lat, -74, 74);
|
|
2654
2654
|
return new BMap.Bounds(new BMap.Point(e, s), new BMap.Point(t, r));
|
|
2655
2655
|
}, Fe = function(i, t, e) {
|
|
2656
2656
|
return t && (i = Math.max(i, t)), e && (i = Math.min(i, e)), i;
|
|
2657
|
-
},
|
|
2657
|
+
}, zr = function(i) {
|
|
2658
2658
|
return Object.prototype.toString.call(i) === "[object Array]";
|
|
2659
|
-
},
|
|
2659
|
+
}, Nr = function(i, t) {
|
|
2660
2660
|
var e = -1;
|
|
2661
|
-
if (
|
|
2661
|
+
if (zr(t)) {
|
|
2662
2662
|
if (t.indexOf)
|
|
2663
2663
|
e = t.indexOf(i);
|
|
2664
2664
|
else
|
|
@@ -2686,7 +2686,7 @@ var Rr = function(i, t, e) {
|
|
|
2686
2686
|
r._redraw();
|
|
2687
2687
|
});
|
|
2688
2688
|
var s = e.markers;
|
|
2689
|
-
|
|
2689
|
+
zr(s) && this.addMarkers(s);
|
|
2690
2690
|
}
|
|
2691
2691
|
};
|
|
2692
2692
|
x.prototype.addMarkers = function(i) {
|
|
@@ -2697,7 +2697,7 @@ x.prototype.addMarkers = function(i) {
|
|
|
2697
2697
|
}
|
|
2698
2698
|
};
|
|
2699
2699
|
x.prototype._pushMarkerTo = function(i) {
|
|
2700
|
-
var t =
|
|
2700
|
+
var t = Nr(i, this._markers);
|
|
2701
2701
|
t === -1 && (i.isInCluster = !1, this._markers.push(i));
|
|
2702
2702
|
};
|
|
2703
2703
|
x.prototype.addMarker = function(i) {
|
|
@@ -2706,7 +2706,7 @@ x.prototype.addMarker = function(i) {
|
|
|
2706
2706
|
x.prototype._createClusters = function() {
|
|
2707
2707
|
var i = this._map.getBounds();
|
|
2708
2708
|
if (i.getCenter()) {
|
|
2709
|
-
for (var t =
|
|
2709
|
+
for (var t = $r(this._map, i, this._gridSize), e = 0, r; r = this._markers[e]; e++)
|
|
2710
2710
|
!r.isInCluster && t.containsPoint(r.getPosition()) && this._addToClosestCluster(r);
|
|
2711
2711
|
for (var s = this._markers.length, e = 0; e < s; e++)
|
|
2712
2712
|
this._clusters[e] && this._clusters[e].render();
|
|
@@ -2746,7 +2746,7 @@ x.prototype._removeMarkersFromMap = function() {
|
|
|
2746
2746
|
}
|
|
2747
2747
|
};
|
|
2748
2748
|
x.prototype._removeMarker = function(i) {
|
|
2749
|
-
var t =
|
|
2749
|
+
var t = Nr(i, this._markers);
|
|
2750
2750
|
return t === -1 ? !1 : (this._map.removeOverlay(i), this._markers.splice(t, 1), !0);
|
|
2751
2751
|
};
|
|
2752
2752
|
x.prototype.removeMarker = function(i) {
|
|
@@ -2822,7 +2822,7 @@ x.prototype.setStylesIndexCalculator = function(i) {
|
|
|
2822
2822
|
};
|
|
2823
2823
|
function K(i) {
|
|
2824
2824
|
var t = this;
|
|
2825
|
-
this._markerClusterer = i, this._map = i.getMap(), this._minClusterSize = i.getMinClusterSize(), this._isAverageCenter = i.isAverageCenter(), this._center = null, this._markers = [], this._gridBounds = null, this._isReal = !1, this._clusterMarker = new
|
|
2825
|
+
this._markerClusterer = i, this._map = i.getMap(), this._minClusterSize = i.getMinClusterSize(), this._isAverageCenter = i.isAverageCenter(), this._center = null, this._markers = [], this._gridBounds = null, this._isReal = !1, this._clusterMarker = new ur(this._center, this._markers.length, {
|
|
2826
2826
|
styles: this._markerClusterer.getStyles(),
|
|
2827
2827
|
zIndex: i._zIndex
|
|
2828
2828
|
}), this._clusterMarker.getStyleByText = function(e, r) {
|
|
@@ -2830,7 +2830,7 @@ function K(i) {
|
|
|
2830
2830
|
var s = t._markerClusterer._stylesIndexCalculator(t._markers, r.length);
|
|
2831
2831
|
return r[s];
|
|
2832
2832
|
}
|
|
2833
|
-
return
|
|
2833
|
+
return ur.prototype.getStyleByText.call(this, e, r);
|
|
2834
2834
|
}, this._clusterMarker.addEventListener && this._clusterMarker.addEventListener("click", function(e) {
|
|
2835
2835
|
t._map.setViewport(t.getBounds());
|
|
2836
2836
|
});
|
|
@@ -2870,7 +2870,7 @@ K.prototype.isReal = function(i) {
|
|
|
2870
2870
|
};
|
|
2871
2871
|
K.prototype.updateGridBounds = function() {
|
|
2872
2872
|
var i = new BMap.Bounds(this._center, this._center);
|
|
2873
|
-
this._gridBounds =
|
|
2873
|
+
this._gridBounds = $r(this._map, i, this._markerClusterer.getGridSize());
|
|
2874
2874
|
};
|
|
2875
2875
|
K.prototype.updateClusterMarker = function() {
|
|
2876
2876
|
if (this._map.getZoom() > this._markerClusterer.getMaxZoom()) {
|
|
@@ -2951,7 +2951,7 @@ class Gr {
|
|
|
2951
2951
|
return this.inner.removeMarkers(t.map((e) => e.innerOverlay));
|
|
2952
2952
|
}
|
|
2953
2953
|
}
|
|
2954
|
-
class
|
|
2954
|
+
class Si extends Gr {
|
|
2955
2955
|
constructor(e, r) {
|
|
2956
2956
|
var n;
|
|
2957
2957
|
super(e);
|
|
@@ -2973,12 +2973,12 @@ class Ii extends Gr {
|
|
|
2973
2973
|
this.inner._redraw();
|
|
2974
2974
|
}
|
|
2975
2975
|
}
|
|
2976
|
-
class
|
|
2976
|
+
class ki extends Gr {
|
|
2977
2977
|
constructor(e, r) {
|
|
2978
2978
|
var n, a;
|
|
2979
2979
|
super(e);
|
|
2980
2980
|
m(this, "inner");
|
|
2981
|
-
this.inner = new
|
|
2981
|
+
this.inner = new Li(
|
|
2982
2982
|
e.innerMap,
|
|
2983
2983
|
// google的构造器中的markers,不会触发重绘, 第一次绘制通过监听地图的'idle'事件触发, 可以直接设置
|
|
2984
2984
|
(n = r.markers) == null ? void 0 : n.map((u) => u.innerOverlay),
|
|
@@ -3002,12 +3002,12 @@ class Si extends Gr {
|
|
|
3002
3002
|
this.inner.repaint();
|
|
3003
3003
|
}
|
|
3004
3004
|
}
|
|
3005
|
-
class
|
|
3005
|
+
class Zr {
|
|
3006
3006
|
constructor() {
|
|
3007
3007
|
z();
|
|
3008
3008
|
}
|
|
3009
3009
|
}
|
|
3010
|
-
class
|
|
3010
|
+
class Ai extends Zr {
|
|
3011
3011
|
constructor(e, r) {
|
|
3012
3012
|
super();
|
|
3013
3013
|
m(this, "inner");
|
|
@@ -3016,7 +3016,7 @@ class ki extends Nr {
|
|
|
3016
3016
|
search(e, r) {
|
|
3017
3017
|
return this.searchImpl(
|
|
3018
3018
|
e,
|
|
3019
|
-
r instanceof
|
|
3019
|
+
r instanceof O ? r.toGoogle(this.map.coordType) : r ?? this.map.innerMap.getCenter()
|
|
3020
3020
|
);
|
|
3021
3021
|
}
|
|
3022
3022
|
searchInBounds(e, r) {
|
|
@@ -3041,7 +3041,7 @@ class ki extends Nr {
|
|
|
3041
3041
|
switch (u) {
|
|
3042
3042
|
case google.maps.places.PlacesServiceStatus.ZERO_RESULTS:
|
|
3043
3043
|
case google.maps.places.PlacesServiceStatus.OK: {
|
|
3044
|
-
const o = (a ?? []).map((h) =>
|
|
3044
|
+
const o = (a ?? []).map((h) => Br(h, this.map));
|
|
3045
3045
|
s(o);
|
|
3046
3046
|
break;
|
|
3047
3047
|
}
|
|
@@ -3053,7 +3053,7 @@ class ki extends Nr {
|
|
|
3053
3053
|
});
|
|
3054
3054
|
}
|
|
3055
3055
|
}
|
|
3056
|
-
class
|
|
3056
|
+
class Di extends Zr {
|
|
3057
3057
|
constructor(e, r) {
|
|
3058
3058
|
super();
|
|
3059
3059
|
m(this, "searchRequestMap", /* @__PURE__ */ new Map());
|
|
@@ -3065,7 +3065,7 @@ class Ai extends Nr {
|
|
|
3065
3065
|
}
|
|
3066
3066
|
search(e, r) {
|
|
3067
3067
|
return this.newSearch(
|
|
3068
|
-
r instanceof
|
|
3068
|
+
r instanceof O ? r.toBaidu(this.map.coordType) : r ?? this.map.innerMap.getCenter(),
|
|
3069
3069
|
(s) => {
|
|
3070
3070
|
s.search(e);
|
|
3071
3071
|
}
|
|
@@ -3085,7 +3085,7 @@ class Ai extends Nr {
|
|
|
3085
3085
|
return new Promise((s, n) => {
|
|
3086
3086
|
const a = new BMap.LocalSearch(e ?? this.map.innerMap, {
|
|
3087
3087
|
onSearchComplete: (u) => {
|
|
3088
|
-
Array.isArray(u) &&
|
|
3088
|
+
Array.isArray(u) && Lt("当前只支持一次搜索一条数据");
|
|
3089
3089
|
const o = a.getStatus();
|
|
3090
3090
|
switch (o) {
|
|
3091
3091
|
case BMAP_STATUS_SUCCESS: {
|
|
@@ -3097,7 +3097,7 @@ class Ai extends Nr {
|
|
|
3097
3097
|
city: p.city,
|
|
3098
3098
|
country: "",
|
|
3099
3099
|
// 百度地图只支持中国
|
|
3100
|
-
position:
|
|
3100
|
+
position: O.fromBaidu(p.point, this.map.coordType),
|
|
3101
3101
|
province: p.province,
|
|
3102
3102
|
title: p.title,
|
|
3103
3103
|
address: p.address
|
|
@@ -3119,7 +3119,7 @@ class Ai extends Nr {
|
|
|
3119
3119
|
});
|
|
3120
3120
|
}
|
|
3121
3121
|
}
|
|
3122
|
-
class
|
|
3122
|
+
class Wr {
|
|
3123
3123
|
constructor(t, e) {
|
|
3124
3124
|
m(this, "onData");
|
|
3125
3125
|
m(this, "onError");
|
|
@@ -3134,23 +3134,23 @@ class Zr {
|
|
|
3134
3134
|
return this.onData && I("setSearchListener只能调用一次"), this.onData = t, this.onError = e, z;
|
|
3135
3135
|
}
|
|
3136
3136
|
}
|
|
3137
|
-
class
|
|
3137
|
+
class Ri extends Wr {
|
|
3138
3138
|
constructor(e, r) {
|
|
3139
3139
|
super(e, r.input);
|
|
3140
3140
|
m(this, "searchBox");
|
|
3141
3141
|
this.searchBox = new google.maps.places.SearchBox(r.input), this.searchBox.bindTo("bounds", e.innerMap);
|
|
3142
3142
|
}
|
|
3143
3143
|
setSearchListener(e, r) {
|
|
3144
|
-
return super.setSearchListener(e, r),
|
|
3144
|
+
return super.setSearchListener(e, r), Or(this.searchBox, "places_changed", () => {
|
|
3145
3145
|
const s = this.searchBox.getPlaces();
|
|
3146
|
-
e((s ?? []).map((n) =>
|
|
3146
|
+
e((s ?? []).map((n) => Br(n, this.map)));
|
|
3147
3147
|
});
|
|
3148
3148
|
}
|
|
3149
3149
|
search() {
|
|
3150
3150
|
this.input.value && (google.maps.event.trigger(this.input, "focus", {}), google.maps.event.trigger(this.input, "keydown", { keyCode: 13 }));
|
|
3151
3151
|
}
|
|
3152
3152
|
}
|
|
3153
|
-
class
|
|
3153
|
+
class $i extends Wr {
|
|
3154
3154
|
constructor(e, r) {
|
|
3155
3155
|
super(e, r.input);
|
|
3156
3156
|
m(this, "autocomplete");
|
|
@@ -3169,12 +3169,12 @@ class Ri extends Zr {
|
|
|
3169
3169
|
this.placesService.search(e).then(this.onData, this.onError);
|
|
3170
3170
|
}
|
|
3171
3171
|
}
|
|
3172
|
-
var
|
|
3173
|
-
class
|
|
3172
|
+
var zi = /* @__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))(zi || {});
|
|
3173
|
+
class Zt {
|
|
3174
3174
|
constructor(t) {
|
|
3175
3175
|
m(this, "latestInfoWindow");
|
|
3176
3176
|
/** 使用{@link setEventTargetDelegate}初始化 */
|
|
3177
|
-
m(this, "delegate",
|
|
3177
|
+
m(this, "delegate", L());
|
|
3178
3178
|
this.element = t, process.env.NODE_ENV !== "production" && setTimeout(() => {
|
|
3179
3179
|
this.delegate || console.warn(`${this.constructor.name}继承了AbstractMap, 但未调用setEventTargetDelegate(delegate)`);
|
|
3180
3180
|
});
|
|
@@ -3217,67 +3217,67 @@ class Nt {
|
|
|
3217
3217
|
this.innerMap.setZoom(t);
|
|
3218
3218
|
}
|
|
3219
3219
|
}
|
|
3220
|
-
var
|
|
3221
|
-
return Gi(t) && !
|
|
3220
|
+
var Ni = function(t) {
|
|
3221
|
+
return Gi(t) && !Zi(t);
|
|
3222
3222
|
};
|
|
3223
3223
|
function Gi(i) {
|
|
3224
3224
|
return !!i && typeof i == "object";
|
|
3225
3225
|
}
|
|
3226
|
-
function
|
|
3226
|
+
function Zi(i) {
|
|
3227
3227
|
var t = Object.prototype.toString.call(i);
|
|
3228
|
-
return t === "[object RegExp]" || t === "[object Date]" ||
|
|
3229
|
-
}
|
|
3230
|
-
var Zi = typeof Symbol == "function" && Symbol.for, Wi = Zi ? Symbol.for("react.element") : 60103;
|
|
3231
|
-
function Hi(i) {
|
|
3232
|
-
return i.$$typeof === Wi;
|
|
3228
|
+
return t === "[object RegExp]" || t === "[object Date]" || Vi(i);
|
|
3233
3229
|
}
|
|
3230
|
+
var Wi = typeof Symbol == "function" && Symbol.for, Hi = Wi ? Symbol.for("react.element") : 60103;
|
|
3234
3231
|
function Vi(i) {
|
|
3232
|
+
return i.$$typeof === Hi;
|
|
3233
|
+
}
|
|
3234
|
+
function ji(i) {
|
|
3235
3235
|
return Array.isArray(i) ? [] : {};
|
|
3236
3236
|
}
|
|
3237
3237
|
function $e(i, t) {
|
|
3238
|
-
return t.clone !== !1 && t.isMergeableObject(i) ? be(
|
|
3238
|
+
return t.clone !== !1 && t.isMergeableObject(i) ? be(ji(i), i, t) : i;
|
|
3239
3239
|
}
|
|
3240
|
-
function
|
|
3240
|
+
function Fi(i, t, e) {
|
|
3241
3241
|
return i.concat(t).map(function(r) {
|
|
3242
3242
|
return $e(r, e);
|
|
3243
3243
|
});
|
|
3244
3244
|
}
|
|
3245
|
-
function
|
|
3245
|
+
function Ui(i, t) {
|
|
3246
3246
|
if (!t.customMerge)
|
|
3247
3247
|
return be;
|
|
3248
3248
|
var e = t.customMerge(i);
|
|
3249
3249
|
return typeof e == "function" ? e : be;
|
|
3250
3250
|
}
|
|
3251
|
-
function
|
|
3251
|
+
function Yi(i) {
|
|
3252
3252
|
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(t) {
|
|
3253
3253
|
return Object.propertyIsEnumerable.call(i, t);
|
|
3254
3254
|
}) : [];
|
|
3255
3255
|
}
|
|
3256
|
-
function
|
|
3257
|
-
return Object.keys(i).concat(
|
|
3256
|
+
function pr(i) {
|
|
3257
|
+
return Object.keys(i).concat(Yi(i));
|
|
3258
3258
|
}
|
|
3259
|
-
function
|
|
3259
|
+
function Hr(i, t) {
|
|
3260
3260
|
try {
|
|
3261
3261
|
return t in i;
|
|
3262
3262
|
} catch {
|
|
3263
3263
|
return !1;
|
|
3264
3264
|
}
|
|
3265
3265
|
}
|
|
3266
|
-
function
|
|
3267
|
-
return
|
|
3266
|
+
function qi(i, t) {
|
|
3267
|
+
return Hr(i, t) && !(Object.hasOwnProperty.call(i, t) && Object.propertyIsEnumerable.call(i, t));
|
|
3268
3268
|
}
|
|
3269
|
-
function
|
|
3269
|
+
function Ki(i, t, e) {
|
|
3270
3270
|
var r = {};
|
|
3271
|
-
return e.isMergeableObject(i) &&
|
|
3271
|
+
return e.isMergeableObject(i) && pr(i).forEach(function(s) {
|
|
3272
3272
|
r[s] = $e(i[s], e);
|
|
3273
|
-
}),
|
|
3274
|
-
|
|
3273
|
+
}), pr(t).forEach(function(s) {
|
|
3274
|
+
qi(i, s) || (Hr(i, s) && e.isMergeableObject(t[s]) ? r[s] = Ui(s, e)(i[s], t[s], e) : r[s] = $e(t[s], e));
|
|
3275
3275
|
}), r;
|
|
3276
3276
|
}
|
|
3277
3277
|
function be(i, t, e) {
|
|
3278
|
-
e = e || {}, e.arrayMerge = e.arrayMerge ||
|
|
3278
|
+
e = e || {}, e.arrayMerge = e.arrayMerge || Fi, e.isMergeableObject = e.isMergeableObject || Ni, e.cloneUnlessOtherwiseSpecified = $e;
|
|
3279
3279
|
var r = Array.isArray(t), s = Array.isArray(i), n = r === s;
|
|
3280
|
-
return n ? r ? e.arrayMerge(i, t, e) :
|
|
3280
|
+
return n ? r ? e.arrayMerge(i, t, e) : Ki(i, t, e) : $e(t, e);
|
|
3281
3281
|
}
|
|
3282
3282
|
be.all = function(t, e) {
|
|
3283
3283
|
if (!Array.isArray(t))
|
|
@@ -3286,15 +3286,15 @@ be.all = function(t, e) {
|
|
|
3286
3286
|
return be(r, s, e);
|
|
3287
3287
|
}, {});
|
|
3288
3288
|
};
|
|
3289
|
-
var
|
|
3290
|
-
const
|
|
3289
|
+
var Xi = be, Ji = Xi;
|
|
3290
|
+
const Vr = /* @__PURE__ */ at(Ji);
|
|
3291
3291
|
/*!
|
|
3292
3292
|
* isobject <https://github.com/jonschlinkert/isobject>
|
|
3293
3293
|
*
|
|
3294
3294
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
3295
3295
|
* Released under the MIT License.
|
|
3296
3296
|
*/
|
|
3297
|
-
function
|
|
3297
|
+
function Qi(i) {
|
|
3298
3298
|
return i != null && typeof i == "object" && Array.isArray(i) === !1;
|
|
3299
3299
|
}
|
|
3300
3300
|
/*!
|
|
@@ -3303,12 +3303,12 @@ function Ji(i) {
|
|
|
3303
3303
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
3304
3304
|
* Released under the MIT License.
|
|
3305
3305
|
*/
|
|
3306
|
-
function
|
|
3307
|
-
return
|
|
3306
|
+
function gr(i) {
|
|
3307
|
+
return Qi(i) === !0 && Object.prototype.toString.call(i) === "[object Object]";
|
|
3308
3308
|
}
|
|
3309
|
-
function
|
|
3309
|
+
function jr(i) {
|
|
3310
3310
|
var t, e;
|
|
3311
|
-
return !(
|
|
3311
|
+
return !(gr(i) === !1 || (t = i.constructor, typeof t != "function") || (e = t.prototype, gr(e) === !1) || e.hasOwnProperty("isPrototypeOf") === !1);
|
|
3312
3312
|
}
|
|
3313
3313
|
var ce;
|
|
3314
3314
|
((i) => {
|
|
@@ -3325,7 +3325,7 @@ var ce;
|
|
|
3325
3325
|
}
|
|
3326
3326
|
i.toJsonSafely = r;
|
|
3327
3327
|
function s(c) {
|
|
3328
|
-
|
|
3328
|
+
jr(c) && Object.keys(c).forEach((p) => {
|
|
3329
3329
|
c[p] === void 0 ? delete c[p] : s(c[p]);
|
|
3330
3330
|
});
|
|
3331
3331
|
}
|
|
@@ -3336,37 +3336,37 @@ var ce;
|
|
|
3336
3336
|
}
|
|
3337
3337
|
i.putIfAbsent = n;
|
|
3338
3338
|
function a(c, ...p) {
|
|
3339
|
-
const g =
|
|
3340
|
-
for (const
|
|
3341
|
-
g(
|
|
3339
|
+
const g = mr(p), f = {};
|
|
3340
|
+
for (const M in c)
|
|
3341
|
+
g(M) || (f[M] = c[M]);
|
|
3342
3342
|
return f;
|
|
3343
3343
|
}
|
|
3344
3344
|
i.omit = a;
|
|
3345
3345
|
function u(c, ...p) {
|
|
3346
|
-
const g =
|
|
3347
|
-
for (const
|
|
3348
|
-
g(
|
|
3346
|
+
const g = mr(p), f = {};
|
|
3347
|
+
for (const M in c)
|
|
3348
|
+
g(M) && (f[M] = c[M]);
|
|
3349
3349
|
return f;
|
|
3350
3350
|
}
|
|
3351
3351
|
i.pick = u;
|
|
3352
3352
|
function o(c, p) {
|
|
3353
3353
|
const g = typeof p == "string" ? p.split(".") : p;
|
|
3354
3354
|
let f = c;
|
|
3355
|
-
for (const
|
|
3355
|
+
for (const M of g) {
|
|
3356
3356
|
if (f == null)
|
|
3357
3357
|
return;
|
|
3358
|
-
f = f[
|
|
3358
|
+
f = f[M];
|
|
3359
3359
|
}
|
|
3360
3360
|
return f;
|
|
3361
3361
|
}
|
|
3362
3362
|
i.get = o;
|
|
3363
3363
|
function h(c, p) {
|
|
3364
|
-
const g = typeof p == "string" ? p.split(".") : p, f = o(c, g.slice(0, -1)),
|
|
3365
|
-
f != null && delete f[
|
|
3364
|
+
const g = typeof p == "string" ? p.split(".") : p, f = o(c, g.slice(0, -1)), M = g[g.length - 1];
|
|
3365
|
+
f != null && delete f[M];
|
|
3366
3366
|
}
|
|
3367
3367
|
i.del = h;
|
|
3368
3368
|
})(ce || (ce = {}));
|
|
3369
|
-
function
|
|
3369
|
+
function mr(i) {
|
|
3370
3370
|
if (i.length <= 4)
|
|
3371
3371
|
return i.includes.bind(i);
|
|
3372
3372
|
{
|
|
@@ -3375,19 +3375,19 @@ function gr(i) {
|
|
|
3375
3375
|
}
|
|
3376
3376
|
}
|
|
3377
3377
|
ce.toJsonSafely;
|
|
3378
|
-
const
|
|
3378
|
+
const es = ["single", "multi"];
|
|
3379
3379
|
var re = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(re || {}), wt;
|
|
3380
3380
|
((i) => {
|
|
3381
3381
|
function t(e) {
|
|
3382
3382
|
ce.deleteUndefinedPropertyOnPlainObjectDeeply(e);
|
|
3383
|
-
const r = { center:
|
|
3384
|
-
return
|
|
3385
|
-
isMergeableObject:
|
|
3383
|
+
const r = { center: O.ZERO, zoom: 5 };
|
|
3384
|
+
return Vr(r, e || {}, {
|
|
3385
|
+
isMergeableObject: jr
|
|
3386
3386
|
});
|
|
3387
3387
|
}
|
|
3388
3388
|
i.create = t;
|
|
3389
3389
|
})(wt || (wt = {}));
|
|
3390
|
-
class
|
|
3390
|
+
class Fr {
|
|
3391
3391
|
constructor(t, e) {
|
|
3392
3392
|
m(this, "_delegate");
|
|
3393
3393
|
this.innerOverlay = t, this.coordType = e;
|
|
@@ -3405,7 +3405,7 @@ class jr {
|
|
|
3405
3405
|
this.map.removeOverlay(this);
|
|
3406
3406
|
}
|
|
3407
3407
|
}
|
|
3408
|
-
class
|
|
3408
|
+
class Wt extends Fr {
|
|
3409
3409
|
constructor(t, e, r) {
|
|
3410
3410
|
super(t, e), this.map = r;
|
|
3411
3411
|
}
|
|
@@ -3419,7 +3419,7 @@ class Zt extends jr {
|
|
|
3419
3419
|
this.innerOverlay.setVisible(t);
|
|
3420
3420
|
}
|
|
3421
3421
|
}
|
|
3422
|
-
class ct extends
|
|
3422
|
+
class ct extends Fr {
|
|
3423
3423
|
constructor(t, e, r) {
|
|
3424
3424
|
super(t, e), this.map = r;
|
|
3425
3425
|
}
|
|
@@ -3475,7 +3475,7 @@ const Ae = class Ae extends ct {
|
|
|
3475
3475
|
*/
|
|
3476
3476
|
m(Ae, "OPACITY_DELTA", 1e-3);
|
|
3477
3477
|
let U = Ae;
|
|
3478
|
-
class dt extends
|
|
3478
|
+
class dt extends Wt {
|
|
3479
3479
|
isEditable() {
|
|
3480
3480
|
return this.innerOverlay.getEditable();
|
|
3481
3481
|
}
|
|
@@ -3498,7 +3498,7 @@ class dt extends Zt {
|
|
|
3498
3498
|
this.innerOverlay.setOptions({ fillOpacity: t });
|
|
3499
3499
|
}
|
|
3500
3500
|
}
|
|
3501
|
-
class
|
|
3501
|
+
class Ht extends U {
|
|
3502
3502
|
constructor() {
|
|
3503
3503
|
super(...arguments);
|
|
3504
3504
|
m(this, "prevCenter");
|
|
@@ -3529,7 +3529,7 @@ class Wt extends U {
|
|
|
3529
3529
|
strokeWeight: e.strokeWeight,
|
|
3530
3530
|
fillColor: e.fillColor,
|
|
3531
3531
|
fillOpacity: e.fillOpacity != null ? e.fillOpacity + U.OPACITY_DELTA : void 0
|
|
3532
|
-
}), n = new
|
|
3532
|
+
}), n = new Ht(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
|
|
3533
3533
|
return n.state.editable && setTimeout(() => {
|
|
3534
3534
|
n.state.editable && s.enableEditing();
|
|
3535
3535
|
}, 0), n;
|
|
@@ -3551,7 +3551,7 @@ class Wt extends U {
|
|
|
3551
3551
|
}, 0));
|
|
3552
3552
|
}
|
|
3553
3553
|
getCenter() {
|
|
3554
|
-
return
|
|
3554
|
+
return O.fromBaidu(this.innerOverlay.getCenter(), this.coordType);
|
|
3555
3555
|
}
|
|
3556
3556
|
setRadius(e) {
|
|
3557
3557
|
this.isDoingSetRadius = !0, this.innerOverlay.setRadius(e), this.isDoingSetRadius = !1;
|
|
@@ -3560,7 +3560,7 @@ class Wt extends U {
|
|
|
3560
3560
|
return this.innerOverlay.getRadius();
|
|
3561
3561
|
}
|
|
3562
3562
|
}
|
|
3563
|
-
class
|
|
3563
|
+
class Vt extends dt {
|
|
3564
3564
|
static create(t) {
|
|
3565
3565
|
const e = this.coordType, r = new google.maps.Circle({
|
|
3566
3566
|
center: t.center.toGoogle(e),
|
|
@@ -3574,13 +3574,13 @@ class Ht extends dt {
|
|
|
3574
3574
|
fillOpacity: t.fillOpacity,
|
|
3575
3575
|
visible: t.visible
|
|
3576
3576
|
});
|
|
3577
|
-
return new
|
|
3577
|
+
return new Vt(r, e, this);
|
|
3578
3578
|
}
|
|
3579
3579
|
setCenter(t) {
|
|
3580
3580
|
this.coordType = this.map.coordType, this.innerOverlay.setCenter(t.toGoogle(this.coordType));
|
|
3581
3581
|
}
|
|
3582
3582
|
getCenter() {
|
|
3583
|
-
return
|
|
3583
|
+
return O.fromGoogle(this.innerOverlay.getCenter() ?? he.LATLNG_ZERO, this.coordType);
|
|
3584
3584
|
}
|
|
3585
3585
|
setRadius(t) {
|
|
3586
3586
|
this.innerOverlay.setRadius(t);
|
|
@@ -3594,10 +3594,10 @@ var le;
|
|
|
3594
3594
|
i.ZERO = { x: 0, y: 0 };
|
|
3595
3595
|
})(le || (le = {}));
|
|
3596
3596
|
let ft;
|
|
3597
|
-
function
|
|
3598
|
-
return ft || (ft =
|
|
3597
|
+
function ts(i, t, e, r, s, n) {
|
|
3598
|
+
return ft || (ft = rs()), new ft(i, t, e, r, s, n);
|
|
3599
3599
|
}
|
|
3600
|
-
function
|
|
3600
|
+
function rs() {
|
|
3601
3601
|
Tr();
|
|
3602
3602
|
const i = new BMap.Point(0, 0);
|
|
3603
3603
|
return class extends BMap.OverlayV3 {
|
|
@@ -3666,7 +3666,7 @@ function ts() {
|
|
|
3666
3666
|
}
|
|
3667
3667
|
};
|
|
3668
3668
|
}
|
|
3669
|
-
class
|
|
3669
|
+
class jt {
|
|
3670
3670
|
constructor(t) {
|
|
3671
3671
|
this.delegate = t, this.delegate.setTarget(this);
|
|
3672
3672
|
}
|
|
@@ -3677,39 +3677,39 @@ class Vt {
|
|
|
3677
3677
|
this.delegate.removeEventListener(t, e);
|
|
3678
3678
|
}
|
|
3679
3679
|
}
|
|
3680
|
-
class
|
|
3680
|
+
class Ft extends jt {
|
|
3681
3681
|
constructor(t, e, r) {
|
|
3682
3682
|
super(new Re(t, e)), this.inner = t, this.map = e, this.state = r;
|
|
3683
3683
|
}
|
|
3684
3684
|
static create(t) {
|
|
3685
|
-
const e = t.position ||
|
|
3685
|
+
const e = t.position || O.ZERO, r = new BMap.InfoWindow(t.content, {
|
|
3686
3686
|
maxWidth: t.maxWidth,
|
|
3687
3687
|
offset: t.offset && new BMap.Size(t.offset.x, t.offset.y),
|
|
3688
3688
|
enableAutoPan: !t.disableAutoPan
|
|
3689
3689
|
});
|
|
3690
|
-
return new
|
|
3690
|
+
return new Ft(r, this, { position: e });
|
|
3691
3691
|
}
|
|
3692
3692
|
isOpen() {
|
|
3693
3693
|
return this.inner.isOpen();
|
|
3694
3694
|
}
|
|
3695
3695
|
open(t) {
|
|
3696
|
-
t ? t.innerOverlay.openInfoWindow(this.inner) : this.map.innerMap.openInfoWindow(this.inner, (this.state.position ||
|
|
3696
|
+
t ? t.innerOverlay.openInfoWindow(this.inner) : this.map.innerMap.openInfoWindow(this.inner, (this.state.position || O.ZERO).toBaidu(this.map.coordType)), this.map.setLatestInfoWindowInternal(this);
|
|
3697
3697
|
}
|
|
3698
3698
|
close() {
|
|
3699
3699
|
this.inner.isOpen() && this.map.innerMap.closeInfoWindow();
|
|
3700
3700
|
}
|
|
3701
3701
|
getPosition() {
|
|
3702
3702
|
const t = this.inner.getPosition();
|
|
3703
|
-
return t &&
|
|
3703
|
+
return t && O.fromBaidu(t, this.map.coordType) || this.state.position || O.ZERO;
|
|
3704
3704
|
}
|
|
3705
3705
|
setPosition(t) {
|
|
3706
3706
|
this.state.position = t, this.inner.isOpen() && this.open();
|
|
3707
3707
|
}
|
|
3708
3708
|
}
|
|
3709
|
-
class
|
|
3709
|
+
class Ut extends jt {
|
|
3710
3710
|
constructor(e, r) {
|
|
3711
3711
|
super(new _e(e, r));
|
|
3712
|
-
m(this, "eventHub", new
|
|
3712
|
+
m(this, "eventHub", new wr());
|
|
3713
3713
|
m(this, "isOpened", !1);
|
|
3714
3714
|
this.inner = e, this.map = r, e.addListener("closeclick", () => {
|
|
3715
3715
|
this.isOpened = !1, this.eventHub.hasListener("close") && this.eventHub.notify({ type: "close", target: this });
|
|
@@ -3719,14 +3719,14 @@ class Ft extends Vt {
|
|
|
3719
3719
|
});
|
|
3720
3720
|
}
|
|
3721
3721
|
static create(e) {
|
|
3722
|
-
const r = e.position ||
|
|
3722
|
+
const r = e.position || O.ZERO, s = new google.maps.InfoWindow({
|
|
3723
3723
|
content: e.content,
|
|
3724
3724
|
maxWidth: e.maxWidth,
|
|
3725
3725
|
pixelOffset: e.offset && new google.maps.Size(e.offset.x, e.offset.y),
|
|
3726
3726
|
position: r.toGoogle(this.coordType),
|
|
3727
3727
|
disableAutoPan: e.disableAutoPan
|
|
3728
3728
|
});
|
|
3729
|
-
return new
|
|
3729
|
+
return new Ut(s, this);
|
|
3730
3730
|
}
|
|
3731
3731
|
isOpen() {
|
|
3732
3732
|
return this.isOpened;
|
|
@@ -3758,19 +3758,19 @@ class Ft extends Vt {
|
|
|
3758
3758
|
this.isOpened && (this.isOpened = !1, this.inner.close(), this.eventHub.notify({ type: "close", target: this }));
|
|
3759
3759
|
}
|
|
3760
3760
|
getPosition() {
|
|
3761
|
-
return
|
|
3761
|
+
return O.fromGoogle(this.inner.getPosition() ?? he.LATLNG_ZERO, this.map.coordType);
|
|
3762
3762
|
}
|
|
3763
3763
|
setPosition(e) {
|
|
3764
3764
|
this.inner.setPosition(e.toGoogle(this.map.coordType));
|
|
3765
3765
|
}
|
|
3766
3766
|
}
|
|
3767
|
-
class
|
|
3767
|
+
class Yt extends ct {
|
|
3768
3768
|
constructor(t, e, r) {
|
|
3769
3769
|
super(t, e, r), this.baiduMap = r;
|
|
3770
3770
|
}
|
|
3771
3771
|
static create(t) {
|
|
3772
3772
|
var s;
|
|
3773
|
-
const e = this.coordType, r =
|
|
3773
|
+
const e = this.coordType, r = ts(
|
|
3774
3774
|
t.content,
|
|
3775
3775
|
(s = t.position) == null ? void 0 : s.toBaidu(e),
|
|
3776
3776
|
t.offset,
|
|
@@ -3778,7 +3778,7 @@ class Ut extends ct {
|
|
|
3778
3778
|
t.maxWidth,
|
|
3779
3779
|
t.borderClass
|
|
3780
3780
|
);
|
|
3781
|
-
return new
|
|
3781
|
+
return new Yt(r, e, this);
|
|
3782
3782
|
}
|
|
3783
3783
|
open(t) {
|
|
3784
3784
|
this.innerOverlay.open(this.baiduMap.innerMap, t == null ? void 0 : t.innerOverlay);
|
|
@@ -3787,7 +3787,7 @@ class Ut extends ct {
|
|
|
3787
3787
|
this.innerOverlay.close();
|
|
3788
3788
|
}
|
|
3789
3789
|
getPosition() {
|
|
3790
|
-
return
|
|
3790
|
+
return O.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
|
|
3791
3791
|
}
|
|
3792
3792
|
setPosition(t) {
|
|
3793
3793
|
this.coordType = this.map.coordType, this.innerOverlay.setPosition(t.toBaidu(this.coordType));
|
|
@@ -3799,7 +3799,7 @@ class Ut extends ct {
|
|
|
3799
3799
|
this.innerOverlay.setZIndex(t);
|
|
3800
3800
|
}
|
|
3801
3801
|
}
|
|
3802
|
-
class
|
|
3802
|
+
class qt extends jt {
|
|
3803
3803
|
constructor(t, e, r) {
|
|
3804
3804
|
super(new _e(t, r)), this.inner = t, this.coordType = e, this.map = r;
|
|
3805
3805
|
}
|
|
@@ -3816,7 +3816,7 @@ class Yt extends Vt {
|
|
|
3816
3816
|
var u;
|
|
3817
3817
|
const a = (u = t.content.parentElement) == null ? void 0 : u.parentElement;
|
|
3818
3818
|
a && a.className.includes("gm-style-iw-c") && !a.className.includes(s) && (a.className += ` ${s}`);
|
|
3819
|
-
}), new
|
|
3819
|
+
}), new qt(r, e, this);
|
|
3820
3820
|
}
|
|
3821
3821
|
open(t) {
|
|
3822
3822
|
this.inner.open(this.map.innerMap, t == null ? void 0 : t.innerOverlay);
|
|
@@ -3825,7 +3825,7 @@ class Yt extends Vt {
|
|
|
3825
3825
|
this.inner.close();
|
|
3826
3826
|
}
|
|
3827
3827
|
getPosition() {
|
|
3828
|
-
return
|
|
3828
|
+
return O.fromGoogle(this.inner.getPosition() ?? he.LATLNG_ZERO, this.coordType);
|
|
3829
3829
|
}
|
|
3830
3830
|
setPosition(t) {
|
|
3831
3831
|
this.coordType = this.map.coordType, this.inner.setPosition(t.toGoogle(this.coordType));
|
|
@@ -3844,7 +3844,7 @@ class Yt extends Vt {
|
|
|
3844
3844
|
this.inner.setZIndex(t);
|
|
3845
3845
|
}
|
|
3846
3846
|
}
|
|
3847
|
-
var
|
|
3847
|
+
var Me;
|
|
3848
3848
|
((i) => {
|
|
3849
3849
|
function t(n, a) {
|
|
3850
3850
|
if (n !== void 0)
|
|
@@ -3865,8 +3865,8 @@ var Te;
|
|
|
3865
3865
|
return /^-?\d+$/.test(n);
|
|
3866
3866
|
}
|
|
3867
3867
|
i.isInt = s;
|
|
3868
|
-
})(
|
|
3869
|
-
var ze = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overlayMouseTarget = "overlayMouseTarget", i.float = "float", i))(ze || {}),
|
|
3868
|
+
})(Me || (Me = {}));
|
|
3869
|
+
var ze = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overlayMouseTarget = "overlayMouseTarget", i.float = "float", i))(ze || {}), Ne;
|
|
3870
3870
|
((i) => {
|
|
3871
3871
|
function t(r, s) {
|
|
3872
3872
|
switch (r) {
|
|
@@ -3898,13 +3898,13 @@ var ze = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overla
|
|
|
3898
3898
|
}
|
|
3899
3899
|
}
|
|
3900
3900
|
i.toBaidu = e;
|
|
3901
|
-
})(
|
|
3902
|
-
class
|
|
3901
|
+
})(Ne || (Ne = {}));
|
|
3902
|
+
class is {
|
|
3903
3903
|
constructor(t, e) {
|
|
3904
3904
|
m(this, "baidu");
|
|
3905
3905
|
m(this, "google");
|
|
3906
3906
|
m(this, "projection");
|
|
3907
|
-
m(this, "element",
|
|
3907
|
+
m(this, "element", L());
|
|
3908
3908
|
m(this, "mapPane");
|
|
3909
3909
|
this.map = t, this.mapPane = e.mapPane;
|
|
3910
3910
|
}
|
|
@@ -3925,7 +3925,7 @@ class rs {
|
|
|
3925
3925
|
initialize(n) {
|
|
3926
3926
|
var o;
|
|
3927
3927
|
const a = t.create(), u = n.getPanes();
|
|
3928
|
-
return (o =
|
|
3928
|
+
return (o = Ne.toBaidu(t.mapPane, u)) == null || o.appendChild(a), a;
|
|
3929
3929
|
}
|
|
3930
3930
|
draw() {
|
|
3931
3931
|
t.draw();
|
|
@@ -3938,7 +3938,7 @@ class rs {
|
|
|
3938
3938
|
return r.pointToOverlayPixel(s.toBaidu(t.map.coordType));
|
|
3939
3939
|
},
|
|
3940
3940
|
fromOverlayPointToLatLng(s) {
|
|
3941
|
-
return
|
|
3941
|
+
return O.fromBaidu(r.overlayPixelToPoint(new BMap.Pixel(s.x, s.y)), t.map.coordType);
|
|
3942
3942
|
}
|
|
3943
3943
|
};
|
|
3944
3944
|
}
|
|
@@ -3950,7 +3950,7 @@ class rs {
|
|
|
3950
3950
|
class e extends google.maps.OverlayView {
|
|
3951
3951
|
onAdd() {
|
|
3952
3952
|
const s = t.create(), n = this.getPanes() ?? I("onAdd回调中一定会有panes");
|
|
3953
|
-
|
|
3953
|
+
Ne.toGoogle(t.mapPane, n).appendChild(s);
|
|
3954
3954
|
}
|
|
3955
3955
|
draw() {
|
|
3956
3956
|
t.draw();
|
|
@@ -3965,7 +3965,7 @@ class rs {
|
|
|
3965
3965
|
return t.google.getProjection().fromLatLngToDivPixel(r.toGoogle(t.map.coordType)) ?? le.ZERO;
|
|
3966
3966
|
},
|
|
3967
3967
|
fromOverlayPointToLatLng(r) {
|
|
3968
|
-
return
|
|
3968
|
+
return O.fromGoogle(t.google.getProjection().fromDivPixelToLatLng(new google.maps.Point(r.x, r.y)) ?? he.LATLNG_ZERO, t.map.coordType);
|
|
3969
3969
|
}
|
|
3970
3970
|
};
|
|
3971
3971
|
}
|
|
@@ -3973,10 +3973,10 @@ class rs {
|
|
|
3973
3973
|
}
|
|
3974
3974
|
}
|
|
3975
3975
|
let vt;
|
|
3976
|
-
function
|
|
3977
|
-
return vt || (vt =
|
|
3976
|
+
function ss(i, t, e, r, s) {
|
|
3977
|
+
return vt || (vt = ns()), new vt(i, t, e, r, s);
|
|
3978
3978
|
}
|
|
3979
|
-
function
|
|
3979
|
+
function ns() {
|
|
3980
3980
|
return class extends google.maps.OverlayView {
|
|
3981
3981
|
constructor(e, r, s, n = ze.overlayMouseTarget, a) {
|
|
3982
3982
|
super();
|
|
@@ -3994,7 +3994,7 @@ function ss() {
|
|
|
3994
3994
|
}
|
|
3995
3995
|
onAdd() {
|
|
3996
3996
|
const e = this.getPanes() ?? I("onAdd回调中一定能够获取panes");
|
|
3997
|
-
|
|
3997
|
+
Ne.toGoogle(this._mapPane, e).appendChild(this.container);
|
|
3998
3998
|
}
|
|
3999
3999
|
draw() {
|
|
4000
4000
|
var e, r;
|
|
@@ -4030,7 +4030,7 @@ function ss() {
|
|
|
4030
4030
|
}
|
|
4031
4031
|
};
|
|
4032
4032
|
}
|
|
4033
|
-
var
|
|
4033
|
+
var Te;
|
|
4034
4034
|
((i) => {
|
|
4035
4035
|
function t(r) {
|
|
4036
4036
|
return typeof r == "string" ? r : r.outerHTML;
|
|
@@ -4044,19 +4044,19 @@ var Me;
|
|
|
4044
4044
|
return r;
|
|
4045
4045
|
}
|
|
4046
4046
|
i.toElement = e;
|
|
4047
|
-
})(
|
|
4048
|
-
class
|
|
4047
|
+
})(Te || (Te = {}));
|
|
4048
|
+
class Kt extends ct {
|
|
4049
4049
|
constructor(e, r, s, n) {
|
|
4050
4050
|
super(e, r, s);
|
|
4051
4051
|
m(this, "icon");
|
|
4052
4052
|
m(this, "iconAnchor");
|
|
4053
|
-
m(this, "content",
|
|
4053
|
+
m(this, "content", L());
|
|
4054
4054
|
m(this, "contentObserver");
|
|
4055
4055
|
this.setContentInternal(n, !0);
|
|
4056
4056
|
}
|
|
4057
4057
|
static create(e) {
|
|
4058
4058
|
var a;
|
|
4059
|
-
const r = this.coordType, s = new BMap.Label(
|
|
4059
|
+
const r = this.coordType, s = new BMap.Label(Te.toString(e.content), {
|
|
4060
4060
|
position: (a = e.position) == null ? void 0 : a.toBaidu(r),
|
|
4061
4061
|
offset: e.offset && new BMap.Size(e.offset.x, e.offset.y)
|
|
4062
4062
|
});
|
|
@@ -4065,7 +4065,7 @@ class qt extends ct {
|
|
|
4065
4065
|
padding: "0px",
|
|
4066
4066
|
backgroundColor: "unset"
|
|
4067
4067
|
});
|
|
4068
|
-
const n = new
|
|
4068
|
+
const n = new Kt(s, r, this, e.content);
|
|
4069
4069
|
return s.__label__ = n, n;
|
|
4070
4070
|
}
|
|
4071
4071
|
setContentInternal(e, r = !1) {
|
|
@@ -4076,13 +4076,13 @@ class qt extends ct {
|
|
|
4076
4076
|
characterData: !0,
|
|
4077
4077
|
childList: !0,
|
|
4078
4078
|
subtree: !0
|
|
4079
|
-
})), r || this.innerOverlay.setContent(
|
|
4079
|
+
})), r || this.innerOverlay.setContent(Te.toString(e)), this.content = e);
|
|
4080
4080
|
}
|
|
4081
4081
|
setZIndex(e) {
|
|
4082
4082
|
this.innerOverlay.setZIndex(e);
|
|
4083
4083
|
}
|
|
4084
4084
|
getPosition() {
|
|
4085
|
-
return
|
|
4085
|
+
return O.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
|
|
4086
4086
|
}
|
|
4087
4087
|
setPosition(e) {
|
|
4088
4088
|
this.coordType = this.map.coordType, this.innerOverlay.setPosition(e.toBaidu(this.coordType));
|
|
@@ -4130,8 +4130,8 @@ class qt extends ct {
|
|
|
4130
4130
|
e.__icon__.rotation,
|
|
4131
4131
|
e.__icon__.scale,
|
|
4132
4132
|
e.__icon__.strokeWeight
|
|
4133
|
-
].map((
|
|
4134
|
-
console.warn("BaiduLabelOverlay.attachIcon", e.__icon__,
|
|
4133
|
+
].map((M) => M ?? "").join(",");
|
|
4134
|
+
console.warn("BaiduLabelOverlay.attachIcon", e.__icon__, Me.trimIndent(
|
|
4135
4135
|
`
|
|
4136
4136
|
为了保证Label的位置正确, 请将SymbolIcon(${f})中baiduLabelOffset的值改写成:
|
|
4137
4137
|
${JSON.stringify({ x: h, y: c })}
|
|
@@ -4145,27 +4145,27 @@ class qt extends ct {
|
|
|
4145
4145
|
this.iconAnchor && (n -= this.iconAnchor.width, a -= this.iconAnchor.height), r && (n += r.width, a += r.height), this.innerOverlay.setOffset(new BMap.Size(n, a)), this.icon = e, this.iconAnchor = r;
|
|
4146
4146
|
}
|
|
4147
4147
|
}
|
|
4148
|
-
class
|
|
4148
|
+
class Xt extends Wt {
|
|
4149
4149
|
static create(t) {
|
|
4150
4150
|
var s;
|
|
4151
|
-
const e = this.coordType, r =
|
|
4152
|
-
|
|
4151
|
+
const e = this.coordType, r = ss(
|
|
4152
|
+
Te.toElement(t.content),
|
|
4153
4153
|
(s = t.position) == null ? void 0 : s.toGoogle(e),
|
|
4154
4154
|
t.offset,
|
|
4155
4155
|
t.mapPane,
|
|
4156
4156
|
t.zIndex
|
|
4157
4157
|
);
|
|
4158
|
-
return new
|
|
4158
|
+
return new Xt(r, e, this);
|
|
4159
4159
|
}
|
|
4160
4160
|
setZIndex(t) {
|
|
4161
4161
|
this.innerOverlay.setZIndex(t);
|
|
4162
4162
|
}
|
|
4163
4163
|
setContent(t) {
|
|
4164
|
-
this.innerOverlay.setElement(
|
|
4164
|
+
this.innerOverlay.setElement(Te.toElement(t));
|
|
4165
4165
|
}
|
|
4166
4166
|
getPosition() {
|
|
4167
4167
|
const t = this.innerOverlay.getPosition();
|
|
4168
|
-
return t ?
|
|
4168
|
+
return t ? O.fromGoogle(t, this.coordType) : O.ZERO;
|
|
4169
4169
|
}
|
|
4170
4170
|
setPosition(t) {
|
|
4171
4171
|
this.coordType = this.map.coordType, this.innerOverlay.setPosition(t.toGoogle(this.coordType));
|
|
@@ -4178,8 +4178,8 @@ class Kt extends Zt {
|
|
|
4178
4178
|
}
|
|
4179
4179
|
}
|
|
4180
4180
|
const et = {
|
|
4181
|
-
toGoogle: (i) => "url" in i ? tt.toGoogle(i) :
|
|
4182
|
-
toBaidu: (i) => "url" in i ? tt.toBaidu(i) :
|
|
4181
|
+
toGoogle: (i) => "url" in i ? tt.toGoogle(i) : Oe.toGoogle(i),
|
|
4182
|
+
toBaidu: (i) => "url" in i ? tt.toBaidu(i) : Oe.toBaidu(i)
|
|
4183
4183
|
};
|
|
4184
4184
|
var tt;
|
|
4185
4185
|
((i) => {
|
|
@@ -4190,12 +4190,13 @@ var tt;
|
|
|
4190
4190
|
origin: r.origin && new google.maps.Point(r.origin.x, r.origin.y),
|
|
4191
4191
|
scaledSize: r.scaledSize && new google.maps.Size(r.scaledSize.width, r.scaledSize.height),
|
|
4192
4192
|
// google的锚点默认就是图标的底部中点
|
|
4193
|
-
anchor: r.anchor && new google.maps.Point(r.anchor.x, r.anchor.y)
|
|
4193
|
+
anchor: r.anchor && new google.maps.Point(r.anchor.x, r.anchor.y),
|
|
4194
|
+
labelOrigin: r.labelOrigin && new google.maps.Point(r.labelOrigin.x, r.labelOrigin.y)
|
|
4194
4195
|
};
|
|
4195
4196
|
}
|
|
4196
4197
|
i.toGoogle = t;
|
|
4197
4198
|
function e(r) {
|
|
4198
|
-
|
|
4199
|
+
const s = new BMap.Icon(r.url, new BMap.Size(r.size.width, r.size.height), {
|
|
4199
4200
|
imageOffset: r.origin && new BMap.Size(-r.origin.x, -r.origin.y),
|
|
4200
4201
|
imageSize: r.scaledSize && new BMap.Size(r.scaledSize.width, r.scaledSize.height),
|
|
4201
4202
|
// baidu的锚点默认为图标的中心点, 故需要和@tg/map统一, 改成图标的底部中点
|
|
@@ -4203,10 +4204,11 @@ var tt;
|
|
|
4203
4204
|
// InfoWindow相对图标左上角的偏移量, 不指定则InfoWindow不会偏移, 直接指到marker的position上
|
|
4204
4205
|
// infoWindowAnchor: new BMap.Size(0, 0),
|
|
4205
4206
|
});
|
|
4207
|
+
return s.__icon__ = r, s;
|
|
4206
4208
|
}
|
|
4207
4209
|
i.toBaidu = e;
|
|
4208
4210
|
})(tt || (tt = {}));
|
|
4209
|
-
var
|
|
4211
|
+
var Oe;
|
|
4210
4212
|
((i) => {
|
|
4211
4213
|
function t(r) {
|
|
4212
4214
|
return {
|
|
@@ -4237,8 +4239,8 @@ var Ce;
|
|
|
4237
4239
|
return s.__icon__ = r, s;
|
|
4238
4240
|
}
|
|
4239
4241
|
i.toBaidu = e;
|
|
4240
|
-
})(
|
|
4241
|
-
const
|
|
4242
|
+
})(Oe || (Oe = {}));
|
|
4243
|
+
const bn = {
|
|
4242
4244
|
CIRCLE: { baidu: () => BMap_Symbol_SHAPE_CIRCLE, google: () => google.maps.SymbolPath.CIRCLE },
|
|
4243
4245
|
BACKWARD_CLOSED_ARROW: { baidu: () => BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW, google: () => google.maps.SymbolPath.BACKWARD_CLOSED_ARROW },
|
|
4244
4246
|
BACKWARD_OPEN_ARROW: { baidu: () => BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW, google: () => google.maps.SymbolPath.BACKWARD_OPEN_ARROW },
|
|
@@ -4249,7 +4251,7 @@ var rt;
|
|
|
4249
4251
|
((i) => {
|
|
4250
4252
|
function t(r) {
|
|
4251
4253
|
return {
|
|
4252
|
-
icon:
|
|
4254
|
+
icon: Oe.toGoogle(r.icon),
|
|
4253
4255
|
offset: r.offset,
|
|
4254
4256
|
repeat: r.repeat,
|
|
4255
4257
|
fixedRotation: r.fixedRotation
|
|
@@ -4258,7 +4260,7 @@ var rt;
|
|
|
4258
4260
|
i.toGoogle = t;
|
|
4259
4261
|
function e(r) {
|
|
4260
4262
|
return new BMap.IconSequence(
|
|
4261
|
-
|
|
4263
|
+
Oe.toBaidu(r.icon),
|
|
4262
4264
|
r.offset,
|
|
4263
4265
|
r.repeat ?? "",
|
|
4264
4266
|
r.fixedRotation
|
|
@@ -4266,7 +4268,28 @@ var rt;
|
|
|
4266
4268
|
}
|
|
4267
4269
|
i.toBaidu = e;
|
|
4268
4270
|
})(rt || (rt = {}));
|
|
4269
|
-
|
|
4271
|
+
const xt = {
|
|
4272
|
+
toBaidu: (i) => {
|
|
4273
|
+
const t = ["baidu-marker-label"];
|
|
4274
|
+
i.className && t.push(i.className);
|
|
4275
|
+
const e = new BMap.Label(
|
|
4276
|
+
`<span class="${t.join(" ")}">${i.text}</span>`
|
|
4277
|
+
);
|
|
4278
|
+
return e.setStyle({
|
|
4279
|
+
// 清除baidu自带的样式
|
|
4280
|
+
border: "0px",
|
|
4281
|
+
padding: "0px",
|
|
4282
|
+
backgroundColor: "unset",
|
|
4283
|
+
// 设置样式, 默认值跟google相同
|
|
4284
|
+
color: i.color ?? "black",
|
|
4285
|
+
fontSize: i.fontSize ?? "14px",
|
|
4286
|
+
fontWeight: i.fontWeight ?? "",
|
|
4287
|
+
fontFamily: i.fontFamily ?? "Roboto, Arial, sans-serif"
|
|
4288
|
+
}), e;
|
|
4289
|
+
},
|
|
4290
|
+
toGoogle: (i) => i
|
|
4291
|
+
};
|
|
4292
|
+
class Ge extends ct {
|
|
4270
4293
|
constructor(t, e, r, s) {
|
|
4271
4294
|
super(t, e, r), this.state = s;
|
|
4272
4295
|
}
|
|
@@ -4281,11 +4304,11 @@ class Ne extends ct {
|
|
|
4281
4304
|
draggingCursor: t.cursor
|
|
4282
4305
|
}, n = new BMap.Marker(t.position.toBaidu(e, t.normalizePositionForBaidu), s);
|
|
4283
4306
|
n.__create_by_tg__ = !0, t.zIndex !== void 0 && n.setZIndex(t.zIndex);
|
|
4284
|
-
const a = t.clickable === void 0 ? !0 : t.clickable, u = !!t.draggable;
|
|
4285
|
-
return
|
|
4307
|
+
const a = t.clickable === void 0 ? !0 : t.clickable, u = !!t.draggable, o = new Ge(n, e, this, { clickable: a, draggable: u, zIndex: t.zIndex, normalize: t.normalizePositionForBaidu }).visibleOptionInternal(t.visible);
|
|
4308
|
+
return t.label && o.setLabel(t.label), o;
|
|
4286
4309
|
}
|
|
4287
4310
|
getPosition() {
|
|
4288
|
-
return
|
|
4311
|
+
return O.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
|
|
4289
4312
|
}
|
|
4290
4313
|
setPosition(t) {
|
|
4291
4314
|
var e;
|
|
@@ -4299,8 +4322,8 @@ class Ne extends ct {
|
|
|
4299
4322
|
}
|
|
4300
4323
|
setIcon(t) {
|
|
4301
4324
|
const e = et.toBaidu(t);
|
|
4302
|
-
this.innerOverlay.setIcon(e);
|
|
4303
|
-
const r = this.
|
|
4325
|
+
this.innerOverlay.setIcon(e), this._updateMarkerLabelOffset();
|
|
4326
|
+
const r = this.getLabelOverlay();
|
|
4304
4327
|
r && r.attachIcon(e);
|
|
4305
4328
|
}
|
|
4306
4329
|
getIcon() {
|
|
@@ -4325,15 +4348,27 @@ class Ne extends ct {
|
|
|
4325
4348
|
return this.state.zIndex;
|
|
4326
4349
|
}
|
|
4327
4350
|
setLabel(t) {
|
|
4328
|
-
const e = this.getLabel();
|
|
4329
|
-
e &&
|
|
4351
|
+
const e = this.innerOverlay.getLabel();
|
|
4352
|
+
e && this.map.innerMap.removeOverlay(e), this.innerOverlay.setLabel(xt.toBaidu(t)), this._updateMarkerLabelOffset();
|
|
4330
4353
|
}
|
|
4331
|
-
|
|
4354
|
+
_updateMarkerLabelOffset() {
|
|
4355
|
+
const t = this.innerOverlay.getIcon(), e = t.__icon__, r = this.innerOverlay.getLabel();
|
|
4356
|
+
if (r && t && !e && t.imageUrl === "https://api.map.baidu.com/images/marker_red_sprite.png") {
|
|
4357
|
+
r.setOffset(new BMap.Size(9, 9));
|
|
4358
|
+
return;
|
|
4359
|
+
}
|
|
4360
|
+
!r || !e || !("size" in e) || r.setOffset(e.labelOrigin ? new BMap.Size(e.labelOrigin.x, e.labelOrigin.y) : new BMap.Size(e.size.width / 2, e.size.height / 2));
|
|
4361
|
+
}
|
|
4362
|
+
attachLabelOverlay(t) {
|
|
4363
|
+
const e = this.getLabelOverlay();
|
|
4364
|
+
process.env.NODE_ENV !== "production" && this.innerOverlay.getLabel() && !e && console.warn("当前label不是LabelOverlay, 可能是混用 MarkerLabel/marker.setLabel() 和 LabelOverlay/<tg-label> 导致的, 请不要混用他们两者", this.innerOverlay.getLabel()), e && e.attachIcon(void 0), t && t.attachIcon(this.innerOverlay.getIcon()), this.innerOverlay.setLabel(t == null ? void 0 : t.innerOverlay);
|
|
4365
|
+
}
|
|
4366
|
+
getLabelOverlay() {
|
|
4332
4367
|
var t;
|
|
4333
4368
|
return (t = this.innerOverlay.getLabel()) == null ? void 0 : t.__label__;
|
|
4334
4369
|
}
|
|
4335
4370
|
}
|
|
4336
|
-
class
|
|
4371
|
+
class Jt extends Wt {
|
|
4337
4372
|
constructor() {
|
|
4338
4373
|
super(...arguments);
|
|
4339
4374
|
m(this, "label");
|
|
@@ -4345,6 +4380,7 @@ class Xt extends Zt {
|
|
|
4345
4380
|
const r = this.coordType, s = e.icon, n = {
|
|
4346
4381
|
position: e.position.toGoogle(r),
|
|
4347
4382
|
title: e.title,
|
|
4383
|
+
label: e.label && xt.toGoogle(e.label),
|
|
4348
4384
|
zIndex: e.zIndex,
|
|
4349
4385
|
visible: e.visible,
|
|
4350
4386
|
icon: s && et.toGoogle(s),
|
|
@@ -4356,10 +4392,10 @@ class Xt extends Zt {
|
|
|
4356
4392
|
// InfoWindow相对marker的position的偏移量, 若不指定, 则偏移到marker的icon的上部中央
|
|
4357
4393
|
anchorPoint: new google.maps.Point(0, 0)
|
|
4358
4394
|
};
|
|
4359
|
-
return new
|
|
4395
|
+
return new Jt(new google.maps.Marker(n), r, this);
|
|
4360
4396
|
}
|
|
4361
4397
|
getPosition() {
|
|
4362
|
-
return
|
|
4398
|
+
return O.fromGoogle(this.innerOverlay.getPosition(), this.coordType);
|
|
4363
4399
|
}
|
|
4364
4400
|
setPosition(e) {
|
|
4365
4401
|
this.coordType = this.map.coordType, this.innerOverlay.setPosition(e.toGoogle(this.coordType));
|
|
@@ -4396,6 +4432,9 @@ class Xt extends Zt {
|
|
|
4396
4432
|
return e === null ? void 0 : e;
|
|
4397
4433
|
}
|
|
4398
4434
|
setLabel(e) {
|
|
4435
|
+
this.innerOverlay.setLabel(xt.toGoogle(e));
|
|
4436
|
+
}
|
|
4437
|
+
attachLabelOverlay(e) {
|
|
4399
4438
|
if (this.label && this.map.removeOverlay(this.label), this.labelPositionListener && this.labelPositionListener.remove(), this.labelVisibleListener && this.labelVisibleListener.remove(), this.labelMapChangedListener && this.labelMapChangedListener.remove(), e) {
|
|
4400
4439
|
const r = () => {
|
|
4401
4440
|
e.innerOverlay.setPosition(this.innerOverlay.getPosition());
|
|
@@ -4409,7 +4448,7 @@ class Xt extends Zt {
|
|
|
4409
4448
|
this.label = void 0, this.labelPositionListener = void 0, this.labelVisibleListener = void 0, this.labelMapChangedListener = void 0;
|
|
4410
4449
|
}
|
|
4411
4450
|
}
|
|
4412
|
-
class
|
|
4451
|
+
class Qt extends U {
|
|
4413
4452
|
constructor() {
|
|
4414
4453
|
super(...arguments);
|
|
4415
4454
|
m(this, "eventHubDelegate");
|
|
@@ -4445,7 +4484,7 @@ class Jt extends U {
|
|
|
4445
4484
|
});
|
|
4446
4485
|
}
|
|
4447
4486
|
}
|
|
4448
|
-
class
|
|
4487
|
+
class er extends Qt {
|
|
4449
4488
|
constructor() {
|
|
4450
4489
|
super(...arguments);
|
|
4451
4490
|
m(this, "pathEditedEventType", "path-edited");
|
|
@@ -4460,13 +4499,13 @@ class Qt extends Jt {
|
|
|
4460
4499
|
strokeWeight: e.strokeWeight,
|
|
4461
4500
|
icons: (n = e.icons) == null ? void 0 : n.map(rt.toBaidu)
|
|
4462
4501
|
});
|
|
4463
|
-
return new
|
|
4502
|
+
return new er(s, r, this, {
|
|
4464
4503
|
editable: !!e.editable,
|
|
4465
4504
|
symbolIcons: (a = e.icons) == null ? void 0 : a.map((u) => u.icon)
|
|
4466
4505
|
}).visibleOptionInternal(e.visible);
|
|
4467
4506
|
}
|
|
4468
4507
|
getPath() {
|
|
4469
|
-
return this.innerOverlay.getPath().map((e) =>
|
|
4508
|
+
return this.innerOverlay.getPath().map((e) => O.fromBaidu(e, this.coordType));
|
|
4470
4509
|
}
|
|
4471
4510
|
setPath(e) {
|
|
4472
4511
|
this.coordType = this.map.coordType, this.setPathInternal(e.map((r) => r.toBaidu(this.coordType)));
|
|
@@ -4488,7 +4527,7 @@ class Qt extends Jt {
|
|
|
4488
4527
|
}).forEach((s) => this.map.innerMap.removeOverlay(s));
|
|
4489
4528
|
}
|
|
4490
4529
|
}
|
|
4491
|
-
class
|
|
4530
|
+
class tr extends dt {
|
|
4492
4531
|
constructor() {
|
|
4493
4532
|
super(...arguments);
|
|
4494
4533
|
m(this, "pathChangedListeners");
|
|
@@ -4506,7 +4545,7 @@ class er extends dt {
|
|
|
4506
4545
|
visible: e.visible,
|
|
4507
4546
|
icons: (n = e.icons) == null ? void 0 : n.map(rt.toGoogle)
|
|
4508
4547
|
});
|
|
4509
|
-
return new
|
|
4548
|
+
return new tr(s, r, this);
|
|
4510
4549
|
}
|
|
4511
4550
|
setupPathChangedListeners() {
|
|
4512
4551
|
const e = () => {
|
|
@@ -4529,7 +4568,7 @@ class er extends dt {
|
|
|
4529
4568
|
getPath() {
|
|
4530
4569
|
const e = [];
|
|
4531
4570
|
return this.innerOverlay.getPath().forEach((r) => {
|
|
4532
|
-
e.push(
|
|
4571
|
+
e.push(O.fromGoogle(r, this.coordType));
|
|
4533
4572
|
}), e;
|
|
4534
4573
|
}
|
|
4535
4574
|
setPath(e) {
|
|
@@ -4537,7 +4576,7 @@ class er extends dt {
|
|
|
4537
4576
|
this.coordType = this.map.coordType, this.innerOverlay.setPath(e.map((s) => s.toGoogle(this.coordType))), (r = this.eventHubDelegate) != null && r.hasListener("path-edited") && this.setupPathChangedListeners();
|
|
4538
4577
|
}
|
|
4539
4578
|
}
|
|
4540
|
-
class
|
|
4579
|
+
class rr extends Qt {
|
|
4541
4580
|
constructor() {
|
|
4542
4581
|
super(...arguments);
|
|
4543
4582
|
m(this, "pathEditedEventType", "paths-edited");
|
|
@@ -4554,16 +4593,16 @@ class tr extends Jt {
|
|
|
4554
4593
|
fillColor: e.fillColor,
|
|
4555
4594
|
fillOpacity: e.fillOpacity != null ? e.fillOpacity + U.OPACITY_DELTA : void 0
|
|
4556
4595
|
});
|
|
4557
|
-
return new
|
|
4596
|
+
return new rr(n, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
|
|
4558
4597
|
}
|
|
4559
4598
|
getPaths() {
|
|
4560
|
-
return [this.innerOverlay.getPath().map((e) =>
|
|
4599
|
+
return [this.innerOverlay.getPath().map((e) => O.fromBaidu(e, this.coordType))];
|
|
4561
4600
|
}
|
|
4562
4601
|
setPaths(e) {
|
|
4563
4602
|
e.length > 1 && console.warn("baidu不支持多path, 只会显示paths[0]"), this.coordType = this.map.coordType, this.setPathInternal((e[0] || []).map((r) => r.toBaidu(this.coordType)));
|
|
4564
4603
|
}
|
|
4565
4604
|
}
|
|
4566
|
-
class
|
|
4605
|
+
class ir extends dt {
|
|
4567
4606
|
constructor() {
|
|
4568
4607
|
super(...arguments);
|
|
4569
4608
|
m(this, "pathChangedListeners");
|
|
@@ -4581,7 +4620,7 @@ class rr extends dt {
|
|
|
4581
4620
|
fillOpacity: e.fillOpacity,
|
|
4582
4621
|
visible: e.visible
|
|
4583
4622
|
});
|
|
4584
|
-
return new
|
|
4623
|
+
return new ir(s, r, this);
|
|
4585
4624
|
}
|
|
4586
4625
|
setupPathChangedListeners() {
|
|
4587
4626
|
const e = () => {
|
|
@@ -4608,7 +4647,7 @@ class rr extends dt {
|
|
|
4608
4647
|
return e.forEach((s) => {
|
|
4609
4648
|
const n = [];
|
|
4610
4649
|
r.push(n), s.forEach((a) => {
|
|
4611
|
-
n.push(
|
|
4650
|
+
n.push(O.fromGoogle(a, this.coordType));
|
|
4612
4651
|
});
|
|
4613
4652
|
}), r;
|
|
4614
4653
|
}
|
|
@@ -4617,7 +4656,7 @@ class rr extends dt {
|
|
|
4617
4656
|
this.coordType = this.map.coordType, this.innerOverlay.setPaths(e.map((s) => s.map((n) => n.toGoogle(this.coordType)))), (r = this.eventHubDelegate) != null && r.hasListener("paths-edited") && this.setupPathChangedListeners();
|
|
4618
4657
|
}
|
|
4619
4658
|
}
|
|
4620
|
-
class
|
|
4659
|
+
class sr extends Qt {
|
|
4621
4660
|
constructor(e, r, s, n) {
|
|
4622
4661
|
super(e, r, s, n);
|
|
4623
4662
|
m(this, "pathEditedEventType", "bounds-changed");
|
|
@@ -4632,15 +4671,15 @@ class ir extends Jt {
|
|
|
4632
4671
|
if (r.length === 4)
|
|
4633
4672
|
if (a > r.length) {
|
|
4634
4673
|
for (let o = 0; o < a; o++)
|
|
4635
|
-
if (r[o] == null || !
|
|
4674
|
+
if (r[o] == null || !lr.equals(s[o], r[o])) {
|
|
4636
4675
|
const h = s[(o - 2 + a) % a], c = s[(o - 1 + a) % a], p = s[o], g = s[(o + 1) % a], f = s[(o + 2) % a];
|
|
4637
|
-
let
|
|
4638
|
-
c.lat === g.lat ?
|
|
4676
|
+
let M;
|
|
4677
|
+
c.lat === g.lat ? M = new BMap.Point(c.lng, p.lat) : c.lng === g.lng ? M = new BMap.Point(p.lng, c.lat) : M = p, n = [h, f, M];
|
|
4639
4678
|
break;
|
|
4640
4679
|
}
|
|
4641
4680
|
} else if (a === r.length) {
|
|
4642
4681
|
for (let o = 0; o < a; o++)
|
|
4643
|
-
if (!
|
|
4682
|
+
if (!lr.equals(s[o], r[o])) {
|
|
4644
4683
|
n = [
|
|
4645
4684
|
s[o],
|
|
4646
4685
|
s[(o + 2) % 4]
|
|
@@ -4649,7 +4688,7 @@ class ir extends Jt {
|
|
|
4649
4688
|
}
|
|
4650
4689
|
} else
|
|
4651
4690
|
a < r.length;
|
|
4652
|
-
const u = Q.fromArray(n.map((o) =>
|
|
4691
|
+
const u = Q.fromArray(n.map((o) => O.fromBaidu(o, this.coordType)));
|
|
4653
4692
|
u && (this.isDoingUpdateRectangle = !0, this.innerOverlay.setPath(u.toRectArray().map((o) => o.toBaidu(this.coordType))), this.isDoingUpdateRectangle = !1);
|
|
4654
4693
|
}, 0);
|
|
4655
4694
|
});
|
|
@@ -4665,7 +4704,7 @@ class ir extends Jt {
|
|
|
4665
4704
|
fillColor: e.fillColor,
|
|
4666
4705
|
fillOpacity: e.fillOpacity != null ? e.fillOpacity + U.OPACITY_DELTA : void 0
|
|
4667
4706
|
});
|
|
4668
|
-
return new
|
|
4707
|
+
return new sr(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
|
|
4669
4708
|
}
|
|
4670
4709
|
getBounds() {
|
|
4671
4710
|
return Q.fromBaidu(this.innerOverlay.getBounds(), this.coordType);
|
|
@@ -4677,7 +4716,7 @@ class ir extends Jt {
|
|
|
4677
4716
|
}) : this.setPathInternal(r.map((s) => s.toBaidu(this.coordType)));
|
|
4678
4717
|
}
|
|
4679
4718
|
}
|
|
4680
|
-
class
|
|
4719
|
+
class nr extends dt {
|
|
4681
4720
|
static create(t) {
|
|
4682
4721
|
const e = this.coordType, r = new google.maps.Rectangle({
|
|
4683
4722
|
bounds: t.bounds.toGoogle(e),
|
|
@@ -4690,7 +4729,7 @@ class sr extends dt {
|
|
|
4690
4729
|
fillOpacity: t.fillOpacity,
|
|
4691
4730
|
visible: t.visible
|
|
4692
4731
|
});
|
|
4693
|
-
return new
|
|
4732
|
+
return new nr(r, e, this);
|
|
4694
4733
|
}
|
|
4695
4734
|
getBounds() {
|
|
4696
4735
|
return Q.fromGoogle(this.innerOverlay.getBounds() ?? he.BOUNDS_ZERO, this.coordType);
|
|
@@ -4701,26 +4740,26 @@ class sr extends dt {
|
|
|
4701
4740
|
}
|
|
4702
4741
|
}
|
|
4703
4742
|
const pe = 1;
|
|
4704
|
-
class
|
|
4743
|
+
class os extends Zt {
|
|
4705
4744
|
constructor(e, r) {
|
|
4706
4745
|
var s;
|
|
4707
4746
|
super(e);
|
|
4708
4747
|
m(this, "buildInMapTypeId2BIMT");
|
|
4709
4748
|
m(this, "baiduMapType2BIMT");
|
|
4710
4749
|
m(this, "map");
|
|
4711
|
-
m(this, "createLabel",
|
|
4712
|
-
m(this, "createCircle",
|
|
4713
|
-
m(this, "createPolygon",
|
|
4714
|
-
m(this, "createPolyline",
|
|
4715
|
-
m(this, "createRectangle",
|
|
4716
|
-
m(this, "createInfoWindow",
|
|
4717
|
-
m(this, "createInfoBox",
|
|
4718
|
-
m(this, "createMarker",
|
|
4719
|
-
m(this, "createMapTypeControl",
|
|
4720
|
-
m(this, "createZoomControl",
|
|
4721
|
-
m(this, "createStreetViewControl",
|
|
4722
|
-
m(this, "createScaleControl",
|
|
4723
|
-
this.buildInMapTypeId2BIMT = F.BUILD_IN_MAP_TYPES.getValueMap(j.prototype.getId), this.baiduMapType2BIMT = F.BUILD_IN_MAP_TYPES.getValueMap(j.prototype.asBaiduMapType),
|
|
4750
|
+
m(this, "createLabel", Kt.create);
|
|
4751
|
+
m(this, "createCircle", Ht.create);
|
|
4752
|
+
m(this, "createPolygon", rr.create);
|
|
4753
|
+
m(this, "createPolyline", er.create);
|
|
4754
|
+
m(this, "createRectangle", sr.create);
|
|
4755
|
+
m(this, "createInfoWindow", Ft.create);
|
|
4756
|
+
m(this, "createInfoBox", Yt.create);
|
|
4757
|
+
m(this, "createMarker", Ge.create);
|
|
4758
|
+
m(this, "createMapTypeControl", kt.create);
|
|
4759
|
+
m(this, "createZoomControl", zt.create);
|
|
4760
|
+
m(this, "createStreetViewControl", Rt.create);
|
|
4761
|
+
m(this, "createScaleControl", At.create);
|
|
4762
|
+
this.buildInMapTypeId2BIMT = F.BUILD_IN_MAP_TYPES.getValueMap(j.prototype.getId), this.baiduMapType2BIMT = F.BUILD_IN_MAP_TYPES.getValueMap(j.prototype.asBaiduMapType), ui(), this.map = new BMap.Map(e, {
|
|
4724
4763
|
minZoom: r.minZoom && r.minZoom + pe,
|
|
4725
4764
|
maxZoom: r.maxZoom && r.maxZoom + pe,
|
|
4726
4765
|
mapType: r.buildInMapTypeId && ((s = this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId)) == null ? void 0 : s.asBaiduMapType()),
|
|
@@ -4735,7 +4774,7 @@ class ns extends Nt {
|
|
|
4735
4774
|
});
|
|
4736
4775
|
}
|
|
4737
4776
|
setGestureHandling(e = re.auto) {
|
|
4738
|
-
switch (e === re.auto && (e = this.element.parentElement &&
|
|
4777
|
+
switch (e === re.auto && (e = this.element.parentElement && Mt.isScrollable(this.element.parentElement) ? re.cooperative : re.greedy), e) {
|
|
4739
4778
|
case re.cooperative:
|
|
4740
4779
|
this.map.disableScrollWheelZoom(), this.map.enableDragging(), this.map.enableDoubleClickZoom();
|
|
4741
4780
|
break;
|
|
@@ -4768,7 +4807,7 @@ class ns extends Nt {
|
|
|
4768
4807
|
super.removeEventListener(e, r);
|
|
4769
4808
|
}
|
|
4770
4809
|
fromContainerPointToLatLng(e) {
|
|
4771
|
-
return
|
|
4810
|
+
return O.fromBaidu(this.innerMap.pixelToPoint(new BMap.Pixel(e.x, e.y)), this.coordType);
|
|
4772
4811
|
}
|
|
4773
4812
|
fromLatLngToContainerPoint(e) {
|
|
4774
4813
|
return this.innerMap.pointToPixel(e.toBaidu(this.coordType));
|
|
@@ -4783,7 +4822,7 @@ class ns extends Nt {
|
|
|
4783
4822
|
e ? this.map.enableDoubleClickZoom() : this.map.disableDoubleClickZoom();
|
|
4784
4823
|
}
|
|
4785
4824
|
getCenter() {
|
|
4786
|
-
return
|
|
4825
|
+
return O.fromBaidu(this.map.getCenter(), this.coordType);
|
|
4787
4826
|
}
|
|
4788
4827
|
setCenter(e) {
|
|
4789
4828
|
this.map.setCenter(e.toBaidu(this.coordType));
|
|
@@ -4868,43 +4907,43 @@ class ns extends Nt {
|
|
|
4868
4907
|
e.inner && (ve(e.inner instanceof BMap.Control, `control.inner(${e.inner})需要是BMap.Control`), this.map.removeControl(e.inner));
|
|
4869
4908
|
}
|
|
4870
4909
|
createMarkerClusterer(e) {
|
|
4871
|
-
return new
|
|
4910
|
+
return new Si(this, e);
|
|
4872
4911
|
}
|
|
4873
4912
|
createHeatmap(e) {
|
|
4874
|
-
return new
|
|
4913
|
+
return new Ei(this, e);
|
|
4875
4914
|
}
|
|
4876
4915
|
createAutocomplete(e) {
|
|
4877
|
-
return new
|
|
4916
|
+
return new Oi(this, e);
|
|
4878
4917
|
}
|
|
4879
4918
|
createSearchBox(e) {
|
|
4880
|
-
return new
|
|
4919
|
+
return new $i(this, e);
|
|
4881
4920
|
}
|
|
4882
4921
|
createPlacesService(e) {
|
|
4883
|
-
return new
|
|
4922
|
+
return new Di(this, e);
|
|
4884
4923
|
}
|
|
4885
4924
|
createMapUrls(e) {
|
|
4886
|
-
return new
|
|
4925
|
+
return new Ct(e);
|
|
4887
4926
|
}
|
|
4888
4927
|
}
|
|
4889
|
-
class
|
|
4928
|
+
class as extends Zt {
|
|
4890
4929
|
constructor(e, r) {
|
|
4891
4930
|
var n, a;
|
|
4892
4931
|
super(e);
|
|
4893
4932
|
m(this, "buildInMapTypeId2BIMT");
|
|
4894
4933
|
m(this, "googleMapTypeId2BIMT");
|
|
4895
4934
|
m(this, "map");
|
|
4896
|
-
m(this, "createLabel",
|
|
4897
|
-
m(this, "createCircle",
|
|
4898
|
-
m(this, "createPolygon",
|
|
4899
|
-
m(this, "createPolyline",
|
|
4900
|
-
m(this, "createRectangle",
|
|
4901
|
-
m(this, "createInfoWindow",
|
|
4902
|
-
m(this, "createInfoBox",
|
|
4903
|
-
m(this, "createMarker",
|
|
4904
|
-
m(this, "createMapTypeControl",
|
|
4905
|
-
m(this, "createZoomControl",
|
|
4906
|
-
m(this, "createStreetViewControl",
|
|
4907
|
-
m(this, "createScaleControl",
|
|
4935
|
+
m(this, "createLabel", Xt.create);
|
|
4936
|
+
m(this, "createCircle", Vt.create);
|
|
4937
|
+
m(this, "createPolygon", ir.create);
|
|
4938
|
+
m(this, "createPolyline", tr.create);
|
|
4939
|
+
m(this, "createRectangle", nr.create);
|
|
4940
|
+
m(this, "createInfoWindow", Ut.create);
|
|
4941
|
+
m(this, "createInfoBox", qt.create);
|
|
4942
|
+
m(this, "createMarker", Jt.create);
|
|
4943
|
+
m(this, "createMapTypeControl", Tt.create);
|
|
4944
|
+
m(this, "createZoomControl", Nt.create);
|
|
4945
|
+
m(this, "createStreetViewControl", $t.create);
|
|
4946
|
+
m(this, "createScaleControl", Dt.create);
|
|
4908
4947
|
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);
|
|
4909
4948
|
const s = r.buildInMapTypeId && this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId);
|
|
4910
4949
|
this.map = new google.maps.Map(e, {
|
|
@@ -4933,12 +4972,12 @@ class os extends Nt {
|
|
|
4933
4972
|
fromContainerPointToLatLng(e) {
|
|
4934
4973
|
const r = this.innerMap.getProjection(), s = this.innerMap.getBounds();
|
|
4935
4974
|
if (r == null || s == null)
|
|
4936
|
-
return
|
|
4975
|
+
return O.ZERO;
|
|
4937
4976
|
const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), u = this.innerMap.getZoom();
|
|
4938
4977
|
if (n == null || a == null || u == null)
|
|
4939
|
-
return
|
|
4978
|
+
return O.ZERO;
|
|
4940
4979
|
const o = Math.pow(2, u), h = new google.maps.Point(e.x / o + n.x, e.y / o + a.y);
|
|
4941
|
-
return
|
|
4980
|
+
return O.fromGoogle(r.fromPointToLatLng(h) ?? he.LATLNG_ZERO, this.coordType);
|
|
4942
4981
|
}
|
|
4943
4982
|
fromLatLngToContainerPoint(e) {
|
|
4944
4983
|
const r = this.innerMap.getProjection(), s = this.innerMap.getBounds();
|
|
@@ -4960,7 +4999,7 @@ class os extends Nt {
|
|
|
4960
4999
|
this.map.setOptions({ disableDoubleClickZoom: !e });
|
|
4961
5000
|
}
|
|
4962
5001
|
getCenter() {
|
|
4963
|
-
return
|
|
5002
|
+
return O.fromGoogle(this.map.getCenter() ?? he.LATLNG_ZERO, this.coordType);
|
|
4964
5003
|
}
|
|
4965
5004
|
setCenter(e) {
|
|
4966
5005
|
this.map.setCenter(e.toGoogle(this.coordType));
|
|
@@ -5036,25 +5075,25 @@ class os extends Nt {
|
|
|
5036
5075
|
}
|
|
5037
5076
|
}
|
|
5038
5077
|
createMarkerClusterer(e) {
|
|
5039
|
-
return new
|
|
5078
|
+
return new ki(this, e);
|
|
5040
5079
|
}
|
|
5041
5080
|
createHeatmap(e) {
|
|
5042
|
-
return new
|
|
5081
|
+
return new xi(this, e);
|
|
5043
5082
|
}
|
|
5044
5083
|
createAutocomplete(e) {
|
|
5045
5084
|
return new Ti(this, e);
|
|
5046
5085
|
}
|
|
5047
5086
|
createSearchBox(e) {
|
|
5048
|
-
return new
|
|
5087
|
+
return new Ri(this, e);
|
|
5049
5088
|
}
|
|
5050
5089
|
createPlacesService(e) {
|
|
5051
|
-
return new
|
|
5090
|
+
return new Ai(this, e);
|
|
5052
5091
|
}
|
|
5053
5092
|
createMapUrls(e) {
|
|
5054
|
-
return new
|
|
5093
|
+
return new Ot(e);
|
|
5055
5094
|
}
|
|
5056
5095
|
}
|
|
5057
|
-
const it = ["3.0"],
|
|
5096
|
+
const it = ["3.0"], ls = {
|
|
5058
5097
|
baidu: {
|
|
5059
5098
|
version: "3.0",
|
|
5060
5099
|
// 在build时会被静态替换, 导致使用者不能无法设置它
|
|
@@ -5073,21 +5112,21 @@ const it = ["3.0"], as = {
|
|
|
5073
5112
|
key: ""
|
|
5074
5113
|
}
|
|
5075
5114
|
};
|
|
5076
|
-
let
|
|
5077
|
-
function
|
|
5078
|
-
return
|
|
5115
|
+
let Ur;
|
|
5116
|
+
function Yr() {
|
|
5117
|
+
return Ur || I("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
|
|
5079
5118
|
}
|
|
5080
|
-
function
|
|
5081
|
-
i != null && (
|
|
5119
|
+
function hs(i) {
|
|
5120
|
+
i != null && (Ur = Vr(ls, i));
|
|
5082
5121
|
}
|
|
5083
|
-
class
|
|
5122
|
+
class cs extends Zt {
|
|
5084
5123
|
constructor(e, r) {
|
|
5085
5124
|
var a;
|
|
5086
5125
|
super(e);
|
|
5087
5126
|
m(this, "map");
|
|
5088
5127
|
m(this, "defaultLayers");
|
|
5089
5128
|
this.mapOptions = r;
|
|
5090
|
-
const s =
|
|
5129
|
+
const s = Yr().here;
|
|
5091
5130
|
it.includes(s.version) || I(`不支持${s.version}, HereMap当前只支持如下版本: ${it}`);
|
|
5092
5131
|
const n = new H.service.Platform({
|
|
5093
5132
|
app_id: s.key.split(",")[0],
|
|
@@ -5105,7 +5144,7 @@ class hs extends Nt {
|
|
|
5105
5144
|
return R.wgs84;
|
|
5106
5145
|
}
|
|
5107
5146
|
getCenter() {
|
|
5108
|
-
return
|
|
5147
|
+
return O.fromHere(this.map.getCenter(), this.coordType);
|
|
5109
5148
|
}
|
|
5110
5149
|
setCenter(e) {
|
|
5111
5150
|
this.map.setCenter(e.toHere(this.coordType));
|
|
@@ -5238,52 +5277,52 @@ class hs extends Nt {
|
|
|
5238
5277
|
throw new Error("Method not implemented.");
|
|
5239
5278
|
}
|
|
5240
5279
|
}
|
|
5241
|
-
var X = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here = "here", i))(X || {}),
|
|
5280
|
+
var X = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here = "here", i))(X || {}), Et;
|
|
5242
5281
|
((i) => {
|
|
5243
5282
|
function t(e, r, s) {
|
|
5244
5283
|
const n = wt.create(s);
|
|
5245
5284
|
switch (e) {
|
|
5246
5285
|
case "google":
|
|
5247
|
-
return new
|
|
5286
|
+
return new as(r, n);
|
|
5248
5287
|
case "baidu":
|
|
5249
|
-
return new
|
|
5288
|
+
return new os(r, n);
|
|
5250
5289
|
case "here":
|
|
5251
|
-
return new
|
|
5290
|
+
return new cs(r, n);
|
|
5252
5291
|
}
|
|
5253
5292
|
}
|
|
5254
5293
|
i.createMap = t;
|
|
5255
|
-
})(
|
|
5256
|
-
function
|
|
5294
|
+
})(Et || (Et = {}));
|
|
5295
|
+
function Mn(i) {
|
|
5257
5296
|
throw new Error(`todo: ${i}`);
|
|
5258
5297
|
}
|
|
5259
5298
|
function Tn(i) {
|
|
5260
5299
|
return i;
|
|
5261
5300
|
}
|
|
5262
|
-
function
|
|
5301
|
+
function ds(i) {
|
|
5263
5302
|
return i[1] != null;
|
|
5264
5303
|
}
|
|
5265
|
-
function
|
|
5304
|
+
function us(i) {
|
|
5266
5305
|
let t = null;
|
|
5267
5306
|
return () => t ?? (t = i().catch((e) => (t = null, Promise.reject(e))));
|
|
5268
5307
|
}
|
|
5269
|
-
var
|
|
5270
|
-
const
|
|
5271
|
-
function
|
|
5272
|
-
return ce.putIfAbsent(
|
|
5308
|
+
var ps = { VITE_APP_DEV_KEY_BAIDU: "", VITE_APP_DEV_KEY_GOOGLE: "", VITE_APP_DEV_KEY_HERE: "", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
5309
|
+
const gs = {};
|
|
5310
|
+
function ms(i) {
|
|
5311
|
+
return ce.putIfAbsent(gs, i, () => us(() => fs({ type: i, config: Yr()[i] })))();
|
|
5273
5312
|
}
|
|
5274
|
-
function
|
|
5275
|
-
const e = window, r =
|
|
5313
|
+
function fs({ type: i, config: t }) {
|
|
5314
|
+
const e = window, r = vs(i);
|
|
5276
5315
|
if (ce.get(e, r))
|
|
5277
5316
|
return Promise.resolve();
|
|
5278
5317
|
switch (i !== X.here && !t.key && I(`请先配置${i}地图的key`), i) {
|
|
5279
5318
|
case X.google:
|
|
5280
|
-
return
|
|
5319
|
+
return ps.VITE_FALSE ? (_i({
|
|
5281
5320
|
key: t.key,
|
|
5282
5321
|
v: "3.52"
|
|
5283
5322
|
// v: config.version,
|
|
5284
|
-
}), google.maps.importLibrary("core")) :
|
|
5323
|
+
}), google.maps.importLibrary("core")) : fr(`https://maps.googleapis.com/maps/api/js?key=${t.key}&language=${t.language}&v=${t.version}&libraries=${t.libraries.join(",")}`);
|
|
5285
5324
|
case X.baidu:
|
|
5286
|
-
return
|
|
5325
|
+
return fr(`https://api.map.baidu.com/api?v=${t.version}&ak=${t.key}`);
|
|
5287
5326
|
case X.here:
|
|
5288
5327
|
return Ee(xe("core", t.version)).then(() => Promise.all([
|
|
5289
5328
|
// 其他大多数模块都可以同时载入
|
|
@@ -5299,7 +5338,7 @@ function ms({ type: i, config: t }) {
|
|
|
5299
5338
|
function xe(i, t = it[0]) {
|
|
5300
5339
|
return `https://js.api.here.com/v3/${t}/mapsjs-${i}.js`;
|
|
5301
5340
|
}
|
|
5302
|
-
function
|
|
5341
|
+
function vs(i) {
|
|
5303
5342
|
switch (i) {
|
|
5304
5343
|
case X.google:
|
|
5305
5344
|
return "google.maps";
|
|
@@ -5309,10 +5348,10 @@ function fs(i) {
|
|
|
5309
5348
|
return "H";
|
|
5310
5349
|
}
|
|
5311
5350
|
}
|
|
5312
|
-
let
|
|
5313
|
-
function
|
|
5351
|
+
let ys = 0;
|
|
5352
|
+
function fr(i, t = "callback") {
|
|
5314
5353
|
return new Promise((e, r) => {
|
|
5315
|
-
const s = `__callback${
|
|
5354
|
+
const s = `__callback${ys++}`;
|
|
5316
5355
|
window[s] = e;
|
|
5317
5356
|
const n = document.createElement("script");
|
|
5318
5357
|
n.src = `${i}&${t}=${s}`, n.onerror = r, document.body.appendChild(n);
|
|
@@ -5331,7 +5370,7 @@ function Y(i, t) {
|
|
|
5331
5370
|
validator: (e) => Object.values(i).includes(e)
|
|
5332
5371
|
};
|
|
5333
5372
|
}
|
|
5334
|
-
function
|
|
5373
|
+
function _s(i, t) {
|
|
5335
5374
|
return {
|
|
5336
5375
|
type: String,
|
|
5337
5376
|
default: t,
|
|
@@ -5350,7 +5389,7 @@ function b(i, t) {
|
|
|
5350
5389
|
default: t
|
|
5351
5390
|
};
|
|
5352
5391
|
}
|
|
5353
|
-
function
|
|
5392
|
+
function On(i) {
|
|
5354
5393
|
const t = {};
|
|
5355
5394
|
return Object.entries(i).forEach(([e, r]) => {
|
|
5356
5395
|
const s = `__${e}`;
|
|
@@ -5367,21 +5406,21 @@ function Mn(i) {
|
|
|
5367
5406
|
};
|
|
5368
5407
|
}), t;
|
|
5369
5408
|
}
|
|
5370
|
-
const
|
|
5409
|
+
const Le = {
|
|
5371
5410
|
enumerable: !0,
|
|
5372
5411
|
configurable: !0,
|
|
5373
5412
|
get: z,
|
|
5374
5413
|
set: z
|
|
5375
5414
|
};
|
|
5376
|
-
function
|
|
5415
|
+
function bs(i) {
|
|
5377
5416
|
return Object.keys(i).forEach((t) => {
|
|
5378
5417
|
const e = i[t];
|
|
5379
5418
|
let r = !1;
|
|
5380
|
-
typeof e == "function" ? (
|
|
5419
|
+
typeof e == "function" ? (Le.get = e, Le.set = z, r = !0) : typeof e == "object" && typeof e.get == "function" && (Le.get = e.get, Le.set = e.set, r = !0), r && (i[t] = Object.defineProperty(i, t, Le));
|
|
5381
5420
|
}), i;
|
|
5382
5421
|
}
|
|
5383
5422
|
function Cn(i) {
|
|
5384
|
-
return
|
|
5423
|
+
return bs(i);
|
|
5385
5424
|
}
|
|
5386
5425
|
function ut() {
|
|
5387
5426
|
return _t();
|
|
@@ -5392,12 +5431,12 @@ function Ue(i, t) {
|
|
|
5392
5431
|
for (const r of e)
|
|
5393
5432
|
r.call(i);
|
|
5394
5433
|
}
|
|
5395
|
-
function
|
|
5434
|
+
function wn(i, t) {
|
|
5396
5435
|
for (const e of i)
|
|
5397
5436
|
if (e.$options.name === t.name)
|
|
5398
5437
|
return e;
|
|
5399
5438
|
}
|
|
5400
|
-
function
|
|
5439
|
+
function xn(i, t) {
|
|
5401
5440
|
if (!i.default)
|
|
5402
5441
|
return;
|
|
5403
5442
|
const e = i.default();
|
|
@@ -5405,12 +5444,12 @@ function wn(i, t) {
|
|
|
5405
5444
|
if ((r == null ? void 0 : r.type).name === t.name)
|
|
5406
5445
|
return r;
|
|
5407
5446
|
}
|
|
5408
|
-
function
|
|
5447
|
+
function Ms(i, t) {
|
|
5409
5448
|
const e = {}, r = {}, s = {};
|
|
5410
5449
|
return Object.keys(i).forEach((n) => {
|
|
5411
|
-
n.startsWith("on") ? e[
|
|
5450
|
+
n.startsWith("on") ? e[Me.pascal2kebab(n.substring(2))] = i[n] : r[n] = i[n];
|
|
5412
5451
|
}), t && Object.keys(t).forEach((n) => {
|
|
5413
|
-
n.startsWith("on") && (s[
|
|
5452
|
+
n.startsWith("on") && (s[Me.pascal2kebab(n.substring(2))] = t[n]);
|
|
5414
5453
|
}), {
|
|
5415
5454
|
/** class/style/未声明的属性 等 */
|
|
5416
5455
|
binds: r,
|
|
@@ -5421,12 +5460,12 @@ function bs(i, t) {
|
|
|
5421
5460
|
};
|
|
5422
5461
|
}
|
|
5423
5462
|
function ne(i, t) {
|
|
5424
|
-
return
|
|
5463
|
+
return _r(() => Ms(i, t));
|
|
5425
5464
|
}
|
|
5426
5465
|
function A() {
|
|
5427
5466
|
return Function;
|
|
5428
5467
|
}
|
|
5429
|
-
const
|
|
5468
|
+
const En = () => {
|
|
5430
5469
|
let i, t;
|
|
5431
5470
|
function e(s) {
|
|
5432
5471
|
console.log(s), i = s && s.type, t = Date.now();
|
|
@@ -5435,8 +5474,8 @@ const xn = () => {
|
|
|
5435
5474
|
((s && s.type) !== i || Date.now() - (t ?? 0) > 1e3) && e(s);
|
|
5436
5475
|
}
|
|
5437
5476
|
return { eventLog: e, eventLogLess: r };
|
|
5438
|
-
},
|
|
5439
|
-
inject: [
|
|
5477
|
+
}, or = "$map", Ze = "onCreate", We = "onDestroy", N = P({
|
|
5478
|
+
inject: [or],
|
|
5440
5479
|
mounted() {
|
|
5441
5480
|
Ue(this, Ze);
|
|
5442
5481
|
},
|
|
@@ -5451,11 +5490,11 @@ const xn = () => {
|
|
|
5451
5490
|
render() {
|
|
5452
5491
|
return ut();
|
|
5453
5492
|
}
|
|
5454
|
-
}), Ts =
|
|
5493
|
+
}), Ts = P({
|
|
5455
5494
|
name: "tg-map",
|
|
5456
5495
|
provide() {
|
|
5457
5496
|
return {
|
|
5458
|
-
[
|
|
5497
|
+
[or]: _r(() => this.map)
|
|
5459
5498
|
};
|
|
5460
5499
|
},
|
|
5461
5500
|
inheritAttrs: !1,
|
|
@@ -5470,7 +5509,7 @@ const xn = () => {
|
|
|
5470
5509
|
* - :last-center.sync="center": 获取tg-map销毁时的最后的center的值, 使用这种方式可以做到type切换时保留中心点位置
|
|
5471
5510
|
* @see AbstractMapEventMap.center-changed
|
|
5472
5511
|
* */
|
|
5473
|
-
center: Z(
|
|
5512
|
+
center: Z(O),
|
|
5474
5513
|
/**
|
|
5475
5514
|
* 同步center的延时
|
|
5476
5515
|
* @default 300
|
|
@@ -5481,23 +5520,23 @@ const xn = () => {
|
|
|
5481
5520
|
* 仅用来获取center的值, 需要设置center的值请使用`center`属性
|
|
5482
5521
|
* @see center
|
|
5483
5522
|
* */
|
|
5484
|
-
currentCenter: b(
|
|
5523
|
+
currentCenter: b(O),
|
|
5485
5524
|
/**
|
|
5486
5525
|
* 仅用于获取tg-map销毁时的最后的center的值
|
|
5487
5526
|
* @see center
|
|
5488
5527
|
*/
|
|
5489
|
-
lastCenter: b(
|
|
5528
|
+
lastCenter: b(O),
|
|
5490
5529
|
zoom: Z(Number),
|
|
5491
5530
|
/**
|
|
5492
5531
|
* 该属性不会响应式更新, 要让它立即生效, 请参考{@link file://./../views/map/InfoDemo.vue#L3}
|
|
5493
5532
|
* @see MapOptions.infoWindowMode
|
|
5494
5533
|
*/
|
|
5495
|
-
infoWindowMode:
|
|
5534
|
+
infoWindowMode: _s(es),
|
|
5496
5535
|
gestureHandling: Y(re),
|
|
5497
5536
|
minZoom: b(Number),
|
|
5498
5537
|
maxZoom: b(Number),
|
|
5499
5538
|
mapStyle: b(Object),
|
|
5500
|
-
mapTypeId: Y(
|
|
5539
|
+
mapTypeId: Y(xr),
|
|
5501
5540
|
/** 地图类型对象, 优先级比mapTypeId高 */
|
|
5502
5541
|
mapType: b(Object),
|
|
5503
5542
|
hideLogo: b(Boolean),
|
|
@@ -5558,7 +5597,7 @@ const xn = () => {
|
|
|
5558
5597
|
async mounted() {
|
|
5559
5598
|
const i = this.type;
|
|
5560
5599
|
try {
|
|
5561
|
-
await
|
|
5600
|
+
await ms(i);
|
|
5562
5601
|
} catch (s) {
|
|
5563
5602
|
this.$emit("error", s);
|
|
5564
5603
|
return;
|
|
@@ -5567,7 +5606,7 @@ const xn = () => {
|
|
|
5567
5606
|
console.warn(`tg-map(type=${i})已销毁, 不需要继续执行`);
|
|
5568
5607
|
return;
|
|
5569
5608
|
}
|
|
5570
|
-
const t =
|
|
5609
|
+
const t = Et.createMap(
|
|
5571
5610
|
i,
|
|
5572
5611
|
this.$refs.map,
|
|
5573
5612
|
/* options: */
|
|
@@ -5582,7 +5621,7 @@ const xn = () => {
|
|
|
5582
5621
|
buildInMapTypeId: this.mapTypeId
|
|
5583
5622
|
}
|
|
5584
5623
|
);
|
|
5585
|
-
if (this.map =
|
|
5624
|
+
if (this.map = ei(t), this.mapType && t.setMapType(this.mapType), "ready" in this.attrs.listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"), se(
|
|
5586
5625
|
this.attrs.listeners,
|
|
5587
5626
|
t,
|
|
5588
5627
|
/* excludes: */
|
|
@@ -5620,9 +5659,9 @@ const xn = () => {
|
|
|
5620
5659
|
e[r] = s;
|
|
5621
5660
|
return e;
|
|
5622
5661
|
};
|
|
5623
|
-
function
|
|
5662
|
+
function Os(i, t, e, r, s, n) {
|
|
5624
5663
|
return de(), ue("div", He({ class: "tg-map" }, i.attrs.binds), [
|
|
5625
|
-
|
|
5664
|
+
ti("div", {
|
|
5626
5665
|
ref: "map",
|
|
5627
5666
|
class: nt({
|
|
5628
5667
|
"tg-map__map": !0,
|
|
@@ -5634,7 +5673,7 @@ function Ms(i, t, e, r, s, n) {
|
|
|
5634
5673
|
J(i.$slots, "overlay")
|
|
5635
5674
|
], 16);
|
|
5636
5675
|
}
|
|
5637
|
-
const Ve = /* @__PURE__ */ oe(Ts, [["render",
|
|
5676
|
+
const Ve = /* @__PURE__ */ oe(Ts, [["render", Os]]);
|
|
5638
5677
|
function Cs(i) {
|
|
5639
5678
|
if (i == null)
|
|
5640
5679
|
return;
|
|
@@ -5646,7 +5685,7 @@ function Cs(i) {
|
|
|
5646
5685
|
t = i;
|
|
5647
5686
|
return `${t}px`;
|
|
5648
5687
|
}
|
|
5649
|
-
const
|
|
5688
|
+
const ws = P({
|
|
5650
5689
|
name: "tg-map-widget",
|
|
5651
5690
|
props: {
|
|
5652
5691
|
left: {
|
|
@@ -5675,23 +5714,23 @@ const Os = L({
|
|
|
5675
5714
|
dimen: Cs
|
|
5676
5715
|
}
|
|
5677
5716
|
});
|
|
5678
|
-
function
|
|
5717
|
+
function xs(i, t, e, r, s, n) {
|
|
5679
5718
|
return de(), ue("div", {
|
|
5680
5719
|
class: nt(i.$options.name),
|
|
5681
|
-
style:
|
|
5720
|
+
style: ri({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
|
|
5682
5721
|
}, [
|
|
5683
5722
|
J(i.$slots, "default")
|
|
5684
5723
|
], 6);
|
|
5685
5724
|
}
|
|
5686
|
-
const
|
|
5725
|
+
const Es = /* @__PURE__ */ oe(ws, [["render", xs]]), Ls = P({
|
|
5687
5726
|
name: "tg-custom-control",
|
|
5688
|
-
mixins: [
|
|
5727
|
+
mixins: [N],
|
|
5689
5728
|
props: {
|
|
5690
5729
|
position: Y(D, D.RIGHT_BOTTOM)
|
|
5691
5730
|
},
|
|
5692
5731
|
setup() {
|
|
5693
5732
|
return {
|
|
5694
|
-
control:
|
|
5733
|
+
control: L()
|
|
5695
5734
|
};
|
|
5696
5735
|
},
|
|
5697
5736
|
watch: {
|
|
@@ -5700,8 +5739,8 @@ const xs = /* @__PURE__ */ oe(Os, [["render", ws]]), Es = L({
|
|
|
5700
5739
|
}
|
|
5701
5740
|
},
|
|
5702
5741
|
onCreate() {
|
|
5703
|
-
|
|
5704
|
-
const { $el: i } = this, t = class extends
|
|
5742
|
+
Mr(this.$parent, Ve) || console.warn("请将tg-custom-control放到tg-map中");
|
|
5743
|
+
const { $el: i } = this, t = class extends fi {
|
|
5705
5744
|
onCreateElement() {
|
|
5706
5745
|
return i;
|
|
5707
5746
|
}
|
|
@@ -5719,17 +5758,17 @@ function Ps(i, t, e, r, s, n) {
|
|
|
5719
5758
|
J(i.$slots, "default")
|
|
5720
5759
|
], 2);
|
|
5721
5760
|
}
|
|
5722
|
-
const
|
|
5761
|
+
const Bs = /* @__PURE__ */ oe(Ls, [["render", Ps]]), Is = P({
|
|
5723
5762
|
name: "tg-map-type-control",
|
|
5724
|
-
mixins: [
|
|
5763
|
+
mixins: [N],
|
|
5725
5764
|
props: {
|
|
5726
5765
|
position: Y(D, D.TOP_LEFT),
|
|
5727
|
-
type: Y(
|
|
5766
|
+
type: Y(Er),
|
|
5728
5767
|
mapTypes: b(Array)
|
|
5729
5768
|
},
|
|
5730
5769
|
setup() {
|
|
5731
5770
|
return {
|
|
5732
|
-
control:
|
|
5771
|
+
control: L()
|
|
5733
5772
|
};
|
|
5734
5773
|
},
|
|
5735
5774
|
watch: {
|
|
@@ -5752,15 +5791,15 @@ const Ls = /* @__PURE__ */ oe(Es, [["render", Ps]]), Bs = L({
|
|
|
5752
5791
|
onDestroy() {
|
|
5753
5792
|
this.$map.removeControl(this.control);
|
|
5754
5793
|
}
|
|
5755
|
-
}),
|
|
5794
|
+
}), Ss = P({
|
|
5756
5795
|
name: "tg-scale-control",
|
|
5757
|
-
mixins: [
|
|
5796
|
+
mixins: [N],
|
|
5758
5797
|
props: {
|
|
5759
5798
|
position: Y(D, D.BOTTOM_RIGHT)
|
|
5760
5799
|
},
|
|
5761
5800
|
setup() {
|
|
5762
5801
|
return {
|
|
5763
|
-
control:
|
|
5802
|
+
control: L()
|
|
5764
5803
|
};
|
|
5765
5804
|
},
|
|
5766
5805
|
watch: {
|
|
@@ -5775,20 +5814,20 @@ const Ls = /* @__PURE__ */ oe(Es, [["render", Ps]]), Bs = L({
|
|
|
5775
5814
|
this.$map.removeControl(this.control);
|
|
5776
5815
|
}
|
|
5777
5816
|
});
|
|
5778
|
-
function
|
|
5817
|
+
function qr() {
|
|
5779
5818
|
var e;
|
|
5780
|
-
const i = (e =
|
|
5819
|
+
const i = (e = ii()) == null ? void 0 : e.type;
|
|
5781
5820
|
let t = (i == null ? void 0 : i.name) ?? (i == null ? void 0 : i.__name);
|
|
5782
5821
|
if (!t) {
|
|
5783
5822
|
const r = i == null ? void 0 : i.__file;
|
|
5784
|
-
r && (t =
|
|
5823
|
+
r && (t = Qr.basename(r, ".vue"));
|
|
5785
5824
|
}
|
|
5786
5825
|
return t;
|
|
5787
5826
|
}
|
|
5788
|
-
function
|
|
5789
|
-
const i =
|
|
5827
|
+
function ar() {
|
|
5828
|
+
const i = si(or);
|
|
5790
5829
|
let t, e;
|
|
5791
|
-
return i == null && I(`<${
|
|
5830
|
+
return i == null && I(`<${qr() || "unknown"}>必须作为<tg-map>的子代组件`), {
|
|
5792
5831
|
mapRef: i,
|
|
5793
5832
|
/** 读取map对象, 只要放在<tg-map>里面的组件(除#overlay插槽外)都能够立即读取到map对象 */
|
|
5794
5833
|
get map() {
|
|
@@ -5796,11 +5835,11 @@ function or() {
|
|
|
5796
5835
|
},
|
|
5797
5836
|
/** 地图元素创建回调 */
|
|
5798
5837
|
[Ze](r) {
|
|
5799
|
-
|
|
5838
|
+
ni(r), t && I(`${Ze}只能调用一次`), t = r;
|
|
5800
5839
|
},
|
|
5801
5840
|
/** 地图元素销毁回调 */
|
|
5802
5841
|
[We](r) {
|
|
5803
|
-
|
|
5842
|
+
oi(r), e && I(`${We}只能调用一次`), e = r;
|
|
5804
5843
|
},
|
|
5805
5844
|
/** 重新创建地图元素 */
|
|
5806
5845
|
recreate() {
|
|
@@ -5808,14 +5847,14 @@ function or() {
|
|
|
5808
5847
|
}
|
|
5809
5848
|
};
|
|
5810
5849
|
}
|
|
5811
|
-
const
|
|
5850
|
+
const ks = P({
|
|
5812
5851
|
name: "tg-street-view-control",
|
|
5813
5852
|
props: {
|
|
5814
5853
|
position: Y(D, D.RIGHT_BOTTOM)
|
|
5815
5854
|
},
|
|
5816
5855
|
setup(i) {
|
|
5817
|
-
let t =
|
|
5818
|
-
const { map: e, onCreate: r, onDestroy: s } =
|
|
5856
|
+
let t = L();
|
|
5857
|
+
const { map: e, onCreate: r, onDestroy: s } = ar();
|
|
5819
5858
|
return r(() => {
|
|
5820
5859
|
t = e.createStreetViewControl(i), e.addControl(t);
|
|
5821
5860
|
}), s(() => {
|
|
@@ -5824,14 +5863,14 @@ const Ss = L({
|
|
|
5824
5863
|
t.setPosition(n);
|
|
5825
5864
|
}), ut;
|
|
5826
5865
|
}
|
|
5827
|
-
}),
|
|
5866
|
+
}), As = P({
|
|
5828
5867
|
name: "tg-zoom-control",
|
|
5829
5868
|
props: {
|
|
5830
5869
|
position: Y(D, D.RIGHT_BOTTOM)
|
|
5831
5870
|
},
|
|
5832
5871
|
setup(i) {
|
|
5833
|
-
let t =
|
|
5834
|
-
const { map: e, onCreate: r, onDestroy: s } =
|
|
5872
|
+
let t = L();
|
|
5873
|
+
const { map: e, onCreate: r, onDestroy: s } = ar();
|
|
5835
5874
|
return r(() => {
|
|
5836
5875
|
t = e.createZoomControl(i), e.addControl(t);
|
|
5837
5876
|
}), s(() => {
|
|
@@ -5840,7 +5879,7 @@ const Ss = L({
|
|
|
5840
5879
|
t.setPosition(n);
|
|
5841
5880
|
}), ut;
|
|
5842
5881
|
}
|
|
5843
|
-
}),
|
|
5882
|
+
}), Ds = P({
|
|
5844
5883
|
name: "tg-heatmap",
|
|
5845
5884
|
props: {
|
|
5846
5885
|
maxIntensity: b(Number),
|
|
@@ -5850,8 +5889,8 @@ const Ss = L({
|
|
|
5850
5889
|
data: Z(Array)
|
|
5851
5890
|
},
|
|
5852
5891
|
setup(i) {
|
|
5853
|
-
const { map: t, onCreate: e, onDestroy: r } =
|
|
5854
|
-
let s =
|
|
5892
|
+
const { map: t, onCreate: e, onDestroy: r } = ar();
|
|
5893
|
+
let s = L();
|
|
5855
5894
|
return e(() => {
|
|
5856
5895
|
s = t.createHeatmap(i);
|
|
5857
5896
|
}), r(() => {
|
|
@@ -5861,9 +5900,9 @@ const Ss = L({
|
|
|
5861
5900
|
() => s.setOptions(i)
|
|
5862
5901
|
), ut;
|
|
5863
5902
|
}
|
|
5864
|
-
}),
|
|
5903
|
+
}), Rs = P({
|
|
5865
5904
|
name: "tg-marker-clusterer",
|
|
5866
|
-
mixins: [
|
|
5905
|
+
mixins: [N],
|
|
5867
5906
|
// markers从this.$children中读取, 故需要省略(Omit)
|
|
5868
5907
|
props: {
|
|
5869
5908
|
gridSize: b(Number),
|
|
@@ -5876,7 +5915,7 @@ const Ss = L({
|
|
|
5876
5915
|
},
|
|
5877
5916
|
setup() {
|
|
5878
5917
|
return {
|
|
5879
|
-
clusterer:
|
|
5918
|
+
clusterer: L(),
|
|
5880
5919
|
markers: Ye([])
|
|
5881
5920
|
};
|
|
5882
5921
|
},
|
|
@@ -5921,41 +5960,41 @@ const Ss = L({
|
|
|
5921
5960
|
this.markers.push(i), this.isInitiated() && this.clusterer.addMarker(i);
|
|
5922
5961
|
},
|
|
5923
5962
|
onRemoveMarker(i) {
|
|
5924
|
-
this.isInitiated() && this.clusterer.removeMarker(i),
|
|
5963
|
+
this.isInitiated() && this.clusterer.removeMarker(i), yr.remove(this.markers, i);
|
|
5925
5964
|
}
|
|
5926
5965
|
}
|
|
5927
5966
|
});
|
|
5928
|
-
function
|
|
5967
|
+
function $s(i, t, e, r, s, n) {
|
|
5929
5968
|
return de(), ue("div", {
|
|
5930
5969
|
class: nt(i.$options.name)
|
|
5931
5970
|
}, [
|
|
5932
5971
|
J(i.$slots, "default")
|
|
5933
5972
|
], 2);
|
|
5934
5973
|
}
|
|
5935
|
-
const
|
|
5974
|
+
const Kr = /* @__PURE__ */ oe(Rs, [["render", $s]]), zs = P({
|
|
5936
5975
|
name: "tg-traffic-layer",
|
|
5937
|
-
mixins: [
|
|
5976
|
+
mixins: [N],
|
|
5938
5977
|
// 请直接使用v-if来控制它的显隐
|
|
5939
5978
|
// 没有属性时, 写`{}`类型推断会有问题, 故注释掉
|
|
5940
5979
|
// props: {} satisfies Props<{}>,
|
|
5941
5980
|
setup() {
|
|
5942
5981
|
return {
|
|
5943
|
-
layer:
|
|
5982
|
+
layer: L()
|
|
5944
5983
|
};
|
|
5945
5984
|
},
|
|
5946
5985
|
watch: {},
|
|
5947
5986
|
onCreate() {
|
|
5948
|
-
this.layer = new
|
|
5987
|
+
this.layer = new yi(), this.$map.addLayer(this.layer);
|
|
5949
5988
|
},
|
|
5950
5989
|
onDestroy() {
|
|
5951
5990
|
this.$map.removeLayer(this.layer);
|
|
5952
5991
|
}
|
|
5953
|
-
}),
|
|
5992
|
+
}), Ns = P({
|
|
5954
5993
|
name: "tg-circle",
|
|
5955
|
-
mixins: [
|
|
5994
|
+
mixins: [N],
|
|
5956
5995
|
inheritAttrs: !1,
|
|
5957
5996
|
props: {
|
|
5958
|
-
center: Z(
|
|
5997
|
+
center: Z(O),
|
|
5959
5998
|
radius: Z(Number),
|
|
5960
5999
|
clickable: b(Boolean),
|
|
5961
6000
|
editable: b(Boolean),
|
|
@@ -5972,7 +6011,7 @@ const qr = /* @__PURE__ */ oe(Ds, [["render", Rs]]), $s = L({
|
|
|
5972
6011
|
setup(i, { attrs: t }) {
|
|
5973
6012
|
return {
|
|
5974
6013
|
attrs: ne(t, i),
|
|
5975
|
-
overlay:
|
|
6014
|
+
overlay: L(),
|
|
5976
6015
|
emittedRadius: void 0,
|
|
5977
6016
|
emittedCenter: void 0
|
|
5978
6017
|
};
|
|
@@ -6030,7 +6069,7 @@ const qr = /* @__PURE__ */ oe(Ds, [["render", Rs]]), $s = L({
|
|
|
6030
6069
|
this.$map.removeOverlay(this.overlay);
|
|
6031
6070
|
}
|
|
6032
6071
|
});
|
|
6033
|
-
class Gs extends
|
|
6072
|
+
class Gs extends is {
|
|
6034
6073
|
constructor(t, e, r, s) {
|
|
6035
6074
|
super(t, e), this.content = r, this.position = s;
|
|
6036
6075
|
}
|
|
@@ -6045,16 +6084,16 @@ class Gs extends rs {
|
|
|
6045
6084
|
this.position = t, this.draw();
|
|
6046
6085
|
}
|
|
6047
6086
|
}
|
|
6048
|
-
const
|
|
6087
|
+
const Zs = P({
|
|
6049
6088
|
name: "tg-element-overlay",
|
|
6050
|
-
mixins: [
|
|
6089
|
+
mixins: [N],
|
|
6051
6090
|
props: {
|
|
6052
6091
|
mapPane: Y(ze, ze.overlayMouseTarget),
|
|
6053
|
-
position: Z(
|
|
6092
|
+
position: Z(O)
|
|
6054
6093
|
},
|
|
6055
6094
|
setup() {
|
|
6056
6095
|
return {
|
|
6057
|
-
overlay:
|
|
6096
|
+
overlay: L()
|
|
6058
6097
|
};
|
|
6059
6098
|
},
|
|
6060
6099
|
watch: {
|
|
@@ -6077,20 +6116,21 @@ const Ns = L({
|
|
|
6077
6116
|
this.$map.removeElementOverlay(this.overlay);
|
|
6078
6117
|
}
|
|
6079
6118
|
});
|
|
6080
|
-
function
|
|
6119
|
+
function Ws(i, t, e, r, s, n) {
|
|
6081
6120
|
return de(), ue("div", He({
|
|
6082
6121
|
class: i.$options.name
|
|
6083
6122
|
}, i.$attrs), [
|
|
6084
6123
|
J(i.$slots, "default")
|
|
6085
6124
|
], 16);
|
|
6086
6125
|
}
|
|
6087
|
-
const
|
|
6126
|
+
const Hs = /* @__PURE__ */ oe(Zs, [["render", Ws]]), Vs = P({
|
|
6088
6127
|
name: "tg-marker",
|
|
6089
|
-
mixins: [
|
|
6128
|
+
mixins: [N],
|
|
6090
6129
|
inheritAttrs: !1,
|
|
6091
6130
|
props: {
|
|
6092
|
-
position: Z(
|
|
6131
|
+
position: Z(O),
|
|
6093
6132
|
title: b(String),
|
|
6133
|
+
label: b(Object),
|
|
6094
6134
|
icon: b(Object),
|
|
6095
6135
|
clickable: b(Boolean),
|
|
6096
6136
|
draggable: b(Boolean),
|
|
@@ -6110,8 +6150,8 @@ const Ws = /* @__PURE__ */ oe(Ns, [["render", Zs]]), Hs = L({
|
|
|
6110
6150
|
setup(i, { attrs: t }) {
|
|
6111
6151
|
return {
|
|
6112
6152
|
attrs: ne(t, i),
|
|
6113
|
-
marker:
|
|
6114
|
-
|
|
6153
|
+
marker: L(),
|
|
6154
|
+
labelOverlay: Ye(),
|
|
6115
6155
|
info: Ye(),
|
|
6116
6156
|
emittedPosition: void 0,
|
|
6117
6157
|
autoAddToClustererWhenCreate: i.autoAddToClusterer
|
|
@@ -6129,11 +6169,14 @@ const Ws = /* @__PURE__ */ oe(Ns, [["render", Zs]]), Hs = L({
|
|
|
6129
6169
|
title(i) {
|
|
6130
6170
|
this.marker.setTitle(i);
|
|
6131
6171
|
},
|
|
6172
|
+
label(i) {
|
|
6173
|
+
i ? this.marker.setLabel(i) : this.recreate();
|
|
6174
|
+
},
|
|
6132
6175
|
icon(i) {
|
|
6133
6176
|
i ? this.marker.setIcon(i) : this.recreate();
|
|
6134
6177
|
},
|
|
6135
6178
|
clickable(i) {
|
|
6136
|
-
this.marker instanceof
|
|
6179
|
+
this.marker instanceof Ge ? this.recreate() : this.marker.setClickable(i);
|
|
6137
6180
|
},
|
|
6138
6181
|
draggable(i) {
|
|
6139
6182
|
this.marker.setDraggable(i);
|
|
@@ -6145,7 +6188,7 @@ const Ws = /* @__PURE__ */ oe(Ns, [["render", Zs]]), Hs = L({
|
|
|
6145
6188
|
this.recreate();
|
|
6146
6189
|
},
|
|
6147
6190
|
zIndex(i) {
|
|
6148
|
-
this.marker instanceof
|
|
6191
|
+
this.marker instanceof Ge ? this.recreate() : this.marker.setZIndex(i);
|
|
6149
6192
|
},
|
|
6150
6193
|
visible(i) {
|
|
6151
6194
|
this.marker.setVisible(i);
|
|
@@ -6158,7 +6201,7 @@ const Ws = /* @__PURE__ */ oe(Ns, [["render", Zs]]), Hs = L({
|
|
|
6158
6201
|
}
|
|
6159
6202
|
},
|
|
6160
6203
|
onCreate() {
|
|
6161
|
-
this.marker = this.$map.createMarker(this), this.
|
|
6204
|
+
this.marker = this.$map.createMarker(this), this.labelOverlay && this.marker.attachLabelOverlay(this.labelOverlay.overlay), this.$clusterer() && this.autoAddToClusterer ? this.$clusterer().onAddMarker(this.marker) : this.$map.addOverlay(this.marker), this.autoAddToClustererWhenCreate = this.autoAddToClusterer, this.info && this.info.show && this.info.overlay.open(this.marker), se(this.attrs.listeners, this.marker), this.attrs.listenerProps["update:position"] && this.marker.addEventListener("dragend", (i) => {
|
|
6162
6205
|
this.$emit("update:position", this.emittedPosition = i.position);
|
|
6163
6206
|
});
|
|
6164
6207
|
},
|
|
@@ -6167,13 +6210,13 @@ const Ws = /* @__PURE__ */ oe(Ns, [["render", Zs]]), Hs = L({
|
|
|
6167
6210
|
},
|
|
6168
6211
|
methods: {
|
|
6169
6212
|
$clusterer() {
|
|
6170
|
-
return
|
|
6213
|
+
return Mr(this.$parent, Kr);
|
|
6171
6214
|
},
|
|
6172
6215
|
onAddLabel(i) {
|
|
6173
|
-
this.
|
|
6216
|
+
this.labelOverlay = i, this.marker && this.marker.attachLabelOverlay(i.overlay);
|
|
6174
6217
|
},
|
|
6175
6218
|
onRemoveLabel(i) {
|
|
6176
|
-
this.marker.
|
|
6219
|
+
this.marker.attachLabelOverlay(void 0), this.labelOverlay = void 0;
|
|
6177
6220
|
},
|
|
6178
6221
|
onAddInfo(i) {
|
|
6179
6222
|
this.info = i, this.marker && i.show && i.overlay.open(this.marker);
|
|
@@ -6186,16 +6229,16 @@ const Ws = /* @__PURE__ */ oe(Ns, [["render", Zs]]), Hs = L({
|
|
|
6186
6229
|
}
|
|
6187
6230
|
}
|
|
6188
6231
|
});
|
|
6189
|
-
function
|
|
6232
|
+
function js(i, t, e, r, s, n) {
|
|
6190
6233
|
return J(i.$slots, "default");
|
|
6191
6234
|
}
|
|
6192
|
-
const pt = /* @__PURE__ */ oe(
|
|
6235
|
+
const pt = /* @__PURE__ */ oe(Vs, [["render", js]]), Fs = P({
|
|
6193
6236
|
name: "tg-info-box",
|
|
6194
|
-
mixins: [
|
|
6237
|
+
mixins: [N],
|
|
6195
6238
|
inheritAttrs: !1,
|
|
6196
6239
|
props: {
|
|
6197
6240
|
show: Z(Boolean),
|
|
6198
|
-
position: b(
|
|
6241
|
+
position: b(O),
|
|
6199
6242
|
offset: b(Object),
|
|
6200
6243
|
maxWidth: b(Number),
|
|
6201
6244
|
borderClass: b(String),
|
|
@@ -6206,7 +6249,7 @@ const pt = /* @__PURE__ */ oe(Hs, [["render", Vs]]), js = L({
|
|
|
6206
6249
|
setup(i, { attrs: t }) {
|
|
6207
6250
|
return {
|
|
6208
6251
|
attrs: ne(t, i),
|
|
6209
|
-
overlay:
|
|
6252
|
+
overlay: L()
|
|
6210
6253
|
};
|
|
6211
6254
|
},
|
|
6212
6255
|
watch: {
|
|
@@ -6252,7 +6295,7 @@ const pt = /* @__PURE__ */ oe(Hs, [["render", Vs]]), js = L({
|
|
|
6252
6295
|
return this.$el;
|
|
6253
6296
|
},
|
|
6254
6297
|
$marker() {
|
|
6255
|
-
return
|
|
6298
|
+
return Bt(pt, this.$parent, Ve);
|
|
6256
6299
|
},
|
|
6257
6300
|
open(i) {
|
|
6258
6301
|
this.overlay.open(i);
|
|
@@ -6262,20 +6305,20 @@ const pt = /* @__PURE__ */ oe(Hs, [["render", Vs]]), js = L({
|
|
|
6262
6305
|
}
|
|
6263
6306
|
}
|
|
6264
6307
|
});
|
|
6265
|
-
function
|
|
6308
|
+
function Us(i, t, e, r, s, n) {
|
|
6266
6309
|
return de(), ue("div", He({
|
|
6267
6310
|
class: i.$options.name
|
|
6268
6311
|
}, i.attrs.binds), [
|
|
6269
6312
|
J(i.$slots, "default")
|
|
6270
6313
|
], 16);
|
|
6271
6314
|
}
|
|
6272
|
-
const
|
|
6315
|
+
const Ys = /* @__PURE__ */ oe(Fs, [["render", Us]]), qs = P({
|
|
6273
6316
|
name: "tg-info-window",
|
|
6274
|
-
mixins: [
|
|
6317
|
+
mixins: [N],
|
|
6275
6318
|
inheritAttrs: !1,
|
|
6276
6319
|
props: {
|
|
6277
6320
|
show: Z(Boolean),
|
|
6278
|
-
position: b(
|
|
6321
|
+
position: b(O),
|
|
6279
6322
|
maxWidth: b(Number),
|
|
6280
6323
|
offset: b(Object),
|
|
6281
6324
|
disableAutoPan: b(Boolean),
|
|
@@ -6285,7 +6328,7 @@ const Us = /* @__PURE__ */ oe(js, [["render", Fs]]), Ys = L({
|
|
|
6285
6328
|
setup(i, { attrs: t }) {
|
|
6286
6329
|
return {
|
|
6287
6330
|
attrs: ne(t, i),
|
|
6288
|
-
overlay:
|
|
6331
|
+
overlay: L()
|
|
6289
6332
|
};
|
|
6290
6333
|
},
|
|
6291
6334
|
watch: {
|
|
@@ -6310,7 +6353,7 @@ const Us = /* @__PURE__ */ oe(js, [["render", Fs]]), Ys = L({
|
|
|
6310
6353
|
return this.$el;
|
|
6311
6354
|
},
|
|
6312
6355
|
$marker() {
|
|
6313
|
-
return
|
|
6356
|
+
return Bt(pt, this.$parent, Ve);
|
|
6314
6357
|
},
|
|
6315
6358
|
getOptions() {
|
|
6316
6359
|
return {
|
|
@@ -6333,21 +6376,21 @@ const Us = /* @__PURE__ */ oe(js, [["render", Fs]]), Ys = L({
|
|
|
6333
6376
|
this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
|
|
6334
6377
|
}
|
|
6335
6378
|
});
|
|
6336
|
-
function
|
|
6337
|
-
return
|
|
6379
|
+
function Ks(i, t, e, r, s, n) {
|
|
6380
|
+
return ai((de(), ue("div", He({
|
|
6338
6381
|
class: i.$options.name
|
|
6339
6382
|
}, i.attrs.binds), [
|
|
6340
6383
|
J(i.$slots, "default")
|
|
6341
6384
|
], 16)), [
|
|
6342
|
-
[
|
|
6385
|
+
[li, i.show]
|
|
6343
6386
|
]);
|
|
6344
6387
|
}
|
|
6345
|
-
const
|
|
6388
|
+
const Xs = /* @__PURE__ */ oe(qs, [["render", Ks]]), Js = P({
|
|
6346
6389
|
name: "tg-label",
|
|
6347
|
-
mixins: [
|
|
6390
|
+
mixins: [N],
|
|
6348
6391
|
inheritAttrs: !1,
|
|
6349
6392
|
props: {
|
|
6350
|
-
position: b(
|
|
6393
|
+
position: b(O),
|
|
6351
6394
|
offset: b(Object),
|
|
6352
6395
|
zIndex: b(Number),
|
|
6353
6396
|
mapPane: Y(ze)
|
|
@@ -6356,7 +6399,7 @@ const Ks = /* @__PURE__ */ oe(Ys, [["render", qs]]), Xs = L({
|
|
|
6356
6399
|
setup(i, { attrs: t }) {
|
|
6357
6400
|
return {
|
|
6358
6401
|
attrs: ne(t),
|
|
6359
|
-
overlay:
|
|
6402
|
+
overlay: L()
|
|
6360
6403
|
};
|
|
6361
6404
|
},
|
|
6362
6405
|
watch: {
|
|
@@ -6385,7 +6428,7 @@ const Ks = /* @__PURE__ */ oe(Ys, [["render", qs]]), Xs = L({
|
|
|
6385
6428
|
return (i = this.$marker()) == null ? void 0 : i.marker;
|
|
6386
6429
|
},
|
|
6387
6430
|
$marker() {
|
|
6388
|
-
return
|
|
6431
|
+
return Bt(pt, this.$parent, Ve);
|
|
6389
6432
|
},
|
|
6390
6433
|
getOptions() {
|
|
6391
6434
|
return {
|
|
@@ -6404,16 +6447,16 @@ const Ks = /* @__PURE__ */ oe(Ys, [["render", qs]]), Xs = L({
|
|
|
6404
6447
|
this.$marker() ? this.$marker().onRemoveLabel(this) : this.$map.removeOverlay(this.overlay);
|
|
6405
6448
|
}
|
|
6406
6449
|
});
|
|
6407
|
-
function
|
|
6450
|
+
function Qs(i, t, e, r, s, n) {
|
|
6408
6451
|
return de(), ue("div", He({
|
|
6409
6452
|
class: i.$options.name
|
|
6410
6453
|
}, i.attrs.binds), [
|
|
6411
6454
|
J(i.$slots, "default")
|
|
6412
6455
|
], 16);
|
|
6413
6456
|
}
|
|
6414
|
-
const
|
|
6457
|
+
const en = /* @__PURE__ */ oe(Js, [["render", Qs]]), tn = P({
|
|
6415
6458
|
name: "tg-polygon",
|
|
6416
|
-
mixins: [
|
|
6459
|
+
mixins: [N],
|
|
6417
6460
|
inheritAttrs: !1,
|
|
6418
6461
|
props: {
|
|
6419
6462
|
paths: Z(Array),
|
|
@@ -6431,7 +6474,7 @@ const Qs = /* @__PURE__ */ oe(Xs, [["render", Js]]), en = L({
|
|
|
6431
6474
|
setup(i, { attrs: t }) {
|
|
6432
6475
|
return {
|
|
6433
6476
|
attrs: ne(t, i),
|
|
6434
|
-
overlay:
|
|
6477
|
+
overlay: L(),
|
|
6435
6478
|
emittedPaths: void 0
|
|
6436
6479
|
};
|
|
6437
6480
|
},
|
|
@@ -6480,9 +6523,9 @@ const Qs = /* @__PURE__ */ oe(Xs, [["render", Js]]), en = L({
|
|
|
6480
6523
|
onDestroy() {
|
|
6481
6524
|
this.$map.removeOverlay(this.overlay);
|
|
6482
6525
|
}
|
|
6483
|
-
}),
|
|
6526
|
+
}), rn = P({
|
|
6484
6527
|
name: "tg-polyline",
|
|
6485
|
-
mixins: [
|
|
6528
|
+
mixins: [N],
|
|
6486
6529
|
inheritAttrs: !1,
|
|
6487
6530
|
props: {
|
|
6488
6531
|
path: Z(Array),
|
|
@@ -6499,7 +6542,7 @@ const Qs = /* @__PURE__ */ oe(Xs, [["render", Js]]), en = L({
|
|
|
6499
6542
|
setup(i, { attrs: t }) {
|
|
6500
6543
|
return {
|
|
6501
6544
|
attrs: ne(t, i),
|
|
6502
|
-
overlay:
|
|
6545
|
+
overlay: L(),
|
|
6503
6546
|
emittedPath: void 0
|
|
6504
6547
|
};
|
|
6505
6548
|
},
|
|
@@ -6548,9 +6591,9 @@ const Qs = /* @__PURE__ */ oe(Xs, [["render", Js]]), en = L({
|
|
|
6548
6591
|
onDestroy() {
|
|
6549
6592
|
this.overlay.remove();
|
|
6550
6593
|
}
|
|
6551
|
-
}),
|
|
6594
|
+
}), sn = P({
|
|
6552
6595
|
name: "tg-rectangle",
|
|
6553
|
-
mixins: [
|
|
6596
|
+
mixins: [N],
|
|
6554
6597
|
inheritAttrs: !1,
|
|
6555
6598
|
props: {
|
|
6556
6599
|
bounds: Z(Object),
|
|
@@ -6568,7 +6611,7 @@ const Qs = /* @__PURE__ */ oe(Xs, [["render", Js]]), en = L({
|
|
|
6568
6611
|
setup(i, { attrs: t }) {
|
|
6569
6612
|
return {
|
|
6570
6613
|
attrs: ne(t, i),
|
|
6571
|
-
overlay:
|
|
6614
|
+
overlay: L(),
|
|
6572
6615
|
emittedBounds: void 0
|
|
6573
6616
|
};
|
|
6574
6617
|
},
|
|
@@ -6614,13 +6657,13 @@ const Qs = /* @__PURE__ */ oe(Xs, [["render", Js]]), en = L({
|
|
|
6614
6657
|
onDestroy() {
|
|
6615
6658
|
this.$map.removeOverlay(this.overlay);
|
|
6616
6659
|
}
|
|
6617
|
-
}),
|
|
6660
|
+
}), nn = ["beforeUpdate", "updated"], Ln = {
|
|
6618
6661
|
install(i, t = {}) {
|
|
6619
6662
|
if (t.enable !== !1) {
|
|
6620
|
-
const e =
|
|
6663
|
+
const e = P({
|
|
6621
6664
|
beforeCreate() {
|
|
6622
|
-
const r =
|
|
6623
|
-
t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) :
|
|
6665
|
+
const r = qr() ?? "", n = (t.nameRegex || /^[A-Z]/).test(r) ? (a) => {
|
|
6666
|
+
t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : nn.includes(a) || console.debug("[lifecycle]", r, a);
|
|
6624
6667
|
} : z;
|
|
6625
6668
|
n("beforeCreate"), this.__life_impl = n;
|
|
6626
6669
|
},
|
|
@@ -6660,46 +6703,46 @@ const Qs = /* @__PURE__ */ oe(Xs, [["render", Js]]), en = L({
|
|
|
6660
6703
|
i.mixin(e);
|
|
6661
6704
|
}
|
|
6662
6705
|
}
|
|
6663
|
-
},
|
|
6706
|
+
}, on = 6378137;
|
|
6664
6707
|
function Ie(i) {
|
|
6665
6708
|
return i * Math.PI / 180;
|
|
6666
6709
|
}
|
|
6667
|
-
function
|
|
6710
|
+
function vr(i) {
|
|
6668
6711
|
return i * 180 / Math.PI;
|
|
6669
6712
|
}
|
|
6670
|
-
function
|
|
6713
|
+
function an(i, t) {
|
|
6671
6714
|
if (i.lat === t.lat && i.lng === t.lng)
|
|
6672
6715
|
return 0;
|
|
6673
6716
|
const e = Ie((i.lat + t.lat) / 2), r = Ie((i.lat - t.lat) / 2), s = Ie((i.lng - t.lng) / 2);
|
|
6674
6717
|
let n = Math.sin(r), a = Math.sin(s), u = Math.sin(e);
|
|
6675
|
-
const o =
|
|
6718
|
+
const o = on, h = 1 / 298.257;
|
|
6676
6719
|
n = n * n, a = a * a, u = u * u;
|
|
6677
|
-
const c = n * (1 - a) + (1 - u) * a, p = (1 - n) * (1 - a) + u * a, g = Math.atan(Math.sqrt(c / p)), f = Math.sqrt(c * p) / g,
|
|
6678
|
-
return
|
|
6679
|
-
}
|
|
6680
|
-
function
|
|
6681
|
-
const s = 63567523142e-4, n = 1 / 298.257223563, a = Ie(t), u = Math.sin(a), o = Math.cos(a), h = (1 - n) * Math.tan(Ie(i.lat)), c = 1 / Math.sqrt(1 + h * h), p = h * c, g = Math.atan2(h, o), f = c * u,
|
|
6682
|
-
let d = 0, v = 0, y = 0,
|
|
6683
|
-
for (; Math.abs(
|
|
6684
|
-
d = Math.cos(2 * g +
|
|
6720
|
+
const c = n * (1 - a) + (1 - u) * a, p = (1 - n) * (1 - a) + u * a, g = Math.atan(Math.sqrt(c / p)), f = Math.sqrt(c * p) / g, M = 2 * g * o, _ = (3 * f - 1) / 2 / p, T = (3 * f + 1) / 2 / c;
|
|
6721
|
+
return M * (1 + h * (_ * u * (1 - n) - T * (1 - u) * n));
|
|
6722
|
+
}
|
|
6723
|
+
function ln(i, t, e) {
|
|
6724
|
+
const s = 63567523142e-4, n = 1 / 298.257223563, a = Ie(t), u = Math.sin(a), o = Math.cos(a), h = (1 - n) * Math.tan(Ie(i.lat)), c = 1 / Math.sqrt(1 + h * h), p = h * c, g = Math.atan2(h, o), f = c * u, M = 1 - f * f, _ = M * (6378137 * 6378137 - s * s) / (s * s), T = 1 + _ / 16384 * (4096 + _ * (-768 + _ * (320 - 175 * _))), l = _ / 1024 * (256 + _ * (-128 + _ * (74 - 47 * _)));
|
|
6725
|
+
let d = 0, v = 0, y = 0, C = e / (s * T), w = 2 * Math.PI;
|
|
6726
|
+
for (; Math.abs(C - w) > 1e-12; ) {
|
|
6727
|
+
d = Math.cos(2 * g + C), v = Math.sin(C), y = Math.cos(C);
|
|
6685
6728
|
const W = l * v * (d + l / 4 * (y * (-1 + 2 * d * d) - l / 6 * d * (-3 + 4 * v * v) * (-3 + 4 * d * d)));
|
|
6686
|
-
w =
|
|
6729
|
+
w = C, C = e / (s * T) + W;
|
|
6687
6730
|
}
|
|
6688
6731
|
const E = p * v - c * y * o, k = Math.atan2(
|
|
6689
6732
|
p * y + c * v * o,
|
|
6690
6733
|
(1 - n) * Math.sqrt(f * f + E * E)
|
|
6691
|
-
),
|
|
6692
|
-
return { lng: i.lng +
|
|
6734
|
+
), G = Math.atan2(v * u, c * y - p * v * o), B = n / 16 * M * (4 + n * (4 - 3 * M)), ee = G - (1 - B) * n * f * (C + B * v * (d + B * y * (-1 + 2 * d * d)));
|
|
6735
|
+
return { lng: i.lng + vr(ee), lat: vr(k) };
|
|
6693
6736
|
}
|
|
6694
6737
|
const Pn = {
|
|
6695
|
-
getDistance:
|
|
6696
|
-
getDestination:
|
|
6738
|
+
getDistance: an,
|
|
6739
|
+
getDestination: ln
|
|
6697
6740
|
};
|
|
6698
|
-
var
|
|
6699
|
-
const
|
|
6741
|
+
var hn = { VITE_APP_DEV_KEY_BAIDU: "", VITE_APP_DEV_KEY_GOOGLE: "", VITE_APP_DEV_KEY_HERE: "", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
6742
|
+
const Bn = {
|
|
6700
6743
|
install(i, t) {
|
|
6701
|
-
if (
|
|
6702
|
-
const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Ve, "./TgMapWidget.vue":
|
|
6744
|
+
if (hs(t), hn.VITE_FALSE) {
|
|
6745
|
+
const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Ve, "./TgMapWidget.vue": Es, "./controls/TgCustomControl.vue": Bs, "./controls/TgMapTypeControl.vue": Is, "./controls/TgScaleControl.vue": Ss, "./controls/TgStreetViewControl.vue": ks, "./controls/TgZoomControl.vue": As, "./extra/TgHeatmap.vue": Ds, "./extra/TgMarkerClusterer.vue": Kr, "./layers/TgTrafficLayer.vue": zs, "./overlays/TgCircle.vue": Ns, "./overlays/TgElementOverlay.vue": Hs, "./overlays/TgInfoBox.vue": Ys, "./overlays/TgInfoWindow.vue": Xs, "./overlays/TgLabel.vue": en, "./overlays/TgMarker.vue": pt, "./overlays/TgPolygon.vue": tn, "./overlays/TgPolyline.vue": rn, "./overlays/TgRectangle.vue": sn });
|
|
6703
6746
|
Object.keys(r).forEach((s) => {
|
|
6704
6747
|
const n = r[s];
|
|
6705
6748
|
i.component(n.name ?? I(`Tg开头的组件必须设置name: ${s}`), n);
|
|
@@ -6710,146 +6753,146 @@ const Ln = {
|
|
|
6710
6753
|
}
|
|
6711
6754
|
};
|
|
6712
6755
|
export {
|
|
6713
|
-
|
|
6714
|
-
|
|
6756
|
+
It as AbstractControl,
|
|
6757
|
+
Zt as AbstractMap,
|
|
6715
6758
|
Ke as Arrays,
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6759
|
+
Ir as Autocomplete,
|
|
6760
|
+
Oi as BaiduAutocomplete,
|
|
6761
|
+
Ht as BaiduCircle,
|
|
6762
|
+
St as BaiduControl,
|
|
6763
|
+
Ei as BaiduHeatmap,
|
|
6764
|
+
Yt as BaiduInfoBoxOverlay,
|
|
6765
|
+
Ft as BaiduInfoWindow,
|
|
6766
|
+
kt as BaiduMapTypeControl,
|
|
6767
|
+
Ct as BaiduMapUrls,
|
|
6768
|
+
Ge as BaiduMarker,
|
|
6769
|
+
Si as BaiduMarkerClusterer,
|
|
6727
6770
|
ct as BaiduOverlay,
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6771
|
+
Di as BaiduPlacesService,
|
|
6772
|
+
Qt as BaiduPolyShape,
|
|
6773
|
+
rr as BaiduPolygon,
|
|
6774
|
+
er as BaiduPolyline,
|
|
6775
|
+
sr as BaiduRectangle,
|
|
6776
|
+
At as BaiduScaleControl,
|
|
6777
|
+
$i as BaiduSearchBox,
|
|
6778
|
+
Rt as BaiduStreetViewControl,
|
|
6779
|
+
zt as BaiduZoomControl,
|
|
6737
6780
|
j as BuildInMapType,
|
|
6738
|
-
|
|
6739
|
-
|
|
6781
|
+
xr as BuildInMapTypeId,
|
|
6782
|
+
Pe as CachedValue,
|
|
6740
6783
|
D as ControlPosition,
|
|
6741
6784
|
q as ControlPositionConverter,
|
|
6742
6785
|
R as CoordType,
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6786
|
+
fi as CustomControl,
|
|
6787
|
+
is as ElementOverlay,
|
|
6788
|
+
vi as EmptyControl,
|
|
6789
|
+
mi as FastFindValues,
|
|
6747
6790
|
re as GestureHandlingOptions,
|
|
6748
6791
|
Ti as GoogleAutocomplete,
|
|
6749
|
-
|
|
6792
|
+
Vt as GoogleCircle,
|
|
6750
6793
|
ht as GoogleControl,
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6794
|
+
xi as GoogleHeatmap,
|
|
6795
|
+
qt as GoogleInfoBoxOverlay,
|
|
6796
|
+
Ut as GoogleInfoWindow,
|
|
6797
|
+
Tt as GoogleMapTypeControl,
|
|
6798
|
+
Ot as GoogleMapUrls,
|
|
6799
|
+
Jt as GoogleMarker,
|
|
6800
|
+
ki as GoogleMarkerClusterer,
|
|
6801
|
+
Wt as GoogleOverlay,
|
|
6802
|
+
Ai as GooglePlacesService,
|
|
6803
|
+
ir as GooglePolygon,
|
|
6804
|
+
tr as GooglePolyline,
|
|
6805
|
+
nr as GoogleRectangle,
|
|
6806
|
+
Dt as GoogleScaleControl,
|
|
6807
|
+
Ri as GoogleSearchBox,
|
|
6808
|
+
$t as GoogleStreetViewControl,
|
|
6809
|
+
Nt as GoogleZoomControl,
|
|
6810
|
+
kr as Heatmap,
|
|
6768
6811
|
tt as Icon,
|
|
6769
6812
|
rt as IconSequence,
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6813
|
+
fn as ImageMapType,
|
|
6814
|
+
jt as InfoWindow,
|
|
6815
|
+
es as InfoWindowModeValues,
|
|
6816
|
+
cr as KeyValue,
|
|
6817
|
+
O as LatLng,
|
|
6775
6818
|
Q as LatLngBounds,
|
|
6776
|
-
|
|
6819
|
+
Ln as LifecycleLogPlugin,
|
|
6777
6820
|
ie as Location,
|
|
6778
6821
|
Ze as MIXIN_HOOK_CREATE,
|
|
6779
6822
|
We as MIXIN_HOOK_DESTROY,
|
|
6780
|
-
|
|
6823
|
+
or as MIXIN_MAP_NAME,
|
|
6781
6824
|
ye as MVCArrays,
|
|
6782
|
-
|
|
6825
|
+
N as MapMixin,
|
|
6783
6826
|
wt as MapOptions,
|
|
6784
6827
|
ze as MapPane,
|
|
6785
|
-
|
|
6828
|
+
Ne as MapPanes,
|
|
6786
6829
|
F as MapType,
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6830
|
+
Er as MapTypeControlType,
|
|
6831
|
+
Ar as MapUrls,
|
|
6832
|
+
zi as MapZoom,
|
|
6790
6833
|
Gr as MarkerClusterer,
|
|
6791
6834
|
ce as Objects,
|
|
6792
|
-
|
|
6793
|
-
|
|
6835
|
+
Fr as Overlay,
|
|
6836
|
+
Zr as PlacesService,
|
|
6794
6837
|
le as Point,
|
|
6795
|
-
|
|
6838
|
+
Wr as SearchBox,
|
|
6796
6839
|
Pn as SphericalUtils,
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6840
|
+
Me as Strings,
|
|
6841
|
+
Oe as SymbolIcon,
|
|
6842
|
+
bn as SymbolPath,
|
|
6843
|
+
Ns as TgCircle,
|
|
6844
|
+
Bs as TgCustomControl,
|
|
6845
|
+
Hs as TgElementOverlay,
|
|
6846
|
+
Ds as TgHeatmap,
|
|
6847
|
+
Ys as TgInfoBox,
|
|
6848
|
+
Xs as TgInfoWindow,
|
|
6849
|
+
en as TgLabel,
|
|
6807
6850
|
Ve as TgMap,
|
|
6808
|
-
|
|
6851
|
+
Et as TgMapFactory,
|
|
6809
6852
|
X as TgMapType,
|
|
6810
|
-
|
|
6811
|
-
|
|
6853
|
+
Is as TgMapTypeControl,
|
|
6854
|
+
Es as TgMapWidget,
|
|
6812
6855
|
pt as TgMarker,
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6856
|
+
Kr as TgMarkerClusterer,
|
|
6857
|
+
tn as TgPolygon,
|
|
6858
|
+
rn as TgPolyline,
|
|
6859
|
+
sn as TgRectangle,
|
|
6860
|
+
Ss as TgScaleControl,
|
|
6861
|
+
ks as TgStreetViewControl,
|
|
6862
|
+
zs as TgTrafficLayer,
|
|
6863
|
+
As as TgZoomControl,
|
|
6864
|
+
yi as TrafficLayer,
|
|
6822
6865
|
et as UnionIcon,
|
|
6823
6866
|
Ue as callHook,
|
|
6824
|
-
|
|
6825
|
-
|
|
6867
|
+
On as computedSaveOnThis,
|
|
6868
|
+
us as createAsyncSingleton,
|
|
6826
6869
|
ut as createEmptyVNode,
|
|
6827
|
-
|
|
6870
|
+
bs as createPropertyObject,
|
|
6828
6871
|
Cn as createPropertyObjectTyped,
|
|
6829
6872
|
Tn as debug,
|
|
6830
|
-
|
|
6873
|
+
Bn as default,
|
|
6831
6874
|
A as eventProp,
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6875
|
+
xn as extractVNodeFromSlotsByComponent,
|
|
6876
|
+
Bt as findAncestorComponentByType,
|
|
6877
|
+
wn as findByComponentType,
|
|
6878
|
+
ln as getDestination,
|
|
6879
|
+
Yr as getTgMapConfig,
|
|
6837
6880
|
bt as isComponentByType,
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6881
|
+
ds as isEntryValueDef,
|
|
6882
|
+
pn as isInstanceOf,
|
|
6883
|
+
ms as loadCachedMap,
|
|
6841
6884
|
b as optionalProp,
|
|
6842
6885
|
Z as requiredProp,
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6886
|
+
gn as safeAs,
|
|
6887
|
+
Mr as safeAsComponent,
|
|
6888
|
+
hs as setTgMapConfig,
|
|
6889
|
+
Ms as splitAttrs,
|
|
6847
6890
|
Y as stringEnumProp,
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6891
|
+
_s as stringUnionPropFromValues,
|
|
6892
|
+
Mn as todo,
|
|
6893
|
+
mn as unwrapStringEnumValue,
|
|
6894
|
+
En as useEventLogMethods,
|
|
6852
6895
|
ne as useSplittedAttrs,
|
|
6853
|
-
|
|
6896
|
+
ar as useTgMapInner
|
|
6854
6897
|
};
|
|
6855
6898
|
//# sourceMappingURL=tg-map.js.map
|