tg-map-vue3 3.7.11 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/src/components/TgMap.vue.d.ts +1 -1
- package/dist/src/components/TgMapWidget.vue.d.ts +1 -1
- package/dist/src/components/controls/TgCustomControl.vue.d.ts +1 -1
- package/dist/src/components/controls/TgMapTypeControl.vue.d.ts +1 -1
- package/dist/src/components/controls/TgScaleControl.vue.d.ts +1 -1
- package/dist/src/components/controls/TgStreetViewControl.vue.d.ts +1 -1
- package/dist/src/components/controls/TgZoomControl.vue.d.ts +1 -1
- package/dist/src/components/extra/TgHeatmap.vue.d.ts +1 -1
- package/dist/src/components/extra/TgMarkerClusterer.vue.d.ts +1 -1
- package/dist/src/components/layers/TgTrafficLayer.vue.d.ts +1 -1
- package/dist/src/components/map-mixin.d.ts +1 -1
- package/dist/src/components/overlays/TgCircle.vue.d.ts +1 -1
- package/dist/src/components/overlays/TgElementOverlay.vue.d.ts +1 -1
- package/dist/src/components/overlays/TgInfoBox.vue.d.ts +1 -1
- package/dist/src/components/overlays/TgInfoWindow.vue.d.ts +1 -1
- package/dist/src/components/overlays/TgLabel.vue.d.ts +1 -1
- package/dist/src/components/overlays/TgMarker.vue.d.ts +59 -115
- package/dist/src/components/overlays/TgPolygon.vue.d.ts +1 -1
- package/dist/src/components/overlays/TgPolyline.vue.d.ts +1 -1
- package/dist/src/components/overlays/TgRectangle.vue.d.ts +1 -1
- package/dist/tg-map.js +754 -753
- 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 +26 -27
package/dist/tg-map.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.baidu-info-box-container{transform:translateY(-11px);font-size:13px;font-weight:300;width:100vw}.baidu-info-box-container__border{position:absolute;padding:12px;background-color:#fff;box-shadow:0 2px 7px 1px #0000004d;border-radius:8px;transform:translate(-50%,-100%)}.baidu-info-box-container__inner{overflow:auto}.baidu-info-box-container__close{position:absolute;right:-6px;top:-6px;width:14px;height:14px;margin:8px;opacity:.6;cursor:pointer}.baidu-info-box-container__close:hover{opacity:1}.baidu-info-box-container:after{position:absolute;background-color:#fff;content:"";width:15px;height:15px;left:
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.baidu-info-box-container{transform:translateY(-11px);font-size:13px;font-weight:300;width:100vw}.baidu-info-box-container__border{position:absolute;padding:12px;background-color:#fff;box-shadow:0 2px 7px 1px #0000004d;border-radius:8px;transform:translate(-50%,-100%)}.baidu-info-box-container__inner{overflow:auto}.baidu-info-box-container__close{position:absolute;right:-6px;top:-6px;width:14px;height:14px;margin:8px;opacity:.6;cursor:pointer}.baidu-info-box-container__close:hover{opacity:1}.baidu-info-box-container:after{position:absolute;background-color:#fff;content:"";width:15px;height:15px;left:0;top:0;box-shadow:-2px 2px 2px #b2b2b266;transform:translate(-50%,-50%) rotate(-45deg)}.element-overlay{position:absolute}.tg-map{height:100%;position:relative}.tg-map__map{width:100%;height:100%}.tg-map__map--hide-logo-google .gm-style a[target=_blank]:has(>div>img){display:none!important}.tg-map__map--hide-logo-google .gm-style>div:last-child>div:last-child>div{display:none}.tg-map__map--hide-logo-baidu div.anchorBL>a[target=_blank]>img{display:none}.tg-map__map--hide-logo-baidu div.BMap_cpyCtrl{display:none}.tg-map-widget{position:absolute}.tg-map>.tg-custom-control{display:none}.tg-map .tg-element-overlay{display:none}.tg-map__map .tg-element-overlay{display:block}.tg-map .tg-info-box{display:none}.tg-map__map .tg-info-box{display:block}.tg-map .tg-label{display:none}.tg-map__map .tg-label{display:block}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
2
|
var Yr = Object.defineProperty;
|
|
3
3
|
var qr = (i, t, e) => t in i ? Yr(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
4
4
|
var u = (i, t, e) => (qr(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
5
|
-
import { createCommentVNode as
|
|
5
|
+
import { createCommentVNode as ft, computed as fr, defineComponent as P, markRaw as Kr, watch as De, openBlock as re, createElementBlock as ie, mergeProps as Oe, createElementVNode as Xr, normalizeClass as it, renderSlot as K, normalizeStyle as Jr, getCurrentInstance as Qr, inject as ei, onMounted as ti, onBeforeUnmount as ri, toRaw as st, withDirectives as ii, vShow as si } from "vue";
|
|
6
6
|
function se(i, t, e) {
|
|
7
7
|
Object.keys(i).forEach((r) => {
|
|
8
8
|
r.startsWith("update:") || e != null && e.includes(r) || t.addEventListener(r, i[r]);
|
|
@@ -15,15 +15,15 @@ function oi() {
|
|
|
15
15
|
function Ye(i, t) {
|
|
16
16
|
return t.__id__ || (t.__id__ = oi()), `${i}::${t.__id__}`;
|
|
17
17
|
}
|
|
18
|
-
var
|
|
19
|
-
function
|
|
18
|
+
var xt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
19
|
+
function nt(i) {
|
|
20
20
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
21
21
|
}
|
|
22
22
|
var vr = { exports: {} };
|
|
23
23
|
(function(i) {
|
|
24
24
|
(function(t, e) {
|
|
25
25
|
i.exports ? i.exports = e() : t.coordtransform = e();
|
|
26
|
-
})(
|
|
26
|
+
})(xt, function() {
|
|
27
27
|
var t = 52.35987755982988, e = 3.141592653589793, r = 6378245, s = 0.006693421622965943;
|
|
28
28
|
function n(p, h, f, M) {
|
|
29
29
|
this.west = Math.min(p, f), this.north = Math.max(h, M), this.east = Math.max(p, f), this.south = Math.min(h, M);
|
|
@@ -58,12 +58,12 @@ var vr = { exports: {} };
|
|
|
58
58
|
return !1;
|
|
59
59
|
}
|
|
60
60
|
function l(p, h) {
|
|
61
|
-
var f = p - 65e-4, M = h - 6e-3, T = Math.sqrt(f * f + M * M) - 2e-5 * Math.sin(M * t),
|
|
61
|
+
var f = p - 65e-4, M = h - 6e-3, T = Math.sqrt(f * f + M * M) - 2e-5 * Math.sin(M * t), C = Math.atan2(M, f) - 3e-6 * Math.cos(f * t), w = T * Math.cos(C), E = T * Math.sin(C);
|
|
62
62
|
return [w, E];
|
|
63
63
|
}
|
|
64
64
|
function d(p, h) {
|
|
65
|
-
var f = Math.sqrt(p * p + h * h) + 2e-5 * Math.sin(h * t), M = Math.atan2(h, p) + 3e-6 * Math.cos(p * t), T = f * Math.cos(M) + 65e-4,
|
|
66
|
-
return [T,
|
|
65
|
+
var f = Math.sqrt(p * p + h * h) + 2e-5 * Math.sin(h * t), M = Math.atan2(h, p) + 3e-6 * Math.cos(p * t), T = f * Math.cos(M) + 65e-4, C = f * Math.sin(M) + 6e-3;
|
|
66
|
+
return [T, C];
|
|
67
67
|
}
|
|
68
68
|
function m(p, h) {
|
|
69
69
|
return o(p, h) ? v(p, h) : [p, h];
|
|
@@ -75,10 +75,10 @@ var vr = { exports: {} };
|
|
|
75
75
|
return [p * 2 - f[0], h * 2 - f[1]];
|
|
76
76
|
}
|
|
77
77
|
function v(p, h) {
|
|
78
|
-
var f = b(p - 105, h - 35), M = y(p - 105, h - 35), T = h / 180 * e,
|
|
79
|
-
|
|
80
|
-
var w = Math.sqrt(
|
|
81
|
-
f = f * 180 / (r * (1 - s) / (
|
|
78
|
+
var f = b(p - 105, h - 35), M = y(p - 105, h - 35), T = h / 180 * e, C = Math.sin(T);
|
|
79
|
+
C = 1 - s * C * C;
|
|
80
|
+
var w = Math.sqrt(C);
|
|
81
|
+
f = f * 180 / (r * (1 - s) / (C * w) * e), M = M * 180 / (r / w * Math.cos(T) * e);
|
|
82
82
|
var E = h + f, D = p + M;
|
|
83
83
|
return [D, E];
|
|
84
84
|
}
|
|
@@ -117,60 +117,119 @@ var vr = { exports: {} };
|
|
|
117
117
|
});
|
|
118
118
|
})(vr);
|
|
119
119
|
var ai = vr.exports;
|
|
120
|
-
const pe = /* @__PURE__ */
|
|
120
|
+
const pe = /* @__PURE__ */ nt(ai);
|
|
121
|
+
var fe;
|
|
122
|
+
((i) => {
|
|
123
|
+
function t(c, o) {
|
|
124
|
+
return c.length === o.length && c.every((l, d) => l === o[d]);
|
|
125
|
+
}
|
|
126
|
+
i.equals = t;
|
|
127
|
+
function e(c, o) {
|
|
128
|
+
const l = c.indexOf(o);
|
|
129
|
+
if (l !== -1)
|
|
130
|
+
return c.splice(l, 1)[0];
|
|
131
|
+
}
|
|
132
|
+
i.remove = e;
|
|
133
|
+
function r(c, o) {
|
|
134
|
+
for (const l of c)
|
|
135
|
+
if (l instanceof o)
|
|
136
|
+
return l;
|
|
137
|
+
}
|
|
138
|
+
i.findByType = r;
|
|
139
|
+
function s(c, o) {
|
|
140
|
+
return c.includes(o);
|
|
141
|
+
}
|
|
142
|
+
i.includesTyped = s;
|
|
143
|
+
function n(c, o, l) {
|
|
144
|
+
const d = o >= 0 ? o : c.length + o;
|
|
145
|
+
if (l === void 0)
|
|
146
|
+
return c[d];
|
|
147
|
+
c[d] = l;
|
|
148
|
+
}
|
|
149
|
+
i.at = n;
|
|
150
|
+
function a(c) {
|
|
151
|
+
return c.length > 0;
|
|
152
|
+
}
|
|
153
|
+
i.isNotEmpty = a;
|
|
154
|
+
})(fe || (fe = {}));
|
|
155
|
+
var ve;
|
|
156
|
+
((i) => {
|
|
157
|
+
function t(s, n) {
|
|
158
|
+
const a = s.getLength();
|
|
159
|
+
for (let c = 0; c < a; c++)
|
|
160
|
+
if (s.getAt(c) === n)
|
|
161
|
+
return c;
|
|
162
|
+
return -1;
|
|
163
|
+
}
|
|
164
|
+
i.indexOf = t;
|
|
165
|
+
function e(s, n) {
|
|
166
|
+
const a = t(s, n);
|
|
167
|
+
if (a !== -1)
|
|
168
|
+
return s.removeAt(a);
|
|
169
|
+
}
|
|
170
|
+
i.remove = e;
|
|
171
|
+
function r(s, n) {
|
|
172
|
+
return [
|
|
173
|
+
s.addListener("insert_at", n),
|
|
174
|
+
s.addListener("remove_at", n),
|
|
175
|
+
s.addListener("set_at", n)
|
|
176
|
+
];
|
|
177
|
+
}
|
|
178
|
+
i.listenChanged = r;
|
|
179
|
+
})(ve || (ve = {}));
|
|
121
180
|
function me(i, t) {
|
|
122
181
|
if (!i)
|
|
123
182
|
throw new Error(`AssertionError: ${t}`);
|
|
124
183
|
}
|
|
125
|
-
function
|
|
184
|
+
function vt(i) {
|
|
126
185
|
throw new Error(`Unexpected object: ${i}`);
|
|
127
186
|
}
|
|
128
|
-
function
|
|
187
|
+
function ln() {
|
|
129
188
|
}
|
|
130
|
-
function
|
|
189
|
+
function yt(i) {
|
|
131
190
|
return i;
|
|
132
191
|
}
|
|
133
|
-
function
|
|
192
|
+
function hn(i, t) {
|
|
134
193
|
return i instanceof t;
|
|
135
194
|
}
|
|
136
|
-
function
|
|
195
|
+
function cn(i, t) {
|
|
137
196
|
if (i instanceof t)
|
|
138
197
|
return i;
|
|
139
198
|
}
|
|
140
|
-
function
|
|
199
|
+
function _t(i, t) {
|
|
141
200
|
return (i == null ? void 0 : i.$options.name) === t.name;
|
|
142
201
|
}
|
|
143
202
|
function yr(i, t) {
|
|
144
|
-
return
|
|
203
|
+
return _t(i, t) ? i : void 0;
|
|
145
204
|
}
|
|
146
|
-
function
|
|
205
|
+
function Et(i, t, e) {
|
|
147
206
|
let r = t;
|
|
148
207
|
for (; r; ) {
|
|
149
|
-
if (
|
|
208
|
+
if (_t(r, i))
|
|
150
209
|
return r;
|
|
151
|
-
if (e &&
|
|
210
|
+
if (e && _t(r, e))
|
|
152
211
|
return;
|
|
153
212
|
r = r.$parent;
|
|
154
213
|
}
|
|
155
214
|
}
|
|
156
|
-
function
|
|
215
|
+
function dn(i) {
|
|
157
216
|
return i;
|
|
158
217
|
}
|
|
159
218
|
function B(i) {
|
|
160
219
|
throw new Error(i);
|
|
161
220
|
}
|
|
162
|
-
function
|
|
221
|
+
function Pt(i) {
|
|
163
222
|
throw new Error(`Unsupported: ${i}`);
|
|
164
223
|
}
|
|
165
|
-
function
|
|
224
|
+
function un(i) {
|
|
166
225
|
throw new Error(`todo: ${i}`);
|
|
167
226
|
}
|
|
168
|
-
function
|
|
227
|
+
function pn(i) {
|
|
169
228
|
return i;
|
|
170
229
|
}
|
|
171
|
-
function
|
|
230
|
+
function Re(...i) {
|
|
172
231
|
}
|
|
173
|
-
function
|
|
232
|
+
function gn(i) {
|
|
174
233
|
return i != null;
|
|
175
234
|
}
|
|
176
235
|
function li(i) {
|
|
@@ -181,7 +240,7 @@ function hi(i) {
|
|
|
181
240
|
return () => t ?? (t = i().catch((e) => (t = null, Promise.reject(e))));
|
|
182
241
|
}
|
|
183
242
|
var A = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(A || {});
|
|
184
|
-
const
|
|
243
|
+
const ut = "wgs84", R = class R {
|
|
185
244
|
constructor(t, e, r) {
|
|
186
245
|
this.lat = t, this.lng = e, this.coord = r;
|
|
187
246
|
}
|
|
@@ -203,23 +262,23 @@ const gt = "wgs84", $ = class {
|
|
|
203
262
|
}
|
|
204
263
|
/** @param coord Baidu Map的坐标一般都是bd09 */
|
|
205
264
|
static fromBaidu(t, e) {
|
|
206
|
-
return new
|
|
265
|
+
return new R(t.lat, t.lng, e);
|
|
207
266
|
}
|
|
208
267
|
/** @param coord Google Map的坐标依据地图类型不同是不一样的 */
|
|
209
268
|
static fromGoogle(t, e) {
|
|
210
|
-
return new
|
|
269
|
+
return new R(t.lat(), t.lng(), e);
|
|
211
270
|
}
|
|
212
271
|
static fromHere(t, e) {
|
|
213
|
-
return new
|
|
272
|
+
return new R(t.lat, t.lng, e);
|
|
214
273
|
}
|
|
215
274
|
static fromLiteral(t) {
|
|
216
|
-
return new
|
|
275
|
+
return new R(t.lat, t.lng, t.coord || ut);
|
|
217
276
|
}
|
|
218
|
-
static fromLngLat(t, e, r =
|
|
219
|
-
return new
|
|
277
|
+
static fromLngLat(t, e, r = ut) {
|
|
278
|
+
return new R(e, t, r);
|
|
220
279
|
}
|
|
221
|
-
static create(t, e, r =
|
|
222
|
-
return new
|
|
280
|
+
static create(t, e, r = ut) {
|
|
281
|
+
return new R(t, e, r);
|
|
223
282
|
}
|
|
224
283
|
/** 转换坐标到指定坐标系 */
|
|
225
284
|
to(t) {
|
|
@@ -227,7 +286,7 @@ const gt = "wgs84", $ = class {
|
|
|
227
286
|
if (this.coord === e)
|
|
228
287
|
return this;
|
|
229
288
|
const [r, s] = this._convert(e);
|
|
230
|
-
return new
|
|
289
|
+
return new R(s, r, e);
|
|
231
290
|
}
|
|
232
291
|
/**
|
|
233
292
|
* TODO: normalize要不要默认设为true, 和google的行为保持一致?
|
|
@@ -237,7 +296,7 @@ const gt = "wgs84", $ = class {
|
|
|
237
296
|
*/
|
|
238
297
|
toBaidu(t, e = !1) {
|
|
239
298
|
let r = this.lat, s = this.lng;
|
|
240
|
-
return this.coord !== t && ([s, r] = this._convert(t)), e && ([s, r] =
|
|
299
|
+
return this.coord !== t && ([s, r] = this._convert(t)), e && ([s, r] = R._normalize(s, r)), new BMap.Point(s, r);
|
|
241
300
|
}
|
|
242
301
|
/**
|
|
243
302
|
* 转换成google的经纬度, 内部会自动进行标准化
|
|
@@ -276,8 +335,8 @@ const gt = "wgs84", $ = class {
|
|
|
276
335
|
* @see _normalize {@macro latlng_normalize}
|
|
277
336
|
*/
|
|
278
337
|
normalize() {
|
|
279
|
-
const [t, e] =
|
|
280
|
-
return e === this.lat && t === this.lng ? this : new
|
|
338
|
+
const [t, e] = R._normalize(this.lng, this.lat);
|
|
339
|
+
return e === this.lat && t === this.lng ? this : new R(e, t, this.coord);
|
|
281
340
|
}
|
|
282
341
|
equals(t) {
|
|
283
342
|
return this === t ? !0 : this.lat === t.lat && this.lng === t.lng && this.coord === t.coord;
|
|
@@ -286,9 +345,9 @@ const gt = "wgs84", $ = class {
|
|
|
286
345
|
return JSON.stringify(this);
|
|
287
346
|
}
|
|
288
347
|
};
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
const
|
|
348
|
+
u(R, "ZERO", R.create(0, 0));
|
|
349
|
+
let O = R;
|
|
350
|
+
const ae = class ae {
|
|
292
351
|
/**
|
|
293
352
|
* 不推荐直接创建LatLngBounds, sw和ne的大小关系可能没法保证, 推荐用LatLngBounds.Builder或者LatLngBounds.from等静态方法来创建
|
|
294
353
|
* @param sw 西南, lat/lng更小
|
|
@@ -304,7 +363,7 @@ const de = class {
|
|
|
304
363
|
static fromArray(t) {
|
|
305
364
|
if (t.length === 0)
|
|
306
365
|
return;
|
|
307
|
-
const e = new
|
|
366
|
+
const e = new ae.Builder(t[0]);
|
|
308
367
|
for (let r = 1; r < t.length; r++)
|
|
309
368
|
e.include(t[r]);
|
|
310
369
|
return e.build();
|
|
@@ -313,15 +372,15 @@ const de = class {
|
|
|
313
372
|
return this.fromArray(t) ?? B("positions中没有点");
|
|
314
373
|
}
|
|
315
374
|
static fromGoogle(t, e) {
|
|
316
|
-
return new
|
|
317
|
-
|
|
318
|
-
|
|
375
|
+
return new ae(
|
|
376
|
+
O.fromGoogle(t.getSouthWest(), e),
|
|
377
|
+
O.fromGoogle(t.getNorthEast(), e)
|
|
319
378
|
);
|
|
320
379
|
}
|
|
321
380
|
static fromBaidu(t, e) {
|
|
322
|
-
return new
|
|
323
|
-
|
|
324
|
-
|
|
381
|
+
return new ae(
|
|
382
|
+
O.fromBaidu(t.getSouthWest(), e),
|
|
383
|
+
O.fromBaidu(t.getNorthEast(), e)
|
|
325
384
|
);
|
|
326
385
|
}
|
|
327
386
|
static create(t, e) {
|
|
@@ -332,13 +391,13 @@ const de = class {
|
|
|
332
391
|
}
|
|
333
392
|
contains(t) {
|
|
334
393
|
const { lat: e, lng: r } = t.to(this.coord);
|
|
335
|
-
return this.sw.lat <= e && e <= this.ne.lat &&
|
|
394
|
+
return this.sw.lat <= e && e <= this.ne.lat && ae.isBetweenLng(this.sw.lng, this.ne.lng, r);
|
|
336
395
|
}
|
|
337
396
|
getCenter() {
|
|
338
397
|
if (this.sw.equals(this.ne))
|
|
339
398
|
return this.sw;
|
|
340
399
|
const t = (this.sw.lat + this.ne.lat) / 2, e = (this.sw.lng + this.ne.lng + (this.sw.lng < this.ne.lng ? 0 : 360)) / 2;
|
|
341
|
-
return
|
|
400
|
+
return O.create(t, e, this.coord);
|
|
342
401
|
}
|
|
343
402
|
toString() {
|
|
344
403
|
return JSON.stringify(this);
|
|
@@ -354,9 +413,9 @@ const de = class {
|
|
|
354
413
|
const t = this.sw.coord;
|
|
355
414
|
return [
|
|
356
415
|
this.sw,
|
|
357
|
-
|
|
416
|
+
O.fromLngLat(this.sw.lng, this.ne.lat, t),
|
|
358
417
|
this.ne,
|
|
359
|
-
|
|
418
|
+
O.fromLngLat(this.ne.lng, this.sw.lat, t)
|
|
360
419
|
];
|
|
361
420
|
}
|
|
362
421
|
toGoogle(t) {
|
|
@@ -369,8 +428,8 @@ const de = class {
|
|
|
369
428
|
return [this.sw.toBaidu(t), this.ne.toBaidu(t)];
|
|
370
429
|
}
|
|
371
430
|
};
|
|
372
|
-
|
|
373
|
-
|
|
431
|
+
u(ae, "EMPTY", new ae(O.ZERO, O.ZERO));
|
|
432
|
+
let X = ae;
|
|
374
433
|
((i) => {
|
|
375
434
|
class t {
|
|
376
435
|
constructor(r) {
|
|
@@ -384,9 +443,9 @@ u(F, "EMPTY", new de(C.ZERO, C.ZERO));
|
|
|
384
443
|
build() {
|
|
385
444
|
return new i(
|
|
386
445
|
// sw对应min
|
|
387
|
-
|
|
446
|
+
O.create(this.minLat, this.minLng, this.coord),
|
|
388
447
|
// ne对应max
|
|
389
|
-
|
|
448
|
+
O.create(this.maxLat, this.maxLng, this.coord)
|
|
390
449
|
);
|
|
391
450
|
}
|
|
392
451
|
include(r) {
|
|
@@ -398,7 +457,7 @@ u(F, "EMPTY", new de(C.ZERO, C.ZERO));
|
|
|
398
457
|
}
|
|
399
458
|
}
|
|
400
459
|
i.Builder = t;
|
|
401
|
-
})(
|
|
460
|
+
})(X || (X = {}));
|
|
402
461
|
var te;
|
|
403
462
|
((i) => {
|
|
404
463
|
function t(r, s) {
|
|
@@ -415,72 +474,13 @@ var te;
|
|
|
415
474
|
}
|
|
416
475
|
i.getCoordType = e;
|
|
417
476
|
})(te || (te = {}));
|
|
418
|
-
var
|
|
477
|
+
var bt;
|
|
419
478
|
((i) => {
|
|
420
479
|
function t(e) {
|
|
421
480
|
return e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight;
|
|
422
481
|
}
|
|
423
482
|
i.isScrollable = t;
|
|
424
|
-
})(
|
|
425
|
-
var ve;
|
|
426
|
-
((i) => {
|
|
427
|
-
function t(c, o) {
|
|
428
|
-
return c.length === o.length && c.every((l, d) => l === o[d]);
|
|
429
|
-
}
|
|
430
|
-
i.equals = t;
|
|
431
|
-
function e(c, o) {
|
|
432
|
-
const l = c.indexOf(o);
|
|
433
|
-
if (l !== -1)
|
|
434
|
-
return c.splice(l, 1)[0];
|
|
435
|
-
}
|
|
436
|
-
i.remove = e;
|
|
437
|
-
function r(c, o) {
|
|
438
|
-
for (const l of c)
|
|
439
|
-
if (l instanceof o)
|
|
440
|
-
return l;
|
|
441
|
-
}
|
|
442
|
-
i.findByType = r;
|
|
443
|
-
function s(c, o) {
|
|
444
|
-
return c.includes(o);
|
|
445
|
-
}
|
|
446
|
-
i.includesTyped = s;
|
|
447
|
-
function n(c, o, l) {
|
|
448
|
-
const d = o >= 0 ? o : c.length + o;
|
|
449
|
-
if (l === void 0)
|
|
450
|
-
return c[d];
|
|
451
|
-
c[d] = l;
|
|
452
|
-
}
|
|
453
|
-
i.at = n;
|
|
454
|
-
function a(c) {
|
|
455
|
-
return c.length > 0;
|
|
456
|
-
}
|
|
457
|
-
i.isNotEmpty = a;
|
|
458
|
-
})(ve || (ve = {}));
|
|
459
|
-
var ye;
|
|
460
|
-
((i) => {
|
|
461
|
-
function t(s, n) {
|
|
462
|
-
const a = s.getLength();
|
|
463
|
-
for (let c = 0; c < a; c++)
|
|
464
|
-
if (s.getAt(c) === n)
|
|
465
|
-
return c;
|
|
466
|
-
return -1;
|
|
467
|
-
}
|
|
468
|
-
i.indexOf = t;
|
|
469
|
-
function e(s, n) {
|
|
470
|
-
const a = t(s, n);
|
|
471
|
-
if (a !== -1)
|
|
472
|
-
return s.removeAt(a);
|
|
473
|
-
}
|
|
474
|
-
i.remove = e;
|
|
475
|
-
function r(s, n) {
|
|
476
|
-
return [
|
|
477
|
-
s.addListener("insert_at", n),
|
|
478
|
-
s.addListener("remove_at", n),
|
|
479
|
-
s.addListener("set_at", n)
|
|
480
|
-
];
|
|
481
|
-
}
|
|
482
|
-
i.listenChanged = r;
|
|
483
|
-
})(ye || (ye = {}));
|
|
483
|
+
})(bt || (bt = {}));
|
|
484
484
|
function _r(i, t, e) {
|
|
485
485
|
return i.addListener(t, e).remove;
|
|
486
486
|
}
|
|
@@ -503,7 +503,7 @@ class br {
|
|
|
503
503
|
return this.target = t, this;
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
|
-
class
|
|
506
|
+
class ot {
|
|
507
507
|
constructor(t, e) {
|
|
508
508
|
u(this, "eventHub", new Tr());
|
|
509
509
|
this.delegate = t, this.options = e;
|
|
@@ -518,34 +518,34 @@ class lt {
|
|
|
518
518
|
return this.delegate.setTarget(t), this;
|
|
519
519
|
}
|
|
520
520
|
addEventListener(t, e) {
|
|
521
|
-
if (
|
|
521
|
+
if (fe.includesTyped(this.options.types, t)) {
|
|
522
522
|
this.eventHub.hasListener(t) || this.options.onListen(t), this.eventHub.addEventListener(t, e);
|
|
523
523
|
return;
|
|
524
524
|
}
|
|
525
525
|
this.delegate.addEventListener(t, e);
|
|
526
526
|
}
|
|
527
527
|
removeEventListener(t, e) {
|
|
528
|
-
if (
|
|
528
|
+
if (fe.includesTyped(this.options.types, t)) {
|
|
529
529
|
this.eventHub.removeEventListener(t, e), this.eventHub.hasListener(t) || this.options.onCancel(t);
|
|
530
530
|
return;
|
|
531
531
|
}
|
|
532
532
|
this.delegate.removeEventListener(t, e);
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
const
|
|
535
|
+
const rt = class rt extends br {
|
|
536
536
|
addEventListener(t, e) {
|
|
537
537
|
const r = Ye(t, e);
|
|
538
538
|
if (this.eventMap.get(r)) {
|
|
539
539
|
console.warn("listener已经添加过了", r, e);
|
|
540
540
|
return;
|
|
541
541
|
}
|
|
542
|
-
const s = this.inner.addListener(
|
|
542
|
+
const s = this.inner.addListener(rt.EVENT_TYPE_MAP[t] || t, (n) => {
|
|
543
543
|
const a = {
|
|
544
544
|
type: t,
|
|
545
545
|
target: this.target,
|
|
546
546
|
originalEvent: n
|
|
547
547
|
};
|
|
548
|
-
n != null && n.latLng && (a.position =
|
|
548
|
+
n != null && n.latLng && (a.position = O.fromGoogle(n.latLng, this.coordTypeSupplier.coordType)), e.call(this.target, a);
|
|
549
549
|
});
|
|
550
550
|
this.eventMap.set(r, s);
|
|
551
551
|
}
|
|
@@ -554,9 +554,8 @@ const nr = class extends br {
|
|
|
554
554
|
s ? (s.remove(), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
|
|
555
555
|
}
|
|
556
556
|
};
|
|
557
|
-
let ue = nr;
|
|
558
557
|
// 事件类型映射: tg => google
|
|
559
|
-
u(
|
|
558
|
+
u(rt, "EVENT_TYPE_MAP", {
|
|
560
559
|
"center-changed": "center_changed",
|
|
561
560
|
"zoom-changed": "zoom_changed",
|
|
562
561
|
"radius-changed": "radius_changed",
|
|
@@ -572,7 +571,8 @@ u(ue, "EVENT_TYPE_MAP", {
|
|
|
572
571
|
"map-mouseup": "mouseup",
|
|
573
572
|
"map-dblclick": "dblclick"
|
|
574
573
|
});
|
|
575
|
-
|
|
574
|
+
let ye = rt;
|
|
575
|
+
const Se = class Se extends br {
|
|
576
576
|
addEventListener(t, e) {
|
|
577
577
|
const r = Ye(t, e);
|
|
578
578
|
if (this.eventMap.get(r)) {
|
|
@@ -585,19 +585,18 @@ const rt = class extends br {
|
|
|
585
585
|
target: this.target,
|
|
586
586
|
originalEvent: n
|
|
587
587
|
};
|
|
588
|
-
n.point && (a.position =
|
|
588
|
+
n.point && (a.position = O.fromBaidu(n.point, this.coordTypeSupplier.coordType)), e.call(this.target, a);
|
|
589
589
|
};
|
|
590
|
-
this.inner.addEventListener(
|
|
590
|
+
this.inner.addEventListener(Se.EVENT_TYPE_MAP[t] || t, s), this.eventMap.set(r, s);
|
|
591
591
|
}
|
|
592
592
|
removeEventListener(t, e) {
|
|
593
593
|
const r = Ye(t, e), s = this.eventMap.get(r);
|
|
594
|
-
s ? (this.inner.removeEventListener(
|
|
594
|
+
s ? (this.inner.removeEventListener(Se.EVENT_TYPE_MAP[t] || t, s), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
|
|
595
595
|
}
|
|
596
596
|
};
|
|
597
|
-
let fe = rt;
|
|
598
597
|
// cSpell:words clickclose
|
|
599
598
|
// 事件类型映射, tg => baidu
|
|
600
|
-
u(
|
|
599
|
+
u(Se, "EVENT_TYPE_MAP", {
|
|
601
600
|
drag: "dragging",
|
|
602
601
|
closeclick: "clickclose",
|
|
603
602
|
// baidu不支持contextmenu事件, 将其映射为rightclick
|
|
@@ -605,6 +604,7 @@ u(fe, "EVENT_TYPE_MAP", {
|
|
|
605
604
|
"zoom-changed": "zoomend",
|
|
606
605
|
"map-type-changed": "maptypechange"
|
|
607
606
|
});
|
|
607
|
+
let $e = Se;
|
|
608
608
|
class Tr {
|
|
609
609
|
constructor() {
|
|
610
610
|
u(this, "typeMap", /* @__PURE__ */ new Map());
|
|
@@ -615,7 +615,7 @@ class Tr {
|
|
|
615
615
|
}
|
|
616
616
|
removeEventListener(t, e) {
|
|
617
617
|
const r = this.typeMap.get(t);
|
|
618
|
-
r &&
|
|
618
|
+
r && fe.remove(r, e);
|
|
619
619
|
}
|
|
620
620
|
hasListener(t) {
|
|
621
621
|
const e = this.typeMap.get(t);
|
|
@@ -673,7 +673,7 @@ class ui {
|
|
|
673
673
|
return this.getOrNull(t, e) ?? B(`key(${e})不存在与valueMap(${this.getValueMap(t)})中`);
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
|
-
class
|
|
676
|
+
class Le {
|
|
677
677
|
constructor(t) {
|
|
678
678
|
u(this, "value");
|
|
679
679
|
this.creator = t;
|
|
@@ -682,7 +682,7 @@ class Pe {
|
|
|
682
682
|
return this.value === void 0 && (this.value = this.creator()), this.value;
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
|
-
var k = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-center", i.TOP_RIGHT = "top-right", i.BOTTOM_LEFT = "bottom-left", i.BOTTOM_CENTER = "bottom-center", i.BOTTOM_RIGHT = "bottom-right", i.LEFT_TOP = "left-top", i.LEFT_CENTER = "left-center", i.LEFT_BOTTOM = "left-bottom", i.RIGHT_TOP = "right-top", i.RIGHT_CENTER = "right-center", i.RIGHT_BOTTOM = "right-bottom", i))(k || {}),
|
|
685
|
+
var k = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-center", i.TOP_RIGHT = "top-right", i.BOTTOM_LEFT = "bottom-left", i.BOTTOM_CENTER = "bottom-center", i.BOTTOM_RIGHT = "bottom-right", i.LEFT_TOP = "left-top", i.LEFT_CENTER = "left-center", i.LEFT_BOTTOM = "left-bottom", i.RIGHT_TOP = "right-top", i.RIGHT_CENTER = "right-center", i.RIGHT_BOTTOM = "right-bottom", i))(k || {}), U;
|
|
686
686
|
((i) => {
|
|
687
687
|
let t, e;
|
|
688
688
|
const r = [
|
|
@@ -747,7 +747,7 @@ var k = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
747
747
|
])), e;
|
|
748
748
|
}
|
|
749
749
|
i.getGoogle = n;
|
|
750
|
-
})(
|
|
750
|
+
})(U || (U = {}));
|
|
751
751
|
class pi {
|
|
752
752
|
constructor(t) {
|
|
753
753
|
/** 实际添加到地图中的control对象 */
|
|
@@ -778,7 +778,7 @@ class gi extends Lt {
|
|
|
778
778
|
removeFrom(t) {
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
|
-
class
|
|
781
|
+
class Bt extends Lt {
|
|
782
782
|
constructor(t, e) {
|
|
783
783
|
super(), this.inner = t, this.position = e;
|
|
784
784
|
}
|
|
@@ -789,10 +789,10 @@ class Pt extends Lt {
|
|
|
789
789
|
t ? this.inner.show() : this.inner.hide();
|
|
790
790
|
}
|
|
791
791
|
getPosition() {
|
|
792
|
-
return this.position ??
|
|
792
|
+
return this.position ?? U.getBaidu().toKey(this.inner.getAnchor());
|
|
793
793
|
}
|
|
794
794
|
setPosition(t) {
|
|
795
|
-
this.position = t, this.inner.setAnchor(
|
|
795
|
+
this.position = t, this.inner.setAnchor(U.getBaidu().toValue(t));
|
|
796
796
|
}
|
|
797
797
|
addTo(t) {
|
|
798
798
|
t.innerMap.addControl(this.inner);
|
|
@@ -801,7 +801,7 @@ class Pt extends Lt {
|
|
|
801
801
|
t.innerMap.removeControl(this.inner);
|
|
802
802
|
}
|
|
803
803
|
}
|
|
804
|
-
class
|
|
804
|
+
class at extends Lt {
|
|
805
805
|
constructor(e, r) {
|
|
806
806
|
super();
|
|
807
807
|
u(this, "visible", !1);
|
|
@@ -828,7 +828,7 @@ class ht extends Lt {
|
|
|
828
828
|
}
|
|
829
829
|
onCreateOptions() {
|
|
830
830
|
return {
|
|
831
|
-
position:
|
|
831
|
+
position: U.getGoogle().toValue(this.position)
|
|
832
832
|
};
|
|
833
833
|
}
|
|
834
834
|
tryUpdateOptions() {
|
|
@@ -839,7 +839,7 @@ class ht extends Lt {
|
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
841
|
var Mr = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))(Mr || {});
|
|
842
|
-
class
|
|
842
|
+
class W {
|
|
843
843
|
constructor(t, e, r, s) {
|
|
844
844
|
this.id = t, this.baidu = e, this.google = r, this.googleCoordType = s;
|
|
845
845
|
}
|
|
@@ -860,19 +860,19 @@ class j {
|
|
|
860
860
|
return this.google();
|
|
861
861
|
}
|
|
862
862
|
asGoogleMapType() {
|
|
863
|
-
|
|
863
|
+
Pt("google的内置地图没有对应的实例");
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
|
-
class
|
|
866
|
+
class mn {
|
|
867
867
|
constructor(t, e) {
|
|
868
|
-
u(this, "baiduLayerCached", new
|
|
868
|
+
u(this, "baiduLayerCached", new Le(() => {
|
|
869
869
|
const t = new BMap.TileLayer({});
|
|
870
870
|
return t.getTilesUrl = (e, r) => {
|
|
871
871
|
const s = Math.pow(2, r - 1), n = e.x + s, a = s - 1 - e.y;
|
|
872
872
|
return this.options.getTileUrl({ x: n, y: a }, r);
|
|
873
873
|
}, t;
|
|
874
874
|
}));
|
|
875
|
-
u(this, "baiduMapTypeCached", new
|
|
875
|
+
u(this, "baiduMapTypeCached", new Le(() => {
|
|
876
876
|
const t = new BMap.MapType(this.options.name, this.baiduLayerCached.get(), {
|
|
877
877
|
maxZoom: this.options.maxZoom,
|
|
878
878
|
minZoom: this.options.minZoom,
|
|
@@ -880,7 +880,7 @@ class pn {
|
|
|
880
880
|
});
|
|
881
881
|
return t.__baidu_map_type__ = this, t;
|
|
882
882
|
}));
|
|
883
|
-
u(this, "googleCached", new
|
|
883
|
+
u(this, "googleCached", new Le(() => {
|
|
884
884
|
const t = new google.maps.ImageMapType({
|
|
885
885
|
getTileUrl: (e, r) => this.options.getTileUrl(e, r),
|
|
886
886
|
tileSize: new google.maps.Size(256, 256),
|
|
@@ -912,13 +912,13 @@ class pn {
|
|
|
912
912
|
return this.googleCached.get();
|
|
913
913
|
}
|
|
914
914
|
asGoogleLayer() {
|
|
915
|
-
|
|
915
|
+
Pt("这个方法不会被调用");
|
|
916
916
|
}
|
|
917
917
|
}
|
|
918
918
|
class mi {
|
|
919
919
|
constructor() {
|
|
920
|
-
u(this, "baiduCache", new
|
|
921
|
-
u(this, "googleCache", new
|
|
920
|
+
u(this, "baiduCache", new Le(() => new BMap.TrafficLayer()));
|
|
921
|
+
u(this, "googleCache", new Le(() => new google.maps.TrafficLayer()));
|
|
922
922
|
}
|
|
923
923
|
asBaiduLayer() {
|
|
924
924
|
return this.baiduCache.get();
|
|
@@ -929,7 +929,7 @@ class mi {
|
|
|
929
929
|
}
|
|
930
930
|
var V;
|
|
931
931
|
((i) => {
|
|
932
|
-
i.NORMAL = new
|
|
932
|
+
i.NORMAL = new W("normal", () => BMAP_NORMAL_MAP, () => google.maps.MapTypeId.ROADMAP, A.gcj02), i.SATELLITE = new W("satellite", () => BMAP_SATELLITE_MAP, () => google.maps.MapTypeId.SATELLITE, A.wgs84), i.HYBRID = new W("hybrid", () => BMAP_HYBRID_MAP, () => google.maps.MapTypeId.HYBRID, A.gcj02), i.TERRAIN = new W("terrain", () => (
|
|
933
933
|
/* 三维 */
|
|
934
934
|
BMAP_PERSPECTIVE_MAP
|
|
935
935
|
), () => (
|
|
@@ -937,11 +937,11 @@ var V;
|
|
|
937
937
|
google.maps.MapTypeId.TERRAIN
|
|
938
938
|
), A.wgs84), i.BUILD_IN_MAP_TYPES = new ui([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
|
|
939
939
|
})(V || (V = {}));
|
|
940
|
-
var
|
|
941
|
-
const
|
|
942
|
-
class
|
|
940
|
+
var Or = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(Or || {});
|
|
941
|
+
const Cr = [V.NORMAL, V.SATELLITE, V.HYBRID];
|
|
942
|
+
class It extends Bt {
|
|
943
943
|
static create(t) {
|
|
944
|
-
const e = t.mapTypes ??
|
|
944
|
+
const e = t.mapTypes ?? Cr, r = {
|
|
945
945
|
default: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
|
|
946
946
|
horizontal: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
|
|
947
947
|
dropdown: BMAP_MAPTYPE_CONTROL_DROPDOWN
|
|
@@ -949,74 +949,74 @@ class Bt extends Pt {
|
|
|
949
949
|
type: t.type && r[t.type],
|
|
950
950
|
mapTypes: e.map((n) => n.asBaiduMapType())
|
|
951
951
|
});
|
|
952
|
-
return t.position && s.setAnchor(
|
|
952
|
+
return t.position && s.setAnchor(U.getBaidu().toValue(t.position)), new It(s, t.position);
|
|
953
953
|
}
|
|
954
954
|
}
|
|
955
|
-
const
|
|
956
|
-
constructor(t = "default", e = k.TOP_LEFT, r =
|
|
957
|
-
super("mapType", e), this.type = t, this.mapTypes = r,
|
|
955
|
+
const ue = class ue extends at {
|
|
956
|
+
constructor(t = "default", e = k.TOP_LEFT, r = Cr) {
|
|
957
|
+
super("mapType", e), this.type = t, this.mapTypes = r, ue.type2google || (ue.type2google = {
|
|
958
958
|
default: google.maps.MapTypeControlStyle.DEFAULT,
|
|
959
959
|
horizontal: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
|
|
960
960
|
dropdown: google.maps.MapTypeControlStyle.DROPDOWN_MENU
|
|
961
961
|
});
|
|
962
962
|
}
|
|
963
963
|
static create(t) {
|
|
964
|
-
return new
|
|
964
|
+
return new ue(t.type, t.position, t.mapTypes);
|
|
965
965
|
}
|
|
966
966
|
onCreateOptions() {
|
|
967
967
|
const t = super.onCreateOptions();
|
|
968
|
-
return t.style =
|
|
968
|
+
return t.style = ue.type2google[this.type], t.mapTypeIds = this.mapTypes.map((e) => e instanceof W ? e.getGoogleMapTypeId() : e.id), t;
|
|
969
969
|
}
|
|
970
970
|
addTo(t) {
|
|
971
971
|
super.addTo(t), this.mapTypes.forEach((e) => {
|
|
972
|
-
e instanceof
|
|
972
|
+
e instanceof W || t.innerMap.mapTypes.set(e.id, e.asGoogleMapType());
|
|
973
973
|
});
|
|
974
974
|
}
|
|
975
975
|
};
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
class
|
|
976
|
+
u(ue, "type2google");
|
|
977
|
+
let Tt = ue;
|
|
978
|
+
class St extends Bt {
|
|
979
979
|
static create(t) {
|
|
980
980
|
const e = new BMap.ScaleControl({
|
|
981
|
-
anchor: t.position &&
|
|
981
|
+
anchor: t.position && U.getBaidu().toValue(t.position)
|
|
982
982
|
});
|
|
983
|
-
return new
|
|
983
|
+
return new St(e, t.position);
|
|
984
984
|
}
|
|
985
985
|
}
|
|
986
|
-
class
|
|
986
|
+
class kt extends at {
|
|
987
987
|
static create(t) {
|
|
988
|
-
return new
|
|
988
|
+
return new kt(t.position);
|
|
989
989
|
}
|
|
990
990
|
constructor(t = k.BOTTOM_RIGHT) {
|
|
991
991
|
super("scale", t);
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
|
-
class
|
|
994
|
+
class At extends gi {
|
|
995
995
|
static create(t) {
|
|
996
|
-
return new
|
|
996
|
+
return new At(!0, t.position ?? k.RIGHT_BOTTOM);
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
|
-
class
|
|
999
|
+
class Dt extends at {
|
|
1000
1000
|
static create(t) {
|
|
1001
|
-
return new
|
|
1001
|
+
return new Dt(t.position);
|
|
1002
1002
|
}
|
|
1003
1003
|
constructor(t = k.RIGHT_BOTTOM) {
|
|
1004
1004
|
super("streetView", t);
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
|
-
class
|
|
1007
|
+
class Rt extends Bt {
|
|
1008
1008
|
static create(t) {
|
|
1009
1009
|
const e = new BMap.NavigationControl({
|
|
1010
1010
|
type: BMAP_NAVIGATION_CONTROL_ZOOM,
|
|
1011
1011
|
// enableGeolocation: true,
|
|
1012
|
-
anchor: t.position &&
|
|
1012
|
+
anchor: t.position && U.getBaidu().toValue(t.position)
|
|
1013
1013
|
});
|
|
1014
|
-
return new
|
|
1014
|
+
return new Rt(e, t.position);
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
|
-
class
|
|
1017
|
+
class $t extends at {
|
|
1018
1018
|
static create(t) {
|
|
1019
|
-
return new
|
|
1019
|
+
return new $t(t.position);
|
|
1020
1020
|
}
|
|
1021
1021
|
constructor(t = k.RIGHT_BOTTOM) {
|
|
1022
1022
|
super("zoom", t);
|
|
@@ -1034,7 +1034,7 @@ function fi(i) {
|
|
|
1034
1034
|
m[a] ? console.warn(s + " only loads once. Ignoring:", i) : m[a] = (y, ...p) => g.add(y) && b().then(() => m[a](y, ...p));
|
|
1035
1035
|
}
|
|
1036
1036
|
let vi, yi;
|
|
1037
|
-
const
|
|
1037
|
+
const he = {
|
|
1038
1038
|
/** Google的坐标0点 */
|
|
1039
1039
|
get LATLNG_ZERO() {
|
|
1040
1040
|
return vi ?? (vi = new google.maps.LatLng({ lat: 0, lng: 0 }));
|
|
@@ -1077,7 +1077,7 @@ function xr(i, t) {
|
|
|
1077
1077
|
city: (e == null ? void 0 : e.city) ?? "",
|
|
1078
1078
|
id: i.place_id ?? "",
|
|
1079
1079
|
address: i.formatted_address ?? "",
|
|
1080
|
-
position:
|
|
1080
|
+
position: O.fromGoogle(((r = i.geometry) == null ? void 0 : r.location) ?? he.LATLNG_ZERO, t.coordType),
|
|
1081
1081
|
title: i.name ?? ""
|
|
1082
1082
|
};
|
|
1083
1083
|
}
|
|
@@ -1158,11 +1158,11 @@ class bi extends Er {
|
|
|
1158
1158
|
};
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
|
-
var
|
|
1161
|
+
var Pr = { exports: {} };
|
|
1162
1162
|
(function(i, t) {
|
|
1163
1163
|
(function(e, r) {
|
|
1164
1164
|
i.exports = r();
|
|
1165
|
-
})(
|
|
1165
|
+
})(xt, function() {
|
|
1166
1166
|
const e = function() {
|
|
1167
1167
|
var n = {
|
|
1168
1168
|
defaultRadius: 40,
|
|
@@ -1182,14 +1182,14 @@ var Lr = { exports: {} };
|
|
|
1182
1182
|
return v.prototype = {
|
|
1183
1183
|
// when forceRender = false -> called from setData, omits renderall event
|
|
1184
1184
|
_organiseData: function(y, p) {
|
|
1185
|
-
var h = y[this._xField], f = y[this._yField], M = this._radi, T = this._data,
|
|
1186
|
-
return T[h] || (T[h] = [], M[h] = []), T[h][f] ? T[h][f] += E : (T[h][f] = E, M[h][f] = D), T[h][f] >
|
|
1185
|
+
var h = y[this._xField], f = y[this._yField], M = this._radi, T = this._data, C = this._max, w = this._min, E = y[this._valueField] || 1, D = y.radius || this._cfgRadius || b;
|
|
1186
|
+
return T[h] || (T[h] = [], M[h] = []), T[h][f] ? T[h][f] += E : (T[h][f] = E, M[h][f] = D), T[h][f] > C ? (p ? this.setDataMax(T[h][f]) : this._max = T[h][f], !1) : {
|
|
1187
1187
|
x: h,
|
|
1188
1188
|
y: f,
|
|
1189
1189
|
value: E,
|
|
1190
1190
|
radius: D,
|
|
1191
1191
|
min: w,
|
|
1192
|
-
max:
|
|
1192
|
+
max: C
|
|
1193
1193
|
};
|
|
1194
1194
|
},
|
|
1195
1195
|
_unOrganizeData: function() {
|
|
@@ -1300,27 +1300,27 @@ var Lr = { exports: {} };
|
|
|
1300
1300
|
var v = function(h) {
|
|
1301
1301
|
var f = h.gradient || h.defaultGradient, M = document.createElement("canvas"), T = M.getContext("2d");
|
|
1302
1302
|
M.width = 256, M.height = 1;
|
|
1303
|
-
var
|
|
1303
|
+
var C = T.createLinearGradient(0, 0, 256, 1);
|
|
1304
1304
|
for (var w in f)
|
|
1305
|
-
|
|
1306
|
-
return T.fillStyle =
|
|
1305
|
+
C.addColorStop(w, f[w]);
|
|
1306
|
+
return T.fillStyle = C, T.fillRect(0, 0, 256, 1), T.getImageData(0, 0, 256, 1).data;
|
|
1307
1307
|
}, b = function(h, f) {
|
|
1308
|
-
var M = document.createElement("canvas"), T = M.getContext("2d"),
|
|
1308
|
+
var M = document.createElement("canvas"), T = M.getContext("2d"), C = h, w = h;
|
|
1309
1309
|
if (M.width = M.height = h * 2, f == 1)
|
|
1310
|
-
T.beginPath(), T.arc(
|
|
1310
|
+
T.beginPath(), T.arc(C, w, h, 0, 2 * Math.PI, !1), T.fillStyle = "rgba(0,0,0,1)", T.fill();
|
|
1311
1311
|
else {
|
|
1312
|
-
var E = T.createRadialGradient(
|
|
1312
|
+
var E = T.createRadialGradient(C, w, h * f, C, w, h);
|
|
1313
1313
|
E.addColorStop(0, "rgba(0,0,0,1)"), E.addColorStop(1, "rgba(0,0,0,0)"), T.fillStyle = E, T.fillRect(0, 0, 2 * h, 2 * h);
|
|
1314
1314
|
}
|
|
1315
1315
|
return M;
|
|
1316
1316
|
}, y = function(w) {
|
|
1317
|
-
for (var f = [], M = w.min, T = w.max,
|
|
1318
|
-
for (var
|
|
1319
|
-
var I =
|
|
1317
|
+
for (var f = [], M = w.min, T = w.max, C = w.radi, w = w.data, E = Object.keys(w), D = E.length; D--; )
|
|
1318
|
+
for (var N = E[D], L = Object.keys(w[N]), J = L.length; J--; ) {
|
|
1319
|
+
var I = L[J], G = w[N][I], Q = C[N][I];
|
|
1320
1320
|
f.push({
|
|
1321
|
-
x:
|
|
1321
|
+
x: N,
|
|
1322
1322
|
y: I,
|
|
1323
|
-
value:
|
|
1323
|
+
value: G,
|
|
1324
1324
|
radius: Q
|
|
1325
1325
|
});
|
|
1326
1326
|
}
|
|
@@ -1333,8 +1333,8 @@ var Lr = { exports: {} };
|
|
|
1333
1333
|
function p(h) {
|
|
1334
1334
|
var f = h.element, M = this.shadowCanvas = document.createElement("canvas"), T = this.canvas = h.canvas || document.createElement("canvas");
|
|
1335
1335
|
this._renderBoundaries = [1e4, 1e4, 0, 0];
|
|
1336
|
-
var
|
|
1337
|
-
T.className = "heatmap-canvas", this._width = T.width = M.width = +
|
|
1336
|
+
var C = getComputedStyle(h.element) || {};
|
|
1337
|
+
T.className = "heatmap-canvas", this._width = T.width = M.width = +C.width.replace(/px/, ""), this._height = T.height = M.height = +C.height.replace(/px/, ""), this.shadowCtx = M.getContext("2d"), this.ctx = T.getContext("2d"), T.style.cssText = M.style.cssText = "position:absolute;left:0;top:0;", f.style.position = "relative", f.appendChild(T), this._palette = v(h), this._templates = {}, this._setStyles(h);
|
|
1338
1338
|
}
|
|
1339
1339
|
return p.prototype = {
|
|
1340
1340
|
renderPartial: function(h) {
|
|
@@ -1359,26 +1359,26 @@ var Lr = { exports: {} };
|
|
|
1359
1359
|
this._blur = h.blur == 0 ? 0 : h.blur || h.defaultBlur, h.backgroundColor && (this.canvas.style.backgroundColor = h.backgroundColor), this._opacity = (h.opacity || 0) * 255, this._maxOpacity = (h.maxOpacity || h.defaultMaxOpacity) * 255, this._minOpacity = (h.minOpacity || h.defaultMinOpacity) * 255, this._useGradientOpacity = !!h.useGradientOpacity;
|
|
1360
1360
|
},
|
|
1361
1361
|
_drawAlpha: function(T) {
|
|
1362
|
-
for (var f = this._min = T.min, M = this._max = T.max, T = T.data || [],
|
|
1363
|
-
var E = T[
|
|
1364
|
-
this._templates[
|
|
1362
|
+
for (var f = this._min = T.min, M = this._max = T.max, T = T.data || [], C = T.length, w = 1 - this._blur; C--; ) {
|
|
1363
|
+
var E = T[C], D = E.x, N = E.y, L = E.radius, J = Math.min(E.value, M), I = D - L, G = N - L, Q = this.shadowCtx, Z;
|
|
1364
|
+
this._templates[L] ? Z = this._templates[L] : this._templates[L] = Z = b(L, w), Q.globalAlpha = (J - f) / (M - f), Q.drawImage(Z, I, G), I < this._renderBoundaries[0] && (this._renderBoundaries[0] = I), G < this._renderBoundaries[1] && (this._renderBoundaries[1] = G), I + 2 * L > this._renderBoundaries[2] && (this._renderBoundaries[2] = I + 2 * L), G + 2 * L > this._renderBoundaries[3] && (this._renderBoundaries[3] = G + 2 * L);
|
|
1365
1365
|
}
|
|
1366
1366
|
},
|
|
1367
1367
|
_colorize: function() {
|
|
1368
|
-
var h = this._renderBoundaries[0], f = this._renderBoundaries[1], M = this._renderBoundaries[2] - h, T = this._renderBoundaries[3] - f,
|
|
1369
|
-
h < 0 && (h = 0), f < 0 && (f = 0), h + M >
|
|
1370
|
-
for (var J = this.shadowCtx.getImageData(h, f, M, T), I = J.data,
|
|
1371
|
-
var
|
|
1372
|
-
if (
|
|
1368
|
+
var h = this._renderBoundaries[0], f = this._renderBoundaries[1], M = this._renderBoundaries[2] - h, T = this._renderBoundaries[3] - f, C = this._width, w = this._height, E = this._opacity, D = this._maxOpacity, N = this._minOpacity, L = this._useGradientOpacity;
|
|
1369
|
+
h < 0 && (h = 0), f < 0 && (f = 0), h + M > C && (M = C - h), f + T > w && (T = w - f);
|
|
1370
|
+
for (var J = this.shadowCtx.getImageData(h, f, M, T), I = J.data, G = I.length, Q = this._palette, Z = 3; Z < G; Z += 4) {
|
|
1371
|
+
var je = I[Z], Ce = je * 4;
|
|
1372
|
+
if (Ce) {
|
|
1373
1373
|
var we;
|
|
1374
|
-
E > 0 ? we = E :
|
|
1374
|
+
E > 0 ? we = E : je < D ? je < N ? we = N : we = je : we = D, I[Z - 3] = Q[Ce], I[Z - 2] = Q[Ce + 1], I[Z - 1] = Q[Ce + 2], I[Z] = L ? Q[Ce + 3] : we;
|
|
1375
1375
|
}
|
|
1376
1376
|
}
|
|
1377
1377
|
this.ctx.putImageData(J, h, f), this._renderBoundaries = [1e3, 1e3, 0, 0];
|
|
1378
1378
|
},
|
|
1379
1379
|
getValueAt: function(h) {
|
|
1380
|
-
var f, M = this.shadowCtx, T = M.getImageData(h.x, h.y, 1, 1),
|
|
1381
|
-
return f = Math.abs(w - E) * (
|
|
1380
|
+
var f, M = this.shadowCtx, T = M.getImageData(h.x, h.y, 1, 1), C = T.data[3], w = this._max, E = this._min;
|
|
1381
|
+
return f = Math.abs(w - E) * (C / 255) >> 0, f;
|
|
1382
1382
|
},
|
|
1383
1383
|
getDataURL: function() {
|
|
1384
1384
|
return this.canvas.toDataURL();
|
|
@@ -1403,15 +1403,15 @@ var Lr = { exports: {} };
|
|
|
1403
1403
|
}
|
|
1404
1404
|
return h.prototype = {
|
|
1405
1405
|
on: function(f, M, T) {
|
|
1406
|
-
var
|
|
1407
|
-
|
|
1406
|
+
var C = this.cStore;
|
|
1407
|
+
C[f] || (C[f] = []), C[f].push(function(w) {
|
|
1408
1408
|
return M.call(T, w);
|
|
1409
1409
|
});
|
|
1410
1410
|
},
|
|
1411
1411
|
emit: function(f, M) {
|
|
1412
1412
|
var T = this.cStore;
|
|
1413
1413
|
if (T[f])
|
|
1414
|
-
for (var
|
|
1414
|
+
for (var C = T[f].length, w = 0; w < C; w++) {
|
|
1415
1415
|
var E = T[f][w];
|
|
1416
1416
|
E(M);
|
|
1417
1417
|
}
|
|
@@ -1585,9 +1585,9 @@ var Lr = { exports: {} };
|
|
|
1585
1585
|
}
|
|
1586
1586
|
return r;
|
|
1587
1587
|
});
|
|
1588
|
-
})(
|
|
1589
|
-
var Ti =
|
|
1590
|
-
const Mi = /* @__PURE__ */
|
|
1588
|
+
})(Pr);
|
|
1589
|
+
var Ti = Pr.exports;
|
|
1590
|
+
const Mi = /* @__PURE__ */ nt(Ti), lr = 10, qe = {
|
|
1591
1591
|
toGoogle: (i, t) => ({
|
|
1592
1592
|
opacity: i.opacity,
|
|
1593
1593
|
radius: i.radius ?? lr,
|
|
@@ -1614,9 +1614,9 @@ const Mi = /* @__PURE__ */ at(Ti), lr = 10, qe = {
|
|
|
1614
1614
|
}), max: e ?? r };
|
|
1615
1615
|
}
|
|
1616
1616
|
};
|
|
1617
|
-
class
|
|
1617
|
+
class Lr {
|
|
1618
1618
|
}
|
|
1619
|
-
class
|
|
1619
|
+
class Oi extends Lr {
|
|
1620
1620
|
constructor(e, r) {
|
|
1621
1621
|
super();
|
|
1622
1622
|
u(this, "inner");
|
|
@@ -1632,7 +1632,7 @@ class Ci extends Pr {
|
|
|
1632
1632
|
this.inner.setMap(null);
|
|
1633
1633
|
}
|
|
1634
1634
|
}
|
|
1635
|
-
class
|
|
1635
|
+
class Ci extends Lr {
|
|
1636
1636
|
constructor(e, r) {
|
|
1637
1637
|
super();
|
|
1638
1638
|
u(this, "inner");
|
|
@@ -1672,14 +1672,14 @@ function Be(i, t, e) {
|
|
|
1672
1672
|
const r = new URL(t, i), s = new URLSearchParams(Object.entries(e).filter(li));
|
|
1673
1673
|
return r.search = "?" + s.toString(), r;
|
|
1674
1674
|
}
|
|
1675
|
-
function
|
|
1675
|
+
function pt() {
|
|
1676
1676
|
const i = window.location.hostname.split(".").filter((t) => !be.isInt(t));
|
|
1677
1677
|
return i.length === 3 ? i.join(".") : [...i, "tg", "map", "urls"].slice(0, 3).join(".");
|
|
1678
1678
|
}
|
|
1679
|
-
const
|
|
1679
|
+
const ke = class ke extends Br {
|
|
1680
1680
|
/** @see https://developers.google.com/maps/documentation/urls/get-started#directions-action */
|
|
1681
1681
|
directions(t, e, r) {
|
|
1682
|
-
return Be(
|
|
1682
|
+
return Be(ke.BASE_URL, "dir/", {
|
|
1683
1683
|
api: "1",
|
|
1684
1684
|
// {@template google_map_normal_gcj02}
|
|
1685
1685
|
// google地图的普通地图, 在国内其实上是gcj02坐标, 卫星地图是wgs84坐标, 因为这里打开的是基础地图, 故使用gcj02
|
|
@@ -1691,23 +1691,23 @@ const it = class extends Br {
|
|
|
1691
1691
|
}
|
|
1692
1692
|
/** @see https://developers.google.com/maps/documentation/urls/get-started#search-action */
|
|
1693
1693
|
search(t) {
|
|
1694
|
-
return Be(
|
|
1694
|
+
return Be(ke.BASE_URL, "search/", {
|
|
1695
1695
|
api: "1",
|
|
1696
1696
|
// {@macro google_map_normal_gcj02}
|
|
1697
1697
|
query: te.toString(t, A.gcj02)
|
|
1698
1698
|
});
|
|
1699
1699
|
}
|
|
1700
1700
|
};
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
const
|
|
1701
|
+
u(ke, "BASE_URL", "https://www.google.com/maps/");
|
|
1702
|
+
let Mt = ke;
|
|
1703
|
+
const ge = class ge extends Br {
|
|
1704
1704
|
/**
|
|
1705
1705
|
* 导航
|
|
1706
1706
|
* @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#:~:text=%E6%9C%8D%E5%8A%A1%E5%9C%B0%E5%9D%80-,http%3A//api.map.baidu.com/direction,-//PC%26Webapp%E6%9C%8D%E5%8A%A1
|
|
1707
1707
|
* */
|
|
1708
1708
|
directions(t, e, r = "driving") {
|
|
1709
1709
|
const s = te.getCoordType(e) ?? te.getCoordType(t) ?? A.bd09, n = te.toString(e, s);
|
|
1710
|
-
return Be(
|
|
1710
|
+
return Be(ge.BASE_URL, "direction", {
|
|
1711
1711
|
// baidu地图, 一定要有起点, 故这里用终点当起点, 防止导航失败
|
|
1712
1712
|
origin: te.toString(t, s) ?? (typeof e != "string" ? `name:请选择起点|latlng:${n}` : n),
|
|
1713
1713
|
destination: n,
|
|
@@ -1716,7 +1716,7 @@ const Se = class extends Br {
|
|
|
1716
1716
|
mode: r,
|
|
1717
1717
|
output: "html",
|
|
1718
1718
|
region: "中国",
|
|
1719
|
-
src:
|
|
1719
|
+
src: pt()
|
|
1720
1720
|
});
|
|
1721
1721
|
}
|
|
1722
1722
|
search(t) {
|
|
@@ -1734,13 +1734,13 @@ const Se = class extends Br {
|
|
|
1734
1734
|
* @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#%E5%9B%BE%E5%8C%BA%E5%8A%9F%E8%83%BD
|
|
1735
1735
|
*/
|
|
1736
1736
|
markerApi(t, e, r) {
|
|
1737
|
-
return Be(
|
|
1737
|
+
return Be(ge.BASE_URL, "marker", {
|
|
1738
1738
|
location: `${t.lat},${t.lng}`,
|
|
1739
1739
|
coord_type: t.coord === A.bd09 ? void 0 : t.coord,
|
|
1740
1740
|
title: e,
|
|
1741
1741
|
content: r,
|
|
1742
1742
|
output: "html",
|
|
1743
|
-
src:
|
|
1743
|
+
src: pt()
|
|
1744
1744
|
});
|
|
1745
1745
|
}
|
|
1746
1746
|
/**
|
|
@@ -1748,7 +1748,7 @@ const Se = class extends Br {
|
|
|
1748
1748
|
* @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#%E5%9B%BE%E5%8C%BA%E5%8A%9F%E8%83%BD:~:text=%E4%B8%8D%E4%BF%9D%E8%AF%81%E6%9C%8D%E5%8A%A1%E3%80%82-,2.1.2%20%E5%9C%B0%E5%9D%80%E8%A7%A3%E6%9E%90,-%E8%B0%83%E7%94%A8%E8%AF%A5
|
|
1749
1749
|
* */
|
|
1750
1750
|
geocoderApi(t) {
|
|
1751
|
-
return Be(
|
|
1751
|
+
return Be(ge.BASE_URL, "geocoder", {
|
|
1752
1752
|
...typeof t == "string" ? {
|
|
1753
1753
|
address: t
|
|
1754
1754
|
} : {
|
|
@@ -1757,13 +1757,12 @@ const Se = class extends Br {
|
|
|
1757
1757
|
coord_type: t.coord === A.bd09 ? void 0 : t.coord
|
|
1758
1758
|
},
|
|
1759
1759
|
output: "html",
|
|
1760
|
-
src:
|
|
1760
|
+
src: pt()
|
|
1761
1761
|
});
|
|
1762
1762
|
}
|
|
1763
1763
|
};
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
let wi = class Ir {
|
|
1764
|
+
u(ge, "BASE_URL", "https://api.map.baidu.com/");
|
|
1765
|
+
let Ot = ge, wi = class Ir {
|
|
1767
1766
|
constructor(t, e, r) {
|
|
1768
1767
|
this.extend(Ir, google.maps.OverlayView), this.map_ = t, this.MARKER_CLUSTER_IMAGE_PATH_ = "../images/m", this.MARKER_CLUSTER_IMAGE_EXTENSION_ = "png", this.markers_ = [], this.clusters_ = [], this.sizes = [53, 56, 66, 78, 90], this.styles_ = [], this.ready_ = !1;
|
|
1769
1768
|
var s = r || {};
|
|
@@ -1788,11 +1787,11 @@ let wi = class Ir {
|
|
|
1788
1787
|
* @ignore
|
|
1789
1788
|
*/
|
|
1790
1789
|
extend(t, e) {
|
|
1791
|
-
return function(r) {
|
|
1790
|
+
return (function(r) {
|
|
1792
1791
|
for (var s in r.prototype)
|
|
1793
1792
|
this.prototype[s] = r.prototype[s];
|
|
1794
1793
|
return this;
|
|
1795
|
-
}.apply(t, [e]);
|
|
1794
|
+
}).apply(t, [e]);
|
|
1796
1795
|
}
|
|
1797
1796
|
/**
|
|
1798
1797
|
* Implementaion of the interface method.
|
|
@@ -2203,7 +2202,7 @@ let wi = class Ir {
|
|
|
2203
2202
|
}
|
|
2204
2203
|
}, xi = class {
|
|
2205
2204
|
constructor(t) {
|
|
2206
|
-
this.markerClusterer_ = t, this.map_ = t.getMap(), this.gridSize_ = t.getGridSize(), this.minClusterSize_ = t.getMinClusterSize(), this.averageCenter_ = t.isAverageCenter(), this.center_ = null, this.markers_ = [], this.bounds_ = null, this.clusterIcon_ = new
|
|
2205
|
+
this.markerClusterer_ = t, this.map_ = t.getMap(), this.gridSize_ = t.getGridSize(), this.minClusterSize_ = t.getMinClusterSize(), this.averageCenter_ = t.isAverageCenter(), this.center_ = null, this.markers_ = [], this.bounds_ = null, this.clusterIcon_ = new zt(
|
|
2207
2206
|
this,
|
|
2208
2207
|
t.getStyles(),
|
|
2209
2208
|
t.getGridSize()
|
|
@@ -2337,9 +2336,9 @@ let wi = class Ir {
|
|
|
2337
2336
|
this.clusterIcon_.setCenter(this.center_), this.clusterIcon_.setSums(a), this.clusterIcon_.show();
|
|
2338
2337
|
}
|
|
2339
2338
|
};
|
|
2340
|
-
class
|
|
2339
|
+
class zt {
|
|
2341
2340
|
constructor(t, e, r) {
|
|
2342
|
-
t.getMarkerClusterer().extend(
|
|
2341
|
+
t.getMarkerClusterer().extend(zt, google.maps.OverlayView), this.styles_ = e, this.padding_ = r || 0, this.cluster_ = t, this.center_ = null, this.map_ = t.getMap(), this.div_ = null, this.sums_ = null, this.visible_ = !1, this.setMap(this.map_);
|
|
2343
2342
|
}
|
|
2344
2343
|
/**
|
|
2345
2344
|
* Triggers the clusterclick event and zoom's if the option is set.
|
|
@@ -2474,7 +2473,7 @@ var Sr = { exports: {} };
|
|
|
2474
2473
|
(function(i, t) {
|
|
2475
2474
|
(function(e, r) {
|
|
2476
2475
|
i.exports = r();
|
|
2477
|
-
})(
|
|
2476
|
+
})(xt, function() {
|
|
2478
2477
|
var e, r = e = r || { version: "1.3.8" }, s = {};
|
|
2479
2478
|
r.guid = "$BAIDU$", s[r.guid] = s[r.guid] || {}, r.dom = r.dom || {}, r.dom.g = function(o) {
|
|
2480
2479
|
return typeof o == "string" || o instanceof String ? document.getElementById(o) : o && o.nodeName && (o.nodeType == 1 || o.nodeType == 9) ? o : null;
|
|
@@ -2665,17 +2664,17 @@ var Sr = { exports: {} };
|
|
|
2665
2664
|
});
|
|
2666
2665
|
})(Sr);
|
|
2667
2666
|
var Ei = Sr.exports;
|
|
2668
|
-
const hr = /* @__PURE__ */
|
|
2667
|
+
const hr = /* @__PURE__ */ nt(Ei);
|
|
2669
2668
|
var kr = function(i, t, e) {
|
|
2670
|
-
t =
|
|
2669
|
+
t = Pi(t);
|
|
2671
2670
|
var r = i.pointToPixel(t.getNorthEast()), s = i.pointToPixel(t.getSouthWest());
|
|
2672
2671
|
r.x += e, r.y -= e, s.x -= e, s.y += e;
|
|
2673
2672
|
var n = i.pixelToPoint(r), a = i.pixelToPoint(s);
|
|
2674
2673
|
return new BMap.Bounds(a, n);
|
|
2675
|
-
},
|
|
2676
|
-
var t =
|
|
2674
|
+
}, Pi = function(i) {
|
|
2675
|
+
var t = Fe(i.getNorthEast().lng, -180, 180), e = Fe(i.getSouthWest().lng, -180, 180), r = Fe(i.getNorthEast().lat, -74, 74), s = Fe(i.getSouthWest().lat, -74, 74);
|
|
2677
2676
|
return new BMap.Bounds(new BMap.Point(e, s), new BMap.Point(t, r));
|
|
2678
|
-
},
|
|
2677
|
+
}, Fe = function(i, t, e) {
|
|
2679
2678
|
return t && (i = Math.max(i, t)), e && (i = Math.min(i, e)), i;
|
|
2680
2679
|
}, Ar = function(i) {
|
|
2681
2680
|
return Object.prototype.toString.call(i) === "[object Array]";
|
|
@@ -2748,7 +2747,7 @@ x.prototype._addToClosestCluster = function(i) {
|
|
|
2748
2747
|
if (e && e.isMarkerInClusterBounds(i))
|
|
2749
2748
|
e.addMarker(i);
|
|
2750
2749
|
else {
|
|
2751
|
-
var s = new
|
|
2750
|
+
var s = new Y(this);
|
|
2752
2751
|
s.addMarker(i), this._clusters.push(s);
|
|
2753
2752
|
}
|
|
2754
2753
|
};
|
|
@@ -2843,7 +2842,7 @@ x.prototype.setTextCalculator = function(i) {
|
|
|
2843
2842
|
x.prototype.setStylesIndexCalculator = function(i) {
|
|
2844
2843
|
this._stylesIndexCalculator = i;
|
|
2845
2844
|
};
|
|
2846
|
-
function
|
|
2845
|
+
function Y(i) {
|
|
2847
2846
|
var t = this;
|
|
2848
2847
|
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 hr(this._center, this._markers.length, {
|
|
2849
2848
|
styles: this._markerClusterer.getStyles(),
|
|
@@ -2858,7 +2857,7 @@ function q(i) {
|
|
|
2858
2857
|
t._map.setViewport(t.getBounds());
|
|
2859
2858
|
});
|
|
2860
2859
|
}
|
|
2861
|
-
|
|
2860
|
+
Y.prototype.addMarker = function(i) {
|
|
2862
2861
|
if (this.isMarkerInCluster(i))
|
|
2863
2862
|
return !1;
|
|
2864
2863
|
if (!this._center)
|
|
@@ -2869,7 +2868,7 @@ q.prototype.addMarker = function(i) {
|
|
|
2869
2868
|
}
|
|
2870
2869
|
return i.isInCluster = !0, this._markers.push(i), !0;
|
|
2871
2870
|
};
|
|
2872
|
-
|
|
2871
|
+
Y.prototype.render = function() {
|
|
2873
2872
|
var i = this._markers.length;
|
|
2874
2873
|
if (i < this._minClusterSize)
|
|
2875
2874
|
for (var t = 0; t < i; t++)
|
|
@@ -2877,7 +2876,7 @@ q.prototype.render = function() {
|
|
|
2877
2876
|
else
|
|
2878
2877
|
this._map.addOverlay(this._clusterMarker), this._isReal = !0, this.updateClusterMarker();
|
|
2879
2878
|
};
|
|
2880
|
-
|
|
2879
|
+
Y.prototype.isMarkerInCluster = function(i) {
|
|
2881
2880
|
if (this._markers.indexOf)
|
|
2882
2881
|
return this._markers.indexOf(i) != -1;
|
|
2883
2882
|
for (var t = 0, e; e = this._markers[t]; t++)
|
|
@@ -2885,17 +2884,17 @@ q.prototype.isMarkerInCluster = function(i) {
|
|
|
2885
2884
|
return !0;
|
|
2886
2885
|
return !1;
|
|
2887
2886
|
};
|
|
2888
|
-
|
|
2887
|
+
Y.prototype.isMarkerInClusterBounds = function(i) {
|
|
2889
2888
|
return this._gridBounds.containsPoint(i.getPosition());
|
|
2890
2889
|
};
|
|
2891
|
-
|
|
2890
|
+
Y.prototype.isReal = function(i) {
|
|
2892
2891
|
return this._isReal;
|
|
2893
2892
|
};
|
|
2894
|
-
|
|
2893
|
+
Y.prototype.updateGridBounds = function() {
|
|
2895
2894
|
var i = new BMap.Bounds(this._center, this._center);
|
|
2896
2895
|
this._gridBounds = kr(this._map, i, this._markerClusterer.getGridSize());
|
|
2897
2896
|
};
|
|
2898
|
-
|
|
2897
|
+
Y.prototype.updateClusterMarker = function() {
|
|
2899
2898
|
if (this._map.getZoom() > this._markerClusterer.getMaxZoom()) {
|
|
2900
2899
|
this._clusterMarker && this._map.removeOverlay(this._clusterMarker);
|
|
2901
2900
|
for (var i = 0, t; t = this._markers[i]; i++)
|
|
@@ -2908,19 +2907,19 @@ q.prototype.updateClusterMarker = function() {
|
|
|
2908
2907
|
}
|
|
2909
2908
|
this._clusterMarker.setPosition(this._center), this._clusterMarker.setText(this._markerClusterer._textCalculator(this._markers));
|
|
2910
2909
|
};
|
|
2911
|
-
|
|
2910
|
+
Y.prototype.remove = function() {
|
|
2912
2911
|
for (var i = 0, t; t = this._markers[i]; i++) {
|
|
2913
2912
|
var e = this._markers[i].getLabel();
|
|
2914
2913
|
this._markers[i].getMap() && this._map.removeOverlay(this._markers[i]), this._markers[i].setLabel(e);
|
|
2915
2914
|
}
|
|
2916
2915
|
this._map.removeOverlay(this._clusterMarker), this._markers.length = 0, delete this._markers;
|
|
2917
2916
|
};
|
|
2918
|
-
|
|
2917
|
+
Y.prototype.getBounds = function() {
|
|
2919
2918
|
for (var i = new BMap.Bounds(this._center, this._center), t = 0, e; e = this._markers[t]; t++)
|
|
2920
2919
|
i.extend(e.getPosition());
|
|
2921
2920
|
return i;
|
|
2922
2921
|
};
|
|
2923
|
-
|
|
2922
|
+
Y.prototype.getCenter = function() {
|
|
2924
2923
|
return this._center;
|
|
2925
2924
|
};
|
|
2926
2925
|
var Xe;
|
|
@@ -2974,7 +2973,7 @@ class Rr {
|
|
|
2974
2973
|
return this.inner.removeMarkers(t.map((e) => e.innerOverlay));
|
|
2975
2974
|
}
|
|
2976
2975
|
}
|
|
2977
|
-
class
|
|
2976
|
+
class Li extends Rr {
|
|
2978
2977
|
constructor(e, r) {
|
|
2979
2978
|
var n;
|
|
2980
2979
|
super(e);
|
|
@@ -3038,7 +3037,7 @@ class Ii extends $r {
|
|
|
3038
3037
|
search(e, r) {
|
|
3039
3038
|
return this.searchImpl(
|
|
3040
3039
|
e,
|
|
3041
|
-
r instanceof
|
|
3040
|
+
r instanceof O ? r.toGoogle(this.map.coordType) : r ?? this.map.innerMap.getCenter()
|
|
3042
3041
|
);
|
|
3043
3042
|
}
|
|
3044
3043
|
searchInBounds(e, r) {
|
|
@@ -3087,7 +3086,7 @@ class Si extends $r {
|
|
|
3087
3086
|
}
|
|
3088
3087
|
search(e, r) {
|
|
3089
3088
|
return this.newSearch(
|
|
3090
|
-
r instanceof
|
|
3089
|
+
r instanceof O ? r.toBaidu(this.map.coordType) : r ?? this.map.innerMap.getCenter(),
|
|
3091
3090
|
(s) => {
|
|
3092
3091
|
s.search(e);
|
|
3093
3092
|
}
|
|
@@ -3107,7 +3106,7 @@ class Si extends $r {
|
|
|
3107
3106
|
return new Promise((s, n) => {
|
|
3108
3107
|
const a = new BMap.LocalSearch(e ?? this.map.innerMap, {
|
|
3109
3108
|
onSearchComplete: (c) => {
|
|
3110
|
-
Array.isArray(c) &&
|
|
3109
|
+
Array.isArray(c) && Pt("当前只支持一次搜索一条数据");
|
|
3111
3110
|
const o = a.getStatus();
|
|
3112
3111
|
switch (o) {
|
|
3113
3112
|
case BMAP_STATUS_SUCCESS: {
|
|
@@ -3119,7 +3118,7 @@ class Si extends $r {
|
|
|
3119
3118
|
city: m.city,
|
|
3120
3119
|
country: "",
|
|
3121
3120
|
// 百度地图只支持中国
|
|
3122
|
-
position:
|
|
3121
|
+
position: O.fromBaidu(m.point, this.map.coordType),
|
|
3123
3122
|
province: m.province,
|
|
3124
3123
|
title: m.title,
|
|
3125
3124
|
address: m.address
|
|
@@ -3153,7 +3152,7 @@ class zr {
|
|
|
3153
3152
|
* @mustCallSuper 子类必须调用一次`super.setSearchListener`, 用来保存{@link onData}和{@link onError}
|
|
3154
3153
|
* */
|
|
3155
3154
|
setSearchListener(t, e) {
|
|
3156
|
-
return this.onData && B("setSearchListener只能调用一次"), this.onData = t, this.onError = e,
|
|
3155
|
+
return this.onData && B("setSearchListener只能调用一次"), this.onData = t, this.onError = e, Re;
|
|
3157
3156
|
}
|
|
3158
3157
|
}
|
|
3159
3158
|
class ki extends zr {
|
|
@@ -3192,7 +3191,7 @@ class Ai extends zr {
|
|
|
3192
3191
|
}
|
|
3193
3192
|
}
|
|
3194
3193
|
var Di = /* @__PURE__ */ ((i) => (i[i.WORLD = 1] = "WORLD", i[i.STATE = 5] = "STATE", i[i.CITY = 10] = "CITY", i[i.STREET = 15] = "STREET", i[i.BUILDING = 20] = "BUILDING", i))(Di || {});
|
|
3195
|
-
class
|
|
3194
|
+
class Nt {
|
|
3196
3195
|
constructor(t) {
|
|
3197
3196
|
u(this, "latestInfoWindow");
|
|
3198
3197
|
/** 使用{@link setEventTargetDelegate}初始化 */
|
|
@@ -3256,27 +3255,27 @@ function Zi(i) {
|
|
|
3256
3255
|
function Wi(i) {
|
|
3257
3256
|
return Array.isArray(i) ? [] : {};
|
|
3258
3257
|
}
|
|
3259
|
-
function
|
|
3258
|
+
function ze(i, t) {
|
|
3260
3259
|
return t.clone !== !1 && t.isMergeableObject(i) ? _e(Wi(i), i, t) : i;
|
|
3261
3260
|
}
|
|
3262
3261
|
function Hi(i, t, e) {
|
|
3263
3262
|
return i.concat(t).map(function(r) {
|
|
3264
|
-
return
|
|
3263
|
+
return ze(r, e);
|
|
3265
3264
|
});
|
|
3266
3265
|
}
|
|
3267
|
-
function
|
|
3266
|
+
function Vi(i, t) {
|
|
3268
3267
|
if (!t.customMerge)
|
|
3269
3268
|
return _e;
|
|
3270
3269
|
var e = t.customMerge(i);
|
|
3271
3270
|
return typeof e == "function" ? e : _e;
|
|
3272
3271
|
}
|
|
3273
|
-
function
|
|
3272
|
+
function ji(i) {
|
|
3274
3273
|
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(t) {
|
|
3275
3274
|
return Object.propertyIsEnumerable.call(i, t);
|
|
3276
3275
|
}) : [];
|
|
3277
3276
|
}
|
|
3278
3277
|
function cr(i) {
|
|
3279
|
-
return Object.keys(i).concat(
|
|
3278
|
+
return Object.keys(i).concat(ji(i));
|
|
3280
3279
|
}
|
|
3281
3280
|
function Nr(i, t) {
|
|
3282
3281
|
try {
|
|
@@ -3285,21 +3284,21 @@ function Nr(i, t) {
|
|
|
3285
3284
|
return !1;
|
|
3286
3285
|
}
|
|
3287
3286
|
}
|
|
3288
|
-
function
|
|
3287
|
+
function Fi(i, t) {
|
|
3289
3288
|
return Nr(i, t) && !(Object.hasOwnProperty.call(i, t) && Object.propertyIsEnumerable.call(i, t));
|
|
3290
3289
|
}
|
|
3291
3290
|
function Ui(i, t, e) {
|
|
3292
3291
|
var r = {};
|
|
3293
3292
|
return e.isMergeableObject(i) && cr(i).forEach(function(s) {
|
|
3294
|
-
r[s] =
|
|
3293
|
+
r[s] = ze(i[s], e);
|
|
3295
3294
|
}), cr(t).forEach(function(s) {
|
|
3296
|
-
|
|
3295
|
+
Fi(i, s) || (Nr(i, s) && e.isMergeableObject(t[s]) ? r[s] = Vi(s, e)(i[s], t[s], e) : r[s] = ze(t[s], e));
|
|
3297
3296
|
}), r;
|
|
3298
3297
|
}
|
|
3299
3298
|
function _e(i, t, e) {
|
|
3300
|
-
e = e || {}, e.arrayMerge = e.arrayMerge || Hi, e.isMergeableObject = e.isMergeableObject || Ri, e.cloneUnlessOtherwiseSpecified =
|
|
3299
|
+
e = e || {}, e.arrayMerge = e.arrayMerge || Hi, e.isMergeableObject = e.isMergeableObject || Ri, e.cloneUnlessOtherwiseSpecified = ze;
|
|
3301
3300
|
var r = Array.isArray(t), s = Array.isArray(i), n = r === s;
|
|
3302
|
-
return n ? r ? e.arrayMerge(i, t, e) : Ui(i, t, e) :
|
|
3301
|
+
return n ? r ? e.arrayMerge(i, t, e) : Ui(i, t, e) : ze(t, e);
|
|
3303
3302
|
}
|
|
3304
3303
|
_e.all = function(t, e) {
|
|
3305
3304
|
if (!Array.isArray(t))
|
|
@@ -3309,7 +3308,7 @@ _e.all = function(t, e) {
|
|
|
3309
3308
|
}, {});
|
|
3310
3309
|
};
|
|
3311
3310
|
var Yi = _e, qi = Yi;
|
|
3312
|
-
const Gr = /* @__PURE__ */
|
|
3311
|
+
const Gr = /* @__PURE__ */ nt(qi);
|
|
3313
3312
|
/*!
|
|
3314
3313
|
* isobject <https://github.com/jonschlinkert/isobject>
|
|
3315
3314
|
*
|
|
@@ -3332,7 +3331,7 @@ function Zr(i) {
|
|
|
3332
3331
|
var t, e;
|
|
3333
3332
|
return !(dr(i) === !1 || (t = i.constructor, typeof t != "function") || (e = t.prototype, dr(e) === !1) || e.hasOwnProperty("isPrototypeOf") === !1);
|
|
3334
3333
|
}
|
|
3335
|
-
var
|
|
3334
|
+
var ce;
|
|
3336
3335
|
((i) => {
|
|
3337
3336
|
function t(d, m) {
|
|
3338
3337
|
return d.reduce((g, v) => (g[m(v)] = v, g), {});
|
|
@@ -3387,7 +3386,7 @@ var he;
|
|
|
3387
3386
|
v != null && delete v[b];
|
|
3388
3387
|
}
|
|
3389
3388
|
i.del = l;
|
|
3390
|
-
})(
|
|
3389
|
+
})(ce || (ce = {}));
|
|
3391
3390
|
function ur(i) {
|
|
3392
3391
|
if (i.length <= 4)
|
|
3393
3392
|
return i.includes.bind(i);
|
|
@@ -3396,13 +3395,13 @@ function ur(i) {
|
|
|
3396
3395
|
return t.has.bind(t);
|
|
3397
3396
|
}
|
|
3398
3397
|
}
|
|
3399
|
-
|
|
3398
|
+
ce.toJsonSafely;
|
|
3400
3399
|
const Xi = ["single", "multi"];
|
|
3401
3400
|
var ee = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(ee || {}), Ct;
|
|
3402
3401
|
((i) => {
|
|
3403
3402
|
function t(e) {
|
|
3404
|
-
|
|
3405
|
-
const r = { center:
|
|
3403
|
+
ce.deleteUndefinedPropertyOnPlainObjectDeeply(e);
|
|
3404
|
+
const r = { center: O.ZERO, zoom: 5 };
|
|
3406
3405
|
return Gr(r, e || {}, {
|
|
3407
3406
|
isMergeableObject: Zr
|
|
3408
3407
|
});
|
|
@@ -3427,12 +3426,12 @@ class Wr {
|
|
|
3427
3426
|
this.map.removeOverlay(this);
|
|
3428
3427
|
}
|
|
3429
3428
|
}
|
|
3430
|
-
class
|
|
3429
|
+
class Gt extends Wr {
|
|
3431
3430
|
constructor(t, e, r) {
|
|
3432
3431
|
super(t, e), this.map = r;
|
|
3433
3432
|
}
|
|
3434
3433
|
createDelegate() {
|
|
3435
|
-
return new
|
|
3434
|
+
return new ye(this.innerOverlay, this.map);
|
|
3436
3435
|
}
|
|
3437
3436
|
isVisible() {
|
|
3438
3437
|
return this.innerOverlay.getVisible();
|
|
@@ -3441,12 +3440,12 @@ class Nt extends Wr {
|
|
|
3441
3440
|
this.innerOverlay.setVisible(t);
|
|
3442
3441
|
}
|
|
3443
3442
|
}
|
|
3444
|
-
class
|
|
3443
|
+
class lt extends Wr {
|
|
3445
3444
|
constructor(t, e, r) {
|
|
3446
3445
|
super(t, e), this.map = r;
|
|
3447
3446
|
}
|
|
3448
3447
|
createDelegate() {
|
|
3449
|
-
return new
|
|
3448
|
+
return new $e(this.innerOverlay, this.map);
|
|
3450
3449
|
}
|
|
3451
3450
|
/** 仅限内部使用; 设为private时, 生成的d.ts文件中, 方法返回值会变成any, 故改成了public */
|
|
3452
3451
|
get overlay() {
|
|
@@ -3463,7 +3462,7 @@ class ct extends Wr {
|
|
|
3463
3462
|
return t !== void 0 && (t || this.setVisible(!1)), this;
|
|
3464
3463
|
}
|
|
3465
3464
|
}
|
|
3466
|
-
const
|
|
3465
|
+
const Ae = class Ae extends lt {
|
|
3467
3466
|
constructor(t, e, r, s) {
|
|
3468
3467
|
super(t, e, r), this.state = s;
|
|
3469
3468
|
}
|
|
@@ -3477,7 +3476,7 @@ const st = class extends ct {
|
|
|
3477
3476
|
this.innerOverlay.setStrokeColor(t);
|
|
3478
3477
|
}
|
|
3479
3478
|
setStrokeOpacity(t) {
|
|
3480
|
-
this.innerOverlay.setStrokeOpacity(t +
|
|
3479
|
+
this.innerOverlay.setStrokeOpacity(t + Ae.OPACITY_DELTA);
|
|
3481
3480
|
}
|
|
3482
3481
|
setStrokeWeight(t) {
|
|
3483
3482
|
this.innerOverlay.setStrokeWeight(t);
|
|
@@ -3486,18 +3485,18 @@ const st = class extends ct {
|
|
|
3486
3485
|
this.innerOverlay.setFillColor(t);
|
|
3487
3486
|
}
|
|
3488
3487
|
setFillOpacity(t) {
|
|
3489
|
-
this.innerOverlay.setFillOpacity(t +
|
|
3488
|
+
this.innerOverlay.setFillOpacity(t + Ae.OPACITY_DELTA);
|
|
3490
3489
|
}
|
|
3491
3490
|
};
|
|
3492
|
-
let z = st;
|
|
3493
3491
|
/**
|
|
3494
3492
|
* baidu地图的透明度属性有如下问题:
|
|
3495
3493
|
* - 在透明度为0时, 无法隐藏掉颜色
|
|
3496
3494
|
* - 透明度为0.7和0.8时, 在maintain的发布模式下, polyline的线条会不可见 (原因未知, 在tg-map中无法复现)
|
|
3497
3495
|
* 故统一加个0.001, 规避这些问题...
|
|
3498
3496
|
*/
|
|
3499
|
-
u(
|
|
3500
|
-
|
|
3497
|
+
u(Ae, "OPACITY_DELTA", 1e-3);
|
|
3498
|
+
let j = Ae;
|
|
3499
|
+
class ht extends Gt {
|
|
3501
3500
|
isEditable() {
|
|
3502
3501
|
return this.innerOverlay.getEditable();
|
|
3503
3502
|
}
|
|
@@ -3520,7 +3519,7 @@ class dt extends Nt {
|
|
|
3520
3519
|
this.innerOverlay.setOptions({ fillOpacity: t });
|
|
3521
3520
|
}
|
|
3522
3521
|
}
|
|
3523
|
-
class
|
|
3522
|
+
class Zt extends j {
|
|
3524
3523
|
constructor() {
|
|
3525
3524
|
super(...arguments);
|
|
3526
3525
|
u(this, "prevCenter");
|
|
@@ -3547,17 +3546,17 @@ class Gt extends z {
|
|
|
3547
3546
|
enableEditing: !1,
|
|
3548
3547
|
// options.editable,
|
|
3549
3548
|
strokeColor: e.strokeColor,
|
|
3550
|
-
strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity +
|
|
3549
|
+
strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + j.OPACITY_DELTA : void 0,
|
|
3551
3550
|
strokeWeight: e.strokeWeight,
|
|
3552
3551
|
fillColor: e.fillColor,
|
|
3553
|
-
fillOpacity: e.fillOpacity != null ? e.fillOpacity +
|
|
3554
|
-
}), n = new
|
|
3552
|
+
fillOpacity: e.fillOpacity != null ? e.fillOpacity + j.OPACITY_DELTA : void 0
|
|
3553
|
+
}), n = new Zt(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
|
|
3555
3554
|
return n.state.editable && setTimeout(() => {
|
|
3556
3555
|
n.state.editable && s.enableEditing();
|
|
3557
3556
|
}, 0), n;
|
|
3558
3557
|
}
|
|
3559
3558
|
createDelegate() {
|
|
3560
|
-
return this.eventHubDelegate = new
|
|
3559
|
+
return this.eventHubDelegate = new ot(super.createDelegate(), {
|
|
3561
3560
|
types: ["radius-changed", "center-changed"],
|
|
3562
3561
|
onListen: (e) => {
|
|
3563
3562
|
e === "radius-changed" ? (this.prevRadius = this.innerOverlay.getRadius(), this.innerOverlay.addEventListener("lineupdate", this.onRadiusChanged)) : (this.prevCenter = this.innerOverlay.getCenter(), this.innerOverlay.addEventListener("lineupdate", this.onCenterChanged));
|
|
@@ -3573,7 +3572,7 @@ class Gt extends z {
|
|
|
3573
3572
|
}, 0));
|
|
3574
3573
|
}
|
|
3575
3574
|
getCenter() {
|
|
3576
|
-
return
|
|
3575
|
+
return O.fromBaidu(this.innerOverlay.getCenter(), this.coordType);
|
|
3577
3576
|
}
|
|
3578
3577
|
setRadius(e) {
|
|
3579
3578
|
this.isDoingSetRadius = !0, this.innerOverlay.setRadius(e), this.isDoingSetRadius = !1;
|
|
@@ -3582,7 +3581,7 @@ class Gt extends z {
|
|
|
3582
3581
|
return this.innerOverlay.getRadius();
|
|
3583
3582
|
}
|
|
3584
3583
|
}
|
|
3585
|
-
class
|
|
3584
|
+
class Wt extends ht {
|
|
3586
3585
|
static create(t) {
|
|
3587
3586
|
const e = this.coordType, r = new google.maps.Circle({
|
|
3588
3587
|
center: t.center.toGoogle(e),
|
|
@@ -3596,13 +3595,13 @@ class Zt extends dt {
|
|
|
3596
3595
|
fillOpacity: t.fillOpacity,
|
|
3597
3596
|
visible: t.visible
|
|
3598
3597
|
});
|
|
3599
|
-
return new
|
|
3598
|
+
return new Wt(r, e, this);
|
|
3600
3599
|
}
|
|
3601
3600
|
setCenter(t) {
|
|
3602
3601
|
this.coordType = this.map.coordType, this.innerOverlay.setCenter(t.toGoogle(this.coordType));
|
|
3603
3602
|
}
|
|
3604
3603
|
getCenter() {
|
|
3605
|
-
return
|
|
3604
|
+
return O.fromGoogle(this.innerOverlay.getCenter() ?? he.LATLNG_ZERO, this.coordType);
|
|
3606
3605
|
}
|
|
3607
3606
|
setRadius(t) {
|
|
3608
3607
|
this.innerOverlay.setRadius(t);
|
|
@@ -3620,19 +3619,19 @@ const pr = {
|
|
|
3620
3619
|
return i.lat === t.lat && i.lng === t.lng;
|
|
3621
3620
|
}
|
|
3622
3621
|
};
|
|
3623
|
-
var
|
|
3622
|
+
var le;
|
|
3624
3623
|
((i) => {
|
|
3625
3624
|
i.ZERO = { x: 0, y: 0 };
|
|
3626
|
-
})(
|
|
3627
|
-
let
|
|
3625
|
+
})(le || (le = {}));
|
|
3626
|
+
let gt;
|
|
3628
3627
|
function Ji(i, t, e, r, s, n) {
|
|
3629
|
-
return
|
|
3628
|
+
return gt || (gt = Qi()), new gt(i, t, e, r, s, n);
|
|
3630
3629
|
}
|
|
3631
3630
|
function Qi() {
|
|
3632
3631
|
Hr();
|
|
3633
3632
|
const i = new BMap.Point(0, 0);
|
|
3634
3633
|
return class extends BMap.OverlayV3 {
|
|
3635
|
-
constructor(r, s = i, n =
|
|
3634
|
+
constructor(r, s = i, n = le.ZERO, a, c = 654, o = "") {
|
|
3636
3635
|
super();
|
|
3637
3636
|
// 类表达式不能有私有成员, 故改成public
|
|
3638
3637
|
u(this, "container");
|
|
@@ -3695,7 +3694,7 @@ function Qi() {
|
|
|
3695
3694
|
}
|
|
3696
3695
|
};
|
|
3697
3696
|
}
|
|
3698
|
-
class
|
|
3697
|
+
class Ht {
|
|
3699
3698
|
constructor(t) {
|
|
3700
3699
|
this.delegate = t, this.delegate.setTarget(this);
|
|
3701
3700
|
}
|
|
@@ -3706,38 +3705,38 @@ class Wt {
|
|
|
3706
3705
|
this.delegate.removeEventListener(t, e);
|
|
3707
3706
|
}
|
|
3708
3707
|
}
|
|
3709
|
-
class
|
|
3708
|
+
class Vt extends Ht {
|
|
3710
3709
|
constructor(t, e, r) {
|
|
3711
|
-
super(new
|
|
3710
|
+
super(new $e(t, e)), this.inner = t, this.map = e, this.state = r;
|
|
3712
3711
|
}
|
|
3713
3712
|
static create(t) {
|
|
3714
|
-
const e = t.position ||
|
|
3713
|
+
const e = t.position || O.ZERO, r = new BMap.InfoWindow(t.content, {
|
|
3715
3714
|
maxWidth: t.maxWidth,
|
|
3716
3715
|
offset: t.offset && new BMap.Size(t.offset.x, t.offset.y),
|
|
3717
3716
|
enableAutoPan: !t.disableAutoPan
|
|
3718
3717
|
});
|
|
3719
|
-
return new
|
|
3718
|
+
return new Vt(r, this, { position: e });
|
|
3720
3719
|
}
|
|
3721
3720
|
isOpen() {
|
|
3722
3721
|
return this.inner.isOpen();
|
|
3723
3722
|
}
|
|
3724
3723
|
open(t) {
|
|
3725
|
-
t ? t.innerOverlay.openInfoWindow(this.inner) : this.map.innerMap.openInfoWindow(this.inner, (this.state.position ||
|
|
3724
|
+
t ? t.innerOverlay.openInfoWindow(this.inner) : this.map.innerMap.openInfoWindow(this.inner, (this.state.position || O.ZERO).toBaidu(this.map.coordType)), this.map.setLatestInfoWindowInternal(this);
|
|
3726
3725
|
}
|
|
3727
3726
|
close() {
|
|
3728
3727
|
this.inner.isOpen() && this.map.innerMap.closeInfoWindow();
|
|
3729
3728
|
}
|
|
3730
3729
|
getPosition() {
|
|
3731
3730
|
const t = this.inner.getPosition();
|
|
3732
|
-
return t &&
|
|
3731
|
+
return t && O.fromBaidu(t, this.map.coordType) || this.state.position || O.ZERO;
|
|
3733
3732
|
}
|
|
3734
3733
|
setPosition(t) {
|
|
3735
3734
|
this.state.position = t, this.inner.isOpen() && this.open();
|
|
3736
3735
|
}
|
|
3737
3736
|
}
|
|
3738
|
-
class jt extends
|
|
3737
|
+
class jt extends Ht {
|
|
3739
3738
|
constructor(e, r) {
|
|
3740
|
-
super(new
|
|
3739
|
+
super(new ye(e, r));
|
|
3741
3740
|
u(this, "eventHub", new Tr());
|
|
3742
3741
|
u(this, "isOpened", !1);
|
|
3743
3742
|
this.inner = e, this.map = r, e.addListener("closeclick", () => {
|
|
@@ -3748,7 +3747,7 @@ class jt extends Wt {
|
|
|
3748
3747
|
});
|
|
3749
3748
|
}
|
|
3750
3749
|
static create(e) {
|
|
3751
|
-
const r = e.position ||
|
|
3750
|
+
const r = e.position || O.ZERO, s = new google.maps.InfoWindow({
|
|
3752
3751
|
content: e.content,
|
|
3753
3752
|
maxWidth: e.maxWidth,
|
|
3754
3753
|
pixelOffset: e.offset && new google.maps.Size(e.offset.x, e.offset.y),
|
|
@@ -3787,13 +3786,13 @@ class jt extends Wt {
|
|
|
3787
3786
|
this.isOpened && (this.isOpened = !1, this.inner.close(), this.eventHub.notify({ type: "close", target: this }));
|
|
3788
3787
|
}
|
|
3789
3788
|
getPosition() {
|
|
3790
|
-
return
|
|
3789
|
+
return O.fromGoogle(this.inner.getPosition() ?? he.LATLNG_ZERO, this.map.coordType);
|
|
3791
3790
|
}
|
|
3792
3791
|
setPosition(e) {
|
|
3793
3792
|
this.inner.setPosition(e.toGoogle(this.map.coordType));
|
|
3794
3793
|
}
|
|
3795
3794
|
}
|
|
3796
|
-
class Ft extends
|
|
3795
|
+
class Ft extends lt {
|
|
3797
3796
|
constructor(t, e, r) {
|
|
3798
3797
|
super(t, e, r), this.baiduMap = r;
|
|
3799
3798
|
}
|
|
@@ -3816,7 +3815,7 @@ class Ft extends ct {
|
|
|
3816
3815
|
this.innerOverlay.close();
|
|
3817
3816
|
}
|
|
3818
3817
|
getPosition() {
|
|
3819
|
-
return
|
|
3818
|
+
return O.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
|
|
3820
3819
|
}
|
|
3821
3820
|
setPosition(t) {
|
|
3822
3821
|
this.coordType = this.map.coordType, this.innerOverlay.setPosition(t.toBaidu(this.coordType));
|
|
@@ -3828,9 +3827,9 @@ class Ft extends ct {
|
|
|
3828
3827
|
this.innerOverlay.setZIndex(t);
|
|
3829
3828
|
}
|
|
3830
3829
|
}
|
|
3831
|
-
class
|
|
3830
|
+
class Ut extends Ht {
|
|
3832
3831
|
constructor(t, e, r) {
|
|
3833
|
-
super(new
|
|
3832
|
+
super(new ye(t, r)), this.inner = t, this.coordType = e, this.map = r;
|
|
3834
3833
|
}
|
|
3835
3834
|
static create(t) {
|
|
3836
3835
|
var n;
|
|
@@ -3845,7 +3844,7 @@ class Vt extends Wt {
|
|
|
3845
3844
|
var c;
|
|
3846
3845
|
const a = (c = t.content.parentElement) == null ? void 0 : c.parentElement;
|
|
3847
3846
|
a && a.className.includes("gm-style-iw-c") && !a.className.includes(s) && (a.className += ` ${s}`);
|
|
3848
|
-
}), new
|
|
3847
|
+
}), new Ut(r, e, this);
|
|
3849
3848
|
}
|
|
3850
3849
|
open(t) {
|
|
3851
3850
|
this.inner.open(this.map.innerMap, t == null ? void 0 : t.innerOverlay);
|
|
@@ -3854,7 +3853,7 @@ class Vt extends Wt {
|
|
|
3854
3853
|
this.inner.close();
|
|
3855
3854
|
}
|
|
3856
3855
|
getPosition() {
|
|
3857
|
-
return
|
|
3856
|
+
return O.fromGoogle(this.inner.getPosition() ?? he.LATLNG_ZERO, this.coordType);
|
|
3858
3857
|
}
|
|
3859
3858
|
setPosition(t) {
|
|
3860
3859
|
this.coordType = this.map.coordType, this.inner.setPosition(t.toGoogle(this.coordType));
|
|
@@ -3902,7 +3901,7 @@ const es = {
|
|
|
3902
3901
|
return t && s.endsWith(t) ? s.slice(0, -t.length) : s;
|
|
3903
3902
|
}
|
|
3904
3903
|
};
|
|
3905
|
-
var
|
|
3904
|
+
var Ne = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overlayMouseTarget = "overlayMouseTarget", i.float = "float", i))(Ne || {}), Ge;
|
|
3906
3905
|
((i) => {
|
|
3907
3906
|
function t(r, s) {
|
|
3908
3907
|
switch (r) {
|
|
@@ -3915,7 +3914,7 @@ var Re = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overla
|
|
|
3915
3914
|
case "map":
|
|
3916
3915
|
return s.mapPane;
|
|
3917
3916
|
default:
|
|
3918
|
-
|
|
3917
|
+
vt(r);
|
|
3919
3918
|
}
|
|
3920
3919
|
}
|
|
3921
3920
|
i.toGoogle = t;
|
|
@@ -3930,11 +3929,11 @@ var Re = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overla
|
|
|
3930
3929
|
case "map":
|
|
3931
3930
|
return s.mapPane;
|
|
3932
3931
|
default:
|
|
3933
|
-
|
|
3932
|
+
vt(r);
|
|
3934
3933
|
}
|
|
3935
3934
|
}
|
|
3936
3935
|
i.toBaidu = e;
|
|
3937
|
-
})(
|
|
3936
|
+
})(Ge || (Ge = {}));
|
|
3938
3937
|
class ts {
|
|
3939
3938
|
constructor(t, e) {
|
|
3940
3939
|
u(this, "baidu");
|
|
@@ -3961,7 +3960,7 @@ class ts {
|
|
|
3961
3960
|
initialize(n) {
|
|
3962
3961
|
var o;
|
|
3963
3962
|
const a = t.create(), c = n.getPanes();
|
|
3964
|
-
return (o =
|
|
3963
|
+
return (o = Ge.toBaidu(t.mapPane, c)) == null || o.appendChild(a), a;
|
|
3965
3964
|
}
|
|
3966
3965
|
draw() {
|
|
3967
3966
|
t.draw();
|
|
@@ -3974,7 +3973,7 @@ class ts {
|
|
|
3974
3973
|
return r.pointToOverlayPixel(s.toBaidu(t.map.coordType));
|
|
3975
3974
|
},
|
|
3976
3975
|
fromOverlayPointToLatLng(s) {
|
|
3977
|
-
return
|
|
3976
|
+
return O.fromBaidu(r.overlayPixelToPoint(new BMap.Pixel(s.x, s.y)), t.map.coordType);
|
|
3978
3977
|
}
|
|
3979
3978
|
};
|
|
3980
3979
|
}
|
|
@@ -3986,7 +3985,7 @@ class ts {
|
|
|
3986
3985
|
class e extends google.maps.OverlayView {
|
|
3987
3986
|
onAdd() {
|
|
3988
3987
|
const s = t.create(), n = this.getPanes() ?? B("onAdd回调中一定会有panes");
|
|
3989
|
-
|
|
3988
|
+
Ge.toGoogle(t.mapPane, n).appendChild(s);
|
|
3990
3989
|
}
|
|
3991
3990
|
draw() {
|
|
3992
3991
|
t.draw();
|
|
@@ -3998,23 +3997,23 @@ class ts {
|
|
|
3998
3997
|
}
|
|
3999
3998
|
this.google = new e(), this.projection = {
|
|
4000
3999
|
fromLatLngToOverlayPoint(r) {
|
|
4001
|
-
return t.google.getProjection().fromLatLngToDivPixel(r.toGoogle(t.map.coordType)) ??
|
|
4000
|
+
return t.google.getProjection().fromLatLngToDivPixel(r.toGoogle(t.map.coordType)) ?? le.ZERO;
|
|
4002
4001
|
},
|
|
4003
4002
|
fromOverlayPointToLatLng(r) {
|
|
4004
|
-
return
|
|
4003
|
+
return O.fromGoogle(t.google.getProjection().fromDivPixelToLatLng(new google.maps.Point(r.x, r.y)) ?? he.LATLNG_ZERO, t.map.coordType);
|
|
4005
4004
|
}
|
|
4006
4005
|
};
|
|
4007
4006
|
}
|
|
4008
4007
|
return this.google;
|
|
4009
4008
|
}
|
|
4010
4009
|
}
|
|
4011
|
-
let
|
|
4010
|
+
let mt;
|
|
4012
4011
|
function rs(i, t, e, r, s) {
|
|
4013
|
-
return
|
|
4012
|
+
return mt || (mt = is()), new mt(i, t, e, r, s);
|
|
4014
4013
|
}
|
|
4015
4014
|
function is() {
|
|
4016
4015
|
return class extends google.maps.OverlayView {
|
|
4017
|
-
constructor(e, r, s, n =
|
|
4016
|
+
constructor(e, r, s, n = Ne.overlayMouseTarget, a) {
|
|
4018
4017
|
super();
|
|
4019
4018
|
u(this, "container");
|
|
4020
4019
|
this.position = r, this.offset = s, this._mapPane = n, this.container = document.createElement("div"), this.container.className = "label-container", this.container.style.position = "absolute", a && this.setZIndex(a), this.container.addEventListener("click", () => {
|
|
@@ -4030,7 +4029,7 @@ function is() {
|
|
|
4030
4029
|
}
|
|
4031
4030
|
onAdd() {
|
|
4032
4031
|
const e = this.getPanes() ?? B("onAdd回调中一定能够获取panes");
|
|
4033
|
-
|
|
4032
|
+
Ge.toGoogle(this._mapPane, e).appendChild(this.container);
|
|
4034
4033
|
}
|
|
4035
4034
|
draw() {
|
|
4036
4035
|
var e, r;
|
|
@@ -4081,7 +4080,7 @@ var Te;
|
|
|
4081
4080
|
}
|
|
4082
4081
|
i.toElement = e;
|
|
4083
4082
|
})(Te || (Te = {}));
|
|
4084
|
-
class
|
|
4083
|
+
class Yt extends lt {
|
|
4085
4084
|
constructor(e, r, s, n) {
|
|
4086
4085
|
super(e, r, s);
|
|
4087
4086
|
u(this, "icon");
|
|
@@ -4101,7 +4100,7 @@ class Ut extends ct {
|
|
|
4101
4100
|
padding: "0px",
|
|
4102
4101
|
backgroundColor: "unset"
|
|
4103
4102
|
});
|
|
4104
|
-
const n = new
|
|
4103
|
+
const n = new Yt(s, r, this, e.content);
|
|
4105
4104
|
return s.__label__ = n, n;
|
|
4106
4105
|
}
|
|
4107
4106
|
setContentInternal(e, r = !1) {
|
|
@@ -4118,7 +4117,7 @@ class Ut extends ct {
|
|
|
4118
4117
|
this.innerOverlay.setZIndex(e);
|
|
4119
4118
|
}
|
|
4120
4119
|
getPosition() {
|
|
4121
|
-
return
|
|
4120
|
+
return O.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
|
|
4122
4121
|
}
|
|
4123
4122
|
setPosition(e) {
|
|
4124
4123
|
this.coordType = this.map.coordType, this.innerOverlay.setPosition(e.toBaidu(this.coordType));
|
|
@@ -4181,7 +4180,7 @@ class Ut extends ct {
|
|
|
4181
4180
|
this.iconAnchor && (n -= this.iconAnchor.width, a -= this.iconAnchor.height), r && (n += r.width, a += r.height), this.innerOverlay.setOffset(new BMap.Size(n, a)), this.icon = e, this.iconAnchor = r;
|
|
4182
4181
|
}
|
|
4183
4182
|
}
|
|
4184
|
-
class
|
|
4183
|
+
class qt extends Gt {
|
|
4185
4184
|
static create(t) {
|
|
4186
4185
|
var s;
|
|
4187
4186
|
const e = this.coordType, r = rs(
|
|
@@ -4191,7 +4190,7 @@ class Yt extends Nt {
|
|
|
4191
4190
|
t.mapPane,
|
|
4192
4191
|
t.zIndex
|
|
4193
4192
|
);
|
|
4194
|
-
return new
|
|
4193
|
+
return new qt(r, e, this);
|
|
4195
4194
|
}
|
|
4196
4195
|
setZIndex(t) {
|
|
4197
4196
|
this.innerOverlay.setZIndex(t);
|
|
@@ -4201,13 +4200,13 @@ class Yt extends Nt {
|
|
|
4201
4200
|
}
|
|
4202
4201
|
getPosition() {
|
|
4203
4202
|
const t = this.innerOverlay.getPosition();
|
|
4204
|
-
return t ?
|
|
4203
|
+
return t ? O.fromGoogle(t, this.coordType) : O.ZERO;
|
|
4205
4204
|
}
|
|
4206
4205
|
setPosition(t) {
|
|
4207
4206
|
this.coordType = this.map.coordType, this.innerOverlay.setPosition(t.toGoogle(this.coordType));
|
|
4208
4207
|
}
|
|
4209
4208
|
getOffset() {
|
|
4210
|
-
return this.innerOverlay.getOffset() ??
|
|
4209
|
+
return this.innerOverlay.getOffset() ?? le.ZERO;
|
|
4211
4210
|
}
|
|
4212
4211
|
setOffset(t) {
|
|
4213
4212
|
this.innerOverlay.setOffset(t);
|
|
@@ -4274,7 +4273,7 @@ var Me;
|
|
|
4274
4273
|
}
|
|
4275
4274
|
i.toBaidu = e;
|
|
4276
4275
|
})(Me || (Me = {}));
|
|
4277
|
-
const
|
|
4276
|
+
const _n = {
|
|
4278
4277
|
CIRCLE: { baidu: () => BMap_Symbol_SHAPE_CIRCLE, google: () => google.maps.SymbolPath.CIRCLE },
|
|
4279
4278
|
BACKWARD_CLOSED_ARROW: { baidu: () => BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW, google: () => google.maps.SymbolPath.BACKWARD_CLOSED_ARROW },
|
|
4280
4279
|
BACKWARD_OPEN_ARROW: { baidu: () => BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW, google: () => google.maps.SymbolPath.BACKWARD_OPEN_ARROW },
|
|
@@ -4302,7 +4301,7 @@ var et;
|
|
|
4302
4301
|
}
|
|
4303
4302
|
i.toBaidu = e;
|
|
4304
4303
|
})(et || (et = {}));
|
|
4305
|
-
class
|
|
4304
|
+
class Ze extends lt {
|
|
4306
4305
|
constructor(t, e, r, s) {
|
|
4307
4306
|
super(t, e, r), this.state = s;
|
|
4308
4307
|
}
|
|
@@ -4318,10 +4317,10 @@ class ze extends ct {
|
|
|
4318
4317
|
}, n = new BMap.Marker(t.position.toBaidu(e, t.normalizePositionForBaidu), s);
|
|
4319
4318
|
n.__create_by_tg__ = !0, t.zIndex !== void 0 && n.setZIndex(t.zIndex);
|
|
4320
4319
|
const a = t.clickable === void 0 ? !0 : t.clickable, c = !!t.draggable;
|
|
4321
|
-
return new
|
|
4320
|
+
return new Ze(n, e, this, { clickable: a, draggable: c, zIndex: t.zIndex, normalize: t.normalizePositionForBaidu }).visibleOptionInternal(t.visible);
|
|
4322
4321
|
}
|
|
4323
4322
|
getPosition() {
|
|
4324
|
-
return
|
|
4323
|
+
return O.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
|
|
4325
4324
|
}
|
|
4326
4325
|
setPosition(t) {
|
|
4327
4326
|
var e;
|
|
@@ -4369,7 +4368,7 @@ class ze extends ct {
|
|
|
4369
4368
|
return (t = this.innerOverlay.getLabel()) == null ? void 0 : t.__label__;
|
|
4370
4369
|
}
|
|
4371
4370
|
}
|
|
4372
|
-
class
|
|
4371
|
+
class Kt extends Gt {
|
|
4373
4372
|
constructor() {
|
|
4374
4373
|
super(...arguments);
|
|
4375
4374
|
u(this, "label");
|
|
@@ -4392,10 +4391,10 @@ class qt extends Nt {
|
|
|
4392
4391
|
// InfoWindow相对marker的position的偏移量, 若不指定, 则偏移到marker的icon的上部中央
|
|
4393
4392
|
anchorPoint: new google.maps.Point(0, 0)
|
|
4394
4393
|
};
|
|
4395
|
-
return new
|
|
4394
|
+
return new Kt(new google.maps.Marker(n), r, this);
|
|
4396
4395
|
}
|
|
4397
4396
|
getPosition() {
|
|
4398
|
-
return
|
|
4397
|
+
return O.fromGoogle(this.innerOverlay.getPosition(), this.coordType);
|
|
4399
4398
|
}
|
|
4400
4399
|
setPosition(e) {
|
|
4401
4400
|
this.coordType = this.map.coordType, this.innerOverlay.setPosition(e.toGoogle(this.coordType));
|
|
@@ -4445,7 +4444,7 @@ class qt extends Nt {
|
|
|
4445
4444
|
this.label = void 0, this.labelPositionListener = void 0, this.labelVisibleListener = void 0, this.labelMapChangedListener = void 0;
|
|
4446
4445
|
}
|
|
4447
4446
|
}
|
|
4448
|
-
class
|
|
4447
|
+
class Xt extends j {
|
|
4449
4448
|
constructor() {
|
|
4450
4449
|
super(...arguments);
|
|
4451
4450
|
u(this, "eventHubDelegate");
|
|
@@ -4470,7 +4469,7 @@ class Kt extends z {
|
|
|
4470
4469
|
this.isDoingSetPath = !0, this.innerOverlay.setPath(e), this.isDoingSetPath = !1;
|
|
4471
4470
|
}
|
|
4472
4471
|
createDelegate() {
|
|
4473
|
-
return this.eventHubDelegate = new
|
|
4472
|
+
return this.eventHubDelegate = new ot(super.createDelegate(), {
|
|
4474
4473
|
types: [this.pathEditedEventType],
|
|
4475
4474
|
onListen: () => {
|
|
4476
4475
|
this.prevPath = this.innerOverlay.getPath(), this.innerOverlay.addEventListener("lineupdate", this.onLineUpdate);
|
|
@@ -4481,7 +4480,7 @@ class Kt extends z {
|
|
|
4481
4480
|
});
|
|
4482
4481
|
}
|
|
4483
4482
|
}
|
|
4484
|
-
class
|
|
4483
|
+
class Jt extends Xt {
|
|
4485
4484
|
constructor() {
|
|
4486
4485
|
super(...arguments);
|
|
4487
4486
|
u(this, "pathEditedEventType", "path-edited");
|
|
@@ -4492,17 +4491,17 @@ class Xt extends Kt {
|
|
|
4492
4491
|
enableClicking: e.clickable,
|
|
4493
4492
|
enableEditing: e.editable,
|
|
4494
4493
|
strokeColor: e.strokeColor,
|
|
4495
|
-
strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity +
|
|
4494
|
+
strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + j.OPACITY_DELTA : void 0,
|
|
4496
4495
|
strokeWeight: e.strokeWeight,
|
|
4497
4496
|
icons: (n = e.icons) == null ? void 0 : n.map(et.toBaidu)
|
|
4498
4497
|
});
|
|
4499
|
-
return new
|
|
4498
|
+
return new Jt(s, r, this, {
|
|
4500
4499
|
editable: !!e.editable,
|
|
4501
4500
|
symbolIcons: (a = e.icons) == null ? void 0 : a.map((c) => c.icon)
|
|
4502
4501
|
}).visibleOptionInternal(e.visible);
|
|
4503
4502
|
}
|
|
4504
4503
|
getPath() {
|
|
4505
|
-
return this.innerOverlay.getPath().map((e) =>
|
|
4504
|
+
return this.innerOverlay.getPath().map((e) => O.fromBaidu(e, this.coordType));
|
|
4506
4505
|
}
|
|
4507
4506
|
setPath(e) {
|
|
4508
4507
|
this.coordType = this.map.coordType, this.setPathInternal(e.map((r) => r.toBaidu(this.coordType)));
|
|
@@ -4524,7 +4523,7 @@ class Xt extends Kt {
|
|
|
4524
4523
|
}).forEach((s) => this.map.innerMap.removeOverlay(s));
|
|
4525
4524
|
}
|
|
4526
4525
|
}
|
|
4527
|
-
class
|
|
4526
|
+
class Qt extends ht {
|
|
4528
4527
|
constructor() {
|
|
4529
4528
|
super(...arguments);
|
|
4530
4529
|
u(this, "pathChangedListeners");
|
|
@@ -4542,21 +4541,21 @@ class Jt extends dt {
|
|
|
4542
4541
|
visible: e.visible,
|
|
4543
4542
|
icons: (n = e.icons) == null ? void 0 : n.map(et.toGoogle)
|
|
4544
4543
|
});
|
|
4545
|
-
return new
|
|
4544
|
+
return new Qt(s, r, this);
|
|
4546
4545
|
}
|
|
4547
4546
|
setupPathChangedListeners() {
|
|
4548
4547
|
const e = () => {
|
|
4549
4548
|
var s;
|
|
4550
4549
|
return (s = this.eventHubDelegate) == null ? void 0 : s.notify({ type: "path-edited", target: this });
|
|
4551
4550
|
}, r = this.innerOverlay.getPath();
|
|
4552
|
-
this.pathChangedListeners =
|
|
4551
|
+
this.pathChangedListeners = ve.listenChanged(r, e);
|
|
4553
4552
|
}
|
|
4554
4553
|
clearPathChangedListeners() {
|
|
4555
4554
|
var e;
|
|
4556
4555
|
(e = this.pathChangedListeners) == null || e.forEach((r) => r.remove()), this.pathChangedListeners = void 0;
|
|
4557
4556
|
}
|
|
4558
4557
|
createDelegate() {
|
|
4559
|
-
return this.eventHubDelegate = new
|
|
4558
|
+
return this.eventHubDelegate = new ot(super.createDelegate(), {
|
|
4560
4559
|
types: ["path-edited"],
|
|
4561
4560
|
onListen: () => this.setupPathChangedListeners(),
|
|
4562
4561
|
onCancel: () => this.clearPathChangedListeners()
|
|
@@ -4565,7 +4564,7 @@ class Jt extends dt {
|
|
|
4565
4564
|
getPath() {
|
|
4566
4565
|
const e = [];
|
|
4567
4566
|
return this.innerOverlay.getPath().forEach((r) => {
|
|
4568
|
-
e.push(
|
|
4567
|
+
e.push(O.fromGoogle(r, this.coordType));
|
|
4569
4568
|
}), e;
|
|
4570
4569
|
}
|
|
4571
4570
|
setPath(e) {
|
|
@@ -4573,7 +4572,7 @@ class Jt extends dt {
|
|
|
4573
4572
|
this.coordType = this.map.coordType, this.innerOverlay.setPath(e.map((s) => s.toGoogle(this.coordType))), (r = this.eventHubDelegate) != null && r.hasListener("path-edited") && this.setupPathChangedListeners();
|
|
4574
4573
|
}
|
|
4575
4574
|
}
|
|
4576
|
-
class
|
|
4575
|
+
class er extends Xt {
|
|
4577
4576
|
constructor() {
|
|
4578
4577
|
super(...arguments);
|
|
4579
4578
|
u(this, "pathEditedEventType", "paths-edited");
|
|
@@ -4585,21 +4584,21 @@ class Qt extends Kt {
|
|
|
4585
4584
|
enableClicking: e.clickable,
|
|
4586
4585
|
enableEditing: e.editable,
|
|
4587
4586
|
strokeColor: e.strokeColor,
|
|
4588
|
-
strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity +
|
|
4587
|
+
strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + j.OPACITY_DELTA : void 0,
|
|
4589
4588
|
strokeWeight: e.strokeWeight,
|
|
4590
4589
|
fillColor: e.fillColor,
|
|
4591
|
-
fillOpacity: e.fillOpacity != null ? e.fillOpacity +
|
|
4590
|
+
fillOpacity: e.fillOpacity != null ? e.fillOpacity + j.OPACITY_DELTA : void 0
|
|
4592
4591
|
});
|
|
4593
|
-
return new
|
|
4592
|
+
return new er(n, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
|
|
4594
4593
|
}
|
|
4595
4594
|
getPaths() {
|
|
4596
|
-
return [this.innerOverlay.getPath().map((e) =>
|
|
4595
|
+
return [this.innerOverlay.getPath().map((e) => O.fromBaidu(e, this.coordType))];
|
|
4597
4596
|
}
|
|
4598
4597
|
setPaths(e) {
|
|
4599
4598
|
e.length > 1 && console.warn("baidu不支持多path, 只会显示paths[0]"), this.coordType = this.map.coordType, this.setPathInternal((e[0] || []).map((r) => r.toBaidu(this.coordType)));
|
|
4600
4599
|
}
|
|
4601
4600
|
}
|
|
4602
|
-
class
|
|
4601
|
+
class tr extends ht {
|
|
4603
4602
|
constructor() {
|
|
4604
4603
|
super(...arguments);
|
|
4605
4604
|
u(this, "pathChangedListeners");
|
|
@@ -4617,7 +4616,7 @@ class er extends dt {
|
|
|
4617
4616
|
fillOpacity: e.fillOpacity,
|
|
4618
4617
|
visible: e.visible
|
|
4619
4618
|
});
|
|
4620
|
-
return new
|
|
4619
|
+
return new tr(s, r, this);
|
|
4621
4620
|
}
|
|
4622
4621
|
setupPathChangedListeners() {
|
|
4623
4622
|
const e = () => {
|
|
@@ -4625,7 +4624,7 @@ class er extends dt {
|
|
|
4625
4624
|
return (s = this.eventHubDelegate) == null ? void 0 : s.notify({ type: "paths-edited", target: this });
|
|
4626
4625
|
}, r = this.innerOverlay.getPaths();
|
|
4627
4626
|
this.pathChangedListeners = [], r.forEach((s) => {
|
|
4628
|
-
this.pathChangedListeners.push(...
|
|
4627
|
+
this.pathChangedListeners.push(...ve.listenChanged(s, e));
|
|
4629
4628
|
});
|
|
4630
4629
|
}
|
|
4631
4630
|
clearPathChangedListeners() {
|
|
@@ -4633,7 +4632,7 @@ class er extends dt {
|
|
|
4633
4632
|
(e = this.pathChangedListeners) == null || e.forEach((r) => r.remove()), this.pathChangedListeners = void 0;
|
|
4634
4633
|
}
|
|
4635
4634
|
createDelegate() {
|
|
4636
|
-
return this.eventHubDelegate = new
|
|
4635
|
+
return this.eventHubDelegate = new ot(super.createDelegate(), {
|
|
4637
4636
|
types: ["paths-edited"],
|
|
4638
4637
|
onListen: () => this.setupPathChangedListeners(),
|
|
4639
4638
|
onCancel: () => this.clearPathChangedListeners()
|
|
@@ -4644,7 +4643,7 @@ class er extends dt {
|
|
|
4644
4643
|
return e.forEach((s) => {
|
|
4645
4644
|
const n = [];
|
|
4646
4645
|
r.push(n), s.forEach((a) => {
|
|
4647
|
-
n.push(
|
|
4646
|
+
n.push(O.fromGoogle(a, this.coordType));
|
|
4648
4647
|
});
|
|
4649
4648
|
}), r;
|
|
4650
4649
|
}
|
|
@@ -4653,7 +4652,7 @@ class er extends dt {
|
|
|
4653
4652
|
this.coordType = this.map.coordType, this.innerOverlay.setPaths(e.map((s) => s.map((n) => n.toGoogle(this.coordType)))), (r = this.eventHubDelegate) != null && r.hasListener("paths-edited") && this.setupPathChangedListeners();
|
|
4654
4653
|
}
|
|
4655
4654
|
}
|
|
4656
|
-
class
|
|
4655
|
+
class rr extends Xt {
|
|
4657
4656
|
constructor(e, r, s, n) {
|
|
4658
4657
|
super(e, r, s, n);
|
|
4659
4658
|
u(this, "pathEditedEventType", "bounds-changed");
|
|
@@ -4685,7 +4684,7 @@ class tr extends Kt {
|
|
|
4685
4684
|
}
|
|
4686
4685
|
} else
|
|
4687
4686
|
a < r.length;
|
|
4688
|
-
const c =
|
|
4687
|
+
const c = X.fromArray(n.map((o) => O.fromBaidu(o, this.coordType)));
|
|
4689
4688
|
c && (this.isDoingUpdateRectangle = !0, this.innerOverlay.setPath(c.toRectArray().map((o) => o.toBaidu(this.coordType))), this.isDoingUpdateRectangle = !1);
|
|
4690
4689
|
}, 0);
|
|
4691
4690
|
});
|
|
@@ -4696,15 +4695,15 @@ class tr extends Kt {
|
|
|
4696
4695
|
enableClicking: e.clickable,
|
|
4697
4696
|
enableEditing: e.editable,
|
|
4698
4697
|
strokeColor: e.strokeColor,
|
|
4699
|
-
strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity +
|
|
4698
|
+
strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + j.OPACITY_DELTA : void 0,
|
|
4700
4699
|
strokeWeight: e.strokeWeight,
|
|
4701
4700
|
fillColor: e.fillColor,
|
|
4702
|
-
fillOpacity: e.fillOpacity != null ? e.fillOpacity +
|
|
4701
|
+
fillOpacity: e.fillOpacity != null ? e.fillOpacity + j.OPACITY_DELTA : void 0
|
|
4703
4702
|
});
|
|
4704
|
-
return new
|
|
4703
|
+
return new rr(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
|
|
4705
4704
|
}
|
|
4706
4705
|
getBounds() {
|
|
4707
|
-
return
|
|
4706
|
+
return X.fromBaidu(this.innerOverlay.getBounds(), this.coordType);
|
|
4708
4707
|
}
|
|
4709
4708
|
setBounds(e) {
|
|
4710
4709
|
const r = e.toRectArray();
|
|
@@ -4713,7 +4712,7 @@ class tr extends Kt {
|
|
|
4713
4712
|
}) : this.setPathInternal(r.map((s) => s.toBaidu(this.coordType)));
|
|
4714
4713
|
}
|
|
4715
4714
|
}
|
|
4716
|
-
class
|
|
4715
|
+
class ir extends ht {
|
|
4717
4716
|
static create(t) {
|
|
4718
4717
|
const e = this.coordType, r = new google.maps.Rectangle({
|
|
4719
4718
|
bounds: t.bounds.toGoogle(e),
|
|
@@ -4726,43 +4725,43 @@ class rr extends dt {
|
|
|
4726
4725
|
fillOpacity: t.fillOpacity,
|
|
4727
4726
|
visible: t.visible
|
|
4728
4727
|
});
|
|
4729
|
-
return new
|
|
4728
|
+
return new ir(r, e, this);
|
|
4730
4729
|
}
|
|
4731
4730
|
getBounds() {
|
|
4732
|
-
return
|
|
4731
|
+
return X.fromGoogle(this.innerOverlay.getBounds() ?? he.BOUNDS_ZERO, this.coordType);
|
|
4733
4732
|
}
|
|
4734
4733
|
setBounds(t) {
|
|
4735
4734
|
const e = t.toGoogle(this.coordType);
|
|
4736
4735
|
e.equals(this.innerOverlay.getBounds()) || this.innerOverlay.setBounds(e);
|
|
4737
4736
|
}
|
|
4738
4737
|
}
|
|
4739
|
-
const
|
|
4740
|
-
class ss extends
|
|
4738
|
+
const de = 1;
|
|
4739
|
+
class ss extends Nt {
|
|
4741
4740
|
constructor(e, r) {
|
|
4742
4741
|
var s;
|
|
4743
4742
|
super(e);
|
|
4744
4743
|
u(this, "buildInMapTypeId2BIMT");
|
|
4745
4744
|
u(this, "baiduMapType2BIMT");
|
|
4746
4745
|
u(this, "map");
|
|
4747
|
-
u(this, "createLabel",
|
|
4748
|
-
u(this, "createCircle",
|
|
4749
|
-
u(this, "createPolygon",
|
|
4750
|
-
u(this, "createPolyline",
|
|
4751
|
-
u(this, "createRectangle",
|
|
4752
|
-
u(this, "createInfoWindow",
|
|
4746
|
+
u(this, "createLabel", Yt.create);
|
|
4747
|
+
u(this, "createCircle", Zt.create);
|
|
4748
|
+
u(this, "createPolygon", er.create);
|
|
4749
|
+
u(this, "createPolyline", Jt.create);
|
|
4750
|
+
u(this, "createRectangle", rr.create);
|
|
4751
|
+
u(this, "createInfoWindow", Vt.create);
|
|
4753
4752
|
u(this, "createInfoBox", Ft.create);
|
|
4754
|
-
u(this, "createMarker",
|
|
4755
|
-
u(this, "createMapTypeControl",
|
|
4756
|
-
u(this, "createZoomControl",
|
|
4757
|
-
u(this, "createStreetViewControl",
|
|
4758
|
-
u(this, "createScaleControl",
|
|
4759
|
-
this.buildInMapTypeId2BIMT = V.BUILD_IN_MAP_TYPES.getValueMap(
|
|
4760
|
-
minZoom: r.minZoom && r.minZoom +
|
|
4761
|
-
maxZoom: r.maxZoom && r.maxZoom +
|
|
4753
|
+
u(this, "createMarker", Ze.create);
|
|
4754
|
+
u(this, "createMapTypeControl", It.create);
|
|
4755
|
+
u(this, "createZoomControl", Rt.create);
|
|
4756
|
+
u(this, "createStreetViewControl", At.create);
|
|
4757
|
+
u(this, "createScaleControl", St.create);
|
|
4758
|
+
this.buildInMapTypeId2BIMT = V.BUILD_IN_MAP_TYPES.getValueMap(W.prototype.getId), this.baiduMapType2BIMT = V.BUILD_IN_MAP_TYPES.getValueMap(W.prototype.asBaiduMapType), this.map = new BMap.Map(e, {
|
|
4759
|
+
minZoom: r.minZoom && r.minZoom + de,
|
|
4760
|
+
maxZoom: r.maxZoom && r.maxZoom + de,
|
|
4762
4761
|
mapType: r.buildInMapTypeId && ((s = this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId)) == null ? void 0 : s.asBaiduMapType()),
|
|
4763
4762
|
enableMapClick: !1
|
|
4764
4763
|
// 关闭底图点击功能
|
|
4765
|
-
}), this.map.centerAndZoom(r.center.toBaidu(this.coordType), r.zoom +
|
|
4764
|
+
}), this.map.centerAndZoom(r.center.toBaidu(this.coordType), r.zoom + de), this.setGestureHandling(r.gestureHandling), r.infoWindowMode === "multi" && console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"), r.mapStyle && this.map.setMapStyleV2(r.mapStyle.baidu), this.setEventTargetDelegate(new $e(this.map, this)), this.map.addEventListener("addoverlay", (n) => {
|
|
4766
4765
|
const a = n.target.__info_box__;
|
|
4767
4766
|
a && (console.debug("add:info-box", a), this.map.addOverlay(a));
|
|
4768
4767
|
}), this.map.addEventListener("removeoverlay", (n) => {
|
|
@@ -4771,7 +4770,7 @@ class ss extends zt {
|
|
|
4771
4770
|
});
|
|
4772
4771
|
}
|
|
4773
4772
|
setGestureHandling(e = ee.auto) {
|
|
4774
|
-
switch (e === ee.auto && (e = this.element.parentElement &&
|
|
4773
|
+
switch (e === ee.auto && (e = this.element.parentElement && bt.isScrollable(this.element.parentElement) ? ee.cooperative : ee.greedy), e) {
|
|
4775
4774
|
case ee.cooperative:
|
|
4776
4775
|
this.map.disableScrollWheelZoom(), this.map.enableDragging(), this.map.enableDoubleClickZoom();
|
|
4777
4776
|
break;
|
|
@@ -4804,7 +4803,7 @@ class ss extends zt {
|
|
|
4804
4803
|
super.removeEventListener(e, r);
|
|
4805
4804
|
}
|
|
4806
4805
|
fromContainerPointToLatLng(e) {
|
|
4807
|
-
return
|
|
4806
|
+
return O.fromBaidu(this.innerMap.pixelToPoint(new BMap.Pixel(e.x, e.y)), this.coordType);
|
|
4808
4807
|
}
|
|
4809
4808
|
fromLatLngToContainerPoint(e) {
|
|
4810
4809
|
return this.innerMap.pointToPixel(e.toBaidu(this.coordType));
|
|
@@ -4819,22 +4818,22 @@ class ss extends zt {
|
|
|
4819
4818
|
e ? this.map.enableDoubleClickZoom() : this.map.disableDoubleClickZoom();
|
|
4820
4819
|
}
|
|
4821
4820
|
getCenter() {
|
|
4822
|
-
return
|
|
4821
|
+
return O.fromBaidu(this.map.getCenter(), this.coordType);
|
|
4823
4822
|
}
|
|
4824
4823
|
setCenter(e) {
|
|
4825
4824
|
this.map.setCenter(e.toBaidu(this.coordType));
|
|
4826
4825
|
}
|
|
4827
4826
|
getZoom() {
|
|
4828
|
-
return super.getZoom() -
|
|
4827
|
+
return super.getZoom() - de;
|
|
4829
4828
|
}
|
|
4830
4829
|
setZoom(e) {
|
|
4831
|
-
return super.setZoom(e +
|
|
4830
|
+
return super.setZoom(e + de);
|
|
4832
4831
|
}
|
|
4833
4832
|
setMinZoom(e) {
|
|
4834
|
-
this.map.setMinZoom(e +
|
|
4833
|
+
this.map.setMinZoom(e + de);
|
|
4835
4834
|
}
|
|
4836
4835
|
setMaxZoom(e) {
|
|
4837
|
-
this.map.setMaxZoom(e +
|
|
4836
|
+
this.map.setMaxZoom(e + de);
|
|
4838
4837
|
}
|
|
4839
4838
|
setMapStyle(e) {
|
|
4840
4839
|
this.map.setMapStyleV2((e == null ? void 0 : e.baidu) ?? { styleJson: [] });
|
|
@@ -4870,7 +4869,7 @@ class ss extends zt {
|
|
|
4870
4869
|
});
|
|
4871
4870
|
}
|
|
4872
4871
|
getBounds() {
|
|
4873
|
-
return
|
|
4872
|
+
return X.fromBaidu(this.map.getBounds(), this.coordType);
|
|
4874
4873
|
}
|
|
4875
4874
|
addElementOverlay(e) {
|
|
4876
4875
|
this.map.addOverlay(e.asBaidu());
|
|
@@ -4889,7 +4888,7 @@ class ss extends zt {
|
|
|
4889
4888
|
const r = class extends BMap.Control {
|
|
4890
4889
|
constructor() {
|
|
4891
4890
|
super(...arguments);
|
|
4892
|
-
u(this, "defaultAnchor",
|
|
4891
|
+
u(this, "defaultAnchor", U.getBaidu().toValue(e.position));
|
|
4893
4892
|
u(this, "defaultOffset", new BMap.Size(0, 0));
|
|
4894
4893
|
}
|
|
4895
4894
|
initialize(n) {
|
|
@@ -4904,10 +4903,10 @@ class ss extends zt {
|
|
|
4904
4903
|
e.inner && (me(e.inner instanceof BMap.Control, `control.inner(${e.inner})需要是BMap.Control`), this.map.removeControl(e.inner));
|
|
4905
4904
|
}
|
|
4906
4905
|
createMarkerClusterer(e) {
|
|
4907
|
-
return new
|
|
4906
|
+
return new Li(this, e);
|
|
4908
4907
|
}
|
|
4909
4908
|
createHeatmap(e) {
|
|
4910
|
-
return new
|
|
4909
|
+
return new Ci(this, e);
|
|
4911
4910
|
}
|
|
4912
4911
|
createAutocomplete(e) {
|
|
4913
4912
|
return new bi(this, e);
|
|
@@ -4919,29 +4918,29 @@ class ss extends zt {
|
|
|
4919
4918
|
return new Si(this, e);
|
|
4920
4919
|
}
|
|
4921
4920
|
createMapUrls(e) {
|
|
4922
|
-
return new
|
|
4921
|
+
return new Ot(e);
|
|
4923
4922
|
}
|
|
4924
4923
|
}
|
|
4925
|
-
class ns extends
|
|
4924
|
+
class ns extends Nt {
|
|
4926
4925
|
constructor(e, r) {
|
|
4927
4926
|
var n, a;
|
|
4928
4927
|
super(e);
|
|
4929
4928
|
u(this, "buildInMapTypeId2BIMT");
|
|
4930
4929
|
u(this, "googleMapTypeId2BIMT");
|
|
4931
4930
|
u(this, "map");
|
|
4932
|
-
u(this, "createLabel",
|
|
4933
|
-
u(this, "createCircle",
|
|
4934
|
-
u(this, "createPolygon",
|
|
4935
|
-
u(this, "createPolyline",
|
|
4936
|
-
u(this, "createRectangle",
|
|
4931
|
+
u(this, "createLabel", qt.create);
|
|
4932
|
+
u(this, "createCircle", Wt.create);
|
|
4933
|
+
u(this, "createPolygon", tr.create);
|
|
4934
|
+
u(this, "createPolyline", Qt.create);
|
|
4935
|
+
u(this, "createRectangle", ir.create);
|
|
4937
4936
|
u(this, "createInfoWindow", jt.create);
|
|
4938
|
-
u(this, "createInfoBox",
|
|
4939
|
-
u(this, "createMarker",
|
|
4940
|
-
u(this, "createMapTypeControl",
|
|
4941
|
-
u(this, "createZoomControl",
|
|
4942
|
-
u(this, "createStreetViewControl",
|
|
4943
|
-
u(this, "createScaleControl",
|
|
4944
|
-
this.mapOptions = r, this.buildInMapTypeId2BIMT = V.BUILD_IN_MAP_TYPES.getValueMap(
|
|
4937
|
+
u(this, "createInfoBox", Ut.create);
|
|
4938
|
+
u(this, "createMarker", Kt.create);
|
|
4939
|
+
u(this, "createMapTypeControl", Tt.create);
|
|
4940
|
+
u(this, "createZoomControl", $t.create);
|
|
4941
|
+
u(this, "createStreetViewControl", Dt.create);
|
|
4942
|
+
u(this, "createScaleControl", kt.create);
|
|
4943
|
+
this.mapOptions = r, this.buildInMapTypeId2BIMT = V.BUILD_IN_MAP_TYPES.getValueMap(W.prototype.getId), this.googleMapTypeId2BIMT = V.BUILD_IN_MAP_TYPES.getValueMap(W.prototype.getGoogleMapTypeId);
|
|
4945
4944
|
const s = r.buildInMapTypeId && this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId);
|
|
4946
4945
|
this.map = new google.maps.Map(e, {
|
|
4947
4946
|
center: r.center.toGoogle((s ?? V.NORMAL).getGoogleCoordType()),
|
|
@@ -4953,7 +4952,7 @@ class ns extends zt {
|
|
|
4953
4952
|
styles: (n = r.mapStyle) == null ? void 0 : n.google.styles,
|
|
4954
4953
|
mapId: (a = r.mapStyle) == null ? void 0 : a.google.mapId,
|
|
4955
4954
|
mapTypeId: s == null ? void 0 : s.getGoogleMapTypeId()
|
|
4956
|
-
}), this.setEventTargetDelegate(new
|
|
4955
|
+
}), this.setEventTargetDelegate(new ye(this.map, this));
|
|
4957
4956
|
}
|
|
4958
4957
|
setGestureHandling(e) {
|
|
4959
4958
|
this.map.setOptions({
|
|
@@ -4969,22 +4968,22 @@ class ns extends zt {
|
|
|
4969
4968
|
fromContainerPointToLatLng(e) {
|
|
4970
4969
|
const r = this.innerMap.getProjection(), s = this.innerMap.getBounds();
|
|
4971
4970
|
if (r == null || s == null)
|
|
4972
|
-
return
|
|
4971
|
+
return O.ZERO;
|
|
4973
4972
|
const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), c = this.innerMap.getZoom();
|
|
4974
4973
|
if (n == null || a == null || c == null)
|
|
4975
|
-
return
|
|
4974
|
+
return O.ZERO;
|
|
4976
4975
|
const o = Math.pow(2, c), l = new google.maps.Point(e.x / o + n.x, e.y / o + a.y);
|
|
4977
|
-
return
|
|
4976
|
+
return O.fromGoogle(r.fromPointToLatLng(l) ?? he.LATLNG_ZERO, this.coordType);
|
|
4978
4977
|
}
|
|
4979
4978
|
fromLatLngToContainerPoint(e) {
|
|
4980
4979
|
const r = this.innerMap.getProjection(), s = this.innerMap.getBounds();
|
|
4981
4980
|
if (r == null || s == null)
|
|
4982
|
-
return
|
|
4981
|
+
return le.ZERO;
|
|
4983
4982
|
const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), c = this.innerMap.getZoom();
|
|
4984
4983
|
if (n == null || a == null || c == null)
|
|
4985
|
-
return
|
|
4984
|
+
return le.ZERO;
|
|
4986
4985
|
const o = Math.pow(2, c), l = r.fromLatLngToPoint(e.toGoogle(this.coordType));
|
|
4987
|
-
return l == null ?
|
|
4986
|
+
return l == null ? le.ZERO : { x: (l.x - n.x) * o, y: (l.y - a.y) * o };
|
|
4988
4987
|
}
|
|
4989
4988
|
setDefaultCursor(e) {
|
|
4990
4989
|
this.innerMap.setOptions({ draggableCursor: e });
|
|
@@ -4996,7 +4995,7 @@ class ns extends zt {
|
|
|
4996
4995
|
this.map.setOptions({ disableDoubleClickZoom: !e });
|
|
4997
4996
|
}
|
|
4998
4997
|
getCenter() {
|
|
4999
|
-
return
|
|
4998
|
+
return O.fromGoogle(this.map.getCenter() ?? he.LATLNG_ZERO, this.coordType);
|
|
5000
4999
|
}
|
|
5001
5000
|
setCenter(e) {
|
|
5002
5001
|
this.map.setCenter(e.toGoogle(this.coordType));
|
|
@@ -5019,7 +5018,7 @@ class ns extends zt {
|
|
|
5019
5018
|
this.map.setMapTypeId(r ?? B("理论上来说不可能为空"));
|
|
5020
5019
|
}
|
|
5021
5020
|
setMapType(e) {
|
|
5022
|
-
e instanceof
|
|
5021
|
+
e instanceof W ? this.map.setMapTypeId(e.getGoogleMapTypeId()) : (this.map.mapTypes.set(e.id, e.asGoogleMapType()), this.map.setMapTypeId(e.id));
|
|
5023
5022
|
}
|
|
5024
5023
|
getMapType() {
|
|
5025
5024
|
const e = this.map.getMapTypeId() ?? google.maps.MapTypeId.ROADMAP, r = this.googleMapTypeId2BIMT.get(e);
|
|
@@ -5029,7 +5028,7 @@ class ns extends zt {
|
|
|
5029
5028
|
this.map.overlayMapTypes.push(e.asGoogleMapType());
|
|
5030
5029
|
}
|
|
5031
5030
|
removeOverlayMapType(e) {
|
|
5032
|
-
|
|
5031
|
+
ve.remove(this.map.overlayMapTypes, e.asGoogleMapType());
|
|
5033
5032
|
}
|
|
5034
5033
|
addLayer(e) {
|
|
5035
5034
|
e.asGoogleLayer().setMap(this.map);
|
|
@@ -5048,7 +5047,7 @@ class ns extends zt {
|
|
|
5048
5047
|
}
|
|
5049
5048
|
getBounds() {
|
|
5050
5049
|
const e = this.map.getBounds();
|
|
5051
|
-
return e ?
|
|
5050
|
+
return e ? X.fromGoogle(e, this.coordType) : X.EMPTY;
|
|
5052
5051
|
}
|
|
5053
5052
|
addElementOverlay(e) {
|
|
5054
5053
|
e.asGoogle().setMap(this.map);
|
|
@@ -5063,19 +5062,19 @@ class ns extends zt {
|
|
|
5063
5062
|
e.innerOverlay.setMap(null);
|
|
5064
5063
|
}
|
|
5065
5064
|
addCustomControl(e) {
|
|
5066
|
-
e.inner || (e.inner = e.onCreateElement(), this.map.controls[
|
|
5065
|
+
e.inner || (e.inner = e.onCreateElement(), this.map.controls[U.getGoogle().toValue(e.position)].push(e.inner));
|
|
5067
5066
|
}
|
|
5068
5067
|
removeCustomControl(e) {
|
|
5069
5068
|
if (e.inner) {
|
|
5070
|
-
const r = this.map.controls[
|
|
5071
|
-
|
|
5069
|
+
const r = this.map.controls[U.getGoogle().toValue(e.position)];
|
|
5070
|
+
ve.remove(r, e.inner);
|
|
5072
5071
|
}
|
|
5073
5072
|
}
|
|
5074
5073
|
createMarkerClusterer(e) {
|
|
5075
5074
|
return new Bi(this, e);
|
|
5076
5075
|
}
|
|
5077
5076
|
createHeatmap(e) {
|
|
5078
|
-
return new
|
|
5077
|
+
return new Oi(this, e);
|
|
5079
5078
|
}
|
|
5080
5079
|
createAutocomplete(e) {
|
|
5081
5080
|
return new _i(this, e);
|
|
@@ -5087,14 +5086,14 @@ class ns extends zt {
|
|
|
5087
5086
|
return new Ii(this, e);
|
|
5088
5087
|
}
|
|
5089
5088
|
createMapUrls(e) {
|
|
5090
|
-
return new
|
|
5089
|
+
return new Mt(e);
|
|
5091
5090
|
}
|
|
5092
5091
|
}
|
|
5093
5092
|
const tt = ["3.0"], os = {
|
|
5094
5093
|
baidu: {
|
|
5095
5094
|
version: "3.0",
|
|
5096
5095
|
// 在build时会被静态替换, 导致使用者不能无法设置它
|
|
5097
|
-
// @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-,
|
|
5096
|
+
// @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-,import.meta.env.*,-%E7%94%A8%E6%B3%95%E5%9C%A8%E6%9E%84
|
|
5098
5097
|
// @see @vite_process_env_detail
|
|
5099
5098
|
key: "kXOq8Hg9BZbZEWAjXKuzd1oGreynup8h"
|
|
5100
5099
|
},
|
|
@@ -5109,21 +5108,21 @@ const tt = ["3.0"], os = {
|
|
|
5109
5108
|
key: ""
|
|
5110
5109
|
}
|
|
5111
5110
|
};
|
|
5112
|
-
let
|
|
5113
|
-
function
|
|
5114
|
-
return
|
|
5111
|
+
let Vr;
|
|
5112
|
+
function jr() {
|
|
5113
|
+
return Vr || B("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
|
|
5115
5114
|
}
|
|
5116
5115
|
function as(i) {
|
|
5117
|
-
i != null && (
|
|
5116
|
+
i != null && (Vr = Gr(os, i));
|
|
5118
5117
|
}
|
|
5119
|
-
class ls extends
|
|
5118
|
+
class ls extends Nt {
|
|
5120
5119
|
constructor(e, r) {
|
|
5121
5120
|
var a;
|
|
5122
5121
|
super(e);
|
|
5123
5122
|
u(this, "map");
|
|
5124
5123
|
u(this, "defaultLayers");
|
|
5125
5124
|
this.mapOptions = r;
|
|
5126
|
-
const s =
|
|
5125
|
+
const s = jr().here;
|
|
5127
5126
|
tt.includes(s.version) || B(`不支持${s.version}, HereMap当前只支持如下版本: ${tt}`);
|
|
5128
5127
|
const n = new H.service.Platform({
|
|
5129
5128
|
app_id: s.key.split(",")[0],
|
|
@@ -5141,7 +5140,7 @@ class ls extends zt {
|
|
|
5141
5140
|
return A.wgs84;
|
|
5142
5141
|
}
|
|
5143
5142
|
getCenter() {
|
|
5144
|
-
return
|
|
5143
|
+
return O.fromHere(this.map.getCenter(), this.coordType);
|
|
5145
5144
|
}
|
|
5146
5145
|
setCenter(e) {
|
|
5147
5146
|
this.map.setCenter(e.toHere(this.coordType));
|
|
@@ -5274,7 +5273,7 @@ class ls extends zt {
|
|
|
5274
5273
|
throw new Error("Method not implemented.");
|
|
5275
5274
|
}
|
|
5276
5275
|
}
|
|
5277
|
-
var
|
|
5276
|
+
var q = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here = "here", i))(q || {}), wt;
|
|
5278
5277
|
((i) => {
|
|
5279
5278
|
function t(e, r, s) {
|
|
5280
5279
|
const n = Ct.create(s);
|
|
@@ -5288,53 +5287,54 @@ var K = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here
|
|
|
5288
5287
|
}
|
|
5289
5288
|
}
|
|
5290
5289
|
i.createMap = t;
|
|
5291
|
-
})(
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
}
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5290
|
+
})(wt || (wt = {}));
|
|
5291
|
+
var hs = { VITE_APP_DEV_KEY_BAIDU: "kXOq8Hg9BZbZEWAjXKuzd1oGreynup8h", VITE_APP_DEV_KEY_GOOGLE: "AIzaSyBcyzMel3dYFNcfcr0LOklbBQNpWycyZXo", VITE_APP_DEV_KEY_HERE: "", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
5292
|
+
const cs = {};
|
|
5293
|
+
function ds(i) {
|
|
5294
|
+
return ce.putIfAbsent(cs, i, () => hi(() => us({ type: i, config: jr()[i] })))();
|
|
5295
|
+
}
|
|
5296
|
+
function us({ type: i, config: t }) {
|
|
5297
|
+
const e = window, r = ps(i);
|
|
5298
|
+
if (ce.get(e, r))
|
|
5299
5299
|
return Promise.resolve();
|
|
5300
|
-
switch (i !==
|
|
5301
|
-
case
|
|
5302
|
-
return
|
|
5300
|
+
switch (i !== q.here && !t.key && B(`请先配置${i}地图的key`), i) {
|
|
5301
|
+
case q.google:
|
|
5302
|
+
return hs.VITE_FALSE ? (fi({
|
|
5303
5303
|
key: t.key,
|
|
5304
5304
|
v: "3.52"
|
|
5305
5305
|
// v: config.version,
|
|
5306
5306
|
}), google.maps.importLibrary("core")) : gr(`https://maps.googleapis.com/maps/api/js?key=${t.key}&language=${t.language}&v=${t.version}&libraries=${t.libraries.join(",")}`);
|
|
5307
|
-
case
|
|
5307
|
+
case q.baidu:
|
|
5308
5308
|
return gr(`https://api.map.baidu.com/api?v=${t.version}&ak=${t.key}`);
|
|
5309
|
-
case
|
|
5309
|
+
case q.here:
|
|
5310
5310
|
return Ee(xe("core", t.version)).then(() => Promise.all([
|
|
5311
5311
|
// 其他大多数模块都可以同时载入
|
|
5312
5312
|
Ee(xe("service", t.version)),
|
|
5313
5313
|
Ee(xe("mapevents", t.version)),
|
|
5314
5314
|
Ee(xe("clustering", t.version)),
|
|
5315
5315
|
Ee(xe("ui", t.version))
|
|
5316
|
-
])).catch((s) => (
|
|
5316
|
+
])).catch((s) => (ce.del(e, r), Promise.reject(s)));
|
|
5317
5317
|
default:
|
|
5318
|
-
|
|
5318
|
+
vt(i);
|
|
5319
5319
|
}
|
|
5320
5320
|
}
|
|
5321
5321
|
function xe(i, t = tt[0]) {
|
|
5322
5322
|
return `https://js.api.here.com/v3/${t}/mapsjs-${i}.js`;
|
|
5323
5323
|
}
|
|
5324
|
-
function
|
|
5324
|
+
function ps(i) {
|
|
5325
5325
|
switch (i) {
|
|
5326
|
-
case
|
|
5326
|
+
case q.google:
|
|
5327
5327
|
return "google.maps";
|
|
5328
|
-
case
|
|
5328
|
+
case q.baidu:
|
|
5329
5329
|
return "BMap";
|
|
5330
|
-
case
|
|
5330
|
+
case q.here:
|
|
5331
5331
|
return "H";
|
|
5332
5332
|
}
|
|
5333
5333
|
}
|
|
5334
|
-
let
|
|
5334
|
+
let gs = 0;
|
|
5335
5335
|
function gr(i, t = "callback") {
|
|
5336
5336
|
return new Promise((e, r) => {
|
|
5337
|
-
const s = `__callback${
|
|
5337
|
+
const s = `__callback${gs++}`;
|
|
5338
5338
|
window[s] = e;
|
|
5339
5339
|
const n = document.createElement("script");
|
|
5340
5340
|
n.src = `${i}&${t}=${s}`, n.onerror = r, document.body.appendChild(n);
|
|
@@ -5346,21 +5346,21 @@ function Ee(i) {
|
|
|
5346
5346
|
r.src = i, r.onload = t, r.onerror = e, document.body.appendChild(r);
|
|
5347
5347
|
});
|
|
5348
5348
|
}
|
|
5349
|
-
function
|
|
5349
|
+
function F(i, t) {
|
|
5350
5350
|
return {
|
|
5351
5351
|
type: String,
|
|
5352
5352
|
default: t,
|
|
5353
5353
|
validator: (e) => Object.values(i).includes(e)
|
|
5354
5354
|
};
|
|
5355
5355
|
}
|
|
5356
|
-
function
|
|
5356
|
+
function ms(i, t) {
|
|
5357
5357
|
return {
|
|
5358
5358
|
type: String,
|
|
5359
5359
|
default: t,
|
|
5360
5360
|
validator: (e) => i.includes(e)
|
|
5361
5361
|
};
|
|
5362
5362
|
}
|
|
5363
|
-
function
|
|
5363
|
+
function z(i) {
|
|
5364
5364
|
return {
|
|
5365
5365
|
type: i,
|
|
5366
5366
|
required: !0
|
|
@@ -5372,7 +5372,7 @@ function _(i, t) {
|
|
|
5372
5372
|
default: t
|
|
5373
5373
|
};
|
|
5374
5374
|
}
|
|
5375
|
-
function
|
|
5375
|
+
function bn(i) {
|
|
5376
5376
|
const t = {};
|
|
5377
5377
|
return Object.entries(i).forEach(([e, r]) => {
|
|
5378
5378
|
const s = `__${e}`;
|
|
@@ -5389,37 +5389,37 @@ function yn(i) {
|
|
|
5389
5389
|
};
|
|
5390
5390
|
}), t;
|
|
5391
5391
|
}
|
|
5392
|
-
const
|
|
5392
|
+
const Pe = {
|
|
5393
5393
|
enumerable: !0,
|
|
5394
5394
|
configurable: !0,
|
|
5395
|
-
get:
|
|
5396
|
-
set:
|
|
5395
|
+
get: Re,
|
|
5396
|
+
set: Re
|
|
5397
5397
|
};
|
|
5398
|
-
function
|
|
5398
|
+
function fs(i) {
|
|
5399
5399
|
return Object.keys(i).forEach((t) => {
|
|
5400
5400
|
const e = i[t];
|
|
5401
5401
|
let r = !1;
|
|
5402
|
-
typeof e == "function" ? (
|
|
5402
|
+
typeof e == "function" ? (Pe.get = e, Pe.set = Re, r = !0) : typeof e == "object" && typeof e.get == "function" && (Pe.get = e.get, Pe.set = e.set, r = !0), r && (i[t] = Object.defineProperty(i, t, Pe));
|
|
5403
5403
|
}), i;
|
|
5404
5404
|
}
|
|
5405
|
-
function
|
|
5406
|
-
return
|
|
5405
|
+
function Tn(i) {
|
|
5406
|
+
return fs(i);
|
|
5407
5407
|
}
|
|
5408
|
-
function
|
|
5409
|
-
return
|
|
5408
|
+
function ct() {
|
|
5409
|
+
return ft();
|
|
5410
5410
|
}
|
|
5411
|
-
function
|
|
5411
|
+
function Ue(i, t) {
|
|
5412
5412
|
const e = i.$options[t];
|
|
5413
5413
|
if (e)
|
|
5414
5414
|
for (const r of e)
|
|
5415
5415
|
r.call(i);
|
|
5416
5416
|
}
|
|
5417
|
-
function
|
|
5417
|
+
function Mn(i, t) {
|
|
5418
5418
|
for (const e of i)
|
|
5419
5419
|
if (e.$options.name === t.name)
|
|
5420
5420
|
return e;
|
|
5421
5421
|
}
|
|
5422
|
-
function
|
|
5422
|
+
function On(i, t) {
|
|
5423
5423
|
if (!i.default)
|
|
5424
5424
|
return;
|
|
5425
5425
|
const e = i.default();
|
|
@@ -5427,7 +5427,7 @@ function Tn(i, t) {
|
|
|
5427
5427
|
if ((r == null ? void 0 : r.type).name === t.name)
|
|
5428
5428
|
return r;
|
|
5429
5429
|
}
|
|
5430
|
-
function
|
|
5430
|
+
function vs(i, t) {
|
|
5431
5431
|
const e = {}, r = {}, s = {};
|
|
5432
5432
|
return Object.keys(i).forEach((n) => {
|
|
5433
5433
|
n.startsWith("on") ? e[be.pascal2kebab(n.substring(2))] = i[n] : r[n] = i[n];
|
|
@@ -5443,12 +5443,12 @@ function fs(i, t) {
|
|
|
5443
5443
|
};
|
|
5444
5444
|
}
|
|
5445
5445
|
function ne(i, t) {
|
|
5446
|
-
return fr(() =>
|
|
5446
|
+
return fr(() => vs(i, t));
|
|
5447
5447
|
}
|
|
5448
5448
|
function S() {
|
|
5449
5449
|
return Function;
|
|
5450
5450
|
}
|
|
5451
|
-
const
|
|
5451
|
+
const Cn = () => {
|
|
5452
5452
|
let i, t;
|
|
5453
5453
|
function e(s) {
|
|
5454
5454
|
console.log(s), i = s && s.type, t = Date.now();
|
|
@@ -5457,33 +5457,33 @@ const Mn = () => {
|
|
|
5457
5457
|
((s && s.type) !== i || Date.now() - (t ?? 0) > 1e3) && e(s);
|
|
5458
5458
|
}
|
|
5459
5459
|
return { eventLog: e, eventLogLess: r };
|
|
5460
|
-
},
|
|
5461
|
-
inject: [
|
|
5460
|
+
}, sr = "$map", We = "onCreate", He = "onDestroy", $ = P({
|
|
5461
|
+
inject: [sr],
|
|
5462
5462
|
mounted() {
|
|
5463
|
-
|
|
5463
|
+
Ue(this, We);
|
|
5464
5464
|
},
|
|
5465
5465
|
beforeUnmount() {
|
|
5466
|
-
|
|
5466
|
+
Ue(this, He);
|
|
5467
5467
|
},
|
|
5468
5468
|
methods: {
|
|
5469
5469
|
recreate() {
|
|
5470
|
-
|
|
5470
|
+
Ue(this, He), Ue(this, We);
|
|
5471
5471
|
}
|
|
5472
5472
|
},
|
|
5473
5473
|
render() {
|
|
5474
|
-
return
|
|
5474
|
+
return ct();
|
|
5475
5475
|
}
|
|
5476
|
-
}),
|
|
5476
|
+
}), ys = P({
|
|
5477
5477
|
name: "tg-map",
|
|
5478
5478
|
provide() {
|
|
5479
5479
|
return {
|
|
5480
|
-
[
|
|
5480
|
+
[sr]: fr(() => this.map)
|
|
5481
5481
|
};
|
|
5482
5482
|
},
|
|
5483
5483
|
inheritAttrs: !1,
|
|
5484
5484
|
props: {
|
|
5485
5485
|
/** type没做响应式, 但外部可以把type作为tg-map的key, 让type修改时完全重建tg-map */
|
|
5486
|
-
type:
|
|
5486
|
+
type: F(q, q.google),
|
|
5487
5487
|
/**
|
|
5488
5488
|
* 当对该属性使用双向绑定时, 改变center将触发update:center又反过来触发center改变, 最终导致无限循环...
|
|
5489
5489
|
* 当前通过setCenter()时判断center是否有改变来避免该问题, 但为了避免可能存在的问题, 另外设计了如下机制:
|
|
@@ -5492,7 +5492,7 @@ const Mn = () => {
|
|
|
5492
5492
|
* - :last-center.sync="center": 获取tg-map销毁时的最后的center的值, 使用这种方式可以做到type切换时保留中心点位置
|
|
5493
5493
|
* @see AbstractMapEventMap.center-changed
|
|
5494
5494
|
* */
|
|
5495
|
-
center:
|
|
5495
|
+
center: z(O),
|
|
5496
5496
|
/**
|
|
5497
5497
|
* 同步center的延时
|
|
5498
5498
|
* @default 300
|
|
@@ -5503,23 +5503,23 @@ const Mn = () => {
|
|
|
5503
5503
|
* 仅用来获取center的值, 需要设置center的值请使用`center`属性
|
|
5504
5504
|
* @see center
|
|
5505
5505
|
* */
|
|
5506
|
-
currentCenter: _(
|
|
5506
|
+
currentCenter: _(O),
|
|
5507
5507
|
/**
|
|
5508
5508
|
* 仅用于获取tg-map销毁时的最后的center的值
|
|
5509
5509
|
* @see center
|
|
5510
5510
|
*/
|
|
5511
|
-
lastCenter: _(
|
|
5512
|
-
zoom:
|
|
5511
|
+
lastCenter: _(O),
|
|
5512
|
+
zoom: z(Number),
|
|
5513
5513
|
/**
|
|
5514
5514
|
* 该属性不会响应式更新, 要让它立即生效, 请参考{@link file://./../views/map/InfoDemo.vue#L3}
|
|
5515
5515
|
* @see MapOptions.infoWindowMode
|
|
5516
5516
|
*/
|
|
5517
|
-
infoWindowMode:
|
|
5518
|
-
gestureHandling:
|
|
5517
|
+
infoWindowMode: ms(Xi),
|
|
5518
|
+
gestureHandling: F(ee),
|
|
5519
5519
|
minZoom: _(Number),
|
|
5520
5520
|
maxZoom: _(Number),
|
|
5521
5521
|
mapStyle: _(Object),
|
|
5522
|
-
mapTypeId:
|
|
5522
|
+
mapTypeId: F(Mr),
|
|
5523
5523
|
/** 地图类型对象, 优先级比mapTypeId高 */
|
|
5524
5524
|
mapType: _(Object),
|
|
5525
5525
|
hideLogo: _(Boolean),
|
|
@@ -5542,13 +5542,13 @@ const Mn = () => {
|
|
|
5542
5542
|
},
|
|
5543
5543
|
data() {
|
|
5544
5544
|
return {
|
|
5545
|
-
map:
|
|
5545
|
+
map: yt(),
|
|
5546
5546
|
isDestroyed: !1
|
|
5547
5547
|
};
|
|
5548
5548
|
},
|
|
5549
5549
|
computed: {
|
|
5550
5550
|
propsJson() {
|
|
5551
|
-
return
|
|
5551
|
+
return ce.toJsonSafely(this.$props);
|
|
5552
5552
|
}
|
|
5553
5553
|
},
|
|
5554
5554
|
watch: {
|
|
@@ -5580,7 +5580,7 @@ const Mn = () => {
|
|
|
5580
5580
|
async mounted() {
|
|
5581
5581
|
const i = this.type;
|
|
5582
5582
|
try {
|
|
5583
|
-
await
|
|
5583
|
+
await ds(i);
|
|
5584
5584
|
} catch (s) {
|
|
5585
5585
|
this.$emit("error", s);
|
|
5586
5586
|
return;
|
|
@@ -5589,7 +5589,7 @@ const Mn = () => {
|
|
|
5589
5589
|
console.warn(`tg-map(type=${i})已销毁, 不需要继续执行`);
|
|
5590
5590
|
return;
|
|
5591
5591
|
}
|
|
5592
|
-
const t =
|
|
5592
|
+
const t = wt.createMap(
|
|
5593
5593
|
i,
|
|
5594
5594
|
this.$refs.map,
|
|
5595
5595
|
/* options: */
|
|
@@ -5609,7 +5609,7 @@ const Mn = () => {
|
|
|
5609
5609
|
t,
|
|
5610
5610
|
/* excludes: */
|
|
5611
5611
|
["load"]
|
|
5612
|
-
), this.$emit("load", t),
|
|
5612
|
+
), this.$emit("load", t), De([
|
|
5613
5613
|
() => this.zoom,
|
|
5614
5614
|
() => this.center
|
|
5615
5615
|
//
|
|
@@ -5636,29 +5636,28 @@ const Mn = () => {
|
|
|
5636
5636
|
this.isDestroyed = !0, this.map && ("update:last-center" in this.attrs.listenerProps && this.$emit("update:last-center", this.map.getCenter()), "update:center" in this.attrs.listenerProps && (clearTimeout(this.centerSyncTimeoutId), this.$emit("update:center", this.map.getCenter())));
|
|
5637
5637
|
},
|
|
5638
5638
|
methods: {}
|
|
5639
|
-
})
|
|
5640
|
-
const oe = (i, t) => {
|
|
5639
|
+
}), oe = (i, t) => {
|
|
5641
5640
|
const e = i.__vccOpts || i;
|
|
5642
5641
|
for (const [r, s] of t)
|
|
5643
5642
|
e[r] = s;
|
|
5644
5643
|
return e;
|
|
5645
5644
|
};
|
|
5646
|
-
function
|
|
5647
|
-
return re(), ie("div",
|
|
5645
|
+
function _s(i, t, e, r, s, n) {
|
|
5646
|
+
return re(), ie("div", Oe({ class: "tg-map" }, i.attrs.binds), [
|
|
5648
5647
|
Xr("div", {
|
|
5649
5648
|
ref: "map",
|
|
5650
|
-
class:
|
|
5649
|
+
class: it({
|
|
5651
5650
|
"tg-map__map": !0,
|
|
5652
5651
|
[`tg-map__map--hide-logo-${i.type}`]: i.hideLogo
|
|
5653
5652
|
})
|
|
5654
5653
|
}, null, 2),
|
|
5655
|
-
|
|
5656
|
-
i.map ?
|
|
5657
|
-
|
|
5654
|
+
ft("", !0),
|
|
5655
|
+
i.map ? K(i.$slots, "default", { key: 1 }) : ft("", !0),
|
|
5656
|
+
K(i.$slots, "overlay")
|
|
5658
5657
|
], 16);
|
|
5659
5658
|
}
|
|
5660
|
-
const
|
|
5661
|
-
function
|
|
5659
|
+
const Ve = /* @__PURE__ */ oe(ys, [["render", _s]]);
|
|
5660
|
+
function bs(i) {
|
|
5662
5661
|
if (i == null)
|
|
5663
5662
|
return;
|
|
5664
5663
|
let t;
|
|
@@ -5669,7 +5668,7 @@ function _s(i) {
|
|
|
5669
5668
|
t = i;
|
|
5670
5669
|
return `${t}px`;
|
|
5671
5670
|
}
|
|
5672
|
-
const
|
|
5671
|
+
const Ts = P({
|
|
5673
5672
|
name: "tg-map-widget",
|
|
5674
5673
|
props: {
|
|
5675
5674
|
left: {
|
|
@@ -5695,22 +5694,22 @@ const bs = L({
|
|
|
5695
5694
|
}
|
|
5696
5695
|
},
|
|
5697
5696
|
methods: {
|
|
5698
|
-
dimen:
|
|
5697
|
+
dimen: bs
|
|
5699
5698
|
}
|
|
5700
5699
|
});
|
|
5701
|
-
function
|
|
5700
|
+
function Ms(i, t, e, r, s, n) {
|
|
5702
5701
|
return re(), ie("div", {
|
|
5703
|
-
class:
|
|
5702
|
+
class: it(i.$options.name),
|
|
5704
5703
|
style: Jr({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
|
|
5705
5704
|
}, [
|
|
5706
|
-
|
|
5705
|
+
K(i.$slots, "default")
|
|
5707
5706
|
], 6);
|
|
5708
5707
|
}
|
|
5709
|
-
const
|
|
5708
|
+
const Os = /* @__PURE__ */ oe(Ts, [["render", Ms]]), Cs = P({
|
|
5710
5709
|
name: "tg-custom-control",
|
|
5711
|
-
mixins: [
|
|
5710
|
+
mixins: [$],
|
|
5712
5711
|
props: {
|
|
5713
|
-
position:
|
|
5712
|
+
position: F(k, k.RIGHT_BOTTOM)
|
|
5714
5713
|
},
|
|
5715
5714
|
setup() {
|
|
5716
5715
|
return {
|
|
@@ -5723,7 +5722,7 @@ const Ms = /* @__PURE__ */ oe(bs, [["render", Ts]]), Cs = L({
|
|
|
5723
5722
|
}
|
|
5724
5723
|
},
|
|
5725
5724
|
onCreate() {
|
|
5726
|
-
yr(this.$parent,
|
|
5725
|
+
yr(this.$parent, Ve) || console.warn("请将tg-custom-control放到tg-map中");
|
|
5727
5726
|
const { $el: i } = this, t = class extends pi {
|
|
5728
5727
|
onCreateElement() {
|
|
5729
5728
|
return i;
|
|
@@ -5735,19 +5734,19 @@ const Ms = /* @__PURE__ */ oe(bs, [["render", Ts]]), Cs = L({
|
|
|
5735
5734
|
this.$map.removeCustomControl(this.control);
|
|
5736
5735
|
}
|
|
5737
5736
|
});
|
|
5738
|
-
function
|
|
5737
|
+
function ws(i, t, e, r, s, n) {
|
|
5739
5738
|
return re(), ie("div", {
|
|
5740
|
-
class:
|
|
5739
|
+
class: it(i.$options.name)
|
|
5741
5740
|
}, [
|
|
5742
|
-
|
|
5741
|
+
K(i.$slots, "default")
|
|
5743
5742
|
], 2);
|
|
5744
5743
|
}
|
|
5745
|
-
const
|
|
5744
|
+
const xs = /* @__PURE__ */ oe(Cs, [["render", ws]]), Es = P({
|
|
5746
5745
|
name: "tg-map-type-control",
|
|
5747
|
-
mixins: [
|
|
5746
|
+
mixins: [$],
|
|
5748
5747
|
props: {
|
|
5749
|
-
position:
|
|
5750
|
-
type:
|
|
5748
|
+
position: F(k, k.TOP_LEFT),
|
|
5749
|
+
type: F(Or),
|
|
5751
5750
|
mapTypes: _(Array)
|
|
5752
5751
|
},
|
|
5753
5752
|
setup() {
|
|
@@ -5775,11 +5774,11 @@ const ws = /* @__PURE__ */ oe(Cs, [["render", Os]]), xs = L({
|
|
|
5775
5774
|
onDestroy() {
|
|
5776
5775
|
this.$map.removeControl(this.control);
|
|
5777
5776
|
}
|
|
5778
|
-
}),
|
|
5777
|
+
}), Ps = P({
|
|
5779
5778
|
name: "tg-scale-control",
|
|
5780
|
-
mixins: [
|
|
5779
|
+
mixins: [$],
|
|
5781
5780
|
props: {
|
|
5782
|
-
position:
|
|
5781
|
+
position: F(k, k.BOTTOM_RIGHT)
|
|
5783
5782
|
},
|
|
5784
5783
|
setup() {
|
|
5785
5784
|
return {
|
|
@@ -5798,7 +5797,7 @@ const ws = /* @__PURE__ */ oe(Cs, [["render", Os]]), xs = L({
|
|
|
5798
5797
|
this.$map.removeControl(this.control);
|
|
5799
5798
|
}
|
|
5800
5799
|
});
|
|
5801
|
-
function
|
|
5800
|
+
function Fr() {
|
|
5802
5801
|
var e;
|
|
5803
5802
|
const i = (e = Qr()) == null ? void 0 : e.type;
|
|
5804
5803
|
let t = (i == null ? void 0 : i.name) ?? (i == null ? void 0 : i.__name);
|
|
@@ -5808,22 +5807,22 @@ function Vr() {
|
|
|
5808
5807
|
}
|
|
5809
5808
|
return t;
|
|
5810
5809
|
}
|
|
5811
|
-
function
|
|
5812
|
-
const i = ei(
|
|
5810
|
+
function nr() {
|
|
5811
|
+
const i = ei(sr);
|
|
5813
5812
|
let t, e;
|
|
5814
|
-
return i == null && B(`<${
|
|
5813
|
+
return i == null && B(`<${Fr() || "unknown"}>必须作为<tg-map>的子代组件`), {
|
|
5815
5814
|
mapRef: i,
|
|
5816
5815
|
/** 读取map对象, 只要放在<tg-map>里面的组件(除#overlay插槽外)都能够立即读取到map对象 */
|
|
5817
5816
|
get map() {
|
|
5818
5817
|
return i.value ?? B("map尚未初始化");
|
|
5819
5818
|
},
|
|
5820
5819
|
/** 地图元素创建回调 */
|
|
5821
|
-
[
|
|
5822
|
-
ti(r), t && B(`${
|
|
5820
|
+
[We](r) {
|
|
5821
|
+
ti(r), t && B(`${We}只能调用一次`), t = r;
|
|
5823
5822
|
},
|
|
5824
5823
|
/** 地图元素销毁回调 */
|
|
5825
|
-
[
|
|
5826
|
-
ri(r), e && B(`${
|
|
5824
|
+
[He](r) {
|
|
5825
|
+
ri(r), e && B(`${He}只能调用一次`), e = r;
|
|
5827
5826
|
},
|
|
5828
5827
|
/** 重新创建地图元素 */
|
|
5829
5828
|
recreate() {
|
|
@@ -5831,62 +5830,62 @@ function sr() {
|
|
|
5831
5830
|
}
|
|
5832
5831
|
};
|
|
5833
5832
|
}
|
|
5834
|
-
const Ls =
|
|
5833
|
+
const Ls = P({
|
|
5835
5834
|
name: "tg-street-view-control",
|
|
5836
5835
|
props: {
|
|
5837
|
-
position:
|
|
5836
|
+
position: F(k, k.RIGHT_BOTTOM)
|
|
5838
5837
|
},
|
|
5839
5838
|
setup(i) {
|
|
5840
5839
|
let t = void 0;
|
|
5841
|
-
const { map: e, onCreate: r, onDestroy: s } =
|
|
5840
|
+
const { map: e, onCreate: r, onDestroy: s } = nr();
|
|
5842
5841
|
return r(() => {
|
|
5843
5842
|
t = e.createStreetViewControl(i), e.addControl(t);
|
|
5844
5843
|
}), s(() => {
|
|
5845
5844
|
e.removeControl(t);
|
|
5846
|
-
}),
|
|
5845
|
+
}), De(() => i.position, (n) => {
|
|
5847
5846
|
t.setPosition(n);
|
|
5848
|
-
}),
|
|
5847
|
+
}), ct;
|
|
5849
5848
|
}
|
|
5850
|
-
}),
|
|
5849
|
+
}), Bs = P({
|
|
5851
5850
|
name: "tg-zoom-control",
|
|
5852
5851
|
props: {
|
|
5853
|
-
position:
|
|
5852
|
+
position: F(k, k.RIGHT_BOTTOM)
|
|
5854
5853
|
},
|
|
5855
5854
|
setup(i) {
|
|
5856
5855
|
let t = void 0;
|
|
5857
|
-
const { map: e, onCreate: r, onDestroy: s } =
|
|
5856
|
+
const { map: e, onCreate: r, onDestroy: s } = nr();
|
|
5858
5857
|
return r(() => {
|
|
5859
5858
|
t = e.createZoomControl(i), e.addControl(t);
|
|
5860
5859
|
}), s(() => {
|
|
5861
5860
|
e.removeControl(t);
|
|
5862
|
-
}),
|
|
5861
|
+
}), De(() => i.position, (n) => {
|
|
5863
5862
|
t.setPosition(n);
|
|
5864
|
-
}),
|
|
5863
|
+
}), ct;
|
|
5865
5864
|
}
|
|
5866
|
-
}),
|
|
5865
|
+
}), Is = P({
|
|
5867
5866
|
name: "tg-heatmap",
|
|
5868
5867
|
props: {
|
|
5869
5868
|
maxIntensity: _(Number),
|
|
5870
5869
|
gradient: _(Object),
|
|
5871
5870
|
opacity: _(Number),
|
|
5872
5871
|
radius: _(Number),
|
|
5873
|
-
data:
|
|
5872
|
+
data: z(Array)
|
|
5874
5873
|
},
|
|
5875
5874
|
setup(i) {
|
|
5876
|
-
const { map: t, onCreate: e, onDestroy: r } =
|
|
5875
|
+
const { map: t, onCreate: e, onDestroy: r } = nr();
|
|
5877
5876
|
let s = void 0;
|
|
5878
5877
|
return e(() => {
|
|
5879
5878
|
s = t.createHeatmap(i);
|
|
5880
5879
|
}), r(() => {
|
|
5881
5880
|
s.remove();
|
|
5882
|
-
}),
|
|
5881
|
+
}), De(() => i.data, (n) => s.setData(n)), De(
|
|
5883
5882
|
[() => i.maxIntensity, () => i.gradient, () => i.opacity, () => i.radius],
|
|
5884
5883
|
() => s.setOptions(i)
|
|
5885
|
-
),
|
|
5884
|
+
), ct;
|
|
5886
5885
|
}
|
|
5887
|
-
}),
|
|
5886
|
+
}), Ss = P({
|
|
5888
5887
|
name: "tg-marker-clusterer",
|
|
5889
|
-
mixins: [
|
|
5888
|
+
mixins: [$],
|
|
5890
5889
|
// markers从this.$children中读取, 故需要省略(Omit)
|
|
5891
5890
|
props: {
|
|
5892
5891
|
gridSize: _(Number),
|
|
@@ -5944,20 +5943,20 @@ const Ls = L({
|
|
|
5944
5943
|
this.markers.push(i), this.isInitiated() && this.clusterer.addMarker(i);
|
|
5945
5944
|
},
|
|
5946
5945
|
onRemoveMarker(i) {
|
|
5947
|
-
this.isInitiated() && this.clusterer.removeMarker(i),
|
|
5946
|
+
this.isInitiated() && this.clusterer.removeMarker(i), fe.remove(this.markers, i);
|
|
5948
5947
|
}
|
|
5949
5948
|
}
|
|
5950
5949
|
});
|
|
5951
|
-
function
|
|
5950
|
+
function ks(i, t, e, r, s, n) {
|
|
5952
5951
|
return re(), ie("div", {
|
|
5953
|
-
class:
|
|
5952
|
+
class: it(i.$options.name)
|
|
5954
5953
|
}, [
|
|
5955
|
-
|
|
5954
|
+
K(i.$slots, "default")
|
|
5956
5955
|
], 2);
|
|
5957
5956
|
}
|
|
5958
|
-
const Ur = /* @__PURE__ */ oe(
|
|
5957
|
+
const Ur = /* @__PURE__ */ oe(Ss, [["render", ks]]), As = P({
|
|
5959
5958
|
name: "tg-traffic-layer",
|
|
5960
|
-
mixins: [
|
|
5959
|
+
mixins: [$],
|
|
5961
5960
|
// 请直接使用v-if来控制它的显隐
|
|
5962
5961
|
// 没有属性时, 写`{}`类型推断会有问题, 故注释掉
|
|
5963
5962
|
// props: {} satisfies Props<{}>,
|
|
@@ -5973,13 +5972,13 @@ const Ur = /* @__PURE__ */ oe(Is, [["render", Ss]]), ks = L({
|
|
|
5973
5972
|
onDestroy() {
|
|
5974
5973
|
this.$map.removeLayer(this.layer);
|
|
5975
5974
|
}
|
|
5976
|
-
}),
|
|
5975
|
+
}), Ds = P({
|
|
5977
5976
|
name: "tg-circle",
|
|
5978
|
-
mixins: [
|
|
5977
|
+
mixins: [$],
|
|
5979
5978
|
inheritAttrs: !1,
|
|
5980
5979
|
props: {
|
|
5981
|
-
center:
|
|
5982
|
-
radius:
|
|
5980
|
+
center: z(O),
|
|
5981
|
+
radius: z(Number),
|
|
5983
5982
|
clickable: _(Boolean),
|
|
5984
5983
|
editable: _(Boolean),
|
|
5985
5984
|
strokeColor: _(String),
|
|
@@ -6004,7 +6003,7 @@ const Ur = /* @__PURE__ */ oe(Is, [["render", Ss]]), ks = L({
|
|
|
6004
6003
|
center(i) {
|
|
6005
6004
|
if (this.emittedCenter != null) {
|
|
6006
6005
|
const t = this.emittedCenter;
|
|
6007
|
-
if (this.emittedCenter = void 0, t ===
|
|
6006
|
+
if (this.emittedCenter = void 0, t === st(i))
|
|
6008
6007
|
return;
|
|
6009
6008
|
}
|
|
6010
6009
|
this.overlay.setCenter(i);
|
|
@@ -6053,7 +6052,7 @@ const Ur = /* @__PURE__ */ oe(Is, [["render", Ss]]), ks = L({
|
|
|
6053
6052
|
this.$map.removeOverlay(this.overlay);
|
|
6054
6053
|
}
|
|
6055
6054
|
});
|
|
6056
|
-
class
|
|
6055
|
+
class Rs extends ts {
|
|
6057
6056
|
constructor(t, e, r, s) {
|
|
6058
6057
|
super(t, e), this.content = r, this.position = s;
|
|
6059
6058
|
}
|
|
@@ -6068,12 +6067,12 @@ class Ds extends ts {
|
|
|
6068
6067
|
this.position = t, this.draw();
|
|
6069
6068
|
}
|
|
6070
6069
|
}
|
|
6071
|
-
const
|
|
6070
|
+
const $s = P({
|
|
6072
6071
|
name: "tg-element-overlay",
|
|
6073
|
-
mixins: [
|
|
6072
|
+
mixins: [$],
|
|
6074
6073
|
props: {
|
|
6075
|
-
mapPane:
|
|
6076
|
-
position:
|
|
6074
|
+
mapPane: F(Ne, Ne.overlayMouseTarget),
|
|
6075
|
+
position: z(O)
|
|
6077
6076
|
},
|
|
6078
6077
|
setup() {
|
|
6079
6078
|
return {
|
|
@@ -6094,25 +6093,25 @@ const Rs = L({
|
|
|
6094
6093
|
}
|
|
6095
6094
|
},
|
|
6096
6095
|
onCreate() {
|
|
6097
|
-
this.overlay = new
|
|
6096
|
+
this.overlay = new Rs(this.$map, this, this.content(), this.position), this.$map.addElementOverlay(this.overlay);
|
|
6098
6097
|
},
|
|
6099
6098
|
onDestroy() {
|
|
6100
6099
|
this.$map.removeElementOverlay(this.overlay);
|
|
6101
6100
|
}
|
|
6102
6101
|
});
|
|
6103
|
-
function
|
|
6104
|
-
return re(), ie("div",
|
|
6102
|
+
function zs(i, t, e, r, s, n) {
|
|
6103
|
+
return re(), ie("div", Oe({
|
|
6105
6104
|
class: i.$options.name
|
|
6106
6105
|
}, i.$attrs), [
|
|
6107
|
-
|
|
6106
|
+
K(i.$slots, "default")
|
|
6108
6107
|
], 16);
|
|
6109
6108
|
}
|
|
6110
|
-
const
|
|
6109
|
+
const Ns = /* @__PURE__ */ oe($s, [["render", zs]]), Gs = P({
|
|
6111
6110
|
name: "tg-marker",
|
|
6112
|
-
mixins: [
|
|
6111
|
+
mixins: [$],
|
|
6113
6112
|
inheritAttrs: !1,
|
|
6114
6113
|
props: {
|
|
6115
|
-
position:
|
|
6114
|
+
position: z(O),
|
|
6116
6115
|
title: _(String),
|
|
6117
6116
|
icon: _(Object),
|
|
6118
6117
|
clickable: _(Boolean),
|
|
@@ -6134,8 +6133,8 @@ const zs = /* @__PURE__ */ oe(Rs, [["render", $s]]), Ns = L({
|
|
|
6134
6133
|
return {
|
|
6135
6134
|
attrs: ne(t, i),
|
|
6136
6135
|
marker: void 0,
|
|
6137
|
-
label:
|
|
6138
|
-
info:
|
|
6136
|
+
label: yt(),
|
|
6137
|
+
info: yt(),
|
|
6139
6138
|
emittedPosition: void 0,
|
|
6140
6139
|
autoAddToClustererWhenCreate: i.autoAddToClusterer
|
|
6141
6140
|
};
|
|
@@ -6144,7 +6143,7 @@ const zs = /* @__PURE__ */ oe(Rs, [["render", $s]]), Ns = L({
|
|
|
6144
6143
|
position(i) {
|
|
6145
6144
|
if (this.emittedPosition != null) {
|
|
6146
6145
|
const t = this.emittedPosition;
|
|
6147
|
-
if (this.emittedPosition = void 0, t ===
|
|
6146
|
+
if (this.emittedPosition = void 0, t === st(i))
|
|
6148
6147
|
return;
|
|
6149
6148
|
}
|
|
6150
6149
|
this.marker.setPosition(i);
|
|
@@ -6156,7 +6155,7 @@ const zs = /* @__PURE__ */ oe(Rs, [["render", $s]]), Ns = L({
|
|
|
6156
6155
|
i ? this.marker.setIcon(i) : this.recreate();
|
|
6157
6156
|
},
|
|
6158
6157
|
clickable(i) {
|
|
6159
|
-
this.marker instanceof
|
|
6158
|
+
this.marker instanceof Ze ? this.recreate() : this.marker.setClickable(i);
|
|
6160
6159
|
},
|
|
6161
6160
|
draggable(i) {
|
|
6162
6161
|
this.marker.setDraggable(i);
|
|
@@ -6168,7 +6167,7 @@ const zs = /* @__PURE__ */ oe(Rs, [["render", $s]]), Ns = L({
|
|
|
6168
6167
|
this.recreate();
|
|
6169
6168
|
},
|
|
6170
6169
|
zIndex(i) {
|
|
6171
|
-
this.marker instanceof
|
|
6170
|
+
this.marker instanceof Ze ? this.recreate() : this.marker.setZIndex(i);
|
|
6172
6171
|
},
|
|
6173
6172
|
visible(i) {
|
|
6174
6173
|
this.marker.setVisible(i);
|
|
@@ -6209,20 +6208,20 @@ const zs = /* @__PURE__ */ oe(Rs, [["render", $s]]), Ns = L({
|
|
|
6209
6208
|
}
|
|
6210
6209
|
}
|
|
6211
6210
|
});
|
|
6212
|
-
function
|
|
6213
|
-
return re(), ie("div",
|
|
6211
|
+
function Zs(i, t, e, r, s, n) {
|
|
6212
|
+
return re(), ie("div", Oe({
|
|
6214
6213
|
class: i.$options.name
|
|
6215
6214
|
}, i.attrs.binds), [
|
|
6216
|
-
|
|
6215
|
+
K(i.$slots, "default")
|
|
6217
6216
|
], 16);
|
|
6218
6217
|
}
|
|
6219
|
-
const
|
|
6218
|
+
const dt = /* @__PURE__ */ oe(Gs, [["render", Zs]]), Ws = P({
|
|
6220
6219
|
name: "tg-info-box",
|
|
6221
|
-
mixins: [
|
|
6220
|
+
mixins: [$],
|
|
6222
6221
|
inheritAttrs: !1,
|
|
6223
6222
|
props: {
|
|
6224
|
-
show:
|
|
6225
|
-
position: _(
|
|
6223
|
+
show: z(Boolean),
|
|
6224
|
+
position: _(O),
|
|
6226
6225
|
offset: _(Object),
|
|
6227
6226
|
maxWidth: _(Number),
|
|
6228
6227
|
borderClass: _(String),
|
|
@@ -6279,7 +6278,7 @@ const pt = /* @__PURE__ */ oe(Ns, [["render", Gs]]), Zs = L({
|
|
|
6279
6278
|
return this.$el;
|
|
6280
6279
|
},
|
|
6281
6280
|
$marker() {
|
|
6282
|
-
return
|
|
6281
|
+
return Et(dt, this.$parent, Ve);
|
|
6283
6282
|
},
|
|
6284
6283
|
open(i) {
|
|
6285
6284
|
this.overlay.open(i);
|
|
@@ -6289,20 +6288,20 @@ const pt = /* @__PURE__ */ oe(Ns, [["render", Gs]]), Zs = L({
|
|
|
6289
6288
|
}
|
|
6290
6289
|
}
|
|
6291
6290
|
});
|
|
6292
|
-
function
|
|
6293
|
-
return re(), ie("div",
|
|
6291
|
+
function Hs(i, t, e, r, s, n) {
|
|
6292
|
+
return re(), ie("div", Oe({
|
|
6294
6293
|
class: i.$options.name
|
|
6295
6294
|
}, i.attrs.binds), [
|
|
6296
|
-
|
|
6295
|
+
K(i.$slots, "default")
|
|
6297
6296
|
], 16);
|
|
6298
6297
|
}
|
|
6299
|
-
const
|
|
6298
|
+
const Vs = /* @__PURE__ */ oe(Ws, [["render", Hs]]), js = P({
|
|
6300
6299
|
name: "tg-info-window",
|
|
6301
|
-
mixins: [
|
|
6300
|
+
mixins: [$],
|
|
6302
6301
|
inheritAttrs: !1,
|
|
6303
6302
|
props: {
|
|
6304
|
-
show:
|
|
6305
|
-
position: _(
|
|
6303
|
+
show: z(Boolean),
|
|
6304
|
+
position: _(O),
|
|
6306
6305
|
maxWidth: _(Number),
|
|
6307
6306
|
offset: _(Object),
|
|
6308
6307
|
disableAutoPan: _(Boolean),
|
|
@@ -6337,7 +6336,7 @@ const Hs = /* @__PURE__ */ oe(Zs, [["render", Ws]]), js = L({
|
|
|
6337
6336
|
return this.$el;
|
|
6338
6337
|
},
|
|
6339
6338
|
$marker() {
|
|
6340
|
-
return
|
|
6339
|
+
return Et(dt, this.$parent, Ve);
|
|
6341
6340
|
},
|
|
6342
6341
|
getOptions() {
|
|
6343
6342
|
return {
|
|
@@ -6361,23 +6360,23 @@ const Hs = /* @__PURE__ */ oe(Zs, [["render", Ws]]), js = L({
|
|
|
6361
6360
|
}
|
|
6362
6361
|
});
|
|
6363
6362
|
function Fs(i, t, e, r, s, n) {
|
|
6364
|
-
return ii((re(), ie("div",
|
|
6363
|
+
return ii((re(), ie("div", Oe({
|
|
6365
6364
|
class: i.$options.name
|
|
6366
6365
|
}, i.attrs.binds), [
|
|
6367
|
-
|
|
6366
|
+
K(i.$slots, "default")
|
|
6368
6367
|
], 16)), [
|
|
6369
6368
|
[si, i.show]
|
|
6370
6369
|
]);
|
|
6371
6370
|
}
|
|
6372
|
-
const
|
|
6371
|
+
const Us = /* @__PURE__ */ oe(js, [["render", Fs]]), Ys = P({
|
|
6373
6372
|
name: "tg-label",
|
|
6374
|
-
mixins: [
|
|
6373
|
+
mixins: [$],
|
|
6375
6374
|
inheritAttrs: !1,
|
|
6376
6375
|
props: {
|
|
6377
|
-
position: _(
|
|
6376
|
+
position: _(O),
|
|
6378
6377
|
offset: _(Object),
|
|
6379
6378
|
zIndex: _(Number),
|
|
6380
|
-
mapPane:
|
|
6379
|
+
mapPane: F(Ne)
|
|
6381
6380
|
},
|
|
6382
6381
|
emits: void 0,
|
|
6383
6382
|
setup(i, { attrs: t }) {
|
|
@@ -6412,7 +6411,7 @@ const Vs = /* @__PURE__ */ oe(js, [["render", Fs]]), Us = L({
|
|
|
6412
6411
|
return (i = this.$marker()) == null ? void 0 : i.marker;
|
|
6413
6412
|
},
|
|
6414
6413
|
$marker() {
|
|
6415
|
-
return
|
|
6414
|
+
return Et(dt, this.$parent, Ve);
|
|
6416
6415
|
},
|
|
6417
6416
|
getOptions() {
|
|
6418
6417
|
return {
|
|
@@ -6431,19 +6430,19 @@ const Vs = /* @__PURE__ */ oe(js, [["render", Fs]]), Us = L({
|
|
|
6431
6430
|
this.$marker() ? this.$marker().onRemoveLabel(this) : this.$map.removeOverlay(this.overlay);
|
|
6432
6431
|
}
|
|
6433
6432
|
});
|
|
6434
|
-
function
|
|
6435
|
-
return re(), ie("div",
|
|
6433
|
+
function qs(i, t, e, r, s, n) {
|
|
6434
|
+
return re(), ie("div", Oe({
|
|
6436
6435
|
class: i.$options.name
|
|
6437
6436
|
}, i.attrs.binds), [
|
|
6438
|
-
|
|
6437
|
+
K(i.$slots, "default")
|
|
6439
6438
|
], 16);
|
|
6440
6439
|
}
|
|
6441
|
-
const
|
|
6440
|
+
const Ks = /* @__PURE__ */ oe(Ys, [["render", qs]]), Xs = P({
|
|
6442
6441
|
name: "tg-polygon",
|
|
6443
|
-
mixins: [
|
|
6442
|
+
mixins: [$],
|
|
6444
6443
|
inheritAttrs: !1,
|
|
6445
6444
|
props: {
|
|
6446
|
-
paths:
|
|
6445
|
+
paths: z(Array),
|
|
6447
6446
|
clickable: _(Boolean),
|
|
6448
6447
|
editable: _(Boolean),
|
|
6449
6448
|
strokeColor: _(String),
|
|
@@ -6467,7 +6466,7 @@ const qs = /* @__PURE__ */ oe(Us, [["render", Ys]]), Ks = L({
|
|
|
6467
6466
|
handler(i) {
|
|
6468
6467
|
if (this.emittedPaths != null) {
|
|
6469
6468
|
const t = this.emittedPaths;
|
|
6470
|
-
if (this.emittedPaths = void 0, t.length === i.length && t.every((e, r) => e ===
|
|
6469
|
+
if (this.emittedPaths = void 0, t.length === i.length && t.every((e, r) => e === st(i[r])))
|
|
6471
6470
|
return;
|
|
6472
6471
|
}
|
|
6473
6472
|
this.overlay.setPaths(i);
|
|
@@ -6507,12 +6506,12 @@ const qs = /* @__PURE__ */ oe(Us, [["render", Ys]]), Ks = L({
|
|
|
6507
6506
|
onDestroy() {
|
|
6508
6507
|
this.$map.removeOverlay(this.overlay);
|
|
6509
6508
|
}
|
|
6510
|
-
}),
|
|
6509
|
+
}), Js = P({
|
|
6511
6510
|
name: "tg-polyline",
|
|
6512
|
-
mixins: [
|
|
6511
|
+
mixins: [$],
|
|
6513
6512
|
inheritAttrs: !1,
|
|
6514
6513
|
props: {
|
|
6515
|
-
path:
|
|
6514
|
+
path: z(Array),
|
|
6516
6515
|
icons: _(Array),
|
|
6517
6516
|
clickable: _(Boolean),
|
|
6518
6517
|
editable: _(Boolean),
|
|
@@ -6535,7 +6534,7 @@ const qs = /* @__PURE__ */ oe(Us, [["render", Ys]]), Ks = L({
|
|
|
6535
6534
|
handler(i) {
|
|
6536
6535
|
if (this.emittedPath != null) {
|
|
6537
6536
|
const t = this.emittedPath;
|
|
6538
|
-
if (this.emittedPath = void 0, t ===
|
|
6537
|
+
if (this.emittedPath = void 0, t === st(i))
|
|
6539
6538
|
return;
|
|
6540
6539
|
}
|
|
6541
6540
|
this.overlay.setPath(i);
|
|
@@ -6575,12 +6574,12 @@ const qs = /* @__PURE__ */ oe(Us, [["render", Ys]]), Ks = L({
|
|
|
6575
6574
|
onDestroy() {
|
|
6576
6575
|
this.overlay.remove();
|
|
6577
6576
|
}
|
|
6578
|
-
}),
|
|
6577
|
+
}), Qs = P({
|
|
6579
6578
|
name: "tg-rectangle",
|
|
6580
|
-
mixins: [
|
|
6579
|
+
mixins: [$],
|
|
6581
6580
|
inheritAttrs: !1,
|
|
6582
6581
|
props: {
|
|
6583
|
-
bounds:
|
|
6582
|
+
bounds: z(Object),
|
|
6584
6583
|
clickable: _(Boolean),
|
|
6585
6584
|
editable: _(Boolean),
|
|
6586
6585
|
strokeColor: _(String),
|
|
@@ -6641,14 +6640,14 @@ const qs = /* @__PURE__ */ oe(Us, [["render", Ys]]), Ks = L({
|
|
|
6641
6640
|
onDestroy() {
|
|
6642
6641
|
this.$map.removeOverlay(this.overlay);
|
|
6643
6642
|
}
|
|
6644
|
-
}),
|
|
6643
|
+
}), en = ["beforeUpdate", "updated"], wn = {
|
|
6645
6644
|
install(i, t = {}) {
|
|
6646
6645
|
if (t.enable !== !1) {
|
|
6647
|
-
const e =
|
|
6646
|
+
const e = P({
|
|
6648
6647
|
beforeCreate() {
|
|
6649
|
-
const r =
|
|
6650
|
-
t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) :
|
|
6651
|
-
} :
|
|
6648
|
+
const r = Fr() ?? "", n = (t.nameRegex || /^[A-Z]/).test(r) ? (a) => {
|
|
6649
|
+
t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : en.includes(a) || console.debug("[lifecycle]", r, a);
|
|
6650
|
+
} : Re;
|
|
6652
6651
|
n("beforeCreate"), this.__life_impl = n;
|
|
6653
6652
|
},
|
|
6654
6653
|
created() {
|
|
@@ -6687,83 +6686,85 @@ const qs = /* @__PURE__ */ oe(Us, [["render", Ys]]), Ks = L({
|
|
|
6687
6686
|
i.mixin(e);
|
|
6688
6687
|
}
|
|
6689
6688
|
}
|
|
6690
|
-
},
|
|
6689
|
+
}, tn = 6378137;
|
|
6691
6690
|
function Ie(i) {
|
|
6692
6691
|
return i * Math.PI / 180;
|
|
6693
6692
|
}
|
|
6694
6693
|
function mr(i) {
|
|
6695
6694
|
return i * 180 / Math.PI;
|
|
6696
6695
|
}
|
|
6697
|
-
function
|
|
6696
|
+
function rn(i, t) {
|
|
6698
6697
|
if (i.lat === t.lat && i.lng === t.lng)
|
|
6699
6698
|
return 0;
|
|
6700
6699
|
const e = Ie((i.lat + t.lat) / 2), r = Ie((i.lat - t.lat) / 2), s = Ie((i.lng - t.lng) / 2);
|
|
6701
6700
|
let n = Math.sin(r), a = Math.sin(s), c = Math.sin(e);
|
|
6702
|
-
const o =
|
|
6701
|
+
const o = tn, l = 1 / 298.257;
|
|
6703
6702
|
n = n * n, a = a * a, c = c * c;
|
|
6704
6703
|
const d = n * (1 - a) + (1 - c) * a, m = (1 - n) * (1 - a) + c * a, g = Math.atan(Math.sqrt(d / m)), v = Math.sqrt(d * m) / g, b = 2 * g * o, y = (3 * v - 1) / 2 / m, p = (3 * v + 1) / 2 / d;
|
|
6705
6704
|
return b * (1 + l * (y * c * (1 - n) - p * (1 - c) * n));
|
|
6706
6705
|
}
|
|
6707
|
-
function
|
|
6706
|
+
function sn(i, t, e) {
|
|
6708
6707
|
const s = 63567523142e-4, n = 1 / 298.257223563, a = Ie(t), c = Math.sin(a), o = Math.cos(a), l = (1 - n) * Math.tan(Ie(i.lat)), d = 1 / Math.sqrt(1 + l * l), m = l * d, g = Math.atan2(l, o), v = d * c, b = 1 - v * v, y = b * (6378137 * 6378137 - s * s) / (s * s), p = 1 + y / 16384 * (4096 + y * (-768 + y * (320 - 175 * y))), h = y / 1024 * (256 + y * (-128 + y * (74 - 47 * y)));
|
|
6709
|
-
let f = 0, M = 0, T = 0,
|
|
6710
|
-
for (; Math.abs(
|
|
6711
|
-
f = Math.cos(2 * g +
|
|
6712
|
-
const
|
|
6713
|
-
w =
|
|
6708
|
+
let f = 0, M = 0, T = 0, C = e / (s * p), w = 2 * Math.PI;
|
|
6709
|
+
for (; Math.abs(C - w) > 1e-12; ) {
|
|
6710
|
+
f = Math.cos(2 * g + C), M = Math.sin(C), T = Math.cos(C);
|
|
6711
|
+
const G = h * M * (f + h / 4 * (T * (-1 + 2 * f * f) - h / 6 * f * (-3 + 4 * M * M) * (-3 + 4 * f * f)));
|
|
6712
|
+
w = C, C = e / (s * p) + G;
|
|
6714
6713
|
}
|
|
6715
6714
|
const E = m * M - d * T * o, D = Math.atan2(
|
|
6716
6715
|
m * T + d * M * o,
|
|
6717
6716
|
(1 - n) * Math.sqrt(v * v + E * E)
|
|
6718
|
-
),
|
|
6717
|
+
), N = Math.atan2(M * c, d * T - m * M * o), L = n / 16 * b * (4 + n * (4 - 3 * b)), J = N - (1 - L) * n * v * (C + L * M * (f + L * T * (-1 + 2 * f * f)));
|
|
6719
6718
|
return { lng: i.lng + mr(J), lat: mr(D) };
|
|
6720
6719
|
}
|
|
6721
|
-
const
|
|
6722
|
-
getDistance:
|
|
6723
|
-
getDestination:
|
|
6724
|
-
}
|
|
6720
|
+
const xn = {
|
|
6721
|
+
getDistance: rn,
|
|
6722
|
+
getDestination: sn
|
|
6723
|
+
};
|
|
6724
|
+
var nn = { VITE_APP_DEV_KEY_BAIDU: "kXOq8Hg9BZbZEWAjXKuzd1oGreynup8h", VITE_APP_DEV_KEY_GOOGLE: "AIzaSyBcyzMel3dYFNcfcr0LOklbBQNpWycyZXo", VITE_APP_DEV_KEY_HERE: "", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
6725
|
+
const En = {
|
|
6725
6726
|
install(i, t) {
|
|
6726
|
-
if (as(t),
|
|
6727
|
-
const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue":
|
|
6727
|
+
if (as(t), nn.VITE_FALSE) {
|
|
6728
|
+
const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Ve, "./TgMapWidget.vue": Os, "./controls/TgCustomControl.vue": xs, "./controls/TgMapTypeControl.vue": Es, "./controls/TgScaleControl.vue": Ps, "./controls/TgStreetViewControl.vue": Ls, "./controls/TgZoomControl.vue": Bs, "./extra/TgHeatmap.vue": Is, "./extra/TgMarkerClusterer.vue": Ur, "./layers/TgTrafficLayer.vue": As, "./overlays/TgCircle.vue": Ds, "./overlays/TgElementOverlay.vue": Ns, "./overlays/TgInfoBox.vue": Vs, "./overlays/TgInfoWindow.vue": Us, "./overlays/TgLabel.vue": Ks, "./overlays/TgMarker.vue": dt, "./overlays/TgPolygon.vue": Xs, "./overlays/TgPolyline.vue": Js, "./overlays/TgRectangle.vue": Qs });
|
|
6728
6729
|
Object.keys(r).forEach((s) => {
|
|
6729
6730
|
const n = r[s];
|
|
6730
6731
|
i.component(n.name ?? B(`Tg开头的组件必须设置name: ${s}`), n);
|
|
6731
6732
|
});
|
|
6732
6733
|
}
|
|
6733
6734
|
const e = i.config.optionMergeStrategies;
|
|
6734
|
-
e[
|
|
6735
|
+
e[We] = e[He] = (r, s) => r ? [...new Set([].concat(r, s))] : Array.isArray(s) ? s : [s];
|
|
6735
6736
|
}
|
|
6736
6737
|
};
|
|
6737
6738
|
export {
|
|
6738
6739
|
Lt as AbstractControl,
|
|
6739
|
-
|
|
6740
|
-
|
|
6740
|
+
Nt as AbstractMap,
|
|
6741
|
+
fe as Arrays,
|
|
6741
6742
|
Er as Autocomplete,
|
|
6742
6743
|
bi as BaiduAutocomplete,
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6744
|
+
Zt as BaiduCircle,
|
|
6745
|
+
Bt as BaiduControl,
|
|
6746
|
+
Ci as BaiduHeatmap,
|
|
6746
6747
|
Ft as BaiduInfoBoxOverlay,
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6748
|
+
Vt as BaiduInfoWindow,
|
|
6749
|
+
It as BaiduMapTypeControl,
|
|
6750
|
+
Ot as BaiduMapUrls,
|
|
6751
|
+
Ze as BaiduMarker,
|
|
6752
|
+
Li as BaiduMarkerClusterer,
|
|
6753
|
+
lt as BaiduOverlay,
|
|
6753
6754
|
Si as BaiduPlacesService,
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6755
|
+
Xt as BaiduPolyShape,
|
|
6756
|
+
er as BaiduPolygon,
|
|
6757
|
+
Jt as BaiduPolyline,
|
|
6758
|
+
rr as BaiduRectangle,
|
|
6759
|
+
St as BaiduScaleControl,
|
|
6759
6760
|
Ai as BaiduSearchBox,
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6761
|
+
At as BaiduStreetViewControl,
|
|
6762
|
+
Rt as BaiduZoomControl,
|
|
6763
|
+
W as BuildInMapType,
|
|
6763
6764
|
Mr as BuildInMapTypeId,
|
|
6764
|
-
|
|
6765
|
+
Le as CachedValue,
|
|
6765
6766
|
k as ControlPosition,
|
|
6766
|
-
|
|
6767
|
+
U as ControlPositionConverter,
|
|
6767
6768
|
A as CoordType,
|
|
6768
6769
|
pi as CustomControl,
|
|
6769
6770
|
ts as ElementOverlay,
|
|
@@ -6771,119 +6772,119 @@ export {
|
|
|
6771
6772
|
ui as FastFindValues,
|
|
6772
6773
|
ee as GestureHandlingOptions,
|
|
6773
6774
|
_i as GoogleAutocomplete,
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6775
|
+
Wt as GoogleCircle,
|
|
6776
|
+
at as GoogleControl,
|
|
6777
|
+
Oi as GoogleHeatmap,
|
|
6778
|
+
Ut as GoogleInfoBoxOverlay,
|
|
6778
6779
|
jt as GoogleInfoWindow,
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6780
|
+
Tt as GoogleMapTypeControl,
|
|
6781
|
+
Mt as GoogleMapUrls,
|
|
6782
|
+
Kt as GoogleMarker,
|
|
6782
6783
|
Bi as GoogleMarkerClusterer,
|
|
6783
|
-
|
|
6784
|
+
Gt as GoogleOverlay,
|
|
6784
6785
|
Ii as GooglePlacesService,
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6786
|
+
tr as GooglePolygon,
|
|
6787
|
+
Qt as GooglePolyline,
|
|
6788
|
+
ir as GoogleRectangle,
|
|
6789
|
+
kt as GoogleScaleControl,
|
|
6789
6790
|
ki as GoogleSearchBox,
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6791
|
+
Dt as GoogleStreetViewControl,
|
|
6792
|
+
$t as GoogleZoomControl,
|
|
6793
|
+
Lr as Heatmap,
|
|
6793
6794
|
Qe as Icon,
|
|
6794
6795
|
et as IconSequence,
|
|
6795
|
-
|
|
6796
|
-
|
|
6796
|
+
mn as ImageMapType,
|
|
6797
|
+
Ht as InfoWindow,
|
|
6797
6798
|
Xi as InfoWindowModeValues,
|
|
6798
6799
|
ar as KeyValue,
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6800
|
+
O as LatLng,
|
|
6801
|
+
X as LatLngBounds,
|
|
6802
|
+
wn as LifecycleLogPlugin,
|
|
6802
6803
|
te as Location,
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6804
|
+
We as MIXIN_HOOK_CREATE,
|
|
6805
|
+
He as MIXIN_HOOK_DESTROY,
|
|
6806
|
+
sr as MIXIN_MAP_NAME,
|
|
6807
|
+
ve as MVCArrays,
|
|
6808
|
+
$ as MapMixin,
|
|
6808
6809
|
Ct as MapOptions,
|
|
6809
|
-
|
|
6810
|
-
|
|
6810
|
+
Ne as MapPane,
|
|
6811
|
+
Ge as MapPanes,
|
|
6811
6812
|
V as MapType,
|
|
6812
|
-
|
|
6813
|
+
Or as MapTypeControlType,
|
|
6813
6814
|
Br as MapUrls,
|
|
6814
6815
|
Di as MapZoom,
|
|
6815
6816
|
Rr as MarkerClusterer,
|
|
6816
|
-
|
|
6817
|
+
ce as Objects,
|
|
6817
6818
|
Wr as Overlay,
|
|
6818
6819
|
$r as PlacesService,
|
|
6819
|
-
|
|
6820
|
+
le as Point,
|
|
6820
6821
|
zr as SearchBox,
|
|
6821
|
-
|
|
6822
|
+
xn as SphericalUtils,
|
|
6822
6823
|
be as Strings,
|
|
6823
6824
|
Me as SymbolIcon,
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6825
|
+
_n as SymbolPath,
|
|
6826
|
+
Ds as TgCircle,
|
|
6827
|
+
xs as TgCustomControl,
|
|
6828
|
+
Ns as TgElementOverlay,
|
|
6829
|
+
Is as TgHeatmap,
|
|
6830
|
+
Vs as TgInfoBox,
|
|
6831
|
+
Us as TgInfoWindow,
|
|
6832
|
+
Ks as TgLabel,
|
|
6833
|
+
Ve as TgMap,
|
|
6834
|
+
wt as TgMapFactory,
|
|
6835
|
+
q as TgMapType,
|
|
6836
|
+
Es as TgMapTypeControl,
|
|
6837
|
+
Os as TgMapWidget,
|
|
6838
|
+
dt as TgMarker,
|
|
6838
6839
|
Ur as TgMarkerClusterer,
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6840
|
+
Xs as TgPolygon,
|
|
6841
|
+
Js as TgPolyline,
|
|
6842
|
+
Qs as TgRectangle,
|
|
6843
|
+
Ps as TgScaleControl,
|
|
6843
6844
|
Ls as TgStreetViewControl,
|
|
6844
|
-
|
|
6845
|
-
|
|
6845
|
+
As as TgTrafficLayer,
|
|
6846
|
+
Bs as TgZoomControl,
|
|
6846
6847
|
mi as TrafficLayer,
|
|
6847
6848
|
Je as UnionIcon,
|
|
6848
6849
|
me as assert,
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6850
|
+
vt as assertNever,
|
|
6851
|
+
Ue as callHook,
|
|
6852
|
+
bn as computedSaveOnThis,
|
|
6852
6853
|
hi as createAsyncSingleton,
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6854
|
+
ct as createEmptyVNode,
|
|
6855
|
+
fs as createPropertyObject,
|
|
6856
|
+
Tn as createPropertyObjectTyped,
|
|
6857
|
+
pn as debug,
|
|
6858
|
+
En as default,
|
|
6858
6859
|
S as eventProp,
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6860
|
+
On as extractVNodeFromSlotsByComponent,
|
|
6861
|
+
Et as findAncestorComponentByType,
|
|
6862
|
+
Mn as findByComponentType,
|
|
6863
|
+
sn as getDestination,
|
|
6864
|
+
jr as getTgMapConfig,
|
|
6865
|
+
_t as isComponentByType,
|
|
6866
|
+
gn as isDef,
|
|
6866
6867
|
li as isEntryValueDef,
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6868
|
+
hn as isInstanceOf,
|
|
6869
|
+
ln as lateinit,
|
|
6870
|
+
ds as loadCachedMap,
|
|
6871
|
+
Re as noop,
|
|
6871
6872
|
_ as optionalProp,
|
|
6872
6873
|
es as path,
|
|
6873
|
-
|
|
6874
|
-
|
|
6874
|
+
z as requiredProp,
|
|
6875
|
+
cn as safeAs,
|
|
6875
6876
|
yr as safeAsComponent,
|
|
6876
6877
|
as as setTgMapConfig,
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6878
|
+
vs as splitAttrs,
|
|
6879
|
+
F as stringEnumProp,
|
|
6880
|
+
ms as stringUnionPropFromValues,
|
|
6880
6881
|
B as throwError,
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6882
|
+
Pt as throwUnsupported,
|
|
6883
|
+
un as todo,
|
|
6884
|
+
yt as typed,
|
|
6885
|
+
dn as unwrapStringEnumValue,
|
|
6886
|
+
Cn as useEventLogMethods,
|
|
6886
6887
|
ne as useSplittedAttrs,
|
|
6887
|
-
|
|
6888
|
+
nr as useTgMapInner
|
|
6888
6889
|
};
|
|
6889
6890
|
//# sourceMappingURL=tg-map.js.map
|