gisviewer-vue3-arcgis 1.0.127 → 1.0.129

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.
@@ -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 } from '../types';
3
+ import { IFindSumoParams, ILaneNumberParams, ILayerVisibleParams, ILookAtParams, 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';
@@ -73,6 +73,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
73
73
  showOpenDriveFromFile: (params: IShowOpenDriveFromFileParams) => Promise<import("../types").IResult>;
74
74
  clearOpenDrive: () => Promise<void>;
75
75
  findSumoInOpenDrive: (params: IFindSumoParams) => Promise<import("../types").IResult>;
76
+ selectSumoInOpenDrive: (params: IFindSumoParams) => Promise<import("../types").IResult>;
77
+ unselectSumoInOpenDrive: (params?: IUnselectSumoParams | undefined) => Promise<import("../types").IResult>;
78
+ getSumoInfo: (params: IFindSumoParams) => Promise<import("../types").IResult>;
76
79
  splitOpenDriveLane: (params: ISplitOpenDriveLaneParams) => Promise<import("../types").IResult>;
77
80
  showSignalControlArea: (params: any) => import("../types").IResult;
78
81
  clearSignalControlArea: () => void;
@@ -1,60 +1,60 @@
1
- import { defineComponent as de, ref as h, onMounted as ve, getCurrentInstance as ye, computed as Ce, openBlock as he, createElementBlock as Oe, createElementVNode as u, withDirectives as ke, vShow as Se } from "vue";
2
- import O, { registerStore as Te } from "./stores/index.mjs";
1
+ import { defineComponent as Ce, ref as h, onMounted as he, getCurrentInstance as Oe, computed as Se, openBlock as ke, createElementBlock as De, createElementVNode as p, withDirectives as Te, vShow as Ie } from "vue";
2
+ import O, { registerStore as Le } from "./stores/index.mjs";
3
3
  import "./style/index.css";
4
- import Le from "./utils/holo-flow/index.mjs";
5
- import Ae from "./utils/map-initializer.mjs";
6
- import k from "./utils/open-drive-renderer/index.mjs";
7
- import De from "./utils/overlay.mjs";
8
- import be from "./utils/queue-length.mjs";
9
- import S from "./utils/road-config-tool/index.mjs";
10
- import Ie from "./utils/signal-control-area-controller/index.mjs";
11
- import _e from "./utils/traffic-flow.mjs";
12
- const xe = { class: "gis-viewer" }, Me = { style: { position: "absolute", bottom: "10px", left: "10px" } }, Ze = /* @__PURE__ */ de({
4
+ import Ae from "./utils/holo-flow/index.mjs";
5
+ import be from "./utils/map-initializer.mjs";
6
+ import S from "./utils/open-drive-renderer/index.mjs";
7
+ import _e from "./utils/overlay.mjs";
8
+ import xe from "./utils/queue-length.mjs";
9
+ import k from "./utils/road-config-tool/index.mjs";
10
+ import Me from "./utils/signal-control-area-controller/index.mjs";
11
+ import Fe from "./utils/traffic-flow.mjs";
12
+ const Ve = { class: "gis-viewer" }, Be = { style: { position: "absolute", bottom: "10px", left: "10px" } }, $e = /* @__PURE__ */ Ce({
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: L, emit: A }) {
19
+ setup(D, { expose: T, emit: I }) {
20
20
  const g = h(null);
21
- let s, i, o, n, r, a, m, t, c;
21
+ let s, i, a, o, r, n, m, t, c;
22
22
  const f = h(!1);
23
- ve(async () => {
24
- if (Te(), !g.value)
23
+ he(async () => {
24
+ if (Le(), !g.value)
25
25
  return;
26
- document.addEventListener("keydown", (p) => {
27
- p.ctrlKey && p.key === "i" && (f.value = !f.value);
26
+ document.addEventListener("keydown", (u) => {
27
+ u.ctrlKey && u.key === "i" && (f.value = !f.value);
28
28
  });
29
- const e = ye(), { $gisviewerAssetsRoot: l } = e.appContext.config.globalProperties, C = await (await fetch(y.config)).json();
29
+ const e = Oe(), { $gisviewerAssetsRoot: l } = e.appContext.config.globalProperties, C = await (await fetch(y.config)).json();
30
30
  C.assetsRoot = y.assetsRoot || l;
31
- const fe = O.useAppDataStore;
32
- fe.mapConfig = C, i = new Ae(), s = await i.initialize({
31
+ const de = O.useAppDataStore;
32
+ de.mapConfig = C, i = new be(), s = await i.initialize({
33
33
  container: g.value,
34
- markerClickCallback: (p, d, v, we) => {
35
- w("markerClick", p, d, v, we);
34
+ markerClickCallback: (u, v, d, ye) => {
35
+ w("markerClick", u, v, d, ye);
36
36
  },
37
- mapClickCallback: (p, d, v) => {
38
- w("mapClick", p, d, v);
37
+ mapClickCallback: (u, v, d) => {
38
+ w("mapClick", u, v, d);
39
39
  }
40
- }), r = new Le(s), await r.init(), w("mapLoaded");
40
+ }), r = new Ae(s), await r.init(), w("mapLoaded");
41
41
  });
42
- const D = Ce(() => s), b = () => {
42
+ const L = Se(() => s), A = () => {
43
43
  const e = O.useAppDataStore;
44
44
  e.saveTrackLog = !0;
45
- }, I = () => {
45
+ }, b = () => {
46
46
  r.downloadTrackLog();
47
47
  }, _ = async (e) => await i.setMapCenter(e), x = async (e) => await i.setMapCamera(e), M = async (e) => await i.lookAt(e), F = (e) => i.setLayerVisibility(e), V = (e, l) => i.requestCoordinateTransform(e, l), B = (e) => {
48
48
  i.cancelCoordinateTransform(e);
49
49
  }, H = (e) => {
50
50
  i.setMapZoomRange(e);
51
- }, z = (e) => (o || (o = new S(s)), o.showLaneNumber(e)), N = () => {
52
- o == null || o.clearLaneNumber();
53
- }, Q = async (e) => (o || (o = new S(s)), await o.initializeSearch(e)), j = async () => o == null ? void 0 : o.calCrossIndicatorArea(), P = async () => {
51
+ }, z = (e) => (a || (a = new k(s)), a.showLaneNumber(e)), N = () => {
52
+ a == null || a.clearLaneNumber();
53
+ }, Q = async (e) => (a || (a = new k(s)), await a.initializeSearch(e)), j = async () => a == null ? void 0 : a.calCrossIndicatorArea(), P = async () => {
54
54
  }, R = async (e, l) => {
55
- n || (n = new _e(s)), n.connectTrafficFlow(e, l);
55
+ o || (o = new Fe(s)), o.connectTrafficFlow(e, l);
56
56
  }, E = () => {
57
- n == null || n.disconnectTrafficFlow();
57
+ o == null || o.disconnectTrafficFlow();
58
58
  }, Z = (e) => {
59
59
  r.handleVehicleTraceData(e);
60
60
  }, q = () => {
@@ -66,30 +66,39 @@ const xe = { class: "gis-viewer" }, Me = { style: { position: "absolute", bottom
66
66
  }, G = () => {
67
67
  r.clearHoloSignal();
68
68
  }, J = (e) => {
69
- n == null || n.toggleTrafficInfo(e), r.toggleTrafficInfo(e);
69
+ o == null || o.toggleTrafficInfo(e), r.toggleTrafficInfo(e);
70
70
  }, U = (e) => {
71
71
  r.togglePause(e);
72
72
  }, W = (e) => {
73
- n == null || n.toggleTrafficObject(e), r.toggleTrafficObject(e);
73
+ o == null || o.toggleTrafficObject(e), r.toggleTrafficObject(e);
74
74
  }, X = (e) => {
75
75
  r.updatePanelContent(e);
76
- }, Y = async (e) => (a || (a = new De(s)), a.addOverlays(e)), ee = (e) => a == null ? void 0 : a.removeOverlaysByType(e), te = (e) => a == null ? void 0 : a.removeOverlaysById(e), ae = () => a == null ? void 0 : a.removeAllOverlays(), oe = () => {
77
- a == null || a.showAllOverlays();
78
- }, ne = (e) => {
79
- m || (m = new be(s)), m.updateQueueLength(e);
76
+ }, Y = async (e) => (n || (n = new _e(s)), n.addOverlays(e)), ee = (e) => n == null ? void 0 : n.removeOverlaysByType(e), te = (e) => n == null ? void 0 : n.removeOverlaysById(e), ne = () => n == null ? void 0 : n.removeAllOverlays(), ae = () => {
77
+ n == null || n.showAllOverlays();
78
+ }, oe = (e) => {
79
+ m || (m = new xe(s)), m.updateQueueLength(e);
80
80
  }, re = () => {
81
81
  m == null || m.removeQueueLength();
82
- }, se = async (e, l) => (t || (t = new k(s)), await t.showOpenDriveFromServer(e, l)), ie = async (e) => (t || (t = new k(s)), 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)) : {
82
+ }, se = async (e, l) => (t || (t = new S(s)), await t.showOpenDriveFromServer(e, l)), ie = async (e) => (t || (t = new S(s)), 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)) : {
83
83
  status: -1,
84
84
  message: "未加载OpenDrive地图"
85
- }, me = async (e) => t ? await (t == null ? void 0 : t.splitLane(e)) : {
85
+ }, me = async (e) => t ? t.selectSumo(e) : {
86
86
  status: -1,
87
87
  message: "未加载OpenDrive地图"
88
- }, pe = (e) => (c || (c = new Ie(s)), c.showSignalControlArea(e)), ue = () => {
88
+ }, ue = async (e) => t ? t.unselectSumo(e) : {
89
+ status: -1,
90
+ message: "未加载OpenDrive地图"
91
+ }, pe = async (e) => t ? await t.getSumoInfo(e) : {
92
+ status: -1,
93
+ message: "未加载OpenDrive地图"
94
+ }, ge = async (e) => t ? await (t == null ? void 0 : t.splitLane(e)) : {
95
+ status: -1,
96
+ message: "未加载OpenDrive地图"
97
+ }, fe = (e) => (c || (c = new Me(s)), c.showSignalControlArea(e)), we = () => {
89
98
  c == null || c.clearSignalControlArea();
90
- }, ge = (e) => c ? c.locateSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, y = T, w = A;
91
- return L({
92
- mapViewer: D,
99
+ }, ve = (e) => c ? c.locateSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, y = D, w = I;
100
+ return T({
101
+ mapViewer: L,
93
102
  setLayerVisibility: F,
94
103
  setMapCenter: _,
95
104
  lookAt: M,
@@ -98,10 +107,10 @@ const xe = { class: "gis-viewer" }, Me = { style: { position: "absolute", bottom
98
107
  requestCoordinateTransform: V,
99
108
  cancelCoordinateTransform: B,
100
109
  addOverlays: Y,
101
- showAllOverlays: oe,
110
+ showAllOverlays: ae,
102
111
  removeOverlaysByType: ee,
103
112
  removeOverlaysById: te,
104
- removeAllOverlays: ae,
113
+ removeAllOverlays: ne,
105
114
  showLaneNumber: z,
106
115
  clearLaneNumber: N,
107
116
  initializeAreaTool: Q,
@@ -118,35 +127,38 @@ const xe = { class: "gis-viewer" }, Me = { style: { position: "absolute", bottom
118
127
  toggleTrafficObject: W,
119
128
  toggleVehicleInfo: X,
120
129
  togglePause: U,
121
- updateQueueLength: ne,
130
+ updateQueueLength: oe,
122
131
  removeQueueLength: re,
123
132
  showOpenDriveFromServer: se,
124
133
  showOpenDriveFromFile: ie,
125
134
  clearOpenDrive: ce,
126
135
  findSumoInOpenDrive: le,
127
- splitOpenDriveLane: me,
128
- showSignalControlArea: pe,
129
- clearSignalControlArea: ue,
130
- locateSignalControlArea: ge
131
- }), (e, l) => (he(), Oe("div", xe, [
132
- u("div", {
136
+ selectSumoInOpenDrive: me,
137
+ unselectSumoInOpenDrive: ue,
138
+ getSumoInfo: pe,
139
+ splitOpenDriveLane: ge,
140
+ showSignalControlArea: fe,
141
+ clearSignalControlArea: we,
142
+ locateSignalControlArea: ve
143
+ }), (e, l) => (ke(), De("div", Ve, [
144
+ p("div", {
133
145
  class: "gis-viewer-main",
134
146
  ref_key: "mapContainer",
135
147
  ref: g
136
148
  }, [
137
- ke(u("div", Me, [
138
- u("button", {
149
+ Te(p("div", Be, [
150
+ p("button", {
139
151
  style: { "margin-right": "10px" },
140
- onClick: b
152
+ onClick: A
141
153
  }, " 开始记录 "),
142
- u("button", { onClick: I }, "下载日志")
154
+ p("button", { onClick: b }, "下载日志")
143
155
  ], 512), [
144
- [Se, f.value]
156
+ [Ie, f.value]
145
157
  ])
146
158
  ], 512)
147
159
  ]));
148
160
  }
149
161
  });
150
162
  export {
151
- Ze as default
163
+ $e as default
152
164
  };
@@ -62,6 +62,9 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
62
62
  showOpenDriveFromFile: (params: import("../types").IShowOpenDriveFromFileParams) => Promise<import("../types").IResult>;
63
63
  clearOpenDrive: () => Promise<void>;
64
64
  findSumoInOpenDrive: (params: import("../types").IFindSumoParams) => Promise<import("../types").IResult>;
65
+ selectSumoInOpenDrive: (params: import("../types").IFindSumoParams) => Promise<import("../types").IResult>;
66
+ unselectSumoInOpenDrive: (params?: import("../types").IUnselectSumoParams | undefined) => Promise<import("../types").IResult>;
67
+ getSumoInfo: (params: import("../types").IFindSumoParams) => Promise<import("../types").IResult>;
65
68
  splitOpenDriveLane: (params: import("../types").ISplitOpenDriveLaneParams) => Promise<import("../types").IResult>;
66
69
  showSignalControlArea: (params: any) => import("../types").IResult;
67
70
  clearSignalControlArea: () => void;
@@ -1,4 +1,4 @@
1
- import { IFindSumoParams, IResult, IShowOpenDriveFromFileParams, ISplitOpenDriveLaneParams } from '../../../types';
1
+ import { IFindSumoParams, IResult, IShowOpenDriveFromFileParams, ISplitOpenDriveLaneParams, IUnselectSumoParams } from '../../../types';
2
2
  export default class OpenDriveRenderer {
3
3
  private static instance;
4
4
  static getInstance(view: __esri.MapView | __esri.SceneView): OpenDriveRenderer;
@@ -19,6 +19,11 @@ export default class OpenDriveRenderer {
19
19
  private openDriveServer;
20
20
  private openDriveClickCallback;
21
21
  private makeMd5FromFile;
22
+ /**
23
+ * 从本地文件/网络文件显示OpenDrive内容
24
+ * @param params
25
+ * @returns
26
+ */
22
27
  showOpenDriveFromFile(params: IShowOpenDriveFromFileParams): Promise<IResult>;
23
28
  /**
24
29
  * 从服务器载入OpenDrive文件解析结果并显示
@@ -26,7 +31,19 @@ export default class OpenDriveRenderer {
26
31
  * @param projectName
27
32
  */
28
33
  showOpenDriveFromServer(server: string, projectName: string): Promise<IResult>;
34
+ /**
35
+ * 显示所有车道
36
+ * @param roads 道路列表
37
+ * @param showJunctionLane 是否显示路口内车道
38
+ * @param showRoadName 是否显示道路名称
39
+ * @returns
40
+ */
29
41
  private showAllLanes;
42
+ /**
43
+ * 显示路口
44
+ * @param params
45
+ * @returns
46
+ */
30
47
  private showJunction;
31
48
  private currentSectionCode;
32
49
  private currentJunctionId;
@@ -40,8 +57,19 @@ export default class OpenDriveRenderer {
40
57
  * 监听鼠标点击事件,获取高亮要素的拓扑信息
41
58
  */
42
59
  private monitorMouseClick;
60
+ /**
61
+ * 图标增大动画
62
+ * @param graphic
63
+ * @param targetSize
64
+ */
43
65
  private increasePictureMarkerSize;
66
+ /**
67
+ * 图标缩小动画
68
+ * @param graphic
69
+ * @param targetSize
70
+ */
44
71
  private decreasePictureMarkerSize;
72
+ getSumoInfo(params: IFindSumoParams): Promise<IResult>;
45
73
  /**
46
74
  * 清除OpenDrive内容
47
75
  */
@@ -59,6 +87,22 @@ export default class OpenDriveRenderer {
59
87
  * @returns
60
88
  */
61
89
  private findLane;
90
+ /**
91
+ * graphic渐隐渐显闪烁
92
+ * @param flashGraphic
93
+ */
62
94
  private flashGraphic;
95
+ /**
96
+ * 通过接口取消选中
97
+ * @param params
98
+ * @returns
99
+ */
100
+ unselectSumo(params?: IUnselectSumoParams): IResult;
101
+ /**
102
+ * 通过接口选中
103
+ * @param params
104
+ * @returns
105
+ */
106
+ selectSumo(params: IFindSumoParams): IResult;
63
107
  splitLane(params: ISplitOpenDriveLaneParams): Promise<IResult>;
64
108
  }