@shjjs/visual-ui 3.0.7 → 3.0.8
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/es/components/Commons/components/CustomComponentRender/index.vue.mjs +2 -2
- package/es/components/Commons/components/CustomComponentRender/index.vue2.mjs +8 -6
- package/es/components/Commons/components/ModelViewer/index.vue.mjs +81 -71
- package/es/components/Scene/components/Amap2d/index.vue.mjs +2 -2
- package/es/components/Scene/components/Amap2d/index.vue2.mjs +140 -136
- package/es/components/Scene/components/Amap3d/index.vue.mjs +2 -2
- package/es/components/Scene/components/Amap3d/index.vue2.mjs +221 -213
- package/es/components/Scene/components/Map3d/index.vue.mjs +2 -2
- package/es/components/Scene/components/Vr/index.vue.mjs +1 -1
- package/es/components/Scene/components/Vr/index.vue2.mjs +326 -249
- package/es/packages/components/Commons/components/ModelViewer/index.vue.d.ts +2 -1
- package/es/packages/components/Scene/components/Amap2d/index.vue.d.ts +2 -0
- package/es/packages/components/Scene/components/Vr/index.vue.d.ts +2 -1
- package/es/widgets.css +1 -1
- package/package.json +76 -76
- package/umd/index.js +1272 -1269
- package/umd/widgets.css +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { nanoid as
|
|
1
|
+
import { defineComponent as T, computed as X, shallowRef as W, ref as p, onMounted as Y, nextTick as $, onUnmounted as _, watch as d, createElementBlock as L, openBlock as E, createElementVNode as O, createCommentVNode as A, normalizeClass as ee, toDisplayString as te } from "vue";
|
|
2
|
+
import re from "@amap/amap-jsapi-loader";
|
|
3
|
+
import ae from "axios";
|
|
4
|
+
import { nanoid as oe } from "nanoid";
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
7
|
import "../../../Interaction/components/Tabs/index.mjs";
|
|
@@ -157,19 +157,19 @@ import "../UnityIframe/index.mjs";
|
|
|
157
157
|
import "../UnityWebgl/index.mjs";
|
|
158
158
|
import "../Vr/index.mjs";
|
|
159
159
|
import "../Earth/index.mjs";
|
|
160
|
-
import { SHJDatasourceV2 as
|
|
160
|
+
import { SHJDatasourceV2 as le } from "../../../../commons/plugins/datasource/index.mjs";
|
|
161
161
|
import { SHJParseEvent as v } from "../../../../commons/plugins/event/index.mjs";
|
|
162
162
|
import "lodash";
|
|
163
|
-
import { upgradeAmap2d as
|
|
164
|
-
const
|
|
163
|
+
import { upgradeAmap2d as se } from "./version.mjs";
|
|
164
|
+
const ie = { class: "relative w-full h-full" }, ne = {
|
|
165
165
|
key: 0,
|
|
166
166
|
class: "empty-wrap"
|
|
167
|
-
},
|
|
167
|
+
}, ce = {
|
|
168
168
|
key: 0,
|
|
169
169
|
class: "iconfont shj-gaodeditu",
|
|
170
170
|
style: { "font-size": "48px" }
|
|
171
|
-
},
|
|
172
|
-
...
|
|
171
|
+
}, me = { class: "text-gray-500" }, ue = T({ name: "ShjAmap2d" }), da = /* @__PURE__ */ T({
|
|
172
|
+
...ue,
|
|
173
173
|
props: {
|
|
174
174
|
option: {},
|
|
175
175
|
sources: {},
|
|
@@ -184,11 +184,15 @@ const le = { class: "relative w-full h-full" }, se = {
|
|
|
184
184
|
"amap2d-scene-dragging",
|
|
185
185
|
"amap2d-scene-dragend"
|
|
186
186
|
],
|
|
187
|
-
setup(
|
|
188
|
-
const s =
|
|
189
|
-
|
|
187
|
+
setup(n, { expose: D, emit: J }) {
|
|
188
|
+
const s = X(() => se(n.option)), y = J, o = W(), c = W(), g = p(!1), w = p(!1);
|
|
189
|
+
let x = 0;
|
|
190
|
+
const h = p(), b = p(), k = p(), u = p(), C = p(""), f = (t) => {
|
|
191
|
+
x += 1;
|
|
192
|
+
const e = x;
|
|
193
|
+
w.value = !1, I(), window._AMapSecurityConfig = {
|
|
190
194
|
securityJsCode: t.basic.securityJsCode
|
|
191
|
-
},
|
|
195
|
+
}, re.load({
|
|
192
196
|
key: t.basic.key,
|
|
193
197
|
// 申请好的Web端开发者Key,首次调用 load 时必填
|
|
194
198
|
version: "2.0",
|
|
@@ -205,9 +209,10 @@ const le = { class: "relative w-full h-full" }, se = {
|
|
|
205
209
|
"AMap.ImageLayer",
|
|
206
210
|
"AMap.TileLayer"
|
|
207
211
|
]
|
|
208
|
-
}).then((
|
|
209
|
-
|
|
210
|
-
|
|
212
|
+
}).then((r) => {
|
|
213
|
+
if (w.value || e !== x) return;
|
|
214
|
+
u.value = r;
|
|
215
|
+
const l = new u.value.createDefaultLayer({
|
|
211
216
|
visible: !0,
|
|
212
217
|
// 是否可见
|
|
213
218
|
opacity: 1,
|
|
@@ -215,7 +220,7 @@ const le = { class: "relative w-full h-full" }, se = {
|
|
|
215
220
|
zIndex: 0
|
|
216
221
|
// 叠加层级
|
|
217
222
|
});
|
|
218
|
-
o.value = new
|
|
223
|
+
o.value = new r.Map("zerov-amap-2d", {
|
|
219
224
|
rotateEnable: t.config.rotateEnable,
|
|
220
225
|
// 是否开启地图旋转交互 鼠标右键 + 鼠标画圈移动 或 键盘Ctrl + 鼠标画圈移动
|
|
221
226
|
pitchEnable: t.config.pitchEnable,
|
|
@@ -232,8 +237,8 @@ const le = { class: "relative w-full h-full" }, se = {
|
|
|
232
237
|
// 初始地图中心经纬度
|
|
233
238
|
mapStyle: t.config.mapStyle,
|
|
234
239
|
features: t.config.features,
|
|
235
|
-
layers: [
|
|
236
|
-
}),
|
|
240
|
+
layers: [l]
|
|
241
|
+
}), c.value = new window.Loca.Container({
|
|
237
242
|
map: o.value
|
|
238
243
|
}), k.value = new u.value.Scale({
|
|
239
244
|
visible: t.config.plugin.scale.visible,
|
|
@@ -241,100 +246,97 @@ const le = { class: "relative w-full h-full" }, se = {
|
|
|
241
246
|
left: t.config.plugin.scale.position.left + "px",
|
|
242
247
|
bottom: t.config.plugin.scale.position.bottom + "px"
|
|
243
248
|
}
|
|
244
|
-
}), o.value.addControl(k.value), h.value = new
|
|
249
|
+
}), o.value.addControl(k.value), h.value = new r.ControlBar({
|
|
245
250
|
visible: t.config.plugin.controlBar.visible,
|
|
246
251
|
showControlButton: t.config.plugin.controlBar.showControlButton,
|
|
247
252
|
position: {
|
|
248
253
|
right: t.config.plugin.controlBar.position.right + "px",
|
|
249
254
|
top: t.config.plugin.controlBar.position.top + "px"
|
|
250
255
|
}
|
|
251
|
-
}), o.value.addControl(h.value), b.value = new
|
|
256
|
+
}), o.value.addControl(h.value), b.value = new r.ToolBar({
|
|
252
257
|
visible: t.config.plugin.toolBar.visible,
|
|
253
258
|
position: {
|
|
254
259
|
left: t.config.plugin.toolBar.position.left + "px",
|
|
255
260
|
top: t.config.plugin.toolBar.position.top + "px"
|
|
256
261
|
}
|
|
257
|
-
}), o.value.addControl(b.value),
|
|
262
|
+
}), o.value.addControl(b.value), B(r), o.value.on("complete", () => {
|
|
258
263
|
setTimeout(() => {
|
|
259
|
-
g.value = !0,
|
|
264
|
+
g.value = !0, y("amap2d-scene-success"), v.parseEvents(n.useEvents, "amap2d-scene-success", null);
|
|
260
265
|
}, 666);
|
|
261
266
|
}), o.value.on("zoomstart", () => {
|
|
262
|
-
|
|
267
|
+
y("amap2d-scene-zoomstart"), v.parseEvents(n.useEvents, "amap2d-scene-zoomstart", null);
|
|
263
268
|
}), o.value.on("zoomend", () => {
|
|
264
|
-
|
|
269
|
+
y("amap2d-scene-zoomend"), v.parseEvents(n.useEvents, "amap2d-scene-zoomend", null);
|
|
265
270
|
}), o.value.on("click", (a) => {
|
|
266
|
-
|
|
271
|
+
y("amap2d-scene-mapclick", a.lnglat), v.parseEvents(n.useEvents, "amap2d-scene-mapclick", a.lnglat);
|
|
267
272
|
}), o.value.on("dragstart", (a) => {
|
|
268
|
-
|
|
269
|
-
|
|
273
|
+
y("amap2d-scene-dragstart", a.lnglat), v.parseEvents(
|
|
274
|
+
n.useEvents,
|
|
270
275
|
"amap2d-scene-dragstart",
|
|
271
276
|
a.lnglat
|
|
272
277
|
);
|
|
273
278
|
}), o.value.on("dragend", (a) => {
|
|
274
|
-
|
|
279
|
+
y("amap2d-scene-dragend", a.lnglat), v.parseEvents(n.useEvents, "amap2d-scene-dragend", a.lnglat);
|
|
275
280
|
});
|
|
276
|
-
}).catch((
|
|
277
|
-
g.value = !1,
|
|
281
|
+
}).catch((r) => {
|
|
282
|
+
g.value = !1, C.value = "缺少必要的Key和密钥,请先在右侧配置面板中进行配置";
|
|
278
283
|
});
|
|
279
|
-
},
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
sources: [
|
|
283
|
-
callback: (
|
|
284
|
+
}, B = (t) => {
|
|
285
|
+
n.sources && n.sources.length > 0 && s.value.widgets.forEach((r, l) => {
|
|
286
|
+
r && r.type === "boundary" || le.parse({
|
|
287
|
+
sources: [n.sources[l]],
|
|
288
|
+
callback: (a) => {
|
|
284
289
|
try {
|
|
285
|
-
r && r.type === "heatmap" &&
|
|
290
|
+
r && r.type === "heatmap" && F(t, r, a.data[0].data), r && r.type === "dotlayers" && H(
|
|
286
291
|
window.Loca,
|
|
287
292
|
r,
|
|
288
|
-
|
|
289
|
-
), r && r.type === "scatter" &&
|
|
293
|
+
S(a.data[0].data)
|
|
294
|
+
), r && r.type === "scatter" && V(
|
|
290
295
|
window.Loca,
|
|
291
296
|
r,
|
|
292
|
-
|
|
293
|
-
), r && r.type === "labelsLayer" &&
|
|
297
|
+
S(a.data[0].data)
|
|
298
|
+
), r && r.type === "labelsLayer" && R(
|
|
294
299
|
window.Loca,
|
|
295
300
|
r,
|
|
296
|
-
|
|
301
|
+
S(a.data[0].data)
|
|
297
302
|
);
|
|
298
303
|
} catch {
|
|
299
304
|
}
|
|
300
|
-
s.value.widgets.filter((i) => i.type === "boundary").forEach((i) => {
|
|
301
|
-
O(t, i);
|
|
302
|
-
});
|
|
303
305
|
}
|
|
304
306
|
});
|
|
305
|
-
})
|
|
306
|
-
|
|
307
|
+
}), s.value.widgets.filter((r) => r.type === "boundary").forEach((r) => {
|
|
308
|
+
G(t, r);
|
|
307
309
|
});
|
|
308
310
|
const e = o.value.getLayers();
|
|
309
311
|
for (let r = 0; r < e.length; r++)
|
|
310
312
|
(e[r].type === "sketchTileLayer" || e[r]._opts.type === "sketchImageLayer") && o.value.removeLayer(e[r]);
|
|
311
313
|
s.value.widgets.filter((r) => r.type === "sketchTile").forEach((r) => {
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
+
const l = N(r);
|
|
315
|
+
l && o.value.addLayer(l);
|
|
314
316
|
}), s.value.widgets.filter((r) => r.type === "sketchImage").forEach((r) => {
|
|
315
|
-
const
|
|
316
|
-
o.value.addLayer(
|
|
317
|
+
const l = j(r);
|
|
318
|
+
o.value.addLayer(l);
|
|
317
319
|
});
|
|
318
|
-
},
|
|
320
|
+
}, P = (t) => {
|
|
319
321
|
const r = t.slice(
|
|
320
322
|
t.indexOf("(") + 1,
|
|
321
323
|
t.lastIndexOf(")")
|
|
322
|
-
).split(",").map((
|
|
323
|
-
for (let
|
|
324
|
-
const
|
|
325
|
-
|
|
324
|
+
).split(",").map((a) => a.trim()), l = {};
|
|
325
|
+
for (let a = 1; a < r.length; a++) {
|
|
326
|
+
const m = r[a].split(" "), i = m[0], z = parseFloat(m[1]) / 100, Q = Math.round(z * 100) / 100;
|
|
327
|
+
l[Q] = i;
|
|
326
328
|
}
|
|
327
|
-
return
|
|
328
|
-
},
|
|
329
|
+
return l;
|
|
330
|
+
}, N = (t) => {
|
|
329
331
|
try {
|
|
330
332
|
return new u.value.TileLayer({
|
|
331
333
|
bounds: new u.value.Bounds(
|
|
332
334
|
t.bounds[0],
|
|
333
335
|
t.bounds[1]
|
|
334
336
|
),
|
|
335
|
-
getTileUrl: function(r,
|
|
337
|
+
getTileUrl: function(r, l, a) {
|
|
336
338
|
try {
|
|
337
|
-
return t.url.replace("{z}",
|
|
339
|
+
return t.url.replace("{z}", a).replace("{x}", r).replace("{y}", l);
|
|
338
340
|
} catch {
|
|
339
341
|
}
|
|
340
342
|
},
|
|
@@ -347,7 +349,7 @@ const le = { class: "relative w-full h-full" }, se = {
|
|
|
347
349
|
} catch {
|
|
348
350
|
}
|
|
349
351
|
return null;
|
|
350
|
-
},
|
|
352
|
+
}, j = (t) => {
|
|
351
353
|
try {
|
|
352
354
|
return new u.value.ImageLayer({
|
|
353
355
|
bounds: new u.value.Bounds(
|
|
@@ -366,31 +368,31 @@ const le = { class: "relative w-full h-full" }, se = {
|
|
|
366
368
|
} catch {
|
|
367
369
|
}
|
|
368
370
|
return null;
|
|
369
|
-
},
|
|
371
|
+
}, F = (t, e, r) => {
|
|
370
372
|
try {
|
|
371
|
-
const
|
|
373
|
+
const l = new t.HeatMap(o.value, {
|
|
372
374
|
radius: e.radius,
|
|
373
375
|
// 给定半径
|
|
374
376
|
opacity: e.opacity,
|
|
375
|
-
gradient:
|
|
377
|
+
gradient: P(e.gradient)
|
|
376
378
|
});
|
|
377
379
|
setTimeout(() => {
|
|
378
|
-
|
|
380
|
+
l.setDataSet({
|
|
379
381
|
data: r,
|
|
380
382
|
max: e.max
|
|
381
383
|
});
|
|
382
384
|
}, 0);
|
|
383
385
|
} catch {
|
|
384
386
|
}
|
|
385
|
-
},
|
|
387
|
+
}, G = async (t, e) => {
|
|
386
388
|
try {
|
|
387
|
-
const r = await
|
|
389
|
+
const r = await ae.get(e.geojson);
|
|
388
390
|
if (r.status === 200) {
|
|
389
|
-
const
|
|
391
|
+
const l = new t.GeoJSON({
|
|
390
392
|
geoJSON: r.data,
|
|
391
|
-
getPolygon: function(
|
|
392
|
-
const
|
|
393
|
-
path:
|
|
393
|
+
getPolygon: function(a, m) {
|
|
394
|
+
const i = new t.Polygon({
|
|
395
|
+
path: m,
|
|
394
396
|
zIndex: e.zIndex,
|
|
395
397
|
fillColor: e.style.fillColor,
|
|
396
398
|
// 填充色
|
|
@@ -405,8 +407,8 @@ const le = { class: "relative w-full h-full" }, se = {
|
|
|
405
407
|
strokeStyle: e.style.strokeStyle
|
|
406
408
|
// 线条样式
|
|
407
409
|
});
|
|
408
|
-
return
|
|
409
|
-
|
|
410
|
+
return i.on("mouseover", () => {
|
|
411
|
+
i.setOptions({
|
|
410
412
|
fillOpacity: e.mouseover.fillOpacity,
|
|
411
413
|
fillColor: e.mouseover.fillColor,
|
|
412
414
|
strokeOpacity: e.mouseover.strokeOpacity,
|
|
@@ -414,8 +416,8 @@ const le = { class: "relative w-full h-full" }, se = {
|
|
|
414
416
|
strokeStyle: e.mouseover.strokeStyle,
|
|
415
417
|
strokeWeight: e.mouseover.strokeWeight
|
|
416
418
|
});
|
|
417
|
-
}),
|
|
418
|
-
|
|
419
|
+
}), i.on("mouseout", () => {
|
|
420
|
+
i.setOptions({
|
|
419
421
|
fillColor: e.style.fillColor,
|
|
420
422
|
// 填充色
|
|
421
423
|
strokeOpacity: e.style.strokeOpacity,
|
|
@@ -429,23 +431,23 @@ const le = { class: "relative w-full h-full" }, se = {
|
|
|
429
431
|
strokeStyle: e.style.strokeStyle
|
|
430
432
|
// 线条样式
|
|
431
433
|
});
|
|
432
|
-
}),
|
|
434
|
+
}), i;
|
|
433
435
|
}
|
|
434
436
|
});
|
|
435
|
-
o.value.add(
|
|
437
|
+
o.value.add(l);
|
|
436
438
|
}
|
|
437
439
|
} catch {
|
|
438
440
|
}
|
|
439
|
-
},
|
|
441
|
+
}, H = (t, e, r) => {
|
|
440
442
|
try {
|
|
441
|
-
const
|
|
443
|
+
const l = new t.GeoJSONSource({
|
|
442
444
|
data: r
|
|
443
|
-
}),
|
|
445
|
+
}), a = new t.PointLayer({
|
|
444
446
|
zIndex: e.zIndex,
|
|
445
447
|
blend: e.blend,
|
|
446
448
|
visible: e.visible,
|
|
447
449
|
opacity: e.opacity
|
|
448
|
-
}),
|
|
450
|
+
}), m = {
|
|
449
451
|
radius: e.style.radius,
|
|
450
452
|
unit: e.style.unit,
|
|
451
453
|
color: e.style.color,
|
|
@@ -453,7 +455,7 @@ const le = { class: "relative w-full h-full" }, se = {
|
|
|
453
455
|
blurWidth: e.style.blurWidth,
|
|
454
456
|
borderColor: e.style.borderColor
|
|
455
457
|
};
|
|
456
|
-
|
|
458
|
+
a.setSource(l), a.setStyle(m), c.value.add(a), a.addAnimate({
|
|
457
459
|
key: e.animate.key,
|
|
458
460
|
value: e.animate.value,
|
|
459
461
|
duration: e.animate.duration,
|
|
@@ -466,32 +468,32 @@ const le = { class: "relative w-full h-full" }, se = {
|
|
|
466
468
|
});
|
|
467
469
|
} catch {
|
|
468
470
|
}
|
|
469
|
-
},
|
|
471
|
+
}, V = (t, e, r) => {
|
|
470
472
|
try {
|
|
471
|
-
const
|
|
473
|
+
const l = new t.GeoJSONSource({
|
|
472
474
|
data: r
|
|
473
|
-
}),
|
|
474
|
-
loca:
|
|
475
|
+
}), a = new t.ScatterLayer({
|
|
476
|
+
loca: c.value,
|
|
475
477
|
zIndex: e.zIndex,
|
|
476
478
|
opacity: e.opacity,
|
|
477
479
|
visible: e.visible,
|
|
478
480
|
zooms: e.zooms
|
|
479
481
|
});
|
|
480
|
-
|
|
482
|
+
a.setSource(l), a.setStyle({
|
|
481
483
|
unit: e.style.unit,
|
|
482
484
|
size: e.style.size,
|
|
483
485
|
borderWidth: e.style.borderWidth,
|
|
484
486
|
texture: e.style.texture,
|
|
485
487
|
duration: e.style.duration,
|
|
486
488
|
animate: e.style.animate
|
|
487
|
-
}),
|
|
489
|
+
}), c.value.animate.start();
|
|
488
490
|
} catch {
|
|
489
491
|
}
|
|
490
|
-
},
|
|
492
|
+
}, R = (t, e, r) => {
|
|
491
493
|
try {
|
|
492
|
-
const
|
|
494
|
+
const l = new t.GeoJSONSource({
|
|
493
495
|
data: r
|
|
494
|
-
}),
|
|
496
|
+
}), a = new t.LabelsLayer({
|
|
495
497
|
eventSupport: !0,
|
|
496
498
|
visible: e.visible,
|
|
497
499
|
zooms: e.zooms,
|
|
@@ -500,7 +502,7 @@ const le = { class: "relative w-full h-full" }, se = {
|
|
|
500
502
|
allowCollision: e.allowCollision,
|
|
501
503
|
zIndex: e.zIndex
|
|
502
504
|
});
|
|
503
|
-
|
|
505
|
+
a.setSource(l), a.setStyle({
|
|
504
506
|
icon: {
|
|
505
507
|
image: e.icon.image,
|
|
506
508
|
size: e.icon.size,
|
|
@@ -510,7 +512,7 @@ const le = { class: "relative w-full h-full" }, se = {
|
|
|
510
512
|
},
|
|
511
513
|
text: {
|
|
512
514
|
// 每项配置都可使用回调函数来动态配置
|
|
513
|
-
content: (
|
|
515
|
+
content: (m, i) => i.properties[e.text.content],
|
|
514
516
|
zooms: e.text.zooms,
|
|
515
517
|
offset: e.text.offset,
|
|
516
518
|
direction: e.text.direction,
|
|
@@ -527,25 +529,25 @@ const le = { class: "relative w-full h-full" }, se = {
|
|
|
527
529
|
fontWeight: e.text.style.fontWeight
|
|
528
530
|
}
|
|
529
531
|
}
|
|
530
|
-
}),
|
|
531
|
-
const
|
|
532
|
-
for (const
|
|
533
|
-
|
|
534
|
-
}),
|
|
535
|
-
}),
|
|
532
|
+
}), a.on("complete", () => {
|
|
533
|
+
const m = a.getLabelsLayer().getAllOverlays();
|
|
534
|
+
for (const i of m)
|
|
535
|
+
i.on("click", (z) => {
|
|
536
|
+
}), i.on("mouseover", (z) => {
|
|
537
|
+
}), i.on("mouseout", (z) => {
|
|
536
538
|
});
|
|
537
|
-
}),
|
|
539
|
+
}), c.value.add(a);
|
|
538
540
|
} catch {
|
|
539
541
|
}
|
|
540
|
-
},
|
|
542
|
+
}, S = (t) => {
|
|
541
543
|
const e = {
|
|
542
544
|
type: "FeatureCollection",
|
|
543
545
|
features: []
|
|
544
546
|
};
|
|
545
547
|
return t.forEach((r) => {
|
|
546
|
-
const
|
|
548
|
+
const l = {
|
|
547
549
|
type: "Feature",
|
|
548
|
-
id:
|
|
550
|
+
id: oe(),
|
|
549
551
|
properties: {
|
|
550
552
|
name: r.name || "",
|
|
551
553
|
_draw_type: "point"
|
|
@@ -555,91 +557,93 @@ const le = { class: "relative w-full h-full" }, se = {
|
|
|
555
557
|
coordinates: r.value
|
|
556
558
|
}
|
|
557
559
|
};
|
|
558
|
-
e.features.push(
|
|
560
|
+
e.features.push(l);
|
|
559
561
|
}), e;
|
|
560
|
-
},
|
|
562
|
+
}, M = (t) => {
|
|
561
563
|
o.value && (o.value.setFeatures(t.config.features), o.value.setStatus({
|
|
562
564
|
dragEnable: t.config.dragEnable,
|
|
563
565
|
zoomEnable: t.config.zoomEnable,
|
|
564
566
|
rotateEnable: t.config.rotateEnable
|
|
565
567
|
}), t.config.plugin.scale.visible ? k.value.show() : k.value.hide(), t.config.plugin.toolBar.visible ? b.value.show() : b.value.hide(), t.config.plugin.controlBar.visible ? h.value.show() : h.value.hide());
|
|
566
|
-
},
|
|
567
|
-
o.value && (o.value.clearMap(),
|
|
568
|
-
},
|
|
568
|
+
}, U = () => {
|
|
569
|
+
o.value && (o.value.clearMap(), c.value.clear(), B(u.value));
|
|
570
|
+
}, Z = (t) => {
|
|
569
571
|
o.value && o.value.setMapStyle(t.config.mapStyle);
|
|
570
|
-
},
|
|
572
|
+
}, K = (t) => {
|
|
571
573
|
o.value && o.value.setZoom(t.config.zoom, !1, 200);
|
|
572
|
-
},
|
|
574
|
+
}, q = (t) => {
|
|
573
575
|
o.value && o.value.setCenter(t.config.center, !1, 200);
|
|
574
576
|
}, I = () => {
|
|
575
|
-
o.value && (o.value.clearMap(), o.value.destroy(), o.value = null,
|
|
577
|
+
o.value && (o.value.clearMap(), o.value.destroy(), o.value = null), c.value && (c.value.clear(), c.value.destroy(), c.value = null);
|
|
576
578
|
};
|
|
577
|
-
return
|
|
578
|
-
|
|
579
|
+
return Y(() => {
|
|
580
|
+
$(() => {
|
|
579
581
|
f(s.value);
|
|
580
582
|
});
|
|
581
|
-
}),
|
|
583
|
+
}), _(() => {
|
|
584
|
+
w.value = !0, I();
|
|
585
|
+
}), d(
|
|
582
586
|
() => s.value.config,
|
|
583
587
|
() => {
|
|
584
|
-
|
|
588
|
+
M(s.value);
|
|
585
589
|
},
|
|
586
590
|
{ deep: !0 }
|
|
587
|
-
),
|
|
591
|
+
), d(
|
|
588
592
|
() => s.value.config.zoom,
|
|
589
593
|
() => {
|
|
590
|
-
|
|
594
|
+
K(s.value);
|
|
591
595
|
},
|
|
592
596
|
{ deep: !0 }
|
|
593
|
-
),
|
|
597
|
+
), d(
|
|
594
598
|
() => s.value.config.center,
|
|
595
599
|
() => {
|
|
596
|
-
|
|
600
|
+
q(s.value);
|
|
597
601
|
},
|
|
598
602
|
{ deep: !0 }
|
|
599
|
-
),
|
|
603
|
+
), d(
|
|
600
604
|
() => s.value.widgets,
|
|
601
605
|
() => {
|
|
602
|
-
|
|
606
|
+
U();
|
|
603
607
|
},
|
|
604
608
|
{ deep: !0 }
|
|
605
|
-
),
|
|
609
|
+
), d(
|
|
606
610
|
() => s.value.config.mapStyle,
|
|
607
611
|
() => {
|
|
608
|
-
|
|
612
|
+
Z(s.value);
|
|
609
613
|
},
|
|
610
614
|
{ deep: !0 }
|
|
611
|
-
),
|
|
615
|
+
), d(
|
|
612
616
|
() => s.value.basic,
|
|
613
617
|
() => {
|
|
614
618
|
f(s.value);
|
|
615
619
|
},
|
|
616
620
|
{ deep: !0 }
|
|
617
|
-
),
|
|
618
|
-
() =>
|
|
621
|
+
), d(
|
|
622
|
+
() => n.sources,
|
|
619
623
|
() => {
|
|
620
624
|
f(s.value);
|
|
621
625
|
},
|
|
622
626
|
{ deep: !0 }
|
|
623
627
|
), D({
|
|
624
628
|
refresh: () => f(s.value),
|
|
625
|
-
refreshView: () =>
|
|
629
|
+
refreshView: () => M(s.value),
|
|
626
630
|
refreshData: () => f(s.value)
|
|
627
|
-
}), (t, e) => (
|
|
628
|
-
|
|
629
|
-
class:
|
|
631
|
+
}), (t, e) => (E(), L("div", ie, [
|
|
632
|
+
O("div", {
|
|
633
|
+
class: ee(["amap-2d-wrap", { show: g.value }])
|
|
630
634
|
}, e[0] || (e[0] = [
|
|
631
|
-
|
|
635
|
+
O("div", {
|
|
632
636
|
id: "zerov-amap-2d",
|
|
633
637
|
class: "zerov-amap-container"
|
|
634
638
|
}, null, -1)
|
|
635
639
|
]), 2),
|
|
636
|
-
g.value ?
|
|
637
|
-
|
|
638
|
-
|
|
640
|
+
g.value ? A("", !0) : (E(), L("div", ne, [
|
|
641
|
+
C.value !== "" ? (E(), L("i", ce)) : A("", !0),
|
|
642
|
+
O("p", me, te(C.value), 1)
|
|
639
643
|
]))
|
|
640
644
|
]));
|
|
641
645
|
}
|
|
642
646
|
});
|
|
643
647
|
export {
|
|
644
|
-
|
|
648
|
+
da as default
|
|
645
649
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f8d2f985"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|