gisviewer-vue3-arcgis 1.0.167 → 1.0.168
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/src/gis-map/gis-map.vue.d.ts +13 -2
- package/es/src/gis-map/gis-map.vue.mjs +138 -135
- package/es/src/gis-map/index.d.ts +13 -2
- package/es/src/gis-map/utils/holo-flow/index.mjs +37 -36
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +8 -0
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.mjs +2 -2
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.mjs +36 -35
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +2 -0
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.mjs +100 -84
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow.mjs +6 -5
- package/es/src/gis-map/utils/holo-flow/trace-renderer-external.d.ts +2 -1
- package/es/src/gis-map/utils/holo-flow/trace-renderer-external.mjs +10 -9
- package/es/src/gis-map/utils/holo-flow/trace-renderer-layer.mjs +6 -5
- package/es/src/gis-map/utils/signal-control-area-controller/index.d.ts +3 -1
- package/es/src/gis-map/utils/signal-control-area-controller/index.mjs +169 -67
- package/es/src/types/index.d.ts +1 -0
- package/es/style.css +1 -1
- package/lib/src/gis-map/gis-map.vue.d.ts +13 -2
- package/lib/src/gis-map/gis-map.vue.js +1 -1
- package/lib/src/gis-map/index.d.ts +13 -2
- package/lib/src/gis-map/utils/holo-flow/index.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +8 -0
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +2 -0
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/trace-renderer-external.d.ts +2 -1
- package/lib/src/gis-map/utils/holo-flow/trace-renderer-external.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/trace-renderer-layer.js +1 -1
- package/lib/src/gis-map/utils/signal-control-area-controller/index.d.ts +3 -1
- package/lib/src/gis-map/utils/signal-control-area-controller/index.js +1 -1
- package/lib/src/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as C, computed as o, openBlock as l, createElementBlock as
|
|
1
|
+
import { defineComponent as C, computed as o, openBlock as l, createElementBlock as a, normalizeStyle as n, createElementVNode as s, toDisplayString as i, createCommentVNode as u } from "vue";
|
|
2
2
|
const b = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "signal-countdown-container"
|
|
@@ -19,32 +19,33 @@ const b = {
|
|
|
19
19
|
roadId: {},
|
|
20
20
|
mapPoint: {},
|
|
21
21
|
stopLine: {},
|
|
22
|
+
scale: {},
|
|
22
23
|
position: {},
|
|
23
24
|
rotation: {},
|
|
24
25
|
lampStatus: {}
|
|
25
26
|
},
|
|
26
27
|
setup(c) {
|
|
27
|
-
const
|
|
28
|
-
top: `${
|
|
29
|
-
left: `${
|
|
28
|
+
const t = c, m = o(() => ({
|
|
29
|
+
top: `${t.position.top}px`,
|
|
30
|
+
left: `${t.position.left}px`,
|
|
30
31
|
"transform-origin": "bottom center",
|
|
31
|
-
transform: `translateX(-50%) translateY(-100%) rotate(${
|
|
32
|
+
transform: `translateX(-50%) translateY(-100%) rotate(${t.rotation}deg) scale(${t.scale})`
|
|
32
33
|
})), p = o(
|
|
33
|
-
() => `/GisViewerAssets/Images/SignalLamp/u-${
|
|
34
|
+
() => `/GisViewerAssets/Images/SignalLamp/u-${t.lampStatus.uColor}.png`
|
|
34
35
|
), d = o(() => ({
|
|
35
|
-
color: r(
|
|
36
|
+
color: r(t.lampStatus.uColor)
|
|
36
37
|
})), g = o(
|
|
37
|
-
() => `/GisViewerAssets/Images/SignalLamp/l-${
|
|
38
|
+
() => `/GisViewerAssets/Images/SignalLamp/l-${t.lampStatus.lColor}.png`
|
|
38
39
|
), S = o(() => ({
|
|
39
|
-
color: r(
|
|
40
|
+
color: r(t.lampStatus.lColor)
|
|
40
41
|
})), h = o(
|
|
41
|
-
() => `/GisViewerAssets/Images/SignalLamp/s-${
|
|
42
|
+
() => `/GisViewerAssets/Images/SignalLamp/s-${t.lampStatus.sColor}.png`
|
|
42
43
|
), v = o(() => ({
|
|
43
|
-
color: r(
|
|
44
|
+
color: r(t.lampStatus.sColor)
|
|
44
45
|
})), w = o(
|
|
45
|
-
() => `/GisViewerAssets/Images/SignalLamp/r-${
|
|
46
|
+
() => `/GisViewerAssets/Images/SignalLamp/r-${t.lampStatus.rColor}.png`
|
|
46
47
|
), y = o(() => ({
|
|
47
|
-
color: r(
|
|
48
|
+
color: r(t.lampStatus.rColor)
|
|
48
49
|
})), r = (e) => {
|
|
49
50
|
switch (e) {
|
|
50
51
|
case "red":
|
|
@@ -57,56 +58,56 @@ const b = {
|
|
|
57
58
|
return "white";
|
|
58
59
|
}
|
|
59
60
|
};
|
|
60
|
-
return (e, L) => (l(),
|
|
61
|
+
return (e, L) => (l(), a("div", {
|
|
61
62
|
class: "signal-countdown-panel",
|
|
62
|
-
style:
|
|
63
|
+
style: n(m.value)
|
|
63
64
|
}, [
|
|
64
|
-
e.lampStatus.uColor ? (l(),
|
|
65
|
-
|
|
65
|
+
e.lampStatus.uColor ? (l(), a("div", b, [
|
|
66
|
+
s("div", {
|
|
66
67
|
class: "signal-countdown-number",
|
|
67
|
-
style:
|
|
68
|
+
style: n(d.value)
|
|
68
69
|
}, i(e.lampStatus.uNumber), 5),
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
s("div", null, [
|
|
71
|
+
s("img", {
|
|
71
72
|
src: p.value,
|
|
72
73
|
width: "20px",
|
|
73
74
|
height: "20px"
|
|
74
75
|
}, null, 8, _)
|
|
75
76
|
])
|
|
76
77
|
])) : u("", !0),
|
|
77
|
-
e.lampStatus.lColor ? (l(),
|
|
78
|
-
|
|
78
|
+
e.lampStatus.lColor ? (l(), a("div", I, [
|
|
79
|
+
s("div", {
|
|
79
80
|
class: "signal-countdown-number",
|
|
80
|
-
style:
|
|
81
|
+
style: n(S.value)
|
|
81
82
|
}, i(e.lampStatus.lNumber), 5),
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
s("div", null, [
|
|
84
|
+
s("img", {
|
|
84
85
|
src: g.value,
|
|
85
86
|
width: "20px",
|
|
86
87
|
height: "20px"
|
|
87
88
|
}, null, 8, N)
|
|
88
89
|
])
|
|
89
90
|
])) : u("", !0),
|
|
90
|
-
e.lampStatus.sColor ? (l(),
|
|
91
|
-
|
|
91
|
+
e.lampStatus.sColor ? (l(), a("div", f, [
|
|
92
|
+
s("div", {
|
|
92
93
|
class: "signal-countdown-number",
|
|
93
|
-
style:
|
|
94
|
+
style: n(v.value)
|
|
94
95
|
}, i(e.lampStatus.sNumber), 5),
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
s("div", null, [
|
|
97
|
+
s("img", {
|
|
97
98
|
src: h.value,
|
|
98
99
|
width: "20px",
|
|
99
100
|
height: "20px"
|
|
100
101
|
}, null, 8, $)
|
|
101
102
|
])
|
|
102
103
|
])) : u("", !0),
|
|
103
|
-
e.lampStatus.rColor !== void 0 ? (l(),
|
|
104
|
-
|
|
104
|
+
e.lampStatus.rColor !== void 0 ? (l(), a("div", k, [
|
|
105
|
+
s("div", {
|
|
105
106
|
class: "signal-countdown-number",
|
|
106
|
-
style:
|
|
107
|
+
style: n(y.value)
|
|
107
108
|
}, i(e.lampStatus.rNumber), 5),
|
|
108
|
-
|
|
109
|
-
|
|
109
|
+
s("div", null, [
|
|
110
|
+
s("img", {
|
|
110
111
|
src: w.value,
|
|
111
112
|
width: "20px",
|
|
112
113
|
height: "20px"
|
|
@@ -6,6 +6,8 @@ export default class LSRSignalHoloFlow extends SignalHoloFlow {
|
|
|
6
6
|
constructor(view: __esri.MapView | __esri.SceneView);
|
|
7
7
|
private stopLineMap;
|
|
8
8
|
initializeLayer(): Promise<void>;
|
|
9
|
+
private currentPanelScale;
|
|
10
|
+
private getPanelScale;
|
|
9
11
|
handleSignalData(data: any): Promise<void>;
|
|
10
12
|
clearSignal(): void;
|
|
11
13
|
/**
|
|
@@ -1,117 +1,133 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Point as
|
|
1
|
+
import * as d from "@arcgis/core/core/reactiveUtils";
|
|
2
|
+
import { Point as m } from "@arcgis/core/geometry";
|
|
3
3
|
import P from "@arcgis/core/layers/GraphicsLayer";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import * as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
class b extends
|
|
11
|
-
constructor(
|
|
12
|
-
super(
|
|
4
|
+
import w from "@turf/bearing";
|
|
5
|
+
import u from "@turf/destination";
|
|
6
|
+
import * as h from "@turf/helpers";
|
|
7
|
+
import g from "../../stores/index.mjs";
|
|
8
|
+
import y from "../common-utils.mjs";
|
|
9
|
+
import L from "./signal-holo-flow.mjs";
|
|
10
|
+
class b extends L {
|
|
11
|
+
constructor(e) {
|
|
12
|
+
super(e), this.stopLineLayer = new P(), this.store = g.useAppDataStore, this.watchHandle = null, this.stopLineMap = /* @__PURE__ */ new Map(), this.view.map.add(this.stopLineLayer);
|
|
13
13
|
}
|
|
14
14
|
async initializeLayer() {
|
|
15
|
-
var
|
|
15
|
+
var c, r;
|
|
16
16
|
console.time("初始化停止线图层");
|
|
17
|
-
let
|
|
18
|
-
if (!
|
|
17
|
+
let e = (r = (c = this.mapConfig.holoFlow) == null ? void 0 : c.signal) == null ? void 0 : r.stopLineLayer;
|
|
18
|
+
if (!e)
|
|
19
19
|
return;
|
|
20
|
-
|
|
21
|
-
const { roadId:
|
|
22
|
-
|
|
20
|
+
e = this.mapConfig.assetsRoot + "/" + e, (await (await fetch(e)).json()).features.forEach((t) => {
|
|
21
|
+
const { roadId: n, nodeId: o, angle: s, destinationPoint: a } = t.properties, { coordinates: l } = t.geometry, f = this.stopLineMap.get(o);
|
|
22
|
+
f ? f.set(n, {
|
|
23
|
+
coord: l,
|
|
24
|
+
panelPoint: a,
|
|
25
|
+
angle: s
|
|
26
|
+
}) : this.stopLineMap.set(
|
|
27
|
+
o,
|
|
28
|
+
/* @__PURE__ */ new Map([
|
|
29
|
+
[
|
|
30
|
+
n,
|
|
31
|
+
{ coord: l, panelPoint: a, angle: s }
|
|
32
|
+
]
|
|
33
|
+
])
|
|
34
|
+
);
|
|
23
35
|
}), console.timeEnd("初始化停止线图层");
|
|
24
36
|
}
|
|
25
|
-
|
|
26
|
-
|
|
37
|
+
getPanelScale() {
|
|
38
|
+
const e = this.view.scale;
|
|
39
|
+
let i = 1;
|
|
40
|
+
return e < 1e3 ? i = 1 : e < 2e3 ? i = 0.8 : i = 0.4, i;
|
|
41
|
+
}
|
|
42
|
+
async handleSignalData(e) {
|
|
43
|
+
this.watchHandle || (this.watchHandle = d.watch(
|
|
27
44
|
() => this.view.extent,
|
|
28
45
|
() => {
|
|
29
|
-
|
|
30
|
-
|
|
46
|
+
const t = this.getPanelScale();
|
|
47
|
+
for (const n of this.store.countdownPanels) {
|
|
48
|
+
t !== this.currentPanelScale && (n.scale = t);
|
|
49
|
+
const { mapPoint: o } = n, s = this.view.toScreen({
|
|
31
50
|
type: "point",
|
|
32
|
-
x:
|
|
33
|
-
y:
|
|
51
|
+
x: o[0],
|
|
52
|
+
y: o[1]
|
|
34
53
|
});
|
|
35
|
-
|
|
54
|
+
n.position.left = s.x, n.position.top = s.y;
|
|
36
55
|
}
|
|
56
|
+
this.currentPanelScale = t;
|
|
37
57
|
}
|
|
38
58
|
));
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
59
|
+
const i = e.crossId, p = this.stopLineMap.get(i);
|
|
60
|
+
if (!p) {
|
|
61
|
+
console.log(`没有找到路口${i}`);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const c = e.phaseCountDownList, r = /* @__PURE__ */ new Map();
|
|
65
|
+
for (const t of c) {
|
|
66
|
+
let n = "";
|
|
67
|
+
for (let l of t.roadIdList)
|
|
68
|
+
if (l.startsWith("-") && (l = l.slice(1)), p.has(l)) {
|
|
69
|
+
n = l;
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
if (!n) {
|
|
73
|
+
console.log(`没有找到对应的进口道${i}--${n}`);
|
|
74
|
+
continue;
|
|
53
75
|
}
|
|
54
|
-
r.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
let c = a.get(g);
|
|
59
|
-
c || (c = {}, a.set(g, c)), f === "u" ? (c.uNumber = m, c.uColor = e) : f === "l" ? (c.lNumber = m, c.lColor = e) : f === "s" ? (c.sNumber = m, c.sColor = e) : f === "r" && (c.rNumber = m, c.rColor = e === "yellow" ? "red" : e);
|
|
60
|
-
});
|
|
61
|
-
}), a.forEach((o, n) => {
|
|
62
|
-
console.log(n, o);
|
|
63
|
-
const r = this.stopLineMap.get(s);
|
|
64
|
-
if (!r) {
|
|
65
|
-
console.error(`路口${s}没有找到对应的停止线`);
|
|
66
|
-
return;
|
|
76
|
+
let o = r.get(n);
|
|
77
|
+
if (o || (o = {}, r.set(n, o)), !t.direction) {
|
|
78
|
+
console.log(`没有找到对应的方向${i}--${JSON.stringify(t)}`);
|
|
79
|
+
continue;
|
|
67
80
|
}
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
81
|
+
const s = t.direction.toLowerCase(), a = t.color === 1 ? "red" : t.color === 2 ? "yellow" : "green";
|
|
82
|
+
s === "u" ? (o.uNumber = t.leftTime, o.uColor = a) : s === "l" ? (o.lNumber = t.leftTime, o.lColor = a) : s === "s" ? (o.sNumber = t.leftTime, o.sColor = a) : s === "r" && (o.rNumber = t.leftTime, o.rColor = a);
|
|
83
|
+
}
|
|
84
|
+
r.forEach((t, n) => {
|
|
85
|
+
const o = p.get(n);
|
|
86
|
+
if (!o)
|
|
71
87
|
return;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
(l) => l.crossId === s && l.roadId === n
|
|
88
|
+
const s = this.store.countdownPanels.find(
|
|
89
|
+
(a) => a.crossId === i && a.roadId === n
|
|
75
90
|
);
|
|
76
|
-
if (
|
|
77
|
-
|
|
91
|
+
if (s)
|
|
92
|
+
s.lampStatus = t;
|
|
78
93
|
else {
|
|
79
|
-
const
|
|
94
|
+
const a = o.panelPoint, l = this.view.toScreen({
|
|
80
95
|
type: "point",
|
|
81
|
-
x:
|
|
82
|
-
y:
|
|
83
|
-
}), f = this.getPanelRotation(
|
|
96
|
+
x: a[0],
|
|
97
|
+
y: a[1]
|
|
98
|
+
}), f = this.getPanelRotation(o.coord);
|
|
84
99
|
this.store.countdownPanels.push({
|
|
85
|
-
displayMode: "
|
|
86
|
-
crossId:
|
|
100
|
+
displayMode: "complex",
|
|
101
|
+
crossId: i,
|
|
87
102
|
roadId: n,
|
|
88
|
-
mapPoint:
|
|
103
|
+
mapPoint: a,
|
|
89
104
|
// 定位点地理坐标
|
|
90
|
-
stopLine:
|
|
105
|
+
stopLine: o.coord,
|
|
91
106
|
// 关联的停止线坐标
|
|
92
|
-
position: { left:
|
|
107
|
+
position: { left: l.x, top: l.y },
|
|
93
108
|
// 定位点屏幕坐标
|
|
94
109
|
rotation: f,
|
|
95
110
|
// 面板旋转角度
|
|
96
|
-
|
|
111
|
+
scale: this.getPanelScale(),
|
|
112
|
+
lampStatus: t
|
|
97
113
|
// 灯组状态
|
|
98
114
|
});
|
|
99
115
|
}
|
|
100
116
|
});
|
|
101
117
|
}
|
|
102
118
|
clearSignal() {
|
|
103
|
-
var
|
|
104
|
-
this.stopLineLayer.removeAll(), this.store.countdownPanels = [], (
|
|
119
|
+
var e;
|
|
120
|
+
this.stopLineLayer.removeAll(), this.store.countdownPanels = [], (e = this.watchHandle) == null || e.remove(), this.watchHandle = null;
|
|
105
121
|
}
|
|
106
122
|
/**
|
|
107
123
|
* 从停止线坐标计算面板位置
|
|
108
124
|
* @param coordinates
|
|
109
125
|
* @returns
|
|
110
126
|
*/
|
|
111
|
-
getPanelPoint(
|
|
112
|
-
const
|
|
113
|
-
let
|
|
114
|
-
return
|
|
127
|
+
getPanelPoint(e) {
|
|
128
|
+
const i = y.getCenterPointInLine(e), p = e[0], c = e[e.length - 1];
|
|
129
|
+
let t = w(h.point(p), h.point(c)) - 90;
|
|
130
|
+
return t < -180 && (t += 360), u(h.point(i), 1, t, {
|
|
115
131
|
units: "meters"
|
|
116
132
|
}).geometry.coordinates;
|
|
117
133
|
}
|
|
@@ -120,17 +136,17 @@ class b extends v {
|
|
|
120
136
|
* @param coordinates
|
|
121
137
|
* @returns
|
|
122
138
|
*/
|
|
123
|
-
getPanelRotation(
|
|
124
|
-
const
|
|
125
|
-
x:
|
|
126
|
-
y:
|
|
139
|
+
getPanelRotation(e) {
|
|
140
|
+
const i = e[0], p = new m({
|
|
141
|
+
x: i[0],
|
|
142
|
+
y: i[1],
|
|
127
143
|
spatialReference: this.view.spatialReference
|
|
128
|
-
}),
|
|
129
|
-
x:
|
|
130
|
-
y:
|
|
144
|
+
}), c = this.view.toScreen(p), r = e[e.length - 1], t = new m({
|
|
145
|
+
x: r[0],
|
|
146
|
+
y: r[1],
|
|
131
147
|
spatialReference: this.view.spatialReference
|
|
132
|
-
}),
|
|
133
|
-
return Math.atan2(
|
|
148
|
+
}), n = this.view.toScreen(t), o = n.x - c.x, s = n.y - c.y;
|
|
149
|
+
return Math.atan2(s, o) * (180 / Math.PI);
|
|
134
150
|
}
|
|
135
151
|
}
|
|
136
152
|
export {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as d from "@arcgis/core/core/reactiveUtils";
|
|
2
2
|
import { Point as c } from "@arcgis/core/geometry";
|
|
3
3
|
import p from "@arcgis/core/layers/FeatureLayer";
|
|
4
|
-
import u from "
|
|
5
|
-
|
|
4
|
+
import { toRaw as u } from "vue";
|
|
5
|
+
import g from "../../stores/index.mjs";
|
|
6
|
+
class v {
|
|
6
7
|
constructor(e) {
|
|
7
8
|
this.currentPhaseMap = /* @__PURE__ */ new Map(), this.countdownCanvasMap = /* @__PURE__ */ new Map(), this.lastDataTime = 0, this.isDeletingCanvas = !1, this.canvasWidth = 80, this.canvasHeight = 40, this.view = (e.type === "2d", e);
|
|
8
|
-
const t =
|
|
9
|
-
this.mapConfig =
|
|
9
|
+
const t = g.useAppDataStore;
|
|
10
|
+
this.mapConfig = u(t.mapConfig);
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
13
|
* 初始化相位线图层
|
|
@@ -247,5 +248,5 @@ class f {
|
|
|
247
248
|
}
|
|
248
249
|
}
|
|
249
250
|
export {
|
|
250
|
-
|
|
251
|
+
v as default
|
|
251
252
|
};
|
|
@@ -16,7 +16,7 @@ export default class TraceRendererExternal implements ITraceRendererInterface {
|
|
|
16
16
|
/** 车身颜色材质 */
|
|
17
17
|
private materialMap;
|
|
18
18
|
private readonly view;
|
|
19
|
-
private
|
|
19
|
+
private assetsRoot;
|
|
20
20
|
private carModel;
|
|
21
21
|
private vanModel;
|
|
22
22
|
private truckModel;
|
|
@@ -39,6 +39,7 @@ export default class TraceRendererExternal implements ITraceRendererInterface {
|
|
|
39
39
|
private needInterpolate;
|
|
40
40
|
private updateModel;
|
|
41
41
|
private appDataStore;
|
|
42
|
+
private mapConfig;
|
|
42
43
|
/** 轨迹日志 */
|
|
43
44
|
private logTable;
|
|
44
45
|
constructor(view: __esri.SceneView);
|
|
@@ -4,9 +4,10 @@ import v from "@arcgis/core/geometry/SpatialReference";
|
|
|
4
4
|
import * as u from "@arcgis/core/views/3d/externalRenderers";
|
|
5
5
|
import * as a from "three";
|
|
6
6
|
import { GLTFLoader as y } from "three/examples/jsm/loaders/GLTFLoader";
|
|
7
|
+
import { toRaw as T } from "vue";
|
|
7
8
|
import { EVehiclePlateState as m } from "../../../types/index.mjs";
|
|
8
|
-
import
|
|
9
|
-
class
|
|
9
|
+
import C from "../../stores/index.mjs";
|
|
10
|
+
class V {
|
|
10
11
|
constructor(s) {
|
|
11
12
|
this.cameraHeightThreshold = 1e3, this.roughness = 0.2, this.metalness = 0.8, this.defaultMaterial = new a.MeshPhongMaterial({
|
|
12
13
|
color: 16777215
|
|
@@ -22,7 +23,7 @@ class R {
|
|
|
22
23
|
[9, this.createCarMaterial(2105376)],
|
|
23
24
|
[10, this.createCarMaterial(9662683)],
|
|
24
25
|
[99, this.createCarMaterial(6908265)]
|
|
25
|
-
]), this.isInitialized = !1, this.showGroundVehicle = !0, this.showElevatedVehicle = !0, this.isPaused = !1, this.currentSpriteContent = m.None, this.historyPositionMap = /* @__PURE__ */ new Map(), this.vehicleObjectMap = /* @__PURE__ */ new Map(), this.needInterpolate = !0, this.updateModel = !1, this.appDataStore =
|
|
26
|
+
]), this.isInitialized = !1, this.showGroundVehicle = !0, this.showElevatedVehicle = !0, this.isPaused = !1, this.currentSpriteContent = m.None, this.historyPositionMap = /* @__PURE__ */ new Map(), this.vehicleObjectMap = /* @__PURE__ */ new Map(), this.needInterpolate = !0, this.updateModel = !1, this.appDataStore = C.useAppDataStore, this.logTable = [
|
|
26
27
|
[
|
|
27
28
|
"ptcId",
|
|
28
29
|
"plateno",
|
|
@@ -43,12 +44,12 @@ class R {
|
|
|
43
44
|
"queueLength",
|
|
44
45
|
"status"
|
|
45
46
|
]
|
|
46
|
-
], this.
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
], this.view = s;
|
|
48
|
+
const e = T(this.appDataStore.mapConfig);
|
|
49
|
+
this.assetsRoot = e.assetsRoot, P.watch(
|
|
49
50
|
() => this.view.camera.position.z,
|
|
50
|
-
(
|
|
51
|
-
(
|
|
51
|
+
(t, i) => {
|
|
52
|
+
(i <= this.cameraHeightThreshold && t > this.cameraHeightThreshold || i > this.cameraHeightThreshold && t <= this.cameraHeightThreshold) && (this.updateModel = !0);
|
|
52
53
|
}
|
|
53
54
|
);
|
|
54
55
|
}
|
|
@@ -544,5 +545,5 @@ class R {
|
|
|
544
545
|
}
|
|
545
546
|
}
|
|
546
547
|
export {
|
|
547
|
-
|
|
548
|
+
V as default
|
|
548
549
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import c from "@arcgis/core/Graphic";
|
|
2
2
|
import p from "@arcgis/core/layers/GraphicsLayer";
|
|
3
|
-
import m from "
|
|
4
|
-
|
|
3
|
+
import { toRaw as m } from "vue";
|
|
4
|
+
import g from "../../stores/index.mjs";
|
|
5
|
+
class M {
|
|
5
6
|
constructor(i) {
|
|
6
|
-
this.appDataStore =
|
|
7
|
+
this.appDataStore = g.useAppDataStore, this.logTable = [
|
|
7
8
|
[
|
|
8
9
|
"uuid",
|
|
9
10
|
"ptcId",
|
|
@@ -29,7 +30,7 @@ class f {
|
|
|
29
30
|
"step",
|
|
30
31
|
"receiveTimestamp"
|
|
31
32
|
]
|
|
32
|
-
], this.needInterpolate = !0, this.isPaused = !1, this.showVehiclePlate = !1, this.showGroundVehicle = !0, this.showElevatedVehicle = !0, this.historyPositionMap = /* @__PURE__ */ new Map(), this.vehicleObjectMap = /* @__PURE__ */ new Map(), this.view = i, this.mapConfig =
|
|
33
|
+
], this.needInterpolate = !0, this.isPaused = !1, this.showVehiclePlate = !1, this.showGroundVehicle = !0, this.showElevatedVehicle = !0, this.historyPositionMap = /* @__PURE__ */ new Map(), this.vehicleObjectMap = /* @__PURE__ */ new Map(), this.view = i, this.mapConfig = m(this.appDataStore.mapConfig), this.vehicleLayer = new p({
|
|
33
34
|
id: "vehicleLayer"
|
|
34
35
|
}), this.view.map.add(this.vehicleLayer), this.rafSignal = requestAnimationFrame(() => this.render());
|
|
35
36
|
}
|
|
@@ -350,5 +351,5 @@ class f {
|
|
|
350
351
|
}
|
|
351
352
|
}
|
|
352
353
|
export {
|
|
353
|
-
|
|
354
|
+
M as default
|
|
354
355
|
};
|
|
@@ -13,11 +13,12 @@ export default class SignalControlAreaController {
|
|
|
13
13
|
locateSignalControlArea(params: {
|
|
14
14
|
id: string;
|
|
15
15
|
}): Promise<IResult>;
|
|
16
|
-
private showPopup;
|
|
17
16
|
highlightSignalControlArea(params: {
|
|
18
17
|
id: string;
|
|
19
18
|
}): Promise<IResult>;
|
|
20
19
|
resetHighlight(): IResult;
|
|
20
|
+
showSubSignalControlArea(params: any): IResult;
|
|
21
|
+
editSubSignalArea(): IResult;
|
|
21
22
|
/**
|
|
22
23
|
* 在区控\子区\路口图层中查找对应的graphic
|
|
23
24
|
* @param id
|
|
@@ -31,6 +32,7 @@ export default class SignalControlAreaController {
|
|
|
31
32
|
* @returns
|
|
32
33
|
*/
|
|
33
34
|
private drawArea;
|
|
35
|
+
private getCrossGraphicInSubDistrict;
|
|
34
36
|
/**
|
|
35
37
|
* 生成路口点符号。在不同比例尺下,使用不同的符号
|
|
36
38
|
* @param attributes
|