tg-map-vue3 3.8.1 → 3.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/dist/tg-map.js +677 -667
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +6 -6
- package/dist/tg-map.umd.cjs.map +1 -1
- package/package.json +2 -2
package/dist/tg-map.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.baidu-info-box-container{transform:translateY(-11px);font-size:13px;font-weight:300;width:100vw;cursor:auto;-webkit-user-select:auto!important;user-select:auto!important}.baidu-info-box-container__border{position:absolute;padding:12px;background-color:#fff;box-shadow:0 2px 7px 1px #0000004d;border-radius:8px;transform:translate(-50%,-100%)}.baidu-info-box-container__inner{overflow:auto}.baidu-info-box-container__close{position:absolute;right:-6px;top:-6px;width:14px;height:14px;margin:8px;opacity:.6;cursor:pointer;-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22/%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22/%3E%3C/svg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22/%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22/%3E%3C/svg%3E);background-color:#000}.baidu-info-box-container__close:hover{opacity:1}.baidu-info-box-container:after{position:absolute;background-color:#fff;content:"";width:15px;height:15px;left:0;top:0;box-shadow:-2px 2px 2px #b2b2b266;transform:translate(-50%,-50%) rotate(-45deg)}.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
|
-
var
|
|
4
|
+
var m = (i, t, e) => (qr(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
5
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) => {
|
|
@@ -25,11 +25,11 @@ var vr = { exports: {} };
|
|
|
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
|
-
function n(
|
|
29
|
-
this.west = Math.min(
|
|
28
|
+
function n(l, u, v, y) {
|
|
29
|
+
this.west = Math.min(l, v), this.north = Math.max(u, y), this.east = Math.max(l, v), this.south = Math.min(u, y);
|
|
30
30
|
}
|
|
31
|
-
n.prototype.contain = function(
|
|
32
|
-
return this.west <=
|
|
31
|
+
n.prototype.contain = function(l, u) {
|
|
32
|
+
return this.west <= l && this.east >= l && this.north >= u && this.south <= u;
|
|
33
33
|
};
|
|
34
34
|
var a = [
|
|
35
35
|
new n(79.4462, 49.2204, 96.33, 42.8899),
|
|
@@ -46,72 +46,82 @@ var vr = { exports: {} };
|
|
|
46
46
|
new n(127.4568, 55.8175, 137.0227, 49.5574),
|
|
47
47
|
new n(131.2662, 44.8922, 137.0227, 42.5692),
|
|
48
48
|
new n(73.1246, 35.398637, 77.948114, 29.5297)
|
|
49
|
+
], o = [
|
|
50
|
+
new n(114.505238, 22.138258, 113.845, 22.428903),
|
|
51
|
+
new n(113.97, 22.507833, 114.45, 22.428903)
|
|
49
52
|
];
|
|
50
|
-
function
|
|
51
|
-
for (var
|
|
52
|
-
if (a[
|
|
53
|
-
for (var
|
|
54
|
-
if (c[
|
|
53
|
+
function h(l, u, v = !0) {
|
|
54
|
+
for (var y = 0; y < a.length; y++)
|
|
55
|
+
if (a[y].contain(l, u)) {
|
|
56
|
+
for (var C = 0; C < c.length; C++)
|
|
57
|
+
if (c[C].contain(l, u))
|
|
55
58
|
return !1;
|
|
59
|
+
if (v) {
|
|
60
|
+
for (var C = 0; C < o.length; C++)
|
|
61
|
+
if (o[C].contain(l, u))
|
|
62
|
+
return !1;
|
|
63
|
+
}
|
|
56
64
|
return !0;
|
|
57
65
|
}
|
|
58
66
|
return !1;
|
|
59
67
|
}
|
|
60
|
-
function l
|
|
61
|
-
var
|
|
62
|
-
return [
|
|
68
|
+
function d(l, u) {
|
|
69
|
+
var v = l - 65e-4, y = u - 6e-3, C = Math.sqrt(v * v + y * y) - 2e-5 * Math.sin(y * t), w = Math.atan2(y, v) - 3e-6 * Math.cos(v * t), E = C * Math.cos(w), S = C * Math.sin(w);
|
|
70
|
+
return [E, S];
|
|
63
71
|
}
|
|
64
|
-
function
|
|
65
|
-
var
|
|
66
|
-
return [
|
|
72
|
+
function p(l, u) {
|
|
73
|
+
var v = Math.sqrt(l * l + u * u) + 2e-5 * Math.sin(u * t), y = Math.atan2(u, l) + 3e-6 * Math.cos(l * t), C = v * Math.cos(y) + 65e-4, w = v * Math.sin(y) + 6e-3;
|
|
74
|
+
return [C, w];
|
|
67
75
|
}
|
|
68
|
-
function
|
|
69
|
-
return
|
|
76
|
+
function g(l, u) {
|
|
77
|
+
return T(l, u);
|
|
70
78
|
}
|
|
71
|
-
function
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
var f = v(m, h);
|
|
75
|
-
return [m * 2 - f[0], h * 2 - f[1]];
|
|
79
|
+
function f(l, u) {
|
|
80
|
+
var v = T(l, u);
|
|
81
|
+
return [l * 2 - v[0], u * 2 - v[1]];
|
|
76
82
|
}
|
|
77
|
-
function
|
|
78
|
-
var
|
|
79
|
-
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
var
|
|
83
|
-
return [
|
|
83
|
+
function T(l, u) {
|
|
84
|
+
var v = _(l - 105, u - 35), y = M(l - 105, u - 35), C = u / 180 * e, w = Math.sin(C);
|
|
85
|
+
w = 1 - s * w * w;
|
|
86
|
+
var E = Math.sqrt(w);
|
|
87
|
+
v = v * 180 / (r * (1 - s) / (w * E) * e), y = y * 180 / (r / E * Math.cos(C) * e);
|
|
88
|
+
var S = u + v, z = l + y;
|
|
89
|
+
return [z, S];
|
|
84
90
|
}
|
|
85
|
-
function
|
|
86
|
-
var
|
|
87
|
-
return
|
|
91
|
+
function _(l, u) {
|
|
92
|
+
var v = -100 + 2 * l + 3 * u + 0.2 * u * u + 0.1 * l * u + 0.2 * Math.sqrt(Math.abs(l));
|
|
93
|
+
return v += (20 * Math.sin(6 * l * e) + 20 * Math.sin(2 * l * e)) * 2 / 3, v += (20 * Math.sin(u * e) + 40 * Math.sin(u / 3 * e)) * 2 / 3, v += (160 * Math.sin(u / 12 * e) + 320 * Math.sin(u * e / 30)) * 2 / 3, v;
|
|
88
94
|
}
|
|
89
|
-
function
|
|
90
|
-
var
|
|
91
|
-
return
|
|
95
|
+
function M(l, u) {
|
|
96
|
+
var v = 300 + l + 2 * u + 0.1 * l * l + 0.1 * l * u + 0.1 * Math.sqrt(Math.abs(l));
|
|
97
|
+
return v += (20 * Math.sin(6 * l * e) + 20 * Math.sin(2 * l * e)) * 2 / 3, v += (20 * Math.sin(l * e) + 40 * Math.sin(l / 3 * e)) * 2 / 3, v += (150 * Math.sin(l / 12 * e) + 300 * Math.sin(l / 30 * e)) * 2 / 3, v;
|
|
92
98
|
}
|
|
93
99
|
return {
|
|
94
|
-
//
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
//
|
|
100
|
-
bd09ToGcj02:
|
|
101
|
-
gcj02ToBd09:
|
|
102
|
-
wgs84ToGcj02: u
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
100
|
+
// 原始的转换方法
|
|
101
|
+
rawBd09ToGcj02: d,
|
|
102
|
+
rawGcj02ToBd09: p,
|
|
103
|
+
rawWgs84ToGcj02: g,
|
|
104
|
+
rawGcj02ToWgs84: f,
|
|
105
|
+
// 判断了中国范围的转换方法
|
|
106
|
+
bd09ToGcj02: d,
|
|
107
|
+
gcj02ToBd09: p,
|
|
108
|
+
wgs84ToGcj02: function(l, u) {
|
|
109
|
+
return h(l, u) ? g(l, u) : [l, u];
|
|
110
|
+
},
|
|
111
|
+
gcj02ToWgs84: function(l, u) {
|
|
112
|
+
return h(l, u) ? f(l, u) : [l, u];
|
|
113
|
+
},
|
|
114
|
+
bd09ToWgs84: function(l, u) {
|
|
115
|
+
if (!h(l, u, !1))
|
|
116
|
+
return [l, u];
|
|
117
|
+
var v = d(l, u);
|
|
118
|
+
return f(v[0], v[1]);
|
|
109
119
|
},
|
|
110
|
-
wgs84ToBd09: function(
|
|
111
|
-
if (!
|
|
112
|
-
return [
|
|
113
|
-
var
|
|
114
|
-
return
|
|
120
|
+
wgs84ToBd09: function(l, u) {
|
|
121
|
+
if (!h(l, u, !1))
|
|
122
|
+
return [l, u];
|
|
123
|
+
var v = g(l, u);
|
|
124
|
+
return p(v[0], v[1]);
|
|
115
125
|
}
|
|
116
126
|
};
|
|
117
127
|
});
|
|
@@ -121,30 +131,30 @@ const pe = /* @__PURE__ */ nt(ai);
|
|
|
121
131
|
var fe;
|
|
122
132
|
((i) => {
|
|
123
133
|
function t(c, o) {
|
|
124
|
-
return c.length === o.length && c.every((
|
|
134
|
+
return c.length === o.length && c.every((h, d) => h === o[d]);
|
|
125
135
|
}
|
|
126
136
|
i.equals = t;
|
|
127
137
|
function e(c, o) {
|
|
128
|
-
const
|
|
129
|
-
if (
|
|
130
|
-
return c.splice(
|
|
138
|
+
const h = c.indexOf(o);
|
|
139
|
+
if (h !== -1)
|
|
140
|
+
return c.splice(h, 1)[0];
|
|
131
141
|
}
|
|
132
142
|
i.remove = e;
|
|
133
143
|
function r(c, o) {
|
|
134
|
-
for (const
|
|
135
|
-
if (
|
|
136
|
-
return
|
|
144
|
+
for (const h of c)
|
|
145
|
+
if (h instanceof o)
|
|
146
|
+
return h;
|
|
137
147
|
}
|
|
138
148
|
i.findByType = r;
|
|
139
149
|
function s(c, o) {
|
|
140
150
|
return c.includes(o);
|
|
141
151
|
}
|
|
142
152
|
i.includesTyped = s;
|
|
143
|
-
function n(c, o,
|
|
153
|
+
function n(c, o, h) {
|
|
144
154
|
const d = o >= 0 ? o : c.length + o;
|
|
145
|
-
if (
|
|
155
|
+
if (h === void 0)
|
|
146
156
|
return c[d];
|
|
147
|
-
c[d] =
|
|
157
|
+
c[d] = h;
|
|
148
158
|
}
|
|
149
159
|
i.at = n;
|
|
150
160
|
function a(c) {
|
|
@@ -239,7 +249,7 @@ function hi(i) {
|
|
|
239
249
|
let t = null;
|
|
240
250
|
return () => t ?? (t = i().catch((e) => (t = null, Promise.reject(e))));
|
|
241
251
|
}
|
|
242
|
-
var
|
|
252
|
+
var D = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(D || {});
|
|
243
253
|
const ut = "wgs84", R = class R {
|
|
244
254
|
constructor(t, e, r) {
|
|
245
255
|
this.lat = t, this.lng = e, this.coord = r;
|
|
@@ -345,7 +355,7 @@ const ut = "wgs84", R = class R {
|
|
|
345
355
|
return JSON.stringify(this);
|
|
346
356
|
}
|
|
347
357
|
};
|
|
348
|
-
|
|
358
|
+
m(R, "ZERO", R.create(0, 0));
|
|
349
359
|
let O = R;
|
|
350
360
|
const ae = class ae {
|
|
351
361
|
/**
|
|
@@ -354,7 +364,7 @@ const ae = class ae {
|
|
|
354
364
|
* @param ne 东北, lat/lng更大
|
|
355
365
|
*/
|
|
356
366
|
constructor(t, e) {
|
|
357
|
-
|
|
367
|
+
m(this, "coord");
|
|
358
368
|
this.sw = t, this.ne = e, me(t.coord === e.coord, "sw和ne的coord应该相同"), me(Number.isFinite(t.lat) && Number.isFinite(t.lng) && Number.isFinite(e.lat) && Number.isFinite(e.lng), `sw(${t})和ne(${e})不能包含NaN或Infinite`), me(t.lat <= e.lat, `sw.lat(${t.lat})应该比ne.lat(${e.lat})小`), this.coord = t.coord;
|
|
359
369
|
}
|
|
360
370
|
static isBetweenLng(t, e, r) {
|
|
@@ -428,16 +438,16 @@ const ae = class ae {
|
|
|
428
438
|
return [this.sw.toBaidu(t), this.ne.toBaidu(t)];
|
|
429
439
|
}
|
|
430
440
|
};
|
|
431
|
-
|
|
441
|
+
m(ae, "EMPTY", new ae(O.ZERO, O.ZERO));
|
|
432
442
|
let X = ae;
|
|
433
443
|
((i) => {
|
|
434
444
|
class t {
|
|
435
445
|
constructor(r) {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
446
|
+
m(this, "coord");
|
|
447
|
+
m(this, "minLat");
|
|
448
|
+
m(this, "minLng");
|
|
449
|
+
m(this, "maxLat");
|
|
450
|
+
m(this, "maxLng");
|
|
441
451
|
this.coord = r.coord, this.minLat = this.maxLat = r.lat, this.minLng = this.maxLng = r.lng;
|
|
442
452
|
}
|
|
443
453
|
build() {
|
|
@@ -495,8 +505,8 @@ function or(i, t, e) {
|
|
|
495
505
|
}
|
|
496
506
|
class br {
|
|
497
507
|
constructor(t, e) {
|
|
498
|
-
|
|
499
|
-
|
|
508
|
+
m(this, "eventMap", /* @__PURE__ */ new Map());
|
|
509
|
+
m(this, "target", void 0);
|
|
500
510
|
this.inner = t, this.coordTypeSupplier = e, this.addEventListener = this.addEventListener.bind(this), this.removeEventListener = this.removeEventListener.bind(this);
|
|
501
511
|
}
|
|
502
512
|
setTarget(t) {
|
|
@@ -505,7 +515,7 @@ class br {
|
|
|
505
515
|
}
|
|
506
516
|
class ot {
|
|
507
517
|
constructor(t, e) {
|
|
508
|
-
|
|
518
|
+
m(this, "eventHub", new Tr());
|
|
509
519
|
this.delegate = t, this.options = e;
|
|
510
520
|
}
|
|
511
521
|
notify(t) {
|
|
@@ -555,7 +565,7 @@ const rt = class rt extends br {
|
|
|
555
565
|
}
|
|
556
566
|
};
|
|
557
567
|
// 事件类型映射: tg => google
|
|
558
|
-
|
|
568
|
+
m(rt, "EVENT_TYPE_MAP", {
|
|
559
569
|
"center-changed": "center_changed",
|
|
560
570
|
"zoom-changed": "zoom_changed",
|
|
561
571
|
"radius-changed": "radius_changed",
|
|
@@ -596,7 +606,7 @@ const Se = class Se extends br {
|
|
|
596
606
|
};
|
|
597
607
|
// cSpell:words clickclose
|
|
598
608
|
// 事件类型映射, tg => baidu
|
|
599
|
-
|
|
609
|
+
m(Se, "EVENT_TYPE_MAP", {
|
|
600
610
|
drag: "dragging",
|
|
601
611
|
closeclick: "clickclose",
|
|
602
612
|
// baidu不支持contextmenu事件, 将其映射为rightclick
|
|
@@ -607,7 +617,7 @@ g(Se, "EVENT_TYPE_MAP", {
|
|
|
607
617
|
let $e = Se;
|
|
608
618
|
class Tr {
|
|
609
619
|
constructor() {
|
|
610
|
-
|
|
620
|
+
m(this, "typeMap", /* @__PURE__ */ new Map());
|
|
611
621
|
}
|
|
612
622
|
addEventListener(t, e) {
|
|
613
623
|
let r = this.typeMap.get(t);
|
|
@@ -631,8 +641,8 @@ class ar {
|
|
|
631
641
|
* `keys`和`values`数组中可以有相同的值, 若存在相同值, 则index越小的优先级越高
|
|
632
642
|
*/
|
|
633
643
|
constructor(t, e) {
|
|
634
|
-
|
|
635
|
-
|
|
644
|
+
m(this, "keyToValue", /* @__PURE__ */ new Map());
|
|
645
|
+
m(this, "valueToKey", /* @__PURE__ */ new Map());
|
|
636
646
|
me(t.length === e.length);
|
|
637
647
|
for (let r = t.length - 1; r >= 0; r--)
|
|
638
648
|
this.keyToValue.set(t[r], e[r]), this.valueToKey.set(e[r], t[r]);
|
|
@@ -646,7 +656,7 @@ class ar {
|
|
|
646
656
|
}
|
|
647
657
|
class ui {
|
|
648
658
|
constructor(t, e = 10) {
|
|
649
|
-
|
|
659
|
+
m(this, "map", /* @__PURE__ */ new Map());
|
|
650
660
|
this.values = t, this.maxSize4Debug = e;
|
|
651
661
|
}
|
|
652
662
|
/** 获取保存key-value映射的Map */
|
|
@@ -675,14 +685,14 @@ class ui {
|
|
|
675
685
|
}
|
|
676
686
|
class Le {
|
|
677
687
|
constructor(t) {
|
|
678
|
-
|
|
688
|
+
m(this, "value");
|
|
679
689
|
this.creator = t;
|
|
680
690
|
}
|
|
681
691
|
get() {
|
|
682
692
|
return this.value === void 0 && (this.value = this.creator()), this.value;
|
|
683
693
|
}
|
|
684
694
|
}
|
|
685
|
-
var
|
|
695
|
+
var A = /* @__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))(A || {}), U;
|
|
686
696
|
((i) => {
|
|
687
697
|
let t, e;
|
|
688
698
|
const r = [
|
|
@@ -751,7 +761,7 @@ var k = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
|
|
|
751
761
|
class pi {
|
|
752
762
|
constructor(t) {
|
|
753
763
|
/** 实际添加到地图中的control对象 */
|
|
754
|
-
|
|
764
|
+
m(this, "inner");
|
|
755
765
|
this.position = t;
|
|
756
766
|
}
|
|
757
767
|
}
|
|
@@ -804,8 +814,8 @@ class Bt extends Lt {
|
|
|
804
814
|
class at extends Lt {
|
|
805
815
|
constructor(e, r) {
|
|
806
816
|
super();
|
|
807
|
-
|
|
808
|
-
|
|
817
|
+
m(this, "visible", !1);
|
|
818
|
+
m(this, "map");
|
|
809
819
|
this._type = e, this.position = r;
|
|
810
820
|
}
|
|
811
821
|
isVisible() {
|
|
@@ -847,7 +857,7 @@ class W {
|
|
|
847
857
|
return this.id;
|
|
848
858
|
}
|
|
849
859
|
getBaiduCoordType() {
|
|
850
|
-
return
|
|
860
|
+
return D.bd09;
|
|
851
861
|
}
|
|
852
862
|
asBaiduMapType() {
|
|
853
863
|
return this.baidu();
|
|
@@ -865,14 +875,14 @@ class W {
|
|
|
865
875
|
}
|
|
866
876
|
class mn {
|
|
867
877
|
constructor(t, e) {
|
|
868
|
-
|
|
878
|
+
m(this, "baiduLayerCached", new Le(() => {
|
|
869
879
|
const t = new BMap.TileLayer({});
|
|
870
880
|
return t.getTilesUrl = (e, r) => {
|
|
871
881
|
const s = Math.pow(2, r - 1), n = e.x + s, a = s - 1 - e.y;
|
|
872
882
|
return this.options.getTileUrl({ x: n, y: a }, r);
|
|
873
883
|
}, t;
|
|
874
884
|
}));
|
|
875
|
-
|
|
885
|
+
m(this, "baiduMapTypeCached", new Le(() => {
|
|
876
886
|
const t = new BMap.MapType(this.options.name, this.baiduLayerCached.get(), {
|
|
877
887
|
maxZoom: this.options.maxZoom,
|
|
878
888
|
minZoom: this.options.minZoom,
|
|
@@ -880,7 +890,7 @@ class mn {
|
|
|
880
890
|
});
|
|
881
891
|
return t.__baidu_map_type__ = this, t;
|
|
882
892
|
}));
|
|
883
|
-
|
|
893
|
+
m(this, "googleCached", new Le(() => {
|
|
884
894
|
const t = new google.maps.ImageMapType({
|
|
885
895
|
getTileUrl: (e, r) => this.options.getTileUrl(e, r),
|
|
886
896
|
tileSize: new google.maps.Size(256, 256),
|
|
@@ -917,8 +927,8 @@ class mn {
|
|
|
917
927
|
}
|
|
918
928
|
class mi {
|
|
919
929
|
constructor() {
|
|
920
|
-
|
|
921
|
-
|
|
930
|
+
m(this, "baiduCache", new Le(() => new BMap.TrafficLayer()));
|
|
931
|
+
m(this, "googleCache", new Le(() => new google.maps.TrafficLayer()));
|
|
922
932
|
}
|
|
923
933
|
asBaiduLayer() {
|
|
924
934
|
return this.baiduCache.get();
|
|
@@ -929,13 +939,13 @@ class mi {
|
|
|
929
939
|
}
|
|
930
940
|
var V;
|
|
931
941
|
((i) => {
|
|
932
|
-
i.NORMAL = new W("normal", () => BMAP_NORMAL_MAP, () => google.maps.MapTypeId.ROADMAP,
|
|
942
|
+
i.NORMAL = new W("normal", () => BMAP_NORMAL_MAP, () => google.maps.MapTypeId.ROADMAP, D.gcj02), i.SATELLITE = new W("satellite", () => BMAP_SATELLITE_MAP, () => google.maps.MapTypeId.SATELLITE, D.wgs84), i.HYBRID = new W("hybrid", () => BMAP_HYBRID_MAP, () => google.maps.MapTypeId.HYBRID, D.gcj02), i.TERRAIN = new W("terrain", () => (
|
|
933
943
|
/* 三维 */
|
|
934
944
|
BMAP_PERSPECTIVE_MAP
|
|
935
945
|
), () => (
|
|
936
946
|
/* 地形 */
|
|
937
947
|
google.maps.MapTypeId.TERRAIN
|
|
938
|
-
),
|
|
948
|
+
), D.wgs84), i.BUILD_IN_MAP_TYPES = new ui([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
|
|
939
949
|
})(V || (V = {}));
|
|
940
950
|
var Or = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(Or || {});
|
|
941
951
|
const Cr = [V.NORMAL, V.SATELLITE, V.HYBRID];
|
|
@@ -953,7 +963,7 @@ class It extends Bt {
|
|
|
953
963
|
}
|
|
954
964
|
}
|
|
955
965
|
const ue = class ue extends at {
|
|
956
|
-
constructor(t = "default", e =
|
|
966
|
+
constructor(t = "default", e = A.TOP_LEFT, r = Cr) {
|
|
957
967
|
super("mapType", e), this.type = t, this.mapTypes = r, ue.type2google || (ue.type2google = {
|
|
958
968
|
default: google.maps.MapTypeControlStyle.DEFAULT,
|
|
959
969
|
horizontal: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
|
|
@@ -973,7 +983,7 @@ const ue = class ue extends at {
|
|
|
973
983
|
});
|
|
974
984
|
}
|
|
975
985
|
};
|
|
976
|
-
|
|
986
|
+
m(ue, "type2google");
|
|
977
987
|
let Tt = ue;
|
|
978
988
|
class St extends Bt {
|
|
979
989
|
static create(t) {
|
|
@@ -987,20 +997,20 @@ class kt extends at {
|
|
|
987
997
|
static create(t) {
|
|
988
998
|
return new kt(t.position);
|
|
989
999
|
}
|
|
990
|
-
constructor(t =
|
|
1000
|
+
constructor(t = A.BOTTOM_RIGHT) {
|
|
991
1001
|
super("scale", t);
|
|
992
1002
|
}
|
|
993
1003
|
}
|
|
994
1004
|
class At extends gi {
|
|
995
1005
|
static create(t) {
|
|
996
|
-
return new At(!0, t.position ??
|
|
1006
|
+
return new At(!0, t.position ?? A.RIGHT_BOTTOM);
|
|
997
1007
|
}
|
|
998
1008
|
}
|
|
999
1009
|
class Dt extends at {
|
|
1000
1010
|
static create(t) {
|
|
1001
1011
|
return new Dt(t.position);
|
|
1002
1012
|
}
|
|
1003
|
-
constructor(t =
|
|
1013
|
+
constructor(t = A.RIGHT_BOTTOM) {
|
|
1004
1014
|
super("streetView", t);
|
|
1005
1015
|
}
|
|
1006
1016
|
}
|
|
@@ -1018,20 +1028,20 @@ class $t extends at {
|
|
|
1018
1028
|
static create(t) {
|
|
1019
1029
|
return new $t(t.position);
|
|
1020
1030
|
}
|
|
1021
|
-
constructor(t =
|
|
1031
|
+
constructor(t = A.RIGHT_BOTTOM) {
|
|
1022
1032
|
super("zoom", t);
|
|
1023
1033
|
}
|
|
1024
1034
|
}
|
|
1025
1035
|
function fi(i) {
|
|
1026
1036
|
let t, e, r;
|
|
1027
|
-
const s = "The Google Maps JavaScript API", n = "google", a = "importLibrary", c = "__ib__", o = document,
|
|
1028
|
-
var
|
|
1029
|
-
await (e = o.createElement("script")),
|
|
1037
|
+
const s = "The Google Maps JavaScript API", n = "google", a = "importLibrary", c = "__ib__", o = document, h = window, d = h[n] || (h[n] = {}), p = d.maps || (d.maps = {}), g = /* @__PURE__ */ new Set(), f = new URLSearchParams(), T = () => t || (t = new Promise(async (_, M) => {
|
|
1038
|
+
var l;
|
|
1039
|
+
await (e = o.createElement("script")), f.set("libraries", [...g] + "");
|
|
1030
1040
|
for (r in i)
|
|
1031
|
-
|
|
1032
|
-
|
|
1041
|
+
f.set(r.replace(/[A-Z]/g, (u) => "_" + u[0].toLowerCase()), i[r]);
|
|
1042
|
+
f.set("callback", n + ".maps." + c), e.src = `https://maps.${n}apis.com/maps/api/js?` + f, p[c] = _, e.onerror = () => t = M(Error(s + " could not load.")), e.nonce = ((l = o.querySelector("script[nonce]")) == null ? void 0 : l.nonce) || "", o.head.append(e);
|
|
1033
1043
|
}));
|
|
1034
|
-
|
|
1044
|
+
p[a] ? console.warn(s + " only loads once. Ignoring:", i) : p[a] = (_, ...M) => g.add(_) && T().then(() => p[a](_, ...M));
|
|
1035
1045
|
}
|
|
1036
1046
|
let vi, yi;
|
|
1037
1047
|
const he = {
|
|
@@ -1086,7 +1096,7 @@ class Er {
|
|
|
1086
1096
|
class _i extends Er {
|
|
1087
1097
|
constructor(e, r) {
|
|
1088
1098
|
super();
|
|
1089
|
-
|
|
1099
|
+
m(this, "inner");
|
|
1090
1100
|
this.map = e, this.inner = new google.maps.places.Autocomplete(r.input, {
|
|
1091
1101
|
fields: [
|
|
1092
1102
|
"address_components",
|
|
@@ -1116,10 +1126,10 @@ class _i extends Er {
|
|
|
1116
1126
|
class bi extends Er {
|
|
1117
1127
|
constructor(e, r) {
|
|
1118
1128
|
super();
|
|
1119
|
-
|
|
1120
|
-
|
|
1129
|
+
m(this, "inner");
|
|
1130
|
+
m(this, "input");
|
|
1121
1131
|
// TODO: 要不要添加个移除监听的方法?
|
|
1122
|
-
|
|
1132
|
+
m(this, "removeableArray", []);
|
|
1123
1133
|
if (this.map = e, this.input = r.input, this.inner = new BMap.Autocomplete({
|
|
1124
1134
|
input: r.input,
|
|
1125
1135
|
location: r.bindToMap ? e.innerMap : void 0
|
|
@@ -1176,36 +1186,36 @@ var Pr = { exports: {} };
|
|
|
1176
1186
|
defaultValueField: "value",
|
|
1177
1187
|
plugins: {}
|
|
1178
1188
|
}, a = function() {
|
|
1179
|
-
var
|
|
1180
|
-
this._coordinator = {}, this._data = [], this._radi = [], this._min = 0, this._max = 1, this._xField =
|
|
1181
|
-
},
|
|
1182
|
-
return
|
|
1189
|
+
var f = function(M) {
|
|
1190
|
+
this._coordinator = {}, this._data = [], this._radi = [], this._min = 0, this._max = 1, this._xField = M.xField || M.defaultXField, this._yField = M.yField || M.defaultYField, this._valueField = M.valueField || M.defaultValueField, M.radius && (this._cfgRadius = M.radius);
|
|
1191
|
+
}, T = n.defaultRadius;
|
|
1192
|
+
return f.prototype = {
|
|
1183
1193
|
// when forceRender = false -> called from setData, omits renderall event
|
|
1184
|
-
_organiseData: function(
|
|
1185
|
-
var
|
|
1186
|
-
return
|
|
1187
|
-
x:
|
|
1188
|
-
y:
|
|
1194
|
+
_organiseData: function(_, M) {
|
|
1195
|
+
var l = _[this._xField], u = _[this._yField], v = this._radi, y = this._data, C = this._max, w = this._min, E = _[this._valueField] || 1, S = _.radius || this._cfgRadius || T;
|
|
1196
|
+
return y[l] || (y[l] = [], v[l] = []), y[l][u] ? y[l][u] += E : (y[l][u] = E, v[l][u] = S), y[l][u] > C ? (M ? this.setDataMax(y[l][u]) : this._max = y[l][u], !1) : {
|
|
1197
|
+
x: l,
|
|
1198
|
+
y: u,
|
|
1189
1199
|
value: E,
|
|
1190
|
-
radius:
|
|
1200
|
+
radius: S,
|
|
1191
1201
|
min: w,
|
|
1192
1202
|
max: C
|
|
1193
1203
|
};
|
|
1194
1204
|
},
|
|
1195
1205
|
_unOrganizeData: function() {
|
|
1196
|
-
var
|
|
1197
|
-
for (var
|
|
1198
|
-
for (var
|
|
1199
|
-
|
|
1200
|
-
x:
|
|
1201
|
-
y:
|
|
1202
|
-
radius:
|
|
1203
|
-
value:
|
|
1206
|
+
var _ = [], M = this._data, l = this._radi;
|
|
1207
|
+
for (var u in M)
|
|
1208
|
+
for (var v in M[u])
|
|
1209
|
+
_.push({
|
|
1210
|
+
x: u,
|
|
1211
|
+
y: v,
|
|
1212
|
+
radius: l[u][v],
|
|
1213
|
+
value: M[u][v]
|
|
1204
1214
|
});
|
|
1205
1215
|
return {
|
|
1206
1216
|
min: this._min,
|
|
1207
1217
|
max: this._max,
|
|
1208
|
-
data:
|
|
1218
|
+
data: _
|
|
1209
1219
|
};
|
|
1210
1220
|
},
|
|
1211
1221
|
_onExtremaChange: function() {
|
|
@@ -1216,35 +1226,35 @@ var Pr = { exports: {} };
|
|
|
1216
1226
|
},
|
|
1217
1227
|
addData: function() {
|
|
1218
1228
|
if (arguments[0].length > 0)
|
|
1219
|
-
for (var
|
|
1220
|
-
this.addData.call(this,
|
|
1229
|
+
for (var _ = arguments[0], M = _.length; M--; )
|
|
1230
|
+
this.addData.call(this, _[M]);
|
|
1221
1231
|
else {
|
|
1222
|
-
var
|
|
1223
|
-
|
|
1232
|
+
var l = this._organiseData(arguments[0], !0);
|
|
1233
|
+
l && this._coordinator.emit("renderpartial", {
|
|
1224
1234
|
min: this._min,
|
|
1225
1235
|
max: this._max,
|
|
1226
|
-
data: [
|
|
1236
|
+
data: [l]
|
|
1227
1237
|
});
|
|
1228
1238
|
}
|
|
1229
1239
|
return this;
|
|
1230
1240
|
},
|
|
1231
|
-
setData: function(
|
|
1232
|
-
var
|
|
1241
|
+
setData: function(_) {
|
|
1242
|
+
var M = _.data, l = M.length;
|
|
1233
1243
|
this._data = [], this._radi = [];
|
|
1234
|
-
for (var
|
|
1235
|
-
this._organiseData(
|
|
1236
|
-
return this._max =
|
|
1244
|
+
for (var u = 0; u < l; u++)
|
|
1245
|
+
this._organiseData(M[u], !1);
|
|
1246
|
+
return this._max = _.max, this._min = _.min || 0, this._onExtremaChange(), this._coordinator.emit("renderall", this._getInternalData()), this;
|
|
1237
1247
|
},
|
|
1238
1248
|
removeData: function() {
|
|
1239
1249
|
},
|
|
1240
|
-
setDataMax: function(
|
|
1241
|
-
return this._max =
|
|
1250
|
+
setDataMax: function(_) {
|
|
1251
|
+
return this._max = _, this._onExtremaChange(), this._coordinator.emit("renderall", this._getInternalData()), this;
|
|
1242
1252
|
},
|
|
1243
|
-
setDataMin: function(
|
|
1244
|
-
return this._min =
|
|
1253
|
+
setDataMin: function(_) {
|
|
1254
|
+
return this._min = _, this._onExtremaChange(), this._coordinator.emit("renderall", this._getInternalData()), this;
|
|
1245
1255
|
},
|
|
1246
|
-
setCoordinator: function(
|
|
1247
|
-
this._coordinator =
|
|
1256
|
+
setCoordinator: function(_) {
|
|
1257
|
+
this._coordinator = _;
|
|
1248
1258
|
},
|
|
1249
1259
|
_getInternalData: function() {
|
|
1250
1260
|
return {
|
|
@@ -1295,152 +1305,152 @@ var Pr = { exports: {} };
|
|
|
1295
1305
|
}
|
|
1296
1306
|
return false;
|
|
1297
1307
|
}*/
|
|
1298
|
-
},
|
|
1308
|
+
}, f;
|
|
1299
1309
|
}(), c = function() {
|
|
1300
|
-
var
|
|
1301
|
-
var
|
|
1302
|
-
|
|
1303
|
-
var C =
|
|
1304
|
-
for (var w in
|
|
1305
|
-
C.addColorStop(w,
|
|
1306
|
-
return
|
|
1307
|
-
},
|
|
1308
|
-
var
|
|
1309
|
-
if (
|
|
1310
|
-
|
|
1310
|
+
var f = function(l) {
|
|
1311
|
+
var u = l.gradient || l.defaultGradient, v = document.createElement("canvas"), y = v.getContext("2d");
|
|
1312
|
+
v.width = 256, v.height = 1;
|
|
1313
|
+
var C = y.createLinearGradient(0, 0, 256, 1);
|
|
1314
|
+
for (var w in u)
|
|
1315
|
+
C.addColorStop(w, u[w]);
|
|
1316
|
+
return y.fillStyle = C, y.fillRect(0, 0, 256, 1), y.getImageData(0, 0, 256, 1).data;
|
|
1317
|
+
}, T = function(l, u) {
|
|
1318
|
+
var v = document.createElement("canvas"), y = v.getContext("2d"), C = l, w = l;
|
|
1319
|
+
if (v.width = v.height = l * 2, u == 1)
|
|
1320
|
+
y.beginPath(), y.arc(C, w, l, 0, 2 * Math.PI, !1), y.fillStyle = "rgba(0,0,0,1)", y.fill();
|
|
1311
1321
|
else {
|
|
1312
|
-
var E =
|
|
1313
|
-
E.addColorStop(0, "rgba(0,0,0,1)"), E.addColorStop(1, "rgba(0,0,0,0)"),
|
|
1322
|
+
var E = y.createRadialGradient(C, w, l * u, C, w, l);
|
|
1323
|
+
E.addColorStop(0, "rgba(0,0,0,1)"), E.addColorStop(1, "rgba(0,0,0,0)"), y.fillStyle = E, y.fillRect(0, 0, 2 * l, 2 * l);
|
|
1314
1324
|
}
|
|
1315
|
-
return
|
|
1316
|
-
},
|
|
1317
|
-
for (var
|
|
1318
|
-
for (var
|
|
1319
|
-
var I = L[J], G = w[
|
|
1320
|
-
|
|
1321
|
-
x:
|
|
1325
|
+
return v;
|
|
1326
|
+
}, _ = function(w) {
|
|
1327
|
+
for (var u = [], v = w.min, y = w.max, C = w.radi, w = w.data, E = Object.keys(w), S = E.length; S--; )
|
|
1328
|
+
for (var z = E[S], L = Object.keys(w[z]), J = L.length; J--; ) {
|
|
1329
|
+
var I = L[J], G = w[z][I], Q = C[z][I];
|
|
1330
|
+
u.push({
|
|
1331
|
+
x: z,
|
|
1322
1332
|
y: I,
|
|
1323
1333
|
value: G,
|
|
1324
1334
|
radius: Q
|
|
1325
1335
|
});
|
|
1326
1336
|
}
|
|
1327
1337
|
return {
|
|
1328
|
-
min:
|
|
1329
|
-
max:
|
|
1330
|
-
data:
|
|
1338
|
+
min: v,
|
|
1339
|
+
max: y,
|
|
1340
|
+
data: u
|
|
1331
1341
|
};
|
|
1332
1342
|
};
|
|
1333
|
-
function
|
|
1334
|
-
var
|
|
1343
|
+
function M(l) {
|
|
1344
|
+
var u = l.element, v = this.shadowCanvas = document.createElement("canvas"), y = this.canvas = l.canvas || document.createElement("canvas");
|
|
1335
1345
|
this._renderBoundaries = [1e4, 1e4, 0, 0];
|
|
1336
|
-
var C = getComputedStyle(
|
|
1337
|
-
|
|
1346
|
+
var C = getComputedStyle(l.element) || {};
|
|
1347
|
+
y.className = "heatmap-canvas", this._width = y.width = v.width = +C.width.replace(/px/, ""), this._height = y.height = v.height = +C.height.replace(/px/, ""), this.shadowCtx = v.getContext("2d"), this.ctx = y.getContext("2d"), y.style.cssText = v.style.cssText = "position:absolute;left:0;top:0;", u.style.position = "relative", u.appendChild(y), this._palette = f(l), this._templates = {}, this._setStyles(l);
|
|
1338
1348
|
}
|
|
1339
|
-
return
|
|
1340
|
-
renderPartial: function(
|
|
1341
|
-
this._drawAlpha(
|
|
1349
|
+
return M.prototype = {
|
|
1350
|
+
renderPartial: function(l) {
|
|
1351
|
+
this._drawAlpha(l), this._colorize();
|
|
1342
1352
|
},
|
|
1343
|
-
renderAll: function(
|
|
1344
|
-
this._clear(), this._drawAlpha(
|
|
1353
|
+
renderAll: function(l) {
|
|
1354
|
+
this._clear(), this._drawAlpha(_(l)), this._colorize();
|
|
1345
1355
|
},
|
|
1346
|
-
_updateGradient: function(
|
|
1347
|
-
this._palette =
|
|
1356
|
+
_updateGradient: function(l) {
|
|
1357
|
+
this._palette = f(l);
|
|
1348
1358
|
},
|
|
1349
|
-
updateConfig: function(
|
|
1350
|
-
|
|
1359
|
+
updateConfig: function(l, u) {
|
|
1360
|
+
l.gradient !== u.gradient && this._updateGradient(l), this._setStyles(l);
|
|
1351
1361
|
},
|
|
1352
|
-
setDimensions: function(
|
|
1353
|
-
this._width =
|
|
1362
|
+
setDimensions: function(l, u) {
|
|
1363
|
+
this._width = l, this._height = u, this.canvas.width = this.shadowCanvas.width = l, this.canvas.height = this.shadowCanvas.height = u;
|
|
1354
1364
|
},
|
|
1355
1365
|
_clear: function() {
|
|
1356
1366
|
this.shadowCtx.clearRect(0, 0, this._width, this._height), this.ctx.clearRect(0, 0, this._width, this._height);
|
|
1357
1367
|
},
|
|
1358
|
-
_setStyles: function(
|
|
1359
|
-
this._blur =
|
|
1368
|
+
_setStyles: function(l) {
|
|
1369
|
+
this._blur = l.blur == 0 ? 0 : l.blur || l.defaultBlur, l.backgroundColor && (this.canvas.style.backgroundColor = l.backgroundColor), this._opacity = (l.opacity || 0) * 255, this._maxOpacity = (l.maxOpacity || l.defaultMaxOpacity) * 255, this._minOpacity = (l.minOpacity || l.defaultMinOpacity) * 255, this._useGradientOpacity = !!l.useGradientOpacity;
|
|
1360
1370
|
},
|
|
1361
|
-
_drawAlpha: function(
|
|
1362
|
-
for (var
|
|
1363
|
-
var E =
|
|
1364
|
-
this._templates[L] ? Z = this._templates[L] : this._templates[L] = Z =
|
|
1371
|
+
_drawAlpha: function(y) {
|
|
1372
|
+
for (var u = this._min = y.min, v = this._max = y.max, y = y.data || [], C = y.length, w = 1 - this._blur; C--; ) {
|
|
1373
|
+
var E = y[C], S = E.x, z = E.y, L = E.radius, J = Math.min(E.value, v), I = S - L, G = z - L, Q = this.shadowCtx, Z;
|
|
1374
|
+
this._templates[L] ? Z = this._templates[L] : this._templates[L] = Z = T(L, w), Q.globalAlpha = (J - u) / (v - u), 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
1375
|
}
|
|
1366
1376
|
},
|
|
1367
1377
|
_colorize: function() {
|
|
1368
|
-
var
|
|
1369
|
-
|
|
1370
|
-
for (var J = this.shadowCtx.getImageData(
|
|
1378
|
+
var l = this._renderBoundaries[0], u = this._renderBoundaries[1], v = this._renderBoundaries[2] - l, y = this._renderBoundaries[3] - u, C = this._width, w = this._height, E = this._opacity, S = this._maxOpacity, z = this._minOpacity, L = this._useGradientOpacity;
|
|
1379
|
+
l < 0 && (l = 0), u < 0 && (u = 0), l + v > C && (v = C - l), u + y > w && (y = w - u);
|
|
1380
|
+
for (var J = this.shadowCtx.getImageData(l, u, v, y), I = J.data, G = I.length, Q = this._palette, Z = 3; Z < G; Z += 4) {
|
|
1371
1381
|
var je = I[Z], Ce = je * 4;
|
|
1372
1382
|
if (Ce) {
|
|
1373
1383
|
var we;
|
|
1374
|
-
E > 0 ? we = E : je <
|
|
1384
|
+
E > 0 ? we = E : je < S ? je < z ? we = z : we = je : we = S, 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
1385
|
}
|
|
1376
1386
|
}
|
|
1377
|
-
this.ctx.putImageData(J,
|
|
1387
|
+
this.ctx.putImageData(J, l, u), this._renderBoundaries = [1e3, 1e3, 0, 0];
|
|
1378
1388
|
},
|
|
1379
|
-
getValueAt: function(
|
|
1380
|
-
var
|
|
1381
|
-
return
|
|
1389
|
+
getValueAt: function(l) {
|
|
1390
|
+
var u, v = this.shadowCtx, y = v.getImageData(l.x, l.y, 1, 1), C = y.data[3], w = this._max, E = this._min;
|
|
1391
|
+
return u = Math.abs(w - E) * (C / 255) >> 0, u;
|
|
1382
1392
|
},
|
|
1383
1393
|
getDataURL: function() {
|
|
1384
1394
|
return this.canvas.toDataURL();
|
|
1385
1395
|
}
|
|
1386
|
-
},
|
|
1396
|
+
}, M;
|
|
1387
1397
|
}(), o = function() {
|
|
1388
|
-
var
|
|
1389
|
-
return n.defaultRenderer === "canvas2d" && (
|
|
1390
|
-
}(),
|
|
1398
|
+
var f = !1;
|
|
1399
|
+
return n.defaultRenderer === "canvas2d" && (f = c), f;
|
|
1400
|
+
}(), h = {
|
|
1391
1401
|
merge: function() {
|
|
1392
|
-
for (var
|
|
1393
|
-
var
|
|
1394
|
-
for (var
|
|
1395
|
-
|
|
1402
|
+
for (var g = {}, f = arguments.length, T = 0; T < f; T++) {
|
|
1403
|
+
var _ = arguments[T];
|
|
1404
|
+
for (var M in _)
|
|
1405
|
+
g[M] = _[M];
|
|
1396
1406
|
}
|
|
1397
|
-
return
|
|
1407
|
+
return g;
|
|
1398
1408
|
}
|
|
1399
1409
|
}, d = function() {
|
|
1400
|
-
var
|
|
1401
|
-
function
|
|
1410
|
+
var f = function() {
|
|
1411
|
+
function l() {
|
|
1402
1412
|
this.cStore = {};
|
|
1403
1413
|
}
|
|
1404
|
-
return
|
|
1405
|
-
on: function(
|
|
1414
|
+
return l.prototype = {
|
|
1415
|
+
on: function(u, v, y) {
|
|
1406
1416
|
var C = this.cStore;
|
|
1407
|
-
C[
|
|
1408
|
-
return
|
|
1417
|
+
C[u] || (C[u] = []), C[u].push(function(w) {
|
|
1418
|
+
return v.call(y, w);
|
|
1409
1419
|
});
|
|
1410
1420
|
},
|
|
1411
|
-
emit: function(
|
|
1412
|
-
var
|
|
1413
|
-
if (
|
|
1414
|
-
for (var C =
|
|
1415
|
-
var E =
|
|
1416
|
-
E(
|
|
1421
|
+
emit: function(u, v) {
|
|
1422
|
+
var y = this.cStore;
|
|
1423
|
+
if (y[u])
|
|
1424
|
+
for (var C = y[u].length, w = 0; w < C; w++) {
|
|
1425
|
+
var E = y[u][w];
|
|
1426
|
+
E(v);
|
|
1417
1427
|
}
|
|
1418
1428
|
}
|
|
1419
|
-
},
|
|
1420
|
-
}(),
|
|
1421
|
-
var
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
min:
|
|
1425
|
-
max:
|
|
1426
|
-
gradient:
|
|
1429
|
+
}, l;
|
|
1430
|
+
}(), T = function(M) {
|
|
1431
|
+
var l = M._renderer, u = M._coordinator, v = M._store;
|
|
1432
|
+
u.on("renderpartial", l.renderPartial, l), u.on("renderall", l.renderAll, l), u.on("extremachange", function(y) {
|
|
1433
|
+
M._config.onExtremaChange && M._config.onExtremaChange({
|
|
1434
|
+
min: y.min,
|
|
1435
|
+
max: y.max,
|
|
1436
|
+
gradient: M._config.gradient || M._config.defaultGradient
|
|
1427
1437
|
});
|
|
1428
|
-
}),
|
|
1438
|
+
}), v.setCoordinator(u);
|
|
1429
1439
|
};
|
|
1430
|
-
function
|
|
1431
|
-
var
|
|
1432
|
-
if (this._coordinator = new
|
|
1433
|
-
var
|
|
1434
|
-
if (n.plugins[
|
|
1435
|
-
var
|
|
1436
|
-
this._renderer = new
|
|
1440
|
+
function _() {
|
|
1441
|
+
var M = this._config = h.merge(n, arguments[0] || {});
|
|
1442
|
+
if (this._coordinator = new f(), M.plugin) {
|
|
1443
|
+
var l = M.plugin;
|
|
1444
|
+
if (n.plugins[l]) {
|
|
1445
|
+
var u = n.plugins[l];
|
|
1446
|
+
this._renderer = new u.renderer(M), this._store = new u.store(M);
|
|
1437
1447
|
} else
|
|
1438
|
-
throw new Error("Plugin '" +
|
|
1448
|
+
throw new Error("Plugin '" + l + "' not found. Maybe it was not registered.");
|
|
1439
1449
|
} else
|
|
1440
|
-
this._renderer = new o(
|
|
1441
|
-
|
|
1450
|
+
this._renderer = new o(M), this._store = new a(M);
|
|
1451
|
+
T(this);
|
|
1442
1452
|
}
|
|
1443
|
-
return
|
|
1453
|
+
return _.prototype = {
|
|
1444
1454
|
addData: function() {
|
|
1445
1455
|
return this._store.addData.apply(this._store, arguments), this;
|
|
1446
1456
|
},
|
|
@@ -1456,9 +1466,9 @@ var Pr = { exports: {} };
|
|
|
1456
1466
|
setDataMin: function() {
|
|
1457
1467
|
return this._store.setDataMin.apply(this._store, arguments), this;
|
|
1458
1468
|
},
|
|
1459
|
-
configure: function(
|
|
1460
|
-
const
|
|
1461
|
-
return this._config =
|
|
1469
|
+
configure: function(M) {
|
|
1470
|
+
const l = this._config;
|
|
1471
|
+
return this._config = h.merge(this._config, M), this._renderer.updateConfig(this._config, l), this._coordinator.emit("renderall", this._store._getInternalData()), this;
|
|
1462
1472
|
},
|
|
1463
1473
|
repaint: function() {
|
|
1464
1474
|
return this._coordinator.emit("renderall", this._store._getInternalData()), this;
|
|
@@ -1469,19 +1479,19 @@ var Pr = { exports: {} };
|
|
|
1469
1479
|
getDataURL: function() {
|
|
1470
1480
|
return this._renderer.getDataURL();
|
|
1471
1481
|
},
|
|
1472
|
-
getValueAt: function(
|
|
1473
|
-
return this._store.getValueAt ? this._store.getValueAt(
|
|
1482
|
+
getValueAt: function(M) {
|
|
1483
|
+
return this._store.getValueAt ? this._store.getValueAt(M) : this._renderer.getValueAt ? this._renderer.getValueAt(M) : null;
|
|
1474
1484
|
}
|
|
1475
|
-
},
|
|
1476
|
-
}(),
|
|
1477
|
-
create: function(
|
|
1478
|
-
return new d(
|
|
1485
|
+
}, _;
|
|
1486
|
+
}(), p = {
|
|
1487
|
+
create: function(g) {
|
|
1488
|
+
return new d(g);
|
|
1479
1489
|
},
|
|
1480
|
-
register: function(
|
|
1481
|
-
n.plugins[
|
|
1490
|
+
register: function(g, f) {
|
|
1491
|
+
n.plugins[g] = f;
|
|
1482
1492
|
}
|
|
1483
1493
|
};
|
|
1484
|
-
return
|
|
1494
|
+
return p;
|
|
1485
1495
|
}();
|
|
1486
1496
|
var r = function(n) {
|
|
1487
1497
|
Reflect.getPrototypeOf(r.prototype) !== BMap.Overlay.prototype && Reflect.setPrototypeOf(r.prototype, BMap.Overlay.prototype), this.conf = n, this.conf.visible = n.visible === void 0 ? !0 : n.visible, this.heatmap = null, this.latlngs = [], this.bounds = null;
|
|
@@ -1494,34 +1504,34 @@ var Pr = { exports: {} };
|
|
|
1494
1504
|
n.getPanes().mapPane.appendChild(a), this.conf.valueField = this.conf.valueField || "count", this.heatmap = e.create(this.conf);
|
|
1495
1505
|
var c = this;
|
|
1496
1506
|
return n.addEventListener("resize", function(o) {
|
|
1497
|
-
var
|
|
1498
|
-
a.style.width =
|
|
1507
|
+
var h = o.size;
|
|
1508
|
+
a.style.width = h.width + "px", a.style.height = h.height + "px", c.heatmap._renderer.setDimensions(h.width, h.height), c.draw();
|
|
1499
1509
|
}), this._div = a, a;
|
|
1500
1510
|
}, r.prototype.draw = function() {
|
|
1501
1511
|
if (s()) {
|
|
1502
1512
|
var n = this._map.getBounds();
|
|
1503
1513
|
if (!n.equals(this.bounds)) {
|
|
1504
1514
|
this.bounds = n;
|
|
1505
|
-
var a = this._map.pointToOverlayPixel(n.getNorthEast()), c = this._map.pointToOverlayPixel(n.getSouthWest()), o = a.y,
|
|
1506
|
-
if (this.conf.element.style.left =
|
|
1515
|
+
var a = this._map.pointToOverlayPixel(n.getNorthEast()), c = this._map.pointToOverlayPixel(n.getSouthWest()), o = a.y, h = c.x, d = c.y - a.y, p = a.x - c.x;
|
|
1516
|
+
if (this.conf.element.style.left = h + "px", this.conf.element.style.top = o + "px", this.conf.element.style.width = p + "px", this.conf.element.style.height = d + "px", this.latlngs.length > 0) {
|
|
1507
1517
|
this.heatmap.removeData();
|
|
1508
|
-
var
|
|
1509
|
-
const
|
|
1518
|
+
var g = this.latlngs.length;
|
|
1519
|
+
const l = {
|
|
1510
1520
|
max: this.heatmap._store.getData().max,
|
|
1511
1521
|
data: []
|
|
1512
1522
|
};
|
|
1513
|
-
for (;
|
|
1514
|
-
var
|
|
1515
|
-
if (n.containsPoint(
|
|
1516
|
-
var
|
|
1517
|
-
|
|
1518
|
-
x:
|
|
1519
|
-
y:
|
|
1520
|
-
count: this.latlngs[
|
|
1523
|
+
for (; g--; ) {
|
|
1524
|
+
var f = this.latlngs[g].latlng;
|
|
1525
|
+
if (n.containsPoint(f)) {
|
|
1526
|
+
var T = this._map.pointToOverlayPixel(f), h = this._map.pointToOverlayPixel(n.getSouthWest()).x, o = this._map.pointToOverlayPixel(n.getNorthEast()).y, _ = new BMap.Pixel(T.x - h, T.y - o), M = this.pixelTransform(_);
|
|
1527
|
+
l.data.push({
|
|
1528
|
+
x: M.x,
|
|
1529
|
+
y: M.y,
|
|
1530
|
+
count: this.latlngs[g].c
|
|
1521
1531
|
});
|
|
1522
1532
|
}
|
|
1523
1533
|
}
|
|
1524
|
-
this.conf.radiusChangeByZoom && (this.heatmap._store._cfgRadius = this.conf.radiusChangeByZoom(this._map.getZoom())), this.heatmap.setData(
|
|
1534
|
+
this.conf.radiusChangeByZoom && (this.heatmap._store._cfgRadius = this.conf.radiusChangeByZoom(this._map.getZoom())), this.heatmap.setData(l);
|
|
1525
1535
|
}
|
|
1526
1536
|
}
|
|
1527
1537
|
}
|
|
@@ -1540,18 +1550,18 @@ var Pr = { exports: {} };
|
|
|
1540
1550
|
var a = this._map.getBounds(), c = {
|
|
1541
1551
|
max: n.max,
|
|
1542
1552
|
data: []
|
|
1543
|
-
}, o = n.data,
|
|
1544
|
-
for (this.latlngs = [], this.heatmap.removeData(), this.conf.radiusChangeByZoom && (this.heatmap._store._cfgRadius = this.conf.radiusChangeByZoom(this._map.getZoom()));
|
|
1545
|
-
var d = new BMap.Point(o[
|
|
1553
|
+
}, o = n.data, h = o.length;
|
|
1554
|
+
for (this.latlngs = [], this.heatmap.removeData(), this.conf.radiusChangeByZoom && (this.heatmap._store._cfgRadius = this.conf.radiusChangeByZoom(this._map.getZoom())); h--; ) {
|
|
1555
|
+
var d = new BMap.Point(o[h].lng, o[h].lat);
|
|
1546
1556
|
if (this.latlngs.push({
|
|
1547
1557
|
latlng: d,
|
|
1548
|
-
c: o[
|
|
1558
|
+
c: o[h].count
|
|
1549
1559
|
}), !!a.containsPoint(d)) {
|
|
1550
|
-
var
|
|
1560
|
+
var p = this._map.pointToOverlayPixel(d), g = this._map.pointToOverlayPixel(a.getSouthWest()).x, f = this._map.pointToOverlayPixel(a.getNorthEast()).y, T = new BMap.Pixel(p.x - g, p.y - f), _ = this.pixelTransform(T);
|
|
1551
1561
|
c.data.push({
|
|
1552
|
-
x:
|
|
1553
|
-
y:
|
|
1554
|
-
count: o[
|
|
1562
|
+
x: _.x,
|
|
1563
|
+
y: _.y,
|
|
1564
|
+
count: o[h].count
|
|
1555
1565
|
});
|
|
1556
1566
|
}
|
|
1557
1567
|
}
|
|
@@ -1564,8 +1574,8 @@ var Pr = { exports: {} };
|
|
|
1564
1574
|
lat: a,
|
|
1565
1575
|
count: c
|
|
1566
1576
|
});
|
|
1567
|
-
var o = new BMap.Point(n, a),
|
|
1568
|
-
this.heatmap.store.addDataPoint(
|
|
1577
|
+
var o = new BMap.Point(n, a), h = this.pixelTransform(this._map.pointToOverlayPixel(o));
|
|
1578
|
+
this.heatmap.store.addDataPoint(h.x, h.y, c), this.latlngs.push({
|
|
1569
1579
|
latlng: o,
|
|
1570
1580
|
c
|
|
1571
1581
|
});
|
|
@@ -1619,7 +1629,7 @@ class Lr {
|
|
|
1619
1629
|
class Oi extends Lr {
|
|
1620
1630
|
constructor(e, r) {
|
|
1621
1631
|
super();
|
|
1622
|
-
|
|
1632
|
+
m(this, "inner");
|
|
1623
1633
|
this.map = e, this.inner = new google.maps.visualization.HeatmapLayer(qe.toGoogle(r, this.map.coordType)), this.inner.setMap(e.innerMap);
|
|
1624
1634
|
}
|
|
1625
1635
|
setData(e) {
|
|
@@ -1635,7 +1645,7 @@ class Oi extends Lr {
|
|
|
1635
1645
|
class Ci extends Lr {
|
|
1636
1646
|
constructor(e, r) {
|
|
1637
1647
|
super();
|
|
1638
|
-
|
|
1648
|
+
m(this, "inner");
|
|
1639
1649
|
this.map = e;
|
|
1640
1650
|
const s = qe.toBaidu(r, this.map.coordType, r.maxIntensity);
|
|
1641
1651
|
this.inner = new Mi(s), e.innerMap.addOverlay(this.inner), this.inner.setDataSet(s.data);
|
|
@@ -1684,8 +1694,8 @@ const ke = class ke extends Br {
|
|
|
1684
1694
|
// {@template google_map_normal_gcj02}
|
|
1685
1695
|
// google地图的普通地图, 在国内其实上是gcj02坐标, 卫星地图是wgs84坐标, 因为这里打开的是基础地图, 故使用gcj02
|
|
1686
1696
|
// {@endtemplate}
|
|
1687
|
-
origin: te.toString(t,
|
|
1688
|
-
destination: te.toString(e,
|
|
1697
|
+
origin: te.toString(t, D.gcj02),
|
|
1698
|
+
destination: te.toString(e, D.gcj02),
|
|
1689
1699
|
travelmode: r
|
|
1690
1700
|
});
|
|
1691
1701
|
}
|
|
@@ -1694,11 +1704,11 @@ const ke = class ke extends Br {
|
|
|
1694
1704
|
return Be(ke.BASE_URL, "search/", {
|
|
1695
1705
|
api: "1",
|
|
1696
1706
|
// {@macro google_map_normal_gcj02}
|
|
1697
|
-
query: te.toString(t,
|
|
1707
|
+
query: te.toString(t, D.gcj02)
|
|
1698
1708
|
});
|
|
1699
1709
|
}
|
|
1700
1710
|
};
|
|
1701
|
-
|
|
1711
|
+
m(ke, "BASE_URL", "https://www.google.com/maps/");
|
|
1702
1712
|
let Mt = ke;
|
|
1703
1713
|
const ge = class ge extends Br {
|
|
1704
1714
|
/**
|
|
@@ -1706,13 +1716,13 @@ const ge = class ge extends Br {
|
|
|
1706
1716
|
* @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
1717
|
* */
|
|
1708
1718
|
directions(t, e, r = "driving") {
|
|
1709
|
-
const s = te.getCoordType(e) ?? te.getCoordType(t) ??
|
|
1719
|
+
const s = te.getCoordType(e) ?? te.getCoordType(t) ?? D.bd09, n = te.toString(e, s);
|
|
1710
1720
|
return Be(ge.BASE_URL, "direction", {
|
|
1711
1721
|
// baidu地图, 一定要有起点, 故这里用终点当起点, 防止导航失败
|
|
1712
1722
|
origin: te.toString(t, s) ?? (typeof e != "string" ? `name:请选择起点|latlng:${n}` : n),
|
|
1713
1723
|
destination: n,
|
|
1714
1724
|
// 默认就是bd09
|
|
1715
|
-
coord_type: s ===
|
|
1725
|
+
coord_type: s === D.bd09 ? void 0 : s,
|
|
1716
1726
|
mode: r,
|
|
1717
1727
|
output: "html",
|
|
1718
1728
|
region: "中国",
|
|
@@ -1726,7 +1736,7 @@ const ge = class ge extends Br {
|
|
|
1726
1736
|
* 显示经纬度, {@link markerApi}中途跳转的url, 一定能够定位到
|
|
1727
1737
|
* */
|
|
1728
1738
|
latlngApi(t) {
|
|
1729
|
-
const e = t.to(
|
|
1739
|
+
const e = t.to(D.bd09);
|
|
1730
1740
|
return new URL(`https://map.baidu.com/?latlng=${e.lat},${e.lng}`);
|
|
1731
1741
|
}
|
|
1732
1742
|
/**
|
|
@@ -1736,7 +1746,7 @@ const ge = class ge extends Br {
|
|
|
1736
1746
|
markerApi(t, e, r) {
|
|
1737
1747
|
return Be(ge.BASE_URL, "marker", {
|
|
1738
1748
|
location: `${t.lat},${t.lng}`,
|
|
1739
|
-
coord_type: t.coord ===
|
|
1749
|
+
coord_type: t.coord === D.bd09 ? void 0 : t.coord,
|
|
1740
1750
|
title: e,
|
|
1741
1751
|
content: r,
|
|
1742
1752
|
output: "html",
|
|
@@ -1754,14 +1764,14 @@ const ge = class ge extends Br {
|
|
|
1754
1764
|
} : {
|
|
1755
1765
|
location: `${t.lat},${t.lng}`,
|
|
1756
1766
|
// 默认就是bd09
|
|
1757
|
-
coord_type: t.coord ===
|
|
1767
|
+
coord_type: t.coord === D.bd09 ? void 0 : t.coord
|
|
1758
1768
|
},
|
|
1759
1769
|
output: "html",
|
|
1760
1770
|
src: pt()
|
|
1761
1771
|
});
|
|
1762
1772
|
}
|
|
1763
1773
|
};
|
|
1764
|
-
|
|
1774
|
+
m(ge, "BASE_URL", "https://api.map.baidu.com/");
|
|
1765
1775
|
let Ot = ge, wi = class Ir {
|
|
1766
1776
|
constructor(t, e, r) {
|
|
1767
1777
|
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;
|
|
@@ -2483,57 +2493,57 @@ var Sr = { exports: {} };
|
|
|
2483
2493
|
return Object.prototype.toString.call(o) == "[object String]";
|
|
2484
2494
|
}, r.isString = r.lang.isString, r.dom._g = function(o) {
|
|
2485
2495
|
return r.lang.isString(o) ? document.getElementById(o) : o;
|
|
2486
|
-
}, r._g = r.dom._g, r.browser = r.browser || {}, /msie (\d+\.\d)/i.test(navigator.userAgent) && (r.browser.ie = r.ie = document.documentMode || +RegExp.$1), r.dom.getComputedStyle = function(o,
|
|
2496
|
+
}, r._g = r.dom._g, r.browser = r.browser || {}, /msie (\d+\.\d)/i.test(navigator.userAgent) && (r.browser.ie = r.ie = document.documentMode || +RegExp.$1), r.dom.getComputedStyle = function(o, h) {
|
|
2487
2497
|
o = r.dom._g(o);
|
|
2488
|
-
var d = r.dom.getDocument(o),
|
|
2489
|
-
return d.defaultView && d.defaultView.getComputedStyle && (
|
|
2490
|
-
}, r.dom._styleFixer = r.dom._styleFixer || {}, r.dom._styleFilter = r.dom._styleFilter || [], r.dom._styleFilter.filter = function(o,
|
|
2491
|
-
for (var
|
|
2492
|
-
(
|
|
2493
|
-
return
|
|
2498
|
+
var d = r.dom.getDocument(o), p;
|
|
2499
|
+
return d.defaultView && d.defaultView.getComputedStyle && (p = d.defaultView.getComputedStyle(o, null), p) ? p[h] || p.getPropertyValue(h) : "";
|
|
2500
|
+
}, r.dom._styleFixer = r.dom._styleFixer || {}, r.dom._styleFilter = r.dom._styleFilter || [], r.dom._styleFilter.filter = function(o, h, d) {
|
|
2501
|
+
for (var p = 0, g = r.dom._styleFilter, f; f = g[p]; p++)
|
|
2502
|
+
(f = f[d]) && (h = f(o, h));
|
|
2503
|
+
return h;
|
|
2494
2504
|
}, r.string = r.string || {}, r.string.toCamelCase = function(o) {
|
|
2495
|
-
return o.indexOf("-") < 0 && o.indexOf("_") < 0 ? o : o.replace(/[-_][^-_]/g, function(
|
|
2496
|
-
return
|
|
2505
|
+
return o.indexOf("-") < 0 && o.indexOf("_") < 0 ? o : o.replace(/[-_][^-_]/g, function(h) {
|
|
2506
|
+
return h.charAt(1).toUpperCase();
|
|
2497
2507
|
});
|
|
2498
|
-
}, r.dom.getStyle = function(o,
|
|
2508
|
+
}, r.dom.getStyle = function(o, h) {
|
|
2499
2509
|
var d = r.dom;
|
|
2500
|
-
o = d.g(o),
|
|
2501
|
-
var
|
|
2502
|
-
if (!
|
|
2503
|
-
var
|
|
2504
|
-
|
|
2510
|
+
o = d.g(o), h = r.string.toCamelCase(h);
|
|
2511
|
+
var p = o.style[h] || (o.currentStyle ? o.currentStyle[h] : "") || d.getComputedStyle(o, h);
|
|
2512
|
+
if (!p) {
|
|
2513
|
+
var g = d._styleFixer[h];
|
|
2514
|
+
g && (p = g.get ? g.get(o) : r.dom.getStyle(o, g));
|
|
2505
2515
|
}
|
|
2506
|
-
return (
|
|
2516
|
+
return (g = d._styleFilter) && (p = g.filter(h, p, "get")), p;
|
|
2507
2517
|
}, r.getStyle = r.dom.getStyle, /opera\/(\d+\.\d)/i.test(navigator.userAgent) && (r.browser.opera = +RegExp.$1), r.browser.isWebkit = /webkit/i.test(navigator.userAgent), r.browser.isGecko = /gecko/i.test(navigator.userAgent) && !/like gecko/i.test(navigator.userAgent), r.browser.isStrict = document.compatMode == "CSS1Compat", r.dom.getPosition = function(o) {
|
|
2508
2518
|
o = r.dom.g(o);
|
|
2509
|
-
var
|
|
2510
|
-
d.isGecko > 0 &&
|
|
2511
|
-
var
|
|
2512
|
-
if (o ==
|
|
2513
|
-
return
|
|
2519
|
+
var h = r.dom.getDocument(o), d = r.browser, p = r.dom.getStyle;
|
|
2520
|
+
d.isGecko > 0 && h.getBoxObjectFor && p(o, "position") == "absolute" && (o.style.top === "" || o.style.left);
|
|
2521
|
+
var g = { left: 0, top: 0 }, f = d.ie && !d.isStrict ? h.body : h.documentElement, T, _;
|
|
2522
|
+
if (o == f)
|
|
2523
|
+
return g;
|
|
2514
2524
|
if (o.getBoundingClientRect) {
|
|
2515
|
-
|
|
2516
|
-
var
|
|
2517
|
-
d.ie && !d.isStrict && (
|
|
2525
|
+
_ = o.getBoundingClientRect(), g.left = Math.floor(_.left) + Math.max(h.documentElement.scrollLeft, h.body.scrollLeft), g.top = Math.floor(_.top) + Math.max(h.documentElement.scrollTop, h.body.scrollTop), g.left -= h.documentElement.clientLeft, g.top -= h.documentElement.clientTop;
|
|
2526
|
+
var M = h.body, l = parseInt(p(M, "borderLeftWidth")), u = parseInt(p(M, "borderTopWidth"));
|
|
2527
|
+
d.ie && !d.isStrict && (g.left -= isNaN(l) ? 2 : l, g.top -= isNaN(u) ? 2 : u);
|
|
2518
2528
|
} else {
|
|
2519
|
-
|
|
2529
|
+
T = o;
|
|
2520
2530
|
do {
|
|
2521
|
-
if (
|
|
2522
|
-
|
|
2531
|
+
if (g.left += T.offsetLeft, g.top += T.offsetTop, d.isWebkit > 0 && p(T, "position") == "fixed") {
|
|
2532
|
+
g.left += h.body.scrollLeft, g.top += h.body.scrollTop;
|
|
2523
2533
|
break;
|
|
2524
2534
|
}
|
|
2525
|
-
|
|
2526
|
-
} while (
|
|
2527
|
-
for ((d.opera > 0 || d.isWebkit > 0 &&
|
|
2528
|
-
|
|
2535
|
+
T = T.offsetParent;
|
|
2536
|
+
} while (T && T != o);
|
|
2537
|
+
for ((d.opera > 0 || d.isWebkit > 0 && p(o, "position") == "absolute") && (g.top -= h.body.offsetTop), T = o.offsetParent; T && T != h.body; )
|
|
2538
|
+
g.left -= T.scrollLeft, (!d.opera || T.tagName != "TR") && (g.top -= T.scrollTop), T = T.offsetParent;
|
|
2529
2539
|
}
|
|
2530
|
-
return
|
|
2531
|
-
}, r.event = r.event || {}, r.event._listeners = r.event._listeners || [], r.event.on = function(o,
|
|
2532
|
-
|
|
2533
|
-
var
|
|
2534
|
-
d.call(o,
|
|
2535
|
-
},
|
|
2536
|
-
return
|
|
2540
|
+
return g;
|
|
2541
|
+
}, r.event = r.event || {}, r.event._listeners = r.event._listeners || [], r.event.on = function(o, h, d) {
|
|
2542
|
+
h = h.replace(/^on/i, ""), o = r.dom._g(o);
|
|
2543
|
+
var p = function(M) {
|
|
2544
|
+
d.call(o, M);
|
|
2545
|
+
}, g = r.event._listeners, f = r.event._eventFilter, T, _ = h;
|
|
2546
|
+
return h = h.toLowerCase(), f && f[h] && (T = f[h](o, h, p), _ = T.type, p = T.listener), o.addEventListener ? o.addEventListener(_, p, !1) : o.attachEvent && o.attachEvent("on" + _, p), g[g.length] = [o, h, d, p, _], o;
|
|
2537
2547
|
}, r.on = r.event.on, function() {
|
|
2538
2548
|
var o = s[r.guid];
|
|
2539
2549
|
r.lang.guid = function() {
|
|
@@ -2550,58 +2560,58 @@ var Sr = { exports: {} };
|
|
|
2550
2560
|
this.disposed = !0;
|
|
2551
2561
|
}, r.lang.Class.prototype.toString = function() {
|
|
2552
2562
|
return "[object " + (this._className || "Object") + "]";
|
|
2553
|
-
}, r.lang.Event = function(o,
|
|
2554
|
-
this.type = o, this.returnValue = !0, this.target =
|
|
2555
|
-
}, r.lang.Class.prototype.addEventListener = function(o,
|
|
2556
|
-
if (r.lang.isFunction(
|
|
2563
|
+
}, r.lang.Event = function(o, h) {
|
|
2564
|
+
this.type = o, this.returnValue = !0, this.target = h || null, this.currentTarget = null;
|
|
2565
|
+
}, r.lang.Class.prototype.addEventListener = function(o, h, d) {
|
|
2566
|
+
if (r.lang.isFunction(h)) {
|
|
2557
2567
|
!this.__listeners && (this.__listeners = {});
|
|
2558
|
-
var
|
|
2568
|
+
var p = this.__listeners, g;
|
|
2559
2569
|
if (typeof d == "string" && d) {
|
|
2560
2570
|
if (/[^\w\-]/.test(d))
|
|
2561
2571
|
throw "nonstandard key:" + d;
|
|
2562
|
-
|
|
2572
|
+
h.hashCode = d, g = d;
|
|
2563
2573
|
}
|
|
2564
|
-
o.indexOf("on") != 0 && (o = "on" + o), typeof
|
|
2574
|
+
o.indexOf("on") != 0 && (o = "on" + o), typeof p[o] != "object" && (p[o] = {}), g = g || r.lang.guid(), h.hashCode = g, p[o][g] = h;
|
|
2565
2575
|
}
|
|
2566
|
-
}, r.lang.Class.prototype.removeEventListener = function(o,
|
|
2567
|
-
if (!(typeof
|
|
2576
|
+
}, r.lang.Class.prototype.removeEventListener = function(o, h) {
|
|
2577
|
+
if (!(typeof h < "u" && (r.lang.isFunction(h) && !(h = h.hashCode) || !r.lang.isString(h)))) {
|
|
2568
2578
|
!this.__listeners && (this.__listeners = {}), o.indexOf("on") != 0 && (o = "on" + o);
|
|
2569
2579
|
var d = this.__listeners;
|
|
2570
2580
|
if (d[o])
|
|
2571
|
-
if (typeof
|
|
2572
|
-
d[o][
|
|
2581
|
+
if (typeof h < "u")
|
|
2582
|
+
d[o][h] && delete d[o][h];
|
|
2573
2583
|
else
|
|
2574
|
-
for (var
|
|
2575
|
-
delete d[o][
|
|
2584
|
+
for (var p in d[o])
|
|
2585
|
+
delete d[o][p];
|
|
2576
2586
|
}
|
|
2577
|
-
}, r.lang.Class.prototype.dispatchEvent = function(o,
|
|
2578
|
-
r.lang.isString(o) && (o = new r.lang.Event(o)), !this.__listeners && (this.__listeners = {}),
|
|
2579
|
-
for (var d in
|
|
2580
|
-
o[d] =
|
|
2581
|
-
var d,
|
|
2582
|
-
if (o.target = o.target || this, o.currentTarget = this,
|
|
2583
|
-
for (d in
|
|
2584
|
-
|
|
2587
|
+
}, r.lang.Class.prototype.dispatchEvent = function(o, h) {
|
|
2588
|
+
r.lang.isString(o) && (o = new r.lang.Event(o)), !this.__listeners && (this.__listeners = {}), h = h || {};
|
|
2589
|
+
for (var d in h)
|
|
2590
|
+
o[d] = h[d];
|
|
2591
|
+
var d, p = this.__listeners, g = o.type;
|
|
2592
|
+
if (o.target = o.target || this, o.currentTarget = this, g.indexOf("on") != 0 && (g = "on" + g), r.lang.isFunction(this[g]) && this[g].apply(this, arguments), typeof p[g] == "object")
|
|
2593
|
+
for (d in p[g])
|
|
2594
|
+
p[g][d].apply(this, arguments);
|
|
2585
2595
|
return o.returnValue;
|
|
2586
|
-
}, r.lang.inherits = function(o,
|
|
2587
|
-
var
|
|
2588
|
-
|
|
2589
|
-
for (
|
|
2590
|
-
p
|
|
2591
|
-
o.prototype.constructor = o, o.superClass =
|
|
2596
|
+
}, r.lang.inherits = function(o, h, d) {
|
|
2597
|
+
var p, g, f = o.prototype, T = new Function();
|
|
2598
|
+
T.prototype = h.prototype, g = o.prototype = new T();
|
|
2599
|
+
for (p in f)
|
|
2600
|
+
g[p] = f[p];
|
|
2601
|
+
o.prototype.constructor = o, o.superClass = h.prototype, typeof d == "string" && (g._className = d);
|
|
2592
2602
|
}, r.inherits = r.lang.inherits;
|
|
2593
|
-
var n = "http://api.map.baidu.com/library/TextIconOverlay/1.2/src/images/m", a = "png", c = function(o,
|
|
2603
|
+
var n = "http://api.map.baidu.com/library/TextIconOverlay/1.2/src/images/m", a = "png", c = function(o, h, d) {
|
|
2594
2604
|
try {
|
|
2595
2605
|
BMap;
|
|
2596
2606
|
} catch {
|
|
2597
2607
|
throw Error("Baidu Map JS API is not ready yet!");
|
|
2598
2608
|
}
|
|
2599
|
-
e.lang.inherits(c, BMap.Overlay, "TextIconOverlay"), this._position = o, this._text =
|
|
2609
|
+
e.lang.inherits(c, BMap.Overlay, "TextIconOverlay"), this._position = o, this._text = h, this._options = d || {}, this._styles = this._options.styles || [], this._zIndex = this._options.zIndex, !this._styles.length && this._setupDefaultStyles();
|
|
2600
2610
|
};
|
|
2601
2611
|
return c.prototype._setupDefaultStyles = function() {
|
|
2602
|
-
for (var o = [53, 56, 66, 78, 90],
|
|
2612
|
+
for (var o = [53, 56, 66, 78, 90], h = 0, d; d = o[h]; h++)
|
|
2603
2613
|
this._styles.push({
|
|
2604
|
-
url: n +
|
|
2614
|
+
url: n + h + "." + a,
|
|
2605
2615
|
size: new BMap.Size(d, d)
|
|
2606
2616
|
});
|
|
2607
2617
|
}, c.prototype.initialize = function(o) {
|
|
@@ -2616,9 +2626,9 @@ var Sr = { exports: {} };
|
|
|
2616
2626
|
return this._position;
|
|
2617
2627
|
}, c.prototype.setPosition = function(o) {
|
|
2618
2628
|
o && (!this._position || !this._position.equals(o)) && (this._position = o, this._updatePosition());
|
|
2619
|
-
}, c.prototype.getStyleByText = function(o,
|
|
2620
|
-
var d = parseInt(o),
|
|
2621
|
-
return
|
|
2629
|
+
}, c.prototype.getStyleByText = function(o, h) {
|
|
2630
|
+
var d = parseInt(o), p = parseInt(d / 10);
|
|
2631
|
+
return p = Math.max(0, p), p = Math.min(p, h.length - 1), h[p];
|
|
2622
2632
|
}, c.prototype._updateCss = function() {
|
|
2623
2633
|
if (this._domElement) {
|
|
2624
2634
|
var o = this.getStyleByText(this._text, this._styles);
|
|
@@ -2628,37 +2638,37 @@ var Sr = { exports: {} };
|
|
|
2628
2638
|
this._domElement && (this._domElement.innerHTML = this._text);
|
|
2629
2639
|
}, c.prototype._updatePosition = function() {
|
|
2630
2640
|
if (this._domElement && this._position) {
|
|
2631
|
-
var o = this._domElement.style,
|
|
2632
|
-
|
|
2641
|
+
var o = this._domElement.style, h = this._map.pointToOverlayPixel(this._position);
|
|
2642
|
+
h.x -= Math.ceil(parseInt(o.width) / 2), h.y -= Math.ceil(parseInt(o.height) / 2), o.left = h.x + "px", o.top = h.y + "px";
|
|
2633
2643
|
}
|
|
2634
2644
|
}, c.prototype._buildCssText = function(o) {
|
|
2635
|
-
var
|
|
2636
|
-
if (this._zIndex &&
|
|
2637
|
-
|
|
2645
|
+
var h = o.url, d = o.size, p = o.anchor, g = o.offset, f = o.textColor || "black", T = o.textSize || 10, _ = [];
|
|
2646
|
+
if (this._zIndex && _.push("z-index:" + this._zIndex + ";"), e.browser.ie < 7)
|
|
2647
|
+
_.push('filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="' + h + '");');
|
|
2638
2648
|
else {
|
|
2639
|
-
|
|
2640
|
-
var
|
|
2641
|
-
|
|
2649
|
+
_.push("background-image:url(" + h + ");");
|
|
2650
|
+
var M = "0 0";
|
|
2651
|
+
g instanceof BMap.Size && (M = g.width + "px " + g.height + "px"), _.push("background-position:" + M + ";");
|
|
2642
2652
|
}
|
|
2643
|
-
return d instanceof BMap.Size && (
|
|
2653
|
+
return d instanceof BMap.Size && (p instanceof BMap.Size ? (p.height > 0 && p.height < d.height && _.push("height:" + (d.height - p.height) + "px; padding-top:" + p.height + "px;"), p.width > 0 && p.width < d.width && _.push("width:" + (d.width - p.width) + "px; padding-left:" + p.width + "px;")) : (_.push("height:" + d.height + "px; line-height:" + d.height + "px;"), _.push("width:" + d.width + "px; text-align:center;"))), _.push("cursor:pointer; color:" + f + "; position:absolute; font-size:" + T + "px; font-family:Arial,sans-serif; font-weight:bold"), _.join("");
|
|
2644
2654
|
}, c.prototype._bind = function() {
|
|
2645
2655
|
if (!this._domElement)
|
|
2646
2656
|
return;
|
|
2647
|
-
var o = this,
|
|
2648
|
-
function
|
|
2649
|
-
var
|
|
2650
|
-
if (
|
|
2651
|
-
var
|
|
2652
|
-
|
|
2657
|
+
var o = this, h = this._map, d = e.lang.Event;
|
|
2658
|
+
function p(g, f) {
|
|
2659
|
+
var T = g.srcElement || g.target, _ = g.clientX || g.pageX, M = g.clientY || g.pageY;
|
|
2660
|
+
if (g && f && _ && M && T) {
|
|
2661
|
+
var l = e.dom.getPosition(h.getContainer());
|
|
2662
|
+
f.pixel = new BMap.Pixel(_ - l.left, M - l.top), f.point = h.pixelToPoint(f.pixel);
|
|
2653
2663
|
}
|
|
2654
|
-
return
|
|
2664
|
+
return f;
|
|
2655
2665
|
}
|
|
2656
|
-
e.event.on(this._domElement, "mouseover", function(
|
|
2657
|
-
o.dispatchEvent(
|
|
2658
|
-
}), e.event.on(this._domElement, "mouseout", function(
|
|
2659
|
-
o.dispatchEvent(
|
|
2660
|
-
}), e.event.on(this._domElement, "click", function(
|
|
2661
|
-
o.dispatchEvent(
|
|
2666
|
+
e.event.on(this._domElement, "mouseover", function(g) {
|
|
2667
|
+
o.dispatchEvent(p(g, new d("onmouseover")));
|
|
2668
|
+
}), e.event.on(this._domElement, "mouseout", function(g) {
|
|
2669
|
+
o.dispatchEvent(p(g, new d("onmouseout")));
|
|
2670
|
+
}), e.event.on(this._domElement, "click", function(g) {
|
|
2671
|
+
o.dispatchEvent(p(g, new d("onclick")));
|
|
2662
2672
|
});
|
|
2663
2673
|
}, c;
|
|
2664
2674
|
});
|
|
@@ -2977,7 +2987,7 @@ class Li extends Rr {
|
|
|
2977
2987
|
constructor(e, r) {
|
|
2978
2988
|
var n;
|
|
2979
2989
|
super(e);
|
|
2980
|
-
|
|
2990
|
+
m(this, "inner");
|
|
2981
2991
|
this.inner = new x(e.innerMap, {
|
|
2982
2992
|
// baidu的构造器中的markers, 会触发重绘, 会导致使用旧的calculator计算cluster
|
|
2983
2993
|
// markers: options.markers?.map(it => (it as BaiduMarker).innerOverlay),
|
|
@@ -2999,7 +3009,7 @@ class Bi extends Rr {
|
|
|
2999
3009
|
constructor(e, r) {
|
|
3000
3010
|
var n, a;
|
|
3001
3011
|
super(e);
|
|
3002
|
-
|
|
3012
|
+
m(this, "inner");
|
|
3003
3013
|
this.inner = new wi(
|
|
3004
3014
|
e.innerMap,
|
|
3005
3015
|
// google的构造器中的markers,不会触发重绘, 第一次绘制通过监听地图的'idle'事件触发, 可以直接设置
|
|
@@ -3031,7 +3041,7 @@ class $r {
|
|
|
3031
3041
|
class Ii extends $r {
|
|
3032
3042
|
constructor(e, r) {
|
|
3033
3043
|
super();
|
|
3034
|
-
|
|
3044
|
+
m(this, "inner");
|
|
3035
3045
|
this.map = e, this.inner = new google.maps.places.PlacesService(e.innerMap);
|
|
3036
3046
|
}
|
|
3037
3047
|
search(e, r) {
|
|
@@ -3062,7 +3072,7 @@ class Ii extends $r {
|
|
|
3062
3072
|
switch (c) {
|
|
3063
3073
|
case google.maps.places.PlacesServiceStatus.ZERO_RESULTS:
|
|
3064
3074
|
case google.maps.places.PlacesServiceStatus.OK: {
|
|
3065
|
-
const o = (a ?? []).map((
|
|
3075
|
+
const o = (a ?? []).map((h) => xr(h, this.map));
|
|
3066
3076
|
s(o);
|
|
3067
3077
|
break;
|
|
3068
3078
|
}
|
|
@@ -3077,8 +3087,8 @@ class Ii extends $r {
|
|
|
3077
3087
|
class Si extends $r {
|
|
3078
3088
|
constructor(e, r) {
|
|
3079
3089
|
super();
|
|
3080
|
-
|
|
3081
|
-
|
|
3090
|
+
m(this, "searchRequestMap", /* @__PURE__ */ new Map());
|
|
3091
|
+
m(this, "currentSearch");
|
|
3082
3092
|
this.map = e;
|
|
3083
3093
|
}
|
|
3084
3094
|
get inner() {
|
|
@@ -3110,21 +3120,21 @@ class Si extends $r {
|
|
|
3110
3120
|
const o = a.getStatus();
|
|
3111
3121
|
switch (o) {
|
|
3112
3122
|
case BMAP_STATUS_SUCCESS: {
|
|
3113
|
-
const
|
|
3123
|
+
const h = [];
|
|
3114
3124
|
for (let d = 0; d < c.getCurrentNumPois(); d++) {
|
|
3115
|
-
const
|
|
3116
|
-
|
|
3117
|
-
id:
|
|
3118
|
-
city:
|
|
3125
|
+
const p = c.getPoi(d);
|
|
3126
|
+
h.push({
|
|
3127
|
+
id: p.uid,
|
|
3128
|
+
city: p.city,
|
|
3119
3129
|
country: "",
|
|
3120
3130
|
// 百度地图只支持中国
|
|
3121
|
-
position: O.fromBaidu(
|
|
3122
|
-
province:
|
|
3123
|
-
title:
|
|
3124
|
-
address:
|
|
3131
|
+
position: O.fromBaidu(p.point, this.map.coordType),
|
|
3132
|
+
province: p.province,
|
|
3133
|
+
title: p.title,
|
|
3134
|
+
address: p.address
|
|
3125
3135
|
});
|
|
3126
3136
|
}
|
|
3127
|
-
s(
|
|
3137
|
+
s(h);
|
|
3128
3138
|
break;
|
|
3129
3139
|
}
|
|
3130
3140
|
case BMAP_STATUS_UNKNOWN_LOCATION:
|
|
@@ -3142,8 +3152,8 @@ class Si extends $r {
|
|
|
3142
3152
|
}
|
|
3143
3153
|
class zr {
|
|
3144
3154
|
constructor(t, e) {
|
|
3145
|
-
|
|
3146
|
-
|
|
3155
|
+
m(this, "onData");
|
|
3156
|
+
m(this, "onError");
|
|
3147
3157
|
this.map = t, this.input = e;
|
|
3148
3158
|
}
|
|
3149
3159
|
/**
|
|
@@ -3158,7 +3168,7 @@ class zr {
|
|
|
3158
3168
|
class ki extends zr {
|
|
3159
3169
|
constructor(e, r) {
|
|
3160
3170
|
super(e, r.input);
|
|
3161
|
-
|
|
3171
|
+
m(this, "searchBox");
|
|
3162
3172
|
this.searchBox = new google.maps.places.SearchBox(r.input), this.searchBox.bindTo("bounds", e.innerMap);
|
|
3163
3173
|
}
|
|
3164
3174
|
setSearchListener(e, r) {
|
|
@@ -3174,8 +3184,8 @@ class ki extends zr {
|
|
|
3174
3184
|
class Ai extends zr {
|
|
3175
3185
|
constructor(e, r) {
|
|
3176
3186
|
super(e, r.input);
|
|
3177
|
-
|
|
3178
|
-
|
|
3187
|
+
m(this, "autocomplete");
|
|
3188
|
+
m(this, "placesService");
|
|
3179
3189
|
this.autocomplete = e.createAutocomplete({ input: r.input, bindToMap: !0 }), this.placesService = e.createPlacesService({});
|
|
3180
3190
|
}
|
|
3181
3191
|
setSearchListener(e, r) {
|
|
@@ -3193,9 +3203,9 @@ class Ai extends zr {
|
|
|
3193
3203
|
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 || {});
|
|
3194
3204
|
class Nt {
|
|
3195
3205
|
constructor(t) {
|
|
3196
|
-
|
|
3206
|
+
m(this, "latestInfoWindow");
|
|
3197
3207
|
/** 使用{@link setEventTargetDelegate}初始化 */
|
|
3198
|
-
|
|
3208
|
+
m(this, "delegate", void 0);
|
|
3199
3209
|
this.element = t, process.env.NODE_ENV !== "production" && setTimeout(() => {
|
|
3200
3210
|
this.delegate || console.warn(`${this.constructor.name}继承了AbstractMap, 但未调用setEventTargetDelegate(delegate)`);
|
|
3201
3211
|
});
|
|
@@ -3333,59 +3343,59 @@ function Zr(i) {
|
|
|
3333
3343
|
}
|
|
3334
3344
|
var ce;
|
|
3335
3345
|
((i) => {
|
|
3336
|
-
function t(d,
|
|
3337
|
-
return d.reduce((
|
|
3346
|
+
function t(d, p) {
|
|
3347
|
+
return d.reduce((g, f) => (g[p(f)] = f, g), {});
|
|
3338
3348
|
}
|
|
3339
3349
|
i.fromArray = t;
|
|
3340
3350
|
function e(d) {
|
|
3341
|
-
return d.reduce((
|
|
3351
|
+
return d.reduce((p, g) => (p[g[0]] = g[1], p), {});
|
|
3342
3352
|
}
|
|
3343
3353
|
i.fromEntries = e;
|
|
3344
3354
|
function r(d) {
|
|
3345
|
-
return JSON.stringify(d, (
|
|
3355
|
+
return JSON.stringify(d, (p, g) => typeof g == "object" && Object.getPrototypeOf(g) !== Object.prototype ? g.toString !== Object.prototype.toString ? g.toString() : `[object ${Object.getPrototypeOf(g).constructor.name}]` : g);
|
|
3346
3356
|
}
|
|
3347
3357
|
i.toJsonSafely = r;
|
|
3348
3358
|
function s(d) {
|
|
3349
|
-
Zr(d) && Object.keys(d).forEach((
|
|
3350
|
-
d[
|
|
3359
|
+
Zr(d) && Object.keys(d).forEach((p) => {
|
|
3360
|
+
d[p] === void 0 ? delete d[p] : s(d[p]);
|
|
3351
3361
|
});
|
|
3352
3362
|
}
|
|
3353
3363
|
i.deleteUndefinedPropertyOnPlainObjectDeeply = s;
|
|
3354
|
-
function n(d,
|
|
3355
|
-
let
|
|
3356
|
-
return
|
|
3364
|
+
function n(d, p, g) {
|
|
3365
|
+
let f = d[p];
|
|
3366
|
+
return f === void 0 && (f = g(), d[p] = f), f;
|
|
3357
3367
|
}
|
|
3358
3368
|
i.putIfAbsent = n;
|
|
3359
|
-
function a(d, ...
|
|
3360
|
-
const
|
|
3361
|
-
for (const
|
|
3362
|
-
|
|
3363
|
-
return
|
|
3369
|
+
function a(d, ...p) {
|
|
3370
|
+
const g = ur(p), f = {};
|
|
3371
|
+
for (const T in d)
|
|
3372
|
+
g(T) || (f[T] = d[T]);
|
|
3373
|
+
return f;
|
|
3364
3374
|
}
|
|
3365
3375
|
i.omit = a;
|
|
3366
|
-
function c(d, ...
|
|
3367
|
-
const
|
|
3368
|
-
for (const
|
|
3369
|
-
|
|
3370
|
-
return
|
|
3376
|
+
function c(d, ...p) {
|
|
3377
|
+
const g = ur(p), f = {};
|
|
3378
|
+
for (const T in d)
|
|
3379
|
+
g(T) && (f[T] = d[T]);
|
|
3380
|
+
return f;
|
|
3371
3381
|
}
|
|
3372
3382
|
i.pick = c;
|
|
3373
|
-
function o(d,
|
|
3374
|
-
const
|
|
3375
|
-
let
|
|
3376
|
-
for (const
|
|
3377
|
-
if (
|
|
3383
|
+
function o(d, p) {
|
|
3384
|
+
const g = typeof p == "string" ? p.split(".") : p;
|
|
3385
|
+
let f = d;
|
|
3386
|
+
for (const T of g) {
|
|
3387
|
+
if (f == null)
|
|
3378
3388
|
return;
|
|
3379
|
-
|
|
3389
|
+
f = f[T];
|
|
3380
3390
|
}
|
|
3381
|
-
return
|
|
3391
|
+
return f;
|
|
3382
3392
|
}
|
|
3383
3393
|
i.get = o;
|
|
3384
|
-
function
|
|
3385
|
-
const
|
|
3386
|
-
|
|
3394
|
+
function h(d, p) {
|
|
3395
|
+
const g = typeof p == "string" ? p.split(".") : p, f = o(d, g.slice(0, -1)), T = g[g.length - 1];
|
|
3396
|
+
f != null && delete f[T];
|
|
3387
3397
|
}
|
|
3388
|
-
i.del =
|
|
3398
|
+
i.del = h;
|
|
3389
3399
|
})(ce || (ce = {}));
|
|
3390
3400
|
function ur(i) {
|
|
3391
3401
|
if (i.length <= 4)
|
|
@@ -3410,7 +3420,7 @@ var ee = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "
|
|
|
3410
3420
|
})(Ct || (Ct = {}));
|
|
3411
3421
|
class Wr {
|
|
3412
3422
|
constructor(t, e) {
|
|
3413
|
-
|
|
3423
|
+
m(this, "_delegate");
|
|
3414
3424
|
this.innerOverlay = t, this.coordType = e;
|
|
3415
3425
|
}
|
|
3416
3426
|
get delegate() {
|
|
@@ -3494,7 +3504,7 @@ const Ae = class Ae extends lt {
|
|
|
3494
3504
|
* - 透明度为0.7和0.8时, 在maintain的发布模式下, polyline的线条会不可见 (原因未知, 在tg-map中无法复现)
|
|
3495
3505
|
* 故统一加个0.001, 规避这些问题...
|
|
3496
3506
|
*/
|
|
3497
|
-
|
|
3507
|
+
m(Ae, "OPACITY_DELTA", 1e-3);
|
|
3498
3508
|
let j = Ae;
|
|
3499
3509
|
class ht extends Gt {
|
|
3500
3510
|
isEditable() {
|
|
@@ -3522,22 +3532,22 @@ class ht extends Gt {
|
|
|
3522
3532
|
class Zt extends j {
|
|
3523
3533
|
constructor() {
|
|
3524
3534
|
super(...arguments);
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3535
|
+
m(this, "prevCenter");
|
|
3536
|
+
m(this, "prevRadius");
|
|
3537
|
+
m(this, "isDoingSetCenter", !1);
|
|
3538
|
+
m(this, "isDoingSetRadius", !1);
|
|
3539
|
+
m(this, "eventHubDelegate");
|
|
3540
|
+
m(this, "onRadiusChanged", () => {
|
|
3531
3541
|
var r;
|
|
3532
3542
|
const e = this.innerOverlay.getRadius();
|
|
3533
3543
|
this.prevRadius !== e && (this.isDoingSetRadius || (r = this.eventHubDelegate) == null || r.notify({ type: "radius-changed", target: this }), this.prevRadius = e);
|
|
3534
3544
|
});
|
|
3535
|
-
|
|
3545
|
+
m(this, "onCenterChanged", () => {
|
|
3536
3546
|
var r;
|
|
3537
3547
|
const e = this.innerOverlay.getCenter();
|
|
3538
3548
|
this.prevCenter !== e && (this.isDoingSetCenter || (r = this.eventHubDelegate) == null || r.notify({ type: "center-changed", target: this }), this.prevCenter = e);
|
|
3539
3549
|
});
|
|
3540
|
-
|
|
3550
|
+
m(this, "resetEditableTimeoutId");
|
|
3541
3551
|
}
|
|
3542
3552
|
static create(e) {
|
|
3543
3553
|
const r = this.coordType, s = new BMap.Circle(e.center.toBaidu(r), e.radius, {
|
|
@@ -3634,20 +3644,20 @@ function Qi() {
|
|
|
3634
3644
|
constructor(r, s = i, n = le.ZERO, a, c = 654, o = "") {
|
|
3635
3645
|
super();
|
|
3636
3646
|
// 类表达式不能有私有成员, 故改成public
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3647
|
+
m(this, "container");
|
|
3648
|
+
m(this, "border");
|
|
3649
|
+
m(this, "inner");
|
|
3650
|
+
m(this, "map");
|
|
3651
|
+
m(this, "marker");
|
|
3642
3652
|
this.content = r, this.position = s, this.offset = n;
|
|
3643
|
-
const
|
|
3644
|
-
this.container = document.createElement("div"), this.container.className =
|
|
3645
|
-
const d = (
|
|
3646
|
-
this.container.onclick = d, this.container.ondblclick = d, this.container.oncontextmenu = d, this.container.onmousedown = d, this.container.onmousemove = d, this.container.onmousewheel = d, this.border = document.createElement("div"), this.border.className = `${
|
|
3647
|
-
const
|
|
3648
|
-
|
|
3653
|
+
const h = "baidu-info-box-container";
|
|
3654
|
+
this.container = document.createElement("div"), this.container.className = h, this.container.style.position = "absolute";
|
|
3655
|
+
const d = (g) => g.stopPropagation();
|
|
3656
|
+
this.container.onclick = d, this.container.ondblclick = d, this.container.oncontextmenu = d, this.container.onmousedown = d, this.container.onmousemove = d, this.container.onmousewheel = d, this.border = document.createElement("div"), this.border.className = `${h}__border ${o}`, this.inner = document.createElement("div"), this.inner.className = h + "__inner";
|
|
3657
|
+
const p = document.createElement("span");
|
|
3658
|
+
p.className = h + "__close", p.addEventListener("click", () => {
|
|
3649
3659
|
this.close(), this.dispatchEvent({ type: "onclickclose" });
|
|
3650
|
-
}), this.inner.appendChild(r), this.border.appendChild(this.inner), this.border.appendChild(
|
|
3660
|
+
}), this.inner.appendChild(r), this.border.appendChild(this.inner), this.border.appendChild(p), this.container.appendChild(this.border), a && this.setZIndex(a), this.setMaxWidth(c), this.onMarkerPositionChanged = this.onMarkerPositionChanged.bind(this);
|
|
3651
3661
|
}
|
|
3652
3662
|
initialize(r) {
|
|
3653
3663
|
return this.map = r, r.getPanes().floatPane.appendChild(this.container), this.container;
|
|
@@ -3739,8 +3749,8 @@ class Vt extends Ht {
|
|
|
3739
3749
|
class jt extends Ht {
|
|
3740
3750
|
constructor(e, r) {
|
|
3741
3751
|
super(new ye(e, r));
|
|
3742
|
-
|
|
3743
|
-
|
|
3752
|
+
m(this, "eventHub", new Tr());
|
|
3753
|
+
m(this, "isOpened", !1);
|
|
3744
3754
|
this.inner = e, this.map = r, e.addListener("closeclick", () => {
|
|
3745
3755
|
this.isOpened = !1, this.eventHub.hasListener("close") && this.eventHub.notify({ type: "close", target: this });
|
|
3746
3756
|
}), e.addListener("map_changed", () => {
|
|
@@ -3938,11 +3948,11 @@ var Ne = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overla
|
|
|
3938
3948
|
})(Ge || (Ge = {}));
|
|
3939
3949
|
class ts {
|
|
3940
3950
|
constructor(t, e) {
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3951
|
+
m(this, "baidu");
|
|
3952
|
+
m(this, "google");
|
|
3953
|
+
m(this, "projection");
|
|
3954
|
+
m(this, "element", void 0);
|
|
3955
|
+
m(this, "mapPane");
|
|
3946
3956
|
this.map = t, this.mapPane = e.mapPane;
|
|
3947
3957
|
}
|
|
3948
3958
|
create() {
|
|
@@ -4017,7 +4027,7 @@ function is() {
|
|
|
4017
4027
|
return class extends google.maps.OverlayView {
|
|
4018
4028
|
constructor(e, r, s, n = Ne.overlayMouseTarget, a) {
|
|
4019
4029
|
super();
|
|
4020
|
-
|
|
4030
|
+
m(this, "container");
|
|
4021
4031
|
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", () => {
|
|
4022
4032
|
google.maps.event.trigger(this, "click");
|
|
4023
4033
|
}), this.setElement(e);
|
|
@@ -4085,10 +4095,10 @@ var Te;
|
|
|
4085
4095
|
class Yt extends lt {
|
|
4086
4096
|
constructor(e, r, s, n) {
|
|
4087
4097
|
super(e, r, s);
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4098
|
+
m(this, "icon");
|
|
4099
|
+
m(this, "iconAnchor");
|
|
4100
|
+
m(this, "content", void 0);
|
|
4101
|
+
m(this, "contentObserver");
|
|
4092
4102
|
this.setContentInternal(n, !0);
|
|
4093
4103
|
}
|
|
4094
4104
|
static create(e) {
|
|
@@ -4154,24 +4164,24 @@ class Yt extends lt {
|
|
|
4154
4164
|
width: e.style.anchor.width + o.x,
|
|
4155
4165
|
height: e.style.anchor.height + o.y
|
|
4156
4166
|
}, process.env.NODE_ENV !== "production" && setTimeout(() => {
|
|
4157
|
-
var
|
|
4167
|
+
var p, g;
|
|
4158
4168
|
if (me(e.__icon__, `${e}必须是由'SymbolIcon.toBaidu()'创建的`), !e.anchor) {
|
|
4159
4169
|
console.log("BaiduLabelOverlay.attachIcon", "Bmap.Symbol.anchor尚未计算完成");
|
|
4160
4170
|
return;
|
|
4161
4171
|
}
|
|
4162
|
-
const
|
|
4163
|
-
if (o.x !==
|
|
4164
|
-
const
|
|
4165
|
-
(
|
|
4166
|
-
(
|
|
4172
|
+
const h = e.anchor.width - e.style.anchor.width, d = e.anchor.height - e.style.anchor.height;
|
|
4173
|
+
if (o.x !== h || o.y !== d) {
|
|
4174
|
+
const f = [
|
|
4175
|
+
(p = e.__icon__.anchor) == null ? void 0 : p.x,
|
|
4176
|
+
(g = e.__icon__.anchor) == null ? void 0 : g.y,
|
|
4167
4177
|
e.__icon__.rotation,
|
|
4168
4178
|
e.__icon__.scale,
|
|
4169
4179
|
e.__icon__.strokeWeight
|
|
4170
|
-
].map((
|
|
4180
|
+
].map((T) => T ?? "").join(",");
|
|
4171
4181
|
console.warn("BaiduLabelOverlay.attachIcon", e.__icon__, be.trimIndent(
|
|
4172
4182
|
`
|
|
4173
|
-
为了保证Label的位置正确, 请将SymbolIcon(${
|
|
4174
|
-
${JSON.stringify({ x:
|
|
4183
|
+
为了保证Label的位置正确, 请将SymbolIcon(${f})中baiduLabelOffset的值改写成:
|
|
4184
|
+
${JSON.stringify({ x: h, y: d })}
|
|
4175
4185
|
`
|
|
4176
4186
|
));
|
|
4177
4187
|
}
|
|
@@ -4373,10 +4383,10 @@ class Ze extends lt {
|
|
|
4373
4383
|
class Kt extends Gt {
|
|
4374
4384
|
constructor() {
|
|
4375
4385
|
super(...arguments);
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4386
|
+
m(this, "label");
|
|
4387
|
+
m(this, "labelPositionListener");
|
|
4388
|
+
m(this, "labelVisibleListener");
|
|
4389
|
+
m(this, "labelMapChangedListener");
|
|
4380
4390
|
}
|
|
4381
4391
|
static create(e) {
|
|
4382
4392
|
const r = this.coordType, s = e.icon, n = {
|
|
@@ -4449,10 +4459,10 @@ class Kt extends Gt {
|
|
|
4449
4459
|
class Xt extends j {
|
|
4450
4460
|
constructor() {
|
|
4451
4461
|
super(...arguments);
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4462
|
+
m(this, "eventHubDelegate");
|
|
4463
|
+
m(this, "prevPath");
|
|
4464
|
+
m(this, "isDoingSetPath", !1);
|
|
4465
|
+
m(this, "onLineUpdate", () => {
|
|
4456
4466
|
var r;
|
|
4457
4467
|
const e = this.innerOverlay.getPath();
|
|
4458
4468
|
e !== this.prevPath && (this.isDoingSetPath || (r = this.eventHubDelegate) == null || r.notify({
|
|
@@ -4485,7 +4495,7 @@ class Xt extends j {
|
|
|
4485
4495
|
class Jt extends Xt {
|
|
4486
4496
|
constructor() {
|
|
4487
4497
|
super(...arguments);
|
|
4488
|
-
|
|
4498
|
+
m(this, "pathEditedEventType", "path-edited");
|
|
4489
4499
|
}
|
|
4490
4500
|
static create(e) {
|
|
4491
4501
|
var n, a;
|
|
@@ -4528,8 +4538,8 @@ class Jt extends Xt {
|
|
|
4528
4538
|
class Qt extends ht {
|
|
4529
4539
|
constructor() {
|
|
4530
4540
|
super(...arguments);
|
|
4531
|
-
|
|
4532
|
-
|
|
4541
|
+
m(this, "pathChangedListeners");
|
|
4542
|
+
m(this, "eventHubDelegate");
|
|
4533
4543
|
}
|
|
4534
4544
|
static create(e) {
|
|
4535
4545
|
var n;
|
|
@@ -4577,7 +4587,7 @@ class Qt extends ht {
|
|
|
4577
4587
|
class er extends Xt {
|
|
4578
4588
|
constructor() {
|
|
4579
4589
|
super(...arguments);
|
|
4580
|
-
|
|
4590
|
+
m(this, "pathEditedEventType", "paths-edited");
|
|
4581
4591
|
}
|
|
4582
4592
|
static create(e) {
|
|
4583
4593
|
const r = this.coordType;
|
|
@@ -4603,8 +4613,8 @@ class er extends Xt {
|
|
|
4603
4613
|
class tr extends ht {
|
|
4604
4614
|
constructor() {
|
|
4605
4615
|
super(...arguments);
|
|
4606
|
-
|
|
4607
|
-
|
|
4616
|
+
m(this, "pathChangedListeners");
|
|
4617
|
+
m(this, "eventHubDelegate");
|
|
4608
4618
|
}
|
|
4609
4619
|
static create(e) {
|
|
4610
4620
|
const r = this.coordType, s = new google.maps.Polygon({
|
|
@@ -4657,9 +4667,9 @@ class tr extends ht {
|
|
|
4657
4667
|
class rr extends Xt {
|
|
4658
4668
|
constructor(e, r, s, n) {
|
|
4659
4669
|
super(e, r, s, n);
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4670
|
+
m(this, "pathEditedEventType", "bounds-changed");
|
|
4671
|
+
m(this, "isDoingUpdateRectangle", !1);
|
|
4672
|
+
m(this, "onBoundsChanged", ({ originalEvent: e }) => {
|
|
4663
4673
|
if (this.isDoingUpdateRectangle)
|
|
4664
4674
|
return;
|
|
4665
4675
|
const r = e.prevPath ?? [], s = e.path;
|
|
@@ -4670,9 +4680,9 @@ class rr extends Xt {
|
|
|
4670
4680
|
if (a > r.length) {
|
|
4671
4681
|
for (let o = 0; o < a; o++)
|
|
4672
4682
|
if (r[o] == null || !pr.equals(s[o], r[o])) {
|
|
4673
|
-
const
|
|
4674
|
-
let
|
|
4675
|
-
d.lat ===
|
|
4683
|
+
const h = s[(o - 2 + a) % a], d = s[(o - 1 + a) % a], p = s[o], g = s[(o + 1) % a], f = s[(o + 2) % a];
|
|
4684
|
+
let T;
|
|
4685
|
+
d.lat === g.lat ? T = new BMap.Point(d.lng, p.lat) : d.lng === g.lng ? T = new BMap.Point(p.lng, d.lat) : T = p, n = [h, f, T];
|
|
4676
4686
|
break;
|
|
4677
4687
|
}
|
|
4678
4688
|
} else if (a === r.length) {
|
|
@@ -4742,21 +4752,21 @@ class ss extends Nt {
|
|
|
4742
4752
|
constructor(e, r) {
|
|
4743
4753
|
var s;
|
|
4744
4754
|
super(e);
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4755
|
+
m(this, "buildInMapTypeId2BIMT");
|
|
4756
|
+
m(this, "baiduMapType2BIMT");
|
|
4757
|
+
m(this, "map");
|
|
4758
|
+
m(this, "createLabel", Yt.create);
|
|
4759
|
+
m(this, "createCircle", Zt.create);
|
|
4760
|
+
m(this, "createPolygon", er.create);
|
|
4761
|
+
m(this, "createPolyline", Jt.create);
|
|
4762
|
+
m(this, "createRectangle", rr.create);
|
|
4763
|
+
m(this, "createInfoWindow", Vt.create);
|
|
4764
|
+
m(this, "createInfoBox", Ft.create);
|
|
4765
|
+
m(this, "createMarker", Ze.create);
|
|
4766
|
+
m(this, "createMapTypeControl", It.create);
|
|
4767
|
+
m(this, "createZoomControl", Rt.create);
|
|
4768
|
+
m(this, "createStreetViewControl", At.create);
|
|
4769
|
+
m(this, "createScaleControl", St.create);
|
|
4760
4770
|
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, {
|
|
4761
4771
|
minZoom: r.minZoom && r.minZoom + de,
|
|
4762
4772
|
maxZoom: r.maxZoom && r.maxZoom + de,
|
|
@@ -4890,8 +4900,8 @@ class ss extends Nt {
|
|
|
4890
4900
|
const r = class extends BMap.Control {
|
|
4891
4901
|
constructor() {
|
|
4892
4902
|
super(...arguments);
|
|
4893
|
-
|
|
4894
|
-
|
|
4903
|
+
m(this, "defaultAnchor", U.getBaidu().toValue(e.position));
|
|
4904
|
+
m(this, "defaultOffset", new BMap.Size(0, 0));
|
|
4895
4905
|
}
|
|
4896
4906
|
initialize(n) {
|
|
4897
4907
|
const a = e.onCreateElement();
|
|
@@ -4927,21 +4937,21 @@ class ns extends Nt {
|
|
|
4927
4937
|
constructor(e, r) {
|
|
4928
4938
|
var n, a;
|
|
4929
4939
|
super(e);
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4940
|
+
m(this, "buildInMapTypeId2BIMT");
|
|
4941
|
+
m(this, "googleMapTypeId2BIMT");
|
|
4942
|
+
m(this, "map");
|
|
4943
|
+
m(this, "createLabel", qt.create);
|
|
4944
|
+
m(this, "createCircle", Wt.create);
|
|
4945
|
+
m(this, "createPolygon", tr.create);
|
|
4946
|
+
m(this, "createPolyline", Qt.create);
|
|
4947
|
+
m(this, "createRectangle", ir.create);
|
|
4948
|
+
m(this, "createInfoWindow", jt.create);
|
|
4949
|
+
m(this, "createInfoBox", Ut.create);
|
|
4950
|
+
m(this, "createMarker", Kt.create);
|
|
4951
|
+
m(this, "createMapTypeControl", Tt.create);
|
|
4952
|
+
m(this, "createZoomControl", $t.create);
|
|
4953
|
+
m(this, "createStreetViewControl", Dt.create);
|
|
4954
|
+
m(this, "createScaleControl", kt.create);
|
|
4945
4955
|
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);
|
|
4946
4956
|
const s = r.buildInMapTypeId && this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId);
|
|
4947
4957
|
this.map = new google.maps.Map(e, {
|
|
@@ -4974,8 +4984,8 @@ class ns extends Nt {
|
|
|
4974
4984
|
const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), c = this.innerMap.getZoom();
|
|
4975
4985
|
if (n == null || a == null || c == null)
|
|
4976
4986
|
return O.ZERO;
|
|
4977
|
-
const o = Math.pow(2, c),
|
|
4978
|
-
return O.fromGoogle(r.fromPointToLatLng(
|
|
4987
|
+
const o = Math.pow(2, c), h = new google.maps.Point(e.x / o + n.x, e.y / o + a.y);
|
|
4988
|
+
return O.fromGoogle(r.fromPointToLatLng(h) ?? he.LATLNG_ZERO, this.coordType);
|
|
4979
4989
|
}
|
|
4980
4990
|
fromLatLngToContainerPoint(e) {
|
|
4981
4991
|
const r = this.innerMap.getProjection(), s = this.innerMap.getBounds();
|
|
@@ -4984,8 +4994,8 @@ class ns extends Nt {
|
|
|
4984
4994
|
const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), c = this.innerMap.getZoom();
|
|
4985
4995
|
if (n == null || a == null || c == null)
|
|
4986
4996
|
return le.ZERO;
|
|
4987
|
-
const o = Math.pow(2, c),
|
|
4988
|
-
return
|
|
4997
|
+
const o = Math.pow(2, c), h = r.fromLatLngToPoint(e.toGoogle(this.coordType));
|
|
4998
|
+
return h == null ? le.ZERO : { x: (h.x - n.x) * o, y: (h.y - a.y) * o };
|
|
4989
4999
|
}
|
|
4990
5000
|
setDefaultCursor(e) {
|
|
4991
5001
|
this.innerMap.setOptions({ draggableCursor: e });
|
|
@@ -5121,8 +5131,8 @@ class ls extends Nt {
|
|
|
5121
5131
|
constructor(e, r) {
|
|
5122
5132
|
var a;
|
|
5123
5133
|
super(e);
|
|
5124
|
-
|
|
5125
|
-
|
|
5134
|
+
m(this, "map");
|
|
5135
|
+
m(this, "defaultLayers");
|
|
5126
5136
|
this.mapOptions = r;
|
|
5127
5137
|
const s = jr().here;
|
|
5128
5138
|
tt.includes(s.version) || B(`不支持${s.version}, HereMap当前只支持如下版本: ${tt}`);
|
|
@@ -5139,7 +5149,7 @@ class ls extends Nt {
|
|
|
5139
5149
|
return this.map;
|
|
5140
5150
|
}
|
|
5141
5151
|
get coordType() {
|
|
5142
|
-
return
|
|
5152
|
+
return D.wgs84;
|
|
5143
5153
|
}
|
|
5144
5154
|
getCenter() {
|
|
5145
5155
|
return O.fromHere(this.map.getCenter(), this.coordType);
|
|
@@ -5362,13 +5372,13 @@ function ms(i, t) {
|
|
|
5362
5372
|
validator: (e) => i.includes(e)
|
|
5363
5373
|
};
|
|
5364
5374
|
}
|
|
5365
|
-
function
|
|
5375
|
+
function N(i) {
|
|
5366
5376
|
return {
|
|
5367
5377
|
type: i,
|
|
5368
5378
|
required: !0
|
|
5369
5379
|
};
|
|
5370
5380
|
}
|
|
5371
|
-
function
|
|
5381
|
+
function b(i, t) {
|
|
5372
5382
|
return {
|
|
5373
5383
|
type: i,
|
|
5374
5384
|
default: t
|
|
@@ -5447,7 +5457,7 @@ function vs(i, t) {
|
|
|
5447
5457
|
function ne(i, t) {
|
|
5448
5458
|
return fr(() => vs(i, t));
|
|
5449
5459
|
}
|
|
5450
|
-
function
|
|
5460
|
+
function k() {
|
|
5451
5461
|
return Function;
|
|
5452
5462
|
}
|
|
5453
5463
|
const Cn = () => {
|
|
@@ -5494,45 +5504,45 @@ const Cn = () => {
|
|
|
5494
5504
|
* - :last-center.sync="center": 获取tg-map销毁时的最后的center的值, 使用这种方式可以做到type切换时保留中心点位置
|
|
5495
5505
|
* @see AbstractMapEventMap.center-changed
|
|
5496
5506
|
* */
|
|
5497
|
-
center:
|
|
5507
|
+
center: N(O),
|
|
5498
5508
|
/**
|
|
5499
5509
|
* 同步center的延时
|
|
5500
5510
|
* @default 300
|
|
5501
5511
|
* @see center
|
|
5502
5512
|
*/
|
|
5503
|
-
centerSyncDelay:
|
|
5513
|
+
centerSyncDelay: b(Number, 300),
|
|
5504
5514
|
/**
|
|
5505
5515
|
* 仅用来获取center的值, 需要设置center的值请使用`center`属性
|
|
5506
5516
|
* @see center
|
|
5507
5517
|
* */
|
|
5508
|
-
currentCenter:
|
|
5518
|
+
currentCenter: b(O),
|
|
5509
5519
|
/**
|
|
5510
5520
|
* 仅用于获取tg-map销毁时的最后的center的值
|
|
5511
5521
|
* @see center
|
|
5512
5522
|
*/
|
|
5513
|
-
lastCenter:
|
|
5514
|
-
zoom:
|
|
5523
|
+
lastCenter: b(O),
|
|
5524
|
+
zoom: N(Number),
|
|
5515
5525
|
/**
|
|
5516
5526
|
* 该属性不会响应式更新, 要让它立即生效, 请参考{@link file://./../views/map/InfoDemo.vue#L3}
|
|
5517
5527
|
* @see MapOptions.infoWindowMode
|
|
5518
5528
|
*/
|
|
5519
5529
|
infoWindowMode: ms(Xi),
|
|
5520
5530
|
gestureHandling: F(ee),
|
|
5521
|
-
minZoom:
|
|
5522
|
-
maxZoom:
|
|
5523
|
-
mapStyle:
|
|
5531
|
+
minZoom: b(Number),
|
|
5532
|
+
maxZoom: b(Number),
|
|
5533
|
+
mapStyle: b(Object),
|
|
5524
5534
|
mapTypeId: F(Mr),
|
|
5525
5535
|
/** 地图类型对象, 优先级比mapTypeId高 */
|
|
5526
|
-
mapType:
|
|
5527
|
-
hideLogo:
|
|
5528
|
-
onLoad:
|
|
5529
|
-
"onUpdate:center":
|
|
5530
|
-
"onUpdate:current-center":
|
|
5531
|
-
"onUpdate:last-center":
|
|
5532
|
-
"onUpdate:map-type":
|
|
5533
|
-
"onUpdate:map-type-id":
|
|
5534
|
-
"onUpdate:zoom":
|
|
5535
|
-
onError:
|
|
5536
|
+
mapType: b(Object),
|
|
5537
|
+
hideLogo: b(Boolean),
|
|
5538
|
+
onLoad: k(),
|
|
5539
|
+
"onUpdate:center": k(),
|
|
5540
|
+
"onUpdate:current-center": k(),
|
|
5541
|
+
"onUpdate:last-center": k(),
|
|
5542
|
+
"onUpdate:map-type": k(),
|
|
5543
|
+
"onUpdate:map-type-id": k(),
|
|
5544
|
+
"onUpdate:zoom": k(),
|
|
5545
|
+
onError: k()
|
|
5536
5546
|
},
|
|
5537
5547
|
/** 声明事件的类型信息, 详见: {@link splitAttrs} */
|
|
5538
5548
|
emits: void 0,
|
|
@@ -5711,7 +5721,7 @@ const Os = /* @__PURE__ */ oe(Ts, [["render", Ms]]), Cs = P({
|
|
|
5711
5721
|
name: "tg-custom-control",
|
|
5712
5722
|
mixins: [$],
|
|
5713
5723
|
props: {
|
|
5714
|
-
position: F(
|
|
5724
|
+
position: F(A, A.RIGHT_BOTTOM)
|
|
5715
5725
|
},
|
|
5716
5726
|
setup() {
|
|
5717
5727
|
return {
|
|
@@ -5747,9 +5757,9 @@ const xs = /* @__PURE__ */ oe(Cs, [["render", ws]]), Es = P({
|
|
|
5747
5757
|
name: "tg-map-type-control",
|
|
5748
5758
|
mixins: [$],
|
|
5749
5759
|
props: {
|
|
5750
|
-
position: F(
|
|
5760
|
+
position: F(A, A.TOP_LEFT),
|
|
5751
5761
|
type: F(Or),
|
|
5752
|
-
mapTypes:
|
|
5762
|
+
mapTypes: b(Array)
|
|
5753
5763
|
},
|
|
5754
5764
|
setup() {
|
|
5755
5765
|
return {
|
|
@@ -5780,7 +5790,7 @@ const xs = /* @__PURE__ */ oe(Cs, [["render", ws]]), Es = P({
|
|
|
5780
5790
|
name: "tg-scale-control",
|
|
5781
5791
|
mixins: [$],
|
|
5782
5792
|
props: {
|
|
5783
|
-
position: F(
|
|
5793
|
+
position: F(A, A.BOTTOM_RIGHT)
|
|
5784
5794
|
},
|
|
5785
5795
|
setup() {
|
|
5786
5796
|
return {
|
|
@@ -5835,7 +5845,7 @@ function nr() {
|
|
|
5835
5845
|
const Ls = P({
|
|
5836
5846
|
name: "tg-street-view-control",
|
|
5837
5847
|
props: {
|
|
5838
|
-
position: F(
|
|
5848
|
+
position: F(A, A.RIGHT_BOTTOM)
|
|
5839
5849
|
},
|
|
5840
5850
|
setup(i) {
|
|
5841
5851
|
let t = void 0;
|
|
@@ -5851,7 +5861,7 @@ const Ls = P({
|
|
|
5851
5861
|
}), Bs = P({
|
|
5852
5862
|
name: "tg-zoom-control",
|
|
5853
5863
|
props: {
|
|
5854
|
-
position: F(
|
|
5864
|
+
position: F(A, A.RIGHT_BOTTOM)
|
|
5855
5865
|
},
|
|
5856
5866
|
setup(i) {
|
|
5857
5867
|
let t = void 0;
|
|
@@ -5867,11 +5877,11 @@ const Ls = P({
|
|
|
5867
5877
|
}), Is = P({
|
|
5868
5878
|
name: "tg-heatmap",
|
|
5869
5879
|
props: {
|
|
5870
|
-
maxIntensity:
|
|
5871
|
-
gradient:
|
|
5872
|
-
opacity:
|
|
5873
|
-
radius:
|
|
5874
|
-
data:
|
|
5880
|
+
maxIntensity: b(Number),
|
|
5881
|
+
gradient: b(Object),
|
|
5882
|
+
opacity: b(Number),
|
|
5883
|
+
radius: b(Number),
|
|
5884
|
+
data: N(Array)
|
|
5875
5885
|
},
|
|
5876
5886
|
setup(i) {
|
|
5877
5887
|
const { map: t, onCreate: e, onDestroy: r } = nr();
|
|
@@ -5890,13 +5900,13 @@ const Ls = P({
|
|
|
5890
5900
|
mixins: [$],
|
|
5891
5901
|
// markers从this.$children中读取, 故需要省略(Omit)
|
|
5892
5902
|
props: {
|
|
5893
|
-
gridSize:
|
|
5894
|
-
maxZoom:
|
|
5895
|
-
minClusterSize:
|
|
5896
|
-
averageCenter:
|
|
5897
|
-
styles:
|
|
5898
|
-
stylesIndexCalculator:
|
|
5899
|
-
zIndex:
|
|
5903
|
+
gridSize: b(Number),
|
|
5904
|
+
maxZoom: b(Number),
|
|
5905
|
+
minClusterSize: b(Number),
|
|
5906
|
+
averageCenter: b(Boolean),
|
|
5907
|
+
styles: b(Array),
|
|
5908
|
+
stylesIndexCalculator: b(Function),
|
|
5909
|
+
zIndex: b(Number)
|
|
5900
5910
|
},
|
|
5901
5911
|
setup() {
|
|
5902
5912
|
return {
|
|
@@ -5979,18 +5989,18 @@ const Ur = /* @__PURE__ */ oe(Ss, [["render", ks]]), As = P({
|
|
|
5979
5989
|
mixins: [$],
|
|
5980
5990
|
inheritAttrs: !1,
|
|
5981
5991
|
props: {
|
|
5982
|
-
center:
|
|
5983
|
-
radius:
|
|
5984
|
-
clickable:
|
|
5985
|
-
editable:
|
|
5986
|
-
strokeColor:
|
|
5987
|
-
strokeOpacity:
|
|
5988
|
-
strokeWeight:
|
|
5989
|
-
visible:
|
|
5990
|
-
fillColor:
|
|
5991
|
-
fillOpacity:
|
|
5992
|
-
"onUpdate:center":
|
|
5993
|
-
"onUpdate:radius":
|
|
5992
|
+
center: N(O),
|
|
5993
|
+
radius: N(Number),
|
|
5994
|
+
clickable: b(Boolean),
|
|
5995
|
+
editable: b(Boolean),
|
|
5996
|
+
strokeColor: b(String),
|
|
5997
|
+
strokeOpacity: b(Number),
|
|
5998
|
+
strokeWeight: b(Number),
|
|
5999
|
+
visible: b(Boolean),
|
|
6000
|
+
fillColor: b(String),
|
|
6001
|
+
fillOpacity: b(Number),
|
|
6002
|
+
"onUpdate:center": k(),
|
|
6003
|
+
"onUpdate:radius": k()
|
|
5994
6004
|
},
|
|
5995
6005
|
emits: void 0,
|
|
5996
6006
|
setup(i, { attrs: t }) {
|
|
@@ -6074,7 +6084,7 @@ const $s = P({
|
|
|
6074
6084
|
mixins: [$],
|
|
6075
6085
|
props: {
|
|
6076
6086
|
mapPane: F(Ne, Ne.overlayMouseTarget),
|
|
6077
|
-
position:
|
|
6087
|
+
position: N(O)
|
|
6078
6088
|
},
|
|
6079
6089
|
setup() {
|
|
6080
6090
|
return {
|
|
@@ -6113,22 +6123,22 @@ const Ns = /* @__PURE__ */ oe($s, [["render", zs]]), Gs = P({
|
|
|
6113
6123
|
mixins: [$],
|
|
6114
6124
|
inheritAttrs: !1,
|
|
6115
6125
|
props: {
|
|
6116
|
-
position:
|
|
6117
|
-
title:
|
|
6118
|
-
icon:
|
|
6119
|
-
clickable:
|
|
6120
|
-
draggable:
|
|
6121
|
-
crossOnDrag:
|
|
6122
|
-
cursor:
|
|
6123
|
-
zIndex:
|
|
6124
|
-
visible:
|
|
6125
|
-
normalizePositionForBaidu:
|
|
6126
|
+
position: N(O),
|
|
6127
|
+
title: b(String),
|
|
6128
|
+
icon: b(Object),
|
|
6129
|
+
clickable: b(Boolean),
|
|
6130
|
+
draggable: b(Boolean),
|
|
6131
|
+
crossOnDrag: b(Boolean),
|
|
6132
|
+
cursor: b(String),
|
|
6133
|
+
zIndex: b(Number),
|
|
6134
|
+
visible: b(Boolean),
|
|
6135
|
+
normalizePositionForBaidu: b(Boolean),
|
|
6126
6136
|
/**
|
|
6127
6137
|
* 是否自动添加到TgMarkerClusterer中去
|
|
6128
6138
|
* @default true
|
|
6129
6139
|
*/
|
|
6130
|
-
autoAddToClusterer:
|
|
6131
|
-
"onUpdate:position":
|
|
6140
|
+
autoAddToClusterer: b(Boolean, !0),
|
|
6141
|
+
"onUpdate:position": k()
|
|
6132
6142
|
},
|
|
6133
6143
|
emits: void 0,
|
|
6134
6144
|
setup(i, { attrs: t }) {
|
|
@@ -6222,13 +6232,13 @@ const dt = /* @__PURE__ */ oe(Gs, [["render", Zs]]), Ws = P({
|
|
|
6222
6232
|
mixins: [$],
|
|
6223
6233
|
inheritAttrs: !1,
|
|
6224
6234
|
props: {
|
|
6225
|
-
show:
|
|
6226
|
-
position:
|
|
6227
|
-
offset:
|
|
6228
|
-
maxWidth:
|
|
6229
|
-
borderClass:
|
|
6230
|
-
zIndex:
|
|
6231
|
-
"onUpdate:show":
|
|
6235
|
+
show: N(Boolean),
|
|
6236
|
+
position: b(O),
|
|
6237
|
+
offset: b(Object),
|
|
6238
|
+
maxWidth: b(Number),
|
|
6239
|
+
borderClass: b(String),
|
|
6240
|
+
zIndex: b(Number),
|
|
6241
|
+
"onUpdate:show": k()
|
|
6232
6242
|
},
|
|
6233
6243
|
emits: void 0,
|
|
6234
6244
|
setup(i, { attrs: t }) {
|
|
@@ -6302,12 +6312,12 @@ const Vs = /* @__PURE__ */ oe(Ws, [["render", Hs]]), js = P({
|
|
|
6302
6312
|
mixins: [$],
|
|
6303
6313
|
inheritAttrs: !1,
|
|
6304
6314
|
props: {
|
|
6305
|
-
show:
|
|
6306
|
-
position:
|
|
6307
|
-
maxWidth:
|
|
6308
|
-
offset:
|
|
6309
|
-
disableAutoPan:
|
|
6310
|
-
"onUpdate:show":
|
|
6315
|
+
show: N(Boolean),
|
|
6316
|
+
position: b(O),
|
|
6317
|
+
maxWidth: b(Number),
|
|
6318
|
+
offset: b(Object),
|
|
6319
|
+
disableAutoPan: b(Boolean),
|
|
6320
|
+
"onUpdate:show": k()
|
|
6311
6321
|
},
|
|
6312
6322
|
emits: void 0,
|
|
6313
6323
|
setup(i, { attrs: t }) {
|
|
@@ -6375,9 +6385,9 @@ const Us = /* @__PURE__ */ oe(js, [["render", Fs]]), Ys = P({
|
|
|
6375
6385
|
mixins: [$],
|
|
6376
6386
|
inheritAttrs: !1,
|
|
6377
6387
|
props: {
|
|
6378
|
-
position:
|
|
6379
|
-
offset:
|
|
6380
|
-
zIndex:
|
|
6388
|
+
position: b(O),
|
|
6389
|
+
offset: b(Object),
|
|
6390
|
+
zIndex: b(Number),
|
|
6381
6391
|
mapPane: F(Ne)
|
|
6382
6392
|
},
|
|
6383
6393
|
emits: void 0,
|
|
@@ -6444,16 +6454,16 @@ const Ks = /* @__PURE__ */ oe(Ys, [["render", qs]]), Xs = P({
|
|
|
6444
6454
|
mixins: [$],
|
|
6445
6455
|
inheritAttrs: !1,
|
|
6446
6456
|
props: {
|
|
6447
|
-
paths:
|
|
6448
|
-
clickable:
|
|
6449
|
-
editable:
|
|
6450
|
-
strokeColor:
|
|
6451
|
-
strokeOpacity:
|
|
6452
|
-
strokeWeight:
|
|
6453
|
-
visible:
|
|
6454
|
-
fillColor:
|
|
6455
|
-
fillOpacity:
|
|
6456
|
-
"onUpdate:paths":
|
|
6457
|
+
paths: N(Array),
|
|
6458
|
+
clickable: b(Boolean),
|
|
6459
|
+
editable: b(Boolean),
|
|
6460
|
+
strokeColor: b(String),
|
|
6461
|
+
strokeOpacity: b(Number),
|
|
6462
|
+
strokeWeight: b(Number),
|
|
6463
|
+
visible: b(Boolean),
|
|
6464
|
+
fillColor: b(String),
|
|
6465
|
+
fillOpacity: b(Number),
|
|
6466
|
+
"onUpdate:paths": k()
|
|
6457
6467
|
},
|
|
6458
6468
|
emits: void 0,
|
|
6459
6469
|
setup(i, { attrs: t }) {
|
|
@@ -6513,15 +6523,15 @@ const Ks = /* @__PURE__ */ oe(Ys, [["render", qs]]), Xs = P({
|
|
|
6513
6523
|
mixins: [$],
|
|
6514
6524
|
inheritAttrs: !1,
|
|
6515
6525
|
props: {
|
|
6516
|
-
path:
|
|
6517
|
-
icons:
|
|
6518
|
-
clickable:
|
|
6519
|
-
editable:
|
|
6520
|
-
strokeColor:
|
|
6521
|
-
strokeOpacity:
|
|
6522
|
-
strokeWeight:
|
|
6523
|
-
visible:
|
|
6524
|
-
"onUpdate:path":
|
|
6526
|
+
path: N(Array),
|
|
6527
|
+
icons: b(Array),
|
|
6528
|
+
clickable: b(Boolean),
|
|
6529
|
+
editable: b(Boolean),
|
|
6530
|
+
strokeColor: b(String),
|
|
6531
|
+
strokeOpacity: b(Number),
|
|
6532
|
+
strokeWeight: b(Number),
|
|
6533
|
+
visible: b(Boolean),
|
|
6534
|
+
"onUpdate:path": k()
|
|
6525
6535
|
},
|
|
6526
6536
|
emits: void 0,
|
|
6527
6537
|
setup(i, { attrs: t }) {
|
|
@@ -6581,16 +6591,16 @@ const Ks = /* @__PURE__ */ oe(Ys, [["render", qs]]), Xs = P({
|
|
|
6581
6591
|
mixins: [$],
|
|
6582
6592
|
inheritAttrs: !1,
|
|
6583
6593
|
props: {
|
|
6584
|
-
bounds:
|
|
6585
|
-
clickable:
|
|
6586
|
-
editable:
|
|
6587
|
-
strokeColor:
|
|
6588
|
-
strokeOpacity:
|
|
6589
|
-
strokeWeight:
|
|
6590
|
-
visible:
|
|
6591
|
-
fillColor:
|
|
6592
|
-
fillOpacity:
|
|
6593
|
-
"onUpdate:bounds":
|
|
6594
|
+
bounds: N(Object),
|
|
6595
|
+
clickable: b(Boolean),
|
|
6596
|
+
editable: b(Boolean),
|
|
6597
|
+
strokeColor: b(String),
|
|
6598
|
+
strokeOpacity: b(Number),
|
|
6599
|
+
strokeWeight: b(Number),
|
|
6600
|
+
visible: b(Boolean),
|
|
6601
|
+
fillColor: b(String),
|
|
6602
|
+
fillOpacity: b(Number),
|
|
6603
|
+
"onUpdate:bounds": k()
|
|
6594
6604
|
},
|
|
6595
6605
|
emits: void 0,
|
|
6596
6606
|
setup(i, { attrs: t }) {
|
|
@@ -6700,24 +6710,24 @@ function rn(i, t) {
|
|
|
6700
6710
|
return 0;
|
|
6701
6711
|
const e = Ie((i.lat + t.lat) / 2), r = Ie((i.lat - t.lat) / 2), s = Ie((i.lng - t.lng) / 2);
|
|
6702
6712
|
let n = Math.sin(r), a = Math.sin(s), c = Math.sin(e);
|
|
6703
|
-
const o = tn,
|
|
6713
|
+
const o = tn, h = 1 / 298.257;
|
|
6704
6714
|
n = n * n, a = a * a, c = c * c;
|
|
6705
|
-
const d = n * (1 - a) + (1 - c) * a,
|
|
6706
|
-
return
|
|
6715
|
+
const d = n * (1 - a) + (1 - c) * a, p = (1 - n) * (1 - a) + c * a, g = Math.atan(Math.sqrt(d / p)), f = Math.sqrt(d * p) / g, T = 2 * g * o, _ = (3 * f - 1) / 2 / p, M = (3 * f + 1) / 2 / d;
|
|
6716
|
+
return T * (1 + h * (_ * c * (1 - n) - M * (1 - c) * n));
|
|
6707
6717
|
}
|
|
6708
6718
|
function sn(i, t, e) {
|
|
6709
|
-
const s = 63567523142e-4, n = 1 / 298.257223563, a = Ie(t), c = Math.sin(a), o = Math.cos(a),
|
|
6710
|
-
let
|
|
6719
|
+
const s = 63567523142e-4, n = 1 / 298.257223563, a = Ie(t), c = Math.sin(a), o = Math.cos(a), h = (1 - n) * Math.tan(Ie(i.lat)), d = 1 / Math.sqrt(1 + h * h), p = h * d, g = Math.atan2(h, o), f = d * c, T = 1 - f * f, _ = T * (6378137 * 6378137 - s * s) / (s * s), M = 1 + _ / 16384 * (4096 + _ * (-768 + _ * (320 - 175 * _))), l = _ / 1024 * (256 + _ * (-128 + _ * (74 - 47 * _)));
|
|
6720
|
+
let u = 0, v = 0, y = 0, C = e / (s * M), w = 2 * Math.PI;
|
|
6711
6721
|
for (; Math.abs(C - w) > 1e-12; ) {
|
|
6712
|
-
|
|
6713
|
-
const G =
|
|
6714
|
-
w = C, C = e / (s *
|
|
6722
|
+
u = Math.cos(2 * g + C), v = Math.sin(C), y = Math.cos(C);
|
|
6723
|
+
const G = l * v * (u + l / 4 * (y * (-1 + 2 * u * u) - l / 6 * u * (-3 + 4 * v * v) * (-3 + 4 * u * u)));
|
|
6724
|
+
w = C, C = e / (s * M) + G;
|
|
6715
6725
|
}
|
|
6716
|
-
const E =
|
|
6717
|
-
|
|
6718
|
-
(1 - n) * Math.sqrt(
|
|
6719
|
-
),
|
|
6720
|
-
return { lng: i.lng + mr(J), lat: mr(
|
|
6726
|
+
const E = p * v - d * y * o, S = Math.atan2(
|
|
6727
|
+
p * y + d * v * o,
|
|
6728
|
+
(1 - n) * Math.sqrt(f * f + E * E)
|
|
6729
|
+
), z = Math.atan2(v * c, d * y - p * v * o), L = n / 16 * T * (4 + n * (4 - 3 * T)), J = z - (1 - L) * n * f * (C + L * v * (u + L * y * (-1 + 2 * u * u)));
|
|
6730
|
+
return { lng: i.lng + mr(J), lat: mr(S) };
|
|
6721
6731
|
}
|
|
6722
6732
|
const xn = {
|
|
6723
6733
|
getDistance: rn,
|
|
@@ -6765,9 +6775,9 @@ export {
|
|
|
6765
6775
|
W as BuildInMapType,
|
|
6766
6776
|
Mr as BuildInMapTypeId,
|
|
6767
6777
|
Le as CachedValue,
|
|
6768
|
-
|
|
6778
|
+
A as ControlPosition,
|
|
6769
6779
|
U as ControlPositionConverter,
|
|
6770
|
-
|
|
6780
|
+
D as CoordType,
|
|
6771
6781
|
pi as CustomControl,
|
|
6772
6782
|
ts as ElementOverlay,
|
|
6773
6783
|
gi as EmptyControl,
|
|
@@ -6858,7 +6868,7 @@ export {
|
|
|
6858
6868
|
Tn as createPropertyObjectTyped,
|
|
6859
6869
|
pn as debug,
|
|
6860
6870
|
En as default,
|
|
6861
|
-
|
|
6871
|
+
k as eventProp,
|
|
6862
6872
|
On as extractVNodeFromSlotsByComponent,
|
|
6863
6873
|
Et as findAncestorComponentByType,
|
|
6864
6874
|
Mn as findByComponentType,
|
|
@@ -6871,9 +6881,9 @@ export {
|
|
|
6871
6881
|
ln as lateinit,
|
|
6872
6882
|
ds as loadCachedMap,
|
|
6873
6883
|
Re as noop,
|
|
6874
|
-
|
|
6884
|
+
b as optionalProp,
|
|
6875
6885
|
es as path,
|
|
6876
|
-
|
|
6886
|
+
N as requiredProp,
|
|
6877
6887
|
cn as safeAs,
|
|
6878
6888
|
yr as safeAsComponent,
|
|
6879
6889
|
as as setTgMapConfig,
|