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