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