tg-map-vue3 3.0.7 → 3.0.9
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 +38 -35
- 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/TgElementOverlay.vue.d.ts +3 -3
- package/dist/src/map/map/baidu-map.d.ts +2 -2
- package/dist/src/map/map/map-options.d.ts +1 -2
- 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 +3 -3
- package/dist/tg-map.js +590 -591
- 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
|
@@ -2,169 +2,31 @@
|
|
|
2
2
|
var jt = Object.defineProperty;
|
|
3
3
|
var Wt = (i, e, t) => e in i ? jt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
4
4
|
var h = (i, e, t) => (Wt(i, typeof e != "symbol" ? e + "" : e, t), 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;
|
|
5
|
+
import { createCommentVNode as Ie, defineComponent as C, computed as Vt, openBlock as D, createElementBlock as Z, mergeProps as re, createElementVNode as Ht, renderSlot as A, normalizeClass as Ne, normalizeStyle as Ft, withDirectives as Ut, vShow as Yt } from "vue";
|
|
6
|
+
function V(i, e, t) {
|
|
7
|
+
Object.keys(i).forEach((r) => {
|
|
8
|
+
r.startsWith("update:") || t != null && t.includes(r) || e.addEventListener(r, i[r]);
|
|
9
|
+
});
|
|
78
10
|
}
|
|
79
|
-
|
|
80
|
-
|
|
11
|
+
let Kt = 1;
|
|
12
|
+
function qt() {
|
|
13
|
+
return Kt++;
|
|
81
14
|
}
|
|
82
|
-
function
|
|
83
|
-
return
|
|
15
|
+
function fe(i, e) {
|
|
16
|
+
return e.__id__ || (e.__id__ = qt()), `${i}::${e.__id__}`;
|
|
84
17
|
}
|
|
85
|
-
|
|
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;
|
|
95
|
-
}
|
|
96
|
-
function ki(i, e) {
|
|
97
|
-
if (!i.default)
|
|
98
|
-
return;
|
|
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;
|
|
103
|
-
}
|
|
104
|
-
function V(i) {
|
|
105
|
-
const e = {}, t = {};
|
|
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
|
-
};
|
|
112
|
-
}
|
|
113
|
-
const Ii = {
|
|
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 Mt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, j = {}, Xt = {
|
|
157
19
|
get exports() {
|
|
158
|
-
return
|
|
20
|
+
return j;
|
|
159
21
|
},
|
|
160
22
|
set exports(i) {
|
|
161
|
-
|
|
23
|
+
j = i;
|
|
162
24
|
}
|
|
163
25
|
};
|
|
164
26
|
(function(i) {
|
|
165
27
|
(function(e, t) {
|
|
166
28
|
i.exports ? i.exports = t() : e.coordtransform = t();
|
|
167
|
-
})(
|
|
29
|
+
})(Mt, function() {
|
|
168
30
|
var e = 52.35987755982988, t = 3.141592653589793, r = 6378245, s = 0.006693421622965943;
|
|
169
31
|
function n(p, f, v, O) {
|
|
170
32
|
this.west = Math.min(p, v), this.north = Math.max(f, O), this.east = Math.max(p, v), this.south = Math.min(f, O);
|
|
@@ -199,8 +61,8 @@ 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, U = Math.sqrt(v * v + O * O) - 2e-5 * Math.sin(O * e), B = Math.atan2(O, v) - 3e-6 * Math.cos(v * e), pe = U * Math.cos(B),
|
|
203
|
-
return [pe,
|
|
64
|
+
var v = p - 65e-4, O = f - 6e-3, U = Math.sqrt(v * v + O * O) - 2e-5 * Math.sin(O * e), B = Math.atan2(O, v) - 3e-6 * Math.cos(v * e), pe = U * Math.cos(B), we = U * Math.sin(B);
|
|
65
|
+
return [pe, we];
|
|
204
66
|
}
|
|
205
67
|
function c(p, f) {
|
|
206
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), U = v * Math.cos(O) + 65e-4, B = v * Math.sin(O) + 6e-3;
|
|
@@ -220,8 +82,8 @@ var Tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
220
82
|
B = 1 - s * B * B;
|
|
221
83
|
var pe = Math.sqrt(B);
|
|
222
84
|
v = v * 180 / (r * (1 - s) / (B * pe) * t), O = O * 180 / (r / pe * Math.cos(U) * t);
|
|
223
|
-
var
|
|
224
|
-
return [Gt,
|
|
85
|
+
var we = f + v, Gt = p + O;
|
|
86
|
+
return [Gt, we];
|
|
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,16 +118,33 @@ var Tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
256
118
|
}
|
|
257
119
|
};
|
|
258
120
|
});
|
|
259
|
-
})(
|
|
121
|
+
})(Xt);
|
|
122
|
+
function x(i) {
|
|
123
|
+
throw new Error(i);
|
|
124
|
+
}
|
|
125
|
+
function Jt(i) {
|
|
126
|
+
throw new Error(`Unsupported: ${i}`);
|
|
127
|
+
}
|
|
128
|
+
function Ti(i) {
|
|
129
|
+
throw new Error(`todo: ${i}`);
|
|
130
|
+
}
|
|
131
|
+
function Oi(i) {
|
|
132
|
+
return i;
|
|
133
|
+
}
|
|
134
|
+
function ye(...i) {
|
|
135
|
+
}
|
|
136
|
+
function Ci(i) {
|
|
137
|
+
return i != null;
|
|
138
|
+
}
|
|
260
139
|
function oe(i, e) {
|
|
261
140
|
if (!i)
|
|
262
141
|
throw new Error(`AssertionError: ${e}`);
|
|
263
142
|
}
|
|
264
|
-
function
|
|
143
|
+
function dt(i) {
|
|
265
144
|
throw new Error(`Unexpected object: ${i}`);
|
|
266
145
|
}
|
|
267
146
|
var K = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(K || {});
|
|
268
|
-
const
|
|
147
|
+
const xe = "wgs84", S = class {
|
|
269
148
|
constructor(e, t, r) {
|
|
270
149
|
this.lat = e, this.lng = t, this.coord = r;
|
|
271
150
|
}
|
|
@@ -281,12 +160,12 @@ const Ee = "wgs84", S = class {
|
|
|
281
160
|
return new S(e.lat, e.lng, t);
|
|
282
161
|
}
|
|
283
162
|
static fromLiteral(e) {
|
|
284
|
-
return new S(e.lat, e.lng, e.coord ||
|
|
163
|
+
return new S(e.lat, e.lng, e.coord || xe);
|
|
285
164
|
}
|
|
286
|
-
static fromLngLat(e, t, r =
|
|
165
|
+
static fromLngLat(e, t, r = xe) {
|
|
287
166
|
return new S(t, e, r);
|
|
288
167
|
}
|
|
289
|
-
static create(e, t, r =
|
|
168
|
+
static create(e, t, r = xe) {
|
|
290
169
|
return new S(e, t, r);
|
|
291
170
|
}
|
|
292
171
|
to(e) {
|
|
@@ -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" ? j.bd09ToGcj02(this.lng, this.lat) : j.bd09ToWgs84(this.lng, this.lat);
|
|
322
201
|
case "gcj02":
|
|
323
|
-
return e === "wgs84" ?
|
|
202
|
+
return e === "wgs84" ? j.gcj02ToWgs84(this.lng, this.lat) : j.gcj02ToBd09(this.lng, this.lat);
|
|
324
203
|
case "wgs84":
|
|
325
|
-
return e === "bd09" ?
|
|
204
|
+
return e === "bd09" ? j.wgs84ToBd09(this.lng, this.lat) : j.wgs84ToGcj02(this.lng, this.lat);
|
|
326
205
|
}
|
|
327
206
|
throw new Error(`不支持的坐标转换: ${this.coord}=>${e}`);
|
|
328
207
|
}
|
|
@@ -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 W = Y;
|
|
284
|
+
h(W, "EMPTY", new Y(y.ZERO, y.ZERO));
|
|
406
285
|
((i) => {
|
|
407
286
|
class e {
|
|
408
287
|
constructor(r) {
|
|
@@ -430,16 +309,113 @@ h(j, "EMPTY", new Y(y.ZERO, y.ZERO));
|
|
|
430
309
|
}
|
|
431
310
|
}
|
|
432
311
|
i.Builder = e;
|
|
433
|
-
})(
|
|
434
|
-
function
|
|
312
|
+
})(W || (W = {}));
|
|
313
|
+
var Qt = function(e) {
|
|
314
|
+
return er(e) && !tr(e);
|
|
315
|
+
};
|
|
316
|
+
function er(i) {
|
|
317
|
+
return !!i && typeof i == "object";
|
|
435
318
|
}
|
|
436
|
-
function
|
|
319
|
+
function tr(i) {
|
|
320
|
+
var e = Object.prototype.toString.call(i);
|
|
321
|
+
return e === "[object RegExp]" || e === "[object Date]" || sr(i);
|
|
322
|
+
}
|
|
323
|
+
var rr = typeof Symbol == "function" && Symbol.for, ir = rr ? Symbol.for("react.element") : 60103;
|
|
324
|
+
function sr(i) {
|
|
325
|
+
return i.$$typeof === ir;
|
|
326
|
+
}
|
|
327
|
+
function nr(i) {
|
|
328
|
+
return Array.isArray(i) ? [] : {};
|
|
329
|
+
}
|
|
330
|
+
function ae(i, e) {
|
|
331
|
+
return e.clone !== !1 && e.isMergeableObject(i) ? Q(nr(i), i, e) : i;
|
|
332
|
+
}
|
|
333
|
+
function or(i, e, t) {
|
|
334
|
+
return i.concat(e).map(function(r) {
|
|
335
|
+
return ae(r, t);
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
function ar(i, e) {
|
|
339
|
+
if (!e.customMerge)
|
|
340
|
+
return Q;
|
|
341
|
+
var t = e.customMerge(i);
|
|
342
|
+
return typeof t == "function" ? t : Q;
|
|
343
|
+
}
|
|
344
|
+
function lr(i) {
|
|
345
|
+
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(e) {
|
|
346
|
+
return Object.propertyIsEnumerable.call(i, e);
|
|
347
|
+
}) : [];
|
|
348
|
+
}
|
|
349
|
+
function pt(i) {
|
|
350
|
+
return Object.keys(i).concat(lr(i));
|
|
351
|
+
}
|
|
352
|
+
function bt(i, e) {
|
|
353
|
+
try {
|
|
354
|
+
return e in i;
|
|
355
|
+
} catch {
|
|
356
|
+
return !1;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
function hr(i, e) {
|
|
360
|
+
return bt(i, e) && !(Object.hasOwnProperty.call(i, e) && Object.propertyIsEnumerable.call(i, e));
|
|
361
|
+
}
|
|
362
|
+
function cr(i, e, t) {
|
|
363
|
+
var r = {};
|
|
364
|
+
return t.isMergeableObject(i) && pt(i).forEach(function(s) {
|
|
365
|
+
r[s] = ae(i[s], t);
|
|
366
|
+
}), pt(e).forEach(function(s) {
|
|
367
|
+
hr(i, s) || (bt(i, s) && t.isMergeableObject(e[s]) ? r[s] = ar(s, t)(i[s], e[s], t) : r[s] = ae(e[s], t));
|
|
368
|
+
}), r;
|
|
369
|
+
}
|
|
370
|
+
function Q(i, e, t) {
|
|
371
|
+
t = t || {}, t.arrayMerge = t.arrayMerge || or, t.isMergeableObject = t.isMergeableObject || Qt, t.cloneUnlessOtherwiseSpecified = ae;
|
|
372
|
+
var r = Array.isArray(e), s = Array.isArray(i), n = r === s;
|
|
373
|
+
return n ? r ? t.arrayMerge(i, e, t) : cr(i, e, t) : ae(e, t);
|
|
374
|
+
}
|
|
375
|
+
Q.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 Q(r, s, t);
|
|
380
|
+
}, {});
|
|
381
|
+
};
|
|
382
|
+
var dr = Q, Tt = dr;
|
|
383
|
+
const ve = ["3.0"], pr = {
|
|
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: ve[0],
|
|
399
|
+
key: {}.VITE_APP_DEV_KEY_HERE,
|
|
400
|
+
language: ""
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
let Ot;
|
|
404
|
+
function Ct() {
|
|
405
|
+
return Ot || x("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
|
|
406
|
+
}
|
|
407
|
+
function ur(i) {
|
|
408
|
+
i != null && (Ot = Tt(pr, i));
|
|
409
|
+
}
|
|
410
|
+
function wi() {
|
|
411
|
+
}
|
|
412
|
+
function ut(i) {
|
|
437
413
|
return i;
|
|
438
414
|
}
|
|
439
|
-
function
|
|
415
|
+
function xi(i, e) {
|
|
440
416
|
return i instanceof e;
|
|
441
417
|
}
|
|
442
|
-
function
|
|
418
|
+
function Ei(i, e) {
|
|
443
419
|
if (i instanceof e)
|
|
444
420
|
return i;
|
|
445
421
|
}
|
|
@@ -447,12 +423,15 @@ function de(i, e) {
|
|
|
447
423
|
if ((i == null ? void 0 : i.$options.name) === e.name)
|
|
448
424
|
return i;
|
|
449
425
|
}
|
|
450
|
-
|
|
426
|
+
function ki(i) {
|
|
427
|
+
return i;
|
|
428
|
+
}
|
|
429
|
+
class Re {
|
|
451
430
|
constructor(e) {
|
|
452
431
|
h(this, "latestInfoWindow");
|
|
453
432
|
/** 使用{@link setEventTargetDelegate}初始化 */
|
|
454
433
|
h(this, "delegate", void 0);
|
|
455
|
-
this.element = e,
|
|
434
|
+
this.element = e, process.env.NODE_ENV !== "production" && setTimeout(() => {
|
|
456
435
|
this.delegate || console.warn(`${this.constructor.name}继承了AbstractMap, 但未调用setEventTargetDelegate(delegate)`);
|
|
457
436
|
});
|
|
458
437
|
}
|
|
@@ -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 gr(i) {
|
|
573
482
|
return i != null && typeof i == "object" && Array.isArray(i) === !1;
|
|
574
483
|
}
|
|
575
484
|
/*!
|
|
@@ -578,12 +487,12 @@ 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 gt(i) {
|
|
491
|
+
return gr(i) === !0 && Object.prototype.toString.call(i) === "[object Object]";
|
|
583
492
|
}
|
|
584
493
|
function wt(i) {
|
|
585
494
|
var e, t;
|
|
586
|
-
return !(
|
|
495
|
+
return !(gt(i) === !1 || (e = i.constructor, typeof e != "function") || (t = e.prototype, gt(t) === !1) || t.hasOwnProperty("isPrototypeOf") === !1);
|
|
587
496
|
}
|
|
588
497
|
var le;
|
|
589
498
|
((i) => {
|
|
@@ -607,29 +516,29 @@ var le;
|
|
|
607
516
|
i.deleteUndefinedPropertyOnPlainObjectDeeply = s;
|
|
608
517
|
})(le || (le = {}));
|
|
609
518
|
le.toJsonSafely;
|
|
610
|
-
var N = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(N || {}),
|
|
519
|
+
var N = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(N || {}), Pe;
|
|
611
520
|
((i) => {
|
|
612
521
|
function e(t) {
|
|
613
522
|
le.deleteUndefinedPropertyOnPlainObjectDeeply(t);
|
|
614
523
|
const r = { center: y.ZERO, zoom: 5 };
|
|
615
|
-
return
|
|
524
|
+
return Tt(r, t || {}, {
|
|
616
525
|
isMergeableObject: wt
|
|
617
526
|
});
|
|
618
527
|
}
|
|
619
528
|
i.create = e;
|
|
620
|
-
})(
|
|
621
|
-
var
|
|
529
|
+
})(Pe || (Pe = {}));
|
|
530
|
+
var Le = {}, mr = {
|
|
622
531
|
get exports() {
|
|
623
|
-
return
|
|
532
|
+
return Le;
|
|
624
533
|
},
|
|
625
534
|
set exports(i) {
|
|
626
|
-
|
|
535
|
+
Le = i;
|
|
627
536
|
}
|
|
628
537
|
};
|
|
629
538
|
(function(i, e) {
|
|
630
539
|
(function(t, r) {
|
|
631
540
|
i.exports = r();
|
|
632
|
-
})(
|
|
541
|
+
})(Mt, function() {
|
|
633
542
|
var t, r = t = r || { version: "1.3.8" }, s = {};
|
|
634
543
|
r.guid = "$BAIDU$", s[r.guid] = s[r.guid] || {}, r.dom = r.dom || {}, r.dom.g = function(o) {
|
|
635
544
|
return typeof o == "string" || o instanceof String ? document.getElementById(o) : o && o.nodeName && (o.nodeType == 1 || o.nodeType == 9) ? o : null;
|
|
@@ -818,18 +727,18 @@ var $e = {}, gr = {
|
|
|
818
727
|
});
|
|
819
728
|
}, g;
|
|
820
729
|
});
|
|
821
|
-
})(
|
|
822
|
-
const
|
|
730
|
+
})(mr);
|
|
731
|
+
const mt = Le;
|
|
823
732
|
var xt = function(i, e, t) {
|
|
824
|
-
e =
|
|
733
|
+
e = fr(e);
|
|
825
734
|
var r = i.pointToPixel(e.getNorthEast()), s = i.pointToPixel(e.getSouthWest());
|
|
826
735
|
r.x += t, r.y -= t, s.x -= t, s.y += t;
|
|
827
736
|
var n = i.pixelToPoint(r), a = i.pixelToPoint(s);
|
|
828
737
|
return new BMap.Bounds(a, n);
|
|
829
|
-
},
|
|
830
|
-
var e =
|
|
738
|
+
}, fr = function(i) {
|
|
739
|
+
var e = ue(i.getNorthEast().lng, -180, 180), t = ue(i.getSouthWest().lng, -180, 180), r = ue(i.getNorthEast().lat, -74, 74), s = ue(i.getSouthWest().lat, -74, 74);
|
|
831
740
|
return new BMap.Bounds(new BMap.Point(t, s), new BMap.Point(e, r));
|
|
832
|
-
},
|
|
741
|
+
}, ue = function(i, e, t) {
|
|
833
742
|
return e && (i = Math.max(i, e)), t && (i = Math.min(i, t)), i;
|
|
834
743
|
}, Et = function(i) {
|
|
835
744
|
return Object.prototype.toString.call(i) === "[object Array]";
|
|
@@ -999,7 +908,7 @@ _.prototype.setStylesIndexCalculator = function(i) {
|
|
|
999
908
|
};
|
|
1000
909
|
function L(i) {
|
|
1001
910
|
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
|
|
911
|
+
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 mt(this._center, this._markers.length, {
|
|
1003
912
|
styles: this._markerClusterer.getStyles(),
|
|
1004
913
|
zIndex: i._zIndex
|
|
1005
914
|
}), this._clusterMarker.getStyleByText = function(t, r) {
|
|
@@ -1007,7 +916,7 @@ function L(i) {
|
|
|
1007
916
|
var s = e._markerClusterer._stylesIndexCalculator(e._markers, r.length);
|
|
1008
917
|
return r[s];
|
|
1009
918
|
}
|
|
1010
|
-
return
|
|
919
|
+
return mt.prototype.getStyleByText.call(this, t, r);
|
|
1011
920
|
}, this._clusterMarker.addEventListener && this._clusterMarker.addEventListener("click", function(t) {
|
|
1012
921
|
e._map.setViewport(e.getBounds());
|
|
1013
922
|
});
|
|
@@ -1077,7 +986,7 @@ L.prototype.getBounds = function() {
|
|
|
1077
986
|
L.prototype.getCenter = function() {
|
|
1078
987
|
return this._center;
|
|
1079
988
|
};
|
|
1080
|
-
let
|
|
989
|
+
let yr = class It {
|
|
1081
990
|
constructor(e, t, r) {
|
|
1082
991
|
this.extend(It, 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
992
|
var s = r || {};
|
|
@@ -1498,7 +1407,7 @@ let fr = class It {
|
|
|
1498
1407
|
if (r && r.isMarkerInClusterBounds(e))
|
|
1499
1408
|
r.addMarker(e);
|
|
1500
1409
|
else {
|
|
1501
|
-
var o = new
|
|
1410
|
+
var o = new vr(this);
|
|
1502
1411
|
o.addMarker(e), this.clusters_.push(o);
|
|
1503
1412
|
}
|
|
1504
1413
|
}
|
|
@@ -1516,9 +1425,9 @@ let fr = class It {
|
|
|
1516
1425
|
!s.isAdded && this.isMarkerInBounds_(s, t) && this.addToClosestCluster_(s);
|
|
1517
1426
|
}
|
|
1518
1427
|
};
|
|
1519
|
-
class
|
|
1428
|
+
class vr {
|
|
1520
1429
|
constructor(e) {
|
|
1521
|
-
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
|
|
1430
|
+
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 De(
|
|
1522
1431
|
this,
|
|
1523
1432
|
e.getStyles(),
|
|
1524
1433
|
e.getGridSize()
|
|
@@ -1652,9 +1561,9 @@ class yr {
|
|
|
1652
1561
|
this.clusterIcon_.setCenter(this.center_), this.clusterIcon_.setSums(a), this.clusterIcon_.show();
|
|
1653
1562
|
}
|
|
1654
1563
|
}
|
|
1655
|
-
class
|
|
1564
|
+
class De {
|
|
1656
1565
|
constructor(e, t, r) {
|
|
1657
|
-
e.getMarkerClusterer().extend(
|
|
1566
|
+
e.getMarkerClusterer().extend(De, google.maps.OverlayView), this.styles_ = t, this.padding_ = r || 0, this.cluster_ = e, this.center_ = null, this.map_ = e.getMap(), this.div_ = null, this.sums_ = null, this.visible_ = !1, this.setMap(this.map_);
|
|
1658
1567
|
}
|
|
1659
1568
|
/**
|
|
1660
1569
|
* Triggers the clusterclick event and zoom's if the option is set.
|
|
@@ -1785,7 +1694,7 @@ class Ge {
|
|
|
1785
1694
|
), t.join("");
|
|
1786
1695
|
}
|
|
1787
1696
|
}
|
|
1788
|
-
var
|
|
1697
|
+
var _e;
|
|
1789
1698
|
((i) => {
|
|
1790
1699
|
function e(r) {
|
|
1791
1700
|
return {
|
|
@@ -1810,7 +1719,7 @@ var ve;
|
|
|
1810
1719
|
};
|
|
1811
1720
|
}
|
|
1812
1721
|
i.toGoogle = t;
|
|
1813
|
-
})(
|
|
1722
|
+
})(_e || (_e = {}));
|
|
1814
1723
|
class Pt {
|
|
1815
1724
|
constructor(e) {
|
|
1816
1725
|
h(this, "inner");
|
|
@@ -1837,7 +1746,7 @@ class Pt {
|
|
|
1837
1746
|
return this.inner.removeMarkers(e.map((t) => t.innerOverlay));
|
|
1838
1747
|
}
|
|
1839
1748
|
}
|
|
1840
|
-
class
|
|
1749
|
+
class _r extends Pt {
|
|
1841
1750
|
constructor(e, t) {
|
|
1842
1751
|
var s;
|
|
1843
1752
|
super(e), this.inner = new _(e.innerMap, {
|
|
@@ -1847,7 +1756,7 @@ class vr extends Pt {
|
|
|
1847
1756
|
maxZoom: t.maxZoom,
|
|
1848
1757
|
minClusterSize: t.minClusterSize,
|
|
1849
1758
|
isAverageCenter: t.averageCenter,
|
|
1850
|
-
styles: (s = t.styles) == null ? void 0 : s.map((n) =>
|
|
1759
|
+
styles: (s = t.styles) == null ? void 0 : s.map((n) => _e.toBaidu(n)),
|
|
1851
1760
|
zIndex: t.zIndex
|
|
1852
1761
|
});
|
|
1853
1762
|
const r = t.stylesIndexCalculator;
|
|
@@ -1857,10 +1766,10 @@ class vr extends Pt {
|
|
|
1857
1766
|
this.inner._redraw();
|
|
1858
1767
|
}
|
|
1859
1768
|
}
|
|
1860
|
-
class
|
|
1769
|
+
class Mr extends Pt {
|
|
1861
1770
|
constructor(e, t) {
|
|
1862
1771
|
var s, n;
|
|
1863
|
-
super(e), this.inner = new
|
|
1772
|
+
super(e), this.inner = new yr(
|
|
1864
1773
|
e.innerMap,
|
|
1865
1774
|
// google的构造器中的markers,不会触发重绘, 第一次绘制通过监听地图的'idle'事件触发, 可以直接设置
|
|
1866
1775
|
(s = t.markers) == null ? void 0 : s.map((a) => a.innerOverlay),
|
|
@@ -1869,7 +1778,7 @@ class _r extends Pt {
|
|
|
1869
1778
|
maxZoom: t.maxZoom,
|
|
1870
1779
|
minimumClusterSize: t.minClusterSize,
|
|
1871
1780
|
averageCenter: t.averageCenter,
|
|
1872
|
-
styles: (n = t.styles) == null ? void 0 : n.map((a) =>
|
|
1781
|
+
styles: (n = t.styles) == null ? void 0 : n.map((a) => _e.toGoogle(a)),
|
|
1873
1782
|
zIndex: t.zIndex
|
|
1874
1783
|
}
|
|
1875
1784
|
);
|
|
@@ -1884,18 +1793,6 @@ class _r extends Pt {
|
|
|
1884
1793
|
this.inner.repaint();
|
|
1885
1794
|
}
|
|
1886
1795
|
}
|
|
1887
|
-
function F(i, e, t) {
|
|
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
1796
|
var Me;
|
|
1900
1797
|
((i) => {
|
|
1901
1798
|
function e(r, s) {
|
|
@@ -1938,14 +1835,14 @@ class Lt {
|
|
|
1938
1835
|
return this.target = e, this;
|
|
1939
1836
|
}
|
|
1940
1837
|
}
|
|
1941
|
-
const
|
|
1838
|
+
const ct = class extends Lt {
|
|
1942
1839
|
addEventListener(e, t) {
|
|
1943
|
-
const r =
|
|
1840
|
+
const r = fe(e, t);
|
|
1944
1841
|
if (this.eventMap.get(r)) {
|
|
1945
1842
|
console.warn("listener已经添加过了", r, t);
|
|
1946
1843
|
return;
|
|
1947
1844
|
}
|
|
1948
|
-
const s = this.inner.addListener(
|
|
1845
|
+
const s = this.inner.addListener(ct.EVENT_TYPE_MAP[e] || e, (n) => {
|
|
1949
1846
|
const a = {
|
|
1950
1847
|
type: e,
|
|
1951
1848
|
target: this.target,
|
|
@@ -1956,11 +1853,11 @@ const pt = class extends Lt {
|
|
|
1956
1853
|
this.eventMap.set(r, s);
|
|
1957
1854
|
}
|
|
1958
1855
|
removeEventListener(e, t) {
|
|
1959
|
-
const r =
|
|
1856
|
+
const r = fe(e, t), s = this.eventMap.get(r);
|
|
1960
1857
|
s ? (s.remove(), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, t);
|
|
1961
1858
|
}
|
|
1962
1859
|
};
|
|
1963
|
-
let q =
|
|
1860
|
+
let q = ct;
|
|
1964
1861
|
// 事件类型映射: tg => google
|
|
1965
1862
|
h(q, "EVENT_TYPE_MAP", {
|
|
1966
1863
|
"center-changed": "center_changed",
|
|
@@ -1973,9 +1870,9 @@ h(q, "EVENT_TYPE_MAP", {
|
|
|
1973
1870
|
"map-mouseup": "mouseup",
|
|
1974
1871
|
"map-dblclick": "dblclick"
|
|
1975
1872
|
});
|
|
1976
|
-
const
|
|
1873
|
+
const Te = class extends Lt {
|
|
1977
1874
|
addEventListener(e, t) {
|
|
1978
|
-
const r =
|
|
1875
|
+
const r = fe(e, t);
|
|
1979
1876
|
if (this.eventMap.get(r)) {
|
|
1980
1877
|
console.warn("listener已经添加过了", r, t);
|
|
1981
1878
|
return;
|
|
@@ -1988,14 +1885,14 @@ const Oe = class extends Lt {
|
|
|
1988
1885
|
};
|
|
1989
1886
|
n.point && (a.position = y.fromBaidu(n.point, this.coordTypeSupplier.coordType)), t.call(this.target, a);
|
|
1990
1887
|
};
|
|
1991
|
-
this.inner.addEventListener(
|
|
1888
|
+
this.inner.addEventListener(Te.EVENT_TYPE_MAP[e] || e, s), this.eventMap.set(r, s);
|
|
1992
1889
|
}
|
|
1993
1890
|
removeEventListener(e, t) {
|
|
1994
|
-
const r =
|
|
1995
|
-
s ? (this.inner.removeEventListener(
|
|
1891
|
+
const r = fe(e, t), s = this.eventMap.get(r);
|
|
1892
|
+
s ? (this.inner.removeEventListener(Te.EVENT_TYPE_MAP[e] || e, s), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, t);
|
|
1996
1893
|
}
|
|
1997
1894
|
};
|
|
1998
|
-
let J =
|
|
1895
|
+
let J = Te;
|
|
1999
1896
|
// cSpell:words clickclose
|
|
2000
1897
|
// 事件类型映射, tg => baidu
|
|
2001
1898
|
h(J, "EVENT_TYPE_MAP", {
|
|
@@ -2004,7 +1901,7 @@ h(J, "EVENT_TYPE_MAP", {
|
|
|
2004
1901
|
"zoom-changed": "zoomend",
|
|
2005
1902
|
"map-type-changed": "maptypechange"
|
|
2006
1903
|
});
|
|
2007
|
-
class
|
|
1904
|
+
class br {
|
|
2008
1905
|
constructor() {
|
|
2009
1906
|
h(this, "typeMap", /* @__PURE__ */ new Map());
|
|
2010
1907
|
}
|
|
@@ -2035,7 +1932,7 @@ class Bt {
|
|
|
2035
1932
|
this.map.removeOverlay(this);
|
|
2036
1933
|
}
|
|
2037
1934
|
}
|
|
2038
|
-
class
|
|
1935
|
+
class Ze extends Bt {
|
|
2039
1936
|
constructor(e, t, r) {
|
|
2040
1937
|
super(e, t, r, new q(e, r));
|
|
2041
1938
|
}
|
|
@@ -2046,7 +1943,7 @@ class je extends Bt {
|
|
|
2046
1943
|
this.innerOverlay.setVisible(e);
|
|
2047
1944
|
}
|
|
2048
1945
|
}
|
|
2049
|
-
class
|
|
1946
|
+
class Oe extends Bt {
|
|
2050
1947
|
constructor(e, t, r) {
|
|
2051
1948
|
super(e, t, r, new J(e, r));
|
|
2052
1949
|
}
|
|
@@ -2065,7 +1962,7 @@ class Ce extends Bt {
|
|
|
2065
1962
|
return e !== void 0 && (e || this.setVisible(!1)), this;
|
|
2066
1963
|
}
|
|
2067
1964
|
}
|
|
2068
|
-
class
|
|
1965
|
+
class Ge extends Oe {
|
|
2069
1966
|
constructor(e, t, r, s) {
|
|
2070
1967
|
super(e, t, r), this.state = s;
|
|
2071
1968
|
}
|
|
@@ -2091,7 +1988,7 @@ class We extends Ce {
|
|
|
2091
1988
|
this.innerOverlay.setFillOpacity(e);
|
|
2092
1989
|
}
|
|
2093
1990
|
}
|
|
2094
|
-
class
|
|
1991
|
+
class je extends Ze {
|
|
2095
1992
|
isEditable() {
|
|
2096
1993
|
return this.innerOverlay.getEditable();
|
|
2097
1994
|
}
|
|
@@ -2114,7 +2011,7 @@ class Ve extends je {
|
|
|
2114
2011
|
this.innerOverlay.setOptions({ fillOpacity: e });
|
|
2115
2012
|
}
|
|
2116
2013
|
}
|
|
2117
|
-
class
|
|
2014
|
+
class We extends Ge {
|
|
2118
2015
|
static create(e) {
|
|
2119
2016
|
const t = this.coordType, r = new BMap.Polyline(e.path.map((s) => s.toBaidu(t)), {
|
|
2120
2017
|
enableClicking: e.clickable,
|
|
@@ -2123,7 +2020,7 @@ class He extends We {
|
|
|
2123
2020
|
strokeOpacity: e.strokeOpacity,
|
|
2124
2021
|
strokeWeight: e.strokeWeight
|
|
2125
2022
|
});
|
|
2126
|
-
return new
|
|
2023
|
+
return new We(r, t, this, { editable: e.editable === !0 }).visibleOptionInternal(e.visible);
|
|
2127
2024
|
}
|
|
2128
2025
|
getPath() {
|
|
2129
2026
|
return this.innerOverlay.getPath().map((e) => y.fromBaidu(e, this.coordType));
|
|
@@ -2132,7 +2029,7 @@ class He extends We {
|
|
|
2132
2029
|
this.coordType = this.map.coordType, this.innerOverlay.setPath(e.map((t) => t.toBaidu(this.coordType)));
|
|
2133
2030
|
}
|
|
2134
2031
|
}
|
|
2135
|
-
class
|
|
2032
|
+
class Ve extends je {
|
|
2136
2033
|
static create(e) {
|
|
2137
2034
|
const t = this.coordType, r = new google.maps.Polyline({
|
|
2138
2035
|
path: e.path.map((s) => s.toGoogle(t)),
|
|
@@ -2143,7 +2040,7 @@ class Fe extends Ve {
|
|
|
2143
2040
|
strokeWeight: e.strokeWeight,
|
|
2144
2041
|
visible: e.visible
|
|
2145
2042
|
});
|
|
2146
|
-
return new
|
|
2043
|
+
return new Ve(r, t, this);
|
|
2147
2044
|
}
|
|
2148
2045
|
getPath() {
|
|
2149
2046
|
const e = [];
|
|
@@ -2155,7 +2052,7 @@ class Fe extends Ve {
|
|
|
2155
2052
|
this.coordType = this.map.coordType, this.innerOverlay.setPath(e.map((t) => t.toGoogle(this.coordType)));
|
|
2156
2053
|
}
|
|
2157
2054
|
}
|
|
2158
|
-
class
|
|
2055
|
+
class He extends Ge {
|
|
2159
2056
|
static create(e) {
|
|
2160
2057
|
const t = this.coordType;
|
|
2161
2058
|
e.paths.length > 1 && console.warn("baidu不支持多path, 只会显示paths[0]");
|
|
@@ -2168,7 +2065,7 @@ class Ue extends We {
|
|
|
2168
2065
|
fillColor: e.fillColor,
|
|
2169
2066
|
fillOpacity: e.fillOpacity
|
|
2170
2067
|
});
|
|
2171
|
-
return new
|
|
2068
|
+
return new He(s, t, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
|
|
2172
2069
|
}
|
|
2173
2070
|
getPaths() {
|
|
2174
2071
|
return [this.innerOverlay.getPath().map((e) => y.fromBaidu(e, this.coordType))];
|
|
@@ -2177,7 +2074,7 @@ class Ue extends We {
|
|
|
2177
2074
|
e.length > 1 && console.warn("baidu不支持多path, 只会显示paths[0]"), this.coordType = this.map.coordType, this.innerOverlay.setPath((e[0] || []).map((t) => t.toBaidu(this.coordType)));
|
|
2178
2075
|
}
|
|
2179
2076
|
}
|
|
2180
|
-
class
|
|
2077
|
+
class Fe extends je {
|
|
2181
2078
|
static create(e) {
|
|
2182
2079
|
const t = this.coordType, r = new google.maps.Polygon({
|
|
2183
2080
|
paths: e.paths.map((s) => s.map((n) => n.toGoogle(t))),
|
|
@@ -2190,7 +2087,7 @@ class Ye extends Ve {
|
|
|
2190
2087
|
fillOpacity: e.fillOpacity,
|
|
2191
2088
|
visible: e.visible
|
|
2192
2089
|
});
|
|
2193
|
-
return new
|
|
2090
|
+
return new Fe(r, t, this);
|
|
2194
2091
|
}
|
|
2195
2092
|
getPaths() {
|
|
2196
2093
|
const e = this.innerOverlay.getPaths(), t = [];
|
|
@@ -2205,7 +2102,7 @@ class Ye extends Ve {
|
|
|
2205
2102
|
this.coordType = this.map.coordType, this.innerOverlay.setPaths(e.map((t) => t.map((r) => r.toGoogle(this.coordType))));
|
|
2206
2103
|
}
|
|
2207
2104
|
}
|
|
2208
|
-
class
|
|
2105
|
+
class Ue extends Ge {
|
|
2209
2106
|
static create(e) {
|
|
2210
2107
|
const t = this.coordType, r = new BMap.Circle(e.center.toBaidu(t), e.radius, {
|
|
2211
2108
|
enableClicking: e.clickable,
|
|
@@ -2216,7 +2113,7 @@ class Ke extends We {
|
|
|
2216
2113
|
fillColor: e.fillColor,
|
|
2217
2114
|
fillOpacity: e.fillOpacity
|
|
2218
2115
|
});
|
|
2219
|
-
return new
|
|
2116
|
+
return new Ue(r, t, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
|
|
2220
2117
|
}
|
|
2221
2118
|
setCenter(e) {
|
|
2222
2119
|
this.coordType = this.map.coordType, this.innerOverlay.setCenter(e.toBaidu(this.coordType));
|
|
@@ -2231,7 +2128,7 @@ class Ke extends We {
|
|
|
2231
2128
|
return this.innerOverlay.getRadius();
|
|
2232
2129
|
}
|
|
2233
2130
|
}
|
|
2234
|
-
class
|
|
2131
|
+
class Ye extends je {
|
|
2235
2132
|
static create(e) {
|
|
2236
2133
|
const t = this.coordType, r = new google.maps.Circle({
|
|
2237
2134
|
center: e.center.toGoogle(t),
|
|
@@ -2245,7 +2142,7 @@ class qe extends Ve {
|
|
|
2245
2142
|
fillOpacity: e.fillOpacity,
|
|
2246
2143
|
visible: e.visible
|
|
2247
2144
|
});
|
|
2248
|
-
return new
|
|
2145
|
+
return new Ye(r, t, this);
|
|
2249
2146
|
}
|
|
2250
2147
|
setCenter(e) {
|
|
2251
2148
|
this.coordType = this.map.coordType, this.innerOverlay.setCenter(e.toGoogle(this.coordType));
|
|
@@ -2260,7 +2157,7 @@ class qe extends Ve {
|
|
|
2260
2157
|
return this.innerOverlay.getRadius();
|
|
2261
2158
|
}
|
|
2262
2159
|
}
|
|
2263
|
-
class
|
|
2160
|
+
class ft {
|
|
2264
2161
|
/**
|
|
2265
2162
|
* `keys`和`values`数组中可以有相同的值, 若存在相同值, 则index越小的优先级越高
|
|
2266
2163
|
*/
|
|
@@ -2278,7 +2175,7 @@ class vt {
|
|
|
2278
2175
|
return this.keyToValue.get(e) ?? x();
|
|
2279
2176
|
}
|
|
2280
2177
|
}
|
|
2281
|
-
class
|
|
2178
|
+
class Tr {
|
|
2282
2179
|
constructor(e, t = 10) {
|
|
2283
2180
|
h(this, "map", /* @__PURE__ */ new Map());
|
|
2284
2181
|
this.values = e, this.maxSize4Debug = t;
|
|
@@ -2292,7 +2189,7 @@ class Or {
|
|
|
2292
2189
|
const s = this.values[r];
|
|
2293
2190
|
t.set(e.call(s), s);
|
|
2294
2191
|
}
|
|
2295
|
-
this.map.set(e, t),
|
|
2192
|
+
this.map.set(e, t), process.env.NODE_ENV !== "production" && this.map.size > this.maxSize4Debug && console.warn(`this.map的大小(${this.map.size})超过了设置的最大大小(${this.maxSize4Debug}), 这可能是由于你每次都创建新的keySelector造成的, 请保证相同功能的keySelector只创建一个对象`);
|
|
2296
2193
|
}
|
|
2297
2194
|
return t;
|
|
2298
2195
|
}
|
|
@@ -2307,7 +2204,7 @@ class Or {
|
|
|
2307
2204
|
return this.getOrNull(e, t) ?? x(`key(${t})不存在与valueMap(${this.getValueMap(e)})中`);
|
|
2308
2205
|
}
|
|
2309
2206
|
}
|
|
2310
|
-
class
|
|
2207
|
+
class yt {
|
|
2311
2208
|
constructor(e) {
|
|
2312
2209
|
h(this, "value");
|
|
2313
2210
|
this.creator = e;
|
|
@@ -2335,7 +2232,7 @@ var E = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
2335
2232
|
/* RIGHT_BOTTOM */
|
|
2336
2233
|
];
|
|
2337
2234
|
function s() {
|
|
2338
|
-
return e || (e = new
|
|
2235
|
+
return e || (e = new ft(r, [
|
|
2339
2236
|
/* | @tg/map |名字相同| baidu | */
|
|
2340
2237
|
/* TOP_LEFT = */
|
|
2341
2238
|
BMAP_ANCHOR_TOP_LEFT,
|
|
@@ -2365,7 +2262,7 @@ var E = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
2365
2262
|
}
|
|
2366
2263
|
i.getBaidu = s;
|
|
2367
2264
|
function n() {
|
|
2368
|
-
return t || (t = new
|
|
2265
|
+
return t || (t = new ft(r, [
|
|
2369
2266
|
google.maps.ControlPosition.TOP_LEFT,
|
|
2370
2267
|
google.maps.ControlPosition.TOP_CENTER,
|
|
2371
2268
|
google.maps.ControlPosition.TOP_RIGHT,
|
|
@@ -2382,7 +2279,7 @@ var E = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
2382
2279
|
}
|
|
2383
2280
|
i.getGoogle = n;
|
|
2384
2281
|
})(P || (P = {}));
|
|
2385
|
-
class
|
|
2282
|
+
class Or {
|
|
2386
2283
|
constructor(e) {
|
|
2387
2284
|
/** 实际添加到地图中的control对象 */
|
|
2388
2285
|
h(this, "inner");
|
|
@@ -2391,7 +2288,7 @@ class Cr {
|
|
|
2391
2288
|
}
|
|
2392
2289
|
class St {
|
|
2393
2290
|
}
|
|
2394
|
-
class
|
|
2291
|
+
class Ke extends St {
|
|
2395
2292
|
constructor(e, t) {
|
|
2396
2293
|
super(), this.inner = e, this.position = t;
|
|
2397
2294
|
}
|
|
@@ -2414,7 +2311,7 @@ class Xe extends St {
|
|
|
2414
2311
|
e.innerMap.removeControl(this.inner);
|
|
2415
2312
|
}
|
|
2416
2313
|
}
|
|
2417
|
-
class
|
|
2314
|
+
class qe extends St {
|
|
2418
2315
|
constructor(t, r) {
|
|
2419
2316
|
super();
|
|
2420
2317
|
h(this, "visible", !1);
|
|
@@ -2451,7 +2348,7 @@ class Je extends St {
|
|
|
2451
2348
|
});
|
|
2452
2349
|
}
|
|
2453
2350
|
}
|
|
2454
|
-
var
|
|
2351
|
+
var $t = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))($t || {});
|
|
2455
2352
|
class k {
|
|
2456
2353
|
constructor(e, t, r, s) {
|
|
2457
2354
|
this.id = e, this.baidu = t, this.google = r, this.googleCoordType = s;
|
|
@@ -2473,13 +2370,13 @@ class k {
|
|
|
2473
2370
|
return this.google();
|
|
2474
2371
|
}
|
|
2475
2372
|
asGoogleMapType() {
|
|
2476
|
-
|
|
2373
|
+
Jt("google的内置地图没有对应的实例");
|
|
2477
2374
|
}
|
|
2478
2375
|
}
|
|
2479
|
-
class
|
|
2376
|
+
class Cr {
|
|
2480
2377
|
constructor() {
|
|
2481
|
-
h(this, "baiduCache", new
|
|
2482
|
-
h(this, "googleCache", new
|
|
2378
|
+
h(this, "baiduCache", new yt(() => new BMap.TrafficLayer()));
|
|
2379
|
+
h(this, "googleCache", new yt(() => new google.maps.TrafficLayer()));
|
|
2483
2380
|
}
|
|
2484
2381
|
asBaiduLayer() {
|
|
2485
2382
|
return this.baiduCache.get();
|
|
@@ -2496,13 +2393,13 @@ var I;
|
|
|
2496
2393
|
), () => (
|
|
2497
2394
|
/* 地形 */
|
|
2498
2395
|
google.maps.MapTypeId.TERRAIN
|
|
2499
|
-
), K.wgs84), i.BUILD_IN_MAP_TYPES = new
|
|
2396
|
+
), K.wgs84), i.BUILD_IN_MAP_TYPES = new Tr([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
|
|
2500
2397
|
})(I || (I = {}));
|
|
2501
|
-
var
|
|
2502
|
-
const
|
|
2503
|
-
class
|
|
2398
|
+
var At = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(At || {});
|
|
2399
|
+
const zt = [I.NORMAL, I.SATELLITE, I.HYBRID];
|
|
2400
|
+
class Xe extends Ke {
|
|
2504
2401
|
static create(e) {
|
|
2505
|
-
const t = e.mapTypes ??
|
|
2402
|
+
const t = e.mapTypes ?? zt, r = {
|
|
2506
2403
|
default: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
|
|
2507
2404
|
horizontal: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
|
|
2508
2405
|
dropdown: BMAP_MAPTYPE_CONTROL_DROPDOWN
|
|
@@ -2510,11 +2407,11 @@ class Qe extends Xe {
|
|
|
2510
2407
|
type: e.type && r[e.type],
|
|
2511
2408
|
mapTypes: t.map((n) => n.asBaiduMapType())
|
|
2512
2409
|
});
|
|
2513
|
-
return e.position && s.setAnchor(P.getBaidu().toValue(e.position)), new
|
|
2410
|
+
return e.position && s.setAnchor(P.getBaidu().toValue(e.position)), new Xe(s, e.position);
|
|
2514
2411
|
}
|
|
2515
2412
|
}
|
|
2516
|
-
const X = class extends
|
|
2517
|
-
constructor(e = "default", t = E.TOP_LEFT, r =
|
|
2413
|
+
const X = class extends qe {
|
|
2414
|
+
constructor(e = "default", t = E.TOP_LEFT, r = zt) {
|
|
2518
2415
|
super("mapType", t), this.type = e, this.mapTypes = r, X.type2google || (X.type2google = {
|
|
2519
2416
|
default: google.maps.MapTypeControlStyle.DEFAULT,
|
|
2520
2417
|
horizontal: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
|
|
@@ -2536,47 +2433,47 @@ const X = class extends Je {
|
|
|
2536
2433
|
};
|
|
2537
2434
|
let me = X;
|
|
2538
2435
|
h(me, "type2google");
|
|
2539
|
-
class
|
|
2436
|
+
class Je extends Ke {
|
|
2540
2437
|
static create(e) {
|
|
2541
2438
|
const t = new BMap.NavigationControl({
|
|
2542
2439
|
type: BMAP_NAVIGATION_CONTROL_ZOOM,
|
|
2543
2440
|
// enableGeolocation: true,
|
|
2544
2441
|
anchor: e.position && P.getBaidu().toValue(e.position)
|
|
2545
2442
|
});
|
|
2546
|
-
return new
|
|
2443
|
+
return new Je(t, e.position);
|
|
2547
2444
|
}
|
|
2548
2445
|
}
|
|
2549
|
-
class
|
|
2446
|
+
class Qe extends qe {
|
|
2550
2447
|
static create(e) {
|
|
2551
|
-
return new
|
|
2448
|
+
return new Qe(e.position);
|
|
2552
2449
|
}
|
|
2553
2450
|
constructor(e = E.RIGHT_BOTTOM) {
|
|
2554
2451
|
super("zoom", e);
|
|
2555
2452
|
}
|
|
2556
2453
|
}
|
|
2557
|
-
class
|
|
2454
|
+
class et extends Ke {
|
|
2558
2455
|
static create(e) {
|
|
2559
2456
|
const t = new BMap.ScaleControl({
|
|
2560
2457
|
anchor: e.position && P.getBaidu().toValue(e.position)
|
|
2561
2458
|
});
|
|
2562
|
-
return new
|
|
2459
|
+
return new et(t, e.position);
|
|
2563
2460
|
}
|
|
2564
2461
|
}
|
|
2565
|
-
class
|
|
2462
|
+
class tt extends qe {
|
|
2566
2463
|
static create(e) {
|
|
2567
|
-
return new
|
|
2464
|
+
return new tt(e.position);
|
|
2568
2465
|
}
|
|
2569
2466
|
constructor(e = E.BOTTOM_RIGHT) {
|
|
2570
2467
|
super("scale", e);
|
|
2571
2468
|
}
|
|
2572
2469
|
}
|
|
2573
|
-
var
|
|
2470
|
+
var Be;
|
|
2574
2471
|
((i) => {
|
|
2575
2472
|
function e(t) {
|
|
2576
2473
|
return t.scrollWidth > t.clientWidth || t.scrollHeight > t.clientHeight;
|
|
2577
2474
|
}
|
|
2578
2475
|
i.isScrollable = e;
|
|
2579
|
-
})(
|
|
2476
|
+
})(Be || (Be = {}));
|
|
2580
2477
|
var ee;
|
|
2581
2478
|
((i) => {
|
|
2582
2479
|
function e(r) {
|
|
@@ -2600,7 +2497,7 @@ var ee;
|
|
|
2600
2497
|
}
|
|
2601
2498
|
i.toBaidu = t;
|
|
2602
2499
|
})(ee || (ee = {}));
|
|
2603
|
-
class he extends
|
|
2500
|
+
class he extends Oe {
|
|
2604
2501
|
constructor(e, t, r, s) {
|
|
2605
2502
|
super(e, t, r), this.state = s;
|
|
2606
2503
|
}
|
|
@@ -2667,7 +2564,7 @@ class he extends Ce {
|
|
|
2667
2564
|
return (e = this.innerOverlay.getLabel()) == null ? void 0 : e.__label__;
|
|
2668
2565
|
}
|
|
2669
2566
|
}
|
|
2670
|
-
class
|
|
2567
|
+
class rt extends Ze {
|
|
2671
2568
|
constructor() {
|
|
2672
2569
|
super(...arguments);
|
|
2673
2570
|
h(this, "label");
|
|
@@ -2690,7 +2587,7 @@ class st extends je {
|
|
|
2690
2587
|
// InfoWindow相对marker的position的偏移量, 若不指定, 则偏移到marker的icon的上部中央
|
|
2691
2588
|
anchorPoint: new google.maps.Point(0, 0)
|
|
2692
2589
|
};
|
|
2693
|
-
return new
|
|
2590
|
+
return new rt(new google.maps.Marker(n), r, this);
|
|
2694
2591
|
}
|
|
2695
2592
|
getPosition() {
|
|
2696
2593
|
return y.fromGoogle(this.innerOverlay.getPosition(), this.coordType);
|
|
@@ -2743,7 +2640,7 @@ class st extends je {
|
|
|
2743
2640
|
this.label = void 0, this.labelPositionListener = void 0, this.labelVisibleListener = void 0, this.labelMapChangedListener = void 0;
|
|
2744
2641
|
}
|
|
2745
2642
|
}
|
|
2746
|
-
class
|
|
2643
|
+
class it {
|
|
2747
2644
|
constructor(e) {
|
|
2748
2645
|
this.delegate = e, this.delegate.setTarget(this);
|
|
2749
2646
|
}
|
|
@@ -2754,7 +2651,7 @@ class nt {
|
|
|
2754
2651
|
this.delegate.removeEventListener(e, t);
|
|
2755
2652
|
}
|
|
2756
2653
|
}
|
|
2757
|
-
class
|
|
2654
|
+
class st extends it {
|
|
2758
2655
|
constructor(e, t, r) {
|
|
2759
2656
|
super(new J(e, t)), this.inner = e, this.map = t, this.state = r;
|
|
2760
2657
|
}
|
|
@@ -2764,7 +2661,7 @@ class ot extends nt {
|
|
|
2764
2661
|
offset: e.offset && new BMap.Size(e.offset.x, e.offset.y),
|
|
2765
2662
|
enableAutoPan: !e.disableAutoPan
|
|
2766
2663
|
});
|
|
2767
|
-
return new
|
|
2664
|
+
return new st(r, this, { position: t });
|
|
2768
2665
|
}
|
|
2769
2666
|
isOpen() {
|
|
2770
2667
|
return this.inner.isOpen();
|
|
@@ -2783,10 +2680,10 @@ class ot extends nt {
|
|
|
2783
2680
|
this.state.position = e, this.inner.isOpen() && this.open();
|
|
2784
2681
|
}
|
|
2785
2682
|
}
|
|
2786
|
-
class
|
|
2683
|
+
class nt extends it {
|
|
2787
2684
|
constructor(t, r) {
|
|
2788
2685
|
super(new q(t, r));
|
|
2789
|
-
h(this, "eventHub", new
|
|
2686
|
+
h(this, "eventHub", new br());
|
|
2790
2687
|
h(this, "isOpened", !1);
|
|
2791
2688
|
this.inner = t, this.map = r, t.addListener("closeclick", () => {
|
|
2792
2689
|
this.isOpened = !1, this.eventHub.hasListener("close") && this.eventHub.notify({ type: "close", target: this });
|
|
@@ -2803,7 +2700,7 @@ class at extends nt {
|
|
|
2803
2700
|
position: r.toGoogle(this.coordType),
|
|
2804
2701
|
disableAutoPan: t.disableAutoPan
|
|
2805
2702
|
});
|
|
2806
|
-
return new
|
|
2703
|
+
return new nt(s, this);
|
|
2807
2704
|
}
|
|
2808
2705
|
isOpen() {
|
|
2809
2706
|
return this.isOpened;
|
|
@@ -2845,11 +2742,11 @@ var ce;
|
|
|
2845
2742
|
((i) => {
|
|
2846
2743
|
i.ZERO = { x: 0, y: 0 };
|
|
2847
2744
|
})(ce || (ce = {}));
|
|
2848
|
-
let
|
|
2849
|
-
function
|
|
2850
|
-
return
|
|
2745
|
+
let Ee;
|
|
2746
|
+
function wr(i, e, t, r) {
|
|
2747
|
+
return Ee || (Ee = xr()), new Ee(i, e, t, r);
|
|
2851
2748
|
}
|
|
2852
|
-
function
|
|
2749
|
+
function xr() {
|
|
2853
2750
|
return class extends google.maps.OverlayView {
|
|
2854
2751
|
constructor(t, r, s, n) {
|
|
2855
2752
|
super();
|
|
@@ -2920,7 +2817,7 @@ var te;
|
|
|
2920
2817
|
}
|
|
2921
2818
|
i.toElement = t;
|
|
2922
2819
|
})(te || (te = {}));
|
|
2923
|
-
class
|
|
2820
|
+
class ot extends Oe {
|
|
2924
2821
|
constructor(t, r, s, n) {
|
|
2925
2822
|
super(t, r, s);
|
|
2926
2823
|
h(this, "icon");
|
|
@@ -2939,7 +2836,7 @@ class lt extends Ce {
|
|
|
2939
2836
|
padding: "0px",
|
|
2940
2837
|
backgroundColor: "unset"
|
|
2941
2838
|
});
|
|
2942
|
-
const n = new
|
|
2839
|
+
const n = new ot(s, r, this, t.content);
|
|
2943
2840
|
return s.__label__ = n, n;
|
|
2944
2841
|
}
|
|
2945
2842
|
setContentInternal(t, r = !1) {
|
|
@@ -2983,16 +2880,16 @@ class lt extends Ce {
|
|
|
2983
2880
|
this.icon && (s -= this.icon.anchor.width, n -= this.icon.anchor.height), t && (s += t.anchor.width, n += t.anchor.height), this.innerOverlay.setOffset(new BMap.Size(s, n)), this.icon = t;
|
|
2984
2881
|
}
|
|
2985
2882
|
}
|
|
2986
|
-
class
|
|
2883
|
+
class at extends Ze {
|
|
2987
2884
|
static create(e) {
|
|
2988
2885
|
var s;
|
|
2989
|
-
const t = this.coordType, r =
|
|
2886
|
+
const t = this.coordType, r = wr(
|
|
2990
2887
|
te.toElement(e.content),
|
|
2991
2888
|
(s = e.position) == null ? void 0 : s.toGoogle(t),
|
|
2992
2889
|
e.offset,
|
|
2993
2890
|
e.zIndex
|
|
2994
2891
|
);
|
|
2995
|
-
return new
|
|
2892
|
+
return new at(r, t, this);
|
|
2996
2893
|
}
|
|
2997
2894
|
setZIndex(e) {
|
|
2998
2895
|
this.innerOverlay.setZIndex(e);
|
|
@@ -3014,15 +2911,15 @@ class ht extends je {
|
|
|
3014
2911
|
this.innerOverlay.setOffset(e);
|
|
3015
2912
|
}
|
|
3016
2913
|
}
|
|
3017
|
-
function
|
|
2914
|
+
function Nt() {
|
|
3018
2915
|
BMap.OverlayV3 || (BMap.OverlayV3 = BMap.Overlay);
|
|
3019
2916
|
}
|
|
3020
|
-
let
|
|
3021
|
-
function
|
|
3022
|
-
return
|
|
2917
|
+
let ke;
|
|
2918
|
+
function Er(i, e, t, r, s, n) {
|
|
2919
|
+
return ke || (ke = kr()), new ke(i, e, t, r, s, n);
|
|
3023
2920
|
}
|
|
3024
|
-
function
|
|
3025
|
-
|
|
2921
|
+
function kr() {
|
|
2922
|
+
Nt();
|
|
3026
2923
|
const i = new BMap.Point(0, 0);
|
|
3027
2924
|
return class extends BMap.OverlayV3 {
|
|
3028
2925
|
constructor(r, s = i, n = ce.ZERO, a, g = 654, o = "") {
|
|
@@ -3090,13 +2987,13 @@ function Ir() {
|
|
|
3090
2987
|
}
|
|
3091
2988
|
};
|
|
3092
2989
|
}
|
|
3093
|
-
class
|
|
2990
|
+
class lt extends Oe {
|
|
3094
2991
|
constructor(e, t, r) {
|
|
3095
2992
|
super(e, t, r), this.baiduMap = r;
|
|
3096
2993
|
}
|
|
3097
2994
|
static create(e) {
|
|
3098
2995
|
var s;
|
|
3099
|
-
const t = this.coordType, r =
|
|
2996
|
+
const t = this.coordType, r = Er(
|
|
3100
2997
|
e.content,
|
|
3101
2998
|
(s = e.position) == null ? void 0 : s.toBaidu(t),
|
|
3102
2999
|
e.offset,
|
|
@@ -3104,7 +3001,7 @@ class ct extends Ce {
|
|
|
3104
3001
|
e.maxWidth,
|
|
3105
3002
|
e.borderClass
|
|
3106
3003
|
);
|
|
3107
|
-
return new
|
|
3004
|
+
return new lt(r, t, this);
|
|
3108
3005
|
}
|
|
3109
3006
|
open(e) {
|
|
3110
3007
|
this.innerOverlay.open(this.baiduMap.innerMap, e == null ? void 0 : e.innerOverlay);
|
|
@@ -3125,7 +3022,7 @@ class ct extends Ce {
|
|
|
3125
3022
|
this.innerOverlay.setZIndex(e);
|
|
3126
3023
|
}
|
|
3127
3024
|
}
|
|
3128
|
-
class
|
|
3025
|
+
class ht extends it {
|
|
3129
3026
|
constructor(e, t, r) {
|
|
3130
3027
|
super(new q(e, r)), this.inner = e, this.coordType = t, this.map = r;
|
|
3131
3028
|
}
|
|
@@ -3142,7 +3039,7 @@ class dt extends nt {
|
|
|
3142
3039
|
var g;
|
|
3143
3040
|
const a = (g = e.content.parentElement) == null ? void 0 : g.parentElement;
|
|
3144
3041
|
a && a.className.includes("gm-style-iw-c") && !a.className.includes(s) && (a.className += ` ${s}`);
|
|
3145
|
-
}), new
|
|
3042
|
+
}), new ht(r, t, this);
|
|
3146
3043
|
}
|
|
3147
3044
|
open(e) {
|
|
3148
3045
|
this.inner.open(this.map.innerMap, e == null ? void 0 : e.innerOverlay);
|
|
@@ -3170,23 +3067,23 @@ class dt extends nt {
|
|
|
3170
3067
|
this.inner.setZIndex(e);
|
|
3171
3068
|
}
|
|
3172
3069
|
}
|
|
3173
|
-
class
|
|
3070
|
+
class Ir extends Re {
|
|
3174
3071
|
constructor(t, r) {
|
|
3175
3072
|
var s;
|
|
3176
3073
|
super(t);
|
|
3177
3074
|
h(this, "buildInMapTypeId2BIMT");
|
|
3178
3075
|
h(this, "baiduMapType2BIMT");
|
|
3179
3076
|
h(this, "map");
|
|
3180
|
-
h(this, "createLabel",
|
|
3181
|
-
h(this, "createCircle",
|
|
3182
|
-
h(this, "createPolygon",
|
|
3183
|
-
h(this, "createPolyline",
|
|
3184
|
-
h(this, "createInfoWindow",
|
|
3185
|
-
h(this, "createInfoBox",
|
|
3077
|
+
h(this, "createLabel", ot.create);
|
|
3078
|
+
h(this, "createCircle", Ue.create);
|
|
3079
|
+
h(this, "createPolygon", He.create);
|
|
3080
|
+
h(this, "createPolyline", We.create);
|
|
3081
|
+
h(this, "createInfoWindow", st.create);
|
|
3082
|
+
h(this, "createInfoBox", lt.create);
|
|
3186
3083
|
h(this, "createMarker", he.create);
|
|
3187
|
-
h(this, "createMapTypeControl",
|
|
3188
|
-
h(this, "createZoomControl",
|
|
3189
|
-
h(this, "createScaleControl",
|
|
3084
|
+
h(this, "createMapTypeControl", Xe.create);
|
|
3085
|
+
h(this, "createZoomControl", Je.create);
|
|
3086
|
+
h(this, "createScaleControl", et.create);
|
|
3190
3087
|
this.buildInMapTypeId2BIMT = I.BUILD_IN_MAP_TYPES.getValueMap(k.prototype.getId), this.baiduMapType2BIMT = I.BUILD_IN_MAP_TYPES.getValueMap(k.prototype.asBaiduMapType), this.map = new BMap.Map(t, {
|
|
3191
3088
|
minZoom: r.minZoom,
|
|
3192
3089
|
maxZoom: r.maxZoom,
|
|
@@ -3205,7 +3102,7 @@ class Pr extends Ze {
|
|
|
3205
3102
|
this.innerMap.setDefaultCursor(t);
|
|
3206
3103
|
}
|
|
3207
3104
|
setGestureHandling(t = N.auto) {
|
|
3208
|
-
switch (t === N.auto && (t = this.element.parentElement &&
|
|
3105
|
+
switch (t === N.auto && (t = this.element.parentElement && Be.isScrollable(this.element.parentElement) ? N.cooperative : N.greedy), t) {
|
|
3209
3106
|
case N.cooperative:
|
|
3210
3107
|
this.map.disableScrollWheelZoom(), this.map.enableDragging(), this.map.enableDoubleClickZoom();
|
|
3211
3108
|
break;
|
|
@@ -3295,7 +3192,7 @@ class Pr extends Ze {
|
|
|
3295
3192
|
});
|
|
3296
3193
|
}
|
|
3297
3194
|
getBounds() {
|
|
3298
|
-
return
|
|
3195
|
+
return W.fromBaidu(this.map.getBounds(), this.coordType);
|
|
3299
3196
|
}
|
|
3300
3197
|
addElementOverlay(t) {
|
|
3301
3198
|
this.map.addOverlay(t.asBaidu());
|
|
@@ -3329,26 +3226,26 @@ class Pr extends Ze {
|
|
|
3329
3226
|
t.inner && (oe(t.inner instanceof BMap.Control, `control.inner(${t.inner})需要是BMap.Control`), this.map.removeControl(t.inner));
|
|
3330
3227
|
}
|
|
3331
3228
|
createMarkerClusterer(t) {
|
|
3332
|
-
return new
|
|
3229
|
+
return new _r(this, t);
|
|
3333
3230
|
}
|
|
3334
3231
|
}
|
|
3335
|
-
class
|
|
3232
|
+
class Pr extends Re {
|
|
3336
3233
|
constructor(t, r) {
|
|
3337
3234
|
var n;
|
|
3338
3235
|
super(t);
|
|
3339
3236
|
h(this, "buildInMapTypeId2BIMT");
|
|
3340
3237
|
h(this, "googleMapTypeId2BIMT");
|
|
3341
3238
|
h(this, "map");
|
|
3342
|
-
h(this, "createLabel",
|
|
3343
|
-
h(this, "createCircle",
|
|
3344
|
-
h(this, "createPolygon",
|
|
3345
|
-
h(this, "createPolyline",
|
|
3346
|
-
h(this, "createInfoWindow",
|
|
3347
|
-
h(this, "createInfoBox",
|
|
3348
|
-
h(this, "createMarker",
|
|
3239
|
+
h(this, "createLabel", at.create);
|
|
3240
|
+
h(this, "createCircle", Ye.create);
|
|
3241
|
+
h(this, "createPolygon", Fe.create);
|
|
3242
|
+
h(this, "createPolyline", Ve.create);
|
|
3243
|
+
h(this, "createInfoWindow", nt.create);
|
|
3244
|
+
h(this, "createInfoBox", ht.create);
|
|
3245
|
+
h(this, "createMarker", rt.create);
|
|
3349
3246
|
h(this, "createMapTypeControl", me.create);
|
|
3350
|
-
h(this, "createZoomControl",
|
|
3351
|
-
h(this, "createScaleControl",
|
|
3247
|
+
h(this, "createZoomControl", Qe.create);
|
|
3248
|
+
h(this, "createScaleControl", tt.create);
|
|
3352
3249
|
this.mapOptions = r, this.buildInMapTypeId2BIMT = I.BUILD_IN_MAP_TYPES.getValueMap(k.prototype.getId), this.googleMapTypeId2BIMT = I.BUILD_IN_MAP_TYPES.getValueMap(k.prototype.getGoogleMapTypeId);
|
|
3353
3250
|
const s = r.buildInMapTypeId && this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId);
|
|
3354
3251
|
this.map = new google.maps.Map(t, {
|
|
@@ -3447,7 +3344,7 @@ class Lr extends Ze {
|
|
|
3447
3344
|
}
|
|
3448
3345
|
getBounds() {
|
|
3449
3346
|
const t = this.map.getBounds();
|
|
3450
|
-
return t ?
|
|
3347
|
+
return t ? W.fromGoogle(t, this.coordType) : W.EMPTY;
|
|
3451
3348
|
}
|
|
3452
3349
|
addElementOverlay(t) {
|
|
3453
3350
|
t.asGoogle().setMap(this.map);
|
|
@@ -3471,44 +3368,18 @@ class Lr extends Ze {
|
|
|
3471
3368
|
}
|
|
3472
3369
|
}
|
|
3473
3370
|
createMarkerClusterer(t) {
|
|
3474
|
-
return new
|
|
3371
|
+
return new Mr(this, t);
|
|
3475
3372
|
}
|
|
3476
3373
|
}
|
|
3477
|
-
|
|
3478
|
-
baidu: {
|
|
3479
|
-
version: "3.0",
|
|
3480
|
-
// TODO: 在build时好像会被静态替换, 导致使用者不能无法设置它
|
|
3481
|
-
// 详见: 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
|
-
key: {}.VITE_APP_DEV_KEY_BAIDU,
|
|
3483
|
-
language: ""
|
|
3484
|
-
},
|
|
3485
|
-
google: {
|
|
3486
|
-
version: "",
|
|
3487
|
-
key: {}.VITE_APP_DEV_KEY_GOOGLE,
|
|
3488
|
-
language: "en-us"
|
|
3489
|
-
},
|
|
3490
|
-
here: {
|
|
3491
|
-
version: Te[0],
|
|
3492
|
-
key: {}.VITE_APP_DEV_KEY_HERE,
|
|
3493
|
-
language: ""
|
|
3494
|
-
}
|
|
3495
|
-
};
|
|
3496
|
-
let Nt;
|
|
3497
|
-
function Rt() {
|
|
3498
|
-
return Nt || x("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
|
|
3499
|
-
}
|
|
3500
|
-
function Sr(i) {
|
|
3501
|
-
i != null && (Nt = Ct(Br, i));
|
|
3502
|
-
}
|
|
3503
|
-
class $r extends Ze {
|
|
3374
|
+
class Lr extends Re {
|
|
3504
3375
|
constructor(t, r) {
|
|
3505
3376
|
var a;
|
|
3506
3377
|
super(t);
|
|
3507
3378
|
h(this, "map");
|
|
3508
3379
|
h(this, "defaultLayers");
|
|
3509
3380
|
this.mapOptions = r;
|
|
3510
|
-
const s =
|
|
3511
|
-
|
|
3381
|
+
const s = Ct().here;
|
|
3382
|
+
ve.includes(s.version) || x(`不支持${s.version}, HereMap当前只支持如下版本: ${ve}`);
|
|
3512
3383
|
const n = new H.service.Platform({
|
|
3513
3384
|
app_id: s.key.split(",")[0],
|
|
3514
3385
|
app_code: s.key.split(",")[1]
|
|
@@ -3637,44 +3508,44 @@ class $r extends Ze {
|
|
|
3637
3508
|
throw new Error("Method not implemented.");
|
|
3638
3509
|
}
|
|
3639
3510
|
}
|
|
3640
|
-
var $ = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here = "here", i))($ || {}),
|
|
3511
|
+
var $ = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here = "here", i))($ || {}), Se;
|
|
3641
3512
|
((i) => {
|
|
3642
3513
|
function e(t, r, s) {
|
|
3643
|
-
const n =
|
|
3514
|
+
const n = Pe.create(s);
|
|
3644
3515
|
switch (t) {
|
|
3645
3516
|
case "google":
|
|
3646
|
-
return new Lr(r, n);
|
|
3647
|
-
case "baidu":
|
|
3648
3517
|
return new Pr(r, n);
|
|
3518
|
+
case "baidu":
|
|
3519
|
+
return new Ir(r, n);
|
|
3649
3520
|
case "here":
|
|
3650
|
-
return new
|
|
3521
|
+
return new Lr(r, n);
|
|
3651
3522
|
}
|
|
3652
3523
|
}
|
|
3653
3524
|
i.createMap = e;
|
|
3654
|
-
})(
|
|
3655
|
-
function
|
|
3656
|
-
const t = window, r =
|
|
3525
|
+
})(Se || (Se = {}));
|
|
3526
|
+
function Br(i, e) {
|
|
3527
|
+
const t = window, r = Sr(i);
|
|
3657
3528
|
if (t[r])
|
|
3658
3529
|
return Promise.resolve();
|
|
3659
3530
|
switch (i !== $.here && !e.key && x(`请先配置${i}地图的key`), i) {
|
|
3660
3531
|
case $.google:
|
|
3661
|
-
return
|
|
3532
|
+
return vt(`https://maps.googleapis.com/maps/api/js?key=${e.key}&language=${e.language}`);
|
|
3662
3533
|
case $.baidu:
|
|
3663
|
-
return
|
|
3534
|
+
return vt(`https://api.map.baidu.com/api?v=${e.version}&ak=${e.key}`);
|
|
3664
3535
|
case $.here:
|
|
3665
|
-
return
|
|
3536
|
+
return se(ie("core", e.version)).then(() => Promise.all([
|
|
3666
3537
|
// 其他大多数模块都可以同时载入
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3538
|
+
se(ie("service", e.version)),
|
|
3539
|
+
se(ie("mapevents", e.version)),
|
|
3540
|
+
se(ie("clustering", e.version)),
|
|
3541
|
+
se(ie("ui", e.version))
|
|
3671
3542
|
])).catch((s) => (delete t[r], Promise.reject(s)));
|
|
3672
3543
|
}
|
|
3673
3544
|
}
|
|
3674
|
-
function
|
|
3545
|
+
function ie(i, e = ve[0]) {
|
|
3675
3546
|
return `https://js.api.here.com/v3/${e}/mapsjs-${i}.js`;
|
|
3676
3547
|
}
|
|
3677
|
-
function
|
|
3548
|
+
function Sr(i) {
|
|
3678
3549
|
switch (i) {
|
|
3679
3550
|
case $.google:
|
|
3680
3551
|
return "google";
|
|
@@ -3684,32 +3555,149 @@ function zr(i) {
|
|
|
3684
3555
|
return "H";
|
|
3685
3556
|
}
|
|
3686
3557
|
}
|
|
3687
|
-
let
|
|
3688
|
-
function
|
|
3558
|
+
let $r = 0;
|
|
3559
|
+
function vt(i, e = "callback") {
|
|
3689
3560
|
return new Promise((t, r) => {
|
|
3690
|
-
const s = `__callback${
|
|
3561
|
+
const s = `__callback${$r++}`;
|
|
3691
3562
|
window[s] = t;
|
|
3692
3563
|
const n = document.createElement("script");
|
|
3693
3564
|
n.src = `${i}&${e}=${s}`, n.onerror = r, document.body.appendChild(n);
|
|
3694
3565
|
});
|
|
3695
3566
|
}
|
|
3696
|
-
function
|
|
3567
|
+
function se(i) {
|
|
3697
3568
|
return new Promise((e, t) => {
|
|
3698
3569
|
const r = document.createElement("script");
|
|
3699
3570
|
r.src = i, r.onload = e, r.onerror = t, document.body.appendChild(r);
|
|
3700
3571
|
});
|
|
3701
3572
|
}
|
|
3702
|
-
|
|
3573
|
+
function R(i, e) {
|
|
3574
|
+
return {
|
|
3575
|
+
type: String,
|
|
3576
|
+
default: e,
|
|
3577
|
+
validator: (t) => Object.values(i).includes(t)
|
|
3578
|
+
};
|
|
3579
|
+
}
|
|
3580
|
+
function Ar(i, e) {
|
|
3581
|
+
return {
|
|
3582
|
+
type: String,
|
|
3583
|
+
default: e,
|
|
3584
|
+
validator: (t) => i.includes(t)
|
|
3585
|
+
};
|
|
3586
|
+
}
|
|
3587
|
+
function z(i) {
|
|
3588
|
+
return {
|
|
3589
|
+
type: i,
|
|
3590
|
+
required: !0
|
|
3591
|
+
};
|
|
3592
|
+
}
|
|
3593
|
+
function m(i, e) {
|
|
3594
|
+
return {
|
|
3595
|
+
type: i,
|
|
3596
|
+
default: e
|
|
3597
|
+
};
|
|
3598
|
+
}
|
|
3599
|
+
function Li(i) {
|
|
3600
|
+
const e = {};
|
|
3601
|
+
return Object.entries(i).forEach(([t, r]) => {
|
|
3602
|
+
const s = `__${t}`;
|
|
3603
|
+
e[t] = {
|
|
3604
|
+
get() {
|
|
3605
|
+
const n = this[s];
|
|
3606
|
+
return n === void 0 ? r : n;
|
|
3607
|
+
},
|
|
3608
|
+
set(n) {
|
|
3609
|
+
this[s] = n;
|
|
3610
|
+
}
|
|
3611
|
+
// Vue3已经不支持该属性
|
|
3612
|
+
// cache: false
|
|
3613
|
+
};
|
|
3614
|
+
}), e;
|
|
3615
|
+
}
|
|
3616
|
+
const ne = {
|
|
3617
|
+
enumerable: !0,
|
|
3618
|
+
configurable: !0,
|
|
3619
|
+
get: ye,
|
|
3620
|
+
set: ye
|
|
3621
|
+
};
|
|
3622
|
+
function zr(i) {
|
|
3623
|
+
return Object.keys(i).forEach((e) => {
|
|
3624
|
+
const t = i[e];
|
|
3625
|
+
let r = !1;
|
|
3626
|
+
typeof t == "function" ? (ne.get = t, ne.set = ye, r = !0) : typeof t == "object" && typeof t.get == "function" && (ne.get = t.get, ne.set = t.set, r = !0), r && (i[e] = Object.defineProperty(i, e, ne));
|
|
3627
|
+
}), i;
|
|
3628
|
+
}
|
|
3629
|
+
function Bi(i) {
|
|
3630
|
+
return zr(i);
|
|
3631
|
+
}
|
|
3632
|
+
function Nr() {
|
|
3633
|
+
return Ie();
|
|
3634
|
+
}
|
|
3635
|
+
function ge(i, e) {
|
|
3636
|
+
const t = i.$options[e];
|
|
3637
|
+
if (t)
|
|
3638
|
+
for (const r of t)
|
|
3639
|
+
r.call(i);
|
|
3640
|
+
}
|
|
3641
|
+
function Si(i, e) {
|
|
3642
|
+
for (const t of i)
|
|
3643
|
+
if (t.$options.name === e.name)
|
|
3644
|
+
return t;
|
|
3645
|
+
}
|
|
3646
|
+
function $i(i, e) {
|
|
3647
|
+
if (!i.default)
|
|
3648
|
+
return;
|
|
3649
|
+
const t = i.default();
|
|
3650
|
+
for (const r of t)
|
|
3651
|
+
if ((r == null ? void 0 : r.type).name === e.name)
|
|
3652
|
+
return r;
|
|
3653
|
+
}
|
|
3654
|
+
function F(i) {
|
|
3655
|
+
const e = {}, t = {};
|
|
3656
|
+
return Object.keys(i).forEach((r) => {
|
|
3657
|
+
r.startsWith("on") ? e[r.substring(2).toLowerCase()] = i[r] : t[r] = i[r];
|
|
3658
|
+
}), {
|
|
3659
|
+
binds: t,
|
|
3660
|
+
listeners: e
|
|
3661
|
+
};
|
|
3662
|
+
}
|
|
3663
|
+
const Ai = {
|
|
3664
|
+
/**
|
|
3665
|
+
* @event 一般来说传{@link Tg.Event}对象, 但传其他对象也不会报错
|
|
3666
|
+
*/
|
|
3667
|
+
eventLog(i) {
|
|
3668
|
+
console.log(i), this.$_prev_type = i && i.type, this.$_prev_time = Date.now();
|
|
3669
|
+
},
|
|
3670
|
+
/** @see eventLog */
|
|
3671
|
+
eventLogLess(i) {
|
|
3672
|
+
((i && i.type) !== this.$_prev_type || Date.now() - (this.$_prev_time ?? 0) > 1e3) && this.eventLog(i);
|
|
3673
|
+
}
|
|
3674
|
+
}, Rt = "$map", $e = "onCreate", Ae = "onDestroy", w = C({
|
|
3675
|
+
inject: [Rt],
|
|
3676
|
+
mounted() {
|
|
3677
|
+
ge(this, $e);
|
|
3678
|
+
},
|
|
3679
|
+
beforeUnmount() {
|
|
3680
|
+
ge(this, Ae);
|
|
3681
|
+
},
|
|
3682
|
+
methods: {
|
|
3683
|
+
recreate() {
|
|
3684
|
+
ge(this, Ae), ge(this, $e);
|
|
3685
|
+
}
|
|
3686
|
+
},
|
|
3687
|
+
render() {
|
|
3688
|
+
return Nr();
|
|
3689
|
+
}
|
|
3690
|
+
}), Rr = C({
|
|
3703
3691
|
name: "tg-map",
|
|
3704
3692
|
provide() {
|
|
3705
3693
|
return {
|
|
3706
|
-
[
|
|
3694
|
+
[Rt]: Vt(() => this.map)
|
|
3707
3695
|
};
|
|
3708
3696
|
},
|
|
3709
3697
|
inheritAttrs: !1,
|
|
3710
3698
|
props: {
|
|
3711
3699
|
/** type没做响应式, 但外部可以把type作为tg-map的key, 让type修改时完全重建tg-map */
|
|
3712
|
-
type:
|
|
3700
|
+
type: R($, $.google),
|
|
3713
3701
|
/**
|
|
3714
3702
|
* 当对该属性使用双向绑定时, 改变center将触发update:center又反过来触发center改变, 最终导致无限循环...
|
|
3715
3703
|
* 当前通过setCenter()时判断center是否有改变来避免该问题, 但为了避免可能存在的问题, 另外设计了如下机制:
|
|
@@ -3736,20 +3724,18 @@ const Rr = C({
|
|
|
3736
3724
|
*/
|
|
3737
3725
|
lastCenter: m(y),
|
|
3738
3726
|
zoom: z(Number),
|
|
3739
|
-
infoWindowMode:
|
|
3740
|
-
|
|
3741
|
-
gestureHandling: W(N),
|
|
3727
|
+
infoWindowMode: Ar(["single", "multi"]),
|
|
3728
|
+
gestureHandling: R(N),
|
|
3742
3729
|
minZoom: m(Number),
|
|
3743
3730
|
maxZoom: m(Number),
|
|
3744
3731
|
mapStyle: m(Object),
|
|
3745
|
-
|
|
3746
|
-
mapTypeId
|
|
3747
|
-
/** 优先级比mapTypeId高 */
|
|
3732
|
+
mapTypeId: R($t),
|
|
3733
|
+
/** 地图类型对象, 优先级比mapTypeId高 */
|
|
3748
3734
|
mapType: m(Object)
|
|
3749
3735
|
},
|
|
3750
3736
|
setup(i, { attrs: e }) {
|
|
3751
3737
|
return {
|
|
3752
|
-
attrs:
|
|
3738
|
+
attrs: F(e),
|
|
3753
3739
|
centerSyncTimeoutId: 0
|
|
3754
3740
|
};
|
|
3755
3741
|
},
|
|
@@ -3774,7 +3760,7 @@ const Rr = C({
|
|
|
3774
3760
|
},
|
|
3775
3761
|
gestureHandling(i) {
|
|
3776
3762
|
var e;
|
|
3777
|
-
(e = this.map) == null || e.setGestureHandling(i);
|
|
3763
|
+
i && ((e = this.map) == null || e.setGestureHandling(i));
|
|
3778
3764
|
},
|
|
3779
3765
|
minZoom(i) {
|
|
3780
3766
|
var e;
|
|
@@ -3789,10 +3775,8 @@ const Rr = C({
|
|
|
3789
3775
|
(e = this.map) == null || e.setMapStyle(i);
|
|
3790
3776
|
},
|
|
3791
3777
|
mapTypeId(i) {
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
e && this.map.setBuildInMapTypeId(e);
|
|
3795
|
-
}
|
|
3778
|
+
var e;
|
|
3779
|
+
i && ((e = this.map) == null || e.setBuildInMapTypeId(i));
|
|
3796
3780
|
},
|
|
3797
3781
|
mapType(i) {
|
|
3798
3782
|
var e;
|
|
@@ -3800,9 +3784,9 @@ const Rr = C({
|
|
|
3800
3784
|
}
|
|
3801
3785
|
},
|
|
3802
3786
|
async created() {
|
|
3803
|
-
const
|
|
3787
|
+
const i = this.type;
|
|
3804
3788
|
try {
|
|
3805
|
-
await
|
|
3789
|
+
await Br(i, Ct()[i]);
|
|
3806
3790
|
} catch (s) {
|
|
3807
3791
|
this.$emit("error", s);
|
|
3808
3792
|
return;
|
|
@@ -3811,7 +3795,7 @@ const Rr = C({
|
|
|
3811
3795
|
console.warn(`tg-map(type=${i})已销毁, 不需要继续执行`);
|
|
3812
3796
|
return;
|
|
3813
3797
|
}
|
|
3814
|
-
const e = this.map =
|
|
3798
|
+
const e = this.map = Se.createMap(
|
|
3815
3799
|
i,
|
|
3816
3800
|
this.$refs.map,
|
|
3817
3801
|
/* options: */
|
|
@@ -3823,11 +3807,10 @@ const Rr = C({
|
|
|
3823
3807
|
minZoom: this.minZoom,
|
|
3824
3808
|
maxZoom: this.maxZoom,
|
|
3825
3809
|
mapStyle: this.mapStyle,
|
|
3826
|
-
|
|
3827
|
-
buildInMapTypeId: ye.toEnumOrNull(this.mapTypeId, Ae)
|
|
3810
|
+
buildInMapTypeId: this.mapTypeId
|
|
3828
3811
|
}
|
|
3829
3812
|
);
|
|
3830
|
-
if (this.mapType && e.setMapType(this.mapType), "ready" in this.attrs.listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"),
|
|
3813
|
+
if (this.mapType && e.setMapType(this.mapType), "ready" in this.attrs.listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"), V(
|
|
3831
3814
|
this.attrs.listeners,
|
|
3832
3815
|
this.map,
|
|
3833
3816
|
/* excludes: */
|
|
@@ -3854,7 +3837,7 @@ const Rr = C({
|
|
|
3854
3837
|
},
|
|
3855
3838
|
methods: {}
|
|
3856
3839
|
});
|
|
3857
|
-
const
|
|
3840
|
+
const G = (i, e) => {
|
|
3858
3841
|
const t = i.__vccOpts || i;
|
|
3859
3842
|
for (const [r, s] of e)
|
|
3860
3843
|
t[r] = s;
|
|
@@ -3864,14 +3847,14 @@ const Z = (i, e) => {
|
|
|
3864
3847
|
class: "tg-map__map"
|
|
3865
3848
|
};
|
|
3866
3849
|
function Zr(i, e, t, r, s, n) {
|
|
3867
|
-
return
|
|
3850
|
+
return D(), Z("div", re({ class: "tg-map" }, i.attrs.binds), [
|
|
3868
3851
|
Ht("div", Dr, null, 512),
|
|
3869
|
-
|
|
3870
|
-
i.map ? A(i.$slots, "default", { key: 1 }) :
|
|
3852
|
+
Ie("", !0),
|
|
3853
|
+
i.map ? A(i.$slots, "default", { key: 1 }) : Ie("", !0),
|
|
3871
3854
|
A(i.$slots, "overlay")
|
|
3872
3855
|
], 16);
|
|
3873
3856
|
}
|
|
3874
|
-
const Dt = /* @__PURE__ */
|
|
3857
|
+
const Dt = /* @__PURE__ */ G(Rr, [["render", Zr]]);
|
|
3875
3858
|
function Gr(i) {
|
|
3876
3859
|
if (i == null)
|
|
3877
3860
|
return;
|
|
@@ -3913,18 +3896,18 @@ const jr = C({
|
|
|
3913
3896
|
}
|
|
3914
3897
|
});
|
|
3915
3898
|
function Wr(i, e, t, r, s, n) {
|
|
3916
|
-
return
|
|
3917
|
-
class:
|
|
3899
|
+
return D(), Z("div", {
|
|
3900
|
+
class: Ne(i.$options.name),
|
|
3918
3901
|
style: Ft({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
|
|
3919
3902
|
}, [
|
|
3920
3903
|
A(i.$slots, "default")
|
|
3921
3904
|
], 6);
|
|
3922
3905
|
}
|
|
3923
|
-
const Vr = /* @__PURE__ */
|
|
3906
|
+
const Vr = /* @__PURE__ */ G(jr, [["render", Wr]]), Hr = C({
|
|
3924
3907
|
name: "tg-custom-control",
|
|
3925
3908
|
mixins: [w],
|
|
3926
3909
|
props: {
|
|
3927
|
-
position:
|
|
3910
|
+
position: R(E, E.RIGHT_BOTTOM)
|
|
3928
3911
|
},
|
|
3929
3912
|
setup() {
|
|
3930
3913
|
return {
|
|
@@ -3938,7 +3921,7 @@ const Vr = /* @__PURE__ */ Z(jr, [["render", Wr]]), Hr = C({
|
|
|
3938
3921
|
},
|
|
3939
3922
|
onCreate() {
|
|
3940
3923
|
de(this.$parent, Dt) || console.warn("请将tg-custom-control放到tg-map中");
|
|
3941
|
-
const { $el: i } = this, e = class extends
|
|
3924
|
+
const { $el: i } = this, e = class extends Or {
|
|
3942
3925
|
onCreateElement() {
|
|
3943
3926
|
return i;
|
|
3944
3927
|
}
|
|
@@ -3950,18 +3933,18 @@ const Vr = /* @__PURE__ */ Z(jr, [["render", Wr]]), Hr = C({
|
|
|
3950
3933
|
}
|
|
3951
3934
|
});
|
|
3952
3935
|
function Fr(i, e, t, r, s, n) {
|
|
3953
|
-
return
|
|
3954
|
-
class:
|
|
3936
|
+
return D(), Z("div", {
|
|
3937
|
+
class: Ne(i.$options.name)
|
|
3955
3938
|
}, [
|
|
3956
3939
|
A(i.$slots, "default")
|
|
3957
3940
|
], 2);
|
|
3958
3941
|
}
|
|
3959
|
-
const Ur = /* @__PURE__ */
|
|
3942
|
+
const Ur = /* @__PURE__ */ G(Hr, [["render", Fr]]), Yr = C({
|
|
3960
3943
|
name: "tg-map-type-control",
|
|
3961
3944
|
mixins: [w],
|
|
3962
3945
|
props: {
|
|
3963
|
-
position:
|
|
3964
|
-
type:
|
|
3946
|
+
position: R(E, E.TOP_LEFT),
|
|
3947
|
+
type: R(At),
|
|
3965
3948
|
mapTypes: m(Array)
|
|
3966
3949
|
},
|
|
3967
3950
|
setup() {
|
|
@@ -3993,7 +3976,7 @@ const Ur = /* @__PURE__ */ Z(Hr, [["render", Fr]]), Yr = C({
|
|
|
3993
3976
|
name: "tg-scale-control",
|
|
3994
3977
|
mixins: [w],
|
|
3995
3978
|
props: {
|
|
3996
|
-
position:
|
|
3979
|
+
position: R(E, E.BOTTOM_RIGHT)
|
|
3997
3980
|
},
|
|
3998
3981
|
setup() {
|
|
3999
3982
|
return {
|
|
@@ -4015,7 +3998,7 @@ const Ur = /* @__PURE__ */ Z(Hr, [["render", Fr]]), Yr = C({
|
|
|
4015
3998
|
name: "tg-zoom-control",
|
|
4016
3999
|
mixins: [w],
|
|
4017
4000
|
props: {
|
|
4018
|
-
position:
|
|
4001
|
+
position: R(E, E.RIGHT_BOTTOM)
|
|
4019
4002
|
},
|
|
4020
4003
|
setup() {
|
|
4021
4004
|
return {
|
|
@@ -4098,13 +4081,13 @@ const Ur = /* @__PURE__ */ Z(Hr, [["render", Fr]]), Yr = C({
|
|
|
4098
4081
|
}
|
|
4099
4082
|
});
|
|
4100
4083
|
function Jr(i, e, t, r, s, n) {
|
|
4101
|
-
return
|
|
4102
|
-
class:
|
|
4084
|
+
return D(), Z("div", {
|
|
4085
|
+
class: Ne(i.$options.name)
|
|
4103
4086
|
}, [
|
|
4104
4087
|
A(i.$slots, "default")
|
|
4105
4088
|
], 2);
|
|
4106
4089
|
}
|
|
4107
|
-
const Zt = /* @__PURE__ */
|
|
4090
|
+
const Zt = /* @__PURE__ */ G(Xr, [["render", Jr]]), Qr = C({
|
|
4108
4091
|
name: "tg-traffic-layer",
|
|
4109
4092
|
mixins: [w],
|
|
4110
4093
|
props: {
|
|
@@ -4117,7 +4100,7 @@ const Zt = /* @__PURE__ */ Z(Xr, [["render", Jr]]), Qr = C({
|
|
|
4117
4100
|
},
|
|
4118
4101
|
watch: {},
|
|
4119
4102
|
onCreate() {
|
|
4120
|
-
this.layer = new
|
|
4103
|
+
this.layer = new Cr(), this.$map.addLayer(this.layer);
|
|
4121
4104
|
},
|
|
4122
4105
|
onDestroy() {
|
|
4123
4106
|
this.$map.removeLayer(this.layer);
|
|
@@ -4140,7 +4123,7 @@ const Zt = /* @__PURE__ */ Z(Xr, [["render", Jr]]), Qr = C({
|
|
|
4140
4123
|
},
|
|
4141
4124
|
setup(i, { attrs: e }) {
|
|
4142
4125
|
return {
|
|
4143
|
-
attrs:
|
|
4126
|
+
attrs: F(e),
|
|
4144
4127
|
overlay: void 0
|
|
4145
4128
|
};
|
|
4146
4129
|
},
|
|
@@ -4177,13 +4160,13 @@ const Zt = /* @__PURE__ */ Z(Xr, [["render", Jr]]), Qr = C({
|
|
|
4177
4160
|
}
|
|
4178
4161
|
},
|
|
4179
4162
|
onCreate() {
|
|
4180
|
-
this.overlay = this.$map.createCircle(this), this.$map.addOverlay(this.overlay),
|
|
4163
|
+
this.overlay = this.$map.createCircle(this), this.$map.addOverlay(this.overlay), V(this.attrs.listeners, this.overlay);
|
|
4181
4164
|
},
|
|
4182
4165
|
onDestroy() {
|
|
4183
4166
|
this.$map.removeOverlay(this.overlay);
|
|
4184
4167
|
}
|
|
4185
4168
|
});
|
|
4186
|
-
var
|
|
4169
|
+
var ze = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overlayMouseTarget = "overlayMouseTarget", i.float = "float", i))(ze || {});
|
|
4187
4170
|
class ti {
|
|
4188
4171
|
constructor(e, t) {
|
|
4189
4172
|
h(this, "baidu");
|
|
@@ -4205,7 +4188,7 @@ class ti {
|
|
|
4205
4188
|
asBaidu() {
|
|
4206
4189
|
if (!this.baidu) {
|
|
4207
4190
|
const e = this;
|
|
4208
|
-
|
|
4191
|
+
Nt();
|
|
4209
4192
|
class t extends BMap.OverlayV3 {
|
|
4210
4193
|
initialize(n) {
|
|
4211
4194
|
const a = e.create(), g = n.getPanes();
|
|
@@ -4224,7 +4207,7 @@ class ti {
|
|
|
4224
4207
|
o = g.mapPane;
|
|
4225
4208
|
break;
|
|
4226
4209
|
default:
|
|
4227
|
-
|
|
4210
|
+
dt(e.mapPane);
|
|
4228
4211
|
break;
|
|
4229
4212
|
}
|
|
4230
4213
|
return o == null || o.appendChild(a), a;
|
|
@@ -4267,7 +4250,7 @@ class ti {
|
|
|
4267
4250
|
a = n.mapPane;
|
|
4268
4251
|
break;
|
|
4269
4252
|
default:
|
|
4270
|
-
|
|
4253
|
+
dt(e.mapPane);
|
|
4271
4254
|
break;
|
|
4272
4255
|
}
|
|
4273
4256
|
a.appendChild(s);
|
|
@@ -4311,7 +4294,7 @@ const ii = C({
|
|
|
4311
4294
|
name: "tg-element-overlay",
|
|
4312
4295
|
mixins: [w],
|
|
4313
4296
|
props: {
|
|
4314
|
-
mapPane:
|
|
4297
|
+
mapPane: R(ze, ze.overlayMouseTarget),
|
|
4315
4298
|
position: z(y)
|
|
4316
4299
|
},
|
|
4317
4300
|
setup() {
|
|
@@ -4340,13 +4323,13 @@ const ii = C({
|
|
|
4340
4323
|
}
|
|
4341
4324
|
});
|
|
4342
4325
|
function si(i, e, t, r, s, n) {
|
|
4343
|
-
return
|
|
4326
|
+
return D(), Z("div", re({
|
|
4344
4327
|
class: i.$options.name
|
|
4345
4328
|
}, i.$attrs), [
|
|
4346
4329
|
A(i.$slots, "default")
|
|
4347
4330
|
], 16);
|
|
4348
4331
|
}
|
|
4349
|
-
const ni = /* @__PURE__ */
|
|
4332
|
+
const ni = /* @__PURE__ */ G(ii, [["render", si]]), oi = C({
|
|
4350
4333
|
name: "tg-marker",
|
|
4351
4334
|
mixins: [w],
|
|
4352
4335
|
inheritAttrs: !1,
|
|
@@ -4363,10 +4346,10 @@ const ni = /* @__PURE__ */ Z(ii, [["render", si]]), oi = C({
|
|
|
4363
4346
|
},
|
|
4364
4347
|
setup(i, { attrs: e }) {
|
|
4365
4348
|
return {
|
|
4366
|
-
attrs:
|
|
4349
|
+
attrs: F(e),
|
|
4367
4350
|
marker: void 0,
|
|
4368
|
-
label:
|
|
4369
|
-
info:
|
|
4351
|
+
label: ut(),
|
|
4352
|
+
info: ut()
|
|
4370
4353
|
};
|
|
4371
4354
|
},
|
|
4372
4355
|
watch: {
|
|
@@ -4399,7 +4382,7 @@ const ni = /* @__PURE__ */ Z(ii, [["render", si]]), oi = C({
|
|
|
4399
4382
|
}
|
|
4400
4383
|
},
|
|
4401
4384
|
onCreate() {
|
|
4402
|
-
this.marker = this.$map.createMarker(this), this.label && this.marker.setLabel(this.label.overlay), this.$clusterer() ? this.$clusterer().onAddMarker(this.marker) : this.$map.addOverlay(this.marker), this.info && this.info.show && this.info.overlay.open(this.marker),
|
|
4385
|
+
this.marker = this.$map.createMarker(this), this.label && this.marker.setLabel(this.label.overlay), this.$clusterer() ? this.$clusterer().onAddMarker(this.marker) : this.$map.addOverlay(this.marker), this.info && this.info.show && this.info.overlay.open(this.marker), V(this.attrs.listeners, this.marker);
|
|
4403
4386
|
},
|
|
4404
4387
|
onDestroy() {
|
|
4405
4388
|
this.$clusterer() ? this.$clusterer().onRemoveMarker(this.marker) : this.$map.removeOverlay(this.marker);
|
|
@@ -4426,13 +4409,13 @@ const ni = /* @__PURE__ */ Z(ii, [["render", si]]), oi = C({
|
|
|
4426
4409
|
}
|
|
4427
4410
|
});
|
|
4428
4411
|
function ai(i, e, t, r, s, n) {
|
|
4429
|
-
return
|
|
4412
|
+
return D(), Z("div", re({
|
|
4430
4413
|
class: i.$options.name
|
|
4431
4414
|
}, i.attrs.binds), [
|
|
4432
4415
|
A(i.$slots, "default")
|
|
4433
4416
|
], 16);
|
|
4434
4417
|
}
|
|
4435
|
-
const
|
|
4418
|
+
const Ce = /* @__PURE__ */ G(oi, [["render", ai]]), li = C({
|
|
4436
4419
|
name: "tg-info-box",
|
|
4437
4420
|
mixins: [w],
|
|
4438
4421
|
inheritAttrs: !1,
|
|
@@ -4446,7 +4429,7 @@ const we = /* @__PURE__ */ Z(oi, [["render", ai]]), li = C({
|
|
|
4446
4429
|
},
|
|
4447
4430
|
setup(i, { attrs: e }) {
|
|
4448
4431
|
return {
|
|
4449
|
-
attrs:
|
|
4432
|
+
attrs: F(e),
|
|
4450
4433
|
overlay: void 0
|
|
4451
4434
|
};
|
|
4452
4435
|
},
|
|
@@ -4473,7 +4456,7 @@ const we = /* @__PURE__ */ Z(oi, [["render", ai]]), li = C({
|
|
|
4473
4456
|
onCreate() {
|
|
4474
4457
|
this.overlay = this.$map.createInfoBox(this.getOptions()), this.$marker() ? this.$marker().onAddInfo(this) : this.show && this.overlay.open(), "update:show" in this.attrs.listeners && this.overlay.addEventListener("closeclick", () => {
|
|
4475
4458
|
this.$emit("update:show", !1);
|
|
4476
|
-
}),
|
|
4459
|
+
}), V(this.attrs.listeners, this.overlay);
|
|
4477
4460
|
},
|
|
4478
4461
|
onDestroy() {
|
|
4479
4462
|
this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
|
|
@@ -4493,7 +4476,7 @@ const we = /* @__PURE__ */ Z(oi, [["render", ai]]), li = C({
|
|
|
4493
4476
|
return this.$el;
|
|
4494
4477
|
},
|
|
4495
4478
|
$marker() {
|
|
4496
|
-
return de(this.$parent,
|
|
4479
|
+
return de(this.$parent, Ce);
|
|
4497
4480
|
},
|
|
4498
4481
|
open(i) {
|
|
4499
4482
|
this.overlay.open(i);
|
|
@@ -4504,13 +4487,13 @@ const we = /* @__PURE__ */ Z(oi, [["render", ai]]), li = C({
|
|
|
4504
4487
|
}
|
|
4505
4488
|
});
|
|
4506
4489
|
function hi(i, e, t, r, s, n) {
|
|
4507
|
-
return
|
|
4490
|
+
return D(), Z("div", re({
|
|
4508
4491
|
class: i.$options.name
|
|
4509
4492
|
}, i.attrs.binds), [
|
|
4510
4493
|
A(i.$slots, "default")
|
|
4511
4494
|
], 16);
|
|
4512
4495
|
}
|
|
4513
|
-
const ci = /* @__PURE__ */
|
|
4496
|
+
const ci = /* @__PURE__ */ G(li, [["render", hi]]), di = C({
|
|
4514
4497
|
name: "tg-info-window",
|
|
4515
4498
|
mixins: [w],
|
|
4516
4499
|
inheritAttrs: !1,
|
|
@@ -4523,7 +4506,7 @@ const ci = /* @__PURE__ */ Z(li, [["render", hi]]), di = C({
|
|
|
4523
4506
|
},
|
|
4524
4507
|
setup(i, { attrs: e }) {
|
|
4525
4508
|
return {
|
|
4526
|
-
attrs:
|
|
4509
|
+
attrs: F(e),
|
|
4527
4510
|
overlay: void 0
|
|
4528
4511
|
};
|
|
4529
4512
|
},
|
|
@@ -4549,7 +4532,7 @@ const ci = /* @__PURE__ */ Z(li, [["render", hi]]), di = C({
|
|
|
4549
4532
|
return this.$el;
|
|
4550
4533
|
},
|
|
4551
4534
|
$marker() {
|
|
4552
|
-
return de(this.$parent,
|
|
4535
|
+
return de(this.$parent, Ce);
|
|
4553
4536
|
},
|
|
4554
4537
|
getOptions() {
|
|
4555
4538
|
return {
|
|
@@ -4566,14 +4549,14 @@ const ci = /* @__PURE__ */ Z(li, [["render", hi]]), di = C({
|
|
|
4566
4549
|
this.$emit("update:show", !0);
|
|
4567
4550
|
}), this.overlay.addEventListener("close", () => {
|
|
4568
4551
|
this.$emit("update:show", !1);
|
|
4569
|
-
}),
|
|
4552
|
+
}), V(this.attrs.listeners, this.overlay);
|
|
4570
4553
|
},
|
|
4571
4554
|
onDestroy() {
|
|
4572
4555
|
this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
|
|
4573
4556
|
}
|
|
4574
4557
|
});
|
|
4575
4558
|
function pi(i, e, t, r, s, n) {
|
|
4576
|
-
return Ut((
|
|
4559
|
+
return Ut((D(), Z("div", re({
|
|
4577
4560
|
class: i.$options.name
|
|
4578
4561
|
}, i.attrs.binds), [
|
|
4579
4562
|
A(i.$slots, "default")
|
|
@@ -4581,7 +4564,7 @@ function pi(i, e, t, r, s, n) {
|
|
|
4581
4564
|
[Yt, i.show]
|
|
4582
4565
|
]);
|
|
4583
4566
|
}
|
|
4584
|
-
const ui = /* @__PURE__ */
|
|
4567
|
+
const ui = /* @__PURE__ */ G(di, [["render", pi]]), gi = C({
|
|
4585
4568
|
name: "tg-label",
|
|
4586
4569
|
mixins: [w],
|
|
4587
4570
|
inheritAttrs: !1,
|
|
@@ -4592,7 +4575,7 @@ const ui = /* @__PURE__ */ Z(di, [["render", pi]]), gi = C({
|
|
|
4592
4575
|
},
|
|
4593
4576
|
setup(i, { attrs: e }) {
|
|
4594
4577
|
return {
|
|
4595
|
-
attrs:
|
|
4578
|
+
attrs: F(e),
|
|
4596
4579
|
overlay: void 0
|
|
4597
4580
|
};
|
|
4598
4581
|
},
|
|
@@ -4619,7 +4602,7 @@ const ui = /* @__PURE__ */ Z(di, [["render", pi]]), gi = C({
|
|
|
4619
4602
|
return (i = this.$marker()) == null ? void 0 : i.marker;
|
|
4620
4603
|
},
|
|
4621
4604
|
$marker() {
|
|
4622
|
-
return de(this.$parent,
|
|
4605
|
+
return de(this.$parent, Ce);
|
|
4623
4606
|
},
|
|
4624
4607
|
getOptions() {
|
|
4625
4608
|
return {
|
|
@@ -4631,20 +4614,20 @@ const ui = /* @__PURE__ */ Z(di, [["render", pi]]), gi = C({
|
|
|
4631
4614
|
}
|
|
4632
4615
|
},
|
|
4633
4616
|
onCreate() {
|
|
4634
|
-
this.overlay = this.$map.createLabel(this.getOptions()), this.$marker() ? this.$marker().onAddLabel(this) : this.$map.addOverlay(this.overlay),
|
|
4617
|
+
this.overlay = this.$map.createLabel(this.getOptions()), this.$marker() ? this.$marker().onAddLabel(this) : this.$map.addOverlay(this.overlay), V(this.attrs.listeners, this.overlay);
|
|
4635
4618
|
},
|
|
4636
4619
|
onDestroy() {
|
|
4637
4620
|
this.$marker() ? this.$marker().onRemoveLabel(this) : this.$map.removeOverlay(this.overlay);
|
|
4638
4621
|
}
|
|
4639
4622
|
});
|
|
4640
4623
|
function mi(i, e, t, r, s, n) {
|
|
4641
|
-
return
|
|
4624
|
+
return D(), Z("div", re({
|
|
4642
4625
|
class: i.$options.name
|
|
4643
4626
|
}, i.attrs.binds), [
|
|
4644
4627
|
A(i.$slots, "default")
|
|
4645
4628
|
], 16);
|
|
4646
4629
|
}
|
|
4647
|
-
const fi = /* @__PURE__ */
|
|
4630
|
+
const fi = /* @__PURE__ */ G(gi, [["render", mi]]), yi = C({
|
|
4648
4631
|
name: "tg-polygon",
|
|
4649
4632
|
mixins: [w],
|
|
4650
4633
|
inheritAttrs: !1,
|
|
@@ -4661,7 +4644,7 @@ const fi = /* @__PURE__ */ Z(gi, [["render", mi]]), yi = C({
|
|
|
4661
4644
|
},
|
|
4662
4645
|
setup(i, { attrs: e }) {
|
|
4663
4646
|
return {
|
|
4664
|
-
attrs:
|
|
4647
|
+
attrs: F(e),
|
|
4665
4648
|
polygon: void 0
|
|
4666
4649
|
};
|
|
4667
4650
|
},
|
|
@@ -4698,7 +4681,7 @@ const fi = /* @__PURE__ */ Z(gi, [["render", mi]]), yi = C({
|
|
|
4698
4681
|
}
|
|
4699
4682
|
},
|
|
4700
4683
|
onCreate() {
|
|
4701
|
-
this.polygon = this.$map.createPolygon(this), this.$map.addOverlay(this.polygon),
|
|
4684
|
+
this.polygon = this.$map.createPolygon(this), this.$map.addOverlay(this.polygon), V(this.attrs.listeners, this.polygon);
|
|
4702
4685
|
},
|
|
4703
4686
|
onDestroy() {
|
|
4704
4687
|
this.$map.removeOverlay(this.polygon);
|
|
@@ -4718,7 +4701,7 @@ const fi = /* @__PURE__ */ Z(gi, [["render", mi]]), yi = C({
|
|
|
4718
4701
|
},
|
|
4719
4702
|
setup(i, { attrs: e }) {
|
|
4720
4703
|
return {
|
|
4721
|
-
attrs:
|
|
4704
|
+
attrs: F(e),
|
|
4722
4705
|
polyline: void 0
|
|
4723
4706
|
};
|
|
4724
4707
|
},
|
|
@@ -4749,19 +4732,19 @@ const fi = /* @__PURE__ */ Z(gi, [["render", mi]]), yi = C({
|
|
|
4749
4732
|
}
|
|
4750
4733
|
},
|
|
4751
4734
|
onCreate() {
|
|
4752
|
-
this.polyline = this.$map.createPolyline(this), this.$map.addOverlay(this.polyline),
|
|
4735
|
+
this.polyline = this.$map.createPolyline(this), this.$map.addOverlay(this.polyline), V(this.attrs.listeners, this.polyline);
|
|
4753
4736
|
},
|
|
4754
4737
|
onDestroy() {
|
|
4755
4738
|
this.$map.removeOverlay(this.polyline);
|
|
4756
4739
|
}
|
|
4757
|
-
}), _i = ["beforeUpdate", "updated"],
|
|
4740
|
+
}), _i = ["beforeUpdate", "updated"], zi = {
|
|
4758
4741
|
install(i, e = {}) {
|
|
4759
4742
|
if (e.enable !== !1) {
|
|
4760
4743
|
const t = C({
|
|
4761
4744
|
beforeCreate() {
|
|
4762
4745
|
const r = this.$options.name || this.$options._componentTag || "", n = (e.nameRegex || /^[A-Z]/).test(r) ? (a) => {
|
|
4763
4746
|
e.hookNames ? e.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : _i.includes(a) || console.debug("[lifecycle]", r, a);
|
|
4764
|
-
} :
|
|
4747
|
+
} : ye;
|
|
4765
4748
|
n("beforeCreate"), this.__life_impl = n;
|
|
4766
4749
|
},
|
|
4767
4750
|
created() {
|
|
@@ -4800,69 +4783,84 @@ const fi = /* @__PURE__ */ Z(gi, [["render", mi]]), yi = C({
|
|
|
4800
4783
|
i.mixin(t);
|
|
4801
4784
|
}
|
|
4802
4785
|
}
|
|
4803
|
-
}
|
|
4786
|
+
};
|
|
4787
|
+
var _t;
|
|
4788
|
+
((i) => {
|
|
4789
|
+
function e(r, s) {
|
|
4790
|
+
if (r !== void 0)
|
|
4791
|
+
return Object.values(s).includes(r) ? r : void 0;
|
|
4792
|
+
}
|
|
4793
|
+
i.toEnumOrNull = e;
|
|
4794
|
+
function t(r) {
|
|
4795
|
+
return r.split(`
|
|
4796
|
+
`).map((s) => s.trim()).join(`
|
|
4797
|
+
`);
|
|
4798
|
+
}
|
|
4799
|
+
i.trimIndent = t;
|
|
4800
|
+
})(_t || (_t = {}));
|
|
4801
|
+
const Ni = {
|
|
4804
4802
|
install(i, e) {
|
|
4805
|
-
|
|
4806
|
-
const t = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Dt, "./TgMapWidget.vue": Vr, "./controls/TgCustomControl.vue": Ur, "./controls/TgMapTypeControl.vue": Yr, "./controls/TgScaleControl.vue": Kr, "./controls/TgZoomControl.vue": qr, "./extra/TgMarkerClusterer.vue": Zt, "./layers/TgTrafficLayer.vue": Qr, "./overlays/TgCircle.vue": ei, "./overlays/TgElementOverlay.vue": ni, "./overlays/TgInfoBox.vue": ci, "./overlays/TgInfoWindow.vue": ui, "./overlays/TgLabel.vue": fi, "./overlays/TgMarker.vue":
|
|
4803
|
+
ur(e);
|
|
4804
|
+
const t = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Dt, "./TgMapWidget.vue": Vr, "./controls/TgCustomControl.vue": Ur, "./controls/TgMapTypeControl.vue": Yr, "./controls/TgScaleControl.vue": Kr, "./controls/TgZoomControl.vue": qr, "./extra/TgMarkerClusterer.vue": Zt, "./layers/TgTrafficLayer.vue": Qr, "./overlays/TgCircle.vue": ei, "./overlays/TgElementOverlay.vue": ni, "./overlays/TgInfoBox.vue": ci, "./overlays/TgInfoWindow.vue": ui, "./overlays/TgLabel.vue": fi, "./overlays/TgMarker.vue": Ce, "./overlays/TgPolygon.vue": yi, "./overlays/TgPolyline.vue": vi });
|
|
4807
4805
|
Object.keys(t).forEach((s) => {
|
|
4808
4806
|
const n = t[s];
|
|
4809
4807
|
i.component(n.name ?? x(`Tg开头的组件必须设置name: ${s}`), n);
|
|
4810
4808
|
});
|
|
4811
4809
|
const r = i.config.optionMergeStrategies;
|
|
4812
|
-
r[
|
|
4810
|
+
r[$e] = r[Ae] = (s, n) => s ? [...new Set([].concat(s, n))] : n;
|
|
4813
4811
|
}
|
|
4814
4812
|
};
|
|
4815
4813
|
export {
|
|
4816
4814
|
St as AbstractControl,
|
|
4817
|
-
|
|
4815
|
+
Re as AbstractMap,
|
|
4818
4816
|
Me as Arrays,
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4817
|
+
Ue as BaiduCircle,
|
|
4818
|
+
Ke as BaiduControl,
|
|
4819
|
+
lt as BaiduInfoBoxOverlay,
|
|
4820
|
+
st as BaiduInfoWindow,
|
|
4821
|
+
Xe as BaiduMapTypeControl,
|
|
4824
4822
|
he as BaiduMarker,
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4823
|
+
_r as BaiduMarkerClusterer,
|
|
4824
|
+
Oe as BaiduOverlay,
|
|
4825
|
+
He as BaiduPolygon,
|
|
4826
|
+
We as BaiduPolyline,
|
|
4827
|
+
et as BaiduScaleControl,
|
|
4828
|
+
Je as BaiduZoomControl,
|
|
4829
|
+
yt as CachedValue,
|
|
4832
4830
|
E as ControlPosition,
|
|
4833
4831
|
P as ControlPositionConverter,
|
|
4834
4832
|
K as CoordType,
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4833
|
+
Or as CustomControl,
|
|
4834
|
+
Tr as FastFindValues,
|
|
4835
|
+
Ye as GoogleCircle,
|
|
4836
|
+
qe as GoogleControl,
|
|
4837
|
+
ht as GoogleInfoBoxOverlay,
|
|
4838
|
+
nt as GoogleInfoWindow,
|
|
4841
4839
|
me as GoogleMapTypeControl,
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4840
|
+
rt as GoogleMarker,
|
|
4841
|
+
Mr as GoogleMarkerClusterer,
|
|
4842
|
+
Ze as GoogleOverlay,
|
|
4843
|
+
Fe as GooglePolygon,
|
|
4844
|
+
Ve as GooglePolyline,
|
|
4845
|
+
tt as GoogleScaleControl,
|
|
4846
|
+
Qe as GoogleZoomControl,
|
|
4849
4847
|
ee as Icon,
|
|
4850
|
-
|
|
4851
|
-
|
|
4848
|
+
it as InfoWindow,
|
|
4849
|
+
ft as KeyValue,
|
|
4852
4850
|
y as LatLng,
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4851
|
+
W as LatLngBounds,
|
|
4852
|
+
zi as LifecycleLogPlugin,
|
|
4853
|
+
$e as MIXIN_HOOK_CREATE,
|
|
4854
|
+
Ae as MIXIN_HOOK_DESTROY,
|
|
4855
|
+
Rt as MIXIN_MAP_NAME,
|
|
4858
4856
|
be as MVCArrays,
|
|
4859
4857
|
w as MapMixin,
|
|
4860
|
-
|
|
4858
|
+
At as MapTypeControlType,
|
|
4861
4859
|
Pt as MarkerClusterer,
|
|
4862
4860
|
le as Objects,
|
|
4863
4861
|
Bt as Overlay,
|
|
4864
4862
|
ce as Point,
|
|
4865
|
-
|
|
4863
|
+
_t as Strings,
|
|
4866
4864
|
ei as TgCircle,
|
|
4867
4865
|
Ur as TgCustomControl,
|
|
4868
4866
|
ni as TgElementOverlay,
|
|
@@ -4870,43 +4868,44 @@ export {
|
|
|
4870
4868
|
ui as TgInfoWindow,
|
|
4871
4869
|
fi as TgLabel,
|
|
4872
4870
|
Dt as TgMap,
|
|
4873
|
-
|
|
4871
|
+
Se as TgMapFactory,
|
|
4874
4872
|
$ as TgMapType,
|
|
4875
4873
|
Yr as TgMapTypeControl,
|
|
4876
4874
|
Vr as TgMapWidget,
|
|
4877
|
-
|
|
4875
|
+
Ce as TgMarker,
|
|
4878
4876
|
Zt as TgMarkerClusterer,
|
|
4879
4877
|
yi as TgPolygon,
|
|
4880
4878
|
vi as TgPolyline,
|
|
4881
4879
|
Kr as TgScaleControl,
|
|
4882
4880
|
Qr as TgTrafficLayer,
|
|
4883
4881
|
qr as TgZoomControl,
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4882
|
+
ge as callHook,
|
|
4883
|
+
Li as computedSaveOnThis,
|
|
4884
|
+
Nr as createEmptyVNode,
|
|
4885
|
+
zr as createPropertyObject,
|
|
4886
|
+
Bi as createPropertyObjectTyped,
|
|
4889
4887
|
Oi as debug,
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4888
|
+
Ni as default,
|
|
4889
|
+
Ai as eventLogMethods,
|
|
4890
|
+
$i as extractVNodeFromSlotsByComponent,
|
|
4891
|
+
Si as findByComponentType,
|
|
4892
|
+
Ct as getTgMapConfig,
|
|
4895
4893
|
Ci as isDef,
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4894
|
+
xi as isInstanceOf,
|
|
4895
|
+
wi as lateinit,
|
|
4896
|
+
ye as noop,
|
|
4899
4897
|
m as optionalProp,
|
|
4900
4898
|
z as requiredProp,
|
|
4901
|
-
|
|
4899
|
+
Ei as safeAs,
|
|
4902
4900
|
de as safeAsComponent,
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4901
|
+
ur as setTgMapConfig,
|
|
4902
|
+
F as splitAttrs,
|
|
4903
|
+
R as stringEnumProp,
|
|
4904
|
+
Ar as stringEnumPropFromArray,
|
|
4907
4905
|
x as throwError,
|
|
4908
|
-
|
|
4906
|
+
Jt as throwUnsupported,
|
|
4909
4907
|
Ti as todo,
|
|
4910
|
-
|
|
4908
|
+
ut as typed,
|
|
4909
|
+
ki as unwrapStringEnumValue
|
|
4911
4910
|
};
|
|
4912
4911
|
//# sourceMappingURL=tg-map.js.map
|