tg-map-vue3 3.0.8 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/components/TgMap.vue.d.ts +81 -41
- package/dist/src/components/controls/TgCustomControl.vue.d.ts +4 -3
- package/dist/src/components/controls/TgMapTypeControl.vue.d.ts +5 -5
- package/dist/src/components/controls/TgScaleControl.vue.d.ts +3 -3
- package/dist/src/components/controls/TgZoomControl.vue.d.ts +3 -3
- package/dist/src/components/overlays/TgCircle.vue.d.ts +3 -2
- package/dist/src/components/overlays/TgElementOverlay.vue.d.ts +3 -3
- package/dist/src/components/overlays/TgInfoBox.vue.d.ts +13 -4
- package/dist/src/components/overlays/TgInfoWindow.vue.d.ts +3 -2
- package/dist/src/components/overlays/TgLabel.vue.d.ts +3 -2
- package/dist/src/components/overlays/TgMarker.vue.d.ts +9 -6
- package/dist/src/components/overlays/TgPolygon.vue.d.ts +3 -2
- package/dist/src/components/overlays/TgPolyline.vue.d.ts +3 -2
- package/dist/src/map/map/baidu-map.d.ts +2 -2
- package/dist/src/map/map/map-options.d.ts +3 -3
- package/dist/src/map/map/map-type.d.ts +0 -1
- package/dist/src/utils/mapped-types.d.ts +21 -0
- package/dist/src/utils/strings.d.ts +2 -1
- package/dist/src/utils/vue-utils.d.ts +64 -15
- package/dist/tg-map.js +673 -648
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +5 -5
- package/dist/tg-map.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/tg-map.js
CHANGED
|
@@ -1,164 +1,26 @@
|
|
|
1
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:100vh;position:relative}.tg-map__map{width:100%;height:100%}.tg-map-widget{position:absolute}.tg-map>.tg-custom-control{display:none}.element-overlay{position:absolute}.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
|
|
3
|
-
var
|
|
4
|
-
var h = (i, e, t) => (
|
|
5
|
-
import { createCommentVNode as
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
throw new Error(`Unsupported: ${i}`);
|
|
11
|
-
}
|
|
12
|
-
function Ti(i) {
|
|
13
|
-
throw new Error(`todo: ${i}`);
|
|
14
|
-
}
|
|
15
|
-
function Oi(i) {
|
|
16
|
-
return i;
|
|
17
|
-
}
|
|
18
|
-
function fe(...i) {
|
|
19
|
-
}
|
|
20
|
-
function Ci(i) {
|
|
21
|
-
return i != null;
|
|
22
|
-
}
|
|
23
|
-
function W(i, e) {
|
|
24
|
-
return {
|
|
25
|
-
type: String,
|
|
26
|
-
default: e,
|
|
27
|
-
validator: (t) => Object.values(i).includes(t)
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
function qt(i, e) {
|
|
31
|
-
return {
|
|
32
|
-
type: String,
|
|
33
|
-
default: e,
|
|
34
|
-
validator: (t) => i.includes(t)
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function z(i) {
|
|
38
|
-
return {
|
|
39
|
-
type: i,
|
|
40
|
-
required: !0
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function m(i, e) {
|
|
44
|
-
return {
|
|
45
|
-
type: i,
|
|
46
|
-
default: e
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
function wi(i) {
|
|
50
|
-
const e = {};
|
|
51
|
-
return Object.entries(i).forEach(([t, r]) => {
|
|
52
|
-
const s = `__${t}`;
|
|
53
|
-
e[t] = {
|
|
54
|
-
get() {
|
|
55
|
-
const n = this[s];
|
|
56
|
-
return n === void 0 ? r : n;
|
|
57
|
-
},
|
|
58
|
-
set(n) {
|
|
59
|
-
this[s] = n;
|
|
60
|
-
}
|
|
61
|
-
// Vue3已经不支持该属性
|
|
62
|
-
// cache: false
|
|
63
|
-
};
|
|
64
|
-
}), e;
|
|
65
|
-
}
|
|
66
|
-
const ie = {
|
|
67
|
-
enumerable: !0,
|
|
68
|
-
configurable: !0,
|
|
69
|
-
get: fe,
|
|
70
|
-
set: fe
|
|
71
|
-
};
|
|
72
|
-
function Xt(i) {
|
|
73
|
-
return Object.keys(i).forEach((e) => {
|
|
74
|
-
const t = i[e];
|
|
75
|
-
let r = !1;
|
|
76
|
-
typeof t == "function" ? (ie.get = t, ie.set = fe, r = !0) : typeof t == "object" && typeof t.get == "function" && (ie.get = t.get, ie.set = t.set, r = !0), r && (i[e] = Object.defineProperty(i, e, ie));
|
|
77
|
-
}), i;
|
|
78
|
-
}
|
|
79
|
-
function xi(i) {
|
|
80
|
-
return Xt(i);
|
|
81
|
-
}
|
|
82
|
-
function Jt() {
|
|
83
|
-
return Pe();
|
|
84
|
-
}
|
|
85
|
-
function ue(i, e) {
|
|
86
|
-
const t = i.$options[e];
|
|
87
|
-
if (t)
|
|
88
|
-
for (const r of t)
|
|
89
|
-
r.call(i);
|
|
90
|
-
}
|
|
91
|
-
function Ei(i, e) {
|
|
92
|
-
for (const t of i)
|
|
93
|
-
if (t.$options.name === e.name)
|
|
94
|
-
return t;
|
|
2
|
+
var Vt = Object.defineProperty;
|
|
3
|
+
var Ht = (i, e, t) => e in i ? Vt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
4
|
+
var h = (i, e, t) => (Ht(i, typeof e != "symbol" ? e + "" : e, t), t);
|
|
5
|
+
import { createCommentVNode as Ie, computed as bt, defineComponent as C, openBlock as Z, createElementBlock as G, mergeProps as ie, createElementVNode as Ft, renderSlot as A, normalizeClass as De, normalizeStyle as Ut, withDirectives as Yt, vShow as Kt } from "vue";
|
|
6
|
+
function F(i, e, t) {
|
|
7
|
+
Object.keys(i).forEach((r) => {
|
|
8
|
+
r.startsWith("update:") || t != null && t.includes(r) || e.addEventListener(r, i[r]);
|
|
9
|
+
});
|
|
95
10
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const t = i.default();
|
|
100
|
-
for (const r of t)
|
|
101
|
-
if ((r == null ? void 0 : r.type).name === e.name)
|
|
102
|
-
return r;
|
|
11
|
+
let qt = 1;
|
|
12
|
+
function Xt() {
|
|
13
|
+
return qt++;
|
|
103
14
|
}
|
|
104
|
-
function
|
|
105
|
-
|
|
106
|
-
return Object.keys(i).forEach((r) => {
|
|
107
|
-
r.startsWith("on") ? e[r.substring(2).toLowerCase()] = i[r] : t[r] = i[r];
|
|
108
|
-
}), {
|
|
109
|
-
binds: t,
|
|
110
|
-
listeners: e
|
|
111
|
-
};
|
|
15
|
+
function ye(i, e) {
|
|
16
|
+
return e.__id__ || (e.__id__ = Xt()), `${i}::${e.__id__}`;
|
|
112
17
|
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* @event 一般来说传{@link Tg.Event}对象, 但传其他对象也不会报错
|
|
116
|
-
*/
|
|
117
|
-
eventLog(i) {
|
|
118
|
-
console.log(i), this.$_prev_type = i && i.type, this.$_prev_time = Date.now();
|
|
119
|
-
},
|
|
120
|
-
/** @see eventLog */
|
|
121
|
-
eventLogLess(i) {
|
|
122
|
-
((i && i.type) !== this.$_prev_type || Date.now() - (this.$_prev_time ?? 0) > 1e3) && this.eventLog(i);
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
var ye;
|
|
126
|
-
((i) => {
|
|
127
|
-
function e(r, s) {
|
|
128
|
-
if (r !== void 0)
|
|
129
|
-
return Object.values(s).includes(r) ? r : void 0;
|
|
130
|
-
}
|
|
131
|
-
i.toEnumOrNull = e;
|
|
132
|
-
function t(r) {
|
|
133
|
-
return r.split(`
|
|
134
|
-
`).map((s) => s.trim()).join(`
|
|
135
|
-
`);
|
|
136
|
-
}
|
|
137
|
-
i.trimIndent = t;
|
|
138
|
-
})(ye || (ye = {}));
|
|
139
|
-
const bt = "$map", Le = "onCreate", Be = "onDestroy", w = C({
|
|
140
|
-
inject: [bt],
|
|
141
|
-
mounted() {
|
|
142
|
-
ue(this, Le);
|
|
143
|
-
},
|
|
144
|
-
beforeUnmount() {
|
|
145
|
-
ue(this, Be);
|
|
146
|
-
},
|
|
147
|
-
methods: {
|
|
148
|
-
recreate() {
|
|
149
|
-
ue(this, Be), ue(this, Le);
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
render() {
|
|
153
|
-
return Jt();
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
var Tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, G = {}, Qt = {
|
|
18
|
+
var Tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, W = {}, Jt = {
|
|
157
19
|
get exports() {
|
|
158
|
-
return
|
|
20
|
+
return W;
|
|
159
21
|
},
|
|
160
22
|
set exports(i) {
|
|
161
|
-
|
|
23
|
+
W = i;
|
|
162
24
|
}
|
|
163
25
|
};
|
|
164
26
|
(function(i) {
|
|
@@ -199,12 +61,12 @@ var Tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
199
61
|
return !1;
|
|
200
62
|
}
|
|
201
63
|
function l(p, f) {
|
|
202
|
-
var v = p - 65e-4, O = f - 6e-3,
|
|
203
|
-
return [
|
|
64
|
+
var v = p - 65e-4, O = f - 6e-3, Y = Math.sqrt(v * v + O * O) - 2e-5 * Math.sin(O * e), B = Math.atan2(O, v) - 3e-6 * Math.cos(v * e), ue = Y * Math.cos(B), xe = Y * Math.sin(B);
|
|
65
|
+
return [ue, xe];
|
|
204
66
|
}
|
|
205
67
|
function c(p, f) {
|
|
206
|
-
var v = Math.sqrt(p * p + f * f) + 2e-5 * Math.sin(f * e), O = Math.atan2(f, p) + 3e-6 * Math.cos(p * e),
|
|
207
|
-
return [
|
|
68
|
+
var v = Math.sqrt(p * p + f * f) + 2e-5 * Math.sin(f * e), O = Math.atan2(f, p) + 3e-6 * Math.cos(p * e), Y = v * Math.cos(O) + 65e-4, B = v * Math.sin(O) + 6e-3;
|
|
69
|
+
return [Y, B];
|
|
208
70
|
}
|
|
209
71
|
function u(p, f) {
|
|
210
72
|
return o(p, f) ? b(p, f) : [p, f];
|
|
@@ -216,12 +78,12 @@ var Tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
216
78
|
return [p * 2 - v[0], f * 2 - v[1]];
|
|
217
79
|
}
|
|
218
80
|
function b(p, f) {
|
|
219
|
-
var v = M(p - 105, f - 35), O = T(p - 105, f - 35),
|
|
81
|
+
var v = M(p - 105, f - 35), O = T(p - 105, f - 35), Y = f / 180 * t, B = Math.sin(Y);
|
|
220
82
|
B = 1 - s * B * B;
|
|
221
|
-
var
|
|
222
|
-
v = v * 180 / (r * (1 - s) / (B *
|
|
223
|
-
var xe = f + v,
|
|
224
|
-
return [
|
|
83
|
+
var ue = Math.sqrt(B);
|
|
84
|
+
v = v * 180 / (r * (1 - s) / (B * ue) * t), O = O * 180 / (r / ue * Math.cos(Y) * t);
|
|
85
|
+
var xe = f + v, Wt = p + O;
|
|
86
|
+
return [Wt, xe];
|
|
225
87
|
}
|
|
226
88
|
function M(p, f) {
|
|
227
89
|
var v = -100 + 2 * p + 3 * f + 0.2 * f * f + 0.1 * p * f + 0.2 * Math.sqrt(Math.abs(p));
|
|
@@ -256,15 +118,32 @@ var Tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
256
118
|
}
|
|
257
119
|
};
|
|
258
120
|
});
|
|
259
|
-
})(
|
|
260
|
-
function
|
|
121
|
+
})(Jt);
|
|
122
|
+
function x(i) {
|
|
123
|
+
throw new Error(i);
|
|
124
|
+
}
|
|
125
|
+
function Qt(i) {
|
|
126
|
+
throw new Error(`Unsupported: ${i}`);
|
|
127
|
+
}
|
|
128
|
+
function wi(i) {
|
|
129
|
+
throw new Error(`todo: ${i}`);
|
|
130
|
+
}
|
|
131
|
+
function xi(i) {
|
|
132
|
+
return i;
|
|
133
|
+
}
|
|
134
|
+
function ve(...i) {
|
|
135
|
+
}
|
|
136
|
+
function Ei(i) {
|
|
137
|
+
return i != null;
|
|
138
|
+
}
|
|
139
|
+
function ae(i, e) {
|
|
261
140
|
if (!i)
|
|
262
141
|
throw new Error(`AssertionError: ${e}`);
|
|
263
142
|
}
|
|
264
143
|
function ut(i) {
|
|
265
144
|
throw new Error(`Unexpected object: ${i}`);
|
|
266
145
|
}
|
|
267
|
-
var
|
|
146
|
+
var q = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(q || {});
|
|
268
147
|
const Ee = "wgs84", S = class {
|
|
269
148
|
constructor(e, t, r) {
|
|
270
149
|
this.lat = e, this.lng = t, this.coord = r;
|
|
@@ -318,11 +197,11 @@ const Ee = "wgs84", S = class {
|
|
|
318
197
|
convert(e) {
|
|
319
198
|
switch (this.coord) {
|
|
320
199
|
case "bd09":
|
|
321
|
-
return e === "gcj02" ?
|
|
200
|
+
return e === "gcj02" ? W.bd09ToGcj02(this.lng, this.lat) : W.bd09ToWgs84(this.lng, this.lat);
|
|
322
201
|
case "gcj02":
|
|
323
|
-
return e === "wgs84" ?
|
|
202
|
+
return e === "wgs84" ? W.gcj02ToWgs84(this.lng, this.lat) : W.gcj02ToBd09(this.lng, this.lat);
|
|
324
203
|
case "wgs84":
|
|
325
|
-
return e === "bd09" ?
|
|
204
|
+
return e === "bd09" ? W.wgs84ToBd09(this.lng, this.lat) : W.wgs84ToGcj02(this.lng, this.lat);
|
|
326
205
|
}
|
|
327
206
|
throw new Error(`不支持的坐标转换: ${this.coord}=>${e}`);
|
|
328
207
|
}
|
|
@@ -335,7 +214,7 @@ const Ee = "wgs84", S = class {
|
|
|
335
214
|
};
|
|
336
215
|
let y = S;
|
|
337
216
|
h(y, "ZERO", S.create(0, 0));
|
|
338
|
-
const
|
|
217
|
+
const K = class {
|
|
339
218
|
/**
|
|
340
219
|
* 不推荐直接创建LatLngBounds, sw和ne的大小关系可能没法保证, 推荐用LatLngBounds.Builder或者LatLngBounds.from等静态方法来创建
|
|
341
220
|
* @param sw 西南, lat/lng更小
|
|
@@ -343,7 +222,7 @@ const Y = class {
|
|
|
343
222
|
*/
|
|
344
223
|
constructor(e, t) {
|
|
345
224
|
h(this, "coord");
|
|
346
|
-
this.sw = e, this.ne = t,
|
|
225
|
+
this.sw = e, this.ne = t, ae(e.coord === t.coord, "sw和ne的coord应该相同"), ae(Number.isFinite(e.lat) && Number.isFinite(e.lng) && Number.isFinite(t.lat) && Number.isFinite(t.lng), `sw(${e})和ne(${t})不能包含NaN或Infinite`), ae(e.lat <= t.lat, `sw.lat(${e.lat})应该比ne.lat(${t.lat})小`), this.coord = e.coord;
|
|
347
226
|
}
|
|
348
227
|
static isBetweenLng(e, t, r) {
|
|
349
228
|
return e <= t ? e <= r && r <= t : e <= r || r <= t;
|
|
@@ -351,7 +230,7 @@ const Y = class {
|
|
|
351
230
|
static fromArray(e) {
|
|
352
231
|
if (e.length === 0)
|
|
353
232
|
return;
|
|
354
|
-
const t = new
|
|
233
|
+
const t = new K.Builder(e[0]);
|
|
355
234
|
for (let r = 1; r < e.length; r++)
|
|
356
235
|
t.include(e[r]);
|
|
357
236
|
return t.build();
|
|
@@ -360,13 +239,13 @@ const Y = class {
|
|
|
360
239
|
return this.fromArray(e) ?? x("positions中没有点");
|
|
361
240
|
}
|
|
362
241
|
static fromGoogle(e, t) {
|
|
363
|
-
return new
|
|
242
|
+
return new K(
|
|
364
243
|
y.fromGoogle(e.getSouthWest(), t),
|
|
365
244
|
y.fromGoogle(e.getNorthEast(), t)
|
|
366
245
|
);
|
|
367
246
|
}
|
|
368
247
|
static fromBaidu(e, t) {
|
|
369
|
-
return new
|
|
248
|
+
return new K(
|
|
370
249
|
y.fromBaidu(e.getSouthWest(), t),
|
|
371
250
|
y.fromBaidu(e.getNorthEast(), t)
|
|
372
251
|
);
|
|
@@ -379,7 +258,7 @@ const Y = class {
|
|
|
379
258
|
}
|
|
380
259
|
contains(e) {
|
|
381
260
|
const { lat: t, lng: r } = e.to(this.coord);
|
|
382
|
-
return this.sw.lat <= t && t <= this.ne.lat &&
|
|
261
|
+
return this.sw.lat <= t && t <= this.ne.lat && K.isBetweenLng(this.sw.lng, this.ne.lng, r);
|
|
383
262
|
}
|
|
384
263
|
getCenter() {
|
|
385
264
|
const e = (this.sw.lat + this.ne.lat) / 2, t = (this.sw.lng + this.ne.lng + (this.sw.lng < this.ne.lng ? 0 : 360)) / 2;
|
|
@@ -401,8 +280,8 @@ const Y = class {
|
|
|
401
280
|
return [this.sw.toBaidu(e), this.ne.toBaidu(e)];
|
|
402
281
|
}
|
|
403
282
|
};
|
|
404
|
-
let
|
|
405
|
-
h(
|
|
283
|
+
let V = K;
|
|
284
|
+
h(V, "EMPTY", new K(y.ZERO, y.ZERO));
|
|
406
285
|
((i) => {
|
|
407
286
|
class e {
|
|
408
287
|
constructor(r) {
|
|
@@ -430,23 +309,123 @@ h(j, "EMPTY", new Y(y.ZERO, y.ZERO));
|
|
|
430
309
|
}
|
|
431
310
|
}
|
|
432
311
|
i.Builder = e;
|
|
433
|
-
})(
|
|
434
|
-
function
|
|
312
|
+
})(V || (V = {}));
|
|
313
|
+
var er = function(e) {
|
|
314
|
+
return tr(e) && !rr(e);
|
|
315
|
+
};
|
|
316
|
+
function tr(i) {
|
|
317
|
+
return !!i && typeof i == "object";
|
|
318
|
+
}
|
|
319
|
+
function rr(i) {
|
|
320
|
+
var e = Object.prototype.toString.call(i);
|
|
321
|
+
return e === "[object RegExp]" || e === "[object Date]" || nr(i);
|
|
322
|
+
}
|
|
323
|
+
var ir = typeof Symbol == "function" && Symbol.for, sr = ir ? Symbol.for("react.element") : 60103;
|
|
324
|
+
function nr(i) {
|
|
325
|
+
return i.$$typeof === sr;
|
|
326
|
+
}
|
|
327
|
+
function or(i) {
|
|
328
|
+
return Array.isArray(i) ? [] : {};
|
|
329
|
+
}
|
|
330
|
+
function le(i, e) {
|
|
331
|
+
return e.clone !== !1 && e.isMergeableObject(i) ? ee(or(i), i, e) : i;
|
|
332
|
+
}
|
|
333
|
+
function ar(i, e, t) {
|
|
334
|
+
return i.concat(e).map(function(r) {
|
|
335
|
+
return le(r, t);
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
function lr(i, e) {
|
|
339
|
+
if (!e.customMerge)
|
|
340
|
+
return ee;
|
|
341
|
+
var t = e.customMerge(i);
|
|
342
|
+
return typeof t == "function" ? t : ee;
|
|
343
|
+
}
|
|
344
|
+
function hr(i) {
|
|
345
|
+
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(e) {
|
|
346
|
+
return Object.propertyIsEnumerable.call(i, e);
|
|
347
|
+
}) : [];
|
|
435
348
|
}
|
|
436
349
|
function gt(i) {
|
|
350
|
+
return Object.keys(i).concat(hr(i));
|
|
351
|
+
}
|
|
352
|
+
function Ot(i, e) {
|
|
353
|
+
try {
|
|
354
|
+
return e in i;
|
|
355
|
+
} catch {
|
|
356
|
+
return !1;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
function cr(i, e) {
|
|
360
|
+
return Ot(i, e) && !(Object.hasOwnProperty.call(i, e) && Object.propertyIsEnumerable.call(i, e));
|
|
361
|
+
}
|
|
362
|
+
function dr(i, e, t) {
|
|
363
|
+
var r = {};
|
|
364
|
+
return t.isMergeableObject(i) && gt(i).forEach(function(s) {
|
|
365
|
+
r[s] = le(i[s], t);
|
|
366
|
+
}), gt(e).forEach(function(s) {
|
|
367
|
+
cr(i, s) || (Ot(i, s) && t.isMergeableObject(e[s]) ? r[s] = lr(s, t)(i[s], e[s], t) : r[s] = le(e[s], t));
|
|
368
|
+
}), r;
|
|
369
|
+
}
|
|
370
|
+
function ee(i, e, t) {
|
|
371
|
+
t = t || {}, t.arrayMerge = t.arrayMerge || ar, t.isMergeableObject = t.isMergeableObject || er, t.cloneUnlessOtherwiseSpecified = le;
|
|
372
|
+
var r = Array.isArray(e), s = Array.isArray(i), n = r === s;
|
|
373
|
+
return n ? r ? t.arrayMerge(i, e, t) : dr(i, e, t) : le(e, t);
|
|
374
|
+
}
|
|
375
|
+
ee.all = function(e, t) {
|
|
376
|
+
if (!Array.isArray(e))
|
|
377
|
+
throw new Error("first argument should be an array");
|
|
378
|
+
return e.reduce(function(r, s) {
|
|
379
|
+
return ee(r, s, t);
|
|
380
|
+
}, {});
|
|
381
|
+
};
|
|
382
|
+
var pr = ee, Ct = pr;
|
|
383
|
+
const _e = ["3.0"], ur = {
|
|
384
|
+
baidu: {
|
|
385
|
+
version: "3.0",
|
|
386
|
+
// 在build时会被静态替换, 导致使用者不能无法设置它
|
|
387
|
+
// @see https://cn.vitejs.dev/guide/build.html#library-mode:~:text=%E6%A8%A1%E5%BC%8F%E4%B8%8B%EF%BC%8C%E6%89%80%E6%9C%89-,({}).*,-%E7%94%A8%E6%B3%95%E5%9C%A8%E6%9E%84
|
|
388
|
+
// @see @vite_process_env_detail
|
|
389
|
+
key: {}.VITE_APP_DEV_KEY_BAIDU,
|
|
390
|
+
language: ""
|
|
391
|
+
},
|
|
392
|
+
google: {
|
|
393
|
+
version: "",
|
|
394
|
+
key: {}.VITE_APP_DEV_KEY_GOOGLE,
|
|
395
|
+
language: "en-us"
|
|
396
|
+
},
|
|
397
|
+
here: {
|
|
398
|
+
version: _e[0],
|
|
399
|
+
key: {}.VITE_APP_DEV_KEY_HERE,
|
|
400
|
+
language: ""
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
let wt;
|
|
404
|
+
function xt() {
|
|
405
|
+
return wt || x("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
|
|
406
|
+
}
|
|
407
|
+
function gr(i) {
|
|
408
|
+
i != null && (wt = Ct(ur, i));
|
|
409
|
+
}
|
|
410
|
+
function ki() {
|
|
411
|
+
}
|
|
412
|
+
function Le(i) {
|
|
437
413
|
return i;
|
|
438
414
|
}
|
|
439
|
-
function
|
|
415
|
+
function Pi(i, e) {
|
|
440
416
|
return i instanceof e;
|
|
441
417
|
}
|
|
442
|
-
function
|
|
418
|
+
function Ii(i, e) {
|
|
443
419
|
if (i instanceof e)
|
|
444
420
|
return i;
|
|
445
421
|
}
|
|
446
|
-
function
|
|
422
|
+
function pe(i, e) {
|
|
447
423
|
if ((i == null ? void 0 : i.$options.name) === e.name)
|
|
448
424
|
return i;
|
|
449
425
|
}
|
|
426
|
+
function Li(i) {
|
|
427
|
+
return i;
|
|
428
|
+
}
|
|
450
429
|
class Ze {
|
|
451
430
|
constructor(e) {
|
|
452
431
|
h(this, "latestInfoWindow");
|
|
@@ -493,83 +472,13 @@ class Ze {
|
|
|
493
472
|
this.innerMap.setZoom(e);
|
|
494
473
|
}
|
|
495
474
|
}
|
|
496
|
-
var er = function(e) {
|
|
497
|
-
return tr(e) && !rr(e);
|
|
498
|
-
};
|
|
499
|
-
function tr(i) {
|
|
500
|
-
return !!i && typeof i == "object";
|
|
501
|
-
}
|
|
502
|
-
function rr(i) {
|
|
503
|
-
var e = Object.prototype.toString.call(i);
|
|
504
|
-
return e === "[object RegExp]" || e === "[object Date]" || nr(i);
|
|
505
|
-
}
|
|
506
|
-
var ir = typeof Symbol == "function" && Symbol.for, sr = ir ? Symbol.for("react.element") : 60103;
|
|
507
|
-
function nr(i) {
|
|
508
|
-
return i.$$typeof === sr;
|
|
509
|
-
}
|
|
510
|
-
function or(i) {
|
|
511
|
-
return Array.isArray(i) ? [] : {};
|
|
512
|
-
}
|
|
513
|
-
function ae(i, e) {
|
|
514
|
-
return e.clone !== !1 && e.isMergeableObject(i) ? Q(or(i), i, e) : i;
|
|
515
|
-
}
|
|
516
|
-
function ar(i, e, t) {
|
|
517
|
-
return i.concat(e).map(function(r) {
|
|
518
|
-
return ae(r, t);
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
|
-
function lr(i, e) {
|
|
522
|
-
if (!e.customMerge)
|
|
523
|
-
return Q;
|
|
524
|
-
var t = e.customMerge(i);
|
|
525
|
-
return typeof t == "function" ? t : Q;
|
|
526
|
-
}
|
|
527
|
-
function hr(i) {
|
|
528
|
-
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(e) {
|
|
529
|
-
return Object.propertyIsEnumerable.call(i, e);
|
|
530
|
-
}) : [];
|
|
531
|
-
}
|
|
532
|
-
function mt(i) {
|
|
533
|
-
return Object.keys(i).concat(hr(i));
|
|
534
|
-
}
|
|
535
|
-
function Ot(i, e) {
|
|
536
|
-
try {
|
|
537
|
-
return e in i;
|
|
538
|
-
} catch {
|
|
539
|
-
return !1;
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
function cr(i, e) {
|
|
543
|
-
return Ot(i, e) && !(Object.hasOwnProperty.call(i, e) && Object.propertyIsEnumerable.call(i, e));
|
|
544
|
-
}
|
|
545
|
-
function dr(i, e, t) {
|
|
546
|
-
var r = {};
|
|
547
|
-
return t.isMergeableObject(i) && mt(i).forEach(function(s) {
|
|
548
|
-
r[s] = ae(i[s], t);
|
|
549
|
-
}), mt(e).forEach(function(s) {
|
|
550
|
-
cr(i, s) || (Ot(i, s) && t.isMergeableObject(e[s]) ? r[s] = lr(s, t)(i[s], e[s], t) : r[s] = ae(e[s], t));
|
|
551
|
-
}), r;
|
|
552
|
-
}
|
|
553
|
-
function Q(i, e, t) {
|
|
554
|
-
t = t || {}, t.arrayMerge = t.arrayMerge || ar, t.isMergeableObject = t.isMergeableObject || er, t.cloneUnlessOtherwiseSpecified = ae;
|
|
555
|
-
var r = Array.isArray(e), s = Array.isArray(i), n = r === s;
|
|
556
|
-
return n ? r ? t.arrayMerge(i, e, t) : dr(i, e, t) : ae(e, t);
|
|
557
|
-
}
|
|
558
|
-
Q.all = function(e, t) {
|
|
559
|
-
if (!Array.isArray(e))
|
|
560
|
-
throw new Error("first argument should be an array");
|
|
561
|
-
return e.reduce(function(r, s) {
|
|
562
|
-
return Q(r, s, t);
|
|
563
|
-
}, {});
|
|
564
|
-
};
|
|
565
|
-
var pr = Q, Ct = pr;
|
|
566
475
|
/*!
|
|
567
476
|
* isobject <https://github.com/jonschlinkert/isobject>
|
|
568
477
|
*
|
|
569
478
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
570
479
|
* Released under the MIT License.
|
|
571
480
|
*/
|
|
572
|
-
function
|
|
481
|
+
function mr(i) {
|
|
573
482
|
return i != null && typeof i == "object" && Array.isArray(i) === !1;
|
|
574
483
|
}
|
|
575
484
|
/*!
|
|
@@ -578,14 +487,14 @@ function ur(i) {
|
|
|
578
487
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
579
488
|
* Released under the MIT License.
|
|
580
489
|
*/
|
|
581
|
-
function
|
|
582
|
-
return
|
|
490
|
+
function mt(i) {
|
|
491
|
+
return mr(i) === !0 && Object.prototype.toString.call(i) === "[object Object]";
|
|
583
492
|
}
|
|
584
|
-
function
|
|
493
|
+
function Et(i) {
|
|
585
494
|
var e, t;
|
|
586
|
-
return !(
|
|
495
|
+
return !(mt(i) === !1 || (e = i.constructor, typeof e != "function") || (t = e.prototype, mt(t) === !1) || t.hasOwnProperty("isPrototypeOf") === !1);
|
|
587
496
|
}
|
|
588
|
-
var
|
|
497
|
+
var he;
|
|
589
498
|
((i) => {
|
|
590
499
|
function e(n, a) {
|
|
591
500
|
return n.reduce((g, o) => (g[a(o)] = o, g), {});
|
|
@@ -600,30 +509,31 @@ var le;
|
|
|
600
509
|
}
|
|
601
510
|
i.toJsonSafely = r;
|
|
602
511
|
function s(n) {
|
|
603
|
-
|
|
512
|
+
Et(n) && Object.keys(n).forEach((a) => {
|
|
604
513
|
n[a] === void 0 ? delete n[a] : s(n[a]);
|
|
605
514
|
});
|
|
606
515
|
}
|
|
607
516
|
i.deleteUndefinedPropertyOnPlainObjectDeeply = s;
|
|
608
|
-
})(
|
|
609
|
-
|
|
610
|
-
|
|
517
|
+
})(he || (he = {}));
|
|
518
|
+
he.toJsonSafely;
|
|
519
|
+
const fr = ["single", "multi"];
|
|
520
|
+
var R = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(R || {}), Be;
|
|
611
521
|
((i) => {
|
|
612
522
|
function e(t) {
|
|
613
|
-
|
|
523
|
+
he.deleteUndefinedPropertyOnPlainObjectDeeply(t);
|
|
614
524
|
const r = { center: y.ZERO, zoom: 5 };
|
|
615
525
|
return Ct(r, t || {}, {
|
|
616
|
-
isMergeableObject:
|
|
526
|
+
isMergeableObject: Et
|
|
617
527
|
});
|
|
618
528
|
}
|
|
619
529
|
i.create = e;
|
|
620
|
-
})(
|
|
621
|
-
var
|
|
530
|
+
})(Be || (Be = {}));
|
|
531
|
+
var Se = {}, yr = {
|
|
622
532
|
get exports() {
|
|
623
|
-
return
|
|
533
|
+
return Se;
|
|
624
534
|
},
|
|
625
535
|
set exports(i) {
|
|
626
|
-
|
|
536
|
+
Se = i;
|
|
627
537
|
}
|
|
628
538
|
};
|
|
629
539
|
(function(i, e) {
|
|
@@ -818,24 +728,24 @@ var $e = {}, gr = {
|
|
|
818
728
|
});
|
|
819
729
|
}, g;
|
|
820
730
|
});
|
|
821
|
-
})(
|
|
822
|
-
const
|
|
823
|
-
var
|
|
824
|
-
e =
|
|
731
|
+
})(yr);
|
|
732
|
+
const ft = Se;
|
|
733
|
+
var kt = function(i, e, t) {
|
|
734
|
+
e = vr(e);
|
|
825
735
|
var r = i.pointToPixel(e.getNorthEast()), s = i.pointToPixel(e.getSouthWest());
|
|
826
736
|
r.x += t, r.y -= t, s.x -= t, s.y += t;
|
|
827
737
|
var n = i.pixelToPoint(r), a = i.pixelToPoint(s);
|
|
828
738
|
return new BMap.Bounds(a, n);
|
|
829
|
-
},
|
|
739
|
+
}, vr = function(i) {
|
|
830
740
|
var e = ge(i.getNorthEast().lng, -180, 180), t = ge(i.getSouthWest().lng, -180, 180), r = ge(i.getNorthEast().lat, -74, 74), s = ge(i.getSouthWest().lat, -74, 74);
|
|
831
741
|
return new BMap.Bounds(new BMap.Point(t, s), new BMap.Point(e, r));
|
|
832
742
|
}, ge = function(i, e, t) {
|
|
833
743
|
return e && (i = Math.max(i, e)), t && (i = Math.min(i, t)), i;
|
|
834
|
-
},
|
|
744
|
+
}, Pt = function(i) {
|
|
835
745
|
return Object.prototype.toString.call(i) === "[object Array]";
|
|
836
|
-
},
|
|
746
|
+
}, It = function(i, e) {
|
|
837
747
|
var t = -1;
|
|
838
|
-
if (
|
|
748
|
+
if (Pt(e)) {
|
|
839
749
|
if (e.indexOf)
|
|
840
750
|
t = e.indexOf(i);
|
|
841
751
|
else
|
|
@@ -863,7 +773,7 @@ var xt = function(i, e, t) {
|
|
|
863
773
|
r._redraw();
|
|
864
774
|
});
|
|
865
775
|
var s = t.markers;
|
|
866
|
-
|
|
776
|
+
Pt(s) && this.addMarkers(s);
|
|
867
777
|
}
|
|
868
778
|
};
|
|
869
779
|
_.prototype.addMarkers = function(i) {
|
|
@@ -874,7 +784,7 @@ _.prototype.addMarkers = function(i) {
|
|
|
874
784
|
}
|
|
875
785
|
};
|
|
876
786
|
_.prototype._pushMarkerTo = function(i) {
|
|
877
|
-
var e =
|
|
787
|
+
var e = It(i, this._markers);
|
|
878
788
|
e === -1 && (i.isInCluster = !1, this._markers.push(i));
|
|
879
789
|
};
|
|
880
790
|
_.prototype.addMarker = function(i) {
|
|
@@ -883,7 +793,7 @@ _.prototype.addMarker = function(i) {
|
|
|
883
793
|
_.prototype._createClusters = function() {
|
|
884
794
|
var i = this._map.getBounds();
|
|
885
795
|
if (i.getCenter()) {
|
|
886
|
-
for (var e =
|
|
796
|
+
for (var e = kt(this._map, i, this._gridSize), t = 0, r; r = this._markers[t]; t++)
|
|
887
797
|
!r.isInCluster && e.containsPoint(r.getPosition()) && this._addToClosestCluster(r);
|
|
888
798
|
for (var s = this._markers.length, t = 0; t < s; t++)
|
|
889
799
|
this._clusters[t] && this._clusters[t].render();
|
|
@@ -923,7 +833,7 @@ _.prototype._removeMarkersFromMap = function() {
|
|
|
923
833
|
}
|
|
924
834
|
};
|
|
925
835
|
_.prototype._removeMarker = function(i) {
|
|
926
|
-
var e =
|
|
836
|
+
var e = It(i, this._markers);
|
|
927
837
|
return e === -1 ? !1 : (this._map.removeOverlay(i), this._markers.splice(e, 1), !0);
|
|
928
838
|
};
|
|
929
839
|
_.prototype.removeMarker = function(i) {
|
|
@@ -999,7 +909,7 @@ _.prototype.setStylesIndexCalculator = function(i) {
|
|
|
999
909
|
};
|
|
1000
910
|
function L(i) {
|
|
1001
911
|
var e = this;
|
|
1002
|
-
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
|
|
912
|
+
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 ft(this._center, this._markers.length, {
|
|
1003
913
|
styles: this._markerClusterer.getStyles(),
|
|
1004
914
|
zIndex: i._zIndex
|
|
1005
915
|
}), this._clusterMarker.getStyleByText = function(t, r) {
|
|
@@ -1007,7 +917,7 @@ function L(i) {
|
|
|
1007
917
|
var s = e._markerClusterer._stylesIndexCalculator(e._markers, r.length);
|
|
1008
918
|
return r[s];
|
|
1009
919
|
}
|
|
1010
|
-
return
|
|
920
|
+
return ft.prototype.getStyleByText.call(this, t, r);
|
|
1011
921
|
}, this._clusterMarker.addEventListener && this._clusterMarker.addEventListener("click", function(t) {
|
|
1012
922
|
e._map.setViewport(e.getBounds());
|
|
1013
923
|
});
|
|
@@ -1047,7 +957,7 @@ L.prototype.isReal = function(i) {
|
|
|
1047
957
|
};
|
|
1048
958
|
L.prototype.updateGridBounds = function() {
|
|
1049
959
|
var i = new BMap.Bounds(this._center, this._center);
|
|
1050
|
-
this._gridBounds =
|
|
960
|
+
this._gridBounds = kt(this._map, i, this._markerClusterer.getGridSize());
|
|
1051
961
|
};
|
|
1052
962
|
L.prototype.updateClusterMarker = function() {
|
|
1053
963
|
if (this._map.getZoom() > this._markerClusterer.getMaxZoom()) {
|
|
@@ -1077,9 +987,9 @@ L.prototype.getBounds = function() {
|
|
|
1077
987
|
L.prototype.getCenter = function() {
|
|
1078
988
|
return this._center;
|
|
1079
989
|
};
|
|
1080
|
-
let
|
|
990
|
+
let _r = class Lt {
|
|
1081
991
|
constructor(e, t, r) {
|
|
1082
|
-
this.extend(
|
|
992
|
+
this.extend(Lt, google.maps.OverlayView), this.map_ = e, 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;
|
|
1083
993
|
var s = r || {};
|
|
1084
994
|
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(e), this.prevZoom_ = this.map_.getZoom();
|
|
1085
995
|
var n = this;
|
|
@@ -1498,7 +1408,7 @@ let fr = class It {
|
|
|
1498
1408
|
if (r && r.isMarkerInClusterBounds(e))
|
|
1499
1409
|
r.addMarker(e);
|
|
1500
1410
|
else {
|
|
1501
|
-
var o = new
|
|
1411
|
+
var o = new Mr(this);
|
|
1502
1412
|
o.addMarker(e), this.clusters_.push(o);
|
|
1503
1413
|
}
|
|
1504
1414
|
}
|
|
@@ -1516,7 +1426,7 @@ let fr = class It {
|
|
|
1516
1426
|
!s.isAdded && this.isMarkerInBounds_(s, t) && this.addToClosestCluster_(s);
|
|
1517
1427
|
}
|
|
1518
1428
|
};
|
|
1519
|
-
class
|
|
1429
|
+
class Mr {
|
|
1520
1430
|
constructor(e) {
|
|
1521
1431
|
this.markerClusterer_ = e, this.map_ = e.getMap(), this.gridSize_ = e.getGridSize(), this.minClusterSize_ = e.getMinClusterSize(), this.averageCenter_ = e.isAverageCenter(), this.center_ = null, this.markers_ = [], this.bounds_ = null, this.clusterIcon_ = new Ge(
|
|
1522
1432
|
this,
|
|
@@ -1785,7 +1695,7 @@ class Ge {
|
|
|
1785
1695
|
), t.join("");
|
|
1786
1696
|
}
|
|
1787
1697
|
}
|
|
1788
|
-
var
|
|
1698
|
+
var Me;
|
|
1789
1699
|
((i) => {
|
|
1790
1700
|
function e(r) {
|
|
1791
1701
|
return {
|
|
@@ -1810,8 +1720,8 @@ var ve;
|
|
|
1810
1720
|
};
|
|
1811
1721
|
}
|
|
1812
1722
|
i.toGoogle = t;
|
|
1813
|
-
})(
|
|
1814
|
-
class
|
|
1723
|
+
})(Me || (Me = {}));
|
|
1724
|
+
class Bt {
|
|
1815
1725
|
constructor(e) {
|
|
1816
1726
|
h(this, "inner");
|
|
1817
1727
|
this.map = e;
|
|
@@ -1837,7 +1747,7 @@ class Pt {
|
|
|
1837
1747
|
return this.inner.removeMarkers(e.map((t) => t.innerOverlay));
|
|
1838
1748
|
}
|
|
1839
1749
|
}
|
|
1840
|
-
class
|
|
1750
|
+
class br extends Bt {
|
|
1841
1751
|
constructor(e, t) {
|
|
1842
1752
|
var s;
|
|
1843
1753
|
super(e), this.inner = new _(e.innerMap, {
|
|
@@ -1847,7 +1757,7 @@ class vr extends Pt {
|
|
|
1847
1757
|
maxZoom: t.maxZoom,
|
|
1848
1758
|
minClusterSize: t.minClusterSize,
|
|
1849
1759
|
isAverageCenter: t.averageCenter,
|
|
1850
|
-
styles: (s = t.styles) == null ? void 0 : s.map((n) =>
|
|
1760
|
+
styles: (s = t.styles) == null ? void 0 : s.map((n) => Me.toBaidu(n)),
|
|
1851
1761
|
zIndex: t.zIndex
|
|
1852
1762
|
});
|
|
1853
1763
|
const r = t.stylesIndexCalculator;
|
|
@@ -1857,10 +1767,10 @@ class vr extends Pt {
|
|
|
1857
1767
|
this.inner._redraw();
|
|
1858
1768
|
}
|
|
1859
1769
|
}
|
|
1860
|
-
class
|
|
1770
|
+
class Tr extends Bt {
|
|
1861
1771
|
constructor(e, t) {
|
|
1862
1772
|
var s, n;
|
|
1863
|
-
super(e), this.inner = new
|
|
1773
|
+
super(e), this.inner = new _r(
|
|
1864
1774
|
e.innerMap,
|
|
1865
1775
|
// google的构造器中的markers,不会触发重绘, 第一次绘制通过监听地图的'idle'事件触发, 可以直接设置
|
|
1866
1776
|
(s = t.markers) == null ? void 0 : s.map((a) => a.innerOverlay),
|
|
@@ -1869,7 +1779,7 @@ class _r extends Pt {
|
|
|
1869
1779
|
maxZoom: t.maxZoom,
|
|
1870
1780
|
minimumClusterSize: t.minClusterSize,
|
|
1871
1781
|
averageCenter: t.averageCenter,
|
|
1872
|
-
styles: (n = t.styles) == null ? void 0 : n.map((a) =>
|
|
1782
|
+
styles: (n = t.styles) == null ? void 0 : n.map((a) => Me.toGoogle(a)),
|
|
1873
1783
|
zIndex: t.zIndex
|
|
1874
1784
|
}
|
|
1875
1785
|
);
|
|
@@ -1884,19 +1794,7 @@ class _r extends Pt {
|
|
|
1884
1794
|
this.inner.repaint();
|
|
1885
1795
|
}
|
|
1886
1796
|
}
|
|
1887
|
-
|
|
1888
|
-
Object.keys(i).forEach((r) => {
|
|
1889
|
-
r.startsWith("update:") || t != null && t.includes(r) || e.addEventListener(r, i[r]);
|
|
1890
|
-
});
|
|
1891
|
-
}
|
|
1892
|
-
let Mr = 1;
|
|
1893
|
-
function br() {
|
|
1894
|
-
return Mr++;
|
|
1895
|
-
}
|
|
1896
|
-
function _e(i, e) {
|
|
1897
|
-
return e.__id__ || (e.__id__ = br()), `${i}::${e.__id__}`;
|
|
1898
|
-
}
|
|
1899
|
-
var Me;
|
|
1797
|
+
var be;
|
|
1900
1798
|
((i) => {
|
|
1901
1799
|
function e(r, s) {
|
|
1902
1800
|
const n = r.indexOf(s);
|
|
@@ -1910,8 +1808,8 @@ var Me;
|
|
|
1910
1808
|
return n;
|
|
1911
1809
|
}
|
|
1912
1810
|
i.findByType = t;
|
|
1913
|
-
})(
|
|
1914
|
-
var
|
|
1811
|
+
})(be || (be = {}));
|
|
1812
|
+
var Te;
|
|
1915
1813
|
((i) => {
|
|
1916
1814
|
function e(r, s) {
|
|
1917
1815
|
const n = r.getLength();
|
|
@@ -1927,8 +1825,8 @@ var be;
|
|
|
1927
1825
|
return r.removeAt(n);
|
|
1928
1826
|
}
|
|
1929
1827
|
i.remove = t;
|
|
1930
|
-
})(
|
|
1931
|
-
class
|
|
1828
|
+
})(Te || (Te = {}));
|
|
1829
|
+
class St {
|
|
1932
1830
|
constructor(e, t) {
|
|
1933
1831
|
h(this, "eventMap", /* @__PURE__ */ new Map());
|
|
1934
1832
|
h(this, "target", void 0);
|
|
@@ -1938,9 +1836,9 @@ class Lt {
|
|
|
1938
1836
|
return this.target = e, this;
|
|
1939
1837
|
}
|
|
1940
1838
|
}
|
|
1941
|
-
const pt = class extends
|
|
1839
|
+
const pt = class extends St {
|
|
1942
1840
|
addEventListener(e, t) {
|
|
1943
|
-
const r =
|
|
1841
|
+
const r = ye(e, t);
|
|
1944
1842
|
if (this.eventMap.get(r)) {
|
|
1945
1843
|
console.warn("listener已经添加过了", r, t);
|
|
1946
1844
|
return;
|
|
@@ -1956,13 +1854,13 @@ const pt = class extends Lt {
|
|
|
1956
1854
|
this.eventMap.set(r, s);
|
|
1957
1855
|
}
|
|
1958
1856
|
removeEventListener(e, t) {
|
|
1959
|
-
const r =
|
|
1857
|
+
const r = ye(e, t), s = this.eventMap.get(r);
|
|
1960
1858
|
s ? (s.remove(), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, t);
|
|
1961
1859
|
}
|
|
1962
1860
|
};
|
|
1963
|
-
let
|
|
1861
|
+
let X = pt;
|
|
1964
1862
|
// 事件类型映射: tg => google
|
|
1965
|
-
h(
|
|
1863
|
+
h(X, "EVENT_TYPE_MAP", {
|
|
1966
1864
|
"center-changed": "center_changed",
|
|
1967
1865
|
"zoom-changed": "zoom_changed",
|
|
1968
1866
|
"map-type-changed": "maptypeid_changed",
|
|
@@ -1973,9 +1871,9 @@ h(q, "EVENT_TYPE_MAP", {
|
|
|
1973
1871
|
"map-mouseup": "mouseup",
|
|
1974
1872
|
"map-dblclick": "dblclick"
|
|
1975
1873
|
});
|
|
1976
|
-
const Oe = class extends
|
|
1874
|
+
const Oe = class extends St {
|
|
1977
1875
|
addEventListener(e, t) {
|
|
1978
|
-
const r =
|
|
1876
|
+
const r = ye(e, t);
|
|
1979
1877
|
if (this.eventMap.get(r)) {
|
|
1980
1878
|
console.warn("listener已经添加过了", r, t);
|
|
1981
1879
|
return;
|
|
@@ -1991,20 +1889,20 @@ const Oe = class extends Lt {
|
|
|
1991
1889
|
this.inner.addEventListener(Oe.EVENT_TYPE_MAP[e] || e, s), this.eventMap.set(r, s);
|
|
1992
1890
|
}
|
|
1993
1891
|
removeEventListener(e, t) {
|
|
1994
|
-
const r =
|
|
1892
|
+
const r = ye(e, t), s = this.eventMap.get(r);
|
|
1995
1893
|
s ? (this.inner.removeEventListener(Oe.EVENT_TYPE_MAP[e] || e, s), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, t);
|
|
1996
1894
|
}
|
|
1997
1895
|
};
|
|
1998
|
-
let
|
|
1896
|
+
let Q = Oe;
|
|
1999
1897
|
// cSpell:words clickclose
|
|
2000
1898
|
// 事件类型映射, tg => baidu
|
|
2001
|
-
h(
|
|
1899
|
+
h(Q, "EVENT_TYPE_MAP", {
|
|
2002
1900
|
drag: "dragging",
|
|
2003
1901
|
closeclick: "clickclose",
|
|
2004
1902
|
"zoom-changed": "zoomend",
|
|
2005
1903
|
"map-type-changed": "maptypechange"
|
|
2006
1904
|
});
|
|
2007
|
-
class
|
|
1905
|
+
class Or {
|
|
2008
1906
|
constructor() {
|
|
2009
1907
|
h(this, "typeMap", /* @__PURE__ */ new Map());
|
|
2010
1908
|
}
|
|
@@ -2014,7 +1912,7 @@ class Tr {
|
|
|
2014
1912
|
}
|
|
2015
1913
|
removeEventListener(e, t) {
|
|
2016
1914
|
const r = this.typeMap.get(e);
|
|
2017
|
-
r &&
|
|
1915
|
+
r && be.remove(r, t);
|
|
2018
1916
|
}
|
|
2019
1917
|
hasListener(e) {
|
|
2020
1918
|
const t = this.typeMap.get(e);
|
|
@@ -2025,7 +1923,7 @@ class Tr {
|
|
|
2025
1923
|
t && t.forEach((r) => r.call(e.target, e));
|
|
2026
1924
|
}
|
|
2027
1925
|
}
|
|
2028
|
-
class
|
|
1926
|
+
class $t {
|
|
2029
1927
|
constructor(e, t, r, s) {
|
|
2030
1928
|
h(this, "addEventListener");
|
|
2031
1929
|
h(this, "removeEventListener");
|
|
@@ -2035,9 +1933,9 @@ class Bt {
|
|
|
2035
1933
|
this.map.removeOverlay(this);
|
|
2036
1934
|
}
|
|
2037
1935
|
}
|
|
2038
|
-
class je extends
|
|
1936
|
+
class je extends $t {
|
|
2039
1937
|
constructor(e, t, r) {
|
|
2040
|
-
super(e, t, r, new
|
|
1938
|
+
super(e, t, r, new X(e, r));
|
|
2041
1939
|
}
|
|
2042
1940
|
isVisible() {
|
|
2043
1941
|
return this.innerOverlay.getVisible();
|
|
@@ -2046,9 +1944,9 @@ class je extends Bt {
|
|
|
2046
1944
|
this.innerOverlay.setVisible(e);
|
|
2047
1945
|
}
|
|
2048
1946
|
}
|
|
2049
|
-
class Ce extends
|
|
1947
|
+
class Ce extends $t {
|
|
2050
1948
|
constructor(e, t, r) {
|
|
2051
|
-
super(e, t, r, new
|
|
1949
|
+
super(e, t, r, new Q(e, r));
|
|
2052
1950
|
}
|
|
2053
1951
|
/** 仅限内部使用; 设为private时, 生成的d.ts文件中, 方法返回值会变成any, 故改成了public */
|
|
2054
1952
|
get overlay() {
|
|
@@ -2260,14 +2158,14 @@ class qe extends Ve {
|
|
|
2260
2158
|
return this.innerOverlay.getRadius();
|
|
2261
2159
|
}
|
|
2262
2160
|
}
|
|
2263
|
-
class
|
|
2161
|
+
class yt {
|
|
2264
2162
|
/**
|
|
2265
2163
|
* `keys`和`values`数组中可以有相同的值, 若存在相同值, 则index越小的优先级越高
|
|
2266
2164
|
*/
|
|
2267
2165
|
constructor(e, t) {
|
|
2268
2166
|
h(this, "keyToValue", /* @__PURE__ */ new Map());
|
|
2269
2167
|
h(this, "valueToKey", /* @__PURE__ */ new Map());
|
|
2270
|
-
|
|
2168
|
+
ae(e.length === t.length);
|
|
2271
2169
|
for (let r = e.length - 1; r >= 0; r--)
|
|
2272
2170
|
this.keyToValue.set(e[r], t[r]), this.valueToKey.set(t[r], e[r]);
|
|
2273
2171
|
}
|
|
@@ -2278,7 +2176,7 @@ class vt {
|
|
|
2278
2176
|
return this.keyToValue.get(e) ?? x();
|
|
2279
2177
|
}
|
|
2280
2178
|
}
|
|
2281
|
-
class
|
|
2179
|
+
class Cr {
|
|
2282
2180
|
constructor(e, t = 10) {
|
|
2283
2181
|
h(this, "map", /* @__PURE__ */ new Map());
|
|
2284
2182
|
this.values = e, this.maxSize4Debug = t;
|
|
@@ -2307,7 +2205,7 @@ class Or {
|
|
|
2307
2205
|
return this.getOrNull(e, t) ?? x(`key(${t})不存在与valueMap(${this.getValueMap(e)})中`);
|
|
2308
2206
|
}
|
|
2309
2207
|
}
|
|
2310
|
-
class
|
|
2208
|
+
class vt {
|
|
2311
2209
|
constructor(e) {
|
|
2312
2210
|
h(this, "value");
|
|
2313
2211
|
this.creator = e;
|
|
@@ -2316,7 +2214,7 @@ class _t {
|
|
|
2316
2214
|
return this.value === void 0 && (this.value = this.creator()), this.value;
|
|
2317
2215
|
}
|
|
2318
2216
|
}
|
|
2319
|
-
var E = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-center", i.TOP_RIGHT = "top-right", i.BOTTOM_LEFT = "bottom-left", i.BOTTOM_CENTER = "bottom-center", i.BOTTOM_RIGHT = "bottom-right", i.LEFT_TOP = "left-top", i.LEFT_CENTER = "left-center", i.LEFT_BOTTOM = "left-bottom", i.RIGHT_TOP = "right-top", i.RIGHT_CENTER = "right-center", i.RIGHT_BOTTOM = "right-bottom", i))(E || {}),
|
|
2217
|
+
var E = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-center", i.TOP_RIGHT = "top-right", i.BOTTOM_LEFT = "bottom-left", i.BOTTOM_CENTER = "bottom-center", i.BOTTOM_RIGHT = "bottom-right", i.LEFT_TOP = "left-top", i.LEFT_CENTER = "left-center", i.LEFT_BOTTOM = "left-bottom", i.RIGHT_TOP = "right-top", i.RIGHT_CENTER = "right-center", i.RIGHT_BOTTOM = "right-bottom", i))(E || {}), I;
|
|
2320
2218
|
((i) => {
|
|
2321
2219
|
let e, t;
|
|
2322
2220
|
const r = [
|
|
@@ -2335,7 +2233,7 @@ var E = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
2335
2233
|
/* RIGHT_BOTTOM */
|
|
2336
2234
|
];
|
|
2337
2235
|
function s() {
|
|
2338
|
-
return e || (e = new
|
|
2236
|
+
return e || (e = new yt(r, [
|
|
2339
2237
|
/* | @tg/map |名字相同| baidu | */
|
|
2340
2238
|
/* TOP_LEFT = */
|
|
2341
2239
|
BMAP_ANCHOR_TOP_LEFT,
|
|
@@ -2365,7 +2263,7 @@ var E = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
2365
2263
|
}
|
|
2366
2264
|
i.getBaidu = s;
|
|
2367
2265
|
function n() {
|
|
2368
|
-
return t || (t = new
|
|
2266
|
+
return t || (t = new yt(r, [
|
|
2369
2267
|
google.maps.ControlPosition.TOP_LEFT,
|
|
2370
2268
|
google.maps.ControlPosition.TOP_CENTER,
|
|
2371
2269
|
google.maps.ControlPosition.TOP_RIGHT,
|
|
@@ -2381,17 +2279,17 @@ var E = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
2381
2279
|
])), t;
|
|
2382
2280
|
}
|
|
2383
2281
|
i.getGoogle = n;
|
|
2384
|
-
})(
|
|
2385
|
-
class
|
|
2282
|
+
})(I || (I = {}));
|
|
2283
|
+
class wr {
|
|
2386
2284
|
constructor(e) {
|
|
2387
2285
|
/** 实际添加到地图中的control对象 */
|
|
2388
2286
|
h(this, "inner");
|
|
2389
2287
|
this.position = e;
|
|
2390
2288
|
}
|
|
2391
2289
|
}
|
|
2392
|
-
class
|
|
2290
|
+
class At {
|
|
2393
2291
|
}
|
|
2394
|
-
class Xe extends
|
|
2292
|
+
class Xe extends At {
|
|
2395
2293
|
constructor(e, t) {
|
|
2396
2294
|
super(), this.inner = e, this.position = t;
|
|
2397
2295
|
}
|
|
@@ -2402,10 +2300,10 @@ class Xe extends St {
|
|
|
2402
2300
|
e ? this.inner.show() : this.inner.hide();
|
|
2403
2301
|
}
|
|
2404
2302
|
getPosition() {
|
|
2405
|
-
return this.position ??
|
|
2303
|
+
return this.position ?? I.getBaidu().toKey(this.inner.getAnchor());
|
|
2406
2304
|
}
|
|
2407
2305
|
setPosition(e) {
|
|
2408
|
-
this.position = e, this.inner.setAnchor(
|
|
2306
|
+
this.position = e, this.inner.setAnchor(I.getBaidu().toValue(e));
|
|
2409
2307
|
}
|
|
2410
2308
|
addTo(e) {
|
|
2411
2309
|
e.innerMap.addControl(this.inner);
|
|
@@ -2414,7 +2312,7 @@ class Xe extends St {
|
|
|
2414
2312
|
e.innerMap.removeControl(this.inner);
|
|
2415
2313
|
}
|
|
2416
2314
|
}
|
|
2417
|
-
class Je extends
|
|
2315
|
+
class Je extends At {
|
|
2418
2316
|
constructor(t, r) {
|
|
2419
2317
|
super();
|
|
2420
2318
|
h(this, "visible", !1);
|
|
@@ -2441,7 +2339,7 @@ class Je extends St {
|
|
|
2441
2339
|
}
|
|
2442
2340
|
onCreateOptions() {
|
|
2443
2341
|
return {
|
|
2444
|
-
position:
|
|
2342
|
+
position: I.getGoogle().toValue(this.position)
|
|
2445
2343
|
};
|
|
2446
2344
|
}
|
|
2447
2345
|
tryUpdateOptions() {
|
|
@@ -2451,7 +2349,7 @@ class Je extends St {
|
|
|
2451
2349
|
});
|
|
2452
2350
|
}
|
|
2453
2351
|
}
|
|
2454
|
-
var
|
|
2352
|
+
var zt = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))(zt || {});
|
|
2455
2353
|
class k {
|
|
2456
2354
|
constructor(e, t, r, s) {
|
|
2457
2355
|
this.id = e, this.baidu = t, this.google = r, this.googleCoordType = s;
|
|
@@ -2460,7 +2358,7 @@ class k {
|
|
|
2460
2358
|
return this.id;
|
|
2461
2359
|
}
|
|
2462
2360
|
getBaiduCoordType() {
|
|
2463
|
-
return
|
|
2361
|
+
return q.bd09;
|
|
2464
2362
|
}
|
|
2465
2363
|
asBaiduMapType() {
|
|
2466
2364
|
return this.baidu();
|
|
@@ -2473,13 +2371,13 @@ class k {
|
|
|
2473
2371
|
return this.google();
|
|
2474
2372
|
}
|
|
2475
2373
|
asGoogleMapType() {
|
|
2476
|
-
|
|
2374
|
+
Qt("google的内置地图没有对应的实例");
|
|
2477
2375
|
}
|
|
2478
2376
|
}
|
|
2479
|
-
class
|
|
2377
|
+
class xr {
|
|
2480
2378
|
constructor() {
|
|
2481
|
-
h(this, "baiduCache", new
|
|
2482
|
-
h(this, "googleCache", new
|
|
2379
|
+
h(this, "baiduCache", new vt(() => new BMap.TrafficLayer()));
|
|
2380
|
+
h(this, "googleCache", new vt(() => new google.maps.TrafficLayer()));
|
|
2483
2381
|
}
|
|
2484
2382
|
asBaiduLayer() {
|
|
2485
2383
|
return this.baiduCache.get();
|
|
@@ -2488,21 +2386,21 @@ class wr {
|
|
|
2488
2386
|
return this.googleCache.get();
|
|
2489
2387
|
}
|
|
2490
2388
|
}
|
|
2491
|
-
var
|
|
2389
|
+
var P;
|
|
2492
2390
|
((i) => {
|
|
2493
|
-
i.NORMAL = new k("normal", () => BMAP_NORMAL_MAP, () => google.maps.MapTypeId.ROADMAP,
|
|
2391
|
+
i.NORMAL = new k("normal", () => BMAP_NORMAL_MAP, () => google.maps.MapTypeId.ROADMAP, q.gcj02), i.SATELLITE = new k("satellite", () => BMAP_SATELLITE_MAP, () => google.maps.MapTypeId.SATELLITE, q.wgs84), i.HYBRID = new k("hybrid", () => BMAP_HYBRID_MAP, () => google.maps.MapTypeId.HYBRID, q.gcj02), i.TERRAIN = new k("terrain", () => (
|
|
2494
2392
|
/* 三维 */
|
|
2495
2393
|
BMAP_PERSPECTIVE_MAP
|
|
2496
2394
|
), () => (
|
|
2497
2395
|
/* 地形 */
|
|
2498
2396
|
google.maps.MapTypeId.TERRAIN
|
|
2499
|
-
),
|
|
2500
|
-
})(
|
|
2501
|
-
var
|
|
2502
|
-
const
|
|
2397
|
+
), q.wgs84), i.BUILD_IN_MAP_TYPES = new Cr([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
|
|
2398
|
+
})(P || (P = {}));
|
|
2399
|
+
var Nt = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(Nt || {});
|
|
2400
|
+
const Rt = [P.NORMAL, P.SATELLITE, P.HYBRID];
|
|
2503
2401
|
class Qe extends Xe {
|
|
2504
2402
|
static create(e) {
|
|
2505
|
-
const t = e.mapTypes ??
|
|
2403
|
+
const t = e.mapTypes ?? Rt, r = {
|
|
2506
2404
|
default: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
|
|
2507
2405
|
horizontal: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
|
|
2508
2406
|
dropdown: BMAP_MAPTYPE_CONTROL_DROPDOWN
|
|
@@ -2510,23 +2408,23 @@ class Qe extends Xe {
|
|
|
2510
2408
|
type: e.type && r[e.type],
|
|
2511
2409
|
mapTypes: t.map((n) => n.asBaiduMapType())
|
|
2512
2410
|
});
|
|
2513
|
-
return e.position && s.setAnchor(
|
|
2411
|
+
return e.position && s.setAnchor(I.getBaidu().toValue(e.position)), new Qe(s, e.position);
|
|
2514
2412
|
}
|
|
2515
2413
|
}
|
|
2516
|
-
const
|
|
2517
|
-
constructor(e = "default", t = E.TOP_LEFT, r =
|
|
2518
|
-
super("mapType", t), this.type = e, this.mapTypes = r,
|
|
2414
|
+
const J = class extends Je {
|
|
2415
|
+
constructor(e = "default", t = E.TOP_LEFT, r = Rt) {
|
|
2416
|
+
super("mapType", t), this.type = e, this.mapTypes = r, J.type2google || (J.type2google = {
|
|
2519
2417
|
default: google.maps.MapTypeControlStyle.DEFAULT,
|
|
2520
2418
|
horizontal: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
|
|
2521
2419
|
dropdown: google.maps.MapTypeControlStyle.DROPDOWN_MENU
|
|
2522
2420
|
});
|
|
2523
2421
|
}
|
|
2524
2422
|
static create(e) {
|
|
2525
|
-
return new
|
|
2423
|
+
return new J(e.type, e.position, e.mapTypes);
|
|
2526
2424
|
}
|
|
2527
2425
|
onCreateOptions() {
|
|
2528
2426
|
const e = super.onCreateOptions();
|
|
2529
|
-
return e.style =
|
|
2427
|
+
return e.style = J.type2google[this.type], e.mapTypeIds = this.mapTypes.map((t) => t instanceof k ? t.getGoogleMapTypeId() : t.id), e;
|
|
2530
2428
|
}
|
|
2531
2429
|
addTo(e) {
|
|
2532
2430
|
super.addTo(e), this.mapTypes.forEach((t) => {
|
|
@@ -2534,14 +2432,14 @@ const X = class extends Je {
|
|
|
2534
2432
|
});
|
|
2535
2433
|
}
|
|
2536
2434
|
};
|
|
2537
|
-
let
|
|
2538
|
-
h(
|
|
2435
|
+
let fe = J;
|
|
2436
|
+
h(fe, "type2google");
|
|
2539
2437
|
class et extends Xe {
|
|
2540
2438
|
static create(e) {
|
|
2541
2439
|
const t = new BMap.NavigationControl({
|
|
2542
2440
|
type: BMAP_NAVIGATION_CONTROL_ZOOM,
|
|
2543
2441
|
// enableGeolocation: true,
|
|
2544
|
-
anchor: e.position &&
|
|
2442
|
+
anchor: e.position && I.getBaidu().toValue(e.position)
|
|
2545
2443
|
});
|
|
2546
2444
|
return new et(t, e.position);
|
|
2547
2445
|
}
|
|
@@ -2557,7 +2455,7 @@ class tt extends Je {
|
|
|
2557
2455
|
class rt extends Xe {
|
|
2558
2456
|
static create(e) {
|
|
2559
2457
|
const t = new BMap.ScaleControl({
|
|
2560
|
-
anchor: e.position &&
|
|
2458
|
+
anchor: e.position && I.getBaidu().toValue(e.position)
|
|
2561
2459
|
});
|
|
2562
2460
|
return new rt(t, e.position);
|
|
2563
2461
|
}
|
|
@@ -2570,14 +2468,14 @@ class it extends Je {
|
|
|
2570
2468
|
super("scale", e);
|
|
2571
2469
|
}
|
|
2572
2470
|
}
|
|
2573
|
-
var
|
|
2471
|
+
var $e;
|
|
2574
2472
|
((i) => {
|
|
2575
2473
|
function e(t) {
|
|
2576
2474
|
return t.scrollWidth > t.clientWidth || t.scrollHeight > t.clientHeight;
|
|
2577
2475
|
}
|
|
2578
2476
|
i.isScrollable = e;
|
|
2579
|
-
})(
|
|
2580
|
-
var
|
|
2477
|
+
})($e || ($e = {}));
|
|
2478
|
+
var te;
|
|
2581
2479
|
((i) => {
|
|
2582
2480
|
function e(r) {
|
|
2583
2481
|
return {
|
|
@@ -2599,15 +2497,15 @@ var ee;
|
|
|
2599
2497
|
});
|
|
2600
2498
|
}
|
|
2601
2499
|
i.toBaidu = t;
|
|
2602
|
-
})(
|
|
2603
|
-
class
|
|
2500
|
+
})(te || (te = {}));
|
|
2501
|
+
class ce extends Ce {
|
|
2604
2502
|
constructor(e, t, r, s) {
|
|
2605
2503
|
super(e, t, r), this.state = s;
|
|
2606
2504
|
}
|
|
2607
2505
|
static create(e) {
|
|
2608
2506
|
const t = this.coordType, r = e.icon, s = {
|
|
2609
2507
|
title: e.title,
|
|
2610
|
-
icon: r &&
|
|
2508
|
+
icon: r && te.toBaidu(r),
|
|
2611
2509
|
enableClicking: e.clickable,
|
|
2612
2510
|
enableDragging: e.draggable,
|
|
2613
2511
|
// baidu的raiseOnDrag属性, 默认为false, 而我们的options.crossOnDrag默认为true, 故这里需要转换下
|
|
@@ -2616,7 +2514,7 @@ class he extends Ce {
|
|
|
2616
2514
|
}, n = new BMap.Marker(e.position.toBaidu(t), s);
|
|
2617
2515
|
e.zIndex !== void 0 && n.setZIndex(e.zIndex);
|
|
2618
2516
|
const a = e.clickable === void 0 ? !0 : e.clickable, g = !!e.draggable;
|
|
2619
|
-
return new
|
|
2517
|
+
return new ce(n, t, this, { clickable: a, draggable: g, zIndex: e.zIndex }).visibleOptionInternal(e.visible);
|
|
2620
2518
|
}
|
|
2621
2519
|
getPosition() {
|
|
2622
2520
|
return y.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
|
|
@@ -2632,7 +2530,7 @@ class he extends Ce {
|
|
|
2632
2530
|
return this.innerOverlay.getTitle();
|
|
2633
2531
|
}
|
|
2634
2532
|
setIcon(e) {
|
|
2635
|
-
const t =
|
|
2533
|
+
const t = te.toBaidu(e);
|
|
2636
2534
|
this.innerOverlay.setIcon(t);
|
|
2637
2535
|
const r = this.getLabel();
|
|
2638
2536
|
r && r.attachIcon(t);
|
|
@@ -2681,7 +2579,7 @@ class st extends je {
|
|
|
2681
2579
|
title: t.title,
|
|
2682
2580
|
zIndex: t.zIndex,
|
|
2683
2581
|
visible: t.visible,
|
|
2684
|
-
icon: s &&
|
|
2582
|
+
icon: s && te.toGoogle(s),
|
|
2685
2583
|
clickable: t.clickable,
|
|
2686
2584
|
draggable: t.draggable,
|
|
2687
2585
|
// google的crossOnDrag和我们的crossOnDrag是匹配的, 不需要转换
|
|
@@ -2705,7 +2603,7 @@ class st extends je {
|
|
|
2705
2603
|
return this.innerOverlay.getTitle() || "";
|
|
2706
2604
|
}
|
|
2707
2605
|
setIcon(t) {
|
|
2708
|
-
this.innerOverlay.setIcon(
|
|
2606
|
+
this.innerOverlay.setIcon(te.toGoogle(t));
|
|
2709
2607
|
}
|
|
2710
2608
|
getIcon() {
|
|
2711
2609
|
return this.innerOverlay.getIcon();
|
|
@@ -2756,7 +2654,7 @@ class nt {
|
|
|
2756
2654
|
}
|
|
2757
2655
|
class ot extends nt {
|
|
2758
2656
|
constructor(e, t, r) {
|
|
2759
|
-
super(new
|
|
2657
|
+
super(new Q(e, t)), this.inner = e, this.map = t, this.state = r;
|
|
2760
2658
|
}
|
|
2761
2659
|
static create(e) {
|
|
2762
2660
|
const t = e.position || y.ZERO, r = new BMap.InfoWindow(e.content, {
|
|
@@ -2785,8 +2683,8 @@ class ot extends nt {
|
|
|
2785
2683
|
}
|
|
2786
2684
|
class at extends nt {
|
|
2787
2685
|
constructor(t, r) {
|
|
2788
|
-
super(new
|
|
2789
|
-
h(this, "eventHub", new
|
|
2686
|
+
super(new X(t, r));
|
|
2687
|
+
h(this, "eventHub", new Or());
|
|
2790
2688
|
h(this, "isOpened", !1);
|
|
2791
2689
|
this.inner = t, this.map = r, t.addListener("closeclick", () => {
|
|
2792
2690
|
this.isOpened = !1, this.eventHub.hasListener("close") && this.eventHub.notify({ type: "close", target: this });
|
|
@@ -2841,15 +2739,15 @@ class at extends nt {
|
|
|
2841
2739
|
this.inner.setPosition(t.toGoogle(this.map.coordType));
|
|
2842
2740
|
}
|
|
2843
2741
|
}
|
|
2844
|
-
var
|
|
2742
|
+
var de;
|
|
2845
2743
|
((i) => {
|
|
2846
2744
|
i.ZERO = { x: 0, y: 0 };
|
|
2847
|
-
})(
|
|
2745
|
+
})(de || (de = {}));
|
|
2848
2746
|
let ke;
|
|
2849
|
-
function
|
|
2850
|
-
return ke || (ke =
|
|
2747
|
+
function Er(i, e, t, r) {
|
|
2748
|
+
return ke || (ke = kr()), new ke(i, e, t, r);
|
|
2851
2749
|
}
|
|
2852
|
-
function
|
|
2750
|
+
function kr() {
|
|
2853
2751
|
return class extends google.maps.OverlayView {
|
|
2854
2752
|
constructor(t, r, s, n) {
|
|
2855
2753
|
super();
|
|
@@ -2905,7 +2803,7 @@ function Er() {
|
|
|
2905
2803
|
}
|
|
2906
2804
|
};
|
|
2907
2805
|
}
|
|
2908
|
-
var
|
|
2806
|
+
var re;
|
|
2909
2807
|
((i) => {
|
|
2910
2808
|
function e(r) {
|
|
2911
2809
|
return typeof r == "string" ? r : r.outerHTML;
|
|
@@ -2919,7 +2817,7 @@ var te;
|
|
|
2919
2817
|
return r;
|
|
2920
2818
|
}
|
|
2921
2819
|
i.toElement = t;
|
|
2922
|
-
})(
|
|
2820
|
+
})(re || (re = {}));
|
|
2923
2821
|
class lt extends Ce {
|
|
2924
2822
|
constructor(t, r, s, n) {
|
|
2925
2823
|
super(t, r, s);
|
|
@@ -2930,7 +2828,7 @@ class lt extends Ce {
|
|
|
2930
2828
|
}
|
|
2931
2829
|
static create(t) {
|
|
2932
2830
|
var a;
|
|
2933
|
-
const r = this.coordType, s = new BMap.Label(
|
|
2831
|
+
const r = this.coordType, s = new BMap.Label(re.toString(t.content), {
|
|
2934
2832
|
position: (a = t.position) == null ? void 0 : a.toBaidu(r),
|
|
2935
2833
|
offset: t.offset && new BMap.Size(t.offset.x, t.offset.y)
|
|
2936
2834
|
});
|
|
@@ -2950,7 +2848,7 @@ class lt extends Ce {
|
|
|
2950
2848
|
characterData: !0,
|
|
2951
2849
|
childList: !0,
|
|
2952
2850
|
subtree: !0
|
|
2953
|
-
})), r || this.innerOverlay.setContent(
|
|
2851
|
+
})), r || this.innerOverlay.setContent(re.toString(t)), this.content = t);
|
|
2954
2852
|
}
|
|
2955
2853
|
setZIndex(t) {
|
|
2956
2854
|
this.innerOverlay.setZIndex(t);
|
|
@@ -2986,8 +2884,8 @@ class lt extends Ce {
|
|
|
2986
2884
|
class ht extends je {
|
|
2987
2885
|
static create(e) {
|
|
2988
2886
|
var s;
|
|
2989
|
-
const t = this.coordType, r =
|
|
2990
|
-
|
|
2887
|
+
const t = this.coordType, r = Er(
|
|
2888
|
+
re.toElement(e.content),
|
|
2991
2889
|
(s = e.position) == null ? void 0 : s.toGoogle(t),
|
|
2992
2890
|
e.offset,
|
|
2993
2891
|
e.zIndex
|
|
@@ -2998,7 +2896,7 @@ class ht extends je {
|
|
|
2998
2896
|
this.innerOverlay.setZIndex(e);
|
|
2999
2897
|
}
|
|
3000
2898
|
setContent(e) {
|
|
3001
|
-
this.innerOverlay.setElement(
|
|
2899
|
+
this.innerOverlay.setElement(re.toElement(e));
|
|
3002
2900
|
}
|
|
3003
2901
|
getPosition() {
|
|
3004
2902
|
const e = this.innerOverlay.getPosition();
|
|
@@ -3008,24 +2906,24 @@ class ht extends je {
|
|
|
3008
2906
|
this.coordType = this.map.coordType, this.innerOverlay.setPosition(e.toGoogle(this.coordType));
|
|
3009
2907
|
}
|
|
3010
2908
|
getOffset() {
|
|
3011
|
-
return this.innerOverlay.getOffset() ??
|
|
2909
|
+
return this.innerOverlay.getOffset() ?? de.ZERO;
|
|
3012
2910
|
}
|
|
3013
2911
|
setOffset(e) {
|
|
3014
2912
|
this.innerOverlay.setOffset(e);
|
|
3015
2913
|
}
|
|
3016
2914
|
}
|
|
3017
|
-
function
|
|
2915
|
+
function Dt() {
|
|
3018
2916
|
BMap.OverlayV3 || (BMap.OverlayV3 = BMap.Overlay);
|
|
3019
2917
|
}
|
|
3020
|
-
let
|
|
3021
|
-
function
|
|
3022
|
-
return
|
|
2918
|
+
let Pe;
|
|
2919
|
+
function Pr(i, e, t, r, s, n) {
|
|
2920
|
+
return Pe || (Pe = Ir()), new Pe(i, e, t, r, s, n);
|
|
3023
2921
|
}
|
|
3024
2922
|
function Ir() {
|
|
3025
|
-
|
|
2923
|
+
Dt();
|
|
3026
2924
|
const i = new BMap.Point(0, 0);
|
|
3027
2925
|
return class extends BMap.OverlayV3 {
|
|
3028
|
-
constructor(r, s = i, n =
|
|
2926
|
+
constructor(r, s = i, n = de.ZERO, a, g = 654, o = "") {
|
|
3029
2927
|
super();
|
|
3030
2928
|
// 类表达式不能有私有成员, 故改成public
|
|
3031
2929
|
h(this, "container");
|
|
@@ -3096,7 +2994,7 @@ class ct extends Ce {
|
|
|
3096
2994
|
}
|
|
3097
2995
|
static create(e) {
|
|
3098
2996
|
var s;
|
|
3099
|
-
const t = this.coordType, r =
|
|
2997
|
+
const t = this.coordType, r = Pr(
|
|
3100
2998
|
e.content,
|
|
3101
2999
|
(s = e.position) == null ? void 0 : s.toBaidu(t),
|
|
3102
3000
|
e.offset,
|
|
@@ -3127,7 +3025,7 @@ class ct extends Ce {
|
|
|
3127
3025
|
}
|
|
3128
3026
|
class dt extends nt {
|
|
3129
3027
|
constructor(e, t, r) {
|
|
3130
|
-
super(new
|
|
3028
|
+
super(new X(e, r)), this.inner = e, this.coordType = t, this.map = r;
|
|
3131
3029
|
}
|
|
3132
3030
|
static create(e) {
|
|
3133
3031
|
var n;
|
|
@@ -3170,7 +3068,7 @@ class dt extends nt {
|
|
|
3170
3068
|
this.inner.setZIndex(e);
|
|
3171
3069
|
}
|
|
3172
3070
|
}
|
|
3173
|
-
class
|
|
3071
|
+
class Lr extends Ze {
|
|
3174
3072
|
constructor(t, r) {
|
|
3175
3073
|
var s;
|
|
3176
3074
|
super(t);
|
|
@@ -3183,17 +3081,17 @@ class Pr extends Ze {
|
|
|
3183
3081
|
h(this, "createPolyline", He.create);
|
|
3184
3082
|
h(this, "createInfoWindow", ot.create);
|
|
3185
3083
|
h(this, "createInfoBox", ct.create);
|
|
3186
|
-
h(this, "createMarker",
|
|
3084
|
+
h(this, "createMarker", ce.create);
|
|
3187
3085
|
h(this, "createMapTypeControl", Qe.create);
|
|
3188
3086
|
h(this, "createZoomControl", et.create);
|
|
3189
3087
|
h(this, "createScaleControl", rt.create);
|
|
3190
|
-
this.buildInMapTypeId2BIMT =
|
|
3088
|
+
this.buildInMapTypeId2BIMT = P.BUILD_IN_MAP_TYPES.getValueMap(k.prototype.getId), this.baiduMapType2BIMT = P.BUILD_IN_MAP_TYPES.getValueMap(k.prototype.asBaiduMapType), this.map = new BMap.Map(t, {
|
|
3191
3089
|
minZoom: r.minZoom,
|
|
3192
3090
|
maxZoom: r.maxZoom,
|
|
3193
3091
|
mapType: r.buildInMapTypeId && ((s = this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId)) == null ? void 0 : s.asBaiduMapType()),
|
|
3194
3092
|
enableMapClick: !1
|
|
3195
3093
|
// 关闭底图点击功能
|
|
3196
|
-
}), this.map.centerAndZoom(r.center.toBaidu(this.coordType), r.zoom), this.setGestureHandling(r.gestureHandling), r.infoWindowMode === "multi" && console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"), r.mapStyle && this.map.setMapStyle2(r.mapStyle.toBaidu()), this.setEventTargetDelegate(new
|
|
3094
|
+
}), this.map.centerAndZoom(r.center.toBaidu(this.coordType), r.zoom), this.setGestureHandling(r.gestureHandling), r.infoWindowMode === "multi" && console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"), r.mapStyle && this.map.setMapStyle2(r.mapStyle.toBaidu()), this.setEventTargetDelegate(new Q(this.map, this)), this.map.addEventListener("addoverlay", (n) => {
|
|
3197
3095
|
const a = n.target.__info_box__;
|
|
3198
3096
|
a && (console.debug("add:info-box", a), this.map.addOverlay(a));
|
|
3199
3097
|
}), this.map.addEventListener("removeoverlay", (n) => {
|
|
@@ -3204,15 +3102,15 @@ class Pr extends Ze {
|
|
|
3204
3102
|
setDefaultCursor(t) {
|
|
3205
3103
|
this.innerMap.setDefaultCursor(t);
|
|
3206
3104
|
}
|
|
3207
|
-
setGestureHandling(t =
|
|
3208
|
-
switch (t ===
|
|
3209
|
-
case
|
|
3105
|
+
setGestureHandling(t = R.auto) {
|
|
3106
|
+
switch (t === R.auto && (t = this.element.parentElement && $e.isScrollable(this.element.parentElement) ? R.cooperative : R.greedy), t) {
|
|
3107
|
+
case R.cooperative:
|
|
3210
3108
|
this.map.disableScrollWheelZoom(), this.map.enableDragging(), this.map.enableDoubleClickZoom();
|
|
3211
3109
|
break;
|
|
3212
|
-
case
|
|
3110
|
+
case R.greedy:
|
|
3213
3111
|
this.map.enableScrollWheelZoom(), this.map.enableDragging(), this.map.enableDoubleClickZoom();
|
|
3214
3112
|
break;
|
|
3215
|
-
case
|
|
3113
|
+
case R.none:
|
|
3216
3114
|
this.map.disableDragging(), this.map.disableScrollWheelZoom(), this.map.disableDoubleClickZoom();
|
|
3217
3115
|
break;
|
|
3218
3116
|
}
|
|
@@ -3295,7 +3193,7 @@ class Pr extends Ze {
|
|
|
3295
3193
|
});
|
|
3296
3194
|
}
|
|
3297
3195
|
getBounds() {
|
|
3298
|
-
return
|
|
3196
|
+
return V.fromBaidu(this.map.getBounds(), this.coordType);
|
|
3299
3197
|
}
|
|
3300
3198
|
addElementOverlay(t) {
|
|
3301
3199
|
this.map.addOverlay(t.asBaidu());
|
|
@@ -3314,7 +3212,7 @@ class Pr extends Ze {
|
|
|
3314
3212
|
const r = class extends BMap.Control {
|
|
3315
3213
|
constructor() {
|
|
3316
3214
|
super(...arguments);
|
|
3317
|
-
h(this, "defaultAnchor",
|
|
3215
|
+
h(this, "defaultAnchor", I.getBaidu().toValue(t.position));
|
|
3318
3216
|
h(this, "defaultOffset", new BMap.Size(0, 0));
|
|
3319
3217
|
}
|
|
3320
3218
|
initialize(n) {
|
|
@@ -3326,13 +3224,13 @@ class Pr extends Ze {
|
|
|
3326
3224
|
}
|
|
3327
3225
|
}
|
|
3328
3226
|
removeCustomControl(t) {
|
|
3329
|
-
t.inner && (
|
|
3227
|
+
t.inner && (ae(t.inner instanceof BMap.Control, `control.inner(${t.inner})需要是BMap.Control`), this.map.removeControl(t.inner));
|
|
3330
3228
|
}
|
|
3331
3229
|
createMarkerClusterer(t) {
|
|
3332
|
-
return new
|
|
3230
|
+
return new br(this, t);
|
|
3333
3231
|
}
|
|
3334
3232
|
}
|
|
3335
|
-
class
|
|
3233
|
+
class Br extends Ze {
|
|
3336
3234
|
constructor(t, r) {
|
|
3337
3235
|
var n;
|
|
3338
3236
|
super(t);
|
|
@@ -3346,13 +3244,13 @@ class Lr extends Ze {
|
|
|
3346
3244
|
h(this, "createInfoWindow", at.create);
|
|
3347
3245
|
h(this, "createInfoBox", dt.create);
|
|
3348
3246
|
h(this, "createMarker", st.create);
|
|
3349
|
-
h(this, "createMapTypeControl",
|
|
3247
|
+
h(this, "createMapTypeControl", fe.create);
|
|
3350
3248
|
h(this, "createZoomControl", tt.create);
|
|
3351
3249
|
h(this, "createScaleControl", it.create);
|
|
3352
|
-
this.mapOptions = r, this.buildInMapTypeId2BIMT =
|
|
3250
|
+
this.mapOptions = r, this.buildInMapTypeId2BIMT = P.BUILD_IN_MAP_TYPES.getValueMap(k.prototype.getId), this.googleMapTypeId2BIMT = P.BUILD_IN_MAP_TYPES.getValueMap(k.prototype.getGoogleMapTypeId);
|
|
3353
3251
|
const s = r.buildInMapTypeId && this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId);
|
|
3354
3252
|
this.map = new google.maps.Map(t, {
|
|
3355
|
-
center: r.center.toGoogle((s ??
|
|
3253
|
+
center: r.center.toGoogle((s ?? P.NORMAL).getGoogleCoordType()),
|
|
3356
3254
|
zoom: r.zoom,
|
|
3357
3255
|
disableDefaultUI: !0,
|
|
3358
3256
|
streetViewControl: !0,
|
|
@@ -3361,7 +3259,7 @@ class Lr extends Ze {
|
|
|
3361
3259
|
maxZoom: r.maxZoom,
|
|
3362
3260
|
styles: (n = r.mapStyle) == null ? void 0 : n.toGoogle(),
|
|
3363
3261
|
mapTypeId: s == null ? void 0 : s.getGoogleMapTypeId()
|
|
3364
|
-
}), this.setEventTargetDelegate(new
|
|
3262
|
+
}), this.setEventTargetDelegate(new X(this.map, this));
|
|
3365
3263
|
}
|
|
3366
3264
|
setDefaultCursor(t) {
|
|
3367
3265
|
this.innerMap.setOptions({ draggableCursor: t });
|
|
@@ -3387,7 +3285,7 @@ class Lr extends Ze {
|
|
|
3387
3285
|
fromLatLngToContainerPoint(t) {
|
|
3388
3286
|
const r = this.innerMap.getProjection(), s = this.innerMap.getBounds();
|
|
3389
3287
|
if (r == null || s == null)
|
|
3390
|
-
return
|
|
3288
|
+
return de.ZERO;
|
|
3391
3289
|
const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), g = Math.pow(2, this.innerMap.getZoom()), o = r.fromLatLngToPoint(t.toGoogle(this.coordType));
|
|
3392
3290
|
return { x: (o.x - n.x) * g, y: (o.y - a.y) * g };
|
|
3393
3291
|
}
|
|
@@ -3428,7 +3326,7 @@ class Lr extends Ze {
|
|
|
3428
3326
|
this.map.overlayMapTypes.push(t.asGoogleMapType());
|
|
3429
3327
|
}
|
|
3430
3328
|
removeOverlayMapType(t) {
|
|
3431
|
-
|
|
3329
|
+
Te.remove(this.map.overlayMapTypes, t.asGoogleMapType());
|
|
3432
3330
|
}
|
|
3433
3331
|
addLayer(t) {
|
|
3434
3332
|
t.asGoogleLayer().setMap(this.map);
|
|
@@ -3447,7 +3345,7 @@ class Lr extends Ze {
|
|
|
3447
3345
|
}
|
|
3448
3346
|
getBounds() {
|
|
3449
3347
|
const t = this.map.getBounds();
|
|
3450
|
-
return t ?
|
|
3348
|
+
return t ? V.fromGoogle(t, this.coordType) : V.EMPTY;
|
|
3451
3349
|
}
|
|
3452
3350
|
addElementOverlay(t) {
|
|
3453
3351
|
t.asGoogle().setMap(this.map);
|
|
@@ -3462,54 +3360,27 @@ class Lr extends Ze {
|
|
|
3462
3360
|
t.innerOverlay.setMap(null);
|
|
3463
3361
|
}
|
|
3464
3362
|
addCustomControl(t) {
|
|
3465
|
-
t.inner || (t.inner = t.onCreateElement(), this.map.controls[
|
|
3363
|
+
t.inner || (t.inner = t.onCreateElement(), this.map.controls[I.getGoogle().toValue(t.position)].push(t.inner));
|
|
3466
3364
|
}
|
|
3467
3365
|
removeCustomControl(t) {
|
|
3468
3366
|
if (t.inner) {
|
|
3469
|
-
const r = this.map.controls[
|
|
3470
|
-
|
|
3367
|
+
const r = this.map.controls[I.getGoogle().toValue(t.position)];
|
|
3368
|
+
Te.remove(r, t.inner);
|
|
3471
3369
|
}
|
|
3472
3370
|
}
|
|
3473
3371
|
createMarkerClusterer(t) {
|
|
3474
|
-
return new
|
|
3372
|
+
return new Tr(this, t);
|
|
3475
3373
|
}
|
|
3476
3374
|
}
|
|
3477
|
-
|
|
3478
|
-
baidu: {
|
|
3479
|
-
version: "3.0",
|
|
3480
|
-
// 在build时会被静态替换, 导致使用者不能无法设置它
|
|
3481
|
-
// @see https://cn.vitejs.dev/guide/build.html#library-mode:~:text=%E6%A8%A1%E5%BC%8F%E4%B8%8B%EF%BC%8C%E6%89%80%E6%9C%89-,({}).*,-%E7%94%A8%E6%B3%95%E5%9C%A8%E6%9E%84
|
|
3482
|
-
// @see @vite_process_env_detail
|
|
3483
|
-
key: {}.VITE_APP_DEV_KEY_BAIDU,
|
|
3484
|
-
language: ""
|
|
3485
|
-
},
|
|
3486
|
-
google: {
|
|
3487
|
-
version: "",
|
|
3488
|
-
key: {}.VITE_APP_DEV_KEY_GOOGLE,
|
|
3489
|
-
language: "en-us"
|
|
3490
|
-
},
|
|
3491
|
-
here: {
|
|
3492
|
-
version: Te[0],
|
|
3493
|
-
key: {}.VITE_APP_DEV_KEY_HERE,
|
|
3494
|
-
language: ""
|
|
3495
|
-
}
|
|
3496
|
-
};
|
|
3497
|
-
let Nt;
|
|
3498
|
-
function Rt() {
|
|
3499
|
-
return Nt || x("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
|
|
3500
|
-
}
|
|
3501
|
-
function Sr(i) {
|
|
3502
|
-
i != null && (Nt = Ct(Br, i));
|
|
3503
|
-
}
|
|
3504
|
-
class $r extends Ze {
|
|
3375
|
+
class Sr extends Ze {
|
|
3505
3376
|
constructor(t, r) {
|
|
3506
3377
|
var a;
|
|
3507
3378
|
super(t);
|
|
3508
3379
|
h(this, "map");
|
|
3509
3380
|
h(this, "defaultLayers");
|
|
3510
3381
|
this.mapOptions = r;
|
|
3511
|
-
const s =
|
|
3512
|
-
|
|
3382
|
+
const s = xt().here;
|
|
3383
|
+
_e.includes(s.version) || x(`不支持${s.version}, HereMap当前只支持如下版本: ${_e}`);
|
|
3513
3384
|
const n = new H.service.Platform({
|
|
3514
3385
|
app_id: s.key.split(",")[0],
|
|
3515
3386
|
app_code: s.key.split(",")[1]
|
|
@@ -3526,7 +3397,7 @@ class $r extends Ze {
|
|
|
3526
3397
|
return this.map;
|
|
3527
3398
|
}
|
|
3528
3399
|
get coordType() {
|
|
3529
|
-
return
|
|
3400
|
+
return q.wgs84;
|
|
3530
3401
|
}
|
|
3531
3402
|
getCenter() {
|
|
3532
3403
|
return y.fromHere(this.map.getCenter(), this.coordType);
|
|
@@ -3638,30 +3509,30 @@ class $r extends Ze {
|
|
|
3638
3509
|
throw new Error("Method not implemented.");
|
|
3639
3510
|
}
|
|
3640
3511
|
}
|
|
3641
|
-
var $ = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here = "here", i))($ || {}),
|
|
3512
|
+
var $ = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here = "here", i))($ || {}), Ae;
|
|
3642
3513
|
((i) => {
|
|
3643
3514
|
function e(t, r, s) {
|
|
3644
|
-
const n =
|
|
3515
|
+
const n = Be.create(s);
|
|
3645
3516
|
switch (t) {
|
|
3646
3517
|
case "google":
|
|
3647
|
-
return new
|
|
3518
|
+
return new Br(r, n);
|
|
3648
3519
|
case "baidu":
|
|
3649
|
-
return new
|
|
3520
|
+
return new Lr(r, n);
|
|
3650
3521
|
case "here":
|
|
3651
|
-
return new
|
|
3522
|
+
return new Sr(r, n);
|
|
3652
3523
|
}
|
|
3653
3524
|
}
|
|
3654
3525
|
i.createMap = e;
|
|
3655
|
-
})(
|
|
3656
|
-
function
|
|
3657
|
-
const t = window, r =
|
|
3526
|
+
})(Ae || (Ae = {}));
|
|
3527
|
+
function $r(i, e) {
|
|
3528
|
+
const t = window, r = Ar(i);
|
|
3658
3529
|
if (t[r])
|
|
3659
3530
|
return Promise.resolve();
|
|
3660
3531
|
switch (i !== $.here && !e.key && x(`请先配置${i}地图的key`), i) {
|
|
3661
3532
|
case $.google:
|
|
3662
|
-
return
|
|
3533
|
+
return _t(`https://maps.googleapis.com/maps/api/js?key=${e.key}&language=${e.language}`);
|
|
3663
3534
|
case $.baidu:
|
|
3664
|
-
return
|
|
3535
|
+
return _t(`https://api.map.baidu.com/api?v=${e.version}&ak=${e.key}`);
|
|
3665
3536
|
case $.here:
|
|
3666
3537
|
return ne(se("core", e.version)).then(() => Promise.all([
|
|
3667
3538
|
// 其他大多数模块都可以同时载入
|
|
@@ -3672,10 +3543,10 @@ function Ar(i, e) {
|
|
|
3672
3543
|
])).catch((s) => (delete t[r], Promise.reject(s)));
|
|
3673
3544
|
}
|
|
3674
3545
|
}
|
|
3675
|
-
function se(i, e =
|
|
3546
|
+
function se(i, e = _e[0]) {
|
|
3676
3547
|
return `https://js.api.here.com/v3/${e}/mapsjs-${i}.js`;
|
|
3677
3548
|
}
|
|
3678
|
-
function
|
|
3549
|
+
function Ar(i) {
|
|
3679
3550
|
switch (i) {
|
|
3680
3551
|
case $.google:
|
|
3681
3552
|
return "google";
|
|
@@ -3685,10 +3556,10 @@ function zr(i) {
|
|
|
3685
3556
|
return "H";
|
|
3686
3557
|
}
|
|
3687
3558
|
}
|
|
3688
|
-
let
|
|
3689
|
-
function
|
|
3559
|
+
let zr = 0;
|
|
3560
|
+
function _t(i, e = "callback") {
|
|
3690
3561
|
return new Promise((t, r) => {
|
|
3691
|
-
const s = `__callback${
|
|
3562
|
+
const s = `__callback${zr++}`;
|
|
3692
3563
|
window[s] = t;
|
|
3693
3564
|
const n = document.createElement("script");
|
|
3694
3565
|
n.src = `${i}&${e}=${s}`, n.onerror = r, document.body.appendChild(n);
|
|
@@ -3700,17 +3571,146 @@ function ne(i) {
|
|
|
3700
3571
|
r.src = i, r.onload = e, r.onerror = t, document.body.appendChild(r);
|
|
3701
3572
|
});
|
|
3702
3573
|
}
|
|
3703
|
-
|
|
3574
|
+
function D(i, e) {
|
|
3575
|
+
return {
|
|
3576
|
+
type: String,
|
|
3577
|
+
default: e,
|
|
3578
|
+
validator: (t) => Object.values(i).includes(t)
|
|
3579
|
+
};
|
|
3580
|
+
}
|
|
3581
|
+
function Nr(i, e) {
|
|
3582
|
+
return {
|
|
3583
|
+
type: String,
|
|
3584
|
+
default: e,
|
|
3585
|
+
validator: (t) => i.includes(t)
|
|
3586
|
+
};
|
|
3587
|
+
}
|
|
3588
|
+
function z(i) {
|
|
3589
|
+
return {
|
|
3590
|
+
type: i,
|
|
3591
|
+
required: !0
|
|
3592
|
+
};
|
|
3593
|
+
}
|
|
3594
|
+
function m(i, e) {
|
|
3595
|
+
return {
|
|
3596
|
+
type: i,
|
|
3597
|
+
default: e
|
|
3598
|
+
};
|
|
3599
|
+
}
|
|
3600
|
+
function $i(i) {
|
|
3601
|
+
const e = {};
|
|
3602
|
+
return Object.entries(i).forEach(([t, r]) => {
|
|
3603
|
+
const s = `__${t}`;
|
|
3604
|
+
e[t] = {
|
|
3605
|
+
get() {
|
|
3606
|
+
const n = this[s];
|
|
3607
|
+
return n === void 0 ? r : n;
|
|
3608
|
+
},
|
|
3609
|
+
set(n) {
|
|
3610
|
+
this[s] = n;
|
|
3611
|
+
}
|
|
3612
|
+
// Vue3已经不支持该属性
|
|
3613
|
+
// cache: false
|
|
3614
|
+
};
|
|
3615
|
+
}), e;
|
|
3616
|
+
}
|
|
3617
|
+
const oe = {
|
|
3618
|
+
enumerable: !0,
|
|
3619
|
+
configurable: !0,
|
|
3620
|
+
get: ve,
|
|
3621
|
+
set: ve
|
|
3622
|
+
};
|
|
3623
|
+
function Rr(i) {
|
|
3624
|
+
return Object.keys(i).forEach((e) => {
|
|
3625
|
+
const t = i[e];
|
|
3626
|
+
let r = !1;
|
|
3627
|
+
typeof t == "function" ? (oe.get = t, oe.set = ve, r = !0) : typeof t == "object" && typeof t.get == "function" && (oe.get = t.get, oe.set = t.set, r = !0), r && (i[e] = Object.defineProperty(i, e, oe));
|
|
3628
|
+
}), i;
|
|
3629
|
+
}
|
|
3630
|
+
function Ai(i) {
|
|
3631
|
+
return Rr(i);
|
|
3632
|
+
}
|
|
3633
|
+
function Dr() {
|
|
3634
|
+
return Ie();
|
|
3635
|
+
}
|
|
3636
|
+
function me(i, e) {
|
|
3637
|
+
const t = i.$options[e];
|
|
3638
|
+
if (t)
|
|
3639
|
+
for (const r of t)
|
|
3640
|
+
r.call(i);
|
|
3641
|
+
}
|
|
3642
|
+
function zi(i, e) {
|
|
3643
|
+
for (const t of i)
|
|
3644
|
+
if (t.$options.name === e.name)
|
|
3645
|
+
return t;
|
|
3646
|
+
}
|
|
3647
|
+
function Ni(i, e) {
|
|
3648
|
+
if (!i.default)
|
|
3649
|
+
return;
|
|
3650
|
+
const t = i.default();
|
|
3651
|
+
for (const r of t)
|
|
3652
|
+
if ((r == null ? void 0 : r.type).name === e.name)
|
|
3653
|
+
return r;
|
|
3654
|
+
}
|
|
3655
|
+
function Zr(i, e) {
|
|
3656
|
+
const t = {}, r = {}, s = {};
|
|
3657
|
+
return Object.keys(i).forEach((n) => {
|
|
3658
|
+
n.startsWith("on") ? t[n.substring(2).toLowerCase()] = i[n] : r[n] = i[n];
|
|
3659
|
+
}), e && Object.keys(e).forEach((n) => {
|
|
3660
|
+
n.startsWith("on") && (s[n.substring(2).toLocaleLowerCase()] = e[n]);
|
|
3661
|
+
}), {
|
|
3662
|
+
/** class/style/未声明的属性 等 */
|
|
3663
|
+
binds: r,
|
|
3664
|
+
/** 未声明的事件 */
|
|
3665
|
+
listeners: t,
|
|
3666
|
+
/** 声明在`props`中的事件 */
|
|
3667
|
+
listenerProps: s
|
|
3668
|
+
};
|
|
3669
|
+
}
|
|
3670
|
+
function U(i, e) {
|
|
3671
|
+
return bt(() => Zr(i, e));
|
|
3672
|
+
}
|
|
3673
|
+
function N() {
|
|
3674
|
+
return Function;
|
|
3675
|
+
}
|
|
3676
|
+
const Ri = {
|
|
3677
|
+
/**
|
|
3678
|
+
* @event 一般来说传{@link Tg.Event}对象, 但传其他对象也不会报错
|
|
3679
|
+
*/
|
|
3680
|
+
eventLog(i) {
|
|
3681
|
+
console.log(i), this.$_prev_type = i && i.type, this.$_prev_time = Date.now();
|
|
3682
|
+
},
|
|
3683
|
+
/** @see eventLog */
|
|
3684
|
+
eventLogLess(i) {
|
|
3685
|
+
((i && i.type) !== this.$_prev_type || Date.now() - (this.$_prev_time ?? 0) > 1e3) && this.eventLog(i);
|
|
3686
|
+
}
|
|
3687
|
+
}, Zt = "$map", ze = "onCreate", Ne = "onDestroy", w = C({
|
|
3688
|
+
inject: [Zt],
|
|
3689
|
+
mounted() {
|
|
3690
|
+
me(this, ze);
|
|
3691
|
+
},
|
|
3692
|
+
beforeUnmount() {
|
|
3693
|
+
me(this, Ne);
|
|
3694
|
+
},
|
|
3695
|
+
methods: {
|
|
3696
|
+
recreate() {
|
|
3697
|
+
me(this, Ne), me(this, ze);
|
|
3698
|
+
}
|
|
3699
|
+
},
|
|
3700
|
+
render() {
|
|
3701
|
+
return Dr();
|
|
3702
|
+
}
|
|
3703
|
+
}), Gr = C({
|
|
3704
3704
|
name: "tg-map",
|
|
3705
3705
|
provide() {
|
|
3706
3706
|
return {
|
|
3707
|
-
[
|
|
3707
|
+
[Zt]: bt(() => this.map)
|
|
3708
3708
|
};
|
|
3709
3709
|
},
|
|
3710
3710
|
inheritAttrs: !1,
|
|
3711
3711
|
props: {
|
|
3712
3712
|
/** type没做响应式, 但外部可以把type作为tg-map的key, 让type修改时完全重建tg-map */
|
|
3713
|
-
type:
|
|
3713
|
+
type: D($, $.google),
|
|
3714
3714
|
/**
|
|
3715
3715
|
* 当对该属性使用双向绑定时, 改变center将触发update:center又反过来触发center改变, 最终导致无限循环...
|
|
3716
3716
|
* 当前通过setCenter()时判断center是否有改变来避免该问题, 但为了避免可能存在的问题, 另外设计了如下机制:
|
|
@@ -3737,32 +3737,40 @@ const Rr = C({
|
|
|
3737
3737
|
*/
|
|
3738
3738
|
lastCenter: m(y),
|
|
3739
3739
|
zoom: z(Number),
|
|
3740
|
-
infoWindowMode:
|
|
3741
|
-
|
|
3742
|
-
gestureHandling: W(N),
|
|
3740
|
+
infoWindowMode: Nr(fr),
|
|
3741
|
+
gestureHandling: D(R),
|
|
3743
3742
|
minZoom: m(Number),
|
|
3744
3743
|
maxZoom: m(Number),
|
|
3745
3744
|
mapStyle: m(Object),
|
|
3746
|
-
|
|
3747
|
-
mapTypeId
|
|
3748
|
-
|
|
3749
|
-
|
|
3745
|
+
mapTypeId: D(zt),
|
|
3746
|
+
/** 地图类型对象, 优先级比mapTypeId高 */
|
|
3747
|
+
mapType: m(Object),
|
|
3748
|
+
onLoad: N(),
|
|
3749
|
+
"onUpdate:center": N(),
|
|
3750
|
+
"onUpdate:current-center": N(),
|
|
3751
|
+
"onUpdate:last-center": N(),
|
|
3752
|
+
"onUpdate:map-type": N(),
|
|
3753
|
+
"onUpdate:map-type-id": N(),
|
|
3754
|
+
"onUpdate:zoom": N(),
|
|
3755
|
+
onError: N()
|
|
3750
3756
|
},
|
|
3757
|
+
/** 声明事件的类型信息, 详见: {@link splitAttrs} */
|
|
3758
|
+
emits: void 0,
|
|
3751
3759
|
setup(i, { attrs: e }) {
|
|
3752
3760
|
return {
|
|
3753
|
-
attrs:
|
|
3761
|
+
attrs: U(e, i),
|
|
3754
3762
|
centerSyncTimeoutId: 0
|
|
3755
3763
|
};
|
|
3756
3764
|
},
|
|
3757
3765
|
data() {
|
|
3758
3766
|
return {
|
|
3759
|
-
map:
|
|
3767
|
+
map: Le(),
|
|
3760
3768
|
isDestroyed: !1
|
|
3761
3769
|
};
|
|
3762
3770
|
},
|
|
3763
3771
|
computed: {
|
|
3764
3772
|
propsJson() {
|
|
3765
|
-
return
|
|
3773
|
+
return he.toJsonSafely(this.$props);
|
|
3766
3774
|
}
|
|
3767
3775
|
},
|
|
3768
3776
|
watch: {
|
|
@@ -3775,7 +3783,7 @@ const Rr = C({
|
|
|
3775
3783
|
},
|
|
3776
3784
|
gestureHandling(i) {
|
|
3777
3785
|
var e;
|
|
3778
|
-
(e = this.map) == null || e.setGestureHandling(i);
|
|
3786
|
+
i && ((e = this.map) == null || e.setGestureHandling(i));
|
|
3779
3787
|
},
|
|
3780
3788
|
minZoom(i) {
|
|
3781
3789
|
var e;
|
|
@@ -3790,20 +3798,18 @@ const Rr = C({
|
|
|
3790
3798
|
(e = this.map) == null || e.setMapStyle(i);
|
|
3791
3799
|
},
|
|
3792
3800
|
mapTypeId(i) {
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
e && this.map.setBuildInMapTypeId(e);
|
|
3796
|
-
}
|
|
3801
|
+
var e;
|
|
3802
|
+
i && ((e = this.map) == null || e.setBuildInMapTypeId(i));
|
|
3797
3803
|
},
|
|
3798
3804
|
mapType(i) {
|
|
3799
3805
|
var e;
|
|
3800
|
-
(e = this.map) == null || e.setMapType(i ??
|
|
3806
|
+
(e = this.map) == null || e.setMapType(i ?? P.NORMAL);
|
|
3801
3807
|
}
|
|
3802
3808
|
},
|
|
3803
3809
|
async created() {
|
|
3804
|
-
const
|
|
3810
|
+
const i = this.type;
|
|
3805
3811
|
try {
|
|
3806
|
-
await
|
|
3812
|
+
await $r(i, xt()[i]);
|
|
3807
3813
|
} catch (s) {
|
|
3808
3814
|
this.$emit("error", s);
|
|
3809
3815
|
return;
|
|
@@ -3812,7 +3818,7 @@ const Rr = C({
|
|
|
3812
3818
|
console.warn(`tg-map(type=${i})已销毁, 不需要继续执行`);
|
|
3813
3819
|
return;
|
|
3814
3820
|
}
|
|
3815
|
-
const e = this.map =
|
|
3821
|
+
const e = this.map = Ae.createMap(
|
|
3816
3822
|
i,
|
|
3817
3823
|
this.$refs.map,
|
|
3818
3824
|
/* options: */
|
|
@@ -3824,56 +3830,55 @@ const Rr = C({
|
|
|
3824
3830
|
minZoom: this.minZoom,
|
|
3825
3831
|
maxZoom: this.maxZoom,
|
|
3826
3832
|
mapStyle: this.mapStyle,
|
|
3827
|
-
|
|
3828
|
-
buildInMapTypeId: ye.toEnumOrNull(this.mapTypeId, Ae)
|
|
3833
|
+
buildInMapTypeId: this.mapTypeId
|
|
3829
3834
|
}
|
|
3830
3835
|
);
|
|
3831
3836
|
if (this.mapType && e.setMapType(this.mapType), "ready" in this.attrs.listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"), F(
|
|
3832
3837
|
this.attrs.listeners,
|
|
3833
|
-
|
|
3838
|
+
e,
|
|
3834
3839
|
/* excludes: */
|
|
3835
3840
|
["load"]
|
|
3836
|
-
), this.$emit("load",
|
|
3841
|
+
), this.$emit("load", e), "update:center" in this.attrs.listenerProps) {
|
|
3837
3842
|
const s = () => this.$emit("update:center", e.getCenter());
|
|
3838
3843
|
e.addEventListener("center-changed", () => {
|
|
3839
3844
|
this.centerSyncDelay > 0 ? (clearTimeout(this.centerSyncTimeoutId), this.centerSyncTimeoutId = setTimeout(s, this.centerSyncDelay)) : s();
|
|
3840
3845
|
});
|
|
3841
3846
|
}
|
|
3842
|
-
"update:current-center" in this.attrs.
|
|
3847
|
+
"update:current-center" in this.attrs.listenerProps && (this.$emit("update:current-center", this.center), e.addEventListener("center-changed", () => {
|
|
3843
3848
|
this.$emit("update:current-center", e.getCenter());
|
|
3844
|
-
})), "update:zoom" in this.attrs.
|
|
3849
|
+
})), "update:zoom" in this.attrs.listenerProps && e.addEventListener("zoom-changed", () => {
|
|
3845
3850
|
this.$emit("update:zoom", e.getZoom());
|
|
3846
3851
|
});
|
|
3847
|
-
const t = "update:map-type" in this.attrs.
|
|
3852
|
+
const t = "update:map-type" in this.attrs.listenerProps, r = "update:map-type-id" in this.attrs.listenerProps;
|
|
3848
3853
|
(t || r) && e.addEventListener("map-type-changed", () => {
|
|
3849
3854
|
const s = e.getMapType();
|
|
3850
3855
|
t && this.$emit("update:map-type", s), r && this.$emit("update:map-type-id", s.id);
|
|
3851
3856
|
});
|
|
3852
3857
|
},
|
|
3853
3858
|
unmounted() {
|
|
3854
|
-
this.isDestroyed = !0, this.map && ("update:last-center" in this.attrs.
|
|
3859
|
+
this.isDestroyed = !0, this.map && ("update:last-center" in this.attrs.listenerProps && this.$emit("update:last-center", this.map.getCenter()), "update:center" in this.attrs.listenerProps && (clearTimeout(this.centerSyncTimeoutId), this.$emit("update:center", this.map.getCenter())));
|
|
3855
3860
|
},
|
|
3856
3861
|
methods: {}
|
|
3857
3862
|
});
|
|
3858
|
-
const
|
|
3863
|
+
const j = (i, e) => {
|
|
3859
3864
|
const t = i.__vccOpts || i;
|
|
3860
3865
|
for (const [r, s] of e)
|
|
3861
3866
|
t[r] = s;
|
|
3862
3867
|
return t;
|
|
3863
|
-
},
|
|
3868
|
+
}, jr = {
|
|
3864
3869
|
ref: "map",
|
|
3865
3870
|
class: "tg-map__map"
|
|
3866
3871
|
};
|
|
3867
|
-
function
|
|
3868
|
-
return
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
i.map ? A(i.$slots, "default", { key: 1 }) :
|
|
3872
|
+
function Wr(i, e, t, r, s, n) {
|
|
3873
|
+
return Z(), G("div", ie({ class: "tg-map" }, i.attrs.binds), [
|
|
3874
|
+
Ft("div", jr, null, 512),
|
|
3875
|
+
Ie("", !0),
|
|
3876
|
+
i.map ? A(i.$slots, "default", { key: 1 }) : Ie("", !0),
|
|
3872
3877
|
A(i.$slots, "overlay")
|
|
3873
3878
|
], 16);
|
|
3874
3879
|
}
|
|
3875
|
-
const
|
|
3876
|
-
function
|
|
3880
|
+
const Gt = /* @__PURE__ */ j(Gr, [["render", Wr]]);
|
|
3881
|
+
function Vr(i) {
|
|
3877
3882
|
if (i == null)
|
|
3878
3883
|
return;
|
|
3879
3884
|
let e;
|
|
@@ -3884,7 +3889,7 @@ function Gr(i) {
|
|
|
3884
3889
|
e = i;
|
|
3885
3890
|
return `${e}px`;
|
|
3886
3891
|
}
|
|
3887
|
-
const
|
|
3892
|
+
const Hr = C({
|
|
3888
3893
|
name: "tg-map-widget",
|
|
3889
3894
|
props: {
|
|
3890
3895
|
left: {
|
|
@@ -3910,22 +3915,22 @@ const jr = C({
|
|
|
3910
3915
|
}
|
|
3911
3916
|
},
|
|
3912
3917
|
methods: {
|
|
3913
|
-
dimen:
|
|
3918
|
+
dimen: Vr
|
|
3914
3919
|
}
|
|
3915
3920
|
});
|
|
3916
|
-
function
|
|
3917
|
-
return
|
|
3921
|
+
function Fr(i, e, t, r, s, n) {
|
|
3922
|
+
return Z(), G("div", {
|
|
3918
3923
|
class: De(i.$options.name),
|
|
3919
|
-
style:
|
|
3924
|
+
style: Ut({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
|
|
3920
3925
|
}, [
|
|
3921
3926
|
A(i.$slots, "default")
|
|
3922
3927
|
], 6);
|
|
3923
3928
|
}
|
|
3924
|
-
const
|
|
3929
|
+
const Ur = /* @__PURE__ */ j(Hr, [["render", Fr]]), Yr = C({
|
|
3925
3930
|
name: "tg-custom-control",
|
|
3926
3931
|
mixins: [w],
|
|
3927
3932
|
props: {
|
|
3928
|
-
position:
|
|
3933
|
+
position: D(E, E.RIGHT_BOTTOM)
|
|
3929
3934
|
},
|
|
3930
3935
|
setup() {
|
|
3931
3936
|
return {
|
|
@@ -3938,8 +3943,8 @@ const Vr = /* @__PURE__ */ Z(jr, [["render", Wr]]), Hr = C({
|
|
|
3938
3943
|
}
|
|
3939
3944
|
},
|
|
3940
3945
|
onCreate() {
|
|
3941
|
-
|
|
3942
|
-
const { $el: i } = this, e = class extends
|
|
3946
|
+
pe(this.$parent, Gt) || console.warn("请将tg-custom-control放到tg-map中");
|
|
3947
|
+
const { $el: i } = this, e = class extends wr {
|
|
3943
3948
|
onCreateElement() {
|
|
3944
3949
|
return i;
|
|
3945
3950
|
}
|
|
@@ -3950,19 +3955,19 @@ const Vr = /* @__PURE__ */ Z(jr, [["render", Wr]]), Hr = C({
|
|
|
3950
3955
|
this.$map.removeCustomControl(this.control);
|
|
3951
3956
|
}
|
|
3952
3957
|
});
|
|
3953
|
-
function
|
|
3954
|
-
return
|
|
3958
|
+
function Kr(i, e, t, r, s, n) {
|
|
3959
|
+
return Z(), G("div", {
|
|
3955
3960
|
class: De(i.$options.name)
|
|
3956
3961
|
}, [
|
|
3957
3962
|
A(i.$slots, "default")
|
|
3958
3963
|
], 2);
|
|
3959
3964
|
}
|
|
3960
|
-
const
|
|
3965
|
+
const qr = /* @__PURE__ */ j(Yr, [["render", Kr]]), Xr = C({
|
|
3961
3966
|
name: "tg-map-type-control",
|
|
3962
3967
|
mixins: [w],
|
|
3963
3968
|
props: {
|
|
3964
|
-
position:
|
|
3965
|
-
type:
|
|
3969
|
+
position: D(E, E.TOP_LEFT),
|
|
3970
|
+
type: D(Nt),
|
|
3966
3971
|
mapTypes: m(Array)
|
|
3967
3972
|
},
|
|
3968
3973
|
setup() {
|
|
@@ -3990,11 +3995,11 @@ const Ur = /* @__PURE__ */ Z(Hr, [["render", Fr]]), Yr = C({
|
|
|
3990
3995
|
onDestroy() {
|
|
3991
3996
|
this.$map.removeControl(this.control);
|
|
3992
3997
|
}
|
|
3993
|
-
}),
|
|
3998
|
+
}), Jr = C({
|
|
3994
3999
|
name: "tg-scale-control",
|
|
3995
4000
|
mixins: [w],
|
|
3996
4001
|
props: {
|
|
3997
|
-
position:
|
|
4002
|
+
position: D(E, E.BOTTOM_RIGHT)
|
|
3998
4003
|
},
|
|
3999
4004
|
setup() {
|
|
4000
4005
|
return {
|
|
@@ -4012,11 +4017,11 @@ const Ur = /* @__PURE__ */ Z(Hr, [["render", Fr]]), Yr = C({
|
|
|
4012
4017
|
onDestroy() {
|
|
4013
4018
|
this.$map.removeControl(this.control);
|
|
4014
4019
|
}
|
|
4015
|
-
}),
|
|
4020
|
+
}), Qr = C({
|
|
4016
4021
|
name: "tg-zoom-control",
|
|
4017
4022
|
mixins: [w],
|
|
4018
4023
|
props: {
|
|
4019
|
-
position:
|
|
4024
|
+
position: D(E, E.RIGHT_BOTTOM)
|
|
4020
4025
|
},
|
|
4021
4026
|
setup() {
|
|
4022
4027
|
return {
|
|
@@ -4034,7 +4039,7 @@ const Ur = /* @__PURE__ */ Z(Hr, [["render", Fr]]), Yr = C({
|
|
|
4034
4039
|
onDestroy() {
|
|
4035
4040
|
this.$map.removeControl(this.control);
|
|
4036
4041
|
}
|
|
4037
|
-
}),
|
|
4042
|
+
}), ei = C({
|
|
4038
4043
|
name: "tg-marker-clusterer",
|
|
4039
4044
|
mixins: [w],
|
|
4040
4045
|
// markers从this.$children中读取, 故需要省略(Omit)
|
|
@@ -4094,18 +4099,18 @@ const Ur = /* @__PURE__ */ Z(Hr, [["render", Fr]]), Yr = C({
|
|
|
4094
4099
|
this.markers.push(i), this.isInitiated() && this.clusterer.addMarker(i);
|
|
4095
4100
|
},
|
|
4096
4101
|
onRemoveMarker(i) {
|
|
4097
|
-
this.isInitiated() && this.clusterer.removeMarker(i),
|
|
4102
|
+
this.isInitiated() && this.clusterer.removeMarker(i), be.remove(this.markers, i);
|
|
4098
4103
|
}
|
|
4099
4104
|
}
|
|
4100
4105
|
});
|
|
4101
|
-
function
|
|
4102
|
-
return
|
|
4106
|
+
function ti(i, e, t, r, s, n) {
|
|
4107
|
+
return Z(), G("div", {
|
|
4103
4108
|
class: De(i.$options.name)
|
|
4104
4109
|
}, [
|
|
4105
4110
|
A(i.$slots, "default")
|
|
4106
4111
|
], 2);
|
|
4107
4112
|
}
|
|
4108
|
-
const
|
|
4113
|
+
const jt = /* @__PURE__ */ j(ei, [["render", ti]]), ri = C({
|
|
4109
4114
|
name: "tg-traffic-layer",
|
|
4110
4115
|
mixins: [w],
|
|
4111
4116
|
props: {
|
|
@@ -4118,12 +4123,12 @@ const Zt = /* @__PURE__ */ Z(Xr, [["render", Jr]]), Qr = C({
|
|
|
4118
4123
|
},
|
|
4119
4124
|
watch: {},
|
|
4120
4125
|
onCreate() {
|
|
4121
|
-
this.layer = new
|
|
4126
|
+
this.layer = new xr(), this.$map.addLayer(this.layer);
|
|
4122
4127
|
},
|
|
4123
4128
|
onDestroy() {
|
|
4124
4129
|
this.$map.removeLayer(this.layer);
|
|
4125
4130
|
}
|
|
4126
|
-
}),
|
|
4131
|
+
}), ii = C({
|
|
4127
4132
|
name: "tg-circle",
|
|
4128
4133
|
mixins: [w],
|
|
4129
4134
|
inheritAttrs: !1,
|
|
@@ -4141,7 +4146,7 @@ const Zt = /* @__PURE__ */ Z(Xr, [["render", Jr]]), Qr = C({
|
|
|
4141
4146
|
},
|
|
4142
4147
|
setup(i, { attrs: e }) {
|
|
4143
4148
|
return {
|
|
4144
|
-
attrs:
|
|
4149
|
+
attrs: U(e),
|
|
4145
4150
|
overlay: void 0
|
|
4146
4151
|
};
|
|
4147
4152
|
},
|
|
@@ -4185,7 +4190,7 @@ const Zt = /* @__PURE__ */ Z(Xr, [["render", Jr]]), Qr = C({
|
|
|
4185
4190
|
}
|
|
4186
4191
|
});
|
|
4187
4192
|
var Re = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overlayMouseTarget = "overlayMouseTarget", i.float = "float", i))(Re || {});
|
|
4188
|
-
class
|
|
4193
|
+
class si {
|
|
4189
4194
|
constructor(e, t) {
|
|
4190
4195
|
h(this, "baidu");
|
|
4191
4196
|
h(this, "google");
|
|
@@ -4206,7 +4211,7 @@ class ti {
|
|
|
4206
4211
|
asBaidu() {
|
|
4207
4212
|
if (!this.baidu) {
|
|
4208
4213
|
const e = this;
|
|
4209
|
-
|
|
4214
|
+
Dt();
|
|
4210
4215
|
class t extends BMap.OverlayV3 {
|
|
4211
4216
|
initialize(n) {
|
|
4212
4217
|
const a = e.create(), g = n.getPanes();
|
|
@@ -4293,7 +4298,7 @@ class ti {
|
|
|
4293
4298
|
return this.google;
|
|
4294
4299
|
}
|
|
4295
4300
|
}
|
|
4296
|
-
class
|
|
4301
|
+
class ni extends si {
|
|
4297
4302
|
constructor(e, t, r, s) {
|
|
4298
4303
|
super(e, t), this.content = r, this.position = s;
|
|
4299
4304
|
}
|
|
@@ -4308,11 +4313,11 @@ class ri extends ti {
|
|
|
4308
4313
|
this.position = e, this.draw();
|
|
4309
4314
|
}
|
|
4310
4315
|
}
|
|
4311
|
-
const
|
|
4316
|
+
const oi = C({
|
|
4312
4317
|
name: "tg-element-overlay",
|
|
4313
4318
|
mixins: [w],
|
|
4314
4319
|
props: {
|
|
4315
|
-
mapPane:
|
|
4320
|
+
mapPane: D(Re, Re.overlayMouseTarget),
|
|
4316
4321
|
position: z(y)
|
|
4317
4322
|
},
|
|
4318
4323
|
setup() {
|
|
@@ -4334,20 +4339,20 @@ const ii = C({
|
|
|
4334
4339
|
}
|
|
4335
4340
|
},
|
|
4336
4341
|
onCreate() {
|
|
4337
|
-
this.overlay = new
|
|
4342
|
+
this.overlay = new ni(this.$map, this, this.content(), this.position), this.$map.addElementOverlay(this.overlay);
|
|
4338
4343
|
},
|
|
4339
4344
|
onDestroy() {
|
|
4340
4345
|
this.$map.removeElementOverlay(this.overlay);
|
|
4341
4346
|
}
|
|
4342
4347
|
});
|
|
4343
|
-
function
|
|
4344
|
-
return
|
|
4348
|
+
function ai(i, e, t, r, s, n) {
|
|
4349
|
+
return Z(), G("div", ie({
|
|
4345
4350
|
class: i.$options.name
|
|
4346
4351
|
}, i.$attrs), [
|
|
4347
4352
|
A(i.$slots, "default")
|
|
4348
4353
|
], 16);
|
|
4349
4354
|
}
|
|
4350
|
-
const
|
|
4355
|
+
const li = /* @__PURE__ */ j(oi, [["render", ai]]), hi = C({
|
|
4351
4356
|
name: "tg-marker",
|
|
4352
4357
|
mixins: [w],
|
|
4353
4358
|
inheritAttrs: !1,
|
|
@@ -4364,10 +4369,10 @@ const ni = /* @__PURE__ */ Z(ii, [["render", si]]), oi = C({
|
|
|
4364
4369
|
},
|
|
4365
4370
|
setup(i, { attrs: e }) {
|
|
4366
4371
|
return {
|
|
4367
|
-
attrs:
|
|
4372
|
+
attrs: U(e),
|
|
4368
4373
|
marker: void 0,
|
|
4369
|
-
label:
|
|
4370
|
-
info:
|
|
4374
|
+
label: Le(),
|
|
4375
|
+
info: Le()
|
|
4371
4376
|
};
|
|
4372
4377
|
},
|
|
4373
4378
|
watch: {
|
|
@@ -4381,7 +4386,7 @@ const ni = /* @__PURE__ */ Z(ii, [["render", si]]), oi = C({
|
|
|
4381
4386
|
i ? this.marker.setIcon(i) : this.recreate();
|
|
4382
4387
|
},
|
|
4383
4388
|
clickable(i) {
|
|
4384
|
-
this.marker instanceof
|
|
4389
|
+
this.marker instanceof ce ? this.recreate() : this.marker.setClickable(i);
|
|
4385
4390
|
},
|
|
4386
4391
|
draggable(i) {
|
|
4387
4392
|
this.marker.setDraggable(i);
|
|
@@ -4393,7 +4398,7 @@ const ni = /* @__PURE__ */ Z(ii, [["render", si]]), oi = C({
|
|
|
4393
4398
|
this.recreate();
|
|
4394
4399
|
},
|
|
4395
4400
|
zIndex(i) {
|
|
4396
|
-
this.marker instanceof
|
|
4401
|
+
this.marker instanceof ce ? this.recreate() : this.marker.setZIndex(i);
|
|
4397
4402
|
},
|
|
4398
4403
|
visible(i) {
|
|
4399
4404
|
this.marker.setVisible(i);
|
|
@@ -4407,7 +4412,7 @@ const ni = /* @__PURE__ */ Z(ii, [["render", si]]), oi = C({
|
|
|
4407
4412
|
},
|
|
4408
4413
|
methods: {
|
|
4409
4414
|
$clusterer() {
|
|
4410
|
-
return
|
|
4415
|
+
return pe(this.$parent, jt);
|
|
4411
4416
|
},
|
|
4412
4417
|
onAddLabel(i) {
|
|
4413
4418
|
this.label = i, this.marker && this.marker.setLabel(i.overlay);
|
|
@@ -4426,14 +4431,14 @@ const ni = /* @__PURE__ */ Z(ii, [["render", si]]), oi = C({
|
|
|
4426
4431
|
}
|
|
4427
4432
|
}
|
|
4428
4433
|
});
|
|
4429
|
-
function
|
|
4430
|
-
return
|
|
4434
|
+
function ci(i, e, t, r, s, n) {
|
|
4435
|
+
return Z(), G("div", ie({
|
|
4431
4436
|
class: i.$options.name
|
|
4432
4437
|
}, i.attrs.binds), [
|
|
4433
4438
|
A(i.$slots, "default")
|
|
4434
4439
|
], 16);
|
|
4435
4440
|
}
|
|
4436
|
-
const we = /* @__PURE__ */
|
|
4441
|
+
const we = /* @__PURE__ */ j(hi, [["render", ci]]), di = C({
|
|
4437
4442
|
name: "tg-info-box",
|
|
4438
4443
|
mixins: [w],
|
|
4439
4444
|
inheritAttrs: !1,
|
|
@@ -4443,11 +4448,13 @@ const we = /* @__PURE__ */ Z(oi, [["render", ai]]), li = C({
|
|
|
4443
4448
|
offset: m(Object),
|
|
4444
4449
|
maxWidth: m(Number),
|
|
4445
4450
|
borderClass: m(String),
|
|
4446
|
-
zIndex: m(Number)
|
|
4451
|
+
zIndex: m(Number),
|
|
4452
|
+
"onUpdate:show": N()
|
|
4447
4453
|
},
|
|
4454
|
+
emits: void 0,
|
|
4448
4455
|
setup(i, { attrs: e }) {
|
|
4449
4456
|
return {
|
|
4450
|
-
attrs:
|
|
4457
|
+
attrs: U(e, i),
|
|
4451
4458
|
overlay: void 0
|
|
4452
4459
|
};
|
|
4453
4460
|
},
|
|
@@ -4472,7 +4479,7 @@ const we = /* @__PURE__ */ Z(oi, [["render", ai]]), li = C({
|
|
|
4472
4479
|
}
|
|
4473
4480
|
},
|
|
4474
4481
|
onCreate() {
|
|
4475
|
-
this.overlay = this.$map.createInfoBox(this.getOptions()), this.$marker() ? this.$marker().onAddInfo(this) : this.show && this.overlay.open(), "update:show" in this.attrs.
|
|
4482
|
+
this.overlay = this.$map.createInfoBox(this.getOptions()), this.$marker() ? this.$marker().onAddInfo(this) : this.show && this.overlay.open(), "update:show" in this.attrs.listenerProps && this.overlay.addEventListener("closeclick", () => {
|
|
4476
4483
|
this.$emit("update:show", !1);
|
|
4477
4484
|
}), F(this.attrs.listeners, this.overlay);
|
|
4478
4485
|
},
|
|
@@ -4494,7 +4501,7 @@ const we = /* @__PURE__ */ Z(oi, [["render", ai]]), li = C({
|
|
|
4494
4501
|
return this.$el;
|
|
4495
4502
|
},
|
|
4496
4503
|
$marker() {
|
|
4497
|
-
return
|
|
4504
|
+
return pe(this.$parent, we);
|
|
4498
4505
|
},
|
|
4499
4506
|
open(i) {
|
|
4500
4507
|
this.overlay.open(i);
|
|
@@ -4504,14 +4511,14 @@ const we = /* @__PURE__ */ Z(oi, [["render", ai]]), li = C({
|
|
|
4504
4511
|
}
|
|
4505
4512
|
}
|
|
4506
4513
|
});
|
|
4507
|
-
function
|
|
4508
|
-
return
|
|
4514
|
+
function pi(i, e, t, r, s, n) {
|
|
4515
|
+
return Z(), G("div", ie({
|
|
4509
4516
|
class: i.$options.name
|
|
4510
4517
|
}, i.attrs.binds), [
|
|
4511
4518
|
A(i.$slots, "default")
|
|
4512
4519
|
], 16);
|
|
4513
4520
|
}
|
|
4514
|
-
const
|
|
4521
|
+
const ui = /* @__PURE__ */ j(di, [["render", pi]]), gi = C({
|
|
4515
4522
|
name: "tg-info-window",
|
|
4516
4523
|
mixins: [w],
|
|
4517
4524
|
inheritAttrs: !1,
|
|
@@ -4524,7 +4531,7 @@ const ci = /* @__PURE__ */ Z(li, [["render", hi]]), di = C({
|
|
|
4524
4531
|
},
|
|
4525
4532
|
setup(i, { attrs: e }) {
|
|
4526
4533
|
return {
|
|
4527
|
-
attrs:
|
|
4534
|
+
attrs: U(e),
|
|
4528
4535
|
overlay: void 0
|
|
4529
4536
|
};
|
|
4530
4537
|
},
|
|
@@ -4550,7 +4557,7 @@ const ci = /* @__PURE__ */ Z(li, [["render", hi]]), di = C({
|
|
|
4550
4557
|
return this.$el;
|
|
4551
4558
|
},
|
|
4552
4559
|
$marker() {
|
|
4553
|
-
return
|
|
4560
|
+
return pe(this.$parent, we);
|
|
4554
4561
|
},
|
|
4555
4562
|
getOptions() {
|
|
4556
4563
|
return {
|
|
@@ -4573,16 +4580,16 @@ const ci = /* @__PURE__ */ Z(li, [["render", hi]]), di = C({
|
|
|
4573
4580
|
this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
|
|
4574
4581
|
}
|
|
4575
4582
|
});
|
|
4576
|
-
function
|
|
4577
|
-
return
|
|
4583
|
+
function mi(i, e, t, r, s, n) {
|
|
4584
|
+
return Yt((Z(), G("div", ie({
|
|
4578
4585
|
class: i.$options.name
|
|
4579
4586
|
}, i.attrs.binds), [
|
|
4580
4587
|
A(i.$slots, "default")
|
|
4581
4588
|
], 16)), [
|
|
4582
|
-
[
|
|
4589
|
+
[Kt, i.show]
|
|
4583
4590
|
]);
|
|
4584
4591
|
}
|
|
4585
|
-
const
|
|
4592
|
+
const fi = /* @__PURE__ */ j(gi, [["render", mi]]), yi = C({
|
|
4586
4593
|
name: "tg-label",
|
|
4587
4594
|
mixins: [w],
|
|
4588
4595
|
inheritAttrs: !1,
|
|
@@ -4593,7 +4600,7 @@ const ui = /* @__PURE__ */ Z(di, [["render", pi]]), gi = C({
|
|
|
4593
4600
|
},
|
|
4594
4601
|
setup(i, { attrs: e }) {
|
|
4595
4602
|
return {
|
|
4596
|
-
attrs:
|
|
4603
|
+
attrs: U(e),
|
|
4597
4604
|
overlay: void 0
|
|
4598
4605
|
};
|
|
4599
4606
|
},
|
|
@@ -4620,7 +4627,7 @@ const ui = /* @__PURE__ */ Z(di, [["render", pi]]), gi = C({
|
|
|
4620
4627
|
return (i = this.$marker()) == null ? void 0 : i.marker;
|
|
4621
4628
|
},
|
|
4622
4629
|
$marker() {
|
|
4623
|
-
return
|
|
4630
|
+
return pe(this.$parent, we);
|
|
4624
4631
|
},
|
|
4625
4632
|
getOptions() {
|
|
4626
4633
|
return {
|
|
@@ -4638,14 +4645,14 @@ const ui = /* @__PURE__ */ Z(di, [["render", pi]]), gi = C({
|
|
|
4638
4645
|
this.$marker() ? this.$marker().onRemoveLabel(this) : this.$map.removeOverlay(this.overlay);
|
|
4639
4646
|
}
|
|
4640
4647
|
});
|
|
4641
|
-
function
|
|
4642
|
-
return
|
|
4648
|
+
function vi(i, e, t, r, s, n) {
|
|
4649
|
+
return Z(), G("div", ie({
|
|
4643
4650
|
class: i.$options.name
|
|
4644
4651
|
}, i.attrs.binds), [
|
|
4645
4652
|
A(i.$slots, "default")
|
|
4646
4653
|
], 16);
|
|
4647
4654
|
}
|
|
4648
|
-
const
|
|
4655
|
+
const _i = /* @__PURE__ */ j(yi, [["render", vi]]), Mi = C({
|
|
4649
4656
|
name: "tg-polygon",
|
|
4650
4657
|
mixins: [w],
|
|
4651
4658
|
inheritAttrs: !1,
|
|
@@ -4662,7 +4669,7 @@ const fi = /* @__PURE__ */ Z(gi, [["render", mi]]), yi = C({
|
|
|
4662
4669
|
},
|
|
4663
4670
|
setup(i, { attrs: e }) {
|
|
4664
4671
|
return {
|
|
4665
|
-
attrs:
|
|
4672
|
+
attrs: U(e),
|
|
4666
4673
|
polygon: void 0
|
|
4667
4674
|
};
|
|
4668
4675
|
},
|
|
@@ -4704,7 +4711,7 @@ const fi = /* @__PURE__ */ Z(gi, [["render", mi]]), yi = C({
|
|
|
4704
4711
|
onDestroy() {
|
|
4705
4712
|
this.$map.removeOverlay(this.polygon);
|
|
4706
4713
|
}
|
|
4707
|
-
}),
|
|
4714
|
+
}), bi = C({
|
|
4708
4715
|
name: "tg-polyline",
|
|
4709
4716
|
mixins: [w],
|
|
4710
4717
|
inheritAttrs: !1,
|
|
@@ -4719,7 +4726,7 @@ const fi = /* @__PURE__ */ Z(gi, [["render", mi]]), yi = C({
|
|
|
4719
4726
|
},
|
|
4720
4727
|
setup(i, { attrs: e }) {
|
|
4721
4728
|
return {
|
|
4722
|
-
attrs:
|
|
4729
|
+
attrs: U(e),
|
|
4723
4730
|
polyline: void 0
|
|
4724
4731
|
};
|
|
4725
4732
|
},
|
|
@@ -4755,14 +4762,14 @@ const fi = /* @__PURE__ */ Z(gi, [["render", mi]]), yi = C({
|
|
|
4755
4762
|
onDestroy() {
|
|
4756
4763
|
this.$map.removeOverlay(this.polyline);
|
|
4757
4764
|
}
|
|
4758
|
-
}),
|
|
4765
|
+
}), Ti = ["beforeUpdate", "updated"], Di = {
|
|
4759
4766
|
install(i, e = {}) {
|
|
4760
4767
|
if (e.enable !== !1) {
|
|
4761
4768
|
const t = C({
|
|
4762
4769
|
beforeCreate() {
|
|
4763
4770
|
const r = this.$options.name || this.$options._componentTag || "", n = (e.nameRegex || /^[A-Z]/).test(r) ? (a) => {
|
|
4764
|
-
e.hookNames ? e.hookNames.includes(a) && console.debug("[lifecycle]", r, a) :
|
|
4765
|
-
} :
|
|
4771
|
+
e.hookNames ? e.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : Ti.includes(a) || console.debug("[lifecycle]", r, a);
|
|
4772
|
+
} : ve;
|
|
4766
4773
|
n("beforeCreate"), this.__life_impl = n;
|
|
4767
4774
|
},
|
|
4768
4775
|
created() {
|
|
@@ -4801,113 +4808,131 @@ const fi = /* @__PURE__ */ Z(gi, [["render", mi]]), yi = C({
|
|
|
4801
4808
|
i.mixin(t);
|
|
4802
4809
|
}
|
|
4803
4810
|
}
|
|
4804
|
-
}
|
|
4811
|
+
};
|
|
4812
|
+
var Mt;
|
|
4813
|
+
((i) => {
|
|
4814
|
+
function e(r, s) {
|
|
4815
|
+
if (r !== void 0)
|
|
4816
|
+
return Object.values(s).includes(r) ? r : void 0;
|
|
4817
|
+
}
|
|
4818
|
+
i.toEnumOrNull = e;
|
|
4819
|
+
function t(r) {
|
|
4820
|
+
return r.split(`
|
|
4821
|
+
`).map((s) => s.trim()).join(`
|
|
4822
|
+
`);
|
|
4823
|
+
}
|
|
4824
|
+
i.trimIndent = t;
|
|
4825
|
+
})(Mt || (Mt = {}));
|
|
4826
|
+
const Zi = {
|
|
4805
4827
|
install(i, e) {
|
|
4806
|
-
|
|
4807
|
-
const t = /* @__PURE__ */ Object.assign({ "./TgMap.vue":
|
|
4828
|
+
gr(e);
|
|
4829
|
+
const t = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Gt, "./TgMapWidget.vue": Ur, "./controls/TgCustomControl.vue": qr, "./controls/TgMapTypeControl.vue": Xr, "./controls/TgScaleControl.vue": Jr, "./controls/TgZoomControl.vue": Qr, "./extra/TgMarkerClusterer.vue": jt, "./layers/TgTrafficLayer.vue": ri, "./overlays/TgCircle.vue": ii, "./overlays/TgElementOverlay.vue": li, "./overlays/TgInfoBox.vue": ui, "./overlays/TgInfoWindow.vue": fi, "./overlays/TgLabel.vue": _i, "./overlays/TgMarker.vue": we, "./overlays/TgPolygon.vue": Mi, "./overlays/TgPolyline.vue": bi });
|
|
4808
4830
|
Object.keys(t).forEach((s) => {
|
|
4809
4831
|
const n = t[s];
|
|
4810
4832
|
i.component(n.name ?? x(`Tg开头的组件必须设置name: ${s}`), n);
|
|
4811
4833
|
});
|
|
4812
4834
|
const r = i.config.optionMergeStrategies;
|
|
4813
|
-
r[
|
|
4835
|
+
r[ze] = r[Ne] = (s, n) => s ? [...new Set([].concat(s, n))] : n;
|
|
4814
4836
|
}
|
|
4815
4837
|
};
|
|
4816
4838
|
export {
|
|
4817
|
-
|
|
4839
|
+
At as AbstractControl,
|
|
4818
4840
|
Ze as AbstractMap,
|
|
4819
|
-
|
|
4841
|
+
be as Arrays,
|
|
4820
4842
|
Ke as BaiduCircle,
|
|
4821
4843
|
Xe as BaiduControl,
|
|
4822
4844
|
ct as BaiduInfoBoxOverlay,
|
|
4823
4845
|
ot as BaiduInfoWindow,
|
|
4824
4846
|
Qe as BaiduMapTypeControl,
|
|
4825
|
-
|
|
4826
|
-
|
|
4847
|
+
ce as BaiduMarker,
|
|
4848
|
+
br as BaiduMarkerClusterer,
|
|
4827
4849
|
Ce as BaiduOverlay,
|
|
4828
4850
|
Ue as BaiduPolygon,
|
|
4829
4851
|
He as BaiduPolyline,
|
|
4830
4852
|
rt as BaiduScaleControl,
|
|
4831
4853
|
et as BaiduZoomControl,
|
|
4832
|
-
|
|
4854
|
+
vt as CachedValue,
|
|
4833
4855
|
E as ControlPosition,
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4856
|
+
I as ControlPositionConverter,
|
|
4857
|
+
q as CoordType,
|
|
4858
|
+
wr as CustomControl,
|
|
4859
|
+
Cr as FastFindValues,
|
|
4838
4860
|
qe as GoogleCircle,
|
|
4839
4861
|
Je as GoogleControl,
|
|
4840
4862
|
dt as GoogleInfoBoxOverlay,
|
|
4841
4863
|
at as GoogleInfoWindow,
|
|
4842
|
-
|
|
4864
|
+
fe as GoogleMapTypeControl,
|
|
4843
4865
|
st as GoogleMarker,
|
|
4844
|
-
|
|
4866
|
+
Tr as GoogleMarkerClusterer,
|
|
4845
4867
|
je as GoogleOverlay,
|
|
4846
4868
|
Ye as GooglePolygon,
|
|
4847
4869
|
Fe as GooglePolyline,
|
|
4848
4870
|
it as GoogleScaleControl,
|
|
4849
4871
|
tt as GoogleZoomControl,
|
|
4850
|
-
|
|
4872
|
+
te as Icon,
|
|
4851
4873
|
nt as InfoWindow,
|
|
4852
|
-
|
|
4874
|
+
yt as KeyValue,
|
|
4853
4875
|
y as LatLng,
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4876
|
+
V as LatLngBounds,
|
|
4877
|
+
Di as LifecycleLogPlugin,
|
|
4878
|
+
ze as MIXIN_HOOK_CREATE,
|
|
4879
|
+
Ne as MIXIN_HOOK_DESTROY,
|
|
4880
|
+
Zt as MIXIN_MAP_NAME,
|
|
4881
|
+
Te as MVCArrays,
|
|
4860
4882
|
w as MapMixin,
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4883
|
+
Nt as MapTypeControlType,
|
|
4884
|
+
Bt as MarkerClusterer,
|
|
4885
|
+
he as Objects,
|
|
4886
|
+
$t as Overlay,
|
|
4887
|
+
de as Point,
|
|
4888
|
+
Mt as Strings,
|
|
4889
|
+
ii as TgCircle,
|
|
4890
|
+
qr as TgCustomControl,
|
|
4891
|
+
li as TgElementOverlay,
|
|
4892
|
+
ui as TgInfoBox,
|
|
4893
|
+
fi as TgInfoWindow,
|
|
4894
|
+
_i as TgLabel,
|
|
4895
|
+
Gt as TgMap,
|
|
4896
|
+
Ae as TgMapFactory,
|
|
4875
4897
|
$ as TgMapType,
|
|
4876
|
-
|
|
4877
|
-
|
|
4898
|
+
Xr as TgMapTypeControl,
|
|
4899
|
+
Ur as TgMapWidget,
|
|
4878
4900
|
we as TgMarker,
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
Pi as
|
|
4899
|
-
|
|
4901
|
+
jt as TgMarkerClusterer,
|
|
4902
|
+
Mi as TgPolygon,
|
|
4903
|
+
bi as TgPolyline,
|
|
4904
|
+
Jr as TgScaleControl,
|
|
4905
|
+
ri as TgTrafficLayer,
|
|
4906
|
+
Qr as TgZoomControl,
|
|
4907
|
+
me as callHook,
|
|
4908
|
+
$i as computedSaveOnThis,
|
|
4909
|
+
Dr as createEmptyVNode,
|
|
4910
|
+
Rr as createPropertyObject,
|
|
4911
|
+
Ai as createPropertyObjectTyped,
|
|
4912
|
+
xi as debug,
|
|
4913
|
+
Zi as default,
|
|
4914
|
+
Ri as eventLogMethods,
|
|
4915
|
+
N as eventProp,
|
|
4916
|
+
Ni as extractVNodeFromSlotsByComponent,
|
|
4917
|
+
zi as findByComponentType,
|
|
4918
|
+
xt as getTgMapConfig,
|
|
4919
|
+
Ei as isDef,
|
|
4920
|
+
Pi as isInstanceOf,
|
|
4921
|
+
ki as lateinit,
|
|
4922
|
+
ve as noop,
|
|
4900
4923
|
m as optionalProp,
|
|
4901
4924
|
z as requiredProp,
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4925
|
+
Ii as safeAs,
|
|
4926
|
+
pe as safeAsComponent,
|
|
4927
|
+
gr as setTgMapConfig,
|
|
4928
|
+
Zr as splitAttrs,
|
|
4929
|
+
D as stringEnumProp,
|
|
4930
|
+
Nr as stringUnionPropFromValues,
|
|
4908
4931
|
x as throwError,
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4932
|
+
Qt as throwUnsupported,
|
|
4933
|
+
wi as todo,
|
|
4934
|
+
Le as typed,
|
|
4935
|
+
Li as unwrapStringEnumValue,
|
|
4936
|
+
U as useSplittedAttrs
|
|
4912
4937
|
};
|
|
4913
4938
|
//# sourceMappingURL=tg-map.js.map
|