gisviewer-vue3-arcgis 1.0.153 → 1.0.155

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.
Files changed (29) hide show
  1. package/es/src/gis-map/gis-map.vue.d.ts +3 -1
  2. package/es/src/gis-map/gis-map.vue.mjs +120 -116
  3. package/es/src/gis-map/index.d.ts +2 -0
  4. package/es/src/gis-map/utils/holo-flow/index.d.ts +1 -2
  5. package/es/src/gis-map/utils/holo-flow/index.mjs +19 -12
  6. package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +9 -0
  7. package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.mjs +43 -0
  8. package/es/src/gis-map/utils/holo-flow/signal-holo-flow.d.ts +3 -4
  9. package/es/src/gis-map/utils/open-drive-renderer/index.d.ts +1 -0
  10. package/es/src/gis-map/utils/open-drive-renderer/index.mjs +27 -21
  11. package/es/src/gis-map/utils/overlay.d.ts +3 -1
  12. package/es/src/gis-map/utils/overlay.mjs +75 -43
  13. package/es/src/gis-map/utils/signal-control-area-controller/index.mjs +16 -4
  14. package/es/src/types/index.d.ts +5 -0
  15. package/lib/src/gis-map/gis-map.vue.d.ts +3 -1
  16. package/lib/src/gis-map/gis-map.vue.js +1 -1
  17. package/lib/src/gis-map/index.d.ts +2 -0
  18. package/lib/src/gis-map/utils/holo-flow/index.d.ts +1 -2
  19. package/lib/src/gis-map/utils/holo-flow/index.js +1 -1
  20. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +9 -0
  21. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.js +1 -0
  22. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.d.ts +3 -4
  23. package/lib/src/gis-map/utils/open-drive-renderer/index.d.ts +1 -0
  24. package/lib/src/gis-map/utils/open-drive-renderer/index.js +1 -1
  25. package/lib/src/gis-map/utils/overlay.d.ts +3 -1
  26. package/lib/src/gis-map/utils/overlay.js +1 -1
  27. package/lib/src/gis-map/utils/signal-control-area-controller/index.js +1 -1
  28. package/lib/src/types/index.d.ts +5 -0
  29. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import MapView from '@arcgis/core/views/MapView';
2
2
  import SceneView from '@arcgis/core/views/SceneView';
3
- import { IFindSumoParams, ILaneNumberParams, ILayerVisibleParams, ILookAtParams, IOverlayParam, IQueueLengthParams, ISetMapCameraParams, ISetMapCenterParams, IShowOpenDriveFromFileParams, ISplitOpenDriveLaneParams, IStartCrossBufferParam, IToggleTrafficInfoParams, IUnselectSumoParams } from '../types';
3
+ import { IFindSumoParams, ILaneNumberParams, ILayerVisibleParams, ILookAtParams, IMaskParam, IOverlayParam, IQueueLengthParams, ISetMapCameraParams, ISetMapCenterParams, IShowOpenDriveFromFileParams, ISplitOpenDriveLaneParams, IStartCrossBufferParam, IToggleTrafficInfoParams, IUnselectSumoParams } from '../types';
4
4
  import HoloFlow from './utils/holo-flow';
5
5
  import MapInitializer from './utils/map-initializer';
6
6
  import OpenDriveRenderer from './utils/open-drive-renderer';
@@ -63,6 +63,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
63
63
  toggleTrafficObject: (params: IToggleTrafficInfoParams) => void;
64
64
  toggleVehicleInfo: (contentType: string) => void;
65
65
  addOverlays: (params: IOverlayParam) => Promise<import("../types").IResult>;
66
+ addMask: (params: IMaskParam) => void;
67
+ removeMask: () => void;
66
68
  removeOverlaysByType: (types: string[]) => import("../types").IResult;
67
69
  removeOverlaysById: (ids: string[]) => import("../types").IResult;
68
70
  removeAllOverlays: () => import("../types").IResult;
@@ -1,176 +1,180 @@
1
- import { defineComponent as ke, ref as S, onMounted as Te, getCurrentInstance as De, onUnmounted as Le, computed as Ae, openBlock as Ie, createElementBlock as be, createElementVNode as p, withDirectives as _e, vShow as He } from "vue";
2
- import O, { registerStore as xe } from "./stores/index.mjs";
1
+ import { defineComponent as Le, ref as S, onMounted as Ae, getCurrentInstance as Ie, onUnmounted as be, computed as Me, openBlock as _e, createElementBlock as He, createElementVNode as p, withDirectives as xe, vShow as Ve } from "vue";
2
+ import O, { registerStore as Be } from "./stores/index.mjs";
3
3
  import "./style/index.css";
