tg-map-vue3 4.0.1 → 4.0.4
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 +3 -0
- package/README.md +15 -0
- package/dist/src/components/index.d.ts +1 -0
- package/dist/tg-map.cjs +1 -2
- package/dist/tg-map.cjs.map +1 -1
- package/dist/tg-map.css +1 -0
- package/dist/tg-map.js +46 -46
- package/dist/tg-map.js.map +1 -1
- package/package.json +7 -5
package/dist/tg-map.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".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(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
1
|
import { noop as S, typed as x, lateinit as l, path as Y, throwError as M, Arrays as Q, deepEqual as ee } from "tg-commons";
|
|
3
2
|
import { Strings as F, TgMapType as D, unwrapStringEnumValue as d, loadCachedMap as te, TgMapFactory as se, BuildInMapTypeId as z, GestureHandlingOptions as W, bindEvents as v, MapType as re, Objects as ie, InfoWindowModeValues as oe, LatLng as f, dimen as ae, ControlPosition as c, CustomControl as ne, MapTypeControlType as le, TrafficLayer as he, MapPane as B, ElementOverlay as de, BaiduMarker as G, setTgMapConfig as pe } from "tg-map-core";
|
|
4
3
|
export * from "tg-map-core";
|
|
5
4
|
import { createCommentVNode as R, computed as q, defineComponent as n, markRaw as ce, watch as T, createElementBlock as b, openBlock as C, mergeProps as I, createElementVNode as me, renderSlot as y, normalizeClass as A, normalizeStyle as ue, getCurrentInstance as ye, inject as fe, onBeforeUnmount as ve, onMounted as ge, toRaw as E, withDirectives as $e, vShow as be } from "vue";
|
|
5
|
+
import "tg-map-core/dist/tg-map-core.css";
|
|
6
6
|
function u(e, t) {
|
|
7
7
|
return {
|
|
8
8
|
type: String,
|
|
@@ -29,7 +29,7 @@ function s(e, t) {
|
|
|
29
29
|
default: t
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Qe(e) {
|
|
33
33
|
const t = {};
|
|
34
34
|
return Object.entries(e).forEach(([r, i]) => {
|
|
35
35
|
const o = `__${r}`;
|
|
@@ -59,7 +59,7 @@ function _e(e) {
|
|
|
59
59
|
typeof r == "function" ? (k.get = r, k.set = S, i = !0) : typeof r == "object" && typeof r.get == "function" && (k.get = r.get, k.set = r.set, i = !0), i && (e[t] = Object.defineProperty(e, t, k));
|
|
60
60
|
}), e;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function et(e) {
|
|
63
63
|
return _e(e);
|
|
64
64
|
}
|
|
65
65
|
function L() {
|
|
@@ -71,12 +71,12 @@ function w(e, t) {
|
|
|
71
71
|
for (const i of r)
|
|
72
72
|
i.call(e);
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function tt(e, t) {
|
|
75
75
|
for (const r of e)
|
|
76
76
|
if (r.$options.name === t.name)
|
|
77
77
|
return r;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function st(e, t) {
|
|
80
80
|
if (!e.default) return;
|
|
81
81
|
const r = e.default();
|
|
82
82
|
for (const i of r)
|
|
@@ -104,7 +104,7 @@ function g(e, t) {
|
|
|
104
104
|
function h() {
|
|
105
105
|
return Function;
|
|
106
106
|
}
|
|
107
|
-
const
|
|
107
|
+
const rt = () => {
|
|
108
108
|
let e, t;
|
|
109
109
|
function r(o) {
|
|
110
110
|
console.log(o), e = o && o.type, t = Date.now();
|
|
@@ -368,7 +368,7 @@ function Me(e, t, r, i, o, a) {
|
|
|
368
368
|
y(e.$slots, "default")
|
|
369
369
|
], 6);
|
|
370
370
|
}
|
|
371
|
-
const
|
|
371
|
+
const it = /* @__PURE__ */ $(Ie, [["render", Me]]), we = n({
|
|
372
372
|
name: "tg-custom-control",
|
|
373
373
|
mixins: [p],
|
|
374
374
|
props: {
|
|
@@ -404,7 +404,7 @@ function Se(e, t, r, i, o, a) {
|
|
|
404
404
|
y(e.$slots, "default")
|
|
405
405
|
], 2);
|
|
406
406
|
}
|
|
407
|
-
const
|
|
407
|
+
const ot = /* @__PURE__ */ $(we, [["render", Se]]), at = n({
|
|
408
408
|
name: "tg-map-type-control",
|
|
409
409
|
mixins: [p],
|
|
410
410
|
props: {
|
|
@@ -437,7 +437,7 @@ const it = /* @__PURE__ */ $(we, [["render", Se]]), ot = n({
|
|
|
437
437
|
onDestroy() {
|
|
438
438
|
this.$map.removeControl(this.control);
|
|
439
439
|
}
|
|
440
|
-
}),
|
|
440
|
+
}), nt = n({
|
|
441
441
|
name: "tg-scale-control",
|
|
442
442
|
mixins: [p],
|
|
443
443
|
props: {
|
|
@@ -493,7 +493,7 @@ function V() {
|
|
|
493
493
|
}
|
|
494
494
|
};
|
|
495
495
|
}
|
|
496
|
-
const
|
|
496
|
+
const lt = n({
|
|
497
497
|
name: "tg-street-view-control",
|
|
498
498
|
props: {
|
|
499
499
|
position: u(c, c.RIGHT_BOTTOM)
|
|
@@ -509,7 +509,7 @@ const nt = n({
|
|
|
509
509
|
t.setPosition(d(a, c));
|
|
510
510
|
}), L;
|
|
511
511
|
}
|
|
512
|
-
}),
|
|
512
|
+
}), ht = n({
|
|
513
513
|
name: "tg-zoom-control",
|
|
514
514
|
props: {
|
|
515
515
|
position: u(c, c.RIGHT_BOTTOM)
|
|
@@ -525,7 +525,7 @@ const nt = n({
|
|
|
525
525
|
t.setPosition(d(a, c));
|
|
526
526
|
}), L;
|
|
527
527
|
}
|
|
528
|
-
}),
|
|
528
|
+
}), dt = n({
|
|
529
529
|
name: "tg-heatmap",
|
|
530
530
|
props: {
|
|
531
531
|
maxIntensity: s(Number),
|
|
@@ -617,7 +617,7 @@ function Be(e, t, r, i, o, a) {
|
|
|
617
617
|
y(e.$slots, "default")
|
|
618
618
|
], 2);
|
|
619
619
|
}
|
|
620
|
-
const Ae = /* @__PURE__ */ $(xe, [["render", Be]]),
|
|
620
|
+
const Ae = /* @__PURE__ */ $(xe, [["render", Be]]), pt = n({
|
|
621
621
|
name: "tg-traffic-layer",
|
|
622
622
|
mixins: [p],
|
|
623
623
|
// 请直接使用v-if来控制它的显隐
|
|
@@ -635,7 +635,7 @@ const Ae = /* @__PURE__ */ $(xe, [["render", Be]]), dt = n({
|
|
|
635
635
|
onDestroy() {
|
|
636
636
|
this.$map.removeLayer(this.layer);
|
|
637
637
|
}
|
|
638
|
-
}),
|
|
638
|
+
}), ct = n({
|
|
639
639
|
name: "tg-circle",
|
|
640
640
|
mixins: [p],
|
|
641
641
|
inheritAttrs: !1,
|
|
@@ -773,7 +773,7 @@ function Ne(e, t, r, i, o, a) {
|
|
|
773
773
|
y(e.$slots, "default")
|
|
774
774
|
], 16);
|
|
775
775
|
}
|
|
776
|
-
const
|
|
776
|
+
const mt = /* @__PURE__ */ $(Le, [["render", Ne]]), De = {
|
|
777
777
|
position: m(f),
|
|
778
778
|
title: s(String),
|
|
779
779
|
label: s(Object),
|
|
@@ -962,7 +962,7 @@ function Ue(e, t, r, i, o, a) {
|
|
|
962
962
|
y(e.$slots, "default")
|
|
963
963
|
], 16);
|
|
964
964
|
}
|
|
965
|
-
const
|
|
965
|
+
const ut = /* @__PURE__ */ $(Re, [["render", Ue]]), Ze = n({
|
|
966
966
|
name: "tg-info-window",
|
|
967
967
|
mixins: [p],
|
|
968
968
|
inheritAttrs: !1,
|
|
@@ -1035,7 +1035,7 @@ function je(e, t, r, i, o, a) {
|
|
|
1035
1035
|
[be, e.show]
|
|
1036
1036
|
]);
|
|
1037
1037
|
}
|
|
1038
|
-
const
|
|
1038
|
+
const yt = /* @__PURE__ */ $(Ze, [["render", je]]), Ve = n({
|
|
1039
1039
|
name: "tg-label",
|
|
1040
1040
|
mixins: [p],
|
|
1041
1041
|
inheritAttrs: !1,
|
|
@@ -1104,7 +1104,7 @@ function He(e, t, r, i, o, a) {
|
|
|
1104
1104
|
y(e.$slots, "default")
|
|
1105
1105
|
], 16);
|
|
1106
1106
|
}
|
|
1107
|
-
const
|
|
1107
|
+
const ft = /* @__PURE__ */ $(Ve, [["render", He]]), Fe = {
|
|
1108
1108
|
paths: m(Array),
|
|
1109
1109
|
clickable: s(Boolean),
|
|
1110
1110
|
editable: s(Boolean),
|
|
@@ -1116,7 +1116,7 @@ const yt = /* @__PURE__ */ $(Ve, [["render", He]]), Fe = {
|
|
|
1116
1116
|
fillColor: s(String),
|
|
1117
1117
|
fillOpacity: s(Number),
|
|
1118
1118
|
"onUpdate:paths": h()
|
|
1119
|
-
},
|
|
1119
|
+
}, vt = n({
|
|
1120
1120
|
name: "tg-polygon",
|
|
1121
1121
|
mixins: [p],
|
|
1122
1122
|
inheritAttrs: !1,
|
|
@@ -1177,7 +1177,7 @@ const yt = /* @__PURE__ */ $(Ve, [["render", He]]), Fe = {
|
|
|
1177
1177
|
onDestroy() {
|
|
1178
1178
|
this.$map.removeOverlay(this.overlay);
|
|
1179
1179
|
}
|
|
1180
|
-
}),
|
|
1180
|
+
}), gt = n({
|
|
1181
1181
|
name: "tg-polyline",
|
|
1182
1182
|
mixins: [p],
|
|
1183
1183
|
inheritAttrs: !1,
|
|
@@ -1249,7 +1249,7 @@ const yt = /* @__PURE__ */ $(Ve, [["render", He]]), Fe = {
|
|
|
1249
1249
|
onDestroy() {
|
|
1250
1250
|
this.overlay.remove();
|
|
1251
1251
|
}
|
|
1252
|
-
}),
|
|
1252
|
+
}), $t = n({
|
|
1253
1253
|
name: "tg-rectangle",
|
|
1254
1254
|
mixins: [p],
|
|
1255
1255
|
inheritAttrs: !1,
|
|
@@ -1319,7 +1319,7 @@ const yt = /* @__PURE__ */ $(Ve, [["render", He]]), Fe = {
|
|
|
1319
1319
|
onDestroy() {
|
|
1320
1320
|
this.$map.removeOverlay(this.overlay);
|
|
1321
1321
|
}
|
|
1322
|
-
}), Ge = ["beforeUpdate", "updated"],
|
|
1322
|
+
}), Ge = ["beforeUpdate", "updated"], bt = {
|
|
1323
1323
|
install(e, t = {}) {
|
|
1324
1324
|
if (t.enable !== !1) {
|
|
1325
1325
|
const r = n({
|
|
@@ -1365,7 +1365,7 @@ const yt = /* @__PURE__ */ $(Ve, [["render", He]]), Fe = {
|
|
|
1365
1365
|
e.mixin(r);
|
|
1366
1366
|
}
|
|
1367
1367
|
}
|
|
1368
|
-
},
|
|
1368
|
+
}, Ct = {
|
|
1369
1369
|
install(e, t) {
|
|
1370
1370
|
pe(t);
|
|
1371
1371
|
const r = e.config.optionMergeStrategies;
|
|
@@ -1373,40 +1373,40 @@ const yt = /* @__PURE__ */ $(Ve, [["render", He]]), Fe = {
|
|
|
1373
1373
|
}
|
|
1374
1374
|
};
|
|
1375
1375
|
export {
|
|
1376
|
-
|
|
1376
|
+
bt as LifecycleLogPlugin,
|
|
1377
1377
|
O as MIXIN_HOOK_CREATE,
|
|
1378
1378
|
P as MIXIN_HOOK_DESTROY,
|
|
1379
1379
|
j as MIXIN_MAP_NAME,
|
|
1380
1380
|
p as MapMixin,
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1381
|
+
ct as TgCircle,
|
|
1382
|
+
ot as TgCustomControl,
|
|
1383
|
+
mt as TgElementOverlay,
|
|
1384
|
+
dt as TgHeatmap,
|
|
1385
|
+
ut as TgInfoBox,
|
|
1386
|
+
yt as TgInfoWindow,
|
|
1387
|
+
ft as TgLabel,
|
|
1388
1388
|
N as TgMap,
|
|
1389
|
-
|
|
1390
|
-
|
|
1389
|
+
at as TgMapTypeControl,
|
|
1390
|
+
it as TgMapWidget,
|
|
1391
1391
|
H as TgMarker,
|
|
1392
1392
|
Ae as TgMarkerClusterer,
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1393
|
+
vt as TgPolygon,
|
|
1394
|
+
gt as TgPolyline,
|
|
1395
|
+
$t as TgRectangle,
|
|
1396
|
+
nt as TgScaleControl,
|
|
1397
|
+
lt as TgStreetViewControl,
|
|
1398
|
+
pt as TgTrafficLayer,
|
|
1399
|
+
ht as TgZoomControl,
|
|
1400
1400
|
w as callHook,
|
|
1401
|
-
|
|
1401
|
+
Qe as computedSaveOnThis,
|
|
1402
1402
|
L as createEmptyVNode,
|
|
1403
1403
|
_e as createPropertyObject,
|
|
1404
|
-
|
|
1405
|
-
|
|
1404
|
+
et as createPropertyObjectTyped,
|
|
1405
|
+
Ct as default,
|
|
1406
1406
|
h as eventProp,
|
|
1407
|
-
|
|
1407
|
+
st as extractVNodeFromSlotsByComponent,
|
|
1408
1408
|
Z as findAncestorComponentByType,
|
|
1409
|
-
|
|
1409
|
+
tt as findByComponentType,
|
|
1410
1410
|
U as isComponentByType,
|
|
1411
1411
|
s as optionalProp,
|
|
1412
1412
|
m as requiredProp,
|
|
@@ -1414,7 +1414,7 @@ export {
|
|
|
1414
1414
|
ke as splitAttrs,
|
|
1415
1415
|
u as stringEnumProp,
|
|
1416
1416
|
Ce as stringUnionPropFromValues,
|
|
1417
|
-
|
|
1417
|
+
rt as useEventLogMethods,
|
|
1418
1418
|
g as useSplittedAttrs,
|
|
1419
1419
|
V as useTgMapInner
|
|
1420
1420
|
};
|