tg-map-vue3 4.1.5 → 4.1.7
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.cjs +2 -0
- package/dist/tg-map.cjs.map +1 -0
- package/dist/tg-map.css +1 -0
- package/dist/tg-map.js +1440 -0
- package/dist/tg-map.js.map +1 -0
- package/package.json +4 -4
- package/dist/assets/404-D34FYbNB.js +0 -2
- package/dist/assets/404-D34FYbNB.js.map +0 -1
- package/dist/assets/ControlDemo-BvElkDpq.js +0 -2
- package/dist/assets/ControlDemo-BvElkDpq.js.map +0 -1
- package/dist/assets/CssPositionDemo-DbSCIYVw.js +0 -2
- package/dist/assets/CssPositionDemo-DbSCIYVw.js.map +0 -1
- package/dist/assets/HeatmapDemo-CKEH0W3g.js +0 -2
- package/dist/assets/HeatmapDemo-CKEH0W3g.js.map +0 -1
- package/dist/assets/InfoDemo-BSp_czCk.js +0 -2
- package/dist/assets/InfoDemo-BSp_czCk.js.map +0 -1
- package/dist/assets/LifecycleBugDemo-Bldh5GGg.js +0 -2
- package/dist/assets/LifecycleBugDemo-Bldh5GGg.js.map +0 -1
- package/dist/assets/Main-DGU58I8w.js +0 -2
- package/dist/assets/Main-DGU58I8w.js.map +0 -1
- package/dist/assets/MapDemo-Crw8VrAs.vue +0 -155
- package/dist/assets/MapDemo-Z4UTQNq5.js +0 -2
- package/dist/assets/MapDemo-Z4UTQNq5.js.map +0 -1
- package/dist/assets/MapTypeDemo-bv5WPraY.js +0 -2
- package/dist/assets/MapTypeDemo-bv5WPraY.js.map +0 -1
- package/dist/assets/MapUrlsDemo-D0075XSg.js +0 -2
- package/dist/assets/MapUrlsDemo-D0075XSg.js.map +0 -1
- package/dist/assets/MarkerDemo-D9YK-9Js.js +0 -2
- package/dist/assets/MarkerDemo-D9YK-9Js.js.map +0 -1
- package/dist/assets/MarkerDemo-D_C5RDUy.vue +0 -200
- package/dist/assets/MultiMapDemo-D-BWUDR1.js +0 -2
- package/dist/assets/MultiMapDemo-D-BWUDR1.js.map +0 -1
- package/dist/assets/OverlayDemo-BtSawKbN.js +0 -2
- package/dist/assets/OverlayDemo-BtSawKbN.js.map +0 -1
- package/dist/assets/PlaceDemo-DswQxAPt.js +0 -2
- package/dist/assets/PlaceDemo-DswQxAPt.js.map +0 -1
- package/dist/assets/ReactiveDemo-D5H5d9dh.js +0 -2
- package/dist/assets/ReactiveDemo-D5H5d9dh.js.map +0 -1
- package/dist/assets/ShapeDemo-CX9Jwa7y.js +0 -2
- package/dist/assets/ShapeDemo-CX9Jwa7y.js.map +0 -1
- package/dist/assets/ShapeDemo-t5GXEmrA.vue +0 -162
- package/dist/assets/TalksDemo-D0da45jA.js +0 -2
- package/dist/assets/TalksDemo-D0da45jA.js.map +0 -1
- package/dist/assets/V2Demo-vX7YCqCc.js +0 -2
- package/dist/assets/V2Demo-vX7YCqCc.js.map +0 -1
- package/dist/assets/index-C6IOkH7Y.css +0 -1
- package/dist/assets/index-DkG0ZlIx.js +0 -352
- package/dist/assets/index-DkG0ZlIx.js.map +0 -1
- package/dist/index.html +0 -14
package/dist/tg-map.js
ADDED
|
@@ -0,0 +1,1440 @@
|
|
|
1
|
+
import { noop as S, typed as L, lateinit as l, path as Y, throwError as w, Arrays as Q, deepEqual as ee } from "tg-commons";
|
|
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 oe, InfoWindowModeValues as ie, LatLng as y, dimen as ae, ControlPosition as c, CustomControl as ne, MapTypeControlType as le, TrafficLayer as he, MapPane as x, ElementOverlay as de, BaiduMarker as G, setTgMapConfig as pe } from "tg-map-core";
|
|
3
|
+
export * from "tg-map-core";
|
|
4
|
+
import { createCommentVNode as Z, computed as q, defineComponent as n, markRaw as ce, watch as k, createElementBlock as $, openBlock as C, mergeProps as I, createElementVNode as me, renderSlot as f, normalizeClass as A, normalizeStyle as ue, getCurrentInstance as fe, inject as ye, onBeforeUnmount as ve, onMounted as ge, toRaw as B, withDirectives as be, vShow as $e } from "vue";
|
|
5
|
+
import "tg-map-core/dist/tg-map-core.css";
|
|
6
|
+
function u(e, t) {
|
|
7
|
+
return {
|
|
8
|
+
type: String,
|
|
9
|
+
default: t,
|
|
10
|
+
validator: (r) => Object.values(e).includes(r)
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function Ce(e, t) {
|
|
14
|
+
return {
|
|
15
|
+
type: String,
|
|
16
|
+
default: t,
|
|
17
|
+
validator: (r) => e.includes(r)
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function m(e) {
|
|
21
|
+
return {
|
|
22
|
+
type: e,
|
|
23
|
+
required: !0
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function s(e, t) {
|
|
27
|
+
return {
|
|
28
|
+
type: e,
|
|
29
|
+
default: t
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function Qe(e) {
|
|
33
|
+
const t = {};
|
|
34
|
+
return Object.entries(e).forEach(([r, o]) => {
|
|
35
|
+
const i = `__${r}`;
|
|
36
|
+
t[r] = {
|
|
37
|
+
get() {
|
|
38
|
+
const a = this[i];
|
|
39
|
+
return a === void 0 ? o : a;
|
|
40
|
+
},
|
|
41
|
+
set(a) {
|
|
42
|
+
this[i] = a;
|
|
43
|
+
}
|
|
44
|
+
// Vue3已经不支持该属性
|
|
45
|
+
// cache: false
|
|
46
|
+
};
|
|
47
|
+
}), t;
|
|
48
|
+
}
|
|
49
|
+
const T = {
|
|
50
|
+
enumerable: !0,
|
|
51
|
+
configurable: !0,
|
|
52
|
+
get: S,
|
|
53
|
+
set: S
|
|
54
|
+
};
|
|
55
|
+
function _e(e) {
|
|
56
|
+
return Object.keys(e).forEach((t) => {
|
|
57
|
+
const r = e[t];
|
|
58
|
+
let o = !1;
|
|
59
|
+
typeof r == "function" ? (T.get = r, T.set = S, o = !0) : typeof r == "object" && typeof r.get == "function" && (T.get = r.get, T.set = r.set, o = !0), o && (e[t] = Object.defineProperty(e, t, T));
|
|
60
|
+
}), e;
|
|
61
|
+
}
|
|
62
|
+
function et(e) {
|
|
63
|
+
return _e(e);
|
|
64
|
+
}
|
|
65
|
+
function E() {
|
|
66
|
+
return Z();
|
|
67
|
+
}
|
|
68
|
+
function M(e, t) {
|
|
69
|
+
const r = e.$options[t];
|
|
70
|
+
if (r)
|
|
71
|
+
for (const o of r)
|
|
72
|
+
o.call(e);
|
|
73
|
+
}
|
|
74
|
+
function tt(e, t) {
|
|
75
|
+
for (const r of e)
|
|
76
|
+
if (r.$options.name === t.name)
|
|
77
|
+
return r;
|
|
78
|
+
}
|
|
79
|
+
function st(e, t) {
|
|
80
|
+
if (!e.default) return;
|
|
81
|
+
const r = e.default();
|
|
82
|
+
for (const o of r)
|
|
83
|
+
if ((o == null ? void 0 : o.type).name === t.name)
|
|
84
|
+
return o;
|
|
85
|
+
}
|
|
86
|
+
function ke(e, t) {
|
|
87
|
+
const r = {}, o = {}, i = {};
|
|
88
|
+
return Object.keys(e).forEach((a) => {
|
|
89
|
+
a.startsWith("on") ? r[F.pascal2kebab(a.substring(2))] = e[a] : o[a] = e[a];
|
|
90
|
+
}), t && Object.keys(t).forEach((a) => {
|
|
91
|
+
a.startsWith("on") && (i[F.pascal2kebab(a.substring(2))] = t[a]);
|
|
92
|
+
}), {
|
|
93
|
+
/** class/style/未声明的属性 等 */
|
|
94
|
+
binds: o,
|
|
95
|
+
/** 未声明的事件 */
|
|
96
|
+
listeners: r,
|
|
97
|
+
/** 声明在`props`中的事件 */
|
|
98
|
+
listenerProps: i
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function g(e, t) {
|
|
102
|
+
return q(() => ke(e, t));
|
|
103
|
+
}
|
|
104
|
+
function h() {
|
|
105
|
+
return Function;
|
|
106
|
+
}
|
|
107
|
+
const rt = () => {
|
|
108
|
+
let e, t;
|
|
109
|
+
function r(i) {
|
|
110
|
+
console.log(i), e = i && i.type, t = Date.now();
|
|
111
|
+
}
|
|
112
|
+
function o(i) {
|
|
113
|
+
((i && i.type) !== e || Date.now() - (t ?? 0) > 1e3) && r(i);
|
|
114
|
+
}
|
|
115
|
+
return { eventLog: r, eventLogLess: o };
|
|
116
|
+
};
|
|
117
|
+
function R(e, t) {
|
|
118
|
+
return (e == null ? void 0 : e.$options.name) === t.name;
|
|
119
|
+
}
|
|
120
|
+
function X(e, t) {
|
|
121
|
+
return R(e, t) ? e : void 0;
|
|
122
|
+
}
|
|
123
|
+
function U(e, t, r) {
|
|
124
|
+
let o = t;
|
|
125
|
+
for (; o; ) {
|
|
126
|
+
if (R(o, e))
|
|
127
|
+
return o;
|
|
128
|
+
if (r && R(o, r))
|
|
129
|
+
return;
|
|
130
|
+
o = o.$parent;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const j = "$map", O = "onCreate", P = "onDestroy", p = n({
|
|
134
|
+
inject: [j],
|
|
135
|
+
mounted() {
|
|
136
|
+
M(this, O);
|
|
137
|
+
},
|
|
138
|
+
beforeUnmount() {
|
|
139
|
+
M(this, P);
|
|
140
|
+
},
|
|
141
|
+
methods: {
|
|
142
|
+
recreate() {
|
|
143
|
+
M(this, P), M(this, O);
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
render() {
|
|
147
|
+
return E();
|
|
148
|
+
}
|
|
149
|
+
}), Te = {
|
|
150
|
+
/** type没做响应式, 但外部可以把type作为tg-map的key, 让type修改时完全重建tg-map */
|
|
151
|
+
type: u(D, D.google),
|
|
152
|
+
/**
|
|
153
|
+
* 当对该属性使用双向绑定时, 改变center将触发update:center又反过来触发center改变, 最终导致无限循环...
|
|
154
|
+
* 当前通过setCenter()时判断center是否有改变来避免该问题, 但为了避免可能存在的问题, 另外设计了如下机制:
|
|
155
|
+
* - :center-sync-delay="300": 延时同步center, 防止center的值更新过快
|
|
156
|
+
* - :current-center.sync="currentCenter": 实时获取center的值
|
|
157
|
+
* - :last-center.sync="center": 获取tg-map销毁时的最后的center的值, 使用这种方式可以做到type切换时保留中心点位置
|
|
158
|
+
* @see AbstractMapEventMap.center-changed
|
|
159
|
+
*/
|
|
160
|
+
center: m(y),
|
|
161
|
+
/**
|
|
162
|
+
* 同步center的延时
|
|
163
|
+
* @default 300
|
|
164
|
+
* @see center
|
|
165
|
+
*/
|
|
166
|
+
centerSyncDelay: s(Number, 300),
|
|
167
|
+
/**
|
|
168
|
+
* 仅用来获取center的值, 需要设置center的值请使用`center`属性
|
|
169
|
+
* @see center
|
|
170
|
+
* @deprecated 用的太少, 故maptalks未实现该属性, 要实时获取中心点, 请将{@link centerSyncDelay}设为0
|
|
171
|
+
*/
|
|
172
|
+
currentCenter: s(y),
|
|
173
|
+
/**
|
|
174
|
+
* 仅用于获取tg-map销毁时的最后的center的值
|
|
175
|
+
* @see center
|
|
176
|
+
* @deprecated 用的太少, 故maptalks未实现该属性
|
|
177
|
+
*/
|
|
178
|
+
lastCenter: s(y),
|
|
179
|
+
zoom: m(Number),
|
|
180
|
+
/**
|
|
181
|
+
* 该属性不会响应式更新, 要让它立即生效, 请参考{@link file://./../views/map/InfoDemo.vue#L3}
|
|
182
|
+
* @see MapOptions.infoWindowMode
|
|
183
|
+
*/
|
|
184
|
+
infoWindowMode: Ce(ie),
|
|
185
|
+
gestureHandling: u(W),
|
|
186
|
+
fractionalZoom: s(Boolean),
|
|
187
|
+
minZoom: s(Number),
|
|
188
|
+
maxZoom: s(Number),
|
|
189
|
+
mapStyle: s(Object),
|
|
190
|
+
mapTypeId: u(z),
|
|
191
|
+
/** 地图类型对象, 优先级比mapTypeId高 */
|
|
192
|
+
mapType: s(Object),
|
|
193
|
+
hideLogo: s(Boolean),
|
|
194
|
+
onLoad: h(),
|
|
195
|
+
"onUpdate:center": h(),
|
|
196
|
+
"onUpdate:current-center": h(),
|
|
197
|
+
"onUpdate:last-center": h(),
|
|
198
|
+
"onUpdate:map-type": h(),
|
|
199
|
+
"onUpdate:map-type-id": h(),
|
|
200
|
+
"onUpdate:zoom": h(),
|
|
201
|
+
onError: h()
|
|
202
|
+
}, Oe = n({
|
|
203
|
+
name: "tg-map",
|
|
204
|
+
provide() {
|
|
205
|
+
return {
|
|
206
|
+
[j]: q(() => this.map)
|
|
207
|
+
};
|
|
208
|
+
},
|
|
209
|
+
inheritAttrs: !1,
|
|
210
|
+
props: Te,
|
|
211
|
+
/** 声明事件的类型信息, 详见: {@link splitAttrs} */
|
|
212
|
+
emits: void 0,
|
|
213
|
+
setup(e, { attrs: t }) {
|
|
214
|
+
return {
|
|
215
|
+
attrs: g(t, e),
|
|
216
|
+
centerSyncTimeoutId: void 0
|
|
217
|
+
};
|
|
218
|
+
},
|
|
219
|
+
data() {
|
|
220
|
+
return {
|
|
221
|
+
map: L(),
|
|
222
|
+
isDestroyed: !1
|
|
223
|
+
};
|
|
224
|
+
},
|
|
225
|
+
computed: {
|
|
226
|
+
propsJson() {
|
|
227
|
+
return oe.toJsonSafely(this.$props);
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
watch: {
|
|
231
|
+
gestureHandling(e) {
|
|
232
|
+
var t;
|
|
233
|
+
e && ((t = this.map) == null || t.setGestureHandling(d(e, W)));
|
|
234
|
+
},
|
|
235
|
+
minZoom(e) {
|
|
236
|
+
var t;
|
|
237
|
+
(t = this.map) == null || t.setMinZoom(e);
|
|
238
|
+
},
|
|
239
|
+
maxZoom(e) {
|
|
240
|
+
var t;
|
|
241
|
+
(t = this.map) == null || t.setMaxZoom(e);
|
|
242
|
+
},
|
|
243
|
+
mapStyle(e) {
|
|
244
|
+
var t;
|
|
245
|
+
(t = this.map) == null || t.setMapStyle(e);
|
|
246
|
+
},
|
|
247
|
+
mapTypeId(e) {
|
|
248
|
+
var t;
|
|
249
|
+
e && ((t = this.map) == null || t.setBuildInMapTypeId(d(e, z)));
|
|
250
|
+
},
|
|
251
|
+
mapType(e) {
|
|
252
|
+
var t;
|
|
253
|
+
(t = this.map) == null || t.setMapType(e ?? re.NORMAL);
|
|
254
|
+
},
|
|
255
|
+
hideLogo(e) {
|
|
256
|
+
var t;
|
|
257
|
+
(t = this.map) == null || t.setHideLogo(e ?? !1);
|
|
258
|
+
},
|
|
259
|
+
fractionalZoom(e) {
|
|
260
|
+
var t;
|
|
261
|
+
(t = this.map) == null || t.setFractionalZoom(e ?? !1);
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
async mounted() {
|
|
265
|
+
const e = d(this.type, D);
|
|
266
|
+
try {
|
|
267
|
+
await te(e);
|
|
268
|
+
} catch (i) {
|
|
269
|
+
this.$emit("error", i);
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
if (this.isDestroyed) {
|
|
273
|
+
console.warn(`tg-map(type=${e})已销毁, 不需要继续执行`);
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
const t = se.createMap(
|
|
277
|
+
e,
|
|
278
|
+
this.$refs.map,
|
|
279
|
+
/* options: */
|
|
280
|
+
{
|
|
281
|
+
center: this.center,
|
|
282
|
+
zoom: this.zoom,
|
|
283
|
+
infoWindowMode: this.infoWindowMode,
|
|
284
|
+
gestureHandling: d(this.gestureHandling, W),
|
|
285
|
+
minZoom: this.minZoom,
|
|
286
|
+
maxZoom: this.maxZoom,
|
|
287
|
+
mapStyle: this.mapStyle,
|
|
288
|
+
buildInMapTypeId: d(this.mapTypeId, z),
|
|
289
|
+
hideLogo: this.hideLogo,
|
|
290
|
+
fractionalZoom: this.fractionalZoom
|
|
291
|
+
}
|
|
292
|
+
);
|
|
293
|
+
if (this.map = ce(t), this.mapType && t.setMapType(this.mapType), "ready" in this.attrs.listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"), v(
|
|
294
|
+
this.attrs.listeners,
|
|
295
|
+
t,
|
|
296
|
+
/* excludes: */
|
|
297
|
+
["load"]
|
|
298
|
+
), this.$emit("load", t), k([
|
|
299
|
+
() => this.zoom,
|
|
300
|
+
() => this.center
|
|
301
|
+
//
|
|
302
|
+
], ([i, a], [_, J]) => {
|
|
303
|
+
i !== _ && t.setZoom(i), a !== J && (t.getCenter().equals(a) || t.setCenter(a));
|
|
304
|
+
}), this.attrs.listenerProps["update:center"]) {
|
|
305
|
+
const i = () => this.$emit("update:center", t.getCenter());
|
|
306
|
+
t.addEventListener("center-changed", () => {
|
|
307
|
+
this.centerSyncDelay > 0 ? (clearTimeout(this.centerSyncTimeoutId), this.centerSyncTimeoutId = setTimeout(i, this.centerSyncDelay)) : i();
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
this.attrs.listenerProps["update:current-center"] && (this.$emit("update:current-center", this.center), t.addEventListener("center-changed", () => {
|
|
311
|
+
this.$emit("update:current-center", t.getCenter());
|
|
312
|
+
})), this.attrs.listenerProps["update:zoom"] && t.addEventListener("zoom-changed", () => {
|
|
313
|
+
this.$emit("update:zoom", t.getZoom());
|
|
314
|
+
});
|
|
315
|
+
const r = this.attrs.listenerProps["update:map-type"], o = this.attrs.listenerProps["update:map-type-id"];
|
|
316
|
+
(r || o) && t.addEventListener("map-type-changed", () => {
|
|
317
|
+
const i = t.getMapType();
|
|
318
|
+
r && this.$emit("update:map-type", i), o && this.$emit("update:map-type-id", i.id);
|
|
319
|
+
});
|
|
320
|
+
},
|
|
321
|
+
unmounted() {
|
|
322
|
+
this.isDestroyed = !0, this.map && (this.attrs.listenerProps["update:last-center"] && this.$emit("update:last-center", this.map.getCenter()), this.attrs.listenerProps["update:center"] && (clearTimeout(this.centerSyncTimeoutId), this.$emit("update:center", this.map.getCenter())));
|
|
323
|
+
},
|
|
324
|
+
methods: {}
|
|
325
|
+
}), b = (e, t) => {
|
|
326
|
+
const r = e.__vccOpts || e;
|
|
327
|
+
for (const [o, i] of t)
|
|
328
|
+
r[o] = i;
|
|
329
|
+
return r;
|
|
330
|
+
};
|
|
331
|
+
function Pe(e, t, r, o, i, a) {
|
|
332
|
+
return C(), $("div", I({ class: "tg-map" }, e.attrs.binds), [
|
|
333
|
+
me("div", {
|
|
334
|
+
ref: "map",
|
|
335
|
+
class: A({
|
|
336
|
+
"tg-map__map": !0,
|
|
337
|
+
[`tg-map__map--hide-logo-${e.type}`]: e.hideLogo
|
|
338
|
+
})
|
|
339
|
+
}, null, 2),
|
|
340
|
+
Z("", !0),
|
|
341
|
+
e.map ? f(e.$slots, "default", { key: 1 }) : Z("", !0),
|
|
342
|
+
f(e.$slots, "overlay")
|
|
343
|
+
], 16);
|
|
344
|
+
}
|
|
345
|
+
const N = /* @__PURE__ */ b(Oe, [["render", Pe]]), Ie = n({
|
|
346
|
+
name: "tg-map-widget",
|
|
347
|
+
props: {
|
|
348
|
+
left: {
|
|
349
|
+
type: [Number, String],
|
|
350
|
+
default: null
|
|
351
|
+
},
|
|
352
|
+
top: {
|
|
353
|
+
type: [Number, String],
|
|
354
|
+
default: null
|
|
355
|
+
},
|
|
356
|
+
right: {
|
|
357
|
+
type: [Number, String],
|
|
358
|
+
default: null
|
|
359
|
+
},
|
|
360
|
+
bottom: {
|
|
361
|
+
type: [Number, String],
|
|
362
|
+
default: null
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
computed: {
|
|
366
|
+
topValue() {
|
|
367
|
+
return this.top == null && this.bottom == null ? 0 : this.top;
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
methods: {
|
|
371
|
+
dimen: ae
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
function we(e, t, r, o, i, a) {
|
|
375
|
+
return C(), $("div", {
|
|
376
|
+
class: A(e.$options.name),
|
|
377
|
+
style: ue({ left: e.dimen(e.left), top: e.dimen(e.topValue), right: e.dimen(e.right), bottom: e.dimen(e.bottom) })
|
|
378
|
+
}, [
|
|
379
|
+
f(e.$slots, "default")
|
|
380
|
+
], 6);
|
|
381
|
+
}
|
|
382
|
+
const ot = /* @__PURE__ */ b(Ie, [["render", we]]), Me = n({
|
|
383
|
+
name: "tg-custom-control",
|
|
384
|
+
mixins: [p],
|
|
385
|
+
props: {
|
|
386
|
+
position: u(c, c.RIGHT_BOTTOM)
|
|
387
|
+
},
|
|
388
|
+
setup() {
|
|
389
|
+
return {
|
|
390
|
+
control: l()
|
|
391
|
+
};
|
|
392
|
+
},
|
|
393
|
+
watch: {
|
|
394
|
+
position() {
|
|
395
|
+
this.recreate();
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
onCreate() {
|
|
399
|
+
X(this.$parent, N) || console.warn("请将tg-custom-control放到tg-map中");
|
|
400
|
+
const { $el: e } = this, t = class extends ne {
|
|
401
|
+
onCreateElement() {
|
|
402
|
+
return e;
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
this.control = new t(d(this.position, c)), this.$map.addCustomControl(this.control);
|
|
406
|
+
},
|
|
407
|
+
onDestroy() {
|
|
408
|
+
this.$map.removeCustomControl(this.control);
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
function Se(e, t, r, o, i, a) {
|
|
412
|
+
return C(), $("div", {
|
|
413
|
+
class: A(e.$options.name)
|
|
414
|
+
}, [
|
|
415
|
+
f(e.$slots, "default")
|
|
416
|
+
], 2);
|
|
417
|
+
}
|
|
418
|
+
const it = /* @__PURE__ */ b(Me, [["render", Se]]), at = n({
|
|
419
|
+
name: "tg-map-type-control",
|
|
420
|
+
mixins: [p],
|
|
421
|
+
props: {
|
|
422
|
+
position: u(c, c.TOP_LEFT),
|
|
423
|
+
type: u(le),
|
|
424
|
+
mapTypes: s(Array)
|
|
425
|
+
},
|
|
426
|
+
setup() {
|
|
427
|
+
return {
|
|
428
|
+
control: l()
|
|
429
|
+
};
|
|
430
|
+
},
|
|
431
|
+
watch: {
|
|
432
|
+
position(e) {
|
|
433
|
+
this.control.setPosition(e);
|
|
434
|
+
},
|
|
435
|
+
type() {
|
|
436
|
+
this.recreate();
|
|
437
|
+
},
|
|
438
|
+
mapTypes: {
|
|
439
|
+
handler() {
|
|
440
|
+
this.recreate();
|
|
441
|
+
},
|
|
442
|
+
deep: !0
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
onCreate() {
|
|
446
|
+
this.control = this.$map.createMapTypeControl(d(this)), this.$map.addControl(this.control);
|
|
447
|
+
},
|
|
448
|
+
onDestroy() {
|
|
449
|
+
this.$map.removeControl(this.control);
|
|
450
|
+
}
|
|
451
|
+
}), nt = n({
|
|
452
|
+
name: "tg-scale-control",
|
|
453
|
+
mixins: [p],
|
|
454
|
+
props: {
|
|
455
|
+
position: u(c, c.BOTTOM_RIGHT)
|
|
456
|
+
},
|
|
457
|
+
setup() {
|
|
458
|
+
return {
|
|
459
|
+
control: l()
|
|
460
|
+
};
|
|
461
|
+
},
|
|
462
|
+
watch: {
|
|
463
|
+
position(e) {
|
|
464
|
+
this.control.setPosition(e);
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
onCreate() {
|
|
468
|
+
this.control = this.$map.createScaleControl(d(this)), this.$map.addControl(this.control);
|
|
469
|
+
},
|
|
470
|
+
onDestroy() {
|
|
471
|
+
this.$map.removeControl(this.control);
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
function K() {
|
|
475
|
+
var r;
|
|
476
|
+
const e = (r = fe()) == null ? void 0 : r.type;
|
|
477
|
+
let t = (e == null ? void 0 : e.name) ?? (e == null ? void 0 : e.__name);
|
|
478
|
+
if (!t) {
|
|
479
|
+
const o = e == null ? void 0 : e.__file;
|
|
480
|
+
o && (t = Y.basename(o, ".vue"));
|
|
481
|
+
}
|
|
482
|
+
return t;
|
|
483
|
+
}
|
|
484
|
+
function H() {
|
|
485
|
+
const e = ye(j);
|
|
486
|
+
let t, r;
|
|
487
|
+
return e == null && w(`<${K() || "unknown"}>必须作为<tg-map>的子代组件`), {
|
|
488
|
+
mapRef: e,
|
|
489
|
+
/** 读取map对象, 只要放在<tg-map>里面的组件(除#overlay插槽外)都能够立即读取到map对象 */
|
|
490
|
+
get map() {
|
|
491
|
+
return e.value ?? w("map尚未初始化");
|
|
492
|
+
},
|
|
493
|
+
/** 地图元素创建回调 */
|
|
494
|
+
[O](o) {
|
|
495
|
+
ge(o), t && w(`${O}只能调用一次`), t = o;
|
|
496
|
+
},
|
|
497
|
+
/** 地图元素销毁回调 */
|
|
498
|
+
[P](o) {
|
|
499
|
+
ve(o), r && w(`${P}只能调用一次`), r = o;
|
|
500
|
+
},
|
|
501
|
+
/** 重新创建地图元素 */
|
|
502
|
+
recreate() {
|
|
503
|
+
r == null || r(), t == null || t();
|
|
504
|
+
}
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
const lt = n({
|
|
508
|
+
name: "tg-street-view-control",
|
|
509
|
+
props: {
|
|
510
|
+
position: u(c, c.RIGHT_BOTTOM)
|
|
511
|
+
},
|
|
512
|
+
setup(e) {
|
|
513
|
+
let t = l();
|
|
514
|
+
const { map: r, onCreate: o, onDestroy: i } = H();
|
|
515
|
+
return o(() => {
|
|
516
|
+
t = r.createStreetViewControl(d(e)), r.addControl(t);
|
|
517
|
+
}), i(() => {
|
|
518
|
+
r.removeControl(t);
|
|
519
|
+
}), k(() => e.position, (a) => {
|
|
520
|
+
t.setPosition(d(a, c));
|
|
521
|
+
}), E;
|
|
522
|
+
}
|
|
523
|
+
}), ht = n({
|
|
524
|
+
name: "tg-zoom-control",
|
|
525
|
+
props: {
|
|
526
|
+
position: u(c, c.RIGHT_BOTTOM),
|
|
527
|
+
showZoomLevel: s(Boolean)
|
|
528
|
+
},
|
|
529
|
+
setup(e) {
|
|
530
|
+
let t = l();
|
|
531
|
+
const { map: r, onCreate: o, onDestroy: i } = H();
|
|
532
|
+
return o(() => {
|
|
533
|
+
t = r.createZoomControl(d(e)), r.addControl(t);
|
|
534
|
+
}), i(() => {
|
|
535
|
+
r.removeControl(t);
|
|
536
|
+
}), k(() => e.position, (a) => {
|
|
537
|
+
t.setPosition(d(a, c));
|
|
538
|
+
}), k(() => e.showZoomLevel, (a) => {
|
|
539
|
+
t.setShowZoomLevel(a ?? !0);
|
|
540
|
+
}), E;
|
|
541
|
+
}
|
|
542
|
+
}), dt = n({
|
|
543
|
+
name: "tg-heatmap",
|
|
544
|
+
props: {
|
|
545
|
+
maxIntensity: s(Number),
|
|
546
|
+
gradient: s(Object),
|
|
547
|
+
opacity: s(Number),
|
|
548
|
+
radius: s(Number),
|
|
549
|
+
data: m(Array)
|
|
550
|
+
},
|
|
551
|
+
setup(e) {
|
|
552
|
+
const { map: t, onCreate: r, onDestroy: o } = H();
|
|
553
|
+
let i = l();
|
|
554
|
+
return r(() => {
|
|
555
|
+
i = t.createHeatmap(e);
|
|
556
|
+
}), o(() => {
|
|
557
|
+
i.remove();
|
|
558
|
+
}), k(() => e.data, (a) => i.setData(a)), k(
|
|
559
|
+
[() => e.maxIntensity, () => e.gradient, () => e.opacity, () => e.radius],
|
|
560
|
+
() => i.setOptions(e)
|
|
561
|
+
), E;
|
|
562
|
+
}
|
|
563
|
+
}), Le = n({
|
|
564
|
+
name: "tg-marker-clusterer",
|
|
565
|
+
mixins: [p],
|
|
566
|
+
// markers从this.$children中读取, 故需要省略(Omit)
|
|
567
|
+
props: {
|
|
568
|
+
gridSize: s(Number),
|
|
569
|
+
maxZoom: s(Number),
|
|
570
|
+
minClusterSize: s(Number),
|
|
571
|
+
averageCenter: s(Boolean),
|
|
572
|
+
styles: s(Array),
|
|
573
|
+
stylesIndexCalculator: s(Function),
|
|
574
|
+
zIndex: s(Number)
|
|
575
|
+
},
|
|
576
|
+
setup() {
|
|
577
|
+
return {
|
|
578
|
+
clusterer: l(),
|
|
579
|
+
markers: L([])
|
|
580
|
+
};
|
|
581
|
+
},
|
|
582
|
+
watch: {
|
|
583
|
+
gridSize() {
|
|
584
|
+
this.recreate();
|
|
585
|
+
},
|
|
586
|
+
maxZoom() {
|
|
587
|
+
this.recreate();
|
|
588
|
+
},
|
|
589
|
+
minClusterSize() {
|
|
590
|
+
this.recreate();
|
|
591
|
+
},
|
|
592
|
+
averageCenter() {
|
|
593
|
+
this.recreate();
|
|
594
|
+
},
|
|
595
|
+
styles: {
|
|
596
|
+
handler() {
|
|
597
|
+
this.recreate();
|
|
598
|
+
},
|
|
599
|
+
deep: !0
|
|
600
|
+
},
|
|
601
|
+
stylesIndexCalculator() {
|
|
602
|
+
this.recreate();
|
|
603
|
+
},
|
|
604
|
+
zIndex() {
|
|
605
|
+
this.recreate();
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
onCreate() {
|
|
609
|
+
this.clusterer = this.$map.createMarkerClusterer(this);
|
|
610
|
+
},
|
|
611
|
+
onDestroy() {
|
|
612
|
+
this.clusterer.clearMarkers(!0);
|
|
613
|
+
},
|
|
614
|
+
methods: {
|
|
615
|
+
/** TgMarker有可能在该组件未初始化之前调用, 需要通过该方法判断 */
|
|
616
|
+
isInitiated() {
|
|
617
|
+
return this.clusterer != null;
|
|
618
|
+
},
|
|
619
|
+
onAddMarker(e) {
|
|
620
|
+
this.markers.push(e), this.isInitiated() && this.clusterer.addMarker(e);
|
|
621
|
+
},
|
|
622
|
+
onRemoveMarker(e) {
|
|
623
|
+
this.isInitiated() && this.clusterer.removeMarker(e), Q.remove(this.markers, e);
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
function xe(e, t, r, o, i, a) {
|
|
628
|
+
return C(), $("div", {
|
|
629
|
+
class: A(e.$options.name)
|
|
630
|
+
}, [
|
|
631
|
+
f(e.$slots, "default")
|
|
632
|
+
], 2);
|
|
633
|
+
}
|
|
634
|
+
const Ae = /* @__PURE__ */ b(Le, [["render", xe]]), pt = n({
|
|
635
|
+
name: "tg-traffic-layer",
|
|
636
|
+
mixins: [p],
|
|
637
|
+
// 请直接使用v-if来控制它的显隐
|
|
638
|
+
// 没有属性时, 写`{}`类型推断会有问题, 故注释掉
|
|
639
|
+
// props: {} satisfies Props<{}>,
|
|
640
|
+
setup() {
|
|
641
|
+
return {
|
|
642
|
+
layer: l()
|
|
643
|
+
};
|
|
644
|
+
},
|
|
645
|
+
watch: {},
|
|
646
|
+
onCreate() {
|
|
647
|
+
this.layer = new he(), this.$map.addLayer(this.layer);
|
|
648
|
+
},
|
|
649
|
+
onDestroy() {
|
|
650
|
+
this.$map.removeLayer(this.layer);
|
|
651
|
+
}
|
|
652
|
+
}), ct = n({
|
|
653
|
+
name: "tg-circle",
|
|
654
|
+
mixins: [p],
|
|
655
|
+
inheritAttrs: !1,
|
|
656
|
+
props: {
|
|
657
|
+
center: m(y),
|
|
658
|
+
radius: m(Number),
|
|
659
|
+
clickable: s(Boolean),
|
|
660
|
+
editable: s(Boolean),
|
|
661
|
+
strokeColor: s(String),
|
|
662
|
+
strokeOpacity: s(Number),
|
|
663
|
+
strokeWeight: s(Number),
|
|
664
|
+
visible: s(Boolean),
|
|
665
|
+
zIndex: s(Number),
|
|
666
|
+
fillColor: s(String),
|
|
667
|
+
fillOpacity: s(Number),
|
|
668
|
+
"onUpdate:center": h(),
|
|
669
|
+
"onUpdate:radius": h()
|
|
670
|
+
},
|
|
671
|
+
emits: void 0,
|
|
672
|
+
setup(e, { attrs: t }) {
|
|
673
|
+
return {
|
|
674
|
+
attrs: g(t, e),
|
|
675
|
+
overlay: l(),
|
|
676
|
+
emittedRadius: void 0,
|
|
677
|
+
emittedCenter: void 0
|
|
678
|
+
};
|
|
679
|
+
},
|
|
680
|
+
watch: {
|
|
681
|
+
center(e) {
|
|
682
|
+
if (this.emittedCenter != null) {
|
|
683
|
+
const t = this.emittedCenter;
|
|
684
|
+
if (this.emittedCenter = void 0, t === B(e))
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
this.overlay.setCenter(e);
|
|
688
|
+
},
|
|
689
|
+
radius(e) {
|
|
690
|
+
if (this.emittedRadius != null) {
|
|
691
|
+
const t = this.emittedRadius;
|
|
692
|
+
if (this.emittedRadius = void 0, t === e)
|
|
693
|
+
return;
|
|
694
|
+
}
|
|
695
|
+
this.overlay.setRadius(e);
|
|
696
|
+
},
|
|
697
|
+
clickable() {
|
|
698
|
+
this.recreate();
|
|
699
|
+
},
|
|
700
|
+
editable(e) {
|
|
701
|
+
this.overlay.setEditable(e);
|
|
702
|
+
},
|
|
703
|
+
strokeColor(e) {
|
|
704
|
+
this.overlay.setStrokeColor(e);
|
|
705
|
+
},
|
|
706
|
+
strokeOpacity(e) {
|
|
707
|
+
this.overlay.setStrokeOpacity(e);
|
|
708
|
+
},
|
|
709
|
+
strokeWeight(e) {
|
|
710
|
+
this.overlay.setStrokeWeight(e);
|
|
711
|
+
},
|
|
712
|
+
fillColor(e) {
|
|
713
|
+
this.overlay.setFillColor(e);
|
|
714
|
+
},
|
|
715
|
+
fillOpacity(e) {
|
|
716
|
+
this.overlay.setFillOpacity(e);
|
|
717
|
+
},
|
|
718
|
+
visible(e) {
|
|
719
|
+
this.overlay.setVisible(e);
|
|
720
|
+
},
|
|
721
|
+
zIndex(e) {
|
|
722
|
+
this.overlay.setZIndex(e);
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
onCreate() {
|
|
726
|
+
this.overlay = this.$map.createCircle(this), this.$map.addOverlay(this.overlay), v(this.attrs.listeners, this.overlay), this.attrs.listenerProps["update:center"] && this.overlay.addEventListener("center-changed", () => {
|
|
727
|
+
this.$emit("update:center", this.emittedCenter = this.overlay.getCenter());
|
|
728
|
+
}), this.attrs.listenerProps["update:radius"] && this.overlay.addEventListener("radius-changed", () => {
|
|
729
|
+
this.$emit("update:radius", this.emittedRadius = this.overlay.getRadius());
|
|
730
|
+
});
|
|
731
|
+
},
|
|
732
|
+
onDestroy() {
|
|
733
|
+
this.$map.removeOverlay(this.overlay);
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
class Be extends de {
|
|
737
|
+
constructor(t, r, o, i) {
|
|
738
|
+
super(t, r), this.content = o, this.position = i;
|
|
739
|
+
}
|
|
740
|
+
onCreate() {
|
|
741
|
+
return this.content;
|
|
742
|
+
}
|
|
743
|
+
onDraw(t) {
|
|
744
|
+
const r = t.fromLatLngToOverlayPoint(this.position);
|
|
745
|
+
this.content.style.left = r.x + "px", this.content.style.top = r.y + "px";
|
|
746
|
+
}
|
|
747
|
+
setPosition(t) {
|
|
748
|
+
this.position = t, this.draw();
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
const Ee = n({
|
|
752
|
+
name: "tg-element-overlay",
|
|
753
|
+
mixins: [p],
|
|
754
|
+
props: {
|
|
755
|
+
mapPane: u(x, x.overlayMouseTarget),
|
|
756
|
+
position: m(y)
|
|
757
|
+
},
|
|
758
|
+
setup() {
|
|
759
|
+
return {
|
|
760
|
+
overlay: l()
|
|
761
|
+
};
|
|
762
|
+
},
|
|
763
|
+
watch: {
|
|
764
|
+
position(e) {
|
|
765
|
+
this.overlay.setPosition(e);
|
|
766
|
+
},
|
|
767
|
+
mapPane() {
|
|
768
|
+
this.recreate();
|
|
769
|
+
}
|
|
770
|
+
},
|
|
771
|
+
methods: {
|
|
772
|
+
content() {
|
|
773
|
+
return this.$el;
|
|
774
|
+
}
|
|
775
|
+
},
|
|
776
|
+
onCreate() {
|
|
777
|
+
this.overlay = new Be(this.$map, d(this), this.content(), this.position), this.$map.addElementOverlay(this.overlay);
|
|
778
|
+
},
|
|
779
|
+
onDestroy() {
|
|
780
|
+
this.$map.removeElementOverlay(this.overlay);
|
|
781
|
+
}
|
|
782
|
+
});
|
|
783
|
+
function Ne(e, t, r, o, i, a) {
|
|
784
|
+
return C(), $("div", I({
|
|
785
|
+
class: e.$options.name
|
|
786
|
+
}, e.$attrs), [
|
|
787
|
+
f(e.$slots, "default")
|
|
788
|
+
], 16);
|
|
789
|
+
}
|
|
790
|
+
const mt = /* @__PURE__ */ b(Ee, [["render", Ne]]), De = {
|
|
791
|
+
position: m(y),
|
|
792
|
+
title: s(String),
|
|
793
|
+
label: s(Object),
|
|
794
|
+
icon: s(Object),
|
|
795
|
+
clickable: s(Boolean),
|
|
796
|
+
draggable: s(Boolean),
|
|
797
|
+
crossOnDrag: s(Boolean),
|
|
798
|
+
cursor: s(String),
|
|
799
|
+
zIndex: s(Number),
|
|
800
|
+
visible: s(Boolean),
|
|
801
|
+
normalizePositionForBaidu: s(Boolean),
|
|
802
|
+
/**
|
|
803
|
+
* 是否自动添加到TgMarkerClusterer中去
|
|
804
|
+
* @default true
|
|
805
|
+
*/
|
|
806
|
+
autoAddToClusterer: s(Boolean, !0),
|
|
807
|
+
"onUpdate:position": h()
|
|
808
|
+
}, ze = n({
|
|
809
|
+
name: "tg-marker",
|
|
810
|
+
mixins: [p],
|
|
811
|
+
inheritAttrs: !1,
|
|
812
|
+
props: De,
|
|
813
|
+
emits: void 0,
|
|
814
|
+
setup(e, { attrs: t }) {
|
|
815
|
+
return {
|
|
816
|
+
attrs: g(t, e),
|
|
817
|
+
marker: l(),
|
|
818
|
+
labelOverlay: L(),
|
|
819
|
+
info: L(),
|
|
820
|
+
emittedPosition: void 0,
|
|
821
|
+
autoAddToClustererWhenCreate: e.autoAddToClusterer
|
|
822
|
+
};
|
|
823
|
+
},
|
|
824
|
+
watch: {
|
|
825
|
+
position(e) {
|
|
826
|
+
if (this.emittedPosition != null) {
|
|
827
|
+
const t = this.emittedPosition;
|
|
828
|
+
if (this.emittedPosition = void 0, t === B(e))
|
|
829
|
+
return;
|
|
830
|
+
}
|
|
831
|
+
this.marker.setPosition(e);
|
|
832
|
+
},
|
|
833
|
+
title(e) {
|
|
834
|
+
this.marker.setTitle(e);
|
|
835
|
+
},
|
|
836
|
+
label(e, t) {
|
|
837
|
+
ee(e, t) || (e ? this.marker.setLabel(e) : this.recreate());
|
|
838
|
+
},
|
|
839
|
+
icon(e) {
|
|
840
|
+
e ? this.marker.setIcon(e) : this.recreate();
|
|
841
|
+
},
|
|
842
|
+
clickable(e) {
|
|
843
|
+
this.marker instanceof G ? this.recreate() : this.marker.setClickable(e);
|
|
844
|
+
},
|
|
845
|
+
draggable(e) {
|
|
846
|
+
this.marker.setDraggable(e);
|
|
847
|
+
},
|
|
848
|
+
crossOnDrag() {
|
|
849
|
+
this.recreate();
|
|
850
|
+
},
|
|
851
|
+
cursor() {
|
|
852
|
+
this.recreate();
|
|
853
|
+
},
|
|
854
|
+
zIndex(e) {
|
|
855
|
+
this.marker instanceof G ? this.recreate() : this.marker.setZIndex(e);
|
|
856
|
+
},
|
|
857
|
+
visible(e) {
|
|
858
|
+
this.marker.setVisible(e);
|
|
859
|
+
},
|
|
860
|
+
normalizePositionForBaidu() {
|
|
861
|
+
this.recreate();
|
|
862
|
+
},
|
|
863
|
+
autoAddToClusterer() {
|
|
864
|
+
this.recreate();
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
onCreate() {
|
|
868
|
+
this.marker = this.$map.createMarker(this), this.labelOverlay && this.marker.attachLabelOverlay(this.labelOverlay.overlay), this.$clusterer() && this.autoAddToClusterer ? this.$clusterer().onAddMarker(this.marker) : this.$map.addOverlay(this.marker), this.autoAddToClustererWhenCreate = this.autoAddToClusterer, this.info && this.info.show && this.info.overlay.open(this.marker), v(this.attrs.listeners, this.marker), this.attrs.listenerProps["update:position"] && this.marker.addEventListener("dragend", (e) => {
|
|
869
|
+
this.$emit("update:position", this.emittedPosition = e.position);
|
|
870
|
+
});
|
|
871
|
+
},
|
|
872
|
+
onDestroy() {
|
|
873
|
+
this.$clusterer() && this.autoAddToClustererWhenCreate ? this.$clusterer().onRemoveMarker(this.marker) : this.$map.removeOverlay(this.marker);
|
|
874
|
+
},
|
|
875
|
+
methods: {
|
|
876
|
+
$clusterer() {
|
|
877
|
+
return X(this.$parent, Ae);
|
|
878
|
+
},
|
|
879
|
+
onAddLabel(e) {
|
|
880
|
+
this.labelOverlay = e, this.marker && this.marker.attachLabelOverlay(e.overlay);
|
|
881
|
+
},
|
|
882
|
+
onRemoveLabel(e) {
|
|
883
|
+
this.marker.attachLabelOverlay(void 0), this.labelOverlay = void 0;
|
|
884
|
+
},
|
|
885
|
+
onAddInfo(e) {
|
|
886
|
+
this.info = e, this.marker && e.show && e.overlay.open(this.marker);
|
|
887
|
+
},
|
|
888
|
+
onRemoveInfo(e) {
|
|
889
|
+
e.overlay.close(), this.info = void 0;
|
|
890
|
+
},
|
|
891
|
+
onInfoShowChanged(e, t) {
|
|
892
|
+
t ? e.overlay.open(this.marker) : e.overlay.close();
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
});
|
|
896
|
+
function We(e, t, r, o, i, a) {
|
|
897
|
+
return f(e.$slots, "default");
|
|
898
|
+
}
|
|
899
|
+
const V = /* @__PURE__ */ b(ze, [["render", We]]), Ze = n({
|
|
900
|
+
name: "tg-info-box",
|
|
901
|
+
mixins: [p],
|
|
902
|
+
inheritAttrs: !1,
|
|
903
|
+
props: {
|
|
904
|
+
show: m(Boolean),
|
|
905
|
+
position: s(y),
|
|
906
|
+
offset: s(Object),
|
|
907
|
+
maxWidth: s(Number),
|
|
908
|
+
borderClass: s(String),
|
|
909
|
+
zIndex: s(Number),
|
|
910
|
+
disableAutoPan: s(Boolean),
|
|
911
|
+
"onUpdate:show": h()
|
|
912
|
+
},
|
|
913
|
+
emits: void 0,
|
|
914
|
+
setup(e, { attrs: t }) {
|
|
915
|
+
return {
|
|
916
|
+
attrs: g(t, e),
|
|
917
|
+
overlay: l()
|
|
918
|
+
};
|
|
919
|
+
},
|
|
920
|
+
watch: {
|
|
921
|
+
show(e) {
|
|
922
|
+
this.$marker() ? this.$marker().onInfoShowChanged(this, e) : e ? this.overlay.open() : this.overlay.close();
|
|
923
|
+
},
|
|
924
|
+
position(e) {
|
|
925
|
+
this.overlay.setPosition(e);
|
|
926
|
+
},
|
|
927
|
+
offset() {
|
|
928
|
+
this.recreate();
|
|
929
|
+
},
|
|
930
|
+
maxWidth(e) {
|
|
931
|
+
this.overlay.setMaxWidth(e);
|
|
932
|
+
},
|
|
933
|
+
borderClass() {
|
|
934
|
+
this.recreate();
|
|
935
|
+
},
|
|
936
|
+
zIndex(e) {
|
|
937
|
+
this.overlay.setZIndex(e);
|
|
938
|
+
},
|
|
939
|
+
disableAutoPan() {
|
|
940
|
+
this.recreate();
|
|
941
|
+
}
|
|
942
|
+
},
|
|
943
|
+
onCreate() {
|
|
944
|
+
this.overlay = this.$map.createInfoBox(this.getOptions()), this.$marker() ? this.$marker().onAddInfo(this) : this.show && this.overlay.open(), this.attrs.listenerProps["update:show"] && this.overlay.addEventListener("closeclick", () => {
|
|
945
|
+
this.$emit("update:show", !1);
|
|
946
|
+
}), v(this.attrs.listeners, this.overlay);
|
|
947
|
+
},
|
|
948
|
+
onDestroy() {
|
|
949
|
+
this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
|
|
950
|
+
},
|
|
951
|
+
methods: {
|
|
952
|
+
getOptions() {
|
|
953
|
+
return {
|
|
954
|
+
content: this.content(),
|
|
955
|
+
position: this.position,
|
|
956
|
+
offset: this.offset,
|
|
957
|
+
zIndex: this.zIndex,
|
|
958
|
+
maxWidth: this.maxWidth,
|
|
959
|
+
borderClass: this.borderClass,
|
|
960
|
+
disableAutoPan: this.disableAutoPan
|
|
961
|
+
};
|
|
962
|
+
},
|
|
963
|
+
content() {
|
|
964
|
+
return this.$el;
|
|
965
|
+
},
|
|
966
|
+
$marker() {
|
|
967
|
+
return U(V, this.$parent, N);
|
|
968
|
+
},
|
|
969
|
+
open(e) {
|
|
970
|
+
this.overlay.open(e);
|
|
971
|
+
},
|
|
972
|
+
close() {
|
|
973
|
+
this.overlay.close();
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
});
|
|
977
|
+
function Re(e, t, r, o, i, a) {
|
|
978
|
+
return C(), $("div", I({
|
|
979
|
+
class: e.$options.name
|
|
980
|
+
}, e.attrs.binds), [
|
|
981
|
+
f(e.$slots, "default")
|
|
982
|
+
], 16);
|
|
983
|
+
}
|
|
984
|
+
const ut = /* @__PURE__ */ b(Ze, [["render", Re]]), Ue = n({
|
|
985
|
+
name: "tg-info-window",
|
|
986
|
+
mixins: [p],
|
|
987
|
+
inheritAttrs: !1,
|
|
988
|
+
props: {
|
|
989
|
+
show: m(Boolean),
|
|
990
|
+
position: s(y),
|
|
991
|
+
maxWidth: s(Number),
|
|
992
|
+
offset: s(Object),
|
|
993
|
+
disableAutoPan: s(Boolean),
|
|
994
|
+
"onUpdate:show": h()
|
|
995
|
+
},
|
|
996
|
+
emits: void 0,
|
|
997
|
+
setup(e, { attrs: t }) {
|
|
998
|
+
return {
|
|
999
|
+
attrs: g(t, e),
|
|
1000
|
+
overlay: l()
|
|
1001
|
+
};
|
|
1002
|
+
},
|
|
1003
|
+
watch: {
|
|
1004
|
+
show(e) {
|
|
1005
|
+
this.$marker() ? this.$marker().onInfoShowChanged(this, e) : e ? this.overlay.open() : this.overlay.close();
|
|
1006
|
+
},
|
|
1007
|
+
position(e) {
|
|
1008
|
+
this.overlay.setPosition(e);
|
|
1009
|
+
},
|
|
1010
|
+
maxWidth() {
|
|
1011
|
+
this.recreate();
|
|
1012
|
+
},
|
|
1013
|
+
offset() {
|
|
1014
|
+
this.recreate();
|
|
1015
|
+
},
|
|
1016
|
+
disableAutoPan() {
|
|
1017
|
+
this.recreate();
|
|
1018
|
+
}
|
|
1019
|
+
},
|
|
1020
|
+
methods: {
|
|
1021
|
+
content() {
|
|
1022
|
+
return this.$el;
|
|
1023
|
+
},
|
|
1024
|
+
$marker() {
|
|
1025
|
+
return U(V, this.$parent, N);
|
|
1026
|
+
},
|
|
1027
|
+
getOptions() {
|
|
1028
|
+
return {
|
|
1029
|
+
content: this.content(),
|
|
1030
|
+
position: this.position,
|
|
1031
|
+
maxWidth: this.maxWidth,
|
|
1032
|
+
offset: this.offset,
|
|
1033
|
+
disableAutoPan: this.disableAutoPan
|
|
1034
|
+
};
|
|
1035
|
+
}
|
|
1036
|
+
},
|
|
1037
|
+
onCreate() {
|
|
1038
|
+
this.overlay = this.$map.createInfoWindow(this.getOptions()), this.$marker() ? this.$marker().onAddInfo(this) : this.show && this.overlay.open(), this.overlay.addEventListener("open", () => {
|
|
1039
|
+
this.$emit("update:show", !0);
|
|
1040
|
+
}), this.overlay.addEventListener("close", () => {
|
|
1041
|
+
this.$emit("update:show", !1);
|
|
1042
|
+
}), v(this.attrs.listeners, this.overlay);
|
|
1043
|
+
},
|
|
1044
|
+
onDestroy() {
|
|
1045
|
+
this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
|
|
1046
|
+
}
|
|
1047
|
+
});
|
|
1048
|
+
function je(e, t, r, o, i, a) {
|
|
1049
|
+
return be((C(), $("div", I({
|
|
1050
|
+
class: e.$options.name
|
|
1051
|
+
}, e.attrs.binds), [
|
|
1052
|
+
f(e.$slots, "default")
|
|
1053
|
+
], 16)), [
|
|
1054
|
+
[$e, e.show]
|
|
1055
|
+
]);
|
|
1056
|
+
}
|
|
1057
|
+
const ft = /* @__PURE__ */ b(Ue, [["render", je]]), He = n({
|
|
1058
|
+
name: "tg-label",
|
|
1059
|
+
mixins: [p],
|
|
1060
|
+
inheritAttrs: !1,
|
|
1061
|
+
props: {
|
|
1062
|
+
position: s(y),
|
|
1063
|
+
offset: s(Object),
|
|
1064
|
+
zIndex: s(Number),
|
|
1065
|
+
mapPane: u(x)
|
|
1066
|
+
},
|
|
1067
|
+
emits: void 0,
|
|
1068
|
+
setup(e, { attrs: t }) {
|
|
1069
|
+
return {
|
|
1070
|
+
attrs: g(t),
|
|
1071
|
+
overlay: l()
|
|
1072
|
+
};
|
|
1073
|
+
},
|
|
1074
|
+
watch: {
|
|
1075
|
+
position(e) {
|
|
1076
|
+
this.overlay.setPosition(e);
|
|
1077
|
+
},
|
|
1078
|
+
offset(e) {
|
|
1079
|
+
this.overlay.setOffset(e);
|
|
1080
|
+
},
|
|
1081
|
+
zIndex(e) {
|
|
1082
|
+
this.overlay.setZIndex(e);
|
|
1083
|
+
},
|
|
1084
|
+
visible(e) {
|
|
1085
|
+
this.overlay.setVisible(e);
|
|
1086
|
+
},
|
|
1087
|
+
mapPane() {
|
|
1088
|
+
this.recreate();
|
|
1089
|
+
}
|
|
1090
|
+
},
|
|
1091
|
+
methods: {
|
|
1092
|
+
content() {
|
|
1093
|
+
return this.$el;
|
|
1094
|
+
},
|
|
1095
|
+
marker() {
|
|
1096
|
+
var e;
|
|
1097
|
+
return (e = this.$marker()) == null ? void 0 : e.marker;
|
|
1098
|
+
},
|
|
1099
|
+
$marker() {
|
|
1100
|
+
return U(V, this.$parent, N);
|
|
1101
|
+
},
|
|
1102
|
+
getOptions() {
|
|
1103
|
+
return {
|
|
1104
|
+
content: this.content(),
|
|
1105
|
+
position: this.position,
|
|
1106
|
+
offset: this.offset,
|
|
1107
|
+
zIndex: this.zIndex,
|
|
1108
|
+
mapPane: d(this.mapPane, x)
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
},
|
|
1112
|
+
onCreate() {
|
|
1113
|
+
this.overlay = this.$map.createLabel(this.getOptions()), this.$marker() ? this.$marker().onAddLabel(this) : this.$map.addOverlay(this.overlay), v(this.attrs.listeners, this.overlay);
|
|
1114
|
+
},
|
|
1115
|
+
onDestroy() {
|
|
1116
|
+
this.$marker() ? this.$marker().onRemoveLabel(this) : this.$map.removeOverlay(this.overlay);
|
|
1117
|
+
}
|
|
1118
|
+
});
|
|
1119
|
+
function Ve(e, t, r, o, i, a) {
|
|
1120
|
+
return C(), $("div", I({
|
|
1121
|
+
class: e.$options.name
|
|
1122
|
+
}, e.attrs.binds), [
|
|
1123
|
+
f(e.$slots, "default")
|
|
1124
|
+
], 16);
|
|
1125
|
+
}
|
|
1126
|
+
const yt = /* @__PURE__ */ b(He, [["render", Ve]]), Fe = {
|
|
1127
|
+
paths: m(Array),
|
|
1128
|
+
clickable: s(Boolean),
|
|
1129
|
+
editable: s(Boolean),
|
|
1130
|
+
strokeColor: s(String),
|
|
1131
|
+
strokeOpacity: s(Number),
|
|
1132
|
+
strokeWeight: s(Number),
|
|
1133
|
+
visible: s(Boolean),
|
|
1134
|
+
zIndex: s(Number),
|
|
1135
|
+
fillColor: s(String),
|
|
1136
|
+
fillOpacity: s(Number),
|
|
1137
|
+
"onUpdate:paths": h()
|
|
1138
|
+
}, vt = n({
|
|
1139
|
+
name: "tg-polygon",
|
|
1140
|
+
mixins: [p],
|
|
1141
|
+
inheritAttrs: !1,
|
|
1142
|
+
props: Fe,
|
|
1143
|
+
emits: void 0,
|
|
1144
|
+
setup(e, { attrs: t }) {
|
|
1145
|
+
return {
|
|
1146
|
+
attrs: g(t, e),
|
|
1147
|
+
overlay: l(),
|
|
1148
|
+
emittedPaths: void 0
|
|
1149
|
+
};
|
|
1150
|
+
},
|
|
1151
|
+
watch: {
|
|
1152
|
+
paths: {
|
|
1153
|
+
handler(e) {
|
|
1154
|
+
if (this.emittedPaths != null) {
|
|
1155
|
+
const t = this.emittedPaths;
|
|
1156
|
+
if (this.emittedPaths = void 0, t.length === e.length && t.every((r, o) => r === B(e[o])))
|
|
1157
|
+
return;
|
|
1158
|
+
}
|
|
1159
|
+
this.overlay.setPaths(e);
|
|
1160
|
+
},
|
|
1161
|
+
deep: !0
|
|
1162
|
+
},
|
|
1163
|
+
clickable() {
|
|
1164
|
+
this.recreate();
|
|
1165
|
+
},
|
|
1166
|
+
editable(e) {
|
|
1167
|
+
this.overlay.setEditable(e);
|
|
1168
|
+
},
|
|
1169
|
+
strokeColor(e) {
|
|
1170
|
+
this.overlay.setStrokeColor(e);
|
|
1171
|
+
},
|
|
1172
|
+
strokeOpacity(e) {
|
|
1173
|
+
this.overlay.setStrokeOpacity(e);
|
|
1174
|
+
},
|
|
1175
|
+
strokeWeight(e) {
|
|
1176
|
+
this.overlay.setStrokeWeight(e);
|
|
1177
|
+
},
|
|
1178
|
+
fillColor(e) {
|
|
1179
|
+
this.overlay.setFillColor(e);
|
|
1180
|
+
},
|
|
1181
|
+
fillOpacity(e) {
|
|
1182
|
+
this.overlay.setFillOpacity(e);
|
|
1183
|
+
},
|
|
1184
|
+
visible(e) {
|
|
1185
|
+
this.overlay.setVisible(e);
|
|
1186
|
+
},
|
|
1187
|
+
zIndex(e) {
|
|
1188
|
+
this.overlay.setZIndex(e);
|
|
1189
|
+
}
|
|
1190
|
+
},
|
|
1191
|
+
onCreate() {
|
|
1192
|
+
this.overlay = this.$map.createPolygon(this), this.$map.addOverlay(this.overlay), v(this.attrs.listeners, this.overlay), this.attrs.listenerProps["update:paths"] && this.overlay.addEventListener("paths-edited", () => {
|
|
1193
|
+
this.$emit("update:paths", this.emittedPaths = this.overlay.getPaths());
|
|
1194
|
+
});
|
|
1195
|
+
},
|
|
1196
|
+
onDestroy() {
|
|
1197
|
+
this.$map.removeOverlay(this.overlay);
|
|
1198
|
+
}
|
|
1199
|
+
}), gt = n({
|
|
1200
|
+
name: "tg-polyline",
|
|
1201
|
+
mixins: [p],
|
|
1202
|
+
inheritAttrs: !1,
|
|
1203
|
+
props: {
|
|
1204
|
+
path: m(Array),
|
|
1205
|
+
icons: s(Array),
|
|
1206
|
+
clickable: s(Boolean),
|
|
1207
|
+
editable: s(Boolean),
|
|
1208
|
+
strokeColor: s(String),
|
|
1209
|
+
strokeOpacity: s(Number),
|
|
1210
|
+
strokeWeight: s(Number),
|
|
1211
|
+
visible: s(Boolean),
|
|
1212
|
+
zIndex: s(Number),
|
|
1213
|
+
"onUpdate:path": h()
|
|
1214
|
+
},
|
|
1215
|
+
emits: void 0,
|
|
1216
|
+
setup(e, { attrs: t }) {
|
|
1217
|
+
return {
|
|
1218
|
+
attrs: g(t, e),
|
|
1219
|
+
overlay: l(),
|
|
1220
|
+
emittedPath: void 0
|
|
1221
|
+
};
|
|
1222
|
+
},
|
|
1223
|
+
watch: {
|
|
1224
|
+
path: {
|
|
1225
|
+
handler(e) {
|
|
1226
|
+
if (this.emittedPath != null) {
|
|
1227
|
+
const t = this.emittedPath;
|
|
1228
|
+
if (this.emittedPath = void 0, t === B(e))
|
|
1229
|
+
return;
|
|
1230
|
+
}
|
|
1231
|
+
this.overlay.setPath(e);
|
|
1232
|
+
},
|
|
1233
|
+
deep: !0
|
|
1234
|
+
},
|
|
1235
|
+
icons: {
|
|
1236
|
+
handler() {
|
|
1237
|
+
this.recreate();
|
|
1238
|
+
},
|
|
1239
|
+
deep: !0
|
|
1240
|
+
},
|
|
1241
|
+
clickable() {
|
|
1242
|
+
this.recreate();
|
|
1243
|
+
},
|
|
1244
|
+
editable(e) {
|
|
1245
|
+
this.overlay.setEditable(e);
|
|
1246
|
+
},
|
|
1247
|
+
strokeColor(e) {
|
|
1248
|
+
this.overlay.setStrokeColor(e);
|
|
1249
|
+
},
|
|
1250
|
+
strokeOpacity(e) {
|
|
1251
|
+
this.overlay.setStrokeOpacity(e);
|
|
1252
|
+
},
|
|
1253
|
+
strokeWeight(e) {
|
|
1254
|
+
this.overlay.setStrokeWeight(e);
|
|
1255
|
+
},
|
|
1256
|
+
visible(e) {
|
|
1257
|
+
this.overlay.setVisible(e);
|
|
1258
|
+
},
|
|
1259
|
+
zIndex(e) {
|
|
1260
|
+
this.overlay.setZIndex(e);
|
|
1261
|
+
}
|
|
1262
|
+
},
|
|
1263
|
+
onCreate() {
|
|
1264
|
+
this.overlay = this.$map.createPolyline(this), this.$map.addOverlay(this.overlay), v(this.attrs.listeners, this.overlay), this.attrs.listenerProps["update:path"] && this.overlay.addEventListener("path-edited", () => {
|
|
1265
|
+
this.$emit("update:path", this.emittedPath = this.overlay.getPath());
|
|
1266
|
+
});
|
|
1267
|
+
},
|
|
1268
|
+
onDestroy() {
|
|
1269
|
+
this.overlay.remove();
|
|
1270
|
+
}
|
|
1271
|
+
}), bt = n({
|
|
1272
|
+
name: "tg-rectangle",
|
|
1273
|
+
mixins: [p],
|
|
1274
|
+
inheritAttrs: !1,
|
|
1275
|
+
props: {
|
|
1276
|
+
bounds: m(Object),
|
|
1277
|
+
clickable: s(Boolean),
|
|
1278
|
+
editable: s(Boolean),
|
|
1279
|
+
strokeColor: s(String),
|
|
1280
|
+
strokeOpacity: s(Number),
|
|
1281
|
+
strokeWeight: s(Number),
|
|
1282
|
+
visible: s(Boolean),
|
|
1283
|
+
zIndex: s(Number),
|
|
1284
|
+
fillColor: s(String),
|
|
1285
|
+
fillOpacity: s(Number),
|
|
1286
|
+
"onUpdate:bounds": h()
|
|
1287
|
+
},
|
|
1288
|
+
emits: void 0,
|
|
1289
|
+
setup(e, { attrs: t }) {
|
|
1290
|
+
return {
|
|
1291
|
+
attrs: g(t, e),
|
|
1292
|
+
overlay: l(),
|
|
1293
|
+
emittedBounds: void 0
|
|
1294
|
+
};
|
|
1295
|
+
},
|
|
1296
|
+
watch: {
|
|
1297
|
+
bounds(e) {
|
|
1298
|
+
if (this.emittedBounds != null) {
|
|
1299
|
+
const t = this.emittedBounds;
|
|
1300
|
+
if (this.emittedBounds = void 0, t.equals(e))
|
|
1301
|
+
return;
|
|
1302
|
+
}
|
|
1303
|
+
this.overlay.setBounds(e);
|
|
1304
|
+
},
|
|
1305
|
+
clickable() {
|
|
1306
|
+
this.recreate();
|
|
1307
|
+
},
|
|
1308
|
+
editable(e) {
|
|
1309
|
+
this.overlay.setEditable(e);
|
|
1310
|
+
},
|
|
1311
|
+
strokeColor(e) {
|
|
1312
|
+
this.overlay.setStrokeColor(e);
|
|
1313
|
+
},
|
|
1314
|
+
strokeOpacity(e) {
|
|
1315
|
+
this.overlay.setStrokeOpacity(e);
|
|
1316
|
+
},
|
|
1317
|
+
strokeWeight(e) {
|
|
1318
|
+
this.overlay.setStrokeWeight(e);
|
|
1319
|
+
},
|
|
1320
|
+
fillColor(e) {
|
|
1321
|
+
this.overlay.setFillColor(e);
|
|
1322
|
+
},
|
|
1323
|
+
fillOpacity(e) {
|
|
1324
|
+
this.overlay.setFillOpacity(e);
|
|
1325
|
+
},
|
|
1326
|
+
visible(e) {
|
|
1327
|
+
this.overlay.setVisible(e);
|
|
1328
|
+
},
|
|
1329
|
+
zIndex(e) {
|
|
1330
|
+
this.overlay.setZIndex(e);
|
|
1331
|
+
}
|
|
1332
|
+
},
|
|
1333
|
+
onCreate() {
|
|
1334
|
+
this.overlay = this.$map.createRectangle(this), this.$map.addOverlay(this.overlay), v(this.attrs.listeners, this.overlay), this.attrs.listenerProps["update:bounds"] && this.overlay.addEventListener("bounds-changed", () => {
|
|
1335
|
+
this.$emit("update:bounds", this.emittedBounds = this.overlay.getBounds());
|
|
1336
|
+
});
|
|
1337
|
+
},
|
|
1338
|
+
onDestroy() {
|
|
1339
|
+
this.$map.removeOverlay(this.overlay);
|
|
1340
|
+
}
|
|
1341
|
+
}), Ge = ["beforeUpdate", "updated"], $t = {
|
|
1342
|
+
install(e, t = {}) {
|
|
1343
|
+
if (t.enable !== !1) {
|
|
1344
|
+
const r = n({
|
|
1345
|
+
beforeCreate() {
|
|
1346
|
+
const o = K() ?? "", a = (t.nameRegex || /^[A-Z]/).test(o) ? (_) => {
|
|
1347
|
+
t.hookNames ? t.hookNames.includes(_) && console.debug("[lifecycle]", o, _) : Ge.includes(_) || console.debug("[lifecycle]", o, _);
|
|
1348
|
+
} : S;
|
|
1349
|
+
a("beforeCreate"), this.__life_impl = a;
|
|
1350
|
+
},
|
|
1351
|
+
created() {
|
|
1352
|
+
this.__life("created");
|
|
1353
|
+
},
|
|
1354
|
+
beforeMount() {
|
|
1355
|
+
this.__life("beforeMount");
|
|
1356
|
+
},
|
|
1357
|
+
mounted() {
|
|
1358
|
+
this.__life("mounted");
|
|
1359
|
+
},
|
|
1360
|
+
beforeUpdate() {
|
|
1361
|
+
this.__life("beforeUpdate");
|
|
1362
|
+
},
|
|
1363
|
+
updated() {
|
|
1364
|
+
this.__life("updated");
|
|
1365
|
+
},
|
|
1366
|
+
beforeUnmount() {
|
|
1367
|
+
this.__life("beforeUnmount");
|
|
1368
|
+
},
|
|
1369
|
+
unmounted() {
|
|
1370
|
+
this.__life("unmounted");
|
|
1371
|
+
},
|
|
1372
|
+
methods: {
|
|
1373
|
+
__life(o) {
|
|
1374
|
+
this.__life_impl(o);
|
|
1375
|
+
}
|
|
1376
|
+
},
|
|
1377
|
+
onCreate() {
|
|
1378
|
+
this.__life("onCreate");
|
|
1379
|
+
},
|
|
1380
|
+
onDestroy() {
|
|
1381
|
+
this.__life("onDestroy");
|
|
1382
|
+
}
|
|
1383
|
+
});
|
|
1384
|
+
e.mixin(r);
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
}, Ct = {
|
|
1388
|
+
install(e, t) {
|
|
1389
|
+
pe(t);
|
|
1390
|
+
const r = e.config.optionMergeStrategies;
|
|
1391
|
+
r[O] = r[P] = (o, i) => o ? [...new Set([].concat(o, i))] : Array.isArray(i) ? i : [i];
|
|
1392
|
+
}
|
|
1393
|
+
};
|
|
1394
|
+
export {
|
|
1395
|
+
$t as LifecycleLogPlugin,
|
|
1396
|
+
O as MIXIN_HOOK_CREATE,
|
|
1397
|
+
P as MIXIN_HOOK_DESTROY,
|
|
1398
|
+
j as MIXIN_MAP_NAME,
|
|
1399
|
+
p as MapMixin,
|
|
1400
|
+
ct as TgCircle,
|
|
1401
|
+
it as TgCustomControl,
|
|
1402
|
+
mt as TgElementOverlay,
|
|
1403
|
+
dt as TgHeatmap,
|
|
1404
|
+
ut as TgInfoBox,
|
|
1405
|
+
ft as TgInfoWindow,
|
|
1406
|
+
yt as TgLabel,
|
|
1407
|
+
N as TgMap,
|
|
1408
|
+
at as TgMapTypeControl,
|
|
1409
|
+
ot as TgMapWidget,
|
|
1410
|
+
V as TgMarker,
|
|
1411
|
+
Ae as TgMarkerClusterer,
|
|
1412
|
+
vt as TgPolygon,
|
|
1413
|
+
gt as TgPolyline,
|
|
1414
|
+
bt as TgRectangle,
|
|
1415
|
+
nt as TgScaleControl,
|
|
1416
|
+
lt as TgStreetViewControl,
|
|
1417
|
+
pt as TgTrafficLayer,
|
|
1418
|
+
ht as TgZoomControl,
|
|
1419
|
+
M as callHook,
|
|
1420
|
+
Qe as computedSaveOnThis,
|
|
1421
|
+
E as createEmptyVNode,
|
|
1422
|
+
_e as createPropertyObject,
|
|
1423
|
+
et as createPropertyObjectTyped,
|
|
1424
|
+
Ct as default,
|
|
1425
|
+
h as eventProp,
|
|
1426
|
+
st as extractVNodeFromSlotsByComponent,
|
|
1427
|
+
U as findAncestorComponentByType,
|
|
1428
|
+
tt as findByComponentType,
|
|
1429
|
+
R as isComponentByType,
|
|
1430
|
+
s as optionalProp,
|
|
1431
|
+
m as requiredProp,
|
|
1432
|
+
X as safeAsComponent,
|
|
1433
|
+
ke as splitAttrs,
|
|
1434
|
+
u as stringEnumProp,
|
|
1435
|
+
Ce as stringUnionPropFromValues,
|
|
1436
|
+
rt as useEventLogMethods,
|
|
1437
|
+
g as useSplittedAttrs,
|
|
1438
|
+
H as useTgMapInner
|
|
1439
|
+
};
|
|
1440
|
+
//# sourceMappingURL=tg-map.js.map
|