4
- import Me from "./utils/holo-flow/index.mjs";
5
- import Ve from "./utils/map-initializer.mjs";
4
+ import ze from "./utils/holo-flow/index.mjs";
5
+ import Ne from "./utils/map-initializer.mjs";
6
6
  import C from "./utils/open-drive-renderer/index.mjs";
7
- import Be from "./utils/overlay.mjs";
8
- import ze from "./utils/queue-length.mjs";
9
- import k from "./utils/road-config-tool/index.mjs";
10
- import Ne from "./utils/signal-control-area-controller/index.mjs";
11
- import Qe from "./utils/traffic-flow.mjs";
12
- const je = { class: "gis-viewer" }, Pe = { style: { position: "absolute", bottom: "10px", left: "10px" } }, Xe = /* @__PURE__ */ ke({
7
+ import k from "./utils/overlay.mjs";
8
+ import Qe from "./utils/queue-length.mjs";
9
+ import T from "./utils/road-config-tool/index.mjs";
10
+ import je from "./utils/signal-control-area-controller/index.mjs";
11
+ import Pe from "./utils/traffic-flow.mjs";
12
+ const Ee = { class: "gis-viewer" }, Fe = { style: { position: "absolute", bottom: "10px", left: "10px" } }, et = /* @__PURE__ */ Le({
13
13
  __name: "gis-map",
14
14
  props: {
15
15
  config: {},
16
16
  assetsRoot: {}
17
17
  },
18
18
  emits: ["mapLoaded", "markerClick", "mapClick"],
19
- setup(T, { expose: D, emit: L }) {
19
+ setup(D, { expose: L, emit: A }) {
20
20
  const g = S(null);
21
- let i, c, s, n, a, r, u, t, o;
21
+ let s, c, i, r, n, a, u, t, o;
22
22
  const f = S(!1);
23
- Te(async () => {
24
- if (xe(), !g.value)
23
+ Ae(async () => {
24
+ if (Be(), !g.value)
25
25
  return;
26
26
  document.addEventListener("keydown", (m) => {
27
27
  m.ctrlKey && m.key === "i" && (f.value = !f.value);
28
28
  });
29
- const e = De(), { $gisviewerAssetsRoot: l } = e.appContext.config.globalProperties, h = await (await fetch(d.config)).json();
30
- h.assetsRoot = d.assetsRoot || l;
31
- const Oe = O.useAppDataStore;
32
- Oe.mapConfig = h, c = new Ve(), i = await c.initialize({
29
+ const e = Ie(), { $gisviewerAssetsRoot: l } = e.appContext.config.globalProperties, h = await (await fetch(y.config)).json();
30
+ h.assetsRoot = y.assetsRoot || l;
31
+ const Te = O.useAppDataStore;
32
+ Te.mapConfig = h, c = new Ne(), s = await c.initialize({
33
33
  container: g.value,
34
- markerClickCallback: (m, y, v, Ce) => {
35
- w("markerClick", m, y, v, Ce);
34
+ markerClickCallback: (m, d, v, De) => {
35
+ w("markerClick", m, d, v, De);
36
36
  },
37
- mapClickCallback: (m, y, v) => {
38
- w("mapClick", m, y, v);
37
+ mapClickCallback: (m, d, v) => {
38
+ w("mapClick", m, d, v);
39
39
  }
40
- }), a = new Me(i), await a.init(), w("mapLoaded");
41
- }), Le(() => {
42
- o == null || o.clearSignalControlArea(), t == null || t.clearOpenDrive(), a == null || a.clearHoloTrace(), a == null || a.clearHoloSignal(), n == null || n.disconnectTrafficFlow();
40
+ }), n = new ze(s), await n.init(), w("mapLoaded");
41
+ }), be(() => {
42
+ o == null || o.clearSignalControlArea(), t == null || t.clearOpenDrive(), n == null || n.clearHoloTrace(), n == null || n.clearHoloSignal(), r == null || r.disconnectTrafficFlow();
43
43
  });
44
- const A = Ae(() => i), I = () => {
44
+ const I = Me(() => s), b = () => {
45
45
  const e = O.useAppDataStore;
46
46
  e.saveTrackLog = !0;
47
- }, b = () => {
48
- a.downloadTrackLog();
49
- }, _ = async (e) => await c.setMapCenter(e), H = async (e) => await c.setMapCamera(e), x = async (e) => await c.lookAt(e), M = (e) => c.setLayerVisibility(e), V = (e, l) => c.requestCoordinateTransform(e, l), B = (e) => {
47
+ }, M = () => {
48
+ n.downloadTrackLog();
49
+ }, _ = async (e) => await c.setMapCenter(e), H = async (e) => await c.setMapCamera(e), x = async (e) => await c.lookAt(e), V = (e) => c.setLayerVisibility(e), B = (e, l) => c.requestCoordinateTransform(e, l), z = (e) => {
50
50
  c.cancelCoordinateTransform(e);
51
- }, z = (e) => {
51
+ }, N = (e) => {
52
52
  c.setMapZoomRange(e);
53
- }, N = (e) => (s || (s = new k(i)), s.showLaneNumber(e)), Q = () => {
54
- s == null || s.clearLaneNumber();
55
- }, j = async (e) => (s || (s = new k(i)), await s.initializeSearch(e)), P = async () => s == null ? void 0 : s.calCrossIndicatorArea(), E = async () => {
56
- }, F = async (e, l) => {
57
- n || (n = new Qe(i)), n.connectTrafficFlow(e, l);
58
- }, Z = () => {
59
- n == null || n.disconnectTrafficFlow();
60
- }, q = (e) => {
61
- a.handleVehicleTraceData(e);
62
- }, K = () => {
63
- a.clearHoloTrace();
64
- }, U = (e) => {
65
- a.setInterpolate(e);
66
- }, $ = async (e) => {
67
- await a.handleSignalData(e);
68
- }, G = () => {
69
- a.clearHoloSignal();
70
- }, J = (e) => {
71
- n == null || n.toggleTrafficInfo(e), a.toggleTrafficInfo(e);
53
+ }, Q = (e) => (i || (i = new T(s)), i.showLaneNumber(e)), j = () => {
54
+ i == null || i.clearLaneNumber();
55
+ }, P = async (e) => (i || (i = new T(s)), await i.initializeSearch(e)), E = async () => i == null ? void 0 : i.calCrossIndicatorArea(), F = async () => {
56
+ }, Z = async (e, l) => {
57
+ r || (r = new Pe(s)), r.connectTrafficFlow(e, l);
58
+ }, q = () => {
59
+ r == null || r.disconnectTrafficFlow();
60
+ }, K = (e) => {
61
+ n.handleVehicleTraceData(e);
62
+ }, U = () => {
63
+ n.clearHoloTrace();
64
+ }, $ = (e) => {
65
+ n.setInterpolate(e);
66
+ }, G = async (e) => {
67
+ await n.handleSignalData(e);
68
+ }, J = () => {
69
+ n.clearHoloSignal();
72
70
  }, R = (e) => {
73
- a.togglePause(e);
71
+ r == null || r.toggleTrafficInfo(e), n.toggleTrafficInfo(e);
74
72
  }, W = (e) => {
75
- n == null || n.toggleTrafficObject(e), a.toggleTrafficObject(e);
73
+ n.togglePause(e);
76
74
  }, X = (e) => {
77
- a.updatePanelContent(e);
78
- }, Y = async (e) => (r || (r = new Be(i)), r.addOverlays(e)), ee = (e) => r == null ? void 0 : r.removeOverlaysByType(e), te = (e) => r == null ? void 0 : r.removeOverlaysById(e), ae = () => r == null ? void 0 : r.removeAllOverlays(), ne = () => {
79
- r == null || r.showAllOverlays();
80
- }, re = (e) => {
81
- u || (u = new ze(i)), u.updateQueueLength(e);
82
- }, oe = () => {
75
+ r == null || r.toggleTrafficObject(e), n.toggleTrafficObject(e);
76
+ }, Y = (e) => {
77
+ n.updatePanelContent(e);
78
+ }, ee = async (e) => (a || (a = new k(s)), a.addOverlays(e)), te = (e) => (a || (a = new k(s)), a.addMask(e)), ae = () => {
79
+ a == null || a.removeMask();
80
+ }, ne = (e) => a == null ? void 0 : a.removeOverlaysByType(e), re = (e) => a == null ? void 0 : a.removeOverlaysById(e), oe = () => a == null ? void 0 : a.removeAllOverlays(), se = () => {
81
+ a == null || a.showAllOverlays();
82
+ }, ie = (e) => {
83
+ u || (u = new Qe(s)), u.updateQueueLength(e);
84
+ }, ce = () => {
83
85
  u == null || u.removeQueueLength();
84
- }, se = async (e, l) => (t || (t = new C(i)), await t.showOpenDriveFromServer(e, l)), ie = async (e) => (t || (t = new C(i)), await t.clearOpenDrive(), await t.showOpenDriveFromFile(e)), ce = async () => await (t == null ? void 0 : t.clearOpenDrive()), le = async (e) => t ? await (t == null ? void 0 : t.findSumo(e)) : {
86
+ }, le = async (e, l) => (t || (t = new C(s)), await t.showOpenDriveFromServer(e, l)), ue = async (e) => (t || (t = new C(s)), await t.clearOpenDrive(), await t.showOpenDriveFromFile(e)), me = async () => await (t == null ? void 0 : t.clearOpenDrive()), pe = async (e) => t ? await (t == null ? void 0 : t.findSumo(e)) : {
85
87
  status: -1,
86
88
  message: "未加载OpenDrive地图"
87
- }, ue = async (e) => t ? t.selectSumo(e) : {
89
+ }, ge = async (e) => t ? t.selectSumo(e) : {
88
90
  status: -1,
89
91
  message: "未加载OpenDrive地图"
90
- }, me = async (e) => t ? t.unselectSumo(e) : {
92
+ }, fe = async (e) => t ? t.unselectSumo(e) : {
91
93
  status: -1,
92
94
  message: "未加载OpenDrive地图"
93
- }, pe = async (e) => t ? await t.geometrySearch(e) : {
95
+ }, we = async (e) => t ? await t.geometrySearch(e) : {
94
96
  status: -1,
95
97
  message: "未加载OpenDrive地图"
96
- }, ge = async (e) => t ? await t.getSumoInfo(e) : {
98
+ }, de = async (e) => t ? await t.getSumoInfo(e) : {
97
99
  status: -1,
98
100
  message: "未加载OpenDrive地图"
99
- }, fe = async (e) => t ? await (t == null ? void 0 : t.splitLane(e)) : {
101
+ }, ve = async (e) => t ? await (t == null ? void 0 : t.splitLane(e)) : {
100
102
  status: -1,
101
103
  message: "未加载OpenDrive地图"
102
- }, we = async () => t ? t == null ? void 0 : t.clearSplitLane() : {
104
+ }, ye = async () => t ? t == null ? void 0 : t.clearSplitLane() : {
103
105
  status: -1,
104
106
  message: "未加载OpenDrive地图"
105
- }, ye = (e) => (o || (o = new Ne(i)), o.showSignalControlArea(e)), ve = () => {
107
+ }, he = (e) => (o || (o = new je(s)), o.showSignalControlArea(e)), Se = () => {
106
108
  o == null || o.clearSignalControlArea();
107
- }, de = async (e) => o ? await o.locateSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, he = async (e) => o ? await o.highlightSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, Se = () => o ? o.resetHighlight() : { status: -1, message: "未加载信号控制区" }, d = T, w = L;
108
- return D({
109
- mapViewer: A,
110
- setLayerVisibility: M,
109
+ }, Oe = async (e) => o ? await o.locateSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, Ce = async (e) => o ? await o.highlightSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, ke = () => o ? o.resetHighlight() : { status: -1, message: "未加载信号控制区" }, y = D, w = A;
110
+ return L({
111
+ mapViewer: I,
112
+ setLayerVisibility: V,
111
113
  setMapCenter: _,
112
114
  lookAt: x,
113
115
  setMapCamera: H,
114
- setMapZoomRange: z,
115
- requestCoordinateTransform: V,
116
- cancelCoordinateTransform: B,
117
- addOverlays: Y,
118
- showAllOverlays: ne,
119
- removeOverlaysByType: ee,
120
- removeOverlaysById: te,
121
- removeAllOverlays: ae,
122
- showLaneNumber: N,
123
- clearLaneNumber: Q,
124
- initializeAreaTool: j,
125
- calCrossIndicatorArea: P,
126
- calRoadIndicatorArea: E,
127
- connectCarFlow: F,
128
- disconnectCarFlow: Z,
129
- handleHoloVehicleTraceData: q,
130
- clearHoloTrace: K,
131
- handleHoloSignalData: $,
132
- clearHoloSignal: G,
133
- setInterpolate: U,
134
- toggleTrafficInfo: J,
135
- toggleTrafficObject: W,
136
- toggleVehicleInfo: X,
137
- togglePause: R,
138
- updateQueueLength: re,
139
- removeQueueLength: oe,
140
- showOpenDriveFromServer: se,
141
- showOpenDriveFromFile: ie,
142
- clearOpenDrive: ce,
143
- geometrySearchInOpenDrive: pe,
144
- findSumoInOpenDrive: le,
145
- selectSumoInOpenDrive: ue,
146
- unselectSumoInOpenDrive: me,
147
- getSumoInfo: ge,
148
- splitOpenDriveLane: fe,
149
- clearSplitOpenDriveLane: we,
150
- showSignalControlArea: ye,
151
- clearSignalControlArea: ve,
152
- locateSignalControlArea: de,
153
- highlightSignalControlArea: he,
154
- resetHighlightSignalControlArea: Se
155
- }), (e, l) => (Ie(), be("div", je, [
116
+ setMapZoomRange: N,
117
+ requestCoordinateTransform: B,
118
+ cancelCoordinateTransform: z,
119
+ addOverlays: ee,
120
+ addMask: te,
121
+ removeMask: ae,
122
+ showAllOverlays: se,
123
+ removeOverlaysByType: ne,
124
+ removeOverlaysById: re,
125
+ removeAllOverlays: oe,
126
+ showLaneNumber: Q,
127
+ clearLaneNumber: j,
128
+ initializeAreaTool: P,
129
+ calCrossIndicatorArea: E,
130
+ calRoadIndicatorArea: F,
131
+ connectCarFlow: Z,
132
+ disconnectCarFlow: q,
133
+ handleHoloVehicleTraceData: K,
134
+ clearHoloTrace: U,
135
+ handleHoloSignalData: G,
136
+ clearHoloSignal: J,
137
+ setInterpolate: $,
138
+ toggleTrafficInfo: R,
139
+ toggleTrafficObject: X,
140
+ toggleVehicleInfo: Y,
141
+ togglePause: W,
142
+ updateQueueLength: ie,
143
+ removeQueueLength: ce,
144
+ showOpenDriveFromServer: le,
145
+ showOpenDriveFromFile: ue,
146
+ clearOpenDrive: me,
147
+ geometrySearchInOpenDrive: we,
148
+ findSumoInOpenDrive: pe,
149
+ selectSumoInOpenDrive: ge,
150
+ unselectSumoInOpenDrive: fe,
151
+ getSumoInfo: de,
152
+ splitOpenDriveLane: ve,
153
+ clearSplitOpenDriveLane: ye,
154
+ showSignalControlArea: he,
155
+ clearSignalControlArea: Se,
156
+ locateSignalControlArea: Oe,
157
+ highlightSignalControlArea: Ce,
158
+ resetHighlightSignalControlArea: ke
159
+ }), (e, l) => (_e(), He("div", Ee, [
156
160
  p("div", {
157
161
  class: "gis-viewer-main",
158
162
  ref_key: "mapContainer",
159
163
  ref: g
160
164
  }, [
161
- _e(p("div", Pe, [
165
+ xe(p("div", Fe, [
162
166
  p("button", {
163
167
  style: { "margin-right": "10px" },
164
- onClick: I
168
+ onClick: b
165
169
  }, " 开始记录 "),
166
- p("button", { onClick: b }, "下载日志")
170
+ p("button", { onClick: M }, "下载日志")
167
171
  ], 512), [
168
- [He, f.value]
172
+ [Ve, f.value]
169
173
  ])
170
174
  ], 512)
171
175
  ]));
172
176
  }
173
177
  });
174
178
  export {
175
- Xe as default
179
+ et as default
176
180
  };
@@ -52,6 +52,8 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
52
52
  toggleTrafficObject: (params: import("../types").IToggleTrafficInfoParams) => void;
53
53
  toggleVehicleInfo: (contentType: string) => void;
54
54
  addOverlays: (params: import("../types").IOverlayParam) => Promise<import("../types").IResult>;
55
+ addMask: (params: import("../types").IMaskParam) => void;
56
+ removeMask: () => void;
55
57
  removeOverlaysByType: (types: string[]) => import("../types").IResult;
56
58
  removeOverlaysById: (ids: string[]) => import("../types").IResult;
57
59
  removeAllOverlays: () => import("../types").IResult;
@@ -1,10 +1,9 @@
1
- import View from '@arcgis/core/views/View';
2
1
  import { IToggleTrafficInfoParams } from '../../../types';
3
2
  export default class Index {
4
3
  private readonly view;
5
4
  private traceHoloFlow;
6
5
  private signalHoloFlow;
7
- constructor(view: View);
6
+ constructor(view: __esri.MapView | __esri.SceneView);
8
7
  init(): Promise<void>;
9
8
  /**
10
9
  * 处理全息流轨迹数据
@@ -1,12 +1,14 @@
1
- import { EVehiclePlateState as l } from "../../../types/index.mjs";
2
- import a from "./signal-holo-flow.mjs";
3
- import t from "./trace-holo-flow.mjs";
4
- class n {
1
+ import { EVehiclePlateState as a } from "../../../types/index.mjs";
2
+ import i from "../../stores/index.mjs";
3
+ import r from "./signal-holo-flow.mjs";
4
+ import s from "./signal-holo-flow-lsr.mjs";
5
+ import n from "./trace-holo-flow.mjs";
6
+ class p {
5
7
  constructor(e) {
6
8
  this.view = e;
7
9
  }
8
10
  async init() {
9
- this.traceHoloFlow = new t(this.view), await this.traceHoloFlow.init();
11
+ this.traceHoloFlow = new n(this.view), await this.traceHoloFlow.init();
10
12
  }
11
13
  /**
12
14
  * 处理全息流轨迹数据
@@ -37,25 +39,30 @@ class n {
37
39
  this.traceHoloFlow.togglePause(e);
38
40
  }
39
41
  updatePanelContent(e) {
40
- let o = l.None;
42
+ let o = a.None;
41
43
  switch (e) {
42
44
  case "none":
43
- o = l.None;
45
+ o = a.None;
44
46
  break;
45
47
  case "plateNumber":
46
- o = l.PlateNumber;
48
+ o = a.PlateNumber;
47
49
  break;
48
50
  case "vehicleId":
49
- o = l.Id;
51
+ o = a.Id;
50
52
  break;
51
53
  case "mix":
52
- o = l.Mix;
54
+ o = a.Mix;
53
55
  break;
54
56
  }
55
57
  this.traceHoloFlow.updatePanelContent(o);
56
58
  }
57
59
  async handleSignalData(e) {
58
- this.signalHoloFlow || (this.signalHoloFlow = new a(this.view), await this.signalHoloFlow.initializeLayer()), await this.signalHoloFlow.handleSignalData(e);
60
+ var o, l;
61
+ if (!this.signalHoloFlow) {
62
+ const t = i.useAppDataStore;
63
+ ((l = (o = JSON.parse(JSON.stringify(t.mapConfig)).holoFlow) == null ? void 0 : o.signal) == null ? void 0 : l.style) === "LSR" ? this.signalHoloFlow = new s(this.view) : this.signalHoloFlow = new r(this.view), await this.signalHoloFlow.initializeLayer();
64
+ }
65
+ await this.signalHoloFlow.handleSignalData(e);
59
66
  }
60
67
  clearHoloSignal() {
61
68
  var e;
@@ -69,5 +76,5 @@ class n {
69
76
  }
70
77
  }
71
78
  export {
72
- n as default
79
+ p as default
73
80
  };
@@ -0,0 +1,9 @@
1
+ import SignalHoloFlow from './signal-holo-flow';
2
+ export default class LSRSignalHoloFlow extends SignalHoloFlow {
3
+ private stopLineLayer;
4
+ constructor(view: __esri.MapView | __esri.SceneView);
5
+ private stopLineMap;
6
+ initializeLayer(): Promise<void>;
7
+ handleSignalData(data: any): Promise<void>;
8
+ clearSignal(): void;
9
+ }
@@ -0,0 +1,43 @@
1
+ import c from "@arcgis/core/Graphic";
2
+ import h from "@arcgis/core/layers/GraphicsLayer";
3
+ import d from "./signal-holo-flow.mjs";
4
+ class f extends d {
5
+ constructor(e) {
6
+ super(e), this.stopLineLayer = new h(), this.stopLineMap = /* @__PURE__ */ new Map(), this.view.map.add(this.stopLineLayer);
7
+ }
8
+ async initializeLayer() {
9
+ var s, a;
10
+ console.time("初始化停止线图层");
11
+ let e = (a = (s = this.mapConfig.holoFlow) == null ? void 0 : s.signal) == null ? void 0 : a.stopLineLayer;
12
+ if (!e)
13
+ return;
14
+ e = this.mapConfig.assetsRoot + "/" + e;
15
+ const o = await (await fetch(e)).json();
16
+ console.log(o.features.length), o.features.forEach((t) => {
17
+ const { roadId: n, nodeId: r } = t.properties, { coordinates: p } = t.geometry, l = this.stopLineMap.get(r);
18
+ l ? l.set(n, p) : this.stopLineMap.set(r, /* @__PURE__ */ new Map([[n, p]]));
19
+ }), console.timeEnd("初始化停止线图层"), console.log(this.stopLineMap.size);
20
+ }
21
+ async handleSignalData(e) {
22
+ const { crossId: i } = e, o = this.stopLineMap.get(i);
23
+ o && o.forEach((s, a) => {
24
+ const t = new c({
25
+ geometry: {
26
+ type: "polyline",
27
+ paths: [s]
28
+ },
29
+ symbol: {
30
+ type: "simple-line",
31
+ color: [255, 0, 0],
32
+ width: 4
33
+ }
34
+ });
35
+ this.stopLineLayer.add(t);
36
+ });
37
+ }
38
+ clearSignal() {
39
+ }
40
+ }
41
+ export {
42
+ f as default
43
+ };
@@ -1,7 +1,6 @@
1
- import View from '@arcgis/core/views/View';
2
1
  export default class SignalHoloFlow {
3
- private view;
4
- private mapConfig;
2
+ protected view: __esri.MapView | __esri.SceneView;
3
+ protected mapConfig: any;
5
4
  /** 显示停止线的图层 */
6
5
  private phaseLineLayer;
7
6
  /** 每个路口的当前相位 */
@@ -11,7 +10,7 @@ export default class SignalHoloFlow {
11
10
  private countdownWatchHandel;
12
11
  private plateBackground;
13
12
  private lastDataTime;
14
- constructor(view: View);
13
+ constructor(view: __esri.MapView | __esri.SceneView);
15
14
  /**
16
15
  * 初始化相位线图层
17
16
  * */
@@ -11,6 +11,7 @@ export default class OpenDriveRenderer {
11
11
  private flashLayer;
12
12
  private drawLayer;
13
13
  private splitLaneLayer;
14
+ private borderLayer;
14
15
  private allLaneGraphics;
15
16
  private allRefLineGraphics;
16
17
  private mouseMoveHandler;
@@ -3,16 +3,17 @@ import * as j from "@arcgis/core/core/promiseUtils";
3
3
  import { Polygon as N } from "@arcgis/core/geometry";
4
4
  import * as L from "@arcgis/core/geometry/geometryEngine";
5
5
  import k from "@arcgis/core/layers/FeatureLayer";
6
- import v from "@arcgis/core/layers/GraphicsLayer";
6
+ import I from "@arcgis/core/layers/GraphicsLayer";
7
7
  import * as G from "@turf/helpers";
8
8
  import { lineSliceAlong as C } from "@turf/line-slice-along";
9
9
  import b from "axios";
10
- import $ from "md5";
10
+ import { XMLParser as x } from "fast-xml-parser";
11
+ import F from "md5";
11
12
  import O from "pako";
12
- import { watch as x } from "vue";
13
+ import { watch as P } from "vue";
13
14
  import J from "../../stores/index.mjs";
14
- import P from "../common-utils.mjs";
15
- class F {
15
+ import E from "../common-utils.mjs";
16
+ class M {
16
17
  constructor(e) {
17
18
  this.junctionNames = /* @__PURE__ */ new Map(), this.projectName = "", this.openDriveServer = "", this.currentSectionCode = "", this.selectedSectionIds = [], this.currentJunctionId = "", this.view = e, this.laneLayer = new k({
18
19
  id: "OpenDriveLane",
@@ -287,7 +288,7 @@ class F {
287
288
  }
288
289
  }
289
290
  ]
290
- }), this.junctionLayer = new v({ id: "OpenDriveJunction" }), this.sectionLayer = new v({ id: "OpenDriveSection" }), this.highlightLayer = new v({ id: "OpenDriveHighlight" }), this.flashLayer = new v({ id: "OpenDriveFlash" }), this.drawLayer = new v({ id: "Draw" }), this.splitLaneLayer = new v({ id: "SplitLane" }), this.view.map.addMany([
291
+ }), this.junctionLayer = new I({ id: "OpenDriveJunction" }), this.sectionLayer = new I({ id: "OpenDriveSection" }), this.highlightLayer = new I({ id: "OpenDriveHighlight" }), this.flashLayer = new I({ id: "OpenDriveFlash" }), this.drawLayer = new I({ id: "Draw" }), this.splitLaneLayer = new I({ id: "SplitLane" }), this.borderLayer = new I({ id: "OpenDriveBorder" }), this.view.map.addMany([
291
292
  this.laneLayer,
292
293
  this.junctionLayer,
293
294
  this.sectionLayer,
@@ -295,18 +296,23 @@ class F {
295
296
  this.highlightLayer,
296
297
  this.flashLayer,
297
298
  this.drawLayer,
298
- this.splitLaneLayer
299
+ this.splitLaneLayer,
300
+ this.borderLayer
299
301
  ]);
300
302
  }
301
303
  static getInstance(e) {
302
- return this.instance || (this.instance = new F(e)), this.instance;
304
+ return this.instance || (this.instance = new M(e)), this.instance;
303
305
  }
304
306
  async makeMd5FromFile(e) {
307
+ var t;
305
308
  try {
306
- const i = await (await fetch(e)).text();
307
- return { status: 0, message: "ok", result: $(i) };
308
- } catch (t) {
309
- return { status: -1, message: t.message };
309
+ const r = await (await fetch(e)).text(), n = (t = new x({
310
+ ignoreAttributes: !1,
311
+ allowBooleanAttributes: !0
312
+ }).parse(r).OpenDRIVE.userData) == null ? void 0 : t.border;
313
+ return { status: 0, message: "ok", result: { md5: F(r), border: n } };
314
+ } catch (i) {
315
+ return { status: -1, message: i.message };
310
316
  }
311
317
  }
312
318
  /**
@@ -320,7 +326,7 @@ class F {
320
326
  const t = await this.makeMd5FromFile(e.file);
321
327
  if (t.status !== 0)
322
328
  return t;
323
- this.projectName = t.result, console.timeEnd("md5用时"), this.openDriveServer = e.server, await this.makeMd5FromFile(e.file);
329
+ this.projectName = t.result.md5, console.timeEnd("md5用时"), console.log(t.result.border), this.openDriveServer = e.server;
324
330
  const i = `http://${this.openDriveServer}/api/openDrive/uploadXodr`;
325
331
  let r;
326
332
  try {
@@ -341,7 +347,7 @@ class F {
341
347
  return { status: -1, message: r.statusText };
342
348
  console.time("渲染用时");
343
349
  const s = r.data.result.geoSetting;
344
- P.setGeoData(
350
+ E.setGeoData(
345
351
  s.geoReference,
346
352
  s.offsetX,
347
353
  s.offsetY
@@ -357,7 +363,7 @@ class F {
357
363
  const d = r.data.result.junctions;
358
364
  this.showJunction(d), e.options && e.options.centerMap !== !1 && await this.view.goTo(this.allLaneGraphics), this.mouseMoveHandler || this.monitorMouseMove(), this.mouseClickHandler || this.monitorMouseClick();
359
365
  const h = J.useAppDataStore;
360
- return x(
366
+ return P(
361
367
  () => h.isSketching,
362
368
  () => {
363
369
  var m, f;
@@ -426,8 +432,8 @@ class F {
426
432
  const w = Number(u.id);
427
433
  if (w === 0)
428
434
  continue;
429
- const I = u.type, M = [...u.outerPath], S = u.innerPath.concat(
430
- M.reverse()
435
+ const v = u.type, $ = [...u.outerPath], S = u.innerPath.concat(
436
+ $.reverse()
431
437
  );
432
438
  if (S.length <= 3) {
433
439
  console.warn(`lane ${w} has less than 3 points`);
@@ -450,7 +456,7 @@ class F {
450
456
  sectionId: String(f),
451
457
  sectionIndex: p,
452
458
  laneId: w,
453
- type: I,
459
+ type: v,
454
460
  sumoId: "",
455
461
  // 记录左右边线的起始点,用于按长度高亮车道的一部分
456
462
  leftLine: u.innerPath,
@@ -1021,11 +1027,11 @@ class F {
1021
1027
  const r = Number(i[1]), s = i[0].split("#"), c = s.length === 2 ? Number(s[1]) : 0;
1022
1028
  let n = s[0];
1023
1029
  n.startsWith("-") && (n = n.slice(1));
1024
- const a = this.allLaneGraphics.filter((I) => I.getAttribute("roadId") === n && I.getAttribute("sectionIndex") === c);
1030
+ const a = this.allLaneGraphics.filter((v) => v.getAttribute("roadId") === n && v.getAttribute("sectionIndex") === c);
1025
1031
  if (a.length === 0)
1026
1032
  return { status: -1, message: "未找到路段" };
1027
1033
  const o = a.length - r, l = a.find(
1028
- (I) => Math.abs(I.getAttribute("laneId")) === o
1034
+ (v) => Math.abs(v.getAttribute("laneId")) === o
1029
1035
  );
1030
1036
  if (!l)
1031
1037
  return { status: -1, message: "未找到车道" };
@@ -1071,5 +1077,5 @@ class F {
1071
1077
  }
1072
1078
  }
1073
1079
  export {
1074
- F as default
1080
+ M as default
1075
1081
  };
@@ -2,7 +2,7 @@ import Graphic from '@arcgis/core/Graphic';
2
2
  import GraphicsLayer from '@arcgis/core/layers/GraphicsLayer';
3
3
  import MapView from '@arcgis/core/views/MapView';
4
4
  import SceneView from '@arcgis/core/views/SceneView';
5
- import { IOverlay, IOverlayParam, IPointSymbol, IResult } from '../../types';
5
+ import { IMaskParam, IOverlay, IOverlayParam, IPointSymbol, IResult } from '../../types';
6
6
  interface IOverlayOptions {
7
7
  id: string;
8
8
  }
@@ -11,6 +11,8 @@ export default class Overlay {
11
11
  overlayLayer: GraphicsLayer;
12
12
  constructor(view: MapView | SceneView, options?: IOverlayOptions);
13
13
  private defaultPointSymbol;
14
+ addMask(params: IMaskParam): void;
15
+ removeMask(): void;
14
16
  /**
15
17
  * 添加覆盖物
16
18
  * @param params