tg-map-vue3 3.7.11 → 3.7.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tg-map.js +111 -111
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +2 -2
- package/dist/tg-map.umd.cjs.map +1 -1
- package/package.json +3 -4
package/dist/tg-map.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.baidu-info-box-container{transform:translateY(-11px);font-size:13px;font-weight:300;width:100vw}.baidu-info-box-container__border{position:absolute;padding:12px;background-color:#fff;box-shadow:0 2px 7px 1px #0000004d;border-radius:8px;transform:translate(-50%,-100%)}.baidu-info-box-container__inner{overflow:auto}.baidu-info-box-container__close{position:absolute;right:-6px;top:-6px;width:14px;height:14px;margin:8px;opacity:.6;cursor:pointer}.baidu-info-box-container__close:hover{opacity:1}.baidu-info-box-container:after{position:absolute;background-color:#fff;content:"";width:15px;height:15px;left:0px;top:0px;box-shadow:-2px 2px 2px #b2b2b266;transform:translate(-50%,-50%) rotate(-45deg)}.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)}})();
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.baidu-info-box-container{transform:translateY(-11px);font-size:13px;font-weight:300;width:100vw}.baidu-info-box-container__border{position:absolute;padding:12px;background-color:#fff;box-shadow:0 2px 7px 1px #0000004d;border-radius:8px;transform:translate(-50%,-100%)}.baidu-info-box-container__inner{overflow:auto}.baidu-info-box-container__close{position:absolute;right:-6px;top:-6px;width:14px;height:14px;margin:8px;opacity:.6;cursor:pointer;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:0px;top:0px;box-shadow:-2px 2px 2px #b2b2b266;transform:translate(-50%,-50%) rotate(-45deg)}.element-overlay{position:absolute}.tg-map{height:100%;position:relative}.tg-map__map{width:100%;height:100%}.tg-map__map--hide-logo-google .gm-style a[target=_blank]:has(> div > img){display:none!important}.tg-map__map--hide-logo-google .gm-style>div:last-child>div:last-child>div{display:none}.tg-map__map--hide-logo-baidu div.anchorBL>a[target=_blank]>img{display:none}.tg-map__map--hide-logo-baidu div.BMap_cpyCtrl{display:none}.tg-map-widget{position:absolute}.tg-map>.tg-custom-control{display:none}.tg-map .tg-element-overlay{display:none}.tg-map__map .tg-element-overlay{display:block}.tg-map .tg-info-box{display:none}.tg-map__map .tg-info-box{display:block}.tg-map .tg-label{display:none}.tg-map__map .tg-label{display:block}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
2
|
var Yr = Object.defineProperty;
|
|
3
3
|
var qr = (i, t, e) => t in i ? Yr(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
4
4
|
var u = (i, t, e) => (qr(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
@@ -79,8 +79,8 @@ var vr = { exports: {} };
|
|
|
79
79
|
O = 1 - s * O * O;
|
|
80
80
|
var w = Math.sqrt(O);
|
|
81
81
|
f = f * 180 / (r * (1 - s) / (O * w) * e), M = M * 180 / (r / w * Math.cos(T) * e);
|
|
82
|
-
var E = h + f,
|
|
83
|
-
return [
|
|
82
|
+
var E = h + f, R = p + M;
|
|
83
|
+
return [R, E];
|
|
84
84
|
}
|
|
85
85
|
function b(p, h) {
|
|
86
86
|
var f = -100 + 2 * p + 3 * h + 0.2 * h * h + 0.1 * p * h + 0.2 * Math.sqrt(Math.abs(p));
|
|
@@ -369,8 +369,8 @@ const de = class {
|
|
|
369
369
|
return [this.sw.toBaidu(t), this.ne.toBaidu(t)];
|
|
370
370
|
}
|
|
371
371
|
};
|
|
372
|
-
let
|
|
373
|
-
u(
|
|
372
|
+
let V = de;
|
|
373
|
+
u(V, "EMPTY", new de(C.ZERO, C.ZERO));
|
|
374
374
|
((i) => {
|
|
375
375
|
class t {
|
|
376
376
|
constructor(r) {
|
|
@@ -398,7 +398,7 @@ u(F, "EMPTY", new de(C.ZERO, C.ZERO));
|
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
i.Builder = t;
|
|
401
|
-
})(
|
|
401
|
+
})(V || (V = {}));
|
|
402
402
|
var te;
|
|
403
403
|
((i) => {
|
|
404
404
|
function t(r, s) {
|
|
@@ -927,7 +927,7 @@ class mi {
|
|
|
927
927
|
return this.googleCache.get();
|
|
928
928
|
}
|
|
929
929
|
}
|
|
930
|
-
var
|
|
930
|
+
var F;
|
|
931
931
|
((i) => {
|
|
932
932
|
i.NORMAL = new j("normal", () => BMAP_NORMAL_MAP, () => google.maps.MapTypeId.ROADMAP, A.gcj02), i.SATELLITE = new j("satellite", () => BMAP_SATELLITE_MAP, () => google.maps.MapTypeId.SATELLITE, A.wgs84), i.HYBRID = new j("hybrid", () => BMAP_HYBRID_MAP, () => google.maps.MapTypeId.HYBRID, A.gcj02), i.TERRAIN = new j("terrain", () => (
|
|
933
933
|
/* 三维 */
|
|
@@ -936,9 +936,9 @@ var V;
|
|
|
936
936
|
/* 地形 */
|
|
937
937
|
google.maps.MapTypeId.TERRAIN
|
|
938
938
|
), A.wgs84), i.BUILD_IN_MAP_TYPES = new ui([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
|
|
939
|
-
})(
|
|
939
|
+
})(F || (F = {}));
|
|
940
940
|
var Cr = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(Cr || {});
|
|
941
|
-
const Or = [
|
|
941
|
+
const Or = [F.NORMAL, F.SATELLITE, F.HYBRID];
|
|
942
942
|
class Bt extends Pt {
|
|
943
943
|
static create(t) {
|
|
944
944
|
const e = t.mapTypes ?? Or, r = {
|
|
@@ -973,8 +973,8 @@ const ge = class extends ht {
|
|
|
973
973
|
});
|
|
974
974
|
}
|
|
975
975
|
};
|
|
976
|
-
let
|
|
977
|
-
u(
|
|
976
|
+
let Ve = ge;
|
|
977
|
+
u(Ve, "type2google");
|
|
978
978
|
class It extends Pt {
|
|
979
979
|
static create(t) {
|
|
980
980
|
const e = new BMap.ScaleControl({
|
|
@@ -1004,19 +1004,19 @@ class At extends ht {
|
|
|
1004
1004
|
super("streetView", t);
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
|
-
class
|
|
1007
|
+
class Rt extends Pt {
|
|
1008
1008
|
static create(t) {
|
|
1009
1009
|
const e = new BMap.NavigationControl({
|
|
1010
1010
|
type: BMAP_NAVIGATION_CONTROL_ZOOM,
|
|
1011
1011
|
// enableGeolocation: true,
|
|
1012
1012
|
anchor: t.position && Y.getBaidu().toValue(t.position)
|
|
1013
1013
|
});
|
|
1014
|
-
return new
|
|
1014
|
+
return new Rt(e, t.position);
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
|
-
class
|
|
1017
|
+
class Dt extends ht {
|
|
1018
1018
|
static create(t) {
|
|
1019
|
-
return new
|
|
1019
|
+
return new Dt(t.position);
|
|
1020
1020
|
}
|
|
1021
1021
|
constructor(t = k.RIGHT_BOTTOM) {
|
|
1022
1022
|
super("zoom", t);
|
|
@@ -1182,12 +1182,12 @@ var Lr = { exports: {} };
|
|
|
1182
1182
|
return v.prototype = {
|
|
1183
1183
|
// when forceRender = false -> called from setData, omits renderall event
|
|
1184
1184
|
_organiseData: function(y, p) {
|
|
1185
|
-
var h = y[this._xField], f = y[this._yField], M = this._radi, T = this._data, O = this._max, w = this._min, E = y[this._valueField] || 1,
|
|
1186
|
-
return T[h] || (T[h] = [], M[h] = []), T[h][f] ? T[h][f] += E : (T[h][f] = E, M[h][f] =
|
|
1185
|
+
var h = y[this._xField], f = y[this._yField], M = this._radi, T = this._data, O = this._max, w = this._min, E = y[this._valueField] || 1, R = y.radius || this._cfgRadius || b;
|
|
1186
|
+
return T[h] || (T[h] = [], M[h] = []), T[h][f] ? T[h][f] += E : (T[h][f] = E, M[h][f] = R), T[h][f] > O ? (p ? this.setDataMax(T[h][f]) : this._max = T[h][f], !1) : {
|
|
1187
1187
|
x: h,
|
|
1188
1188
|
y: f,
|
|
1189
1189
|
value: E,
|
|
1190
|
-
radius:
|
|
1190
|
+
radius: R,
|
|
1191
1191
|
min: w,
|
|
1192
1192
|
max: O
|
|
1193
1193
|
};
|
|
@@ -1314,8 +1314,8 @@ var Lr = { exports: {} };
|
|
|
1314
1314
|
}
|
|
1315
1315
|
return M;
|
|
1316
1316
|
}, y = function(w) {
|
|
1317
|
-
for (var f = [], M = w.min, T = w.max, O = w.radi, w = w.data, E = Object.keys(w),
|
|
1318
|
-
for (var G = E[
|
|
1317
|
+
for (var f = [], M = w.min, T = w.max, O = w.radi, w = w.data, E = Object.keys(w), R = E.length; R--; )
|
|
1318
|
+
for (var G = E[R], P = Object.keys(w[G]), J = P.length; J--; ) {
|
|
1319
1319
|
var I = P[J], Z = w[G][I], Q = O[G][I];
|
|
1320
1320
|
f.push({
|
|
1321
1321
|
x: G,
|
|
@@ -1360,18 +1360,18 @@ var Lr = { exports: {} };
|
|
|
1360
1360
|
},
|
|
1361
1361
|
_drawAlpha: function(T) {
|
|
1362
1362
|
for (var f = this._min = T.min, M = this._max = T.max, T = T.data || [], O = T.length, w = 1 - this._blur; O--; ) {
|
|
1363
|
-
var E = T[O],
|
|
1363
|
+
var E = T[O], R = E.x, G = E.y, P = E.radius, J = Math.min(E.value, M), I = R - P, Z = G - P, Q = this.shadowCtx, W;
|
|
1364
1364
|
this._templates[P] ? W = this._templates[P] : this._templates[P] = W = b(P, w), Q.globalAlpha = (J - f) / (M - f), Q.drawImage(W, I, Z), I < this._renderBoundaries[0] && (this._renderBoundaries[0] = I), Z < this._renderBoundaries[1] && (this._renderBoundaries[1] = Z), I + 2 * P > this._renderBoundaries[2] && (this._renderBoundaries[2] = I + 2 * P), Z + 2 * P > this._renderBoundaries[3] && (this._renderBoundaries[3] = Z + 2 * P);
|
|
1365
1365
|
}
|
|
1366
1366
|
},
|
|
1367
1367
|
_colorize: function() {
|
|
1368
|
-
var h = this._renderBoundaries[0], f = this._renderBoundaries[1], M = this._renderBoundaries[2] - h, T = this._renderBoundaries[3] - f, O = this._width, w = this._height, E = this._opacity,
|
|
1368
|
+
var h = this._renderBoundaries[0], f = this._renderBoundaries[1], M = this._renderBoundaries[2] - h, T = this._renderBoundaries[3] - f, O = this._width, w = this._height, E = this._opacity, R = this._maxOpacity, G = this._minOpacity, P = this._useGradientOpacity;
|
|
1369
1369
|
h < 0 && (h = 0), f < 0 && (f = 0), h + M > O && (M = O - h), f + T > w && (T = w - f);
|
|
1370
1370
|
for (var J = this.shadowCtx.getImageData(h, f, M, T), I = J.data, Z = I.length, Q = this._palette, W = 3; W < Z; W += 4) {
|
|
1371
1371
|
var We = I[W], Oe = We * 4;
|
|
1372
1372
|
if (Oe) {
|
|
1373
1373
|
var we;
|
|
1374
|
-
E > 0 ? we = E : We <
|
|
1374
|
+
E > 0 ? we = E : We < R ? We < G ? we = G : we = We : we = R, I[W - 3] = Q[Oe], I[W - 2] = Q[Oe + 1], I[W - 1] = Q[Oe + 2], I[W] = P ? Q[Oe + 3] : we;
|
|
1375
1375
|
}
|
|
1376
1376
|
}
|
|
1377
1377
|
this.ctx.putImageData(J, h, f), this._renderBoundaries = [1e3, 1e3, 0, 0];
|
|
@@ -1698,8 +1698,8 @@ const it = class extends Br {
|
|
|
1698
1698
|
});
|
|
1699
1699
|
}
|
|
1700
1700
|
};
|
|
1701
|
-
let
|
|
1702
|
-
u(
|
|
1701
|
+
let Fe = it;
|
|
1702
|
+
u(Fe, "BASE_URL", "https://www.google.com/maps/");
|
|
1703
1703
|
const Se = class extends Br {
|
|
1704
1704
|
/**
|
|
1705
1705
|
* 导航
|
|
@@ -2679,7 +2679,7 @@ var kr = function(i, t, e) {
|
|
|
2679
2679
|
return t && (i = Math.max(i, t)), e && (i = Math.min(i, e)), i;
|
|
2680
2680
|
}, Ar = function(i) {
|
|
2681
2681
|
return Object.prototype.toString.call(i) === "[object Array]";
|
|
2682
|
-
},
|
|
2682
|
+
}, Rr = function(i, t) {
|
|
2683
2683
|
var e = -1;
|
|
2684
2684
|
if (Ar(t)) {
|
|
2685
2685
|
if (t.indexOf)
|
|
@@ -2720,7 +2720,7 @@ x.prototype.addMarkers = function(i) {
|
|
|
2720
2720
|
}
|
|
2721
2721
|
};
|
|
2722
2722
|
x.prototype._pushMarkerTo = function(i) {
|
|
2723
|
-
var t =
|
|
2723
|
+
var t = Rr(i, this._markers);
|
|
2724
2724
|
t === -1 && (i.isInCluster = !1, this._markers.push(i));
|
|
2725
2725
|
};
|
|
2726
2726
|
x.prototype.addMarker = function(i) {
|
|
@@ -2769,7 +2769,7 @@ x.prototype._removeMarkersFromMap = function() {
|
|
|
2769
2769
|
}
|
|
2770
2770
|
};
|
|
2771
2771
|
x.prototype._removeMarker = function(i) {
|
|
2772
|
-
var t =
|
|
2772
|
+
var t = Rr(i, this._markers);
|
|
2773
2773
|
return t === -1 ? !1 : (this._map.removeOverlay(i), this._markers.splice(t, 1), !0);
|
|
2774
2774
|
};
|
|
2775
2775
|
x.prototype.removeMarker = function(i) {
|
|
@@ -2949,7 +2949,7 @@ var Xe;
|
|
|
2949
2949
|
}
|
|
2950
2950
|
i.toGoogle = e;
|
|
2951
2951
|
})(Xe || (Xe = {}));
|
|
2952
|
-
class
|
|
2952
|
+
class Dr {
|
|
2953
2953
|
constructor(t) {
|
|
2954
2954
|
this.map = t;
|
|
2955
2955
|
}
|
|
@@ -2974,7 +2974,7 @@ class Rr {
|
|
|
2974
2974
|
return this.inner.removeMarkers(t.map((e) => e.innerOverlay));
|
|
2975
2975
|
}
|
|
2976
2976
|
}
|
|
2977
|
-
class Pi extends
|
|
2977
|
+
class Pi extends Dr {
|
|
2978
2978
|
constructor(e, r) {
|
|
2979
2979
|
var n;
|
|
2980
2980
|
super(e);
|
|
@@ -2996,7 +2996,7 @@ class Pi extends Rr {
|
|
|
2996
2996
|
this.inner._redraw();
|
|
2997
2997
|
}
|
|
2998
2998
|
}
|
|
2999
|
-
class Bi extends
|
|
2999
|
+
class Bi extends Dr {
|
|
3000
3000
|
constructor(e, r) {
|
|
3001
3001
|
var n, a;
|
|
3002
3002
|
super(e);
|
|
@@ -3191,7 +3191,7 @@ class Ai extends zr {
|
|
|
3191
3191
|
this.placesService.search(e).then(this.onData, this.onError);
|
|
3192
3192
|
}
|
|
3193
3193
|
}
|
|
3194
|
-
var
|
|
3194
|
+
var Ri = /* @__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))(Ri || {});
|
|
3195
3195
|
class zt {
|
|
3196
3196
|
constructor(t) {
|
|
3197
3197
|
u(this, "latestInfoWindow");
|
|
@@ -3239,7 +3239,7 @@ class zt {
|
|
|
3239
3239
|
this.innerMap.setZoom(t);
|
|
3240
3240
|
}
|
|
3241
3241
|
}
|
|
3242
|
-
var
|
|
3242
|
+
var Di = function(t) {
|
|
3243
3243
|
return $i(t) && !zi(t);
|
|
3244
3244
|
};
|
|
3245
3245
|
function $i(i) {
|
|
@@ -3256,12 +3256,12 @@ function Zi(i) {
|
|
|
3256
3256
|
function Wi(i) {
|
|
3257
3257
|
return Array.isArray(i) ? [] : {};
|
|
3258
3258
|
}
|
|
3259
|
-
function
|
|
3259
|
+
function Re(i, t) {
|
|
3260
3260
|
return t.clone !== !1 && t.isMergeableObject(i) ? _e(Wi(i), i, t) : i;
|
|
3261
3261
|
}
|
|
3262
3262
|
function Hi(i, t, e) {
|
|
3263
3263
|
return i.concat(t).map(function(r) {
|
|
3264
|
-
return
|
|
3264
|
+
return Re(r, e);
|
|
3265
3265
|
});
|
|
3266
3266
|
}
|
|
3267
3267
|
function ji(i, t) {
|
|
@@ -3270,13 +3270,13 @@ function ji(i, t) {
|
|
|
3270
3270
|
var e = t.customMerge(i);
|
|
3271
3271
|
return typeof e == "function" ? e : _e;
|
|
3272
3272
|
}
|
|
3273
|
-
function
|
|
3273
|
+
function Vi(i) {
|
|
3274
3274
|
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(t) {
|
|
3275
3275
|
return Object.propertyIsEnumerable.call(i, t);
|
|
3276
3276
|
}) : [];
|
|
3277
3277
|
}
|
|
3278
3278
|
function cr(i) {
|
|
3279
|
-
return Object.keys(i).concat(
|
|
3279
|
+
return Object.keys(i).concat(Vi(i));
|
|
3280
3280
|
}
|
|
3281
3281
|
function Nr(i, t) {
|
|
3282
3282
|
try {
|
|
@@ -3285,21 +3285,21 @@ function Nr(i, t) {
|
|
|
3285
3285
|
return !1;
|
|
3286
3286
|
}
|
|
3287
3287
|
}
|
|
3288
|
-
function
|
|
3288
|
+
function Fi(i, t) {
|
|
3289
3289
|
return Nr(i, t) && !(Object.hasOwnProperty.call(i, t) && Object.propertyIsEnumerable.call(i, t));
|
|
3290
3290
|
}
|
|
3291
3291
|
function Ui(i, t, e) {
|
|
3292
3292
|
var r = {};
|
|
3293
3293
|
return e.isMergeableObject(i) && cr(i).forEach(function(s) {
|
|
3294
|
-
r[s] =
|
|
3294
|
+
r[s] = Re(i[s], e);
|
|
3295
3295
|
}), cr(t).forEach(function(s) {
|
|
3296
|
-
|
|
3296
|
+
Fi(i, s) || (Nr(i, s) && e.isMergeableObject(t[s]) ? r[s] = ji(s, e)(i[s], t[s], e) : r[s] = Re(t[s], e));
|
|
3297
3297
|
}), r;
|
|
3298
3298
|
}
|
|
3299
3299
|
function _e(i, t, e) {
|
|
3300
|
-
e = e || {}, e.arrayMerge = e.arrayMerge || Hi, e.isMergeableObject = e.isMergeableObject ||
|
|
3300
|
+
e = e || {}, e.arrayMerge = e.arrayMerge || Hi, e.isMergeableObject = e.isMergeableObject || Di, e.cloneUnlessOtherwiseSpecified = Re;
|
|
3301
3301
|
var r = Array.isArray(t), s = Array.isArray(i), n = r === s;
|
|
3302
|
-
return n ? r ? e.arrayMerge(i, t, e) : Ui(i, t, e) :
|
|
3302
|
+
return n ? r ? e.arrayMerge(i, t, e) : Ui(i, t, e) : Re(t, e);
|
|
3303
3303
|
}
|
|
3304
3304
|
_e.all = function(t, e) {
|
|
3305
3305
|
if (!Array.isArray(t))
|
|
@@ -3643,8 +3643,8 @@ function Qi() {
|
|
|
3643
3643
|
this.content = r, this.position = s, this.offset = n;
|
|
3644
3644
|
const l = "baidu-info-box-container";
|
|
3645
3645
|
this.container = document.createElement("div"), this.container.className = l, this.container.style.position = "absolute", this.border = document.createElement("div"), this.border.className = `${l}__border ${o}`, this.inner = document.createElement("div"), this.inner.className = l + "__inner";
|
|
3646
|
-
const d = document.createElement("
|
|
3647
|
-
d.className = l + "__close", d.
|
|
3646
|
+
const d = document.createElement("span");
|
|
3647
|
+
d.className = l + "__close", d.addEventListener("click", () => {
|
|
3648
3648
|
this.close(), this.dispatchEvent({ type: "onclickclose" });
|
|
3649
3649
|
}), this.inner.appendChild(r), this.border.appendChild(this.inner), this.border.appendChild(d), this.container.appendChild(this.border), a && this.setZIndex(a), this.setMaxWidth(c), this.onMarkerPositionChanged = this.onMarkerPositionChanged.bind(this);
|
|
3650
3650
|
}
|
|
@@ -3793,7 +3793,7 @@ class jt extends Wt {
|
|
|
3793
3793
|
this.inner.setPosition(e.toGoogle(this.map.coordType));
|
|
3794
3794
|
}
|
|
3795
3795
|
}
|
|
3796
|
-
class
|
|
3796
|
+
class Vt extends ct {
|
|
3797
3797
|
constructor(t, e, r) {
|
|
3798
3798
|
super(t, e, r), this.baiduMap = r;
|
|
3799
3799
|
}
|
|
@@ -3807,7 +3807,7 @@ class Ft extends ct {
|
|
|
3807
3807
|
t.maxWidth,
|
|
3808
3808
|
t.borderClass
|
|
3809
3809
|
);
|
|
3810
|
-
return new
|
|
3810
|
+
return new Vt(r, e, this);
|
|
3811
3811
|
}
|
|
3812
3812
|
open(t) {
|
|
3813
3813
|
this.innerOverlay.open(this.baiduMap.innerMap, t == null ? void 0 : t.innerOverlay);
|
|
@@ -3828,7 +3828,7 @@ class Ft extends ct {
|
|
|
3828
3828
|
this.innerOverlay.setZIndex(t);
|
|
3829
3829
|
}
|
|
3830
3830
|
}
|
|
3831
|
-
class
|
|
3831
|
+
class Ft extends Wt {
|
|
3832
3832
|
constructor(t, e, r) {
|
|
3833
3833
|
super(new ue(t, r)), this.inner = t, this.coordType = e, this.map = r;
|
|
3834
3834
|
}
|
|
@@ -3845,7 +3845,7 @@ class Vt extends Wt {
|
|
|
3845
3845
|
var c;
|
|
3846
3846
|
const a = (c = t.content.parentElement) == null ? void 0 : c.parentElement;
|
|
3847
3847
|
a && a.className.includes("gm-style-iw-c") && !a.className.includes(s) && (a.className += ` ${s}`);
|
|
3848
|
-
}), new
|
|
3848
|
+
}), new Ft(r, e, this);
|
|
3849
3849
|
}
|
|
3850
3850
|
open(t) {
|
|
3851
3851
|
this.inner.open(this.map.innerMap, t == null ? void 0 : t.innerOverlay);
|
|
@@ -3902,7 +3902,7 @@ const es = {
|
|
|
3902
3902
|
return t && s.endsWith(t) ? s.slice(0, -t.length) : s;
|
|
3903
3903
|
}
|
|
3904
3904
|
};
|
|
3905
|
-
var
|
|
3905
|
+
var De = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overlayMouseTarget = "overlayMouseTarget", i.float = "float", i))(De || {}), $e;
|
|
3906
3906
|
((i) => {
|
|
3907
3907
|
function t(r, s) {
|
|
3908
3908
|
switch (r) {
|
|
@@ -4014,7 +4014,7 @@ function rs(i, t, e, r, s) {
|
|
|
4014
4014
|
}
|
|
4015
4015
|
function is() {
|
|
4016
4016
|
return class extends google.maps.OverlayView {
|
|
4017
|
-
constructor(e, r, s, n =
|
|
4017
|
+
constructor(e, r, s, n = De.overlayMouseTarget, a) {
|
|
4018
4018
|
super();
|
|
4019
4019
|
u(this, "container");
|
|
4020
4020
|
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", () => {
|
|
@@ -4685,7 +4685,7 @@ class tr extends Kt {
|
|
|
4685
4685
|
}
|
|
4686
4686
|
} else
|
|
4687
4687
|
a < r.length;
|
|
4688
|
-
const c =
|
|
4688
|
+
const c = V.fromArray(n.map((o) => C.fromBaidu(o, this.coordType)));
|
|
4689
4689
|
c && (this.isDoingUpdateRectangle = !0, this.innerOverlay.setPath(c.toRectArray().map((o) => o.toBaidu(this.coordType))), this.isDoingUpdateRectangle = !1);
|
|
4690
4690
|
}, 0);
|
|
4691
4691
|
});
|
|
@@ -4704,7 +4704,7 @@ class tr extends Kt {
|
|
|
4704
4704
|
return new tr(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
|
|
4705
4705
|
}
|
|
4706
4706
|
getBounds() {
|
|
4707
|
-
return
|
|
4707
|
+
return V.fromBaidu(this.innerOverlay.getBounds(), this.coordType);
|
|
4708
4708
|
}
|
|
4709
4709
|
setBounds(e) {
|
|
4710
4710
|
const r = e.toRectArray();
|
|
@@ -4729,7 +4729,7 @@ class rr extends dt {
|
|
|
4729
4729
|
return new rr(r, e, this);
|
|
4730
4730
|
}
|
|
4731
4731
|
getBounds() {
|
|
4732
|
-
return
|
|
4732
|
+
return V.fromGoogle(this.innerOverlay.getBounds() ?? le.BOUNDS_ZERO, this.coordType);
|
|
4733
4733
|
}
|
|
4734
4734
|
setBounds(t) {
|
|
4735
4735
|
const e = t.toGoogle(this.coordType);
|
|
@@ -4750,13 +4750,13 @@ class ss extends zt {
|
|
|
4750
4750
|
u(this, "createPolyline", Xt.create);
|
|
4751
4751
|
u(this, "createRectangle", tr.create);
|
|
4752
4752
|
u(this, "createInfoWindow", Ht.create);
|
|
4753
|
-
u(this, "createInfoBox",
|
|
4753
|
+
u(this, "createInfoBox", Vt.create);
|
|
4754
4754
|
u(this, "createMarker", ze.create);
|
|
4755
4755
|
u(this, "createMapTypeControl", Bt.create);
|
|
4756
|
-
u(this, "createZoomControl",
|
|
4756
|
+
u(this, "createZoomControl", Rt.create);
|
|
4757
4757
|
u(this, "createStreetViewControl", kt.create);
|
|
4758
4758
|
u(this, "createScaleControl", It.create);
|
|
4759
|
-
this.buildInMapTypeId2BIMT =
|
|
4759
|
+
this.buildInMapTypeId2BIMT = F.BUILD_IN_MAP_TYPES.getValueMap(j.prototype.getId), this.baiduMapType2BIMT = F.BUILD_IN_MAP_TYPES.getValueMap(j.prototype.asBaiduMapType), this.map = new BMap.Map(e, {
|
|
4760
4760
|
minZoom: r.minZoom && r.minZoom + ce,
|
|
4761
4761
|
maxZoom: r.maxZoom && r.maxZoom + ce,
|
|
4762
4762
|
mapType: r.buildInMapTypeId && ((s = this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId)) == null ? void 0 : s.asBaiduMapType()),
|
|
@@ -4870,7 +4870,7 @@ class ss extends zt {
|
|
|
4870
4870
|
});
|
|
4871
4871
|
}
|
|
4872
4872
|
getBounds() {
|
|
4873
|
-
return
|
|
4873
|
+
return V.fromBaidu(this.map.getBounds(), this.coordType);
|
|
4874
4874
|
}
|
|
4875
4875
|
addElementOverlay(e) {
|
|
4876
4876
|
this.map.addOverlay(e.asBaidu());
|
|
@@ -4935,16 +4935,16 @@ class ns extends zt {
|
|
|
4935
4935
|
u(this, "createPolyline", Jt.create);
|
|
4936
4936
|
u(this, "createRectangle", rr.create);
|
|
4937
4937
|
u(this, "createInfoWindow", jt.create);
|
|
4938
|
-
u(this, "createInfoBox",
|
|
4938
|
+
u(this, "createInfoBox", Ft.create);
|
|
4939
4939
|
u(this, "createMarker", qt.create);
|
|
4940
|
-
u(this, "createMapTypeControl",
|
|
4941
|
-
u(this, "createZoomControl",
|
|
4940
|
+
u(this, "createMapTypeControl", Ve.create);
|
|
4941
|
+
u(this, "createZoomControl", Dt.create);
|
|
4942
4942
|
u(this, "createStreetViewControl", At.create);
|
|
4943
4943
|
u(this, "createScaleControl", St.create);
|
|
4944
|
-
this.mapOptions = r, this.buildInMapTypeId2BIMT =
|
|
4944
|
+
this.mapOptions = r, this.buildInMapTypeId2BIMT = F.BUILD_IN_MAP_TYPES.getValueMap(j.prototype.getId), this.googleMapTypeId2BIMT = F.BUILD_IN_MAP_TYPES.getValueMap(j.prototype.getGoogleMapTypeId);
|
|
4945
4945
|
const s = r.buildInMapTypeId && this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId);
|
|
4946
4946
|
this.map = new google.maps.Map(e, {
|
|
4947
|
-
center: r.center.toGoogle((s ??
|
|
4947
|
+
center: r.center.toGoogle((s ?? F.NORMAL).getGoogleCoordType()),
|
|
4948
4948
|
zoom: r.zoom,
|
|
4949
4949
|
disableDefaultUI: !0,
|
|
4950
4950
|
gestureHandling: r.gestureHandling,
|
|
@@ -5048,7 +5048,7 @@ class ns extends zt {
|
|
|
5048
5048
|
}
|
|
5049
5049
|
getBounds() {
|
|
5050
5050
|
const e = this.map.getBounds();
|
|
5051
|
-
return e ?
|
|
5051
|
+
return e ? V.fromGoogle(e, this.coordType) : V.EMPTY;
|
|
5052
5052
|
}
|
|
5053
5053
|
addElementOverlay(e) {
|
|
5054
5054
|
e.asGoogle().setMap(this.map);
|
|
@@ -5087,7 +5087,7 @@ class ns extends zt {
|
|
|
5087
5087
|
return new Ii(this, e);
|
|
5088
5088
|
}
|
|
5089
5089
|
createMapUrls(e) {
|
|
5090
|
-
return new
|
|
5090
|
+
return new Fe(e);
|
|
5091
5091
|
}
|
|
5092
5092
|
}
|
|
5093
5093
|
const tt = ["3.0"], os = {
|
|
@@ -5110,7 +5110,7 @@ const tt = ["3.0"], os = {
|
|
|
5110
5110
|
}
|
|
5111
5111
|
};
|
|
5112
5112
|
let jr;
|
|
5113
|
-
function
|
|
5113
|
+
function Vr() {
|
|
5114
5114
|
return jr || B("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
|
|
5115
5115
|
}
|
|
5116
5116
|
function as(i) {
|
|
@@ -5123,7 +5123,7 @@ class ls extends zt {
|
|
|
5123
5123
|
u(this, "map");
|
|
5124
5124
|
u(this, "defaultLayers");
|
|
5125
5125
|
this.mapOptions = r;
|
|
5126
|
-
const s =
|
|
5126
|
+
const s = Vr().here;
|
|
5127
5127
|
tt.includes(s.version) || B(`不支持${s.version}, HereMap当前只支持如下版本: ${tt}`);
|
|
5128
5128
|
const n = new H.service.Platform({
|
|
5129
5129
|
app_id: s.key.split(",")[0],
|
|
@@ -5291,7 +5291,7 @@ var K = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here
|
|
|
5291
5291
|
})(Ot || (Ot = {}));
|
|
5292
5292
|
const hs = {};
|
|
5293
5293
|
function cs(i) {
|
|
5294
|
-
return he.putIfAbsent(hs, i, () => hi(() => ds({ type: i, config:
|
|
5294
|
+
return he.putIfAbsent(hs, i, () => hi(() => ds({ type: i, config: Vr()[i] })))();
|
|
5295
5295
|
}
|
|
5296
5296
|
function ds({ type: i, config: t }) {
|
|
5297
5297
|
const e = window, r = us(i);
|
|
@@ -5457,7 +5457,7 @@ const Mn = () => {
|
|
|
5457
5457
|
((s && s.type) !== i || Date.now() - (t ?? 0) > 1e3) && e(s);
|
|
5458
5458
|
}
|
|
5459
5459
|
return { eventLog: e, eventLogLess: r };
|
|
5460
|
-
}, ir = "$map", Ne = "onCreate", Ge = "onDestroy",
|
|
5460
|
+
}, ir = "$map", Ne = "onCreate", Ge = "onDestroy", D = L({
|
|
5461
5461
|
inject: [ir],
|
|
5462
5462
|
mounted() {
|
|
5463
5463
|
je(this, Ne);
|
|
@@ -5574,7 +5574,7 @@ const Mn = () => {
|
|
|
5574
5574
|
},
|
|
5575
5575
|
mapType(i) {
|
|
5576
5576
|
var t;
|
|
5577
|
-
(t = this.map) == null || t.setMapType(i ??
|
|
5577
|
+
(t = this.map) == null || t.setMapType(i ?? F.NORMAL);
|
|
5578
5578
|
}
|
|
5579
5579
|
},
|
|
5580
5580
|
async mounted() {
|
|
@@ -5708,7 +5708,7 @@ function Ts(i, t, e, r, s, n) {
|
|
|
5708
5708
|
}
|
|
5709
5709
|
const Ms = /* @__PURE__ */ oe(bs, [["render", Ts]]), Cs = L({
|
|
5710
5710
|
name: "tg-custom-control",
|
|
5711
|
-
mixins: [
|
|
5711
|
+
mixins: [D],
|
|
5712
5712
|
props: {
|
|
5713
5713
|
position: U(k, k.RIGHT_BOTTOM)
|
|
5714
5714
|
},
|
|
@@ -5744,7 +5744,7 @@ function Os(i, t, e, r, s, n) {
|
|
|
5744
5744
|
}
|
|
5745
5745
|
const ws = /* @__PURE__ */ oe(Cs, [["render", Os]]), xs = L({
|
|
5746
5746
|
name: "tg-map-type-control",
|
|
5747
|
-
mixins: [
|
|
5747
|
+
mixins: [D],
|
|
5748
5748
|
props: {
|
|
5749
5749
|
position: U(k, k.TOP_LEFT),
|
|
5750
5750
|
type: U(Cr),
|
|
@@ -5777,7 +5777,7 @@ const ws = /* @__PURE__ */ oe(Cs, [["render", Os]]), xs = L({
|
|
|
5777
5777
|
}
|
|
5778
5778
|
}), Es = L({
|
|
5779
5779
|
name: "tg-scale-control",
|
|
5780
|
-
mixins: [
|
|
5780
|
+
mixins: [D],
|
|
5781
5781
|
props: {
|
|
5782
5782
|
position: U(k, k.BOTTOM_RIGHT)
|
|
5783
5783
|
},
|
|
@@ -5798,7 +5798,7 @@ const ws = /* @__PURE__ */ oe(Cs, [["render", Os]]), xs = L({
|
|
|
5798
5798
|
this.$map.removeControl(this.control);
|
|
5799
5799
|
}
|
|
5800
5800
|
});
|
|
5801
|
-
function
|
|
5801
|
+
function Fr() {
|
|
5802
5802
|
var e;
|
|
5803
5803
|
const i = (e = Qr()) == null ? void 0 : e.type;
|
|
5804
5804
|
let t = (i == null ? void 0 : i.name) ?? (i == null ? void 0 : i.__name);
|
|
@@ -5811,7 +5811,7 @@ function Vr() {
|
|
|
5811
5811
|
function sr() {
|
|
5812
5812
|
const i = ei(ir);
|
|
5813
5813
|
let t, e;
|
|
5814
|
-
return i == null && B(`<${
|
|
5814
|
+
return i == null && B(`<${Fr() || "unknown"}>必须作为<tg-map>的子代组件`), {
|
|
5815
5815
|
mapRef: i,
|
|
5816
5816
|
/** 读取map对象, 只要放在<tg-map>里面的组件(除#overlay插槽外)都能够立即读取到map对象 */
|
|
5817
5817
|
get map() {
|
|
@@ -5886,7 +5886,7 @@ const Ls = L({
|
|
|
5886
5886
|
}
|
|
5887
5887
|
}), Is = L({
|
|
5888
5888
|
name: "tg-marker-clusterer",
|
|
5889
|
-
mixins: [
|
|
5889
|
+
mixins: [D],
|
|
5890
5890
|
// markers从this.$children中读取, 故需要省略(Omit)
|
|
5891
5891
|
props: {
|
|
5892
5892
|
gridSize: _(Number),
|
|
@@ -5957,7 +5957,7 @@ function Ss(i, t, e, r, s, n) {
|
|
|
5957
5957
|
}
|
|
5958
5958
|
const Ur = /* @__PURE__ */ oe(Is, [["render", Ss]]), ks = L({
|
|
5959
5959
|
name: "tg-traffic-layer",
|
|
5960
|
-
mixins: [
|
|
5960
|
+
mixins: [D],
|
|
5961
5961
|
// 请直接使用v-if来控制它的显隐
|
|
5962
5962
|
// 没有属性时, 写`{}`类型推断会有问题, 故注释掉
|
|
5963
5963
|
// props: {} satisfies Props<{}>,
|
|
@@ -5975,7 +5975,7 @@ const Ur = /* @__PURE__ */ oe(Is, [["render", Ss]]), ks = L({
|
|
|
5975
5975
|
}
|
|
5976
5976
|
}), As = L({
|
|
5977
5977
|
name: "tg-circle",
|
|
5978
|
-
mixins: [
|
|
5978
|
+
mixins: [D],
|
|
5979
5979
|
inheritAttrs: !1,
|
|
5980
5980
|
props: {
|
|
5981
5981
|
center: N(C),
|
|
@@ -6053,7 +6053,7 @@ const Ur = /* @__PURE__ */ oe(Is, [["render", Ss]]), ks = L({
|
|
|
6053
6053
|
this.$map.removeOverlay(this.overlay);
|
|
6054
6054
|
}
|
|
6055
6055
|
});
|
|
6056
|
-
class
|
|
6056
|
+
class Rs extends ts {
|
|
6057
6057
|
constructor(t, e, r, s) {
|
|
6058
6058
|
super(t, e), this.content = r, this.position = s;
|
|
6059
6059
|
}
|
|
@@ -6068,11 +6068,11 @@ class Ds extends ts {
|
|
|
6068
6068
|
this.position = t, this.draw();
|
|
6069
6069
|
}
|
|
6070
6070
|
}
|
|
6071
|
-
const
|
|
6071
|
+
const Ds = L({
|
|
6072
6072
|
name: "tg-element-overlay",
|
|
6073
|
-
mixins: [
|
|
6073
|
+
mixins: [D],
|
|
6074
6074
|
props: {
|
|
6075
|
-
mapPane: U(
|
|
6075
|
+
mapPane: U(De, De.overlayMouseTarget),
|
|
6076
6076
|
position: N(C)
|
|
6077
6077
|
},
|
|
6078
6078
|
setup() {
|
|
@@ -6094,7 +6094,7 @@ const Rs = L({
|
|
|
6094
6094
|
}
|
|
6095
6095
|
},
|
|
6096
6096
|
onCreate() {
|
|
6097
|
-
this.overlay = new
|
|
6097
|
+
this.overlay = new Rs(this.$map, this, this.content(), this.position), this.$map.addElementOverlay(this.overlay);
|
|
6098
6098
|
},
|
|
6099
6099
|
onDestroy() {
|
|
6100
6100
|
this.$map.removeElementOverlay(this.overlay);
|
|
@@ -6107,9 +6107,9 @@ function $s(i, t, e, r, s, n) {
|
|
|
6107
6107
|
X(i.$slots, "default")
|
|
6108
6108
|
], 16);
|
|
6109
6109
|
}
|
|
6110
|
-
const zs = /* @__PURE__ */ oe(
|
|
6110
|
+
const zs = /* @__PURE__ */ oe(Ds, [["render", $s]]), Ns = L({
|
|
6111
6111
|
name: "tg-marker",
|
|
6112
|
-
mixins: [
|
|
6112
|
+
mixins: [D],
|
|
6113
6113
|
inheritAttrs: !1,
|
|
6114
6114
|
props: {
|
|
6115
6115
|
position: N(C),
|
|
@@ -6218,7 +6218,7 @@ function Gs(i, t, e, r, s, n) {
|
|
|
6218
6218
|
}
|
|
6219
6219
|
const pt = /* @__PURE__ */ oe(Ns, [["render", Gs]]), Zs = L({
|
|
6220
6220
|
name: "tg-info-box",
|
|
6221
|
-
mixins: [
|
|
6221
|
+
mixins: [D],
|
|
6222
6222
|
inheritAttrs: !1,
|
|
6223
6223
|
props: {
|
|
6224
6224
|
show: N(Boolean),
|
|
@@ -6298,7 +6298,7 @@ function Ws(i, t, e, r, s, n) {
|
|
|
6298
6298
|
}
|
|
6299
6299
|
const Hs = /* @__PURE__ */ oe(Zs, [["render", Ws]]), js = L({
|
|
6300
6300
|
name: "tg-info-window",
|
|
6301
|
-
mixins: [
|
|
6301
|
+
mixins: [D],
|
|
6302
6302
|
inheritAttrs: !1,
|
|
6303
6303
|
props: {
|
|
6304
6304
|
show: N(Boolean),
|
|
@@ -6360,7 +6360,7 @@ const Hs = /* @__PURE__ */ oe(Zs, [["render", Ws]]), js = L({
|
|
|
6360
6360
|
this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
|
|
6361
6361
|
}
|
|
6362
6362
|
});
|
|
6363
|
-
function
|
|
6363
|
+
function Vs(i, t, e, r, s, n) {
|
|
6364
6364
|
return ii((re(), ie("div", Ce({
|
|
6365
6365
|
class: i.$options.name
|
|
6366
6366
|
}, i.attrs.binds), [
|
|
@@ -6369,15 +6369,15 @@ function Fs(i, t, e, r, s, n) {
|
|
|
6369
6369
|
[si, i.show]
|
|
6370
6370
|
]);
|
|
6371
6371
|
}
|
|
6372
|
-
const
|
|
6372
|
+
const Fs = /* @__PURE__ */ oe(js, [["render", Vs]]), Us = L({
|
|
6373
6373
|
name: "tg-label",
|
|
6374
|
-
mixins: [
|
|
6374
|
+
mixins: [D],
|
|
6375
6375
|
inheritAttrs: !1,
|
|
6376
6376
|
props: {
|
|
6377
6377
|
position: _(C),
|
|
6378
6378
|
offset: _(Object),
|
|
6379
6379
|
zIndex: _(Number),
|
|
6380
|
-
mapPane: U(
|
|
6380
|
+
mapPane: U(De)
|
|
6381
6381
|
},
|
|
6382
6382
|
emits: void 0,
|
|
6383
6383
|
setup(i, { attrs: t }) {
|
|
@@ -6440,7 +6440,7 @@ function Ys(i, t, e, r, s, n) {
|
|
|
6440
6440
|
}
|
|
6441
6441
|
const qs = /* @__PURE__ */ oe(Us, [["render", Ys]]), Ks = L({
|
|
6442
6442
|
name: "tg-polygon",
|
|
6443
|
-
mixins: [
|
|
6443
|
+
mixins: [D],
|
|
6444
6444
|
inheritAttrs: !1,
|
|
6445
6445
|
props: {
|
|
6446
6446
|
paths: N(Array),
|
|
@@ -6509,7 +6509,7 @@ const qs = /* @__PURE__ */ oe(Us, [["render", Ys]]), Ks = L({
|
|
|
6509
6509
|
}
|
|
6510
6510
|
}), Xs = L({
|
|
6511
6511
|
name: "tg-polyline",
|
|
6512
|
-
mixins: [
|
|
6512
|
+
mixins: [D],
|
|
6513
6513
|
inheritAttrs: !1,
|
|
6514
6514
|
props: {
|
|
6515
6515
|
path: N(Array),
|
|
@@ -6577,7 +6577,7 @@ const qs = /* @__PURE__ */ oe(Us, [["render", Ys]]), Ks = L({
|
|
|
6577
6577
|
}
|
|
6578
6578
|
}), Js = L({
|
|
6579
6579
|
name: "tg-rectangle",
|
|
6580
|
-
mixins: [
|
|
6580
|
+
mixins: [D],
|
|
6581
6581
|
inheritAttrs: !1,
|
|
6582
6582
|
props: {
|
|
6583
6583
|
bounds: N(Object),
|
|
@@ -6646,7 +6646,7 @@ const qs = /* @__PURE__ */ oe(Us, [["render", Ys]]), Ks = L({
|
|
|
6646
6646
|
if (t.enable !== !1) {
|
|
6647
6647
|
const e = L({
|
|
6648
6648
|
beforeCreate() {
|
|
6649
|
-
const r =
|
|
6649
|
+
const r = Fr() ?? "", n = (t.nameRegex || /^[A-Z]/).test(r) ? (a) => {
|
|
6650
6650
|
t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : Qs.includes(a) || console.debug("[lifecycle]", r, a);
|
|
6651
6651
|
} : Ae;
|
|
6652
6652
|
n("beforeCreate"), this.__life_impl = n;
|
|
@@ -6712,11 +6712,11 @@ function rn(i, t, e) {
|
|
|
6712
6712
|
const Z = h * M * (f + h / 4 * (T * (-1 + 2 * f * f) - h / 6 * f * (-3 + 4 * M * M) * (-3 + 4 * f * f)));
|
|
6713
6713
|
w = O, O = e / (s * p) + Z;
|
|
6714
6714
|
}
|
|
6715
|
-
const E = m * M - d * T * o,
|
|
6715
|
+
const E = m * M - d * T * o, R = Math.atan2(
|
|
6716
6716
|
m * T + d * M * o,
|
|
6717
6717
|
(1 - n) * Math.sqrt(v * v + E * E)
|
|
6718
6718
|
), G = Math.atan2(M * c, d * T - m * M * o), P = n / 16 * b * (4 + n * (4 - 3 * b)), J = G - (1 - P) * n * v * (O + P * M * (f + P * T * (-1 + 2 * f * f)));
|
|
6719
|
-
return { lng: i.lng + mr(J), lat: mr(
|
|
6719
|
+
return { lng: i.lng + mr(J), lat: mr(R) };
|
|
6720
6720
|
}
|
|
6721
6721
|
const On = {
|
|
6722
6722
|
getDistance: tn,
|
|
@@ -6724,7 +6724,7 @@ const On = {
|
|
|
6724
6724
|
}, wn = {
|
|
6725
6725
|
install(i, t) {
|
|
6726
6726
|
if (as(t), {}.VITE_FALSE) {
|
|
6727
|
-
const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Ze, "./TgMapWidget.vue": Ms, "./controls/TgCustomControl.vue": ws, "./controls/TgMapTypeControl.vue": xs, "./controls/TgScaleControl.vue": Es, "./controls/TgStreetViewControl.vue": Ls, "./controls/TgZoomControl.vue": Ps, "./extra/TgHeatmap.vue": Bs, "./extra/TgMarkerClusterer.vue": Ur, "./layers/TgTrafficLayer.vue": ks, "./overlays/TgCircle.vue": As, "./overlays/TgElementOverlay.vue": zs, "./overlays/TgInfoBox.vue": Hs, "./overlays/TgInfoWindow.vue":
|
|
6727
|
+
const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Ze, "./TgMapWidget.vue": Ms, "./controls/TgCustomControl.vue": ws, "./controls/TgMapTypeControl.vue": xs, "./controls/TgScaleControl.vue": Es, "./controls/TgStreetViewControl.vue": Ls, "./controls/TgZoomControl.vue": Ps, "./extra/TgHeatmap.vue": Bs, "./extra/TgMarkerClusterer.vue": Ur, "./layers/TgTrafficLayer.vue": ks, "./overlays/TgCircle.vue": As, "./overlays/TgElementOverlay.vue": zs, "./overlays/TgInfoBox.vue": Hs, "./overlays/TgInfoWindow.vue": Fs, "./overlays/TgLabel.vue": qs, "./overlays/TgMarker.vue": pt, "./overlays/TgPolygon.vue": Ks, "./overlays/TgPolyline.vue": Xs, "./overlays/TgRectangle.vue": Js });
|
|
6728
6728
|
Object.keys(r).forEach((s) => {
|
|
6729
6729
|
const n = r[s];
|
|
6730
6730
|
i.component(n.name ?? B(`Tg开头的组件必须设置name: ${s}`), n);
|
|
@@ -6743,7 +6743,7 @@ export {
|
|
|
6743
6743
|
Gt as BaiduCircle,
|
|
6744
6744
|
Pt as BaiduControl,
|
|
6745
6745
|
Oi as BaiduHeatmap,
|
|
6746
|
-
|
|
6746
|
+
Vt as BaiduInfoBoxOverlay,
|
|
6747
6747
|
Ht as BaiduInfoWindow,
|
|
6748
6748
|
Bt as BaiduMapTypeControl,
|
|
6749
6749
|
Ue as BaiduMapUrls,
|
|
@@ -6758,7 +6758,7 @@ export {
|
|
|
6758
6758
|
It as BaiduScaleControl,
|
|
6759
6759
|
Ai as BaiduSearchBox,
|
|
6760
6760
|
kt as BaiduStreetViewControl,
|
|
6761
|
-
|
|
6761
|
+
Rt as BaiduZoomControl,
|
|
6762
6762
|
j as BuildInMapType,
|
|
6763
6763
|
Mr as BuildInMapTypeId,
|
|
6764
6764
|
Pe as CachedValue,
|
|
@@ -6774,10 +6774,10 @@ export {
|
|
|
6774
6774
|
Zt as GoogleCircle,
|
|
6775
6775
|
ht as GoogleControl,
|
|
6776
6776
|
Ci as GoogleHeatmap,
|
|
6777
|
-
|
|
6777
|
+
Ft as GoogleInfoBoxOverlay,
|
|
6778
6778
|
jt as GoogleInfoWindow,
|
|
6779
|
-
|
|
6780
|
-
|
|
6779
|
+
Ve as GoogleMapTypeControl,
|
|
6780
|
+
Fe as GoogleMapUrls,
|
|
6781
6781
|
qt as GoogleMarker,
|
|
6782
6782
|
Bi as GoogleMarkerClusterer,
|
|
6783
6783
|
Nt as GoogleOverlay,
|
|
@@ -6788,7 +6788,7 @@ export {
|
|
|
6788
6788
|
St as GoogleScaleControl,
|
|
6789
6789
|
ki as GoogleSearchBox,
|
|
6790
6790
|
At as GoogleStreetViewControl,
|
|
6791
|
-
|
|
6791
|
+
Dt as GoogleZoomControl,
|
|
6792
6792
|
Pr as Heatmap,
|
|
6793
6793
|
Qe as Icon,
|
|
6794
6794
|
et as IconSequence,
|
|
@@ -6797,22 +6797,22 @@ export {
|
|
|
6797
6797
|
Xi as InfoWindowModeValues,
|
|
6798
6798
|
ar as KeyValue,
|
|
6799
6799
|
C as LatLng,
|
|
6800
|
-
|
|
6800
|
+
V as LatLngBounds,
|
|
6801
6801
|
Cn as LifecycleLogPlugin,
|
|
6802
6802
|
te as Location,
|
|
6803
6803
|
Ne as MIXIN_HOOK_CREATE,
|
|
6804
6804
|
Ge as MIXIN_HOOK_DESTROY,
|
|
6805
6805
|
ir as MIXIN_MAP_NAME,
|
|
6806
6806
|
ye as MVCArrays,
|
|
6807
|
-
|
|
6807
|
+
D as MapMixin,
|
|
6808
6808
|
Ct as MapOptions,
|
|
6809
|
-
|
|
6809
|
+
De as MapPane,
|
|
6810
6810
|
$e as MapPanes,
|
|
6811
|
-
|
|
6811
|
+
F as MapType,
|
|
6812
6812
|
Cr as MapTypeControlType,
|
|
6813
6813
|
Br as MapUrls,
|
|
6814
|
-
|
|
6815
|
-
|
|
6814
|
+
Ri as MapZoom,
|
|
6815
|
+
Dr as MarkerClusterer,
|
|
6816
6816
|
he as Objects,
|
|
6817
6817
|
Wr as Overlay,
|
|
6818
6818
|
$r as PlacesService,
|
|
@@ -6827,7 +6827,7 @@ export {
|
|
|
6827
6827
|
zs as TgElementOverlay,
|
|
6828
6828
|
Bs as TgHeatmap,
|
|
6829
6829
|
Hs as TgInfoBox,
|
|
6830
|
-
|
|
6830
|
+
Fs as TgInfoWindow,
|
|
6831
6831
|
qs as TgLabel,
|
|
6832
6832
|
Ze as TgMap,
|
|
6833
6833
|
Ot as TgMapFactory,
|
|
@@ -6860,7 +6860,7 @@ export {
|
|
|
6860
6860
|
xt as findAncestorComponentByType,
|
|
6861
6861
|
bn as findByComponentType,
|
|
6862
6862
|
rn as getDestination,
|
|
6863
|
-
|
|
6863
|
+
Vr as getTgMapConfig,
|
|
6864
6864
|
Tt as isComponentByType,
|
|
6865
6865
|
un as isDef,
|
|
6866
6866
|
li as isEntryValueDef,
|