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