tg-map-vue3 3.5.1 → 3.5.3
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 +4 -0
- package/dist/src/components/controls/TgCustomControl.vue.d.ts +3 -1
- package/dist/src/components/controls/TgMapTypeControl.vue.d.ts +3 -1
- package/dist/src/components/controls/TgScaleControl.vue.d.ts +3 -1
- package/dist/src/components/extra/TgMarkerClusterer.vue.d.ts +3 -1
- package/dist/src/components/layers/TgTrafficLayer.vue.d.ts +3 -1
- package/dist/src/components/map-mixin.d.ts +3 -1
- package/dist/src/components/overlays/TgCircle.vue.d.ts +3 -1
- package/dist/src/components/overlays/TgElementOverlay.vue.d.ts +3 -1
- package/dist/src/components/overlays/TgInfoBox.vue.d.ts +3 -1
- package/dist/src/components/overlays/TgInfoWindow.vue.d.ts +3 -1
- package/dist/src/components/overlays/TgLabel.vue.d.ts +10 -1
- package/dist/src/components/overlays/TgMarker.vue.d.ts +19 -4
- package/dist/src/components/overlays/TgPolygon.vue.d.ts +3 -1
- package/dist/src/components/overlays/TgPolyline.vue.d.ts +3 -1
- package/dist/src/components/overlays/TgRectangle.vue.d.ts +3 -1
- package/dist/src/map/map/overlay/element-overlay.d.ts +5 -0
- package/dist/src/map/map/overlay/google-label.d.ts +5 -4
- package/dist/src/map/map/overlay/label.d.ts +7 -0
- package/dist/tg-map.js +767 -755
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +6 -6
- package/dist/tg-map.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/tg-map.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.baidu-info-box-container{transform:translateY(-11px);font-size:13px;font-weight:300;width:100vw}.baidu-info-box-container__border{position:absolute;padding:12px;background-color:#fff;box-shadow:0 2px 7px 1px #0000004d;border-radius:8px;transform:translate(-50%,-100%)}.baidu-info-box-container__inner{overflow:auto}.baidu-info-box-container__close{position:absolute;right:-6px;top:-6px;width:14px;height:14px;margin:8px;opacity:.6;cursor:pointer}.baidu-info-box-container__close:hover{opacity:1}.baidu-info-box-container:after{position:absolute;background-color:#fff;content:"";width:15px;height:15px;left:0px;top:0px;box-shadow:-2px 2px 2px #b2b2b266;transform:translate(-50%,-50%) rotate(-45deg)}.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}.
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var c = (i, t, e) => (
|
|
5
|
-
import { createCommentVNode as
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.baidu-info-box-container{transform:translateY(-11px);font-size:13px;font-weight:300;width:100vw}.baidu-info-box-container__border{position:absolute;padding:12px;background-color:#fff;box-shadow:0 2px 7px 1px #0000004d;border-radius:8px;transform:translate(-50%,-100%)}.baidu-info-box-container__inner{overflow:auto}.baidu-info-box-container__close{position:absolute;right:-6px;top:-6px;width:14px;height:14px;margin:8px;opacity:.6;cursor:pointer}.baidu-info-box-container__close:hover{opacity:1}.baidu-info-box-container:after{position:absolute;background-color:#fff;content:"";width:15px;height:15px;left:0px;top:0px;box-shadow:-2px 2px 2px #b2b2b266;transform:translate(-50%,-50%) rotate(-45deg)}.element-overlay{position:absolute}.tg-map{height:100%;position:relative}.tg-map__map{width:100%;height:100%}.tg-map__map--hide-logo-google .gm-style a[target=_blank]:has(> div > img){display:none!important}.tg-map__map--hide-logo-google .gm-style>div:last-child>div:last-child>div{display:none}.tg-map__map--hide-logo-baidu div.anchorBL>a[target=_blank]>img{display:none}.tg-map__map--hide-logo-baidu div.BMap_cpyCtrl{display:none}.tg-map-widget{position:absolute}.tg-map>.tg-custom-control{display:none}.tg-map .tg-element-overlay{display:none}.tg-map__map .tg-element-overlay{display:block}.tg-map .tg-info-box{display:none}.tg-map__map .tg-info-box{display:block}.tg-map .tg-label{display:none}.tg-map__map .tg-label{display:block}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
var br = Object.defineProperty;
|
|
3
|
+
var Mr = (i, t, e) => t in i ? br(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
4
|
+
var c = (i, t, e) => (Mr(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
5
|
+
import { createCommentVNode as Ve, computed as zt, defineComponent as C, markRaw as Tr, watch as Nt, openBlock as W, createElementBlock as j, mergeProps as ue, createElementVNode as Or, normalizeClass as Re, renderSlot as G, normalizeStyle as Cr, getCurrentInstance as wr, inject as Er, onMounted as Lr, onBeforeUnmount as xr, toRaw as $e, withDirectives as Pr, vShow as kr } from "vue";
|
|
6
6
|
function V(i, t, e) {
|
|
7
7
|
Object.keys(i).forEach((r) => {
|
|
8
8
|
r.startsWith("update:") || e != null && e.includes(r) || t.addEventListener(r, i[r]);
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
|
-
let
|
|
12
|
-
function
|
|
13
|
-
return
|
|
11
|
+
let Br = 1;
|
|
12
|
+
function Ir() {
|
|
13
|
+
return Br++;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
return t.__id__ || (t.__id__ =
|
|
15
|
+
function xe(i, t) {
|
|
16
|
+
return t.__id__ || (t.__id__ = Ir()), `${i}::${t.__id__}`;
|
|
17
17
|
}
|
|
18
|
-
var
|
|
19
|
-
function
|
|
18
|
+
var Gt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
19
|
+
function Xe(i) {
|
|
20
20
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
21
21
|
}
|
|
22
|
-
var
|
|
22
|
+
var Zt = { exports: {} };
|
|
23
23
|
(function(i) {
|
|
24
24
|
(function(t, e) {
|
|
25
25
|
i.exports ? i.exports = e() : t.coordtransform = e();
|
|
26
|
-
})(
|
|
26
|
+
})(Gt, function() {
|
|
27
27
|
var t = 52.35987755982988, e = 3.141592653589793, r = 6378245, s = 0.006693421622965943;
|
|
28
28
|
function n(g, f, v, O) {
|
|
29
29
|
this.west = Math.min(g, v), this.north = Math.max(f, O), this.east = Math.max(g, v), this.south = Math.min(f, O);
|
|
@@ -58,8 +58,8 @@ var Gt = { exports: {} };
|
|
|
58
58
|
return !1;
|
|
59
59
|
}
|
|
60
60
|
function l(g, f) {
|
|
61
|
-
var v = g - 65e-4, O = f - 6e-3, x = Math.sqrt(v * v + O * O) - 2e-5 * Math.sin(O * t), w = Math.atan2(O, v) - 3e-6 * Math.cos(v * t), K = x * Math.cos(w),
|
|
62
|
-
return [K,
|
|
61
|
+
var v = g - 65e-4, O = f - 6e-3, x = Math.sqrt(v * v + O * O) - 2e-5 * Math.sin(O * t), w = Math.atan2(O, v) - 3e-6 * Math.cos(v * t), K = x * Math.cos(w), ie = x * Math.sin(w);
|
|
62
|
+
return [K, ie];
|
|
63
63
|
}
|
|
64
64
|
function d(g, f) {
|
|
65
65
|
var v = Math.sqrt(g * g + f * f) + 2e-5 * Math.sin(f * t), O = Math.atan2(f, g) + 3e-6 * Math.cos(g * t), x = v * Math.cos(O) + 65e-4, w = v * Math.sin(O) + 6e-3;
|
|
@@ -79,8 +79,8 @@ var Gt = { exports: {} };
|
|
|
79
79
|
w = 1 - s * w * w;
|
|
80
80
|
var K = Math.sqrt(w);
|
|
81
81
|
v = v * 180 / (r * (1 - s) / (w * K) * e), O = O * 180 / (r / K * Math.cos(x) * e);
|
|
82
|
-
var
|
|
83
|
-
return [
|
|
82
|
+
var ie = f + v, Ge = g + O;
|
|
83
|
+
return [Ge, ie];
|
|
84
84
|
}
|
|
85
85
|
function _(g, f) {
|
|
86
86
|
var v = -100 + 2 * g + 3 * f + 0.2 * f * f + 0.1 * g * f + 0.2 * Math.sqrt(Math.abs(g));
|
|
@@ -115,54 +115,54 @@ var Gt = { exports: {} };
|
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
});
|
|
118
|
-
})(
|
|
119
|
-
var
|
|
120
|
-
const
|
|
121
|
-
function
|
|
118
|
+
})(Zt);
|
|
119
|
+
var Sr = Zt.exports;
|
|
120
|
+
const se = /* @__PURE__ */ Xe(Sr);
|
|
121
|
+
function oe(i, t) {
|
|
122
122
|
if (!i)
|
|
123
123
|
throw new Error(`AssertionError: ${t}`);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Fe(i) {
|
|
126
126
|
throw new Error(`Unexpected object: ${i}`);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function cs() {
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function Ue(i) {
|
|
131
131
|
return i;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function ds(i, t) {
|
|
134
134
|
return i instanceof t;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function us(i, t) {
|
|
137
137
|
if (i instanceof t)
|
|
138
138
|
return i;
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function Ce(i, t) {
|
|
141
141
|
if ((i == null ? void 0 : i.$options.name) === t.name)
|
|
142
142
|
return i;
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function ps(i) {
|
|
145
145
|
return i;
|
|
146
146
|
}
|
|
147
147
|
function E(i) {
|
|
148
148
|
throw new Error(i);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function Wt(i) {
|
|
151
151
|
throw new Error(`Unsupported: ${i}`);
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function gs(i) {
|
|
154
154
|
throw new Error(`todo: ${i}`);
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function ms(i) {
|
|
157
157
|
return i;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function ye(...i) {
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function fs(i) {
|
|
162
162
|
return i != null;
|
|
163
163
|
}
|
|
164
164
|
var Q = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(Q || {});
|
|
165
|
-
const
|
|
165
|
+
const We = "wgs84", D = class {
|
|
166
166
|
constructor(t, e, r) {
|
|
167
167
|
this.lat = t, this.lng = e, this.coord = r;
|
|
168
168
|
}
|
|
@@ -178,12 +178,12 @@ const Ge = "wgs84", D = class {
|
|
|
178
178
|
return new D(t.lat, t.lng, e);
|
|
179
179
|
}
|
|
180
180
|
static fromLiteral(t) {
|
|
181
|
-
return new D(t.lat, t.lng, t.coord ||
|
|
181
|
+
return new D(t.lat, t.lng, t.coord || We);
|
|
182
182
|
}
|
|
183
|
-
static fromLngLat(t, e, r =
|
|
183
|
+
static fromLngLat(t, e, r = We) {
|
|
184
184
|
return new D(e, t, r);
|
|
185
185
|
}
|
|
186
|
-
static create(t, e, r =
|
|
186
|
+
static create(t, e, r = We) {
|
|
187
187
|
return new D(t, e, r);
|
|
188
188
|
}
|
|
189
189
|
/** 转换坐标到指定坐标系 */
|
|
@@ -218,11 +218,11 @@ const Ge = "wgs84", D = class {
|
|
|
218
218
|
_convert(t) {
|
|
219
219
|
switch (this.coord) {
|
|
220
220
|
case "bd09":
|
|
221
|
-
return t === "gcj02" ?
|
|
221
|
+
return t === "gcj02" ? se.bd09ToGcj02(this.lng, this.lat) : se.bd09ToWgs84(this.lng, this.lat);
|
|
222
222
|
case "gcj02":
|
|
223
|
-
return t === "wgs84" ?
|
|
223
|
+
return t === "wgs84" ? se.gcj02ToWgs84(this.lng, this.lat) : se.gcj02ToBd09(this.lng, this.lat);
|
|
224
224
|
case "wgs84":
|
|
225
|
-
return t === "bd09" ?
|
|
225
|
+
return t === "bd09" ? se.wgs84ToBd09(this.lng, this.lat) : se.wgs84ToGcj02(this.lng, this.lat);
|
|
226
226
|
}
|
|
227
227
|
throw new Error(`不支持的坐标转换: ${this.coord}=>${t}`);
|
|
228
228
|
}
|
|
@@ -243,7 +243,7 @@ const J = class {
|
|
|
243
243
|
*/
|
|
244
244
|
constructor(t, e) {
|
|
245
245
|
c(this, "coord");
|
|
246
|
-
this.sw = t, this.ne = e,
|
|
246
|
+
this.sw = t, this.ne = e, oe(t.coord === e.coord, "sw和ne的coord应该相同"), oe(Number.isFinite(t.lat) && Number.isFinite(t.lng) && Number.isFinite(e.lat) && Number.isFinite(e.lng), `sw(${t})和ne(${e})不能包含NaN或Infinite`), oe(t.lat <= e.lat, `sw.lat(${t.lat})应该比ne.lat(${e.lat})小`), this.coord = t.coord;
|
|
247
247
|
}
|
|
248
248
|
static isBetweenLng(t, e, r) {
|
|
249
249
|
return t <= e ? t <= r && r <= e : t <= r || r <= e;
|
|
@@ -346,77 +346,77 @@ c(I, "EMPTY", new J(y.ZERO, y.ZERO));
|
|
|
346
346
|
}
|
|
347
347
|
i.Builder = t;
|
|
348
348
|
})(I || (I = {}));
|
|
349
|
-
var
|
|
350
|
-
return
|
|
349
|
+
var Ar = function(t) {
|
|
350
|
+
return Rr(t) && !$r(t);
|
|
351
351
|
};
|
|
352
|
-
function
|
|
352
|
+
function Rr(i) {
|
|
353
353
|
return !!i && typeof i == "object";
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function $r(i) {
|
|
356
356
|
var t = Object.prototype.toString.call(i);
|
|
357
|
-
return t === "[object RegExp]" || t === "[object Date]" ||
|
|
358
|
-
}
|
|
359
|
-
var $r = typeof Symbol == "function" && Symbol.for, Dr = $r ? Symbol.for("react.element") : 60103;
|
|
360
|
-
function zr(i) {
|
|
361
|
-
return i.$$typeof === Dr;
|
|
357
|
+
return t === "[object RegExp]" || t === "[object Date]" || Nr(i);
|
|
362
358
|
}
|
|
359
|
+
var Dr = typeof Symbol == "function" && Symbol.for, zr = Dr ? Symbol.for("react.element") : 60103;
|
|
363
360
|
function Nr(i) {
|
|
361
|
+
return i.$$typeof === zr;
|
|
362
|
+
}
|
|
363
|
+
function Gr(i) {
|
|
364
364
|
return Array.isArray(i) ? [] : {};
|
|
365
365
|
}
|
|
366
|
-
function
|
|
367
|
-
return t.clone !== !1 && t.isMergeableObject(i) ?
|
|
366
|
+
function ve(i, t) {
|
|
367
|
+
return t.clone !== !1 && t.isMergeableObject(i) ? le(Gr(i), i, t) : i;
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function Zr(i, t, e) {
|
|
370
370
|
return i.concat(t).map(function(r) {
|
|
371
|
-
return
|
|
371
|
+
return ve(r, e);
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function Wr(i, t) {
|
|
375
375
|
if (!t.customMerge)
|
|
376
|
-
return
|
|
376
|
+
return le;
|
|
377
377
|
var e = t.customMerge(i);
|
|
378
|
-
return typeof e == "function" ? e :
|
|
378
|
+
return typeof e == "function" ? e : le;
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function Hr(i) {
|
|
381
381
|
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(t) {
|
|
382
382
|
return Object.propertyIsEnumerable.call(i, t);
|
|
383
383
|
}) : [];
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
return Object.keys(i).concat(
|
|
385
|
+
function xt(i) {
|
|
386
|
+
return Object.keys(i).concat(Hr(i));
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function Ht(i, t) {
|
|
389
389
|
try {
|
|
390
390
|
return t in i;
|
|
391
391
|
} catch {
|
|
392
392
|
return !1;
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
return
|
|
395
|
+
function jr(i, t) {
|
|
396
|
+
return Ht(i, t) && !(Object.hasOwnProperty.call(i, t) && Object.propertyIsEnumerable.call(i, t));
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function Vr(i, t, e) {
|
|
399
399
|
var r = {};
|
|
400
|
-
return e.isMergeableObject(i) &&
|
|
401
|
-
r[s] =
|
|
402
|
-
}),
|
|
403
|
-
|
|
400
|
+
return e.isMergeableObject(i) && xt(i).forEach(function(s) {
|
|
401
|
+
r[s] = ve(i[s], e);
|
|
402
|
+
}), xt(t).forEach(function(s) {
|
|
403
|
+
jr(i, s) || (Ht(i, s) && e.isMergeableObject(t[s]) ? r[s] = Wr(s, e)(i[s], t[s], e) : r[s] = ve(t[s], e));
|
|
404
404
|
}), r;
|
|
405
405
|
}
|
|
406
|
-
function
|
|
407
|
-
e = e || {}, e.arrayMerge = e.arrayMerge ||
|
|
406
|
+
function le(i, t, e) {
|
|
407
|
+
e = e || {}, e.arrayMerge = e.arrayMerge || Zr, e.isMergeableObject = e.isMergeableObject || Ar, e.cloneUnlessOtherwiseSpecified = ve;
|
|
408
408
|
var r = Array.isArray(t), s = Array.isArray(i), n = r === s;
|
|
409
|
-
return n ? r ? e.arrayMerge(i, t, e) :
|
|
409
|
+
return n ? r ? e.arrayMerge(i, t, e) : Vr(i, t, e) : ve(t, e);
|
|
410
410
|
}
|
|
411
|
-
|
|
411
|
+
le.all = function(t, e) {
|
|
412
412
|
if (!Array.isArray(t))
|
|
413
413
|
throw new Error("first argument should be an array");
|
|
414
414
|
return t.reduce(function(r, s) {
|
|
415
|
-
return
|
|
415
|
+
return le(r, s, e);
|
|
416
416
|
}, {});
|
|
417
417
|
};
|
|
418
|
-
var
|
|
419
|
-
const
|
|
418
|
+
var Fr = le, Ur = Fr;
|
|
419
|
+
const jt = /* @__PURE__ */ Xe(Ur), Pe = ["3.0"], qr = {
|
|
420
420
|
baidu: {
|
|
421
421
|
version: "3.0",
|
|
422
422
|
// 在build时会被静态替换, 导致使用者不能无法设置它
|
|
@@ -431,25 +431,25 @@ const Ht = /* @__PURE__ */ Ke(Fr), Le = ["3.0"], Ur = {
|
|
|
431
431
|
libraries: ["places"]
|
|
432
432
|
},
|
|
433
433
|
here: {
|
|
434
|
-
version:
|
|
434
|
+
version: Pe[0],
|
|
435
435
|
key: ""
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
|
-
let
|
|
439
|
-
function
|
|
440
|
-
return
|
|
438
|
+
let Vt;
|
|
439
|
+
function Ft() {
|
|
440
|
+
return Vt || E("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
i != null && (
|
|
442
|
+
function Yr(i) {
|
|
443
|
+
i != null && (Vt = jt(qr, i));
|
|
444
444
|
}
|
|
445
|
-
var
|
|
445
|
+
var qe;
|
|
446
446
|
((i) => {
|
|
447
447
|
function t(e) {
|
|
448
448
|
return e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight;
|
|
449
449
|
}
|
|
450
450
|
i.isScrollable = t;
|
|
451
|
-
})(
|
|
452
|
-
var
|
|
451
|
+
})(qe || (qe = {}));
|
|
452
|
+
var he;
|
|
453
453
|
((i) => {
|
|
454
454
|
function t(h, o) {
|
|
455
455
|
return h.length === o.length && h.every((l, d) => l === o[d]);
|
|
@@ -482,8 +482,8 @@ var ae;
|
|
|
482
482
|
return h.length > 0;
|
|
483
483
|
}
|
|
484
484
|
i.isNotEmpty = a;
|
|
485
|
-
})(
|
|
486
|
-
var
|
|
485
|
+
})(he || (he = {}));
|
|
486
|
+
var ce;
|
|
487
487
|
((i) => {
|
|
488
488
|
function t(s, n) {
|
|
489
489
|
const a = s.getLength();
|
|
@@ -507,20 +507,20 @@ var le;
|
|
|
507
507
|
];
|
|
508
508
|
}
|
|
509
509
|
i.listenChanged = r;
|
|
510
|
-
})(
|
|
511
|
-
function
|
|
510
|
+
})(ce || (ce = {}));
|
|
511
|
+
function Ut(i, t, e) {
|
|
512
512
|
return i.addListener(t, e).remove;
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function Kr(i, t, e) {
|
|
515
515
|
return i.addEventListener(t, e), () => i.removeEventListener(t, e);
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function Xr(i, t, e, r) {
|
|
518
518
|
return i.addEventListener(t, e, r), () => i.removeEventListener(t, e, r);
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function Pt(i, t, e) {
|
|
521
521
|
return i.addEventListener(t, e), () => i.removeEventListener(t, e);
|
|
522
522
|
}
|
|
523
|
-
class
|
|
523
|
+
class qt {
|
|
524
524
|
constructor(t, e) {
|
|
525
525
|
c(this, "eventMap", /* @__PURE__ */ new Map());
|
|
526
526
|
c(this, "target", void 0);
|
|
@@ -530,9 +530,9 @@ class Ut {
|
|
|
530
530
|
return this.target = t, this;
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
|
-
class
|
|
533
|
+
class De {
|
|
534
534
|
constructor(t, e) {
|
|
535
|
-
c(this, "eventHub", new
|
|
535
|
+
c(this, "eventHub", new Yt());
|
|
536
536
|
this.delegate = t, this.options = e;
|
|
537
537
|
}
|
|
538
538
|
notify(t) {
|
|
@@ -545,28 +545,28 @@ class Re {
|
|
|
545
545
|
return this.delegate.setTarget(t), this;
|
|
546
546
|
}
|
|
547
547
|
addEventListener(t, e) {
|
|
548
|
-
if (
|
|
548
|
+
if (he.includesTyped(this.options.types, t)) {
|
|
549
549
|
this.eventHub.hasListener(t) || this.options.onListen(t), this.eventHub.addEventListener(t, e);
|
|
550
550
|
return;
|
|
551
551
|
}
|
|
552
552
|
this.delegate.addEventListener(t, e);
|
|
553
553
|
}
|
|
554
554
|
removeEventListener(t, e) {
|
|
555
|
-
if (
|
|
555
|
+
if (he.includesTyped(this.options.types, t)) {
|
|
556
556
|
this.eventHub.removeEventListener(t, e), this.eventHub.hasListener(t) || this.options.onCancel(t);
|
|
557
557
|
return;
|
|
558
558
|
}
|
|
559
559
|
this.delegate.removeEventListener(t, e);
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
|
-
const
|
|
562
|
+
const Lt = class extends qt {
|
|
563
563
|
addEventListener(t, e) {
|
|
564
|
-
const r =
|
|
564
|
+
const r = xe(t, e);
|
|
565
565
|
if (this.eventMap.get(r)) {
|
|
566
566
|
console.warn("listener已经添加过了", r, e);
|
|
567
567
|
return;
|
|
568
568
|
}
|
|
569
|
-
const s = this.inner.addListener(
|
|
569
|
+
const s = this.inner.addListener(Lt.EVENT_TYPE_MAP[t] || t, (n) => {
|
|
570
570
|
const a = {
|
|
571
571
|
type: t,
|
|
572
572
|
target: this.target,
|
|
@@ -577,11 +577,11 @@ const Et = class extends Ut {
|
|
|
577
577
|
this.eventMap.set(r, s);
|
|
578
578
|
}
|
|
579
579
|
removeEventListener(t, e) {
|
|
580
|
-
const r =
|
|
580
|
+
const r = xe(t, e), s = this.eventMap.get(r);
|
|
581
581
|
s ? (s.remove(), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
|
|
582
582
|
}
|
|
583
583
|
};
|
|
584
|
-
let ee =
|
|
584
|
+
let ee = Lt;
|
|
585
585
|
// 事件类型映射: tg => google
|
|
586
586
|
c(ee, "EVENT_TYPE_MAP", {
|
|
587
587
|
"center-changed": "center_changed",
|
|
@@ -597,9 +597,9 @@ c(ee, "EVENT_TYPE_MAP", {
|
|
|
597
597
|
"map-mouseup": "mouseup",
|
|
598
598
|
"map-dblclick": "dblclick"
|
|
599
599
|
});
|
|
600
|
-
const
|
|
600
|
+
const Ae = class extends qt {
|
|
601
601
|
addEventListener(t, e) {
|
|
602
|
-
const r =
|
|
602
|
+
const r = xe(t, e);
|
|
603
603
|
if (this.eventMap.get(r)) {
|
|
604
604
|
console.warn("listener已经添加过了", r, e);
|
|
605
605
|
return;
|
|
@@ -612,23 +612,23 @@ const Ie = class extends Ut {
|
|
|
612
612
|
};
|
|
613
613
|
n.point && (a.position = y.fromBaidu(n.point, this.coordTypeSupplier.coordType)), e.call(this.target, a);
|
|
614
614
|
};
|
|
615
|
-
this.inner.addEventListener(
|
|
615
|
+
this.inner.addEventListener(Ae.EVENT_TYPE_MAP[t] || t, s), this.eventMap.set(r, s);
|
|
616
616
|
}
|
|
617
617
|
removeEventListener(t, e) {
|
|
618
|
-
const r =
|
|
619
|
-
s ? (this.inner.removeEventListener(
|
|
618
|
+
const r = xe(t, e), s = this.eventMap.get(r);
|
|
619
|
+
s ? (this.inner.removeEventListener(Ae.EVENT_TYPE_MAP[t] || t, s), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
|
|
620
620
|
}
|
|
621
621
|
};
|
|
622
|
-
let
|
|
622
|
+
let ae = Ae;
|
|
623
623
|
// cSpell:words clickclose
|
|
624
624
|
// 事件类型映射, tg => baidu
|
|
625
|
-
c(
|
|
625
|
+
c(ae, "EVENT_TYPE_MAP", {
|
|
626
626
|
drag: "dragging",
|
|
627
627
|
closeclick: "clickclose",
|
|
628
628
|
"zoom-changed": "zoomend",
|
|
629
629
|
"map-type-changed": "maptypechange"
|
|
630
630
|
});
|
|
631
|
-
class
|
|
631
|
+
class Yt {
|
|
632
632
|
constructor() {
|
|
633
633
|
c(this, "typeMap", /* @__PURE__ */ new Map());
|
|
634
634
|
}
|
|
@@ -638,7 +638,7 @@ class qt {
|
|
|
638
638
|
}
|
|
639
639
|
removeEventListener(t, e) {
|
|
640
640
|
const r = this.typeMap.get(t);
|
|
641
|
-
r &&
|
|
641
|
+
r && he.remove(r, e);
|
|
642
642
|
}
|
|
643
643
|
hasListener(t) {
|
|
644
644
|
const e = this.typeMap.get(t);
|
|
@@ -649,14 +649,14 @@ class qt {
|
|
|
649
649
|
e && e.forEach((r) => r.call(t.target, t));
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
class
|
|
652
|
+
class kt {
|
|
653
653
|
/**
|
|
654
654
|
* `keys`和`values`数组中可以有相同的值, 若存在相同值, 则index越小的优先级越高
|
|
655
655
|
*/
|
|
656
656
|
constructor(t, e) {
|
|
657
657
|
c(this, "keyToValue", /* @__PURE__ */ new Map());
|
|
658
658
|
c(this, "valueToKey", /* @__PURE__ */ new Map());
|
|
659
|
-
|
|
659
|
+
oe(t.length === e.length);
|
|
660
660
|
for (let r = t.length - 1; r >= 0; r--)
|
|
661
661
|
this.keyToValue.set(t[r], e[r]), this.valueToKey.set(e[r], t[r]);
|
|
662
662
|
}
|
|
@@ -667,7 +667,7 @@ class Pt {
|
|
|
667
667
|
return this.keyToValue.get(t) ?? E();
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
|
-
class
|
|
670
|
+
class Jr {
|
|
671
671
|
constructor(t, e = 10) {
|
|
672
672
|
c(this, "map", /* @__PURE__ */ new Map());
|
|
673
673
|
this.values = t, this.maxSize4Debug = e;
|
|
@@ -696,7 +696,7 @@ class Xr {
|
|
|
696
696
|
return this.getOrNull(t, e) ?? E(`key(${e})不存在与valueMap(${this.getValueMap(t)})中`);
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
|
-
class
|
|
699
|
+
class Bt {
|
|
700
700
|
constructor(t) {
|
|
701
701
|
c(this, "value");
|
|
702
702
|
this.creator = t;
|
|
@@ -724,7 +724,7 @@ var k = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
724
724
|
/* RIGHT_BOTTOM */
|
|
725
725
|
];
|
|
726
726
|
function s() {
|
|
727
|
-
return t || (t = new
|
|
727
|
+
return t || (t = new kt(r, [
|
|
728
728
|
/* | @tg/map |名字相同| baidu | */
|
|
729
729
|
/* TOP_LEFT = */
|
|
730
730
|
BMAP_ANCHOR_TOP_LEFT,
|
|
@@ -754,7 +754,7 @@ var k = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
754
754
|
}
|
|
755
755
|
i.getBaidu = s;
|
|
756
756
|
function n() {
|
|
757
|
-
return e || (e = new
|
|
757
|
+
return e || (e = new kt(r, [
|
|
758
758
|
google.maps.ControlPosition.TOP_LEFT,
|
|
759
759
|
google.maps.ControlPosition.TOP_CENTER,
|
|
760
760
|
google.maps.ControlPosition.TOP_RIGHT,
|
|
@@ -771,16 +771,16 @@ var k = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
771
771
|
}
|
|
772
772
|
i.getGoogle = n;
|
|
773
773
|
})(A || (A = {}));
|
|
774
|
-
class
|
|
774
|
+
class Qr {
|
|
775
775
|
constructor(t) {
|
|
776
776
|
/** 实际添加到地图中的control对象 */
|
|
777
777
|
c(this, "inner");
|
|
778
778
|
this.position = t;
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
|
-
class
|
|
781
|
+
class Kt {
|
|
782
782
|
}
|
|
783
|
-
class
|
|
783
|
+
class Je extends Kt {
|
|
784
784
|
constructor(t, e) {
|
|
785
785
|
super(), this.inner = t, this.position = e;
|
|
786
786
|
}
|
|
@@ -803,7 +803,7 @@ class Xe extends Yt {
|
|
|
803
803
|
t.innerMap.removeControl(this.inner);
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
|
-
class
|
|
806
|
+
class Qe extends Kt {
|
|
807
807
|
constructor(e, r) {
|
|
808
808
|
super();
|
|
809
809
|
c(this, "visible", !1);
|
|
@@ -840,7 +840,7 @@ class Je extends Yt {
|
|
|
840
840
|
});
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
|
-
var
|
|
843
|
+
var Xt = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))(Xt || {});
|
|
844
844
|
class B {
|
|
845
845
|
constructor(t, e, r, s) {
|
|
846
846
|
this.id = t, this.baidu = e, this.google = r, this.googleCoordType = s;
|
|
@@ -862,13 +862,13 @@ class B {
|
|
|
862
862
|
return this.google();
|
|
863
863
|
}
|
|
864
864
|
asGoogleMapType() {
|
|
865
|
-
|
|
865
|
+
Wt("google的内置地图没有对应的实例");
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
|
-
class
|
|
868
|
+
class ei {
|
|
869
869
|
constructor() {
|
|
870
|
-
c(this, "baiduCache", new
|
|
871
|
-
c(this, "googleCache", new
|
|
870
|
+
c(this, "baiduCache", new Bt(() => new BMap.TrafficLayer()));
|
|
871
|
+
c(this, "googleCache", new Bt(() => new google.maps.TrafficLayer()));
|
|
872
872
|
}
|
|
873
873
|
asBaiduLayer() {
|
|
874
874
|
return this.baiduCache.get();
|
|
@@ -885,13 +885,13 @@ var S;
|
|
|
885
885
|
), () => (
|
|
886
886
|
/* 地形 */
|
|
887
887
|
google.maps.MapTypeId.TERRAIN
|
|
888
|
-
), Q.wgs84), i.BUILD_IN_MAP_TYPES = new
|
|
888
|
+
), Q.wgs84), i.BUILD_IN_MAP_TYPES = new Jr([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
|
|
889
889
|
})(S || (S = {}));
|
|
890
|
-
var
|
|
891
|
-
const
|
|
892
|
-
class
|
|
890
|
+
var Jt = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(Jt || {});
|
|
891
|
+
const Qt = [S.NORMAL, S.SATELLITE, S.HYBRID];
|
|
892
|
+
class et extends Je {
|
|
893
893
|
static create(t) {
|
|
894
|
-
const e = t.mapTypes ??
|
|
894
|
+
const e = t.mapTypes ?? Qt, r = {
|
|
895
895
|
default: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
|
|
896
896
|
horizontal: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
|
|
897
897
|
dropdown: BMAP_MAPTYPE_CONTROL_DROPDOWN
|
|
@@ -899,23 +899,23 @@ class Qe extends Xe {
|
|
|
899
899
|
type: t.type && r[t.type],
|
|
900
900
|
mapTypes: e.map((n) => n.asBaiduMapType())
|
|
901
901
|
});
|
|
902
|
-
return t.position && s.setAnchor(A.getBaidu().toValue(t.position)), new
|
|
902
|
+
return t.position && s.setAnchor(A.getBaidu().toValue(t.position)), new et(s, t.position);
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
|
-
const
|
|
906
|
-
constructor(t = "default", e = k.TOP_LEFT, r =
|
|
907
|
-
super("mapType", e), this.type = t, this.mapTypes = r,
|
|
905
|
+
const ne = class extends Qe {
|
|
906
|
+
constructor(t = "default", e = k.TOP_LEFT, r = Qt) {
|
|
907
|
+
super("mapType", e), this.type = t, this.mapTypes = r, ne.type2google || (ne.type2google = {
|
|
908
908
|
default: google.maps.MapTypeControlStyle.DEFAULT,
|
|
909
909
|
horizontal: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
|
|
910
910
|
dropdown: google.maps.MapTypeControlStyle.DROPDOWN_MENU
|
|
911
911
|
});
|
|
912
912
|
}
|
|
913
913
|
static create(t) {
|
|
914
|
-
return new
|
|
914
|
+
return new ne(t.type, t.position, t.mapTypes);
|
|
915
915
|
}
|
|
916
916
|
onCreateOptions() {
|
|
917
917
|
const t = super.onCreateOptions();
|
|
918
|
-
return t.style =
|
|
918
|
+
return t.style = ne.type2google[this.type], t.mapTypeIds = this.mapTypes.map((e) => e instanceof B ? e.getGoogleMapTypeId() : e.id), t;
|
|
919
919
|
}
|
|
920
920
|
addTo(t) {
|
|
921
921
|
super.addTo(t), this.mapTypes.forEach((e) => {
|
|
@@ -923,43 +923,43 @@ const ie = class extends Je {
|
|
|
923
923
|
});
|
|
924
924
|
}
|
|
925
925
|
};
|
|
926
|
-
let
|
|
927
|
-
c(
|
|
928
|
-
class
|
|
926
|
+
let Le = ne;
|
|
927
|
+
c(Le, "type2google");
|
|
928
|
+
class tt extends Je {
|
|
929
929
|
static create(t) {
|
|
930
930
|
const e = new BMap.ScaleControl({
|
|
931
931
|
anchor: t.position && A.getBaidu().toValue(t.position)
|
|
932
932
|
});
|
|
933
|
-
return new
|
|
933
|
+
return new tt(e, t.position);
|
|
934
934
|
}
|
|
935
935
|
}
|
|
936
|
-
class
|
|
936
|
+
class rt extends Qe {
|
|
937
937
|
static create(t) {
|
|
938
|
-
return new
|
|
938
|
+
return new rt(t.position);
|
|
939
939
|
}
|
|
940
940
|
constructor(t = k.BOTTOM_RIGHT) {
|
|
941
941
|
super("scale", t);
|
|
942
942
|
}
|
|
943
943
|
}
|
|
944
|
-
class
|
|
944
|
+
class it extends Je {
|
|
945
945
|
static create(t) {
|
|
946
946
|
const e = new BMap.NavigationControl({
|
|
947
947
|
type: BMAP_NAVIGATION_CONTROL_ZOOM,
|
|
948
948
|
// enableGeolocation: true,
|
|
949
949
|
anchor: t.position && A.getBaidu().toValue(t.position)
|
|
950
950
|
});
|
|
951
|
-
return new
|
|
951
|
+
return new it(e, t.position);
|
|
952
952
|
}
|
|
953
953
|
}
|
|
954
|
-
class
|
|
954
|
+
class st extends Qe {
|
|
955
955
|
static create(t) {
|
|
956
|
-
return new
|
|
956
|
+
return new st(t.position);
|
|
957
957
|
}
|
|
958
958
|
constructor(t = k.RIGHT_BOTTOM) {
|
|
959
959
|
super("zoom", t);
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function ti(i) {
|
|
963
963
|
let t, e, r;
|
|
964
964
|
const s = "The Google Maps JavaScript API", n = "google", a = "importLibrary", h = "__ib__", o = document, l = window, d = l[n] || (l[n] = {}), u = d.maps || (d.maps = {}), p = /* @__PURE__ */ new Set(), b = new URLSearchParams(), _ = () => t || (t = new Promise(async (M, g) => {
|
|
965
965
|
var f;
|
|
@@ -970,17 +970,17 @@ function ei(i) {
|
|
|
970
970
|
}));
|
|
971
971
|
u[a] ? console.warn(s + " only loads once. Ignoring:", i) : u[a] = (M, ...g) => p.add(M) && _().then(() => u[a](M, ...g));
|
|
972
972
|
}
|
|
973
|
-
let
|
|
973
|
+
let ri, ii;
|
|
974
974
|
const Y = {
|
|
975
975
|
/** Google的坐标0点 */
|
|
976
976
|
get LATLNG_ZERO() {
|
|
977
|
-
return
|
|
977
|
+
return ri ?? (ri = new google.maps.LatLng({ lat: 0, lng: 0 }));
|
|
978
978
|
},
|
|
979
979
|
get BOUNDS_ZERO() {
|
|
980
|
-
return
|
|
980
|
+
return ii ?? (ii = new google.maps.LatLngBounds(this.LATLNG_ZERO, this.LATLNG_ZERO));
|
|
981
981
|
}
|
|
982
982
|
};
|
|
983
|
-
function
|
|
983
|
+
function er(i, t = { country: "", province: "", city: "", district: "", street: "", streetNumber: "" }) {
|
|
984
984
|
for (const e of i)
|
|
985
985
|
for (const r of e.types)
|
|
986
986
|
switch (r) {
|
|
@@ -1005,9 +1005,9 @@ function Qt(i, t = { country: "", province: "", city: "", district: "", street:
|
|
|
1005
1005
|
}
|
|
1006
1006
|
return t;
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1008
|
+
function tr(i, t) {
|
|
1009
1009
|
var r;
|
|
1010
|
-
const e = i.address_components &&
|
|
1010
|
+
const e = i.address_components && er(i.address_components);
|
|
1011
1011
|
return {
|
|
1012
1012
|
country: (e == null ? void 0 : e.country) ?? "",
|
|
1013
1013
|
province: (e == null ? void 0 : e.province) ?? "",
|
|
@@ -1018,9 +1018,9 @@ function er(i, t) {
|
|
|
1018
1018
|
title: i.name ?? ""
|
|
1019
1019
|
};
|
|
1020
1020
|
}
|
|
1021
|
-
class
|
|
1021
|
+
class rr {
|
|
1022
1022
|
}
|
|
1023
|
-
class
|
|
1023
|
+
class si extends rr {
|
|
1024
1024
|
constructor(e, r) {
|
|
1025
1025
|
super();
|
|
1026
1026
|
c(this, "inner");
|
|
@@ -1036,7 +1036,7 @@ class ii extends tr {
|
|
|
1036
1036
|
this.inner.setBounds(e.toGoogle(this.map.coordType));
|
|
1037
1037
|
}
|
|
1038
1038
|
addResultListener(e) {
|
|
1039
|
-
return
|
|
1039
|
+
return Ut(this.inner, "place_changed", () => {
|
|
1040
1040
|
const r = this.inner.getPlace(), s = {
|
|
1041
1041
|
title: r.name ?? "",
|
|
1042
1042
|
province: "",
|
|
@@ -1046,11 +1046,11 @@ class ii extends tr {
|
|
|
1046
1046
|
streetNumber: "",
|
|
1047
1047
|
country: ""
|
|
1048
1048
|
};
|
|
1049
|
-
r.address_components &&
|
|
1049
|
+
r.address_components && er(r.address_components, s), e(s);
|
|
1050
1050
|
});
|
|
1051
1051
|
}
|
|
1052
1052
|
}
|
|
1053
|
-
class
|
|
1053
|
+
class ni extends rr {
|
|
1054
1054
|
constructor(e, r) {
|
|
1055
1055
|
super();
|
|
1056
1056
|
c(this, "inner");
|
|
@@ -1064,7 +1064,7 @@ class si extends tr {
|
|
|
1064
1064
|
const s = () => {
|
|
1065
1065
|
this.inner.setLocation(this.map.innerMap);
|
|
1066
1066
|
};
|
|
1067
|
-
this.removeableArray.push(
|
|
1067
|
+
this.removeableArray.push(Pt(this.map, "center-changed", s)), this.removeableArray.push(Pt(this.map, "zoom-changed", s));
|
|
1068
1068
|
}
|
|
1069
1069
|
}
|
|
1070
1070
|
setBounds(e) {
|
|
@@ -1072,14 +1072,14 @@ class si extends tr {
|
|
|
1072
1072
|
}
|
|
1073
1073
|
addResultListener(e) {
|
|
1074
1074
|
let r = 0;
|
|
1075
|
-
const s =
|
|
1075
|
+
const s = Kr(this.inner, "confirm", (a) => {
|
|
1076
1076
|
const h = a.item.value;
|
|
1077
1077
|
r = Date.now(), e(Object.assign({
|
|
1078
1078
|
title: h.business,
|
|
1079
1079
|
country: ""
|
|
1080
1080
|
// Baidu的自动完成只支持中国
|
|
1081
1081
|
}, h));
|
|
1082
|
-
}), n =
|
|
1082
|
+
}), n = Xr(this.input, "keyup", (a) => {
|
|
1083
1083
|
a.key === "Enter" && Date.now() - r > 100 && e({
|
|
1084
1084
|
title: this.input.value,
|
|
1085
1085
|
country: "",
|
|
@@ -1095,9 +1095,9 @@ class si extends tr {
|
|
|
1095
1095
|
};
|
|
1096
1096
|
}
|
|
1097
1097
|
}
|
|
1098
|
-
let
|
|
1098
|
+
let oi = class ir {
|
|
1099
1099
|
constructor(t, e, r) {
|
|
1100
|
-
this.extend(
|
|
1100
|
+
this.extend(ir, google.maps.OverlayView), this.map_ = t, this.MARKER_CLUSTER_IMAGE_PATH_ = "../images/m", this.MARKER_CLUSTER_IMAGE_EXTENSION_ = "png", this.markers_ = [], this.clusters_ = [], this.sizes = [53, 56, 66, 78, 90], this.styles_ = [], this.ready_ = !1;
|
|
1101
1101
|
var s = r || {};
|
|
1102
1102
|
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();
|
|
1103
1103
|
var n = this;
|
|
@@ -1516,7 +1516,7 @@ let ni = class rr {
|
|
|
1516
1516
|
if (r && r.isMarkerInClusterBounds(t))
|
|
1517
1517
|
r.addMarker(t);
|
|
1518
1518
|
else {
|
|
1519
|
-
var o = new
|
|
1519
|
+
var o = new ai(this);
|
|
1520
1520
|
o.addMarker(t), this.clusters_.push(o);
|
|
1521
1521
|
}
|
|
1522
1522
|
}
|
|
@@ -1533,9 +1533,9 @@ let ni = class rr {
|
|
|
1533
1533
|
), e = this.getExtendedBounds(t), r = 0, s; s = this.markers_[r]; r++)
|
|
1534
1534
|
!s.isAdded && this.isMarkerInBounds_(s, e) && this.addToClosestCluster_(s);
|
|
1535
1535
|
}
|
|
1536
|
-
},
|
|
1536
|
+
}, ai = class {
|
|
1537
1537
|
constructor(t) {
|
|
1538
|
-
this.markerClusterer_ = t, this.map_ = t.getMap(), this.gridSize_ = t.getGridSize(), this.minClusterSize_ = t.getMinClusterSize(), this.averageCenter_ = t.isAverageCenter(), this.center_ = null, this.markers_ = [], this.bounds_ = null, this.clusterIcon_ = new
|
|
1538
|
+
this.markerClusterer_ = t, this.map_ = t.getMap(), this.gridSize_ = t.getGridSize(), this.minClusterSize_ = t.getMinClusterSize(), this.averageCenter_ = t.isAverageCenter(), this.center_ = null, this.markers_ = [], this.bounds_ = null, this.clusterIcon_ = new nt(
|
|
1539
1539
|
this,
|
|
1540
1540
|
t.getStyles(),
|
|
1541
1541
|
t.getGridSize()
|
|
@@ -1669,9 +1669,9 @@ let ni = class rr {
|
|
|
1669
1669
|
this.clusterIcon_.setCenter(this.center_), this.clusterIcon_.setSums(a), this.clusterIcon_.show();
|
|
1670
1670
|
}
|
|
1671
1671
|
};
|
|
1672
|
-
class
|
|
1672
|
+
class nt {
|
|
1673
1673
|
constructor(t, e, r) {
|
|
1674
|
-
t.getMarkerClusterer().extend(
|
|
1674
|
+
t.getMarkerClusterer().extend(nt, google.maps.OverlayView), this.styles_ = e, this.padding_ = r || 0, this.cluster_ = t, this.center_ = null, this.map_ = t.getMap(), this.div_ = null, this.sums_ = null, this.visible_ = !1, this.setMap(this.map_);
|
|
1675
1675
|
}
|
|
1676
1676
|
/**
|
|
1677
1677
|
* Triggers the clusterclick event and zoom's if the option is set.
|
|
@@ -1802,11 +1802,11 @@ class st {
|
|
|
1802
1802
|
), e.join("");
|
|
1803
1803
|
}
|
|
1804
1804
|
}
|
|
1805
|
-
var
|
|
1805
|
+
var sr = { exports: {} };
|
|
1806
1806
|
(function(i, t) {
|
|
1807
1807
|
(function(e, r) {
|
|
1808
1808
|
i.exports = r();
|
|
1809
|
-
})(
|
|
1809
|
+
})(Gt, function() {
|
|
1810
1810
|
var e, r = e = r || { version: "1.3.8" }, s = {};
|
|
1811
1811
|
r.guid = "$BAIDU$", s[r.guid] = s[r.guid] || {}, r.dom = r.dom || {}, r.dom.g = function(o) {
|
|
1812
1812
|
return typeof o == "string" || o instanceof String ? document.getElementById(o) : o && o.nodeName && (o.nodeType == 1 || o.nodeType == 9) ? o : null;
|
|
@@ -1995,25 +1995,25 @@ var ir = { exports: {} };
|
|
|
1995
1995
|
});
|
|
1996
1996
|
}, h;
|
|
1997
1997
|
});
|
|
1998
|
-
})(
|
|
1999
|
-
var
|
|
2000
|
-
const
|
|
2001
|
-
var
|
|
2002
|
-
t =
|
|
1998
|
+
})(sr);
|
|
1999
|
+
var li = sr.exports;
|
|
2000
|
+
const It = /* @__PURE__ */ Xe(li);
|
|
2001
|
+
var nr = function(i, t, e) {
|
|
2002
|
+
t = hi(t);
|
|
2003
2003
|
var r = i.pointToPixel(t.getNorthEast()), s = i.pointToPixel(t.getSouthWest());
|
|
2004
2004
|
r.x += e, r.y -= e, s.x -= e, s.y += e;
|
|
2005
2005
|
var n = i.pixelToPoint(r), a = i.pixelToPoint(s);
|
|
2006
2006
|
return new BMap.Bounds(a, n);
|
|
2007
|
-
},
|
|
2008
|
-
var t =
|
|
2007
|
+
}, hi = function(i) {
|
|
2008
|
+
var t = we(i.getNorthEast().lng, -180, 180), e = we(i.getSouthWest().lng, -180, 180), r = we(i.getNorthEast().lat, -74, 74), s = we(i.getSouthWest().lat, -74, 74);
|
|
2009
2009
|
return new BMap.Bounds(new BMap.Point(e, s), new BMap.Point(t, r));
|
|
2010
|
-
},
|
|
2010
|
+
}, we = function(i, t, e) {
|
|
2011
2011
|
return t && (i = Math.max(i, t)), e && (i = Math.min(i, e)), i;
|
|
2012
|
-
},
|
|
2012
|
+
}, or = function(i) {
|
|
2013
2013
|
return Object.prototype.toString.call(i) === "[object Array]";
|
|
2014
|
-
},
|
|
2014
|
+
}, ar = function(i, t) {
|
|
2015
2015
|
var e = -1;
|
|
2016
|
-
if (
|
|
2016
|
+
if (or(t)) {
|
|
2017
2017
|
if (t.indexOf)
|
|
2018
2018
|
e = t.indexOf(i);
|
|
2019
2019
|
else
|
|
@@ -2041,7 +2041,7 @@ var sr = function(i, t, e) {
|
|
|
2041
2041
|
r._redraw();
|
|
2042
2042
|
});
|
|
2043
2043
|
var s = e.markers;
|
|
2044
|
-
|
|
2044
|
+
or(s) && this.addMarkers(s);
|
|
2045
2045
|
}
|
|
2046
2046
|
};
|
|
2047
2047
|
T.prototype.addMarkers = function(i) {
|
|
@@ -2052,7 +2052,7 @@ T.prototype.addMarkers = function(i) {
|
|
|
2052
2052
|
}
|
|
2053
2053
|
};
|
|
2054
2054
|
T.prototype._pushMarkerTo = function(i) {
|
|
2055
|
-
var t =
|
|
2055
|
+
var t = ar(i, this._markers);
|
|
2056
2056
|
t === -1 && (i.isInCluster = !1, this._markers.push(i));
|
|
2057
2057
|
};
|
|
2058
2058
|
T.prototype.addMarker = function(i) {
|
|
@@ -2061,7 +2061,7 @@ T.prototype.addMarker = function(i) {
|
|
|
2061
2061
|
T.prototype._createClusters = function() {
|
|
2062
2062
|
var i = this._map.getBounds();
|
|
2063
2063
|
if (i.getCenter()) {
|
|
2064
|
-
for (var t =
|
|
2064
|
+
for (var t = nr(this._map, i, this._gridSize), e = 0, r; r = this._markers[e]; e++)
|
|
2065
2065
|
!r.isInCluster && t.containsPoint(r.getPosition()) && this._addToClosestCluster(r);
|
|
2066
2066
|
for (var s = this._markers.length, e = 0; e < s; e++)
|
|
2067
2067
|
this._clusters[e] && this._clusters[e].render();
|
|
@@ -2101,7 +2101,7 @@ T.prototype._removeMarkersFromMap = function() {
|
|
|
2101
2101
|
}
|
|
2102
2102
|
};
|
|
2103
2103
|
T.prototype._removeMarker = function(i) {
|
|
2104
|
-
var t =
|
|
2104
|
+
var t = ar(i, this._markers);
|
|
2105
2105
|
return t === -1 ? !1 : (this._map.removeOverlay(i), this._markers.splice(t, 1), !0);
|
|
2106
2106
|
};
|
|
2107
2107
|
T.prototype.removeMarker = function(i) {
|
|
@@ -2177,7 +2177,7 @@ T.prototype.setStylesIndexCalculator = function(i) {
|
|
|
2177
2177
|
};
|
|
2178
2178
|
function $(i) {
|
|
2179
2179
|
var t = this;
|
|
2180
|
-
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
|
|
2180
|
+
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 It(this._center, this._markers.length, {
|
|
2181
2181
|
styles: this._markerClusterer.getStyles(),
|
|
2182
2182
|
zIndex: i._zIndex
|
|
2183
2183
|
}), this._clusterMarker.getStyleByText = function(e, r) {
|
|
@@ -2185,7 +2185,7 @@ function $(i) {
|
|
|
2185
2185
|
var s = t._markerClusterer._stylesIndexCalculator(t._markers, r.length);
|
|
2186
2186
|
return r[s];
|
|
2187
2187
|
}
|
|
2188
|
-
return
|
|
2188
|
+
return It.prototype.getStyleByText.call(this, e, r);
|
|
2189
2189
|
}, this._clusterMarker.addEventListener && this._clusterMarker.addEventListener("click", function(e) {
|
|
2190
2190
|
t._map.setViewport(t.getBounds());
|
|
2191
2191
|
});
|
|
@@ -2225,7 +2225,7 @@ $.prototype.isReal = function(i) {
|
|
|
2225
2225
|
};
|
|
2226
2226
|
$.prototype.updateGridBounds = function() {
|
|
2227
2227
|
var i = new BMap.Bounds(this._center, this._center);
|
|
2228
|
-
this._gridBounds =
|
|
2228
|
+
this._gridBounds = nr(this._map, i, this._markerClusterer.getGridSize());
|
|
2229
2229
|
};
|
|
2230
2230
|
$.prototype.updateClusterMarker = function() {
|
|
2231
2231
|
if (this._map.getZoom() > this._markerClusterer.getMaxZoom()) {
|
|
@@ -2255,7 +2255,7 @@ $.prototype.getBounds = function() {
|
|
|
2255
2255
|
$.prototype.getCenter = function() {
|
|
2256
2256
|
return this._center;
|
|
2257
2257
|
};
|
|
2258
|
-
var
|
|
2258
|
+
var ke;
|
|
2259
2259
|
((i) => {
|
|
2260
2260
|
function t(r) {
|
|
2261
2261
|
return {
|
|
@@ -2280,8 +2280,8 @@ var xe;
|
|
|
2280
2280
|
};
|
|
2281
2281
|
}
|
|
2282
2282
|
i.toGoogle = e;
|
|
2283
|
-
})(
|
|
2284
|
-
class
|
|
2283
|
+
})(ke || (ke = {}));
|
|
2284
|
+
class lr {
|
|
2285
2285
|
constructor(t) {
|
|
2286
2286
|
c(this, "inner");
|
|
2287
2287
|
this.map = t;
|
|
@@ -2307,7 +2307,7 @@ class ar {
|
|
|
2307
2307
|
return this.inner.removeMarkers(t.map((e) => e.innerOverlay));
|
|
2308
2308
|
}
|
|
2309
2309
|
}
|
|
2310
|
-
class
|
|
2310
|
+
class ci extends lr {
|
|
2311
2311
|
constructor(t, e) {
|
|
2312
2312
|
var s;
|
|
2313
2313
|
super(t), this.inner = new T(t.innerMap, {
|
|
@@ -2317,7 +2317,7 @@ class hi extends ar {
|
|
|
2317
2317
|
maxZoom: e.maxZoom,
|
|
2318
2318
|
minClusterSize: e.minClusterSize,
|
|
2319
2319
|
isAverageCenter: e.averageCenter,
|
|
2320
|
-
styles: (s = e.styles) == null ? void 0 : s.map((n) =>
|
|
2320
|
+
styles: (s = e.styles) == null ? void 0 : s.map((n) => ke.toBaidu(n)),
|
|
2321
2321
|
zIndex: e.zIndex
|
|
2322
2322
|
});
|
|
2323
2323
|
const r = e.stylesIndexCalculator;
|
|
@@ -2327,10 +2327,10 @@ class hi extends ar {
|
|
|
2327
2327
|
this.inner._redraw();
|
|
2328
2328
|
}
|
|
2329
2329
|
}
|
|
2330
|
-
class
|
|
2330
|
+
class di extends lr {
|
|
2331
2331
|
constructor(t, e) {
|
|
2332
2332
|
var s, n;
|
|
2333
|
-
super(t), this.inner = new
|
|
2333
|
+
super(t), this.inner = new oi(
|
|
2334
2334
|
t.innerMap,
|
|
2335
2335
|
// google的构造器中的markers,不会触发重绘, 第一次绘制通过监听地图的'idle'事件触发, 可以直接设置
|
|
2336
2336
|
(s = e.markers) == null ? void 0 : s.map((a) => a.innerOverlay),
|
|
@@ -2339,7 +2339,7 @@ class ci extends ar {
|
|
|
2339
2339
|
maxZoom: e.maxZoom,
|
|
2340
2340
|
minimumClusterSize: e.minClusterSize,
|
|
2341
2341
|
averageCenter: e.averageCenter,
|
|
2342
|
-
styles: (n = e.styles) == null ? void 0 : n.map((a) =>
|
|
2342
|
+
styles: (n = e.styles) == null ? void 0 : n.map((a) => ke.toGoogle(a)),
|
|
2343
2343
|
zIndex: e.zIndex
|
|
2344
2344
|
}
|
|
2345
2345
|
);
|
|
@@ -2354,11 +2354,11 @@ class ci extends ar {
|
|
|
2354
2354
|
this.inner.repaint();
|
|
2355
2355
|
}
|
|
2356
2356
|
}
|
|
2357
|
-
class
|
|
2357
|
+
class hr {
|
|
2358
2358
|
constructor() {
|
|
2359
2359
|
}
|
|
2360
2360
|
}
|
|
2361
|
-
class
|
|
2361
|
+
class ui extends hr {
|
|
2362
2362
|
constructor(e, r) {
|
|
2363
2363
|
super();
|
|
2364
2364
|
c(this, "inner");
|
|
@@ -2392,7 +2392,7 @@ class di extends lr {
|
|
|
2392
2392
|
switch (h) {
|
|
2393
2393
|
case google.maps.places.PlacesServiceStatus.ZERO_RESULTS:
|
|
2394
2394
|
case google.maps.places.PlacesServiceStatus.OK: {
|
|
2395
|
-
const o = (a ?? []).map((l) =>
|
|
2395
|
+
const o = (a ?? []).map((l) => tr(l, this.map));
|
|
2396
2396
|
s(o);
|
|
2397
2397
|
break;
|
|
2398
2398
|
}
|
|
@@ -2404,7 +2404,7 @@ class di extends lr {
|
|
|
2404
2404
|
});
|
|
2405
2405
|
}
|
|
2406
2406
|
}
|
|
2407
|
-
class
|
|
2407
|
+
class pi extends hr {
|
|
2408
2408
|
constructor(e, r) {
|
|
2409
2409
|
super();
|
|
2410
2410
|
c(this, "searchRequestMap", /* @__PURE__ */ new Map());
|
|
@@ -2436,7 +2436,7 @@ class ui extends lr {
|
|
|
2436
2436
|
return new Promise((s, n) => {
|
|
2437
2437
|
const a = new BMap.LocalSearch(e ?? this.map.innerMap, {
|
|
2438
2438
|
onSearchComplete: (h) => {
|
|
2439
|
-
Array.isArray(h) &&
|
|
2439
|
+
Array.isArray(h) && Wt("当前只支持一次搜索一条数据");
|
|
2440
2440
|
const o = a.getStatus();
|
|
2441
2441
|
switch (o) {
|
|
2442
2442
|
case BMAP_STATUS_SUCCESS: {
|
|
@@ -2470,7 +2470,7 @@ class ui extends lr {
|
|
|
2470
2470
|
});
|
|
2471
2471
|
}
|
|
2472
2472
|
}
|
|
2473
|
-
class
|
|
2473
|
+
class cr {
|
|
2474
2474
|
constructor(t, e) {
|
|
2475
2475
|
c(this, "onData");
|
|
2476
2476
|
c(this, "onError");
|
|
@@ -2482,26 +2482,26 @@ class hr {
|
|
|
2482
2482
|
* @mustCallSuper 子类必须调用一次`super.setSearchListener`, 用来保存{@link onData}和{@link onError}
|
|
2483
2483
|
* */
|
|
2484
2484
|
setSearchListener(t, e) {
|
|
2485
|
-
return this.onData && E("setSearchListener只能调用一次"), this.onData = t, this.onError = e,
|
|
2485
|
+
return this.onData && E("setSearchListener只能调用一次"), this.onData = t, this.onError = e, ye;
|
|
2486
2486
|
}
|
|
2487
2487
|
}
|
|
2488
|
-
class
|
|
2488
|
+
class gi extends cr {
|
|
2489
2489
|
constructor(e, r) {
|
|
2490
2490
|
super(e, r.input);
|
|
2491
2491
|
c(this, "searchBox");
|
|
2492
2492
|
this.searchBox = new google.maps.places.SearchBox(r.input), this.searchBox.bindTo("bounds", e.innerMap);
|
|
2493
2493
|
}
|
|
2494
2494
|
setSearchListener(e, r) {
|
|
2495
|
-
return super.setSearchListener(e, r),
|
|
2495
|
+
return super.setSearchListener(e, r), Ut(this.searchBox, "places_changed", () => {
|
|
2496
2496
|
const s = this.searchBox.getPlaces();
|
|
2497
|
-
e((s ?? []).map((n) =>
|
|
2497
|
+
e((s ?? []).map((n) => tr(n, this.map)));
|
|
2498
2498
|
});
|
|
2499
2499
|
}
|
|
2500
2500
|
search() {
|
|
2501
2501
|
this.input.value && (google.maps.event.trigger(this.input, "focus", {}), google.maps.event.trigger(this.input, "keydown", { keyCode: 13 }));
|
|
2502
2502
|
}
|
|
2503
2503
|
}
|
|
2504
|
-
class
|
|
2504
|
+
class mi extends cr {
|
|
2505
2505
|
constructor(e, r) {
|
|
2506
2506
|
super(e, r.input);
|
|
2507
2507
|
c(this, "autocomplete");
|
|
@@ -2520,8 +2520,8 @@ class gi extends hr {
|
|
|
2520
2520
|
this.placeService.search(e).then(this.onData, this.onError);
|
|
2521
2521
|
}
|
|
2522
2522
|
}
|
|
2523
|
-
var
|
|
2524
|
-
class
|
|
2523
|
+
var fi = /* @__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))(fi || {});
|
|
2524
|
+
class ot {
|
|
2525
2525
|
constructor(t) {
|
|
2526
2526
|
c(this, "latestInfoWindow");
|
|
2527
2527
|
/** 使用{@link setEventTargetDelegate}初始化 */
|
|
@@ -2574,7 +2574,7 @@ class nt {
|
|
|
2574
2574
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
2575
2575
|
* Released under the MIT License.
|
|
2576
2576
|
*/
|
|
2577
|
-
function
|
|
2577
|
+
function yi(i) {
|
|
2578
2578
|
return i != null && typeof i == "object" && Array.isArray(i) === !1;
|
|
2579
2579
|
}
|
|
2580
2580
|
/*!
|
|
@@ -2583,14 +2583,14 @@ function fi(i) {
|
|
|
2583
2583
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
2584
2584
|
* Released under the MIT License.
|
|
2585
2585
|
*/
|
|
2586
|
-
function
|
|
2587
|
-
return
|
|
2586
|
+
function St(i) {
|
|
2587
|
+
return yi(i) === !0 && Object.prototype.toString.call(i) === "[object Object]";
|
|
2588
2588
|
}
|
|
2589
|
-
function
|
|
2589
|
+
function dr(i) {
|
|
2590
2590
|
var t, e;
|
|
2591
|
-
return !(
|
|
2591
|
+
return !(St(i) === !1 || (t = i.constructor, typeof t != "function") || (e = t.prototype, St(e) === !1) || e.hasOwnProperty("isPrototypeOf") === !1);
|
|
2592
2592
|
}
|
|
2593
|
-
var
|
|
2593
|
+
var _e;
|
|
2594
2594
|
((i) => {
|
|
2595
2595
|
function t(h, o) {
|
|
2596
2596
|
return h.reduce((l, d) => (l[o(d)] = d, l), {});
|
|
@@ -2605,27 +2605,27 @@ var ye;
|
|
|
2605
2605
|
}
|
|
2606
2606
|
i.toJsonSafely = r;
|
|
2607
2607
|
function s(h) {
|
|
2608
|
-
|
|
2608
|
+
dr(h) && Object.keys(h).forEach((o) => {
|
|
2609
2609
|
h[o] === void 0 ? delete h[o] : s(h[o]);
|
|
2610
2610
|
});
|
|
2611
2611
|
}
|
|
2612
2612
|
i.deleteUndefinedPropertyOnPlainObjectDeeply = s;
|
|
2613
2613
|
function n(h, ...o) {
|
|
2614
|
-
const l =
|
|
2614
|
+
const l = At(o), d = {};
|
|
2615
2615
|
for (const u in h)
|
|
2616
2616
|
l(u) || (d[u] = h[u]);
|
|
2617
2617
|
return d;
|
|
2618
2618
|
}
|
|
2619
2619
|
i.omit = n;
|
|
2620
2620
|
function a(h, ...o) {
|
|
2621
|
-
const l =
|
|
2621
|
+
const l = At(o), d = {};
|
|
2622
2622
|
for (const u in h)
|
|
2623
2623
|
l(u) && (d[u] = h[u]);
|
|
2624
2624
|
return d;
|
|
2625
2625
|
}
|
|
2626
2626
|
i.pick = a;
|
|
2627
|
-
})(
|
|
2628
|
-
function
|
|
2627
|
+
})(_e || (_e = {}));
|
|
2628
|
+
function At(i) {
|
|
2629
2629
|
if (i.length <= 4)
|
|
2630
2630
|
return i.includes.bind(i);
|
|
2631
2631
|
{
|
|
@@ -2633,20 +2633,20 @@ function St(i) {
|
|
|
2633
2633
|
return t.has.bind(t);
|
|
2634
2634
|
}
|
|
2635
2635
|
}
|
|
2636
|
-
|
|
2637
|
-
const
|
|
2638
|
-
var
|
|
2636
|
+
_e.toJsonSafely;
|
|
2637
|
+
const vi = ["single", "multi"];
|
|
2638
|
+
var Z = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(Z || {}), Ye;
|
|
2639
2639
|
((i) => {
|
|
2640
2640
|
function t(e) {
|
|
2641
|
-
|
|
2641
|
+
_e.deleteUndefinedPropertyOnPlainObjectDeeply(e);
|
|
2642
2642
|
const r = { center: y.ZERO, zoom: 5 };
|
|
2643
|
-
return
|
|
2644
|
-
isMergeableObject:
|
|
2643
|
+
return jt(r, e || {}, {
|
|
2644
|
+
isMergeableObject: dr
|
|
2645
2645
|
});
|
|
2646
2646
|
}
|
|
2647
2647
|
i.create = t;
|
|
2648
|
-
})(
|
|
2649
|
-
class
|
|
2648
|
+
})(Ye || (Ye = {}));
|
|
2649
|
+
class ur {
|
|
2650
2650
|
constructor(t, e, r) {
|
|
2651
2651
|
c(this, "_delegate");
|
|
2652
2652
|
this.innerOverlay = t, this.coordType = e, this.map = r;
|
|
@@ -2664,7 +2664,7 @@ class dr {
|
|
|
2664
2664
|
this.map.removeOverlay(this);
|
|
2665
2665
|
}
|
|
2666
2666
|
}
|
|
2667
|
-
class
|
|
2667
|
+
class at extends ur {
|
|
2668
2668
|
constructor(t, e, r) {
|
|
2669
2669
|
super(t, e, r);
|
|
2670
2670
|
}
|
|
@@ -2678,12 +2678,12 @@ class ot extends dr {
|
|
|
2678
2678
|
this.innerOverlay.setVisible(t);
|
|
2679
2679
|
}
|
|
2680
2680
|
}
|
|
2681
|
-
class
|
|
2681
|
+
class ze extends ur {
|
|
2682
2682
|
constructor(t, e, r) {
|
|
2683
2683
|
super(t, e, r);
|
|
2684
2684
|
}
|
|
2685
2685
|
createDelegate() {
|
|
2686
|
-
return new
|
|
2686
|
+
return new ae(this.innerOverlay, this.map);
|
|
2687
2687
|
}
|
|
2688
2688
|
/** 仅限内部使用; 设为private时, 生成的d.ts文件中, 方法返回值会变成any, 故改成了public */
|
|
2689
2689
|
get overlay() {
|
|
@@ -2700,7 +2700,7 @@ class $e extends dr {
|
|
|
2700
2700
|
return t !== void 0 && (t || this.setVisible(!1)), this;
|
|
2701
2701
|
}
|
|
2702
2702
|
}
|
|
2703
|
-
class
|
|
2703
|
+
class pr extends ze {
|
|
2704
2704
|
constructor(t, e, r, s) {
|
|
2705
2705
|
super(t, e, r), this.state = s;
|
|
2706
2706
|
}
|
|
@@ -2726,7 +2726,7 @@ class ur extends $e {
|
|
|
2726
2726
|
this.innerOverlay.setFillOpacity(t);
|
|
2727
2727
|
}
|
|
2728
2728
|
}
|
|
2729
|
-
class
|
|
2729
|
+
class Ne extends at {
|
|
2730
2730
|
isEditable() {
|
|
2731
2731
|
return this.innerOverlay.getEditable();
|
|
2732
2732
|
}
|
|
@@ -2749,7 +2749,7 @@ class De extends ot {
|
|
|
2749
2749
|
this.innerOverlay.setOptions({ fillOpacity: t });
|
|
2750
2750
|
}
|
|
2751
2751
|
}
|
|
2752
|
-
class
|
|
2752
|
+
class lt extends pr {
|
|
2753
2753
|
constructor() {
|
|
2754
2754
|
super(...arguments);
|
|
2755
2755
|
c(this, "prevCenter");
|
|
@@ -2780,13 +2780,13 @@ class at extends ur {
|
|
|
2780
2780
|
strokeWeight: e.strokeWeight,
|
|
2781
2781
|
fillColor: e.fillColor,
|
|
2782
2782
|
fillOpacity: e.fillOpacity
|
|
2783
|
-
}), n = new
|
|
2783
|
+
}), n = new lt(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
|
|
2784
2784
|
return n.state.editable && setTimeout(() => {
|
|
2785
2785
|
n.state.editable && s.enableEditing();
|
|
2786
2786
|
}, 0), n;
|
|
2787
2787
|
}
|
|
2788
2788
|
createDelegate() {
|
|
2789
|
-
return this.eventHubDelegate = new
|
|
2789
|
+
return this.eventHubDelegate = new De(super.createDelegate(), {
|
|
2790
2790
|
types: ["radius-changed", "center-changed"],
|
|
2791
2791
|
onListen: (e) => {
|
|
2792
2792
|
e === "radius-changed" ? (this.prevRadius = this.innerOverlay.getRadius(), this.innerOverlay.addEventListener("lineupdate", this.onRadiusChanged)) : (this.prevCenter = this.innerOverlay.getCenter(), this.innerOverlay.addEventListener("lineupdate", this.onCenterChanged));
|
|
@@ -2811,7 +2811,7 @@ class at extends ur {
|
|
|
2811
2811
|
return this.innerOverlay.getRadius();
|
|
2812
2812
|
}
|
|
2813
2813
|
}
|
|
2814
|
-
class
|
|
2814
|
+
class ht extends Ne {
|
|
2815
2815
|
static create(t) {
|
|
2816
2816
|
const e = this.coordType, r = new google.maps.Circle({
|
|
2817
2817
|
center: t.center.toGoogle(e),
|
|
@@ -2825,7 +2825,7 @@ class lt extends De {
|
|
|
2825
2825
|
fillOpacity: t.fillOpacity,
|
|
2826
2826
|
visible: t.visible
|
|
2827
2827
|
});
|
|
2828
|
-
return new
|
|
2828
|
+
return new ht(r, e, this);
|
|
2829
2829
|
}
|
|
2830
2830
|
setCenter(t) {
|
|
2831
2831
|
this.coordType = this.map.coordType, this.innerOverlay.setCenter(t.toGoogle(this.coordType));
|
|
@@ -2840,10 +2840,10 @@ class lt extends De {
|
|
|
2840
2840
|
return this.innerOverlay.getRadius();
|
|
2841
2841
|
}
|
|
2842
2842
|
}
|
|
2843
|
-
function
|
|
2843
|
+
function gr() {
|
|
2844
2844
|
BMap.OverlayV3 || (BMap.OverlayV3 = BMap.Overlay);
|
|
2845
2845
|
}
|
|
2846
|
-
const
|
|
2846
|
+
const Rt = {
|
|
2847
2847
|
/** {@link BMap.Point.equals} 无效, 故需要自己写一个 */
|
|
2848
2848
|
equals(i, t) {
|
|
2849
2849
|
return i.lat === t.lat && i.lng === t.lng;
|
|
@@ -2853,12 +2853,12 @@ var q;
|
|
|
2853
2853
|
((i) => {
|
|
2854
2854
|
i.ZERO = { x: 0, y: 0 };
|
|
2855
2855
|
})(q || (q = {}));
|
|
2856
|
-
let
|
|
2857
|
-
function
|
|
2858
|
-
return
|
|
2856
|
+
let He;
|
|
2857
|
+
function _i(i, t, e, r, s, n) {
|
|
2858
|
+
return He || (He = bi()), new He(i, t, e, r, s, n);
|
|
2859
2859
|
}
|
|
2860
|
-
function
|
|
2861
|
-
|
|
2860
|
+
function bi() {
|
|
2861
|
+
gr();
|
|
2862
2862
|
const i = new BMap.Point(0, 0);
|
|
2863
2863
|
return class extends BMap.OverlayV3 {
|
|
2864
2864
|
constructor(r, s = i, n = q.ZERO, a, h = 654, o = "") {
|
|
@@ -2924,7 +2924,7 @@ function _i() {
|
|
|
2924
2924
|
}
|
|
2925
2925
|
};
|
|
2926
2926
|
}
|
|
2927
|
-
class
|
|
2927
|
+
class ct {
|
|
2928
2928
|
constructor(t) {
|
|
2929
2929
|
this.delegate = t, this.delegate.setTarget(this);
|
|
2930
2930
|
}
|
|
@@ -2935,9 +2935,9 @@ class ht {
|
|
|
2935
2935
|
this.delegate.removeEventListener(t, e);
|
|
2936
2936
|
}
|
|
2937
2937
|
}
|
|
2938
|
-
class
|
|
2938
|
+
class dt extends ct {
|
|
2939
2939
|
constructor(t, e, r) {
|
|
2940
|
-
super(new
|
|
2940
|
+
super(new ae(t, e)), this.inner = t, this.map = e, this.state = r;
|
|
2941
2941
|
}
|
|
2942
2942
|
static create(t) {
|
|
2943
2943
|
const e = t.position || y.ZERO, r = new BMap.InfoWindow(t.content, {
|
|
@@ -2945,7 +2945,7 @@ class ct extends ht {
|
|
|
2945
2945
|
offset: t.offset && new BMap.Size(t.offset.x, t.offset.y),
|
|
2946
2946
|
enableAutoPan: !t.disableAutoPan
|
|
2947
2947
|
});
|
|
2948
|
-
return new
|
|
2948
|
+
return new dt(r, this, { position: e });
|
|
2949
2949
|
}
|
|
2950
2950
|
isOpen() {
|
|
2951
2951
|
return this.inner.isOpen();
|
|
@@ -2964,10 +2964,10 @@ class ct extends ht {
|
|
|
2964
2964
|
this.state.position = t, this.inner.isOpen() && this.open();
|
|
2965
2965
|
}
|
|
2966
2966
|
}
|
|
2967
|
-
class
|
|
2967
|
+
class ut extends ct {
|
|
2968
2968
|
constructor(e, r) {
|
|
2969
2969
|
super(new ee(e, r));
|
|
2970
|
-
c(this, "eventHub", new
|
|
2970
|
+
c(this, "eventHub", new Yt());
|
|
2971
2971
|
c(this, "isOpened", !1);
|
|
2972
2972
|
this.inner = e, this.map = r, e.addListener("closeclick", () => {
|
|
2973
2973
|
this.isOpened = !1, this.eventHub.hasListener("close") && this.eventHub.notify({ type: "close", target: this });
|
|
@@ -2984,7 +2984,7 @@ class dt extends ht {
|
|
|
2984
2984
|
position: r.toGoogle(this.coordType),
|
|
2985
2985
|
disableAutoPan: e.disableAutoPan
|
|
2986
2986
|
});
|
|
2987
|
-
return new
|
|
2987
|
+
return new ut(s, this);
|
|
2988
2988
|
}
|
|
2989
2989
|
isOpen() {
|
|
2990
2990
|
return this.isOpened;
|
|
@@ -3022,13 +3022,13 @@ class dt extends ht {
|
|
|
3022
3022
|
this.inner.setPosition(e.toGoogle(this.map.coordType));
|
|
3023
3023
|
}
|
|
3024
3024
|
}
|
|
3025
|
-
class
|
|
3025
|
+
class pt extends ze {
|
|
3026
3026
|
constructor(t, e, r) {
|
|
3027
3027
|
super(t, e, r), this.baiduMap = r;
|
|
3028
3028
|
}
|
|
3029
3029
|
static create(t) {
|
|
3030
3030
|
var s;
|
|
3031
|
-
const e = this.coordType, r =
|
|
3031
|
+
const e = this.coordType, r = _i(
|
|
3032
3032
|
t.content,
|
|
3033
3033
|
(s = t.position) == null ? void 0 : s.toBaidu(e),
|
|
3034
3034
|
t.offset,
|
|
@@ -3036,7 +3036,7 @@ class ut extends $e {
|
|
|
3036
3036
|
t.maxWidth,
|
|
3037
3037
|
t.borderClass
|
|
3038
3038
|
);
|
|
3039
|
-
return new
|
|
3039
|
+
return new pt(r, e, this);
|
|
3040
3040
|
}
|
|
3041
3041
|
open(t) {
|
|
3042
3042
|
this.innerOverlay.open(this.baiduMap.innerMap, t == null ? void 0 : t.innerOverlay);
|
|
@@ -3057,7 +3057,7 @@ class ut extends $e {
|
|
|
3057
3057
|
this.innerOverlay.setZIndex(t);
|
|
3058
3058
|
}
|
|
3059
3059
|
}
|
|
3060
|
-
class
|
|
3060
|
+
class gt extends ct {
|
|
3061
3061
|
constructor(t, e, r) {
|
|
3062
3062
|
super(new ee(t, r)), this.inner = t, this.coordType = e, this.map = r;
|
|
3063
3063
|
}
|
|
@@ -3074,7 +3074,7 @@ class pt extends ht {
|
|
|
3074
3074
|
var h;
|
|
3075
3075
|
const a = (h = t.content.parentElement) == null ? void 0 : h.parentElement;
|
|
3076
3076
|
a && a.className.includes("gm-style-iw-c") && !a.className.includes(s) && (a.className += ` ${s}`);
|
|
3077
|
-
}), new
|
|
3077
|
+
}), new gt(r, e, this);
|
|
3078
3078
|
}
|
|
3079
3079
|
open(t) {
|
|
3080
3080
|
this.inner.open(this.map.innerMap, t == null ? void 0 : t.innerOverlay);
|
|
@@ -3102,7 +3102,7 @@ class pt extends ht {
|
|
|
3102
3102
|
this.inner.setZIndex(t);
|
|
3103
3103
|
}
|
|
3104
3104
|
}
|
|
3105
|
-
var
|
|
3105
|
+
var be;
|
|
3106
3106
|
((i) => {
|
|
3107
3107
|
function t(s, n) {
|
|
3108
3108
|
if (s !== void 0)
|
|
@@ -3119,24 +3119,130 @@ var ve;
|
|
|
3119
3119
|
return s.replace(/([^A-Z]?)([A-Z])/g, (n, a, h) => a ? `${a}-${h.toLowerCase()}` : h.toLowerCase());
|
|
3120
3120
|
}
|
|
3121
3121
|
i.pascal2kebab = r;
|
|
3122
|
-
})(
|
|
3123
|
-
const
|
|
3122
|
+
})(be || (be = {}));
|
|
3123
|
+
const Mi = {
|
|
3124
3124
|
/** @see https://nodejs.org/docs/v10.3.0/api/path.html#path_path_basename_path_ext */
|
|
3125
3125
|
basename(i, t) {
|
|
3126
3126
|
const e = i.endsWith("/") ? i.slice(0, -1) : i, r = e.lastIndexOf("/"), s = r >= 0 ? e.substring(r + 1) : e;
|
|
3127
3127
|
return t && s.endsWith(t) ? s.slice(0, -t.length) : s;
|
|
3128
3128
|
}
|
|
3129
3129
|
};
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3130
|
+
var Me = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overlayMouseTarget = "overlayMouseTarget", i.float = "float", i))(Me || {}), Te;
|
|
3131
|
+
((i) => {
|
|
3132
|
+
function t(r, s) {
|
|
3133
|
+
switch (r) {
|
|
3134
|
+
case "float":
|
|
3135
|
+
return s.floatPane;
|
|
3136
|
+
case "overlayMouseTarget":
|
|
3137
|
+
return s.overlayMouseTarget;
|
|
3138
|
+
case "overlay":
|
|
3139
|
+
return s.overlayLayer;
|
|
3140
|
+
case "map":
|
|
3141
|
+
return s.mapPane;
|
|
3142
|
+
default:
|
|
3143
|
+
Fe(r);
|
|
3144
|
+
}
|
|
3145
|
+
}
|
|
3146
|
+
i.toGoogle = t;
|
|
3147
|
+
function e(r, s) {
|
|
3148
|
+
switch (r) {
|
|
3149
|
+
case "float":
|
|
3150
|
+
return s.floatPane;
|
|
3151
|
+
case "overlayMouseTarget":
|
|
3152
|
+
return s.markerMouseTarget;
|
|
3153
|
+
case "overlay":
|
|
3154
|
+
return s.markerPane;
|
|
3155
|
+
case "map":
|
|
3156
|
+
return s.mapPane;
|
|
3157
|
+
default:
|
|
3158
|
+
Fe(r);
|
|
3159
|
+
}
|
|
3160
|
+
}
|
|
3161
|
+
i.toBaidu = e;
|
|
3162
|
+
})(Te || (Te = {}));
|
|
3163
|
+
class Ti {
|
|
3164
|
+
constructor(t, e) {
|
|
3165
|
+
c(this, "baidu");
|
|
3166
|
+
c(this, "google");
|
|
3167
|
+
c(this, "projection");
|
|
3168
|
+
c(this, "element", void 0);
|
|
3169
|
+
c(this, "mapPane");
|
|
3170
|
+
this.map = t, this.mapPane = e.mapPane;
|
|
3171
|
+
}
|
|
3172
|
+
create() {
|
|
3173
|
+
return this.element = this.onCreate(), this.element.className += " element-overlay", this.element;
|
|
3174
|
+
}
|
|
3175
|
+
draw() {
|
|
3176
|
+
this.projection && this.onDraw(this.projection);
|
|
3177
|
+
}
|
|
3178
|
+
getProjection() {
|
|
3179
|
+
return this.projection;
|
|
3180
|
+
}
|
|
3181
|
+
asBaidu() {
|
|
3182
|
+
if (!this.baidu) {
|
|
3183
|
+
const t = this;
|
|
3184
|
+
gr();
|
|
3185
|
+
class e extends BMap.OverlayV3 {
|
|
3186
|
+
initialize(n) {
|
|
3187
|
+
var o;
|
|
3188
|
+
const a = t.create(), h = n.getPanes();
|
|
3189
|
+
return (o = Te.toBaidu(t.mapPane, h)) == null || o.appendChild(a), a;
|
|
3190
|
+
}
|
|
3191
|
+
draw() {
|
|
3192
|
+
t.draw();
|
|
3193
|
+
}
|
|
3194
|
+
}
|
|
3195
|
+
this.baidu = new e();
|
|
3196
|
+
const r = t.map.innerMap;
|
|
3197
|
+
this.projection = {
|
|
3198
|
+
fromLatLngToOverlayPoint(s) {
|
|
3199
|
+
return r.pointToOverlayPixel(s.toBaidu(t.map.coordType));
|
|
3200
|
+
},
|
|
3201
|
+
fromOverlayPointToLatLng(s) {
|
|
3202
|
+
return y.fromBaidu(r.overlayPixelToPoint(new BMap.Pixel(s.x, s.y)), t.map.coordType);
|
|
3203
|
+
}
|
|
3204
|
+
};
|
|
3205
|
+
}
|
|
3206
|
+
return this.baidu;
|
|
3207
|
+
}
|
|
3208
|
+
asGoogle() {
|
|
3209
|
+
if (!this.google) {
|
|
3210
|
+
const t = this;
|
|
3211
|
+
class e extends google.maps.OverlayView {
|
|
3212
|
+
onAdd() {
|
|
3213
|
+
const s = t.create(), n = this.getPanes() ?? E("onAdd回调中一定会有panes");
|
|
3214
|
+
Te.toGoogle(t.mapPane, n).appendChild(s);
|
|
3215
|
+
}
|
|
3216
|
+
draw() {
|
|
3217
|
+
t.draw();
|
|
3218
|
+
}
|
|
3219
|
+
onRemove() {
|
|
3220
|
+
var s;
|
|
3221
|
+
(s = t.element.parentNode) == null || s.removeChild(t.element);
|
|
3222
|
+
}
|
|
3223
|
+
}
|
|
3224
|
+
this.google = new e(), this.projection = {
|
|
3225
|
+
fromLatLngToOverlayPoint(r) {
|
|
3226
|
+
return t.google.getProjection().fromLatLngToDivPixel(r.toGoogle(t.map.coordType)) ?? q.ZERO;
|
|
3227
|
+
},
|
|
3228
|
+
fromOverlayPointToLatLng(r) {
|
|
3229
|
+
return y.fromGoogle(t.google.getProjection().fromDivPixelToLatLng(new google.maps.Point(r.x, r.y)) ?? Y.LATLNG_ZERO, t.map.coordType);
|
|
3230
|
+
}
|
|
3231
|
+
};
|
|
3232
|
+
}
|
|
3233
|
+
return this.google;
|
|
3234
|
+
}
|
|
3133
3235
|
}
|
|
3134
|
-
|
|
3236
|
+
let je;
|
|
3237
|
+
function Oi(i, t, e, r, s) {
|
|
3238
|
+
return je || (je = Ci()), new je(i, t, e, r, s);
|
|
3239
|
+
}
|
|
3240
|
+
function Ci() {
|
|
3135
3241
|
return class extends google.maps.OverlayView {
|
|
3136
|
-
constructor(e, r, s, n) {
|
|
3242
|
+
constructor(e, r, s, n = Me.overlayMouseTarget, a) {
|
|
3137
3243
|
super();
|
|
3138
3244
|
c(this, "container");
|
|
3139
|
-
this.position = r, this.offset = s, this.
|
|
3245
|
+
this.position = r, this.offset = s, this._mapPane = n, this.container = document.createElement("div"), this.container.className = "label-container", this.container.style.position = "absolute", a && this.setZIndex(a), this.container.addEventListener("click", () => {
|
|
3140
3246
|
google.maps.event.trigger(this, "click");
|
|
3141
3247
|
}), this.setElement(e);
|
|
3142
3248
|
}
|
|
@@ -3149,7 +3255,7 @@ function Ti() {
|
|
|
3149
3255
|
}
|
|
3150
3256
|
onAdd() {
|
|
3151
3257
|
const e = this.getPanes() ?? E("onAdd回调中一定能够获取panes");
|
|
3152
|
-
|
|
3258
|
+
Te.toGoogle(this._mapPane, e).appendChild(this.container);
|
|
3153
3259
|
}
|
|
3154
3260
|
draw() {
|
|
3155
3261
|
var e, r;
|
|
@@ -3185,7 +3291,7 @@ function Ti() {
|
|
|
3185
3291
|
}
|
|
3186
3292
|
};
|
|
3187
3293
|
}
|
|
3188
|
-
var
|
|
3294
|
+
var de;
|
|
3189
3295
|
((i) => {
|
|
3190
3296
|
function t(r) {
|
|
3191
3297
|
return typeof r == "string" ? r : r.outerHTML;
|
|
@@ -3199,8 +3305,8 @@ var he;
|
|
|
3199
3305
|
return r;
|
|
3200
3306
|
}
|
|
3201
3307
|
i.toElement = e;
|
|
3202
|
-
})(
|
|
3203
|
-
class
|
|
3308
|
+
})(de || (de = {}));
|
|
3309
|
+
class mt extends ze {
|
|
3204
3310
|
constructor(e, r, s, n) {
|
|
3205
3311
|
super(e, r, s);
|
|
3206
3312
|
c(this, "icon");
|
|
@@ -3211,7 +3317,7 @@ class gt extends $e {
|
|
|
3211
3317
|
}
|
|
3212
3318
|
static create(e) {
|
|
3213
3319
|
var a;
|
|
3214
|
-
const r = this.coordType, s = new BMap.Label(
|
|
3320
|
+
const r = this.coordType, s = new BMap.Label(de.toString(e.content), {
|
|
3215
3321
|
position: (a = e.position) == null ? void 0 : a.toBaidu(r),
|
|
3216
3322
|
offset: e.offset && new BMap.Size(e.offset.x, e.offset.y)
|
|
3217
3323
|
});
|
|
@@ -3220,7 +3326,7 @@ class gt extends $e {
|
|
|
3220
3326
|
padding: "0px",
|
|
3221
3327
|
backgroundColor: "unset"
|
|
3222
3328
|
});
|
|
3223
|
-
const n = new
|
|
3329
|
+
const n = new mt(s, r, this, e.content);
|
|
3224
3330
|
return s.__label__ = n, n;
|
|
3225
3331
|
}
|
|
3226
3332
|
setContentInternal(e, r = !1) {
|
|
@@ -3231,7 +3337,7 @@ class gt extends $e {
|
|
|
3231
3337
|
characterData: !0,
|
|
3232
3338
|
childList: !0,
|
|
3233
3339
|
subtree: !0
|
|
3234
|
-
})), r || this.innerOverlay.setContent(
|
|
3340
|
+
})), r || this.innerOverlay.setContent(de.toString(e)), this.content = e);
|
|
3235
3341
|
}
|
|
3236
3342
|
setZIndex(e) {
|
|
3237
3343
|
this.innerOverlay.setZIndex(e);
|
|
@@ -3273,7 +3379,7 @@ class gt extends $e {
|
|
|
3273
3379
|
height: e.style.anchor.height + o.y
|
|
3274
3380
|
}, process.env.NODE_ENV !== "production" && setTimeout(() => {
|
|
3275
3381
|
var u, p;
|
|
3276
|
-
if (
|
|
3382
|
+
if (oe(e.__icon__, `${e}必须是由'SymbolIcon.toBaidu()'创建的`), !e.anchor) {
|
|
3277
3383
|
console.log("BaiduLabelOverlay.attachIcon", "Bmap.Symbol.anchor尚未计算完成");
|
|
3278
3384
|
return;
|
|
3279
3385
|
}
|
|
@@ -3286,7 +3392,7 @@ class gt extends $e {
|
|
|
3286
3392
|
e.__icon__.scale,
|
|
3287
3393
|
e.__icon__.strokeWeight
|
|
3288
3394
|
].map((_) => _ ?? "").join(",");
|
|
3289
|
-
console.warn("BaiduLabelOverlay.attachIcon", e.__icon__,
|
|
3395
|
+
console.warn("BaiduLabelOverlay.attachIcon", e.__icon__, be.trimIndent(
|
|
3290
3396
|
`
|
|
3291
3397
|
为了保证Label的位置正确, 请将SymbolIcon(${b})中baiduLabelOffset的值改写成:
|
|
3292
3398
|
${JSON.stringify({ x: l, y: d })}
|
|
@@ -3300,22 +3406,23 @@ class gt extends $e {
|
|
|
3300
3406
|
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;
|
|
3301
3407
|
}
|
|
3302
3408
|
}
|
|
3303
|
-
class
|
|
3409
|
+
class ft extends at {
|
|
3304
3410
|
static create(t) {
|
|
3305
3411
|
var s;
|
|
3306
|
-
const e = this.coordType, r =
|
|
3307
|
-
|
|
3412
|
+
const e = this.coordType, r = Oi(
|
|
3413
|
+
de.toElement(t.content),
|
|
3308
3414
|
(s = t.position) == null ? void 0 : s.toGoogle(e),
|
|
3309
3415
|
t.offset,
|
|
3416
|
+
t.mapPane,
|
|
3310
3417
|
t.zIndex
|
|
3311
3418
|
);
|
|
3312
|
-
return new
|
|
3419
|
+
return new ft(r, e, this);
|
|
3313
3420
|
}
|
|
3314
3421
|
setZIndex(t) {
|
|
3315
3422
|
this.innerOverlay.setZIndex(t);
|
|
3316
3423
|
}
|
|
3317
3424
|
setContent(t) {
|
|
3318
|
-
this.innerOverlay.setElement(
|
|
3425
|
+
this.innerOverlay.setElement(de.toElement(t));
|
|
3319
3426
|
}
|
|
3320
3427
|
getPosition() {
|
|
3321
3428
|
const t = this.innerOverlay.getPosition();
|
|
@@ -3331,11 +3438,11 @@ class mt extends ot {
|
|
|
3331
3438
|
this.innerOverlay.setOffset(t);
|
|
3332
3439
|
}
|
|
3333
3440
|
}
|
|
3334
|
-
const
|
|
3335
|
-
toGoogle: (i) => "url" in i ?
|
|
3336
|
-
toBaidu: (i) => "url" in i ?
|
|
3441
|
+
const Be = {
|
|
3442
|
+
toGoogle: (i) => "url" in i ? Ie.toGoogle(i) : Se.toGoogle(i),
|
|
3443
|
+
toBaidu: (i) => "url" in i ? Ie.toBaidu(i) : Se.toBaidu(i)
|
|
3337
3444
|
};
|
|
3338
|
-
var
|
|
3445
|
+
var Ie;
|
|
3339
3446
|
((i) => {
|
|
3340
3447
|
function t(r) {
|
|
3341
3448
|
return {
|
|
@@ -3359,8 +3466,8 @@ var ke;
|
|
|
3359
3466
|
});
|
|
3360
3467
|
}
|
|
3361
3468
|
i.toBaidu = e;
|
|
3362
|
-
})(
|
|
3363
|
-
var
|
|
3469
|
+
})(Ie || (Ie = {}));
|
|
3470
|
+
var Se;
|
|
3364
3471
|
((i) => {
|
|
3365
3472
|
function t(r) {
|
|
3366
3473
|
return {
|
|
@@ -3391,22 +3498,22 @@ var Be;
|
|
|
3391
3498
|
return s.__icon__ = r, s;
|
|
3392
3499
|
}
|
|
3393
3500
|
i.toBaidu = e;
|
|
3394
|
-
})(
|
|
3395
|
-
const
|
|
3501
|
+
})(Se || (Se = {}));
|
|
3502
|
+
const bs = {
|
|
3396
3503
|
CIRCLE: { baidu: () => BMap_Symbol_SHAPE_CIRCLE, google: () => google.maps.SymbolPath.CIRCLE },
|
|
3397
3504
|
BACKWARD_CLOSED_ARROW: { baidu: () => BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW, google: () => google.maps.SymbolPath.BACKWARD_CLOSED_ARROW },
|
|
3398
3505
|
BACKWARD_OPEN_ARROW: { baidu: () => BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW, google: () => google.maps.SymbolPath.BACKWARD_OPEN_ARROW },
|
|
3399
3506
|
FORWARD_CLOSED_ARROW: { baidu: () => BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW, google: () => google.maps.SymbolPath.FORWARD_CLOSED_ARROW },
|
|
3400
3507
|
FORWARD_OPEN_ARROW: { baidu: () => BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW, google: () => google.maps.SymbolPath.FORWARD_OPEN_ARROW }
|
|
3401
3508
|
};
|
|
3402
|
-
class
|
|
3509
|
+
class Oe extends ze {
|
|
3403
3510
|
constructor(t, e, r, s) {
|
|
3404
3511
|
super(t, e, r), this.state = s;
|
|
3405
3512
|
}
|
|
3406
3513
|
static create(t) {
|
|
3407
3514
|
const e = this.coordType, r = t.icon, s = {
|
|
3408
3515
|
title: t.title,
|
|
3409
|
-
icon: r &&
|
|
3516
|
+
icon: r && Be.toBaidu(r),
|
|
3410
3517
|
enableClicking: t.clickable,
|
|
3411
3518
|
enableDragging: t.draggable,
|
|
3412
3519
|
// baidu的raiseOnDrag属性, 默认为false, 而我们的options.crossOnDrag默认为true, 故这里需要转换下
|
|
@@ -3415,7 +3522,7 @@ class _e extends $e {
|
|
|
3415
3522
|
}, n = new BMap.Marker(t.position.toBaidu(e), s);
|
|
3416
3523
|
t.zIndex !== void 0 && n.setZIndex(t.zIndex);
|
|
3417
3524
|
const a = t.clickable === void 0 ? !0 : t.clickable, h = !!t.draggable;
|
|
3418
|
-
return new
|
|
3525
|
+
return new Oe(n, e, this, { clickable: a, draggable: h, zIndex: t.zIndex }).visibleOptionInternal(t.visible);
|
|
3419
3526
|
}
|
|
3420
3527
|
getPosition() {
|
|
3421
3528
|
return y.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
|
|
@@ -3431,7 +3538,7 @@ class _e extends $e {
|
|
|
3431
3538
|
return this.innerOverlay.getTitle();
|
|
3432
3539
|
}
|
|
3433
3540
|
setIcon(t) {
|
|
3434
|
-
const e =
|
|
3541
|
+
const e = Be.toBaidu(t);
|
|
3435
3542
|
this.innerOverlay.setIcon(e);
|
|
3436
3543
|
const r = this.getLabel();
|
|
3437
3544
|
r && r.attachIcon(e);
|
|
@@ -3466,7 +3573,7 @@ class _e extends $e {
|
|
|
3466
3573
|
return (t = this.innerOverlay.getLabel()) == null ? void 0 : t.__label__;
|
|
3467
3574
|
}
|
|
3468
3575
|
}
|
|
3469
|
-
class
|
|
3576
|
+
class yt extends at {
|
|
3470
3577
|
constructor() {
|
|
3471
3578
|
super(...arguments);
|
|
3472
3579
|
c(this, "label");
|
|
@@ -3480,7 +3587,7 @@ class ft extends ot {
|
|
|
3480
3587
|
title: e.title,
|
|
3481
3588
|
zIndex: e.zIndex,
|
|
3482
3589
|
visible: e.visible,
|
|
3483
|
-
icon: s &&
|
|
3590
|
+
icon: s && Be.toGoogle(s),
|
|
3484
3591
|
clickable: e.clickable,
|
|
3485
3592
|
draggable: e.draggable,
|
|
3486
3593
|
// google的crossOnDrag和我们的crossOnDrag是匹配的, 不需要转换
|
|
@@ -3489,7 +3596,7 @@ class ft extends ot {
|
|
|
3489
3596
|
// InfoWindow相对marker的position的偏移量, 若不指定, 则偏移到marker的icon的上部中央
|
|
3490
3597
|
anchorPoint: new google.maps.Point(0, 0)
|
|
3491
3598
|
};
|
|
3492
|
-
return new
|
|
3599
|
+
return new yt(new google.maps.Marker(n), r, this);
|
|
3493
3600
|
}
|
|
3494
3601
|
getPosition() {
|
|
3495
3602
|
return y.fromGoogle(this.innerOverlay.getPosition(), this.coordType);
|
|
@@ -3504,7 +3611,7 @@ class ft extends ot {
|
|
|
3504
3611
|
return this.innerOverlay.getTitle() || "";
|
|
3505
3612
|
}
|
|
3506
3613
|
setIcon(e) {
|
|
3507
|
-
this.innerOverlay.setIcon(
|
|
3614
|
+
this.innerOverlay.setIcon(Be.toGoogle(e));
|
|
3508
3615
|
}
|
|
3509
3616
|
getIcon() {
|
|
3510
3617
|
return this.innerOverlay.getIcon();
|
|
@@ -3542,7 +3649,7 @@ class ft extends ot {
|
|
|
3542
3649
|
this.label = void 0, this.labelPositionListener = void 0, this.labelVisibleListener = void 0, this.labelMapChangedListener = void 0;
|
|
3543
3650
|
}
|
|
3544
3651
|
}
|
|
3545
|
-
class
|
|
3652
|
+
class vt extends pr {
|
|
3546
3653
|
constructor() {
|
|
3547
3654
|
super(...arguments);
|
|
3548
3655
|
c(this, "eventHubDelegate");
|
|
@@ -3567,7 +3674,7 @@ class yt extends ur {
|
|
|
3567
3674
|
this.isDoingSetPath = !0, this.innerOverlay.setPath(e), this.isDoingSetPath = !1;
|
|
3568
3675
|
}
|
|
3569
3676
|
createDelegate() {
|
|
3570
|
-
return this.eventHubDelegate = new
|
|
3677
|
+
return this.eventHubDelegate = new De(super.createDelegate(), {
|
|
3571
3678
|
types: [this.pathEditedEventType],
|
|
3572
3679
|
onListen: () => {
|
|
3573
3680
|
this.prevPath = this.innerOverlay.getPath(), this.innerOverlay.addEventListener("lineupdate", this.onLineUpdate);
|
|
@@ -3578,7 +3685,7 @@ class yt extends ur {
|
|
|
3578
3685
|
});
|
|
3579
3686
|
}
|
|
3580
3687
|
}
|
|
3581
|
-
class
|
|
3688
|
+
class _t extends vt {
|
|
3582
3689
|
constructor() {
|
|
3583
3690
|
super(...arguments);
|
|
3584
3691
|
c(this, "pathEditedEventType", "path-edited");
|
|
@@ -3591,7 +3698,7 @@ class vt extends yt {
|
|
|
3591
3698
|
strokeOpacity: e.strokeOpacity,
|
|
3592
3699
|
strokeWeight: e.strokeWeight
|
|
3593
3700
|
});
|
|
3594
|
-
return new
|
|
3701
|
+
return new _t(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
|
|
3595
3702
|
}
|
|
3596
3703
|
getPath() {
|
|
3597
3704
|
return this.innerOverlay.getPath().map((e) => y.fromBaidu(e, this.coordType));
|
|
@@ -3600,7 +3707,7 @@ class vt extends yt {
|
|
|
3600
3707
|
this.coordType = this.map.coordType, this.setPathInternal(e.map((r) => r.toBaidu(this.coordType)));
|
|
3601
3708
|
}
|
|
3602
3709
|
}
|
|
3603
|
-
class
|
|
3710
|
+
class bt extends Ne {
|
|
3604
3711
|
constructor() {
|
|
3605
3712
|
super(...arguments);
|
|
3606
3713
|
c(this, "pathChangedListeners");
|
|
@@ -3616,21 +3723,21 @@ class _t extends De {
|
|
|
3616
3723
|
strokeWeight: e.strokeWeight,
|
|
3617
3724
|
visible: e.visible
|
|
3618
3725
|
});
|
|
3619
|
-
return new
|
|
3726
|
+
return new bt(s, r, this);
|
|
3620
3727
|
}
|
|
3621
3728
|
setupPathChangedListeners() {
|
|
3622
3729
|
const e = () => {
|
|
3623
3730
|
var s;
|
|
3624
3731
|
return (s = this.eventHubDelegate) == null ? void 0 : s.notify({ type: "path-edited", target: this });
|
|
3625
3732
|
}, r = this.innerOverlay.getPath();
|
|
3626
|
-
this.pathChangedListeners =
|
|
3733
|
+
this.pathChangedListeners = ce.listenChanged(r, e);
|
|
3627
3734
|
}
|
|
3628
3735
|
clearPathChangedListeners() {
|
|
3629
3736
|
var e;
|
|
3630
3737
|
(e = this.pathChangedListeners) == null || e.forEach((r) => r.remove()), this.pathChangedListeners = void 0;
|
|
3631
3738
|
}
|
|
3632
3739
|
createDelegate() {
|
|
3633
|
-
return this.eventHubDelegate = new
|
|
3740
|
+
return this.eventHubDelegate = new De(super.createDelegate(), {
|
|
3634
3741
|
types: ["path-edited"],
|
|
3635
3742
|
onListen: () => this.setupPathChangedListeners(),
|
|
3636
3743
|
onCancel: () => this.clearPathChangedListeners()
|
|
@@ -3647,7 +3754,7 @@ class _t extends De {
|
|
|
3647
3754
|
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();
|
|
3648
3755
|
}
|
|
3649
3756
|
}
|
|
3650
|
-
class
|
|
3757
|
+
class Mt extends vt {
|
|
3651
3758
|
constructor() {
|
|
3652
3759
|
super(...arguments);
|
|
3653
3760
|
c(this, "pathEditedEventType", "paths-edited");
|
|
@@ -3664,7 +3771,7 @@ class bt extends yt {
|
|
|
3664
3771
|
fillColor: e.fillColor,
|
|
3665
3772
|
fillOpacity: e.fillOpacity
|
|
3666
3773
|
});
|
|
3667
|
-
return new
|
|
3774
|
+
return new Mt(n, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
|
|
3668
3775
|
}
|
|
3669
3776
|
getPaths() {
|
|
3670
3777
|
return [this.innerOverlay.getPath().map((e) => y.fromBaidu(e, this.coordType))];
|
|
@@ -3673,7 +3780,7 @@ class bt extends yt {
|
|
|
3673
3780
|
e.length > 1 && console.warn("baidu不支持多path, 只会显示paths[0]"), this.coordType = this.map.coordType, this.setPathInternal((e[0] || []).map((r) => r.toBaidu(this.coordType)));
|
|
3674
3781
|
}
|
|
3675
3782
|
}
|
|
3676
|
-
class
|
|
3783
|
+
class Tt extends Ne {
|
|
3677
3784
|
constructor() {
|
|
3678
3785
|
super(...arguments);
|
|
3679
3786
|
c(this, "pathChangedListeners");
|
|
@@ -3691,7 +3798,7 @@ class Mt extends De {
|
|
|
3691
3798
|
fillOpacity: e.fillOpacity,
|
|
3692
3799
|
visible: e.visible
|
|
3693
3800
|
});
|
|
3694
|
-
return new
|
|
3801
|
+
return new Tt(s, r, this);
|
|
3695
3802
|
}
|
|
3696
3803
|
setupPathChangedListeners() {
|
|
3697
3804
|
const e = () => {
|
|
@@ -3699,7 +3806,7 @@ class Mt extends De {
|
|
|
3699
3806
|
return (s = this.eventHubDelegate) == null ? void 0 : s.notify({ type: "paths-edited", target: this });
|
|
3700
3807
|
}, r = this.innerOverlay.getPaths();
|
|
3701
3808
|
this.pathChangedListeners = [], r.forEach((s) => {
|
|
3702
|
-
this.pathChangedListeners.push(...
|
|
3809
|
+
this.pathChangedListeners.push(...ce.listenChanged(s, e));
|
|
3703
3810
|
});
|
|
3704
3811
|
}
|
|
3705
3812
|
clearPathChangedListeners() {
|
|
@@ -3707,7 +3814,7 @@ class Mt extends De {
|
|
|
3707
3814
|
(e = this.pathChangedListeners) == null || e.forEach((r) => r.remove()), this.pathChangedListeners = void 0;
|
|
3708
3815
|
}
|
|
3709
3816
|
createDelegate() {
|
|
3710
|
-
return this.eventHubDelegate = new
|
|
3817
|
+
return this.eventHubDelegate = new De(super.createDelegate(), {
|
|
3711
3818
|
types: ["paths-edited"],
|
|
3712
3819
|
onListen: () => this.setupPathChangedListeners(),
|
|
3713
3820
|
onCancel: () => this.clearPathChangedListeners()
|
|
@@ -3727,7 +3834,7 @@ class Mt extends De {
|
|
|
3727
3834
|
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();
|
|
3728
3835
|
}
|
|
3729
3836
|
}
|
|
3730
|
-
class
|
|
3837
|
+
class Ot extends vt {
|
|
3731
3838
|
constructor(e, r, s, n) {
|
|
3732
3839
|
super(e, r, s, n);
|
|
3733
3840
|
c(this, "pathEditedEventType", "bounds-changed");
|
|
@@ -3742,7 +3849,7 @@ class Tt extends yt {
|
|
|
3742
3849
|
if (r.length === 4)
|
|
3743
3850
|
if (a > r.length) {
|
|
3744
3851
|
for (let o = 0; o < a; o++)
|
|
3745
|
-
if (r[o] == null || !
|
|
3852
|
+
if (r[o] == null || !Rt.equals(s[o], r[o])) {
|
|
3746
3853
|
const l = s[(o - 2 + a) % a], d = s[(o - 1 + a) % a], u = s[o], p = s[(o + 1) % a], b = s[(o + 2) % a];
|
|
3747
3854
|
let _;
|
|
3748
3855
|
d.lat === p.lat ? _ = new BMap.Point(d.lng, u.lat) : d.lng === p.lng ? _ = new BMap.Point(u.lng, d.lat) : _ = u, n = [l, b, _];
|
|
@@ -3750,7 +3857,7 @@ class Tt extends yt {
|
|
|
3750
3857
|
}
|
|
3751
3858
|
} else if (a === r.length) {
|
|
3752
3859
|
for (let o = 0; o < a; o++)
|
|
3753
|
-
if (!
|
|
3860
|
+
if (!Rt.equals(s[o], r[o])) {
|
|
3754
3861
|
n = [
|
|
3755
3862
|
s[o],
|
|
3756
3863
|
s[(o + 2) % 4]
|
|
@@ -3775,7 +3882,7 @@ class Tt extends yt {
|
|
|
3775
3882
|
fillColor: e.fillColor,
|
|
3776
3883
|
fillOpacity: e.fillOpacity
|
|
3777
3884
|
});
|
|
3778
|
-
return new
|
|
3885
|
+
return new Ot(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
|
|
3779
3886
|
}
|
|
3780
3887
|
getBounds() {
|
|
3781
3888
|
return I.fromBaidu(this.innerOverlay.getBounds(), this.coordType);
|
|
@@ -3787,7 +3894,7 @@ class Tt extends yt {
|
|
|
3787
3894
|
}) : this.setPathInternal(r.map((s) => s.toBaidu(this.coordType)));
|
|
3788
3895
|
}
|
|
3789
3896
|
}
|
|
3790
|
-
class
|
|
3897
|
+
class Ct extends Ne {
|
|
3791
3898
|
static create(t) {
|
|
3792
3899
|
const e = this.coordType, r = new google.maps.Rectangle({
|
|
3793
3900
|
bounds: t.bounds.toGoogle(e),
|
|
@@ -3800,7 +3907,7 @@ class Ot extends De {
|
|
|
3800
3907
|
fillOpacity: t.fillOpacity,
|
|
3801
3908
|
visible: t.visible
|
|
3802
3909
|
});
|
|
3803
|
-
return new
|
|
3910
|
+
return new Ct(r, e, this);
|
|
3804
3911
|
}
|
|
3805
3912
|
getBounds() {
|
|
3806
3913
|
return I.fromGoogle(this.innerOverlay.getBounds() ?? Y.BOUNDS_ZERO, this.coordType);
|
|
@@ -3811,31 +3918,31 @@ class Ot extends De {
|
|
|
3811
3918
|
}
|
|
3812
3919
|
}
|
|
3813
3920
|
const X = 1;
|
|
3814
|
-
class
|
|
3921
|
+
class wi extends ot {
|
|
3815
3922
|
constructor(e, r) {
|
|
3816
3923
|
var s;
|
|
3817
3924
|
super(e);
|
|
3818
3925
|
c(this, "buildInMapTypeId2BIMT");
|
|
3819
3926
|
c(this, "baiduMapType2BIMT");
|
|
3820
3927
|
c(this, "map");
|
|
3821
|
-
c(this, "createLabel",
|
|
3822
|
-
c(this, "createCircle",
|
|
3823
|
-
c(this, "createPolygon",
|
|
3824
|
-
c(this, "createPolyline",
|
|
3825
|
-
c(this, "createRectangle",
|
|
3826
|
-
c(this, "createInfoWindow",
|
|
3827
|
-
c(this, "createInfoBox",
|
|
3828
|
-
c(this, "createMarker",
|
|
3829
|
-
c(this, "createMapTypeControl",
|
|
3830
|
-
c(this, "createZoomControl",
|
|
3831
|
-
c(this, "createScaleControl",
|
|
3928
|
+
c(this, "createLabel", mt.create);
|
|
3929
|
+
c(this, "createCircle", lt.create);
|
|
3930
|
+
c(this, "createPolygon", Mt.create);
|
|
3931
|
+
c(this, "createPolyline", _t.create);
|
|
3932
|
+
c(this, "createRectangle", Ot.create);
|
|
3933
|
+
c(this, "createInfoWindow", dt.create);
|
|
3934
|
+
c(this, "createInfoBox", pt.create);
|
|
3935
|
+
c(this, "createMarker", Oe.create);
|
|
3936
|
+
c(this, "createMapTypeControl", et.create);
|
|
3937
|
+
c(this, "createZoomControl", it.create);
|
|
3938
|
+
c(this, "createScaleControl", tt.create);
|
|
3832
3939
|
this.buildInMapTypeId2BIMT = S.BUILD_IN_MAP_TYPES.getValueMap(B.prototype.getId), this.baiduMapType2BIMT = S.BUILD_IN_MAP_TYPES.getValueMap(B.prototype.asBaiduMapType), this.map = new BMap.Map(e, {
|
|
3833
3940
|
minZoom: r.minZoom && r.minZoom + X,
|
|
3834
3941
|
maxZoom: r.maxZoom && r.maxZoom + X,
|
|
3835
3942
|
mapType: r.buildInMapTypeId && ((s = this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId)) == null ? void 0 : s.asBaiduMapType()),
|
|
3836
3943
|
enableMapClick: !1
|
|
3837
3944
|
// 关闭底图点击功能
|
|
3838
|
-
}), this.map.centerAndZoom(r.center.toBaidu(this.coordType), r.zoom + X), this.setGestureHandling(r.gestureHandling), r.infoWindowMode === "multi" && console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"), r.mapStyle && this.map.setMapStyleV2(r.mapStyle.toBaidu()), this.setEventTargetDelegate(new
|
|
3945
|
+
}), this.map.centerAndZoom(r.center.toBaidu(this.coordType), r.zoom + X), this.setGestureHandling(r.gestureHandling), r.infoWindowMode === "multi" && console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"), r.mapStyle && this.map.setMapStyleV2(r.mapStyle.toBaidu()), this.setEventTargetDelegate(new ae(this.map, this)), this.map.addEventListener("addoverlay", (n) => {
|
|
3839
3946
|
const a = n.target.__info_box__;
|
|
3840
3947
|
a && (console.debug("add:info-box", a), this.map.addOverlay(a));
|
|
3841
3948
|
}), this.map.addEventListener("removeoverlay", (n) => {
|
|
@@ -3843,15 +3950,15 @@ class Oi extends nt {
|
|
|
3843
3950
|
a && (console.debug("remove:info-box", a), this.map.removeOverlay(a));
|
|
3844
3951
|
});
|
|
3845
3952
|
}
|
|
3846
|
-
setGestureHandling(e =
|
|
3847
|
-
switch (e ===
|
|
3848
|
-
case
|
|
3953
|
+
setGestureHandling(e = Z.auto) {
|
|
3954
|
+
switch (e === Z.auto && (e = this.element.parentElement && qe.isScrollable(this.element.parentElement) ? Z.cooperative : Z.greedy), e) {
|
|
3955
|
+
case Z.cooperative:
|
|
3849
3956
|
this.map.disableScrollWheelZoom(), this.map.enableDragging(), this.map.enableDoubleClickZoom();
|
|
3850
3957
|
break;
|
|
3851
|
-
case
|
|
3958
|
+
case Z.greedy:
|
|
3852
3959
|
this.map.enableScrollWheelZoom(), this.map.enableDragging(), this.map.enableDoubleClickZoom();
|
|
3853
3960
|
break;
|
|
3854
|
-
case
|
|
3961
|
+
case Z.none:
|
|
3855
3962
|
this.map.disableDragging(), this.map.disableScrollWheelZoom(), this.map.disableDoubleClickZoom();
|
|
3856
3963
|
break;
|
|
3857
3964
|
}
|
|
@@ -3974,39 +4081,39 @@ class Oi extends nt {
|
|
|
3974
4081
|
}
|
|
3975
4082
|
}
|
|
3976
4083
|
removeCustomControl(e) {
|
|
3977
|
-
e.inner && (
|
|
4084
|
+
e.inner && (oe(e.inner instanceof BMap.Control, `control.inner(${e.inner})需要是BMap.Control`), this.map.removeControl(e.inner));
|
|
3978
4085
|
}
|
|
3979
4086
|
createMarkerClusterer(e) {
|
|
3980
|
-
return new
|
|
4087
|
+
return new ci(this, e);
|
|
3981
4088
|
}
|
|
3982
4089
|
createAutocomplete(e) {
|
|
3983
|
-
return new
|
|
4090
|
+
return new ni(this, e);
|
|
3984
4091
|
}
|
|
3985
4092
|
createSearchBox(e) {
|
|
3986
|
-
return new
|
|
4093
|
+
return new mi(this, e);
|
|
3987
4094
|
}
|
|
3988
4095
|
createPlaceService(e) {
|
|
3989
|
-
return new
|
|
4096
|
+
return new pi(this, e);
|
|
3990
4097
|
}
|
|
3991
4098
|
}
|
|
3992
|
-
class
|
|
4099
|
+
class Ei extends ot {
|
|
3993
4100
|
constructor(e, r) {
|
|
3994
4101
|
var n;
|
|
3995
4102
|
super(e);
|
|
3996
4103
|
c(this, "buildInMapTypeId2BIMT");
|
|
3997
4104
|
c(this, "googleMapTypeId2BIMT");
|
|
3998
4105
|
c(this, "map");
|
|
3999
|
-
c(this, "createLabel",
|
|
4000
|
-
c(this, "createCircle",
|
|
4001
|
-
c(this, "createPolygon",
|
|
4002
|
-
c(this, "createPolyline",
|
|
4003
|
-
c(this, "createRectangle",
|
|
4004
|
-
c(this, "createInfoWindow",
|
|
4005
|
-
c(this, "createInfoBox",
|
|
4006
|
-
c(this, "createMarker",
|
|
4007
|
-
c(this, "createMapTypeControl",
|
|
4008
|
-
c(this, "createZoomControl",
|
|
4009
|
-
c(this, "createScaleControl",
|
|
4106
|
+
c(this, "createLabel", ft.create);
|
|
4107
|
+
c(this, "createCircle", ht.create);
|
|
4108
|
+
c(this, "createPolygon", Tt.create);
|
|
4109
|
+
c(this, "createPolyline", bt.create);
|
|
4110
|
+
c(this, "createRectangle", Ct.create);
|
|
4111
|
+
c(this, "createInfoWindow", ut.create);
|
|
4112
|
+
c(this, "createInfoBox", gt.create);
|
|
4113
|
+
c(this, "createMarker", yt.create);
|
|
4114
|
+
c(this, "createMapTypeControl", Le.create);
|
|
4115
|
+
c(this, "createZoomControl", st.create);
|
|
4116
|
+
c(this, "createScaleControl", rt.create);
|
|
4010
4117
|
this.mapOptions = r, this.buildInMapTypeId2BIMT = S.BUILD_IN_MAP_TYPES.getValueMap(B.prototype.getId), this.googleMapTypeId2BIMT = S.BUILD_IN_MAP_TYPES.getValueMap(B.prototype.getGoogleMapTypeId);
|
|
4011
4118
|
const s = r.buildInMapTypeId && this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId);
|
|
4012
4119
|
this.map = new google.maps.Map(e, {
|
|
@@ -4092,7 +4199,7 @@ class Ci extends nt {
|
|
|
4092
4199
|
this.map.overlayMapTypes.push(e.asGoogleMapType());
|
|
4093
4200
|
}
|
|
4094
4201
|
removeOverlayMapType(e) {
|
|
4095
|
-
|
|
4202
|
+
ce.remove(this.map.overlayMapTypes, e.asGoogleMapType());
|
|
4096
4203
|
}
|
|
4097
4204
|
addLayer(e) {
|
|
4098
4205
|
e.asGoogleLayer().setMap(this.map);
|
|
@@ -4131,31 +4238,31 @@ class Ci extends nt {
|
|
|
4131
4238
|
removeCustomControl(e) {
|
|
4132
4239
|
if (e.inner) {
|
|
4133
4240
|
const r = this.map.controls[A.getGoogle().toValue(e.position)];
|
|
4134
|
-
|
|
4241
|
+
ce.remove(r, e.inner);
|
|
4135
4242
|
}
|
|
4136
4243
|
}
|
|
4137
4244
|
createMarkerClusterer(e) {
|
|
4138
|
-
return new
|
|
4245
|
+
return new di(this, e);
|
|
4139
4246
|
}
|
|
4140
4247
|
createAutocomplete(e) {
|
|
4141
|
-
return new
|
|
4248
|
+
return new si(this, e);
|
|
4142
4249
|
}
|
|
4143
4250
|
createSearchBox(e) {
|
|
4144
|
-
return new
|
|
4251
|
+
return new gi(this, e);
|
|
4145
4252
|
}
|
|
4146
4253
|
createPlaceService(e) {
|
|
4147
|
-
return new
|
|
4254
|
+
return new ui(this, e);
|
|
4148
4255
|
}
|
|
4149
4256
|
}
|
|
4150
|
-
class
|
|
4257
|
+
class Li extends ot {
|
|
4151
4258
|
constructor(e, r) {
|
|
4152
4259
|
var a;
|
|
4153
4260
|
super(e);
|
|
4154
4261
|
c(this, "map");
|
|
4155
4262
|
c(this, "defaultLayers");
|
|
4156
4263
|
this.mapOptions = r;
|
|
4157
|
-
const s =
|
|
4158
|
-
|
|
4264
|
+
const s = Ft().here;
|
|
4265
|
+
Pe.includes(s.version) || E(`不支持${s.version}, HereMap当前只支持如下版本: ${Pe}`);
|
|
4159
4266
|
const n = new H.service.Platform({
|
|
4160
4267
|
app_id: s.key.split(",")[0],
|
|
4161
4268
|
app_code: s.key.split(",")[1]
|
|
@@ -4296,50 +4403,50 @@ class wi extends nt {
|
|
|
4296
4403
|
throw new Error("Method not implemented.");
|
|
4297
4404
|
}
|
|
4298
4405
|
}
|
|
4299
|
-
var z = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here = "here", i))(z || {}),
|
|
4406
|
+
var z = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here = "here", i))(z || {}), Ke;
|
|
4300
4407
|
((i) => {
|
|
4301
4408
|
function t(e, r, s) {
|
|
4302
|
-
const n =
|
|
4409
|
+
const n = Ye.create(s);
|
|
4303
4410
|
switch (e) {
|
|
4304
4411
|
case "google":
|
|
4305
|
-
return new
|
|
4412
|
+
return new Ei(r, n);
|
|
4306
4413
|
case "baidu":
|
|
4307
|
-
return new Oi(r, n);
|
|
4308
|
-
case "here":
|
|
4309
4414
|
return new wi(r, n);
|
|
4415
|
+
case "here":
|
|
4416
|
+
return new Li(r, n);
|
|
4310
4417
|
}
|
|
4311
4418
|
}
|
|
4312
4419
|
i.createMap = t;
|
|
4313
|
-
})(
|
|
4314
|
-
function
|
|
4315
|
-
const e = window, r =
|
|
4420
|
+
})(Ke || (Ke = {}));
|
|
4421
|
+
function xi({ type: i, config: t }) {
|
|
4422
|
+
const e = window, r = Pi(i);
|
|
4316
4423
|
if (e[r])
|
|
4317
4424
|
return Promise.resolve();
|
|
4318
4425
|
switch (i !== z.here && !t.key && E(`请先配置${i}地图的key`), i) {
|
|
4319
4426
|
case z.google:
|
|
4320
|
-
return {}.VITE_FALSE ? (
|
|
4427
|
+
return {}.VITE_FALSE ? (ti({
|
|
4321
4428
|
key: t.key,
|
|
4322
4429
|
v: "3.52"
|
|
4323
4430
|
// v: config.version,
|
|
4324
|
-
}), google.maps.importLibrary("core")) :
|
|
4431
|
+
}), google.maps.importLibrary("core")) : $t(`https://maps.googleapis.com/maps/api/js?key=${t.key}&language=${t.language}&v=${t.version}&libraries=${t.libraries.join(",")}`);
|
|
4325
4432
|
case z.baidu:
|
|
4326
|
-
return
|
|
4433
|
+
return $t(`https://api.map.baidu.com/api?v=${t.version}&ak=${t.key}`);
|
|
4327
4434
|
case z.here:
|
|
4328
|
-
return
|
|
4435
|
+
return ge(pe("core", t.version)).then(() => Promise.all([
|
|
4329
4436
|
// 其他大多数模块都可以同时载入
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4437
|
+
ge(pe("service", t.version)),
|
|
4438
|
+
ge(pe("mapevents", t.version)),
|
|
4439
|
+
ge(pe("clustering", t.version)),
|
|
4440
|
+
ge(pe("ui", t.version))
|
|
4334
4441
|
])).catch((s) => (delete e[r], Promise.reject(s)));
|
|
4335
4442
|
default:
|
|
4336
|
-
|
|
4443
|
+
Fe(i);
|
|
4337
4444
|
}
|
|
4338
4445
|
}
|
|
4339
|
-
function
|
|
4446
|
+
function pe(i, t = Pe[0]) {
|
|
4340
4447
|
return `https://js.api.here.com/v3/${t}/mapsjs-${i}.js`;
|
|
4341
4448
|
}
|
|
4342
|
-
function
|
|
4449
|
+
function Pi(i) {
|
|
4343
4450
|
switch (i) {
|
|
4344
4451
|
case z.google:
|
|
4345
4452
|
return "google";
|
|
@@ -4349,29 +4456,29 @@ function Li(i) {
|
|
|
4349
4456
|
return "H";
|
|
4350
4457
|
}
|
|
4351
4458
|
}
|
|
4352
|
-
let
|
|
4353
|
-
function
|
|
4459
|
+
let ki = 0;
|
|
4460
|
+
function $t(i, t = "callback") {
|
|
4354
4461
|
return new Promise((e, r) => {
|
|
4355
|
-
const s = `__callback${
|
|
4462
|
+
const s = `__callback${ki++}`;
|
|
4356
4463
|
window[s] = e;
|
|
4357
4464
|
const n = document.createElement("script");
|
|
4358
4465
|
n.src = `${i}&${t}=${s}`, n.onerror = r, document.body.appendChild(n);
|
|
4359
4466
|
});
|
|
4360
4467
|
}
|
|
4361
|
-
function
|
|
4468
|
+
function ge(i) {
|
|
4362
4469
|
return new Promise((t, e) => {
|
|
4363
4470
|
const r = document.createElement("script");
|
|
4364
4471
|
r.src = i, r.onload = t, r.onerror = e, document.body.appendChild(r);
|
|
4365
4472
|
});
|
|
4366
4473
|
}
|
|
4367
|
-
function
|
|
4474
|
+
function N(i, t) {
|
|
4368
4475
|
return {
|
|
4369
4476
|
type: String,
|
|
4370
4477
|
default: t,
|
|
4371
4478
|
validator: (e) => Object.values(i).includes(e)
|
|
4372
4479
|
};
|
|
4373
4480
|
}
|
|
4374
|
-
function
|
|
4481
|
+
function Bi(i, t) {
|
|
4375
4482
|
return {
|
|
4376
4483
|
type: String,
|
|
4377
4484
|
default: t,
|
|
@@ -4390,7 +4497,7 @@ function m(i, t) {
|
|
|
4390
4497
|
default: t
|
|
4391
4498
|
};
|
|
4392
4499
|
}
|
|
4393
|
-
function
|
|
4500
|
+
function Ms(i) {
|
|
4394
4501
|
const t = {};
|
|
4395
4502
|
return Object.entries(i).forEach(([e, r]) => {
|
|
4396
4503
|
const s = `__${e}`;
|
|
@@ -4407,37 +4514,37 @@ function bs(i) {
|
|
|
4407
4514
|
};
|
|
4408
4515
|
}), t;
|
|
4409
4516
|
}
|
|
4410
|
-
const
|
|
4517
|
+
const me = {
|
|
4411
4518
|
enumerable: !0,
|
|
4412
4519
|
configurable: !0,
|
|
4413
|
-
get:
|
|
4414
|
-
set:
|
|
4520
|
+
get: ye,
|
|
4521
|
+
set: ye
|
|
4415
4522
|
};
|
|
4416
|
-
function
|
|
4523
|
+
function Ii(i) {
|
|
4417
4524
|
return Object.keys(i).forEach((t) => {
|
|
4418
4525
|
const e = i[t];
|
|
4419
4526
|
let r = !1;
|
|
4420
|
-
typeof e == "function" ? (
|
|
4527
|
+
typeof e == "function" ? (me.get = e, me.set = ye, r = !0) : typeof e == "object" && typeof e.get == "function" && (me.get = e.get, me.set = e.set, r = !0), r && (i[t] = Object.defineProperty(i, t, me));
|
|
4421
4528
|
}), i;
|
|
4422
4529
|
}
|
|
4423
|
-
function
|
|
4424
|
-
return
|
|
4530
|
+
function Ts(i) {
|
|
4531
|
+
return Ii(i);
|
|
4425
4532
|
}
|
|
4426
|
-
function
|
|
4427
|
-
return
|
|
4533
|
+
function mr() {
|
|
4534
|
+
return Ve();
|
|
4428
4535
|
}
|
|
4429
|
-
function
|
|
4536
|
+
function Ee(i, t) {
|
|
4430
4537
|
const e = i.$options[t];
|
|
4431
4538
|
if (e)
|
|
4432
4539
|
for (const r of e)
|
|
4433
4540
|
r.call(i);
|
|
4434
4541
|
}
|
|
4435
|
-
function
|
|
4542
|
+
function Os(i, t) {
|
|
4436
4543
|
for (const e of i)
|
|
4437
4544
|
if (e.$options.name === t.name)
|
|
4438
4545
|
return e;
|
|
4439
4546
|
}
|
|
4440
|
-
function
|
|
4547
|
+
function Cs(i, t) {
|
|
4441
4548
|
if (!i.default)
|
|
4442
4549
|
return;
|
|
4443
4550
|
const e = i.default();
|
|
@@ -4445,12 +4552,12 @@ function Os(i, t) {
|
|
|
4445
4552
|
if ((r == null ? void 0 : r.type).name === t.name)
|
|
4446
4553
|
return r;
|
|
4447
4554
|
}
|
|
4448
|
-
function
|
|
4555
|
+
function Si(i, t) {
|
|
4449
4556
|
const e = {}, r = {}, s = {};
|
|
4450
4557
|
return Object.keys(i).forEach((n) => {
|
|
4451
|
-
n.startsWith("on") ? e[
|
|
4558
|
+
n.startsWith("on") ? e[be.pascal2kebab(n.substring(2))] = i[n] : r[n] = i[n];
|
|
4452
4559
|
}), t && Object.keys(t).forEach((n) => {
|
|
4453
|
-
n.startsWith("on") && (s[
|
|
4560
|
+
n.startsWith("on") && (s[be.pascal2kebab(n.substring(2))] = t[n]);
|
|
4454
4561
|
}), {
|
|
4455
4562
|
/** class/style/未声明的属性 等 */
|
|
4456
4563
|
binds: r,
|
|
@@ -4461,12 +4568,12 @@ function Bi(i, t) {
|
|
|
4461
4568
|
};
|
|
4462
4569
|
}
|
|
4463
4570
|
function F(i, t) {
|
|
4464
|
-
return
|
|
4571
|
+
return zt(() => Si(i, t));
|
|
4465
4572
|
}
|
|
4466
4573
|
function L() {
|
|
4467
4574
|
return Function;
|
|
4468
4575
|
}
|
|
4469
|
-
const
|
|
4576
|
+
const ws = () => {
|
|
4470
4577
|
let i, t;
|
|
4471
4578
|
function e(s) {
|
|
4472
4579
|
console.log(s), i = s && s.type, t = Date.now();
|
|
@@ -4475,33 +4582,34 @@ const Cs = () => {
|
|
|
4475
4582
|
((s && s.type) !== i || Date.now() - (t ?? 0) > 1e3) && e(s);
|
|
4476
4583
|
}
|
|
4477
4584
|
return { eventLog: e, eventLogLess: r };
|
|
4478
|
-
},
|
|
4479
|
-
inject: [
|
|
4585
|
+
}, wt = "$map", te = "onCreate", re = "onDestroy", P = C({
|
|
4586
|
+
inject: [wt],
|
|
4587
|
+
data: () => ({ $_isCreated: !1 }),
|
|
4480
4588
|
mounted() {
|
|
4481
|
-
|
|
4589
|
+
this.$_isCreated ? process.env.NODE_ENV !== "production" && console.warn(`${te}调用时机不对, 原因未知, 虚拟DOM太过频繁的刷新可能导致该问题🤔️`) : (Ee(this, te), this.$_isCreated = !0);
|
|
4482
4590
|
},
|
|
4483
4591
|
beforeUnmount() {
|
|
4484
|
-
|
|
4592
|
+
this.$_isCreated ? (Ee(this, re), this.$_isCreated = !1) : process.env.NODE_ENV !== "production" && console.warn(`${re}调用时机不对, 原因未知, 虚拟DOM太过频繁的刷新可能导致该问题🤔️`);
|
|
4485
4593
|
},
|
|
4486
4594
|
methods: {
|
|
4487
4595
|
recreate() {
|
|
4488
|
-
|
|
4596
|
+
Ee(this, re), Ee(this, te);
|
|
4489
4597
|
}
|
|
4490
4598
|
},
|
|
4491
4599
|
render() {
|
|
4492
|
-
return
|
|
4600
|
+
return mr();
|
|
4493
4601
|
}
|
|
4494
|
-
}),
|
|
4602
|
+
}), Ai = C({
|
|
4495
4603
|
name: "tg-map",
|
|
4496
4604
|
provide() {
|
|
4497
4605
|
return {
|
|
4498
|
-
[
|
|
4606
|
+
[wt]: zt(() => this.map)
|
|
4499
4607
|
};
|
|
4500
4608
|
},
|
|
4501
4609
|
inheritAttrs: !1,
|
|
4502
4610
|
props: {
|
|
4503
4611
|
/** type没做响应式, 但外部可以把type作为tg-map的key, 让type修改时完全重建tg-map */
|
|
4504
|
-
type:
|
|
4612
|
+
type: N(z, z.google),
|
|
4505
4613
|
/**
|
|
4506
4614
|
* 当对该属性使用双向绑定时, 改变center将触发update:center又反过来触发center改变, 最终导致无限循环...
|
|
4507
4615
|
* 当前通过setCenter()时判断center是否有改变来避免该问题, 但为了避免可能存在的问题, 另外设计了如下机制:
|
|
@@ -4528,12 +4636,12 @@ const Cs = () => {
|
|
|
4528
4636
|
*/
|
|
4529
4637
|
lastCenter: m(y),
|
|
4530
4638
|
zoom: R(Number),
|
|
4531
|
-
infoWindowMode:
|
|
4532
|
-
gestureHandling: Z
|
|
4639
|
+
infoWindowMode: Bi(vi),
|
|
4640
|
+
gestureHandling: N(Z),
|
|
4533
4641
|
minZoom: m(Number),
|
|
4534
4642
|
maxZoom: m(Number),
|
|
4535
4643
|
mapStyle: m(Object),
|
|
4536
|
-
mapTypeId:
|
|
4644
|
+
mapTypeId: N(Xt),
|
|
4537
4645
|
/** 地图类型对象, 优先级比mapTypeId高 */
|
|
4538
4646
|
mapType: m(Object),
|
|
4539
4647
|
hideLogo: m(Boolean),
|
|
@@ -4556,13 +4664,13 @@ const Cs = () => {
|
|
|
4556
4664
|
},
|
|
4557
4665
|
data() {
|
|
4558
4666
|
return {
|
|
4559
|
-
map:
|
|
4667
|
+
map: Ue(),
|
|
4560
4668
|
isDestroyed: !1
|
|
4561
4669
|
};
|
|
4562
4670
|
},
|
|
4563
4671
|
computed: {
|
|
4564
4672
|
propsJson() {
|
|
4565
|
-
return
|
|
4673
|
+
return _e.toJsonSafely(this.$props);
|
|
4566
4674
|
}
|
|
4567
4675
|
},
|
|
4568
4676
|
watch: {
|
|
@@ -4594,7 +4702,7 @@ const Cs = () => {
|
|
|
4594
4702
|
async mounted() {
|
|
4595
4703
|
const i = this.type;
|
|
4596
4704
|
try {
|
|
4597
|
-
await
|
|
4705
|
+
await xi({ type: i, config: Ft()[i] });
|
|
4598
4706
|
} catch (s) {
|
|
4599
4707
|
this.$emit("error", s);
|
|
4600
4708
|
return;
|
|
@@ -4603,7 +4711,7 @@ const Cs = () => {
|
|
|
4603
4711
|
console.warn(`tg-map(type=${i})已销毁, 不需要继续执行`);
|
|
4604
4712
|
return;
|
|
4605
4713
|
}
|
|
4606
|
-
const t =
|
|
4714
|
+
const t = Ke.createMap(
|
|
4607
4715
|
i,
|
|
4608
4716
|
this.$refs.map,
|
|
4609
4717
|
/* options: */
|
|
@@ -4618,12 +4726,12 @@ const Cs = () => {
|
|
|
4618
4726
|
buildInMapTypeId: this.mapTypeId
|
|
4619
4727
|
}
|
|
4620
4728
|
);
|
|
4621
|
-
if (this.map =
|
|
4729
|
+
if (this.map = Tr(t), this.mapType && t.setMapType(this.mapType), "ready" in this.attrs.listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"), V(
|
|
4622
4730
|
this.attrs.listeners,
|
|
4623
4731
|
t,
|
|
4624
4732
|
/* excludes: */
|
|
4625
4733
|
["load"]
|
|
4626
|
-
), this.$emit("load", t),
|
|
4734
|
+
), this.$emit("load", t), Nt([
|
|
4627
4735
|
() => this.zoom,
|
|
4628
4736
|
() => this.center
|
|
4629
4737
|
//
|
|
@@ -4657,22 +4765,22 @@ const U = (i, t) => {
|
|
|
4657
4765
|
e[r] = s;
|
|
4658
4766
|
return e;
|
|
4659
4767
|
};
|
|
4660
|
-
function
|
|
4661
|
-
return W(), j("div",
|
|
4662
|
-
|
|
4768
|
+
function Ri(i, t, e, r, s, n) {
|
|
4769
|
+
return W(), j("div", ue({ class: "tg-map" }, i.attrs.binds), [
|
|
4770
|
+
Or("div", {
|
|
4663
4771
|
ref: "map",
|
|
4664
|
-
class:
|
|
4772
|
+
class: Re({
|
|
4665
4773
|
"tg-map__map": !0,
|
|
4666
4774
|
[`tg-map__map--hide-logo-${i.type}`]: i.hideLogo
|
|
4667
4775
|
})
|
|
4668
4776
|
}, null, 2),
|
|
4669
|
-
|
|
4670
|
-
i.map ?
|
|
4671
|
-
|
|
4777
|
+
Ve("", !0),
|
|
4778
|
+
i.map ? G(i.$slots, "default", { key: 1 }) : Ve("", !0),
|
|
4779
|
+
G(i.$slots, "overlay")
|
|
4672
4780
|
], 16);
|
|
4673
4781
|
}
|
|
4674
|
-
const
|
|
4675
|
-
function
|
|
4782
|
+
const $i = /* @__PURE__ */ U(Ai, [["render", Ri]]);
|
|
4783
|
+
function Di(i) {
|
|
4676
4784
|
if (i == null)
|
|
4677
4785
|
return;
|
|
4678
4786
|
let t;
|
|
@@ -4683,7 +4791,7 @@ function Ri(i) {
|
|
|
4683
4791
|
t = i;
|
|
4684
4792
|
return `${t}px`;
|
|
4685
4793
|
}
|
|
4686
|
-
const
|
|
4794
|
+
const zi = C({
|
|
4687
4795
|
name: "tg-map-widget",
|
|
4688
4796
|
props: {
|
|
4689
4797
|
left: {
|
|
@@ -4709,22 +4817,22 @@ const $i = C({
|
|
|
4709
4817
|
}
|
|
4710
4818
|
},
|
|
4711
4819
|
methods: {
|
|
4712
|
-
dimen:
|
|
4820
|
+
dimen: Di
|
|
4713
4821
|
}
|
|
4714
4822
|
});
|
|
4715
|
-
function
|
|
4823
|
+
function Ni(i, t, e, r, s, n) {
|
|
4716
4824
|
return W(), j("div", {
|
|
4717
|
-
class:
|
|
4718
|
-
style:
|
|
4825
|
+
class: Re(i.$options.name),
|
|
4826
|
+
style: Cr({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
|
|
4719
4827
|
}, [
|
|
4720
|
-
|
|
4828
|
+
G(i.$slots, "default")
|
|
4721
4829
|
], 6);
|
|
4722
4830
|
}
|
|
4723
|
-
const
|
|
4831
|
+
const Es = /* @__PURE__ */ U(zi, [["render", Ni]]), Gi = C({
|
|
4724
4832
|
name: "tg-custom-control",
|
|
4725
4833
|
mixins: [P],
|
|
4726
4834
|
props: {
|
|
4727
|
-
position:
|
|
4835
|
+
position: N(k, k.RIGHT_BOTTOM)
|
|
4728
4836
|
},
|
|
4729
4837
|
setup() {
|
|
4730
4838
|
return {
|
|
@@ -4737,8 +4845,8 @@ const ws = /* @__PURE__ */ U($i, [["render", Di]]), zi = C({
|
|
|
4737
4845
|
}
|
|
4738
4846
|
},
|
|
4739
4847
|
onCreate() {
|
|
4740
|
-
|
|
4741
|
-
const { $el: i } = this, t = class extends
|
|
4848
|
+
Ce(this.$parent, $i) || console.warn("请将tg-custom-control放到tg-map中");
|
|
4849
|
+
const { $el: i } = this, t = class extends Qr {
|
|
4742
4850
|
onCreateElement() {
|
|
4743
4851
|
return i;
|
|
4744
4852
|
}
|
|
@@ -4749,19 +4857,19 @@ const ws = /* @__PURE__ */ U($i, [["render", Di]]), zi = C({
|
|
|
4749
4857
|
this.$map.removeCustomControl(this.control);
|
|
4750
4858
|
}
|
|
4751
4859
|
});
|
|
4752
|
-
function
|
|
4860
|
+
function Zi(i, t, e, r, s, n) {
|
|
4753
4861
|
return W(), j("div", {
|
|
4754
|
-
class:
|
|
4862
|
+
class: Re(i.$options.name)
|
|
4755
4863
|
}, [
|
|
4756
|
-
|
|
4864
|
+
G(i.$slots, "default")
|
|
4757
4865
|
], 2);
|
|
4758
4866
|
}
|
|
4759
|
-
const
|
|
4867
|
+
const Ls = /* @__PURE__ */ U(Gi, [["render", Zi]]), xs = C({
|
|
4760
4868
|
name: "tg-map-type-control",
|
|
4761
4869
|
mixins: [P],
|
|
4762
4870
|
props: {
|
|
4763
|
-
position:
|
|
4764
|
-
type:
|
|
4871
|
+
position: N(k, k.TOP_LEFT),
|
|
4872
|
+
type: N(Jt),
|
|
4765
4873
|
mapTypes: m(Array)
|
|
4766
4874
|
},
|
|
4767
4875
|
setup() {
|
|
@@ -4789,11 +4897,11 @@ const Es = /* @__PURE__ */ U(zi, [["render", Ni]]), Ls = C({
|
|
|
4789
4897
|
onDestroy() {
|
|
4790
4898
|
this.$map.removeControl(this.control);
|
|
4791
4899
|
}
|
|
4792
|
-
}),
|
|
4900
|
+
}), Ps = C({
|
|
4793
4901
|
name: "tg-scale-control",
|
|
4794
4902
|
mixins: [P],
|
|
4795
4903
|
props: {
|
|
4796
|
-
position:
|
|
4904
|
+
position: N(k, k.BOTTOM_RIGHT)
|
|
4797
4905
|
},
|
|
4798
4906
|
setup() {
|
|
4799
4907
|
return {
|
|
@@ -4812,32 +4920,40 @@ const Es = /* @__PURE__ */ U(zi, [["render", Ni]]), Ls = C({
|
|
|
4812
4920
|
this.$map.removeControl(this.control);
|
|
4813
4921
|
}
|
|
4814
4922
|
});
|
|
4815
|
-
function
|
|
4923
|
+
function fr() {
|
|
4816
4924
|
var e;
|
|
4817
|
-
const i = (e =
|
|
4925
|
+
const i = (e = wr()) == null ? void 0 : e.type;
|
|
4818
4926
|
let t = (i == null ? void 0 : i.name) ?? (i == null ? void 0 : i.__name);
|
|
4819
4927
|
if (!t) {
|
|
4820
4928
|
const r = i == null ? void 0 : i.__file;
|
|
4821
|
-
r && (t =
|
|
4929
|
+
r && (t = Mi.basename(r, ".vue"));
|
|
4822
4930
|
}
|
|
4823
4931
|
return t;
|
|
4824
4932
|
}
|
|
4825
|
-
function
|
|
4826
|
-
const i =
|
|
4933
|
+
function Wi() {
|
|
4934
|
+
const i = Er(wt);
|
|
4827
4935
|
let t, e;
|
|
4828
|
-
|
|
4936
|
+
i == null && E(`<${fr() || "unknown"}>必须作为<tg-map>的子代组件`);
|
|
4937
|
+
let r = !1;
|
|
4938
|
+
return {
|
|
4829
4939
|
mapRef: i,
|
|
4830
4940
|
/** 读取map对象, 只要放在<tg-map>里面的组件(除#overlay插槽外)都能够立即读取到map对象 */
|
|
4831
4941
|
get map() {
|
|
4832
4942
|
return i.value ?? E("map尚未初始化");
|
|
4833
4943
|
},
|
|
4834
4944
|
/** 地图元素创建回调 */
|
|
4835
|
-
[
|
|
4836
|
-
|
|
4945
|
+
[te](s) {
|
|
4946
|
+
const n = () => {
|
|
4947
|
+
r ? process.env.NODE_ENV !== "production" && console.warn(`${te}调用时机不对, 原因未知, 虚拟DOM太过频繁的刷新可能导致该问题🤔️`) : (s(), r = !0);
|
|
4948
|
+
};
|
|
4949
|
+
Lr(n), t && E(`${te}只能调用一次`), t = n;
|
|
4837
4950
|
},
|
|
4838
4951
|
/** 地图元素销毁回调 */
|
|
4839
|
-
[
|
|
4840
|
-
|
|
4952
|
+
[re](s) {
|
|
4953
|
+
const n = () => {
|
|
4954
|
+
r ? (s(), r = !1) : process.env.NODE_ENV !== "production" && console.warn(`${re}调用时机不对, 原因未知, 虚拟DOM太过频繁的刷新可能导致该问题🤔️`);
|
|
4955
|
+
};
|
|
4956
|
+
xr(n), e && E(`${re}只能调用一次`), e = n;
|
|
4841
4957
|
},
|
|
4842
4958
|
/** 重新创建地图元素 */
|
|
4843
4959
|
recreate() {
|
|
@@ -4845,23 +4961,23 @@ function Gi() {
|
|
|
4845
4961
|
}
|
|
4846
4962
|
};
|
|
4847
4963
|
}
|
|
4848
|
-
const
|
|
4964
|
+
const ks = C({
|
|
4849
4965
|
name: "tg-zoom-control",
|
|
4850
4966
|
props: {
|
|
4851
|
-
position:
|
|
4967
|
+
position: N(k, k.RIGHT_BOTTOM)
|
|
4852
4968
|
},
|
|
4853
4969
|
setup(i) {
|
|
4854
4970
|
let t = void 0;
|
|
4855
|
-
const { map: e, onCreate: r, onDestroy: s } =
|
|
4971
|
+
const { map: e, onCreate: r, onDestroy: s } = Wi();
|
|
4856
4972
|
return r(() => {
|
|
4857
4973
|
t = e.createZoomControl(i), e.addControl(t);
|
|
4858
4974
|
}), s(() => {
|
|
4859
4975
|
e.removeControl(t);
|
|
4860
|
-
}),
|
|
4976
|
+
}), Nt(() => i.position, (n) => {
|
|
4861
4977
|
t.setPosition(n);
|
|
4862
|
-
}),
|
|
4978
|
+
}), mr;
|
|
4863
4979
|
}
|
|
4864
|
-
}),
|
|
4980
|
+
}), Hi = C({
|
|
4865
4981
|
name: "tg-marker-clusterer",
|
|
4866
4982
|
mixins: [P],
|
|
4867
4983
|
// markers从this.$children中读取, 故需要省略(Omit)
|
|
@@ -4921,18 +5037,18 @@ const Ps = C({
|
|
|
4921
5037
|
this.markers.push(i), this.isInitiated() && this.clusterer.addMarker(i);
|
|
4922
5038
|
},
|
|
4923
5039
|
onRemoveMarker(i) {
|
|
4924
|
-
this.isInitiated() && this.clusterer.removeMarker(i),
|
|
5040
|
+
this.isInitiated() && this.clusterer.removeMarker(i), he.remove(this.markers, i);
|
|
4925
5041
|
}
|
|
4926
5042
|
}
|
|
4927
5043
|
});
|
|
4928
|
-
function
|
|
5044
|
+
function ji(i, t, e, r, s, n) {
|
|
4929
5045
|
return W(), j("div", {
|
|
4930
|
-
class:
|
|
5046
|
+
class: Re(i.$options.name)
|
|
4931
5047
|
}, [
|
|
4932
|
-
|
|
5048
|
+
G(i.$slots, "default")
|
|
4933
5049
|
], 2);
|
|
4934
5050
|
}
|
|
4935
|
-
const
|
|
5051
|
+
const Vi = /* @__PURE__ */ U(Hi, [["render", ji]]), Bs = C({
|
|
4936
5052
|
name: "tg-traffic-layer",
|
|
4937
5053
|
mixins: [P],
|
|
4938
5054
|
// 请直接使用v-if来控制它的显隐
|
|
@@ -4945,12 +5061,12 @@ const Hi = /* @__PURE__ */ U(Zi, [["render", Wi]]), ks = C({
|
|
|
4945
5061
|
},
|
|
4946
5062
|
watch: {},
|
|
4947
5063
|
onCreate() {
|
|
4948
|
-
this.layer = new
|
|
5064
|
+
this.layer = new ei(), this.$map.addLayer(this.layer);
|
|
4949
5065
|
},
|
|
4950
5066
|
onDestroy() {
|
|
4951
5067
|
this.$map.removeLayer(this.layer);
|
|
4952
5068
|
}
|
|
4953
|
-
}),
|
|
5069
|
+
}), Is = C({
|
|
4954
5070
|
name: "tg-circle",
|
|
4955
5071
|
mixins: [P],
|
|
4956
5072
|
inheritAttrs: !1,
|
|
@@ -4981,7 +5097,7 @@ const Hi = /* @__PURE__ */ U(Zi, [["render", Wi]]), ks = C({
|
|
|
4981
5097
|
center(i) {
|
|
4982
5098
|
if (this.emittedCenter != null) {
|
|
4983
5099
|
const t = this.emittedCenter;
|
|
4984
|
-
if (this.emittedCenter = void 0, t ===
|
|
5100
|
+
if (this.emittedCenter = void 0, t === $e(i))
|
|
4985
5101
|
return;
|
|
4986
5102
|
}
|
|
4987
5103
|
this.overlay.setCenter(i);
|
|
@@ -5030,116 +5146,7 @@ const Hi = /* @__PURE__ */ U(Zi, [["render", Wi]]), ks = C({
|
|
|
5030
5146
|
this.$map.removeOverlay(this.overlay);
|
|
5031
5147
|
}
|
|
5032
5148
|
});
|
|
5033
|
-
|
|
5034
|
-
class ji {
|
|
5035
|
-
constructor(t, e) {
|
|
5036
|
-
c(this, "baidu");
|
|
5037
|
-
c(this, "google");
|
|
5038
|
-
c(this, "projection");
|
|
5039
|
-
c(this, "element", void 0);
|
|
5040
|
-
c(this, "mapPane");
|
|
5041
|
-
this.map = t, this.mapPane = e.mapPane;
|
|
5042
|
-
}
|
|
5043
|
-
create() {
|
|
5044
|
-
return this.element = this.onCreate(), this.element.className += " element-overlay", this.element;
|
|
5045
|
-
}
|
|
5046
|
-
draw() {
|
|
5047
|
-
this.projection && this.onDraw(this.projection);
|
|
5048
|
-
}
|
|
5049
|
-
getProjection() {
|
|
5050
|
-
return this.projection;
|
|
5051
|
-
}
|
|
5052
|
-
asBaidu() {
|
|
5053
|
-
if (!this.baidu) {
|
|
5054
|
-
const t = this;
|
|
5055
|
-
pr();
|
|
5056
|
-
class e extends BMap.OverlayV3 {
|
|
5057
|
-
initialize(n) {
|
|
5058
|
-
const a = t.create(), h = n.getPanes();
|
|
5059
|
-
let o;
|
|
5060
|
-
switch (t.mapPane) {
|
|
5061
|
-
case "float":
|
|
5062
|
-
o = h.floatPane;
|
|
5063
|
-
break;
|
|
5064
|
-
case "overlayMouseTarget":
|
|
5065
|
-
o = h.markerMouseTarget;
|
|
5066
|
-
break;
|
|
5067
|
-
case "overlay":
|
|
5068
|
-
o = h.markerPane;
|
|
5069
|
-
break;
|
|
5070
|
-
case "map":
|
|
5071
|
-
o = h.mapPane;
|
|
5072
|
-
break;
|
|
5073
|
-
default:
|
|
5074
|
-
je(t.mapPane);
|
|
5075
|
-
break;
|
|
5076
|
-
}
|
|
5077
|
-
return o == null || o.appendChild(a), a;
|
|
5078
|
-
}
|
|
5079
|
-
draw() {
|
|
5080
|
-
t.draw();
|
|
5081
|
-
}
|
|
5082
|
-
}
|
|
5083
|
-
this.baidu = new e();
|
|
5084
|
-
const r = t.map.innerMap;
|
|
5085
|
-
this.projection = {
|
|
5086
|
-
fromLatLngToOverlayPoint(s) {
|
|
5087
|
-
return r.pointToOverlayPixel(s.toBaidu(t.map.coordType));
|
|
5088
|
-
},
|
|
5089
|
-
fromOverlayPointToLatLng(s) {
|
|
5090
|
-
return y.fromBaidu(r.overlayPixelToPoint(new BMap.Pixel(s.x, s.y)), t.map.coordType);
|
|
5091
|
-
}
|
|
5092
|
-
};
|
|
5093
|
-
}
|
|
5094
|
-
return this.baidu;
|
|
5095
|
-
}
|
|
5096
|
-
asGoogle() {
|
|
5097
|
-
if (!this.google) {
|
|
5098
|
-
const t = this;
|
|
5099
|
-
class e extends google.maps.OverlayView {
|
|
5100
|
-
onAdd() {
|
|
5101
|
-
const s = t.create(), n = this.getPanes() ?? E("onAdd回调中一定会有panes");
|
|
5102
|
-
let a;
|
|
5103
|
-
switch (t.mapPane) {
|
|
5104
|
-
case "float":
|
|
5105
|
-
a = n.floatPane;
|
|
5106
|
-
break;
|
|
5107
|
-
case "overlayMouseTarget":
|
|
5108
|
-
a = n.overlayMouseTarget;
|
|
5109
|
-
break;
|
|
5110
|
-
case "overlay":
|
|
5111
|
-
a = n.overlayLayer;
|
|
5112
|
-
break;
|
|
5113
|
-
case "map":
|
|
5114
|
-
a = n.mapPane;
|
|
5115
|
-
break;
|
|
5116
|
-
default:
|
|
5117
|
-
je(t.mapPane);
|
|
5118
|
-
break;
|
|
5119
|
-
}
|
|
5120
|
-
a.appendChild(s);
|
|
5121
|
-
}
|
|
5122
|
-
draw() {
|
|
5123
|
-
t.draw();
|
|
5124
|
-
}
|
|
5125
|
-
onRemove() {
|
|
5126
|
-
var s;
|
|
5127
|
-
(s = t.element.parentNode) == null || s.removeChild(t.element);
|
|
5128
|
-
}
|
|
5129
|
-
}
|
|
5130
|
-
this.google = new e(), this.projection = {
|
|
5131
|
-
fromLatLngToOverlayPoint(r) {
|
|
5132
|
-
return t.google.getProjection().fromLatLngToDivPixel(r.toGoogle(t.map.coordType)) ?? q.ZERO;
|
|
5133
|
-
},
|
|
5134
|
-
fromOverlayPointToLatLng(r) {
|
|
5135
|
-
return y.fromGoogle(t.google.getProjection().fromDivPixelToLatLng(new google.maps.Point(r.x, r.y)) ?? Y.LATLNG_ZERO, t.map.coordType);
|
|
5136
|
-
}
|
|
5137
|
-
};
|
|
5138
|
-
}
|
|
5139
|
-
return this.google;
|
|
5140
|
-
}
|
|
5141
|
-
}
|
|
5142
|
-
class Vi extends ji {
|
|
5149
|
+
class Fi extends Ti {
|
|
5143
5150
|
constructor(t, e, r, s) {
|
|
5144
5151
|
super(t, e), this.content = r, this.position = s;
|
|
5145
5152
|
}
|
|
@@ -5154,11 +5161,11 @@ class Vi extends ji {
|
|
|
5154
5161
|
this.position = t, this.draw();
|
|
5155
5162
|
}
|
|
5156
5163
|
}
|
|
5157
|
-
const
|
|
5164
|
+
const Ui = C({
|
|
5158
5165
|
name: "tg-element-overlay",
|
|
5159
5166
|
mixins: [P],
|
|
5160
5167
|
props: {
|
|
5161
|
-
mapPane:
|
|
5168
|
+
mapPane: N(Me, Me.overlayMouseTarget),
|
|
5162
5169
|
position: R(y)
|
|
5163
5170
|
},
|
|
5164
5171
|
setup() {
|
|
@@ -5180,20 +5187,20 @@ const Fi = C({
|
|
|
5180
5187
|
}
|
|
5181
5188
|
},
|
|
5182
5189
|
onCreate() {
|
|
5183
|
-
this.overlay = new
|
|
5190
|
+
this.overlay = new Fi(this.$map, this, this.content(), this.position), this.$map.addElementOverlay(this.overlay);
|
|
5184
5191
|
},
|
|
5185
5192
|
onDestroy() {
|
|
5186
5193
|
this.$map.removeElementOverlay(this.overlay);
|
|
5187
5194
|
}
|
|
5188
5195
|
});
|
|
5189
|
-
function
|
|
5190
|
-
return W(), j("div",
|
|
5196
|
+
function qi(i, t, e, r, s, n) {
|
|
5197
|
+
return W(), j("div", ue({
|
|
5191
5198
|
class: i.$options.name
|
|
5192
5199
|
}, i.$attrs), [
|
|
5193
|
-
|
|
5200
|
+
G(i.$slots, "default")
|
|
5194
5201
|
], 16);
|
|
5195
5202
|
}
|
|
5196
|
-
const
|
|
5203
|
+
const Ss = /* @__PURE__ */ U(Ui, [["render", qi]]), Yi = C({
|
|
5197
5204
|
name: "tg-marker",
|
|
5198
5205
|
mixins: [P],
|
|
5199
5206
|
inheritAttrs: !1,
|
|
@@ -5214,8 +5221,8 @@ const Is = /* @__PURE__ */ U(Fi, [["render", Ui]]), qi = C({
|
|
|
5214
5221
|
return {
|
|
5215
5222
|
attrs: F(t, i),
|
|
5216
5223
|
marker: void 0,
|
|
5217
|
-
label:
|
|
5218
|
-
info:
|
|
5224
|
+
label: Ue(),
|
|
5225
|
+
info: Ue(),
|
|
5219
5226
|
emittedPosition: void 0
|
|
5220
5227
|
};
|
|
5221
5228
|
},
|
|
@@ -5223,7 +5230,7 @@ const Is = /* @__PURE__ */ U(Fi, [["render", Ui]]), qi = C({
|
|
|
5223
5230
|
position(i) {
|
|
5224
5231
|
if (this.emittedPosition != null) {
|
|
5225
5232
|
const t = this.emittedPosition;
|
|
5226
|
-
if (this.emittedPosition = void 0, t ===
|
|
5233
|
+
if (this.emittedPosition = void 0, t === $e(i))
|
|
5227
5234
|
return;
|
|
5228
5235
|
}
|
|
5229
5236
|
this.marker.setPosition(i);
|
|
@@ -5235,7 +5242,7 @@ const Is = /* @__PURE__ */ U(Fi, [["render", Ui]]), qi = C({
|
|
|
5235
5242
|
i ? this.marker.setIcon(i) : this.recreate();
|
|
5236
5243
|
},
|
|
5237
5244
|
clickable(i) {
|
|
5238
|
-
this.marker instanceof
|
|
5245
|
+
this.marker instanceof Oe ? this.recreate() : this.marker.setClickable(i);
|
|
5239
5246
|
},
|
|
5240
5247
|
draggable(i) {
|
|
5241
5248
|
this.marker.setDraggable(i);
|
|
@@ -5247,7 +5254,7 @@ const Is = /* @__PURE__ */ U(Fi, [["render", Ui]]), qi = C({
|
|
|
5247
5254
|
this.recreate();
|
|
5248
5255
|
},
|
|
5249
5256
|
zIndex(i) {
|
|
5250
|
-
this.marker instanceof
|
|
5257
|
+
this.marker instanceof Oe ? this.recreate() : this.marker.setZIndex(i);
|
|
5251
5258
|
},
|
|
5252
5259
|
visible(i) {
|
|
5253
5260
|
this.marker.setVisible(i);
|
|
@@ -5263,7 +5270,7 @@ const Is = /* @__PURE__ */ U(Fi, [["render", Ui]]), qi = C({
|
|
|
5263
5270
|
},
|
|
5264
5271
|
methods: {
|
|
5265
5272
|
$clusterer() {
|
|
5266
|
-
return
|
|
5273
|
+
return Ce(this.$parent, Vi);
|
|
5267
5274
|
},
|
|
5268
5275
|
onAddLabel(i) {
|
|
5269
5276
|
this.label = i, this.marker && this.marker.setLabel(i.overlay);
|
|
@@ -5282,14 +5289,14 @@ const Is = /* @__PURE__ */ U(Fi, [["render", Ui]]), qi = C({
|
|
|
5282
5289
|
}
|
|
5283
5290
|
}
|
|
5284
5291
|
});
|
|
5285
|
-
function
|
|
5286
|
-
return W(), j("div",
|
|
5292
|
+
function Ki(i, t, e, r, s, n) {
|
|
5293
|
+
return W(), j("div", ue({
|
|
5287
5294
|
class: i.$options.name
|
|
5288
5295
|
}, i.attrs.binds), [
|
|
5289
|
-
|
|
5296
|
+
G(i.$slots, "default")
|
|
5290
5297
|
], 16);
|
|
5291
5298
|
}
|
|
5292
|
-
const
|
|
5299
|
+
const Et = /* @__PURE__ */ U(Yi, [["render", Ki]]), Xi = C({
|
|
5293
5300
|
name: "tg-info-box",
|
|
5294
5301
|
mixins: [P],
|
|
5295
5302
|
inheritAttrs: !1,
|
|
@@ -5352,7 +5359,7 @@ const wt = /* @__PURE__ */ U(qi, [["render", Yi]]), Ki = C({
|
|
|
5352
5359
|
return this.$el;
|
|
5353
5360
|
},
|
|
5354
5361
|
$marker() {
|
|
5355
|
-
return
|
|
5362
|
+
return Ce(this.$parent, Et);
|
|
5356
5363
|
},
|
|
5357
5364
|
open(i) {
|
|
5358
5365
|
this.overlay.open(i);
|
|
@@ -5362,14 +5369,14 @@ const wt = /* @__PURE__ */ U(qi, [["render", Yi]]), Ki = C({
|
|
|
5362
5369
|
}
|
|
5363
5370
|
}
|
|
5364
5371
|
});
|
|
5365
|
-
function
|
|
5366
|
-
return W(), j("div",
|
|
5372
|
+
function Ji(i, t, e, r, s, n) {
|
|
5373
|
+
return W(), j("div", ue({
|
|
5367
5374
|
class: i.$options.name
|
|
5368
5375
|
}, i.attrs.binds), [
|
|
5369
|
-
|
|
5376
|
+
G(i.$slots, "default")
|
|
5370
5377
|
], 16);
|
|
5371
5378
|
}
|
|
5372
|
-
const
|
|
5379
|
+
const As = /* @__PURE__ */ U(Xi, [["render", Ji]]), Qi = C({
|
|
5373
5380
|
name: "tg-info-window",
|
|
5374
5381
|
mixins: [P],
|
|
5375
5382
|
inheritAttrs: !1,
|
|
@@ -5410,7 +5417,7 @@ const Ss = /* @__PURE__ */ U(Ki, [["render", Xi]]), Ji = C({
|
|
|
5410
5417
|
return this.$el;
|
|
5411
5418
|
},
|
|
5412
5419
|
$marker() {
|
|
5413
|
-
return
|
|
5420
|
+
return Ce(this.$parent, Et);
|
|
5414
5421
|
},
|
|
5415
5422
|
getOptions() {
|
|
5416
5423
|
return {
|
|
@@ -5433,23 +5440,24 @@ const Ss = /* @__PURE__ */ U(Ki, [["render", Xi]]), Ji = C({
|
|
|
5433
5440
|
this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
|
|
5434
5441
|
}
|
|
5435
5442
|
});
|
|
5436
|
-
function
|
|
5437
|
-
return
|
|
5443
|
+
function es(i, t, e, r, s, n) {
|
|
5444
|
+
return Pr((W(), j("div", ue({
|
|
5438
5445
|
class: i.$options.name
|
|
5439
5446
|
}, i.attrs.binds), [
|
|
5440
|
-
|
|
5447
|
+
G(i.$slots, "default")
|
|
5441
5448
|
], 16)), [
|
|
5442
|
-
[
|
|
5449
|
+
[kr, i.show]
|
|
5443
5450
|
]);
|
|
5444
5451
|
}
|
|
5445
|
-
const
|
|
5452
|
+
const Rs = /* @__PURE__ */ U(Qi, [["render", es]]), ts = C({
|
|
5446
5453
|
name: "tg-label",
|
|
5447
5454
|
mixins: [P],
|
|
5448
5455
|
inheritAttrs: !1,
|
|
5449
5456
|
props: {
|
|
5450
5457
|
position: m(y),
|
|
5451
5458
|
offset: m(Object),
|
|
5452
|
-
zIndex: m(Number)
|
|
5459
|
+
zIndex: m(Number),
|
|
5460
|
+
mapPane: N(Me)
|
|
5453
5461
|
},
|
|
5454
5462
|
emits: void 0,
|
|
5455
5463
|
setup(i, { attrs: t }) {
|
|
@@ -5470,6 +5478,9 @@ const As = /* @__PURE__ */ U(Ji, [["render", Qi]]), es = C({
|
|
|
5470
5478
|
},
|
|
5471
5479
|
visible(i) {
|
|
5472
5480
|
this.overlay.setVisible(i);
|
|
5481
|
+
},
|
|
5482
|
+
mapPane() {
|
|
5483
|
+
this.recreate();
|
|
5473
5484
|
}
|
|
5474
5485
|
},
|
|
5475
5486
|
methods: {
|
|
@@ -5481,14 +5492,15 @@ const As = /* @__PURE__ */ U(Ji, [["render", Qi]]), es = C({
|
|
|
5481
5492
|
return (i = this.$marker()) == null ? void 0 : i.marker;
|
|
5482
5493
|
},
|
|
5483
5494
|
$marker() {
|
|
5484
|
-
return
|
|
5495
|
+
return Ce(this.$parent, Et);
|
|
5485
5496
|
},
|
|
5486
5497
|
getOptions() {
|
|
5487
5498
|
return {
|
|
5488
5499
|
content: this.content(),
|
|
5489
5500
|
position: this.position,
|
|
5490
5501
|
offset: this.offset,
|
|
5491
|
-
zIndex: this.zIndex
|
|
5502
|
+
zIndex: this.zIndex,
|
|
5503
|
+
mapPane: this.mapPane
|
|
5492
5504
|
};
|
|
5493
5505
|
}
|
|
5494
5506
|
},
|
|
@@ -5499,14 +5511,14 @@ const As = /* @__PURE__ */ U(Ji, [["render", Qi]]), es = C({
|
|
|
5499
5511
|
this.$marker() ? this.$marker().onRemoveLabel(this) : this.$map.removeOverlay(this.overlay);
|
|
5500
5512
|
}
|
|
5501
5513
|
});
|
|
5502
|
-
function
|
|
5503
|
-
return W(), j("div",
|
|
5514
|
+
function rs(i, t, e, r, s, n) {
|
|
5515
|
+
return W(), j("div", ue({
|
|
5504
5516
|
class: i.$options.name
|
|
5505
5517
|
}, i.attrs.binds), [
|
|
5506
|
-
|
|
5518
|
+
G(i.$slots, "default")
|
|
5507
5519
|
], 16);
|
|
5508
5520
|
}
|
|
5509
|
-
const
|
|
5521
|
+
const $s = /* @__PURE__ */ U(ts, [["render", rs]]), Ds = C({
|
|
5510
5522
|
name: "tg-polygon",
|
|
5511
5523
|
mixins: [P],
|
|
5512
5524
|
inheritAttrs: !1,
|
|
@@ -5535,7 +5547,7 @@ const Rs = /* @__PURE__ */ U(es, [["render", ts]]), $s = C({
|
|
|
5535
5547
|
handler(i) {
|
|
5536
5548
|
if (this.emittedPaths != null) {
|
|
5537
5549
|
const t = this.emittedPaths;
|
|
5538
|
-
if (this.emittedPaths = void 0, t.length === i.length && t.every((e, r) => e ===
|
|
5550
|
+
if (this.emittedPaths = void 0, t.length === i.length && t.every((e, r) => e === $e(i[r])))
|
|
5539
5551
|
return;
|
|
5540
5552
|
}
|
|
5541
5553
|
this.overlay.setPaths(i);
|
|
@@ -5575,7 +5587,7 @@ const Rs = /* @__PURE__ */ U(es, [["render", ts]]), $s = C({
|
|
|
5575
5587
|
onDestroy() {
|
|
5576
5588
|
this.$map.removeOverlay(this.overlay);
|
|
5577
5589
|
}
|
|
5578
|
-
}),
|
|
5590
|
+
}), zs = C({
|
|
5579
5591
|
name: "tg-polyline",
|
|
5580
5592
|
mixins: [P],
|
|
5581
5593
|
inheritAttrs: !1,
|
|
@@ -5602,7 +5614,7 @@ const Rs = /* @__PURE__ */ U(es, [["render", ts]]), $s = C({
|
|
|
5602
5614
|
handler(i) {
|
|
5603
5615
|
if (this.emittedPath != null) {
|
|
5604
5616
|
const t = this.emittedPath;
|
|
5605
|
-
if (this.emittedPath = void 0, t ===
|
|
5617
|
+
if (this.emittedPath = void 0, t === $e(i))
|
|
5606
5618
|
return;
|
|
5607
5619
|
}
|
|
5608
5620
|
this.overlay.setPath(i);
|
|
@@ -5636,7 +5648,7 @@ const Rs = /* @__PURE__ */ U(es, [["render", ts]]), $s = C({
|
|
|
5636
5648
|
onDestroy() {
|
|
5637
5649
|
this.$map.removeOverlay(this.overlay);
|
|
5638
5650
|
}
|
|
5639
|
-
}),
|
|
5651
|
+
}), Ns = C({
|
|
5640
5652
|
name: "tg-rectangle",
|
|
5641
5653
|
mixins: [P],
|
|
5642
5654
|
inheritAttrs: !1,
|
|
@@ -5702,14 +5714,14 @@ const Rs = /* @__PURE__ */ U(es, [["render", ts]]), $s = C({
|
|
|
5702
5714
|
onDestroy() {
|
|
5703
5715
|
this.$map.removeOverlay(this.overlay);
|
|
5704
5716
|
}
|
|
5705
|
-
}),
|
|
5717
|
+
}), is = ["beforeUpdate", "updated"], Gs = {
|
|
5706
5718
|
install(i, t = {}) {
|
|
5707
5719
|
if (t.enable !== !1) {
|
|
5708
5720
|
const e = C({
|
|
5709
5721
|
beforeCreate() {
|
|
5710
|
-
const r =
|
|
5711
|
-
t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) :
|
|
5712
|
-
} :
|
|
5722
|
+
const r = fr() ?? "", n = (t.nameRegex || /^[A-Z]/).test(r) ? (a) => {
|
|
5723
|
+
t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : is.includes(a) || console.debug("[lifecycle]", r, a);
|
|
5724
|
+
} : ye;
|
|
5713
5725
|
n("beforeCreate"), this.__life_impl = n;
|
|
5714
5726
|
},
|
|
5715
5727
|
created() {
|
|
@@ -5748,168 +5760,168 @@ const Rs = /* @__PURE__ */ U(es, [["render", ts]]), $s = C({
|
|
|
5748
5760
|
i.mixin(e);
|
|
5749
5761
|
}
|
|
5750
5762
|
}
|
|
5751
|
-
},
|
|
5752
|
-
function
|
|
5763
|
+
}, ss = 6378137;
|
|
5764
|
+
function fe(i) {
|
|
5753
5765
|
return i * Math.PI / 180;
|
|
5754
5766
|
}
|
|
5755
|
-
function
|
|
5767
|
+
function Dt(i) {
|
|
5756
5768
|
return i * 180 / Math.PI;
|
|
5757
5769
|
}
|
|
5758
|
-
function
|
|
5770
|
+
function ns(i, t) {
|
|
5759
5771
|
if (i.lat === t.lat && i.lng === t.lng)
|
|
5760
5772
|
return 0;
|
|
5761
|
-
const e =
|
|
5773
|
+
const e = fe((i.lat + t.lat) / 2), r = fe((i.lat - t.lat) / 2), s = fe((i.lng - t.lng) / 2);
|
|
5762
5774
|
let n = Math.sin(r), a = Math.sin(s), h = Math.sin(e);
|
|
5763
|
-
const o =
|
|
5775
|
+
const o = ss, l = 1 / 298.257;
|
|
5764
5776
|
n = n * n, a = a * a, h = h * h;
|
|
5765
5777
|
const d = n * (1 - a) + (1 - h) * a, u = (1 - n) * (1 - a) + h * a, p = Math.atan(Math.sqrt(d / u)), b = Math.sqrt(d * u) / p, _ = 2 * p * o, M = (3 * b - 1) / 2 / u, g = (3 * b + 1) / 2 / d;
|
|
5766
5778
|
return _ * (1 + l * (M * h * (1 - n) - g * (1 - h) * n));
|
|
5767
5779
|
}
|
|
5768
|
-
function
|
|
5769
|
-
const s = 63567523142e-4, n = 1 / 298.257223563, a =
|
|
5780
|
+
function os(i, t, e) {
|
|
5781
|
+
const s = 63567523142e-4, n = 1 / 298.257223563, a = fe(t), h = Math.sin(a), o = Math.cos(a), l = (1 - n) * Math.tan(fe(i.lat)), d = 1 / Math.sqrt(1 + l * l), u = l * d, p = Math.atan2(l, o), b = d * h, _ = 1 - b * b, M = _ * (6378137 * 6378137 - s * s) / (s * s), g = 1 + M / 16384 * (4096 + M * (-768 + M * (320 - 175 * M))), f = M / 1024 * (256 + M * (-128 + M * (74 - 47 * M)));
|
|
5770
5782
|
let v = 0, O = 0, x = 0, w = e / (s * g), K = 2 * Math.PI;
|
|
5771
5783
|
for (; Math.abs(w - K) > 1e-12; ) {
|
|
5772
5784
|
v = Math.cos(2 * p + w), O = Math.sin(w), x = Math.cos(w);
|
|
5773
|
-
const
|
|
5774
|
-
K = w, w = e / (s * g) +
|
|
5785
|
+
const _r = f * O * (v + f / 4 * (x * (-1 + 2 * v * v) - f / 6 * v * (-3 + 4 * O * O) * (-3 + 4 * v * v)));
|
|
5786
|
+
K = w, w = e / (s * g) + _r;
|
|
5775
5787
|
}
|
|
5776
|
-
const
|
|
5788
|
+
const ie = u * O - d * x * o, Ge = Math.atan2(
|
|
5777
5789
|
u * x + d * O * o,
|
|
5778
|
-
(1 - n) * Math.sqrt(b * b +
|
|
5779
|
-
),
|
|
5780
|
-
return { lng: i.lng +
|
|
5781
|
-
}
|
|
5782
|
-
const
|
|
5783
|
-
getDistance:
|
|
5784
|
-
getDestination:
|
|
5785
|
-
},
|
|
5790
|
+
(1 - n) * Math.sqrt(b * b + ie * ie)
|
|
5791
|
+
), yr = Math.atan2(O * h, d * x - u * O * o), Ze = n / 16 * _ * (4 + n * (4 - 3 * _)), vr = yr - (1 - Ze) * n * b * (w + Ze * O * (v + Ze * x * (-1 + 2 * v * v)));
|
|
5792
|
+
return { lng: i.lng + Dt(vr), lat: Dt(Ge) };
|
|
5793
|
+
}
|
|
5794
|
+
const Zs = {
|
|
5795
|
+
getDistance: ns,
|
|
5796
|
+
getDestination: os
|
|
5797
|
+
}, Ws = {
|
|
5786
5798
|
install(i, t) {
|
|
5787
|
-
|
|
5799
|
+
Yr(t);
|
|
5788
5800
|
const e = i.config.optionMergeStrategies;
|
|
5789
|
-
e[
|
|
5801
|
+
e[te] = e[re] = (r, s) => r ? [...new Set([].concat(r, s))] : Array.isArray(s) ? s : [s];
|
|
5790
5802
|
}
|
|
5791
5803
|
};
|
|
5792
5804
|
export {
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5805
|
+
Kt as AbstractControl,
|
|
5806
|
+
ot as AbstractMap,
|
|
5807
|
+
he as Arrays,
|
|
5808
|
+
rr as Autocomplete,
|
|
5809
|
+
ni as BaiduAutocomplete,
|
|
5810
|
+
lt as BaiduCircle,
|
|
5811
|
+
Je as BaiduControl,
|
|
5812
|
+
pt as BaiduInfoBoxOverlay,
|
|
5813
|
+
dt as BaiduInfoWindow,
|
|
5814
|
+
et as BaiduMapTypeControl,
|
|
5815
|
+
Oe as BaiduMarker,
|
|
5816
|
+
ci as BaiduMarkerClusterer,
|
|
5817
|
+
ze as BaiduOverlay,
|
|
5818
|
+
pi as BaiduPlacesService,
|
|
5819
|
+
vt as BaiduPolyShape,
|
|
5820
|
+
Mt as BaiduPolygon,
|
|
5821
|
+
_t as BaiduPolyline,
|
|
5822
|
+
Ot as BaiduRectangle,
|
|
5823
|
+
tt as BaiduScaleControl,
|
|
5824
|
+
mi as BaiduSearchBox,
|
|
5825
|
+
it as BaiduZoomControl,
|
|
5826
|
+
Bt as CachedValue,
|
|
5815
5827
|
k as ControlPosition,
|
|
5816
5828
|
A as ControlPositionConverter,
|
|
5817
5829
|
Q as CoordType,
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5830
|
+
Qr as CustomControl,
|
|
5831
|
+
Jr as FastFindValues,
|
|
5832
|
+
si as GoogleAutocomplete,
|
|
5833
|
+
ht as GoogleCircle,
|
|
5834
|
+
Qe as GoogleControl,
|
|
5835
|
+
gt as GoogleInfoBoxOverlay,
|
|
5836
|
+
ut as GoogleInfoWindow,
|
|
5837
|
+
Le as GoogleMapTypeControl,
|
|
5838
|
+
yt as GoogleMarker,
|
|
5839
|
+
di as GoogleMarkerClusterer,
|
|
5840
|
+
at as GoogleOverlay,
|
|
5841
|
+
ui as GooglePlacesService,
|
|
5842
|
+
Tt as GooglePolygon,
|
|
5843
|
+
bt as GooglePolyline,
|
|
5844
|
+
Ct as GoogleRectangle,
|
|
5845
|
+
rt as GoogleScaleControl,
|
|
5846
|
+
gi as GoogleSearchBox,
|
|
5847
|
+
st as GoogleZoomControl,
|
|
5848
|
+
Ie as Icon,
|
|
5849
|
+
ct as InfoWindow,
|
|
5850
|
+
kt as KeyValue,
|
|
5839
5851
|
y as LatLng,
|
|
5840
5852
|
I as LatLngBounds,
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5853
|
+
Gs as LifecycleLogPlugin,
|
|
5854
|
+
te as MIXIN_HOOK_CREATE,
|
|
5855
|
+
re as MIXIN_HOOK_DESTROY,
|
|
5856
|
+
wt as MIXIN_MAP_NAME,
|
|
5857
|
+
ce as MVCArrays,
|
|
5846
5858
|
P as MapMixin,
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5859
|
+
Jt as MapTypeControlType,
|
|
5860
|
+
fi as MapZoom,
|
|
5861
|
+
lr as MarkerClusterer,
|
|
5862
|
+
_e as Objects,
|
|
5863
|
+
ur as Overlay,
|
|
5864
|
+
hr as PlacesService,
|
|
5853
5865
|
q as Point,
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5866
|
+
cr as SearchBox,
|
|
5867
|
+
Zs as SphericalUtils,
|
|
5868
|
+
be as Strings,
|
|
5869
|
+
Se as SymbolIcon,
|
|
5870
|
+
bs as SymbolPath,
|
|
5871
|
+
Is as TgCircle,
|
|
5872
|
+
Ls as TgCustomControl,
|
|
5873
|
+
Ss as TgElementOverlay,
|
|
5874
|
+
As as TgInfoBox,
|
|
5875
|
+
Rs as TgInfoWindow,
|
|
5876
|
+
$s as TgLabel,
|
|
5877
|
+
$i as TgMap,
|
|
5878
|
+
Ke as TgMapFactory,
|
|
5867
5879
|
z as TgMapType,
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5880
|
+
xs as TgMapTypeControl,
|
|
5881
|
+
Es as TgMapWidget,
|
|
5882
|
+
Et as TgMarker,
|
|
5883
|
+
Vi as TgMarkerClusterer,
|
|
5884
|
+
Ds as TgPolygon,
|
|
5885
|
+
zs as TgPolyline,
|
|
5886
|
+
Ns as TgRectangle,
|
|
5887
|
+
Ps as TgScaleControl,
|
|
5888
|
+
Bs as TgTrafficLayer,
|
|
5889
|
+
ks as TgZoomControl,
|
|
5890
|
+
Be as UnionIcon,
|
|
5891
|
+
oe as assert,
|
|
5892
|
+
Fe as assertNever,
|
|
5893
|
+
Ee as callHook,
|
|
5894
|
+
Ms as computedSaveOnThis,
|
|
5895
|
+
mr as createEmptyVNode,
|
|
5896
|
+
Ii as createPropertyObject,
|
|
5897
|
+
Ts as createPropertyObjectTyped,
|
|
5898
|
+
ms as debug,
|
|
5899
|
+
Ws as default,
|
|
5888
5900
|
L as eventProp,
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5901
|
+
Cs as extractVNodeFromSlotsByComponent,
|
|
5902
|
+
Os as findByComponentType,
|
|
5903
|
+
os as getDestination,
|
|
5904
|
+
Ft as getTgMapConfig,
|
|
5905
|
+
fs as isDef,
|
|
5906
|
+
ds as isInstanceOf,
|
|
5907
|
+
cs as lateinit,
|
|
5908
|
+
ye as noop,
|
|
5897
5909
|
m as optionalProp,
|
|
5898
|
-
|
|
5910
|
+
Mi as path,
|
|
5899
5911
|
R as requiredProp,
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5912
|
+
us as safeAs,
|
|
5913
|
+
Ce as safeAsComponent,
|
|
5914
|
+
Yr as setTgMapConfig,
|
|
5915
|
+
Si as splitAttrs,
|
|
5916
|
+
N as stringEnumProp,
|
|
5917
|
+
Bi as stringUnionPropFromValues,
|
|
5906
5918
|
E as throwError,
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5919
|
+
Wt as throwUnsupported,
|
|
5920
|
+
gs as todo,
|
|
5921
|
+
Ue as typed,
|
|
5922
|
+
ps as unwrapStringEnumValue,
|
|
5923
|
+
ws as useEventLogMethods,
|
|
5912
5924
|
F as useSplittedAttrs,
|
|
5913
|
-
|
|
5925
|
+
Wi as useTgMapInner
|
|
5914
5926
|
};
|
|
5915
5927
|
//# sourceMappingURL=tg-map.js.map
|