@shjjs/visual-ui 2.0.6 → 2.0.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/es/commons/plugins/datasource/utils/utils.mjs +5 -5
- package/es/components/Scene/components/Amap2d/index.vue.mjs +2 -2
- package/es/components/Scene/components/Amap2d/index.vue2.mjs +114 -103
- package/es/components/Scene/components/Amap3d/index.vue.mjs +2 -2
- package/es/components/Scene/components/Amap3d/index.vue2.mjs +188 -176
- package/es/components/Scene/components/Map3d/index.vue.mjs +2 -2
- package/es/components/Scene/components/Map3d/index.vue2.mjs +133 -132
- package/es/packages/components/Scene/components/Amap2d/index.vue.d.ts +2 -0
- package/es/packages/components/Scene/components/Amap3d/index.vue.d.ts +1 -0
- package/es/packages/components/Scene/components/Map3d/index.vue.d.ts +1 -1
- package/es/widgets.css +1 -1
- package/package.json +1 -1
- package/umd/index.js +567 -567
- package/umd/widgets.css +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { nanoid as
|
|
5
|
-
import { debounce as
|
|
1
|
+
import { defineComponent as P, computed as B, watch as u, createElementBlock as C, openBlock as S, normalizeClass as oe, unref as ie, createElementVNode as L, shallowRef as W, ref as h, onMounted as ne, onUnmounted as ce } from "vue";
|
|
2
|
+
import me from "@amap/amap-jsapi-loader";
|
|
3
|
+
import de from "axios";
|
|
4
|
+
import { nanoid as ue } from "nanoid";
|
|
5
|
+
import { debounce as E } from "lodash";
|
|
6
6
|
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
8
|
import "../../../Interaction/components/Tabs/index.mjs";
|
|
@@ -157,14 +157,17 @@ 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 ye } from "../../../../commons/plugins/datasource/index.mjs";
|
|
161
161
|
import { SHJParseEvent as p } from "../../../../commons/plugins/event/index.mjs";
|
|
162
|
-
import { upgradeAmap3d as
|
|
163
|
-
const
|
|
162
|
+
import { upgradeAmap3d as pe } from "./version.mjs";
|
|
163
|
+
const ge = { class: "relative w-full h-full" }, fe = {
|
|
164
|
+
ref: "amap3dContainer",
|
|
165
|
+
class: "zerov-amap-container"
|
|
166
|
+
}, ve = {
|
|
164
167
|
key: 1,
|
|
165
|
-
class: "
|
|
166
|
-
},
|
|
167
|
-
...
|
|
168
|
+
class: "empty-wrap"
|
|
169
|
+
}, he = P({ name: "ShjAmap3d" }), kr = /* @__PURE__ */ P({
|
|
170
|
+
...he,
|
|
168
171
|
props: {
|
|
169
172
|
option: {},
|
|
170
173
|
sources: {},
|
|
@@ -180,13 +183,23 @@ const ye = {
|
|
|
180
183
|
"amap3d-scene-dragend",
|
|
181
184
|
"amap3d-scene-pulseLinkLayer"
|
|
182
185
|
],
|
|
183
|
-
setup(m, { expose:
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
186
|
+
setup(m, { expose: $, emit: J }) {
|
|
187
|
+
const i = B(() => pe(m.option)), D = B(
|
|
188
|
+
() => {
|
|
189
|
+
var s, n;
|
|
190
|
+
return !!((s = i.value.basic) != null && s.key && ((n = i.value.basic) != null && n.securityJsCode));
|
|
191
|
+
}
|
|
192
|
+
), y = J, T = () => {
|
|
193
|
+
const s = W(), n = W(), w = h(!1), j = h(), k = h(), b = h(), z = h(), d = h(), A = (t) => {
|
|
194
|
+
var e, a;
|
|
195
|
+
if (!((e = t.basic) != null && e.key) || !((a = t.basic) != null && a.securityJsCode)) {
|
|
196
|
+
w.value = !1, x();
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
x(), window._AMapSecurityConfig = {
|
|
200
|
+
securityJsCode: t.basic.securityJsCode || ""
|
|
201
|
+
}, me.load({
|
|
202
|
+
key: t.basic.key || "",
|
|
190
203
|
// 申请好的Web端开发者Key,首次调用 load 时必填
|
|
191
204
|
version: "2.0",
|
|
192
205
|
// 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
@@ -202,9 +215,9 @@ const ye = {
|
|
|
202
215
|
"AMap.ImageLayer",
|
|
203
216
|
"AMap.TileLayer"
|
|
204
217
|
]
|
|
205
|
-
}).then((
|
|
206
|
-
d.value =
|
|
207
|
-
const
|
|
218
|
+
}).then((r) => {
|
|
219
|
+
d.value = r;
|
|
220
|
+
const l = new d.value.createDefaultLayer({
|
|
208
221
|
visible: !0,
|
|
209
222
|
// 是否可见
|
|
210
223
|
opacity: 1,
|
|
@@ -212,7 +225,7 @@ const ye = {
|
|
|
212
225
|
zIndex: 0
|
|
213
226
|
// 叠加层级
|
|
214
227
|
});
|
|
215
|
-
|
|
228
|
+
s.value = new r.Map(j.value, {
|
|
216
229
|
rotateEnable: t.config.rotateEnable,
|
|
217
230
|
// 是否开启地图旋转交互 鼠标右键 + 鼠标画圈移动 或 键盘Ctrl + 鼠标画圈移动
|
|
218
231
|
pitchEnable: t.config.pitchEnable,
|
|
@@ -237,119 +250,119 @@ const ye = {
|
|
|
237
250
|
wallColor: t.config.floors.wallColor,
|
|
238
251
|
roofColor: t.config.floors.roofColor,
|
|
239
252
|
skyColor: t.config.skyColor,
|
|
240
|
-
layers: [
|
|
241
|
-
}),
|
|
242
|
-
map:
|
|
253
|
+
layers: [l]
|
|
254
|
+
}), n.value = new window.Loca.Container({
|
|
255
|
+
map: s.value
|
|
243
256
|
}), z.value = new d.value.Scale({
|
|
244
257
|
visible: t.config.plugin.scale.visible,
|
|
245
258
|
position: {
|
|
246
259
|
left: t.config.plugin.scale.position.left + "px",
|
|
247
260
|
bottom: t.config.plugin.scale.position.bottom + "px"
|
|
248
261
|
}
|
|
249
|
-
}),
|
|
262
|
+
}), s.value.addControl(z.value), k.value = new r.ControlBar({
|
|
250
263
|
visible: t.config.plugin.controlBar.visible,
|
|
251
264
|
showControlButton: t.config.plugin.controlBar.showControlButton,
|
|
252
265
|
position: {
|
|
253
266
|
right: t.config.plugin.controlBar.position.right + "px",
|
|
254
267
|
top: t.config.plugin.controlBar.position.top + "px"
|
|
255
268
|
}
|
|
256
|
-
}),
|
|
269
|
+
}), s.value.addControl(k.value), b.value = new r.ToolBar({
|
|
257
270
|
visible: t.config.plugin.toolBar.visible,
|
|
258
271
|
position: {
|
|
259
272
|
left: t.config.plugin.toolBar.position.left + "px",
|
|
260
273
|
top: t.config.plugin.toolBar.position.top + "px"
|
|
261
274
|
}
|
|
262
|
-
}),
|
|
275
|
+
}), s.value.addControl(b.value), I(r), s.value.on("complete", () => {
|
|
263
276
|
setTimeout(() => {
|
|
264
|
-
|
|
277
|
+
w.value = !0, y("amap3d-scene-success"), p.parseEvents(m.useEvents, "amap3d-scene-success", null);
|
|
265
278
|
}, 666);
|
|
266
|
-
}),
|
|
279
|
+
}), s.value.on("zoomstart", () => {
|
|
267
280
|
y("amap3d-scene-zoomstart"), p.parseEvents(m.useEvents, "amap3d-scene-zoomstart", null);
|
|
268
|
-
}),
|
|
281
|
+
}), s.value.on("zoomend", () => {
|
|
269
282
|
y("amap3d-scene-zoomend"), p.parseEvents(m.useEvents, "amap3d-scene-zoomend", null);
|
|
270
|
-
}),
|
|
271
|
-
y("amap3d-scene-mapclick",
|
|
283
|
+
}), s.value.on("click", (o) => {
|
|
284
|
+
y("amap3d-scene-mapclick", o.lnglat), p.parseEvents(
|
|
272
285
|
m.useEvents,
|
|
273
286
|
"amap3d-scene-mapclick",
|
|
274
|
-
|
|
287
|
+
o.lnglat
|
|
275
288
|
);
|
|
276
|
-
}),
|
|
277
|
-
y("amap3d-scene-dragstart",
|
|
289
|
+
}), s.value.on("dragstart", (o) => {
|
|
290
|
+
y("amap3d-scene-dragstart", o.lnglat), p.parseEvents(
|
|
278
291
|
m.useEvents,
|
|
279
292
|
"amap3d-scene-dragstart",
|
|
280
|
-
|
|
293
|
+
o.lnglat
|
|
281
294
|
);
|
|
282
|
-
}),
|
|
283
|
-
y("amap3d-scene-dragend",
|
|
295
|
+
}), s.value.on("dragend", (o) => {
|
|
296
|
+
y("amap3d-scene-dragend", o.lnglat), p.parseEvents(
|
|
284
297
|
m.useEvents,
|
|
285
298
|
"amap3d-scene-dragend",
|
|
286
|
-
|
|
299
|
+
o.lnglat
|
|
287
300
|
);
|
|
288
301
|
});
|
|
289
|
-
}).catch((
|
|
302
|
+
}).catch((r) => {
|
|
290
303
|
});
|
|
291
|
-
},
|
|
292
|
-
m.sources && m.sources.length > 0 ?
|
|
293
|
-
|
|
304
|
+
}, I = E((t) => {
|
|
305
|
+
m.sources && m.sources.length > 0 ? i.value.widgets.forEach((a, r) => {
|
|
306
|
+
ye.parse({
|
|
294
307
|
sources: [m.sources[r]],
|
|
295
308
|
callback: (l) => {
|
|
296
309
|
try {
|
|
297
|
-
a && a.type === "heatmap" &&
|
|
310
|
+
a && a.type === "heatmap" && U(
|
|
298
311
|
window.Loca,
|
|
299
312
|
a,
|
|
300
313
|
f(l.data[0].data, "Point")
|
|
301
|
-
), a && a.type === "dotlayers" &&
|
|
314
|
+
), a && a.type === "dotlayers" && q(
|
|
302
315
|
window.Loca,
|
|
303
316
|
a,
|
|
304
317
|
f(l.data[0].data, "Point")
|
|
305
|
-
), a && a.type === "scatter" &&
|
|
318
|
+
), a && a.type === "scatter" && Q(
|
|
306
319
|
window.Loca,
|
|
307
320
|
a,
|
|
308
321
|
f(l.data[0].data, "Point")
|
|
309
|
-
), a && a.type === "labelsLayer" &&
|
|
322
|
+
), a && a.type === "labelsLayer" && X(
|
|
310
323
|
window.Loca,
|
|
311
324
|
a,
|
|
312
325
|
f(l.data[0].data, "Point")
|
|
313
|
-
), a && a.type === "signagePoints" &&
|
|
326
|
+
), a && a.type === "signagePoints" && Y(
|
|
314
327
|
window.Loca,
|
|
315
328
|
a,
|
|
316
329
|
f(l.data[0].data, "Point")
|
|
317
|
-
), a && a.type === "pulseLinkLayer" &&
|
|
330
|
+
), a && a.type === "pulseLinkLayer" && _(
|
|
318
331
|
window.Loca,
|
|
319
332
|
a,
|
|
320
333
|
f(l.data[0].data, "LineString")
|
|
321
334
|
);
|
|
322
335
|
} catch {
|
|
323
336
|
}
|
|
324
|
-
|
|
325
|
-
|
|
337
|
+
i.value.widgets.filter((o) => o.type === "boundary").forEach((o) => {
|
|
338
|
+
O(t, o);
|
|
326
339
|
});
|
|
327
340
|
}
|
|
328
341
|
});
|
|
329
|
-
}) :
|
|
330
|
-
|
|
342
|
+
}) : i.value.widgets.filter((a) => a.type === "boundary").forEach((a) => {
|
|
343
|
+
O(t, a);
|
|
331
344
|
});
|
|
332
|
-
const e =
|
|
345
|
+
const e = s.value.getLayers();
|
|
333
346
|
for (let a = 0; a < e.length; a++)
|
|
334
|
-
(e[a].type === "sketchTileLayer" || e[a]._opts.type === "sketchImageLayer") &&
|
|
335
|
-
|
|
336
|
-
const r =
|
|
337
|
-
r &&
|
|
338
|
-
}),
|
|
339
|
-
const r =
|
|
340
|
-
|
|
347
|
+
(e[a].type === "sketchTileLayer" || e[a]._opts.type === "sketchImageLayer") && s.value.removeLayer(e[a]);
|
|
348
|
+
i.value.widgets.filter((a) => a.type === "sketchTile").forEach((a) => {
|
|
349
|
+
const r = V(a);
|
|
350
|
+
r && s.value.addLayer(r);
|
|
351
|
+
}), i.value.widgets.filter((a) => a.type === "sketchImage").forEach((a) => {
|
|
352
|
+
const r = K(a);
|
|
353
|
+
s.value.addLayer(r);
|
|
341
354
|
});
|
|
342
|
-
}, 200),
|
|
355
|
+
}, 200), R = (t) => {
|
|
343
356
|
const a = t.slice(
|
|
344
357
|
t.indexOf("(") + 1,
|
|
345
358
|
t.lastIndexOf(")")
|
|
346
359
|
).split(",").map((l) => l.trim()), r = {};
|
|
347
360
|
for (let l = 1; l < a.length; l++) {
|
|
348
|
-
const
|
|
349
|
-
r[
|
|
361
|
+
const o = a[l].split(" "), c = o[0], v = parseFloat(o[1]) / 100, se = Math.round(v * 100) / 100;
|
|
362
|
+
r[se] = c;
|
|
350
363
|
}
|
|
351
364
|
return r;
|
|
352
|
-
},
|
|
365
|
+
}, V = (t) => {
|
|
353
366
|
try {
|
|
354
367
|
return new d.value.TileLayer({
|
|
355
368
|
bounds: new d.value.Bounds(
|
|
@@ -371,7 +384,7 @@ const ye = {
|
|
|
371
384
|
} catch {
|
|
372
385
|
}
|
|
373
386
|
return null;
|
|
374
|
-
},
|
|
387
|
+
}, K = (t) => {
|
|
375
388
|
try {
|
|
376
389
|
return new d.value.ImageLayer({
|
|
377
390
|
bounds: new d.value.Bounds(
|
|
@@ -390,7 +403,7 @@ const ye = {
|
|
|
390
403
|
} catch {
|
|
391
404
|
}
|
|
392
405
|
return null;
|
|
393
|
-
},
|
|
406
|
+
}, U = (t, e, a) => {
|
|
394
407
|
try {
|
|
395
408
|
const r = new t.HeatMapLayer({
|
|
396
409
|
zIndex: 10,
|
|
@@ -405,26 +418,26 @@ const ye = {
|
|
|
405
418
|
unit: e.style.unit,
|
|
406
419
|
height: e.style.height,
|
|
407
420
|
opacity: e.style.opacity,
|
|
408
|
-
gradient:
|
|
409
|
-
value: function(
|
|
410
|
-
return
|
|
421
|
+
gradient: R(e.style.gradient),
|
|
422
|
+
value: function(o, c) {
|
|
423
|
+
return c.coordinates[2] || 0;
|
|
411
424
|
},
|
|
412
425
|
min: e.style.min,
|
|
413
426
|
max: e.style.max,
|
|
414
427
|
// 4.6
|
|
415
428
|
heightBezier: [0, 0.53, 0.37, 0.98]
|
|
416
|
-
}),
|
|
429
|
+
}), n.value.add(r);
|
|
417
430
|
} catch {
|
|
418
431
|
}
|
|
419
|
-
},
|
|
432
|
+
}, O = async (t, e) => {
|
|
420
433
|
try {
|
|
421
|
-
const a = await
|
|
434
|
+
const a = await de.get(e.geojson);
|
|
422
435
|
if (a.status === 200) {
|
|
423
436
|
const r = new t.GeoJSON({
|
|
424
437
|
geoJSON: a.data,
|
|
425
|
-
getPolygon: function(l,
|
|
426
|
-
const
|
|
427
|
-
path:
|
|
438
|
+
getPolygon: function(l, o) {
|
|
439
|
+
const c = new t.Polygon({
|
|
440
|
+
path: o,
|
|
428
441
|
zIndex: e.zIndex,
|
|
429
442
|
fillColor: e.style.fillColor,
|
|
430
443
|
// 填充色
|
|
@@ -439,8 +452,8 @@ const ye = {
|
|
|
439
452
|
strokeStyle: e.style.strokeStyle
|
|
440
453
|
// 线条样式
|
|
441
454
|
});
|
|
442
|
-
return
|
|
443
|
-
|
|
455
|
+
return c.on("mouseover", () => {
|
|
456
|
+
c.setOptions({
|
|
444
457
|
fillOpacity: e.mouseover.fillOpacity,
|
|
445
458
|
fillColor: e.mouseover.fillColor,
|
|
446
459
|
strokeOpacity: e.mouseover.strokeOpacity,
|
|
@@ -448,8 +461,8 @@ const ye = {
|
|
|
448
461
|
strokeStyle: e.mouseover.strokeStyle,
|
|
449
462
|
strokeWeight: e.mouseover.strokeWeight
|
|
450
463
|
});
|
|
451
|
-
}),
|
|
452
|
-
|
|
464
|
+
}), c.on("mouseout", () => {
|
|
465
|
+
c.setOptions({
|
|
453
466
|
fillColor: e.style.fillColor,
|
|
454
467
|
// 填充色
|
|
455
468
|
strokeOpacity: e.style.strokeOpacity,
|
|
@@ -463,14 +476,14 @@ const ye = {
|
|
|
463
476
|
strokeStyle: e.style.strokeStyle
|
|
464
477
|
// 线条样式
|
|
465
478
|
});
|
|
466
|
-
}),
|
|
479
|
+
}), c;
|
|
467
480
|
}
|
|
468
481
|
});
|
|
469
|
-
|
|
482
|
+
s.value.add(r);
|
|
470
483
|
}
|
|
471
484
|
} catch {
|
|
472
485
|
}
|
|
473
|
-
},
|
|
486
|
+
}, q = (t, e, a) => {
|
|
474
487
|
try {
|
|
475
488
|
const r = new t.GeoJSONSource({
|
|
476
489
|
data: a
|
|
@@ -479,7 +492,7 @@ const ye = {
|
|
|
479
492
|
blend: e.blend,
|
|
480
493
|
visible: e.visible,
|
|
481
494
|
opacity: e.opacity
|
|
482
|
-
}),
|
|
495
|
+
}), o = {
|
|
483
496
|
radius: e.style.radius,
|
|
484
497
|
unit: e.style.unit,
|
|
485
498
|
color: e.style.color,
|
|
@@ -487,7 +500,7 @@ const ye = {
|
|
|
487
500
|
blurWidth: e.style.blurWidth,
|
|
488
501
|
borderColor: e.style.borderColor
|
|
489
502
|
};
|
|
490
|
-
l.setSource(r), l.setStyle(
|
|
503
|
+
l.setSource(r), l.setStyle(o), n.value.add(l), l.addAnimate({
|
|
491
504
|
key: e.animate.key,
|
|
492
505
|
value: e.animate.value,
|
|
493
506
|
duration: e.animate.duration,
|
|
@@ -500,12 +513,12 @@ const ye = {
|
|
|
500
513
|
});
|
|
501
514
|
} catch {
|
|
502
515
|
}
|
|
503
|
-
},
|
|
516
|
+
}, Q = (t, e, a) => {
|
|
504
517
|
try {
|
|
505
518
|
const r = new t.GeoJSONSource({
|
|
506
519
|
data: a
|
|
507
520
|
}), l = new t.ScatterLayer({
|
|
508
|
-
loca:
|
|
521
|
+
loca: n.value,
|
|
509
522
|
zIndex: e.zIndex,
|
|
510
523
|
opacity: e.opacity,
|
|
511
524
|
visible: e.visible,
|
|
@@ -518,10 +531,10 @@ const ye = {
|
|
|
518
531
|
texture: e.style.texture,
|
|
519
532
|
duration: e.style.duration,
|
|
520
533
|
animate: e.style.animate
|
|
521
|
-
}),
|
|
534
|
+
}), n.value.animate.start();
|
|
522
535
|
} catch {
|
|
523
536
|
}
|
|
524
|
-
},
|
|
537
|
+
}, X = (t, e, a) => {
|
|
525
538
|
try {
|
|
526
539
|
const r = new t.GeoJSONSource({
|
|
527
540
|
data: a
|
|
@@ -544,7 +557,7 @@ const ye = {
|
|
|
544
557
|
},
|
|
545
558
|
text: {
|
|
546
559
|
// 每项配置都可使用回调函数来动态配置
|
|
547
|
-
content: (
|
|
560
|
+
content: (o, c) => c.properties[e.text.content],
|
|
548
561
|
zooms: e.text.zooms,
|
|
549
562
|
offset: e.text.offset,
|
|
550
563
|
direction: e.text.direction,
|
|
@@ -562,16 +575,16 @@ const ye = {
|
|
|
562
575
|
}
|
|
563
576
|
}
|
|
564
577
|
}), l.on("complete", () => {
|
|
565
|
-
const
|
|
566
|
-
for (const
|
|
567
|
-
|
|
568
|
-
}),
|
|
569
|
-
}),
|
|
578
|
+
const o = l.getLabelsLayer().getAllOverlays();
|
|
579
|
+
for (const c of o)
|
|
580
|
+
c.on("click", (v) => {
|
|
581
|
+
}), c.on("mouseover", (v) => {
|
|
582
|
+
}), c.on("mouseout", (v) => {
|
|
570
583
|
});
|
|
571
|
-
}),
|
|
584
|
+
}), n.value.add(l);
|
|
572
585
|
} catch {
|
|
573
586
|
}
|
|
574
|
-
},
|
|
587
|
+
}, Y = (t, e, a) => {
|
|
575
588
|
try {
|
|
576
589
|
const r = new t.GeoJSONSource({
|
|
577
590
|
data: a
|
|
@@ -583,7 +596,7 @@ const ye = {
|
|
|
583
596
|
depth: !1
|
|
584
597
|
});
|
|
585
598
|
l.setSource(r), l.setStyle({
|
|
586
|
-
content: (
|
|
599
|
+
content: (c, v) => `<div style="
|
|
587
600
|
width: ${e.signs.style.width}px;
|
|
588
601
|
height: ${e.signs.style.height + 148}px;
|
|
589
602
|
">
|
|
@@ -607,15 +620,15 @@ const ye = {
|
|
|
607
620
|
alwaysFront: e.signs.style.alwaysFront,
|
|
608
621
|
size: [e.signs.style.width, e.signs.style.height + 148],
|
|
609
622
|
altitude: e.signs.style.altitude
|
|
610
|
-
}),
|
|
611
|
-
const
|
|
623
|
+
}), n.value.add(l);
|
|
624
|
+
const o = new t.ZMarkerLayer({
|
|
612
625
|
zIndex: e.landmark.zIndex,
|
|
613
626
|
visible: e.landmark.visible,
|
|
614
627
|
zooms: e.landmark.zooms,
|
|
615
628
|
opacity: e.landmark.opacity,
|
|
616
629
|
depth: !1
|
|
617
630
|
});
|
|
618
|
-
|
|
631
|
+
o.setSource(r), o.setStyle({
|
|
619
632
|
content: () => `<div style="
|
|
620
633
|
width: ${e.landmark.style.size[0]}px;
|
|
621
634
|
height: ${e.landmark.style.size[1]}px;
|
|
@@ -628,7 +641,7 @@ const ye = {
|
|
|
628
641
|
alwaysFront: e.landmark.style.alwaysFront,
|
|
629
642
|
size: e.landmark.style.size,
|
|
630
643
|
altitude: e.landmark.style.altitude
|
|
631
|
-
}),
|
|
644
|
+
}), o.addAnimate({
|
|
632
645
|
key: "altitude",
|
|
633
646
|
value: [0, 1],
|
|
634
647
|
random: e.landmark.animate.random,
|
|
@@ -637,10 +650,10 @@ const ye = {
|
|
|
637
650
|
delay: e.landmark.animate.delay,
|
|
638
651
|
yoyo: e.landmark.animate.yoyo,
|
|
639
652
|
repeat: e.landmark.animate.repeat
|
|
640
|
-
}),
|
|
653
|
+
}), n.value.add(o), n.value.animate.start();
|
|
641
654
|
} catch {
|
|
642
655
|
}
|
|
643
|
-
},
|
|
656
|
+
}, _ = (t, e, a) => {
|
|
644
657
|
const r = new t.PulseLinkLayer({
|
|
645
658
|
zIndex: e.zIndex,
|
|
646
659
|
opacity: e.opacity,
|
|
@@ -654,8 +667,8 @@ const ye = {
|
|
|
654
667
|
unit: e.style.unit,
|
|
655
668
|
dash: [4e4, 0, 4e4, 0],
|
|
656
669
|
lineWidth: e.style.lineWidth,
|
|
657
|
-
height: function(
|
|
658
|
-
return
|
|
670
|
+
height: function(o, c) {
|
|
671
|
+
return c.distance / 3 + e.style.height;
|
|
659
672
|
},
|
|
660
673
|
// altitude: 1000,
|
|
661
674
|
smoothSteps: 30,
|
|
@@ -668,14 +681,14 @@ const ye = {
|
|
|
668
681
|
// 弧顶位置比例
|
|
669
682
|
headColor: e.style.headColor,
|
|
670
683
|
trailColor: e.style.trailColor
|
|
671
|
-
}),
|
|
672
|
-
const
|
|
673
|
-
|
|
684
|
+
}), s.value.on("click", (o) => {
|
|
685
|
+
const c = r.queryFeature(o.pixel.toArray());
|
|
686
|
+
c && (y("amap3d-scene-pulseLinkLayer", c), p.parseEvents(
|
|
674
687
|
m.useEvents,
|
|
675
688
|
"amap3d-scene-pulseLinkLayer",
|
|
676
|
-
|
|
689
|
+
c
|
|
677
690
|
));
|
|
678
|
-
}),
|
|
691
|
+
}), n.value.add(r), n.value.animate.start();
|
|
679
692
|
}, f = (t, e) => {
|
|
680
693
|
const a = {
|
|
681
694
|
type: "FeatureCollection",
|
|
@@ -684,7 +697,7 @@ const ye = {
|
|
|
684
697
|
return t.forEach((r) => {
|
|
685
698
|
const l = {
|
|
686
699
|
type: "Feature",
|
|
687
|
-
id:
|
|
700
|
+
id: ue(),
|
|
688
701
|
properties: {
|
|
689
702
|
type: e === "Point" ? e : 0,
|
|
690
703
|
...r
|
|
@@ -696,123 +709,122 @@ const ye = {
|
|
|
696
709
|
};
|
|
697
710
|
a.features.push(l);
|
|
698
711
|
}), a;
|
|
699
|
-
},
|
|
700
|
-
|
|
712
|
+
}, ee = (t) => {
|
|
713
|
+
s.value && (s.value.setFeatures(t.config.features), s.value.setPitch(t.config.pitch), s.value.setRotation(t.config.rotation), s.value.setStatus({
|
|
701
714
|
dragEnable: t.config.dragEnable,
|
|
702
715
|
zoomEnable: t.config.zoomEnable,
|
|
703
716
|
rotateEnable: t.config.rotateEnable,
|
|
704
717
|
pitchEnable: t.config.pitchEnable
|
|
705
|
-
}), t.config.plugin.scale.visible ? z.value.show() : z.value.hide(), t.config.plugin.toolBar.visible ? b.value.show() : b.value.hide(), t.config.plugin.controlBar.visible ? k.value.show() : k.value.hide();
|
|
706
|
-
},
|
|
707
|
-
|
|
708
|
-
}, ee = (t) => {
|
|
709
|
-
o.value.setMapStyle(t.config.mapStyle);
|
|
710
|
-
}, te = (t) => {
|
|
711
|
-
o.value.setZoom(t.config.zoom, !1, 200);
|
|
718
|
+
}), t.config.plugin.scale.visible ? z.value.show() : z.value.hide(), t.config.plugin.toolBar.visible ? b.value.show() : b.value.hide(), t.config.plugin.controlBar.visible ? k.value.show() : k.value.hide());
|
|
719
|
+
}, te = () => {
|
|
720
|
+
s.value && (s.value.clearMap(), n.value.clear(), I(d.value));
|
|
712
721
|
}, ae = (t) => {
|
|
713
|
-
|
|
714
|
-
},
|
|
715
|
-
|
|
722
|
+
s.value && s.value.setMapStyle(t.config.mapStyle);
|
|
723
|
+
}, re = (t) => {
|
|
724
|
+
s.value && s.value.setZoom(t.config.zoom, !1, 200);
|
|
725
|
+
}, le = (t) => {
|
|
726
|
+
s.value && s.value.setCenter(t.config.center, !1, 200);
|
|
727
|
+
}, x = () => {
|
|
728
|
+
s.value && (s.value.clearMap(), s.value.destroy(), s.value = null, n.value && (n.value.clear(), n.value.destroy(), n.value = null));
|
|
716
729
|
};
|
|
717
|
-
return
|
|
730
|
+
return ne(() => {
|
|
718
731
|
setTimeout(() => {
|
|
719
|
-
|
|
732
|
+
A(i.value);
|
|
720
733
|
}, 0);
|
|
721
|
-
}),
|
|
722
|
-
initAMap3d:
|
|
723
|
-
updateAMapStyle:
|
|
724
|
-
updateAMapConfig:
|
|
725
|
-
updateAMapComponents:
|
|
726
|
-
updateAMapZoom:
|
|
727
|
-
updateAMapCenter:
|
|
728
|
-
amap3d:
|
|
729
|
-
loading:
|
|
734
|
+
}), ce(() => x()), {
|
|
735
|
+
initAMap3d: A,
|
|
736
|
+
updateAMapStyle: ae,
|
|
737
|
+
updateAMapConfig: ee,
|
|
738
|
+
updateAMapComponents: te,
|
|
739
|
+
updateAMapZoom: re,
|
|
740
|
+
updateAMapCenter: le,
|
|
741
|
+
amap3d: s,
|
|
742
|
+
loading: w,
|
|
730
743
|
AMapPrototype: d
|
|
731
744
|
};
|
|
732
745
|
}, {
|
|
733
746
|
initAMap3d: g,
|
|
734
747
|
updateAMapStyle: F,
|
|
735
|
-
updateAMapConfig:
|
|
748
|
+
updateAMapConfig: M,
|
|
736
749
|
updateAMapComponents: N,
|
|
737
750
|
updateAMapZoom: G,
|
|
738
751
|
updateAMapCenter: H,
|
|
739
|
-
loading:
|
|
752
|
+
loading: Z
|
|
740
753
|
} = T();
|
|
741
754
|
return u(
|
|
742
|
-
() =>
|
|
755
|
+
() => i.value.config,
|
|
743
756
|
() => {
|
|
744
|
-
|
|
757
|
+
M(i.value);
|
|
745
758
|
},
|
|
746
759
|
{ deep: !0 }
|
|
747
760
|
), u(
|
|
748
|
-
() =>
|
|
761
|
+
() => i.value.config.zoom,
|
|
749
762
|
() => {
|
|
750
|
-
G(
|
|
763
|
+
G(i.value);
|
|
751
764
|
},
|
|
752
765
|
{ deep: !0 }
|
|
753
766
|
), u(
|
|
754
|
-
() =>
|
|
767
|
+
() => i.value.config.center,
|
|
755
768
|
() => {
|
|
756
|
-
H(
|
|
769
|
+
H(i.value);
|
|
757
770
|
},
|
|
758
771
|
{ deep: !0 }
|
|
759
772
|
), u(
|
|
760
|
-
() =>
|
|
761
|
-
|
|
762
|
-
g(
|
|
773
|
+
() => i.value.config.floors,
|
|
774
|
+
E(() => {
|
|
775
|
+
g(i.value);
|
|
763
776
|
}, 300),
|
|
764
777
|
{ deep: !0 }
|
|
765
778
|
), u(
|
|
766
|
-
() =>
|
|
767
|
-
|
|
768
|
-
g(
|
|
779
|
+
() => i.value.config.skyColor,
|
|
780
|
+
E(() => {
|
|
781
|
+
g(i.value);
|
|
769
782
|
}, 300),
|
|
770
783
|
{ deep: !0 }
|
|
771
784
|
), u(
|
|
772
|
-
() =>
|
|
785
|
+
() => i.value.widgets,
|
|
773
786
|
() => {
|
|
774
787
|
N();
|
|
775
788
|
},
|
|
776
789
|
{ deep: !0 }
|
|
777
790
|
), u(
|
|
778
|
-
() =>
|
|
791
|
+
() => i.value.config.mapStyle,
|
|
779
792
|
() => {
|
|
780
|
-
F(
|
|
793
|
+
F(i.value);
|
|
781
794
|
},
|
|
782
795
|
{ deep: !0 }
|
|
783
796
|
), u(
|
|
784
|
-
() =>
|
|
797
|
+
() => i.value.basic,
|
|
785
798
|
() => {
|
|
786
|
-
g(
|
|
799
|
+
g(i.value);
|
|
787
800
|
},
|
|
788
801
|
{ deep: !0 }
|
|
789
802
|
), u(
|
|
790
803
|
() => m.sources,
|
|
791
804
|
() => {
|
|
792
|
-
g(
|
|
805
|
+
g(i.value);
|
|
793
806
|
},
|
|
794
807
|
{ deep: !0 }
|
|
795
|
-
),
|
|
796
|
-
refresh: () => g(
|
|
797
|
-
refreshView: () =>
|
|
798
|
-
refreshData: () => g(
|
|
799
|
-
}), (
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
])));
|
|
808
|
+
), $({
|
|
809
|
+
refresh: () => g(i.value),
|
|
810
|
+
refreshView: () => M(i.value),
|
|
811
|
+
refreshData: () => g(i.value)
|
|
812
|
+
}), (s, n) => (S(), C("div", ge, [
|
|
813
|
+
D.value ? (S(), C("div", {
|
|
814
|
+
key: 0,
|
|
815
|
+
class: oe(["amap-3d-wrap", { show: ie(Z) }])
|
|
816
|
+
}, [
|
|
817
|
+
L("div", fe, null, 512)
|
|
818
|
+
], 2)) : (S(), C("div", ve, n[0] || (n[0] = [
|
|
819
|
+
L("i", {
|
|
820
|
+
class: "iconfont shj-gaodeditu",
|
|
821
|
+
style: { "font-size": "48px" }
|
|
822
|
+
}, null, -1),
|
|
823
|
+
L("p", { class: "text-gray-500" }, " 缺少必要的Key和密钥,请先在右侧配置面板中进行配置 ", -1)
|
|
824
|
+
])))
|
|
825
|
+
]));
|
|
814
826
|
}
|
|
815
827
|
});
|
|
816
828
|
export {
|
|
817
|
-
|
|
829
|
+
kr as default
|
|
818
830
|
};
|