gisviewer-vue3-arcgis 1.0.184 → 1.0.186

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,19 +1,19 @@
1
- import * as g from "@arcgis/core/core/reactiveUtils.js";
2
- import c from "@arcgis/core/Graphic";
1
+ import * as p from "@arcgis/core/core/reactiveUtils.js";
2
+ import n from "@arcgis/core/Graphic";
3
3
  import y from "@arcgis/core/layers/GraphicsLayer";
4
- import p from "@turf/buffer";
5
- import b from "@turf/convex";
6
- import * as n from "@turf/helpers";
7
- import d from "axios";
4
+ import d from "@turf/buffer";
5
+ import g from "@turf/convex";
6
+ import * as a from "@turf/helpers";
7
+ import b from "axios";
8
8
  import f from "concaveman";
9
9
  import C from "../../stores/index.mjs";
10
10
  import v from "./district-controller.mjs";
11
- class N {
11
+ class P {
12
12
  constructor(e) {
13
- var s;
14
- this.crossScale = 5e3, this.view = e;
13
+ var i;
14
+ this.crossScale = 5e3, this.crossIdsInDistrict = [], this.view = e;
15
15
  const r = C.useAppDataStore.mapConfig;
16
- this.openDriveServer = (s = r.openDriveServer) == null ? void 0 : s.url, this.districtControllerLayer = new y({
16
+ this.openDriveServer = (i = r.openDriveServer) == null ? void 0 : i.url, this.districtControllerLayer = new y({
17
17
  id: "districtControllerLayer"
18
18
  }), this.subDistrictControllerLayer = new y({
19
19
  id: "subDistrictControllerLayer",
@@ -48,27 +48,27 @@ class N {
48
48
  );
49
49
  this.drawArea(r, !0);
50
50
  }
51
- return this.scaleWatcher = g.watch(
51
+ return this.scaleWatcher = p.watch(
52
52
  () => this.view.scale,
53
53
  (t, r) => {
54
- t > this.crossScale && r <= this.crossScale ? (this.crossLayer.graphics.forEach((s) => {
55
- s.symbol = this.getCrossGraphicSymbol(
56
- s.attributes,
54
+ t > this.crossScale && r <= this.crossScale ? (this.crossLayer.graphics.forEach((i) => {
55
+ i.symbol = this.getCrossGraphicSymbol(
56
+ i.attributes,
57
57
  "marker"
58
58
  );
59
- }), this.highlightLayer.graphics.forEach((s) => {
60
- s.getAttribute("type") === "cross" && (s.symbol = this.getCrossGraphicSymbol(
61
- s.attributes,
59
+ }), this.highlightLayer.graphics.forEach((i) => {
60
+ i.getAttribute("type") === "cross" && (i.symbol = this.getCrossGraphicSymbol(
61
+ i.attributes,
62
62
  "marker"
63
63
  ));
64
- })) : t <= this.crossScale && r > this.crossScale && (this.crossLayer.graphics.forEach((s) => {
65
- s.symbol = this.getCrossGraphicSymbol(
66
- s.attributes,
64
+ })) : t <= this.crossScale && r > this.crossScale && (this.crossLayer.graphics.forEach((i) => {
65
+ i.symbol = this.getCrossGraphicSymbol(
66
+ i.attributes,
67
67
  "picture"
68
68
  );
69
- }), this.highlightLayer.graphics.forEach((s) => {
70
- s.getAttribute("type") === "cross" && (s.symbol = this.getCrossGraphicSymbol(
71
- s.attributes,
69
+ }), this.highlightLayer.graphics.forEach((i) => {
70
+ i.getAttribute("type") === "cross" && (i.symbol = this.getCrossGraphicSymbol(
71
+ i.attributes,
72
72
  "picture"
73
73
  ));
74
74
  }));
@@ -90,27 +90,27 @@ class N {
90
90
  if (!e.id || e.id === "")
91
91
  return { status: 1, message: "请输入id" };
92
92
  this.highlightLayer.removeAll(), this.districtControllerLayer.visible = !1;
93
- const t = this.districtControllerLayer.graphics.filter((i) => i.getAttribute("id") === e.id).toArray().map((i) => {
94
- const a = i.clone();
95
- return a.symbol.style = "none", a;
93
+ const t = this.districtControllerLayer.graphics.filter((s) => s.getAttribute("id") === e.id).toArray().map((s) => {
94
+ const o = s.clone();
95
+ return o.symbol.style = "none", o;
96
96
  }), r = this.subDistrictControllerLayer.graphics.filter(
97
- (i) => i.getAttribute("id") === e.id || i.getAttribute("parentId") === e.id
98
- ).toArray().map((i) => i.clone()), s = this.crossLayer.graphics.filter(
99
- (i) => i.getAttribute("id") === e.id || i.getAttribute("districtId") === e.id || i.getAttribute("subDistrictId") === e.id
100
- ).toArray().map((i) => i.clone());
101
- if (t.length > 0 && this.highlightLayer.addMany(t), r.length > 0 && this.highlightLayer.addMany(r), s.length > 0 && this.highlightLayer.addMany(s), this.highlightLayer.graphics.length === 0)
97
+ (s) => s.getAttribute("id") === e.id || s.getAttribute("parentId") === e.id
98
+ ).toArray().map((s) => s.clone()), i = this.crossLayer.graphics.filter(
99
+ (s) => s.getAttribute("id") === e.id || s.getAttribute("districtId") === e.id || s.getAttribute("subDistrictId") === e.id
100
+ ).toArray().map((s) => s.clone());
101
+ if (t.length > 0 && this.highlightLayer.addMany(t), r.length > 0 && this.highlightLayer.addMany(r), i.length > 0 && this.highlightLayer.addMany(i), this.highlightLayer.graphics.length === 0)
102
102
  return { status: 1, message: "未找到" };
103
103
  if (t.length > 0)
104
104
  await this.view.goTo(t);
105
105
  else if (r.length > 0) {
106
- const i = r[0].geometry.centroid;
106
+ const s = r[0].geometry.centroid;
107
107
  await this.view.goTo({
108
- target: i,
108
+ target: s,
109
109
  scale: this.crossScale - 500
110
110
  });
111
111
  } else
112
- s.length > 1 ? await this.view.goTo(s) : await this.view.goTo({
113
- target: s[0].geometry,
112
+ i.length > 1 ? await this.view.goTo(i) : await this.view.goTo({
113
+ target: i[0].geometry,
114
114
  scale: 1500
115
115
  });
116
116
  return { status: 0, message: "ok" };
@@ -120,16 +120,16 @@ class N {
120
120
  }
121
121
  showSubSignalControlArea(e) {
122
122
  this.crossLayer.removeAll(), this.crossLayer.visible = !0;
123
- const r = e.children.map((s) => {
124
- const i = { ...s, selected: !0 };
125
- return new c({
123
+ const r = e.children.map((i) => {
124
+ const s = { ...i, selected: !0 };
125
+ return new n({
126
126
  geometry: {
127
127
  type: "point",
128
- x: s.longitude,
129
- y: s.latitude
128
+ x: i.longitude,
129
+ y: i.latitude
130
130
  },
131
- symbol: this.getCrossSymbolInSubDistrict(i),
132
- attributes: i
131
+ symbol: this.getCrossSymbolInSubDistrict(s),
132
+ attributes: s
133
133
  });
134
134
  });
135
135
  return this.crossLayer.addMany(r), this.view.goTo(r), { status: 0, message: "ok" };
@@ -140,23 +140,23 @@ class N {
140
140
  * @returns
141
141
  */
142
142
  async handleViewClick(e) {
143
- var i;
144
- const r = (i = (await this.view.hitTest(e, {
143
+ var s;
144
+ const r = (s = (await this.view.hitTest(e, {
145
145
  include: [this.crossLayer]
146
- })).results) == null ? void 0 : i.filter(
147
- (a) => a.type === "graphic"
146
+ })).results) == null ? void 0 : s.filter(
147
+ (o) => o.type === "graphic"
148
148
  );
149
149
  if (r.length === 0)
150
150
  return;
151
- const s = r[0].graphic;
152
- s.getAttribute("selected") ? s.getAttribute("signalId") && (this.removeCrossCallback && this.removeCrossCallback({ id: s.getAttribute("id") }), s.setAttribute("selected", !1), s.symbol = this.getCrossSymbolInSubDistrict(
153
- s.attributes
154
- )) : (s.getAttribute("signalId") && (this.addCrossCallback && this.addCrossCallback({
155
- id: s.getAttribute("id"),
156
- name: s.getAttribute("name")
157
- }), s.setAttribute("selected", !0), s.symbol = this.getCrossSymbolInSubDistrict(
158
- s.attributes
159
- )), await this.showNearbyCrosses(s.getAttribute("id")));
151
+ const i = r[0].graphic;
152
+ i.getAttribute("selected") ? i.getAttribute("signalId") && (this.removeCrossCallback && this.removeCrossCallback({ id: i.getAttribute("id") }), i.setAttribute("selected", !1), i.symbol = this.getCrossSymbolInSubDistrict(
153
+ i.attributes
154
+ )) : (i.getAttribute("signalId") && (this.addCrossCallback && this.addCrossCallback({
155
+ id: i.getAttribute("id"),
156
+ name: i.getAttribute("name")
157
+ }), i.setAttribute("selected", !0), i.symbol = this.getCrossSymbolInSubDistrict(
158
+ i.attributes
159
+ )), await this.showNearbyCrosses(i.getAttribute("id")));
160
160
  }
161
161
  /**
162
162
  * 显示周边的路口
@@ -164,37 +164,36 @@ class N {
164
164
  * @returns
165
165
  */
166
166
  async showNearbyCrosses(e) {
167
- const t = await d.get(
167
+ const t = await b.get(
168
168
  `http://${this.openDriveServer}/api/computable/getRelatedJunctionsForJunction`,
169
169
  { params: { junctionIds: e } }
170
170
  );
171
171
  if (t.status === 200)
172
172
  if (t.data.status === 0) {
173
- const r = t.data.result, s = [];
174
- return r.forEach(
175
- (i) => {
176
- const { junctionId: a } = i;
177
- if (!this.crossLayer.graphics.some(
178
- (l) => l.getAttribute("id") === a
179
- )) {
180
- const l = new c({
181
- geometry: {
182
- type: "point",
183
- x: i.lon,
184
- y: i.lat
185
- },
186
- symbol: this.getCrossSymbolInSubDistrict(i),
187
- attributes: {
188
- id: i.junctionId,
189
- name: i.name,
190
- signalId: i.signalId,
191
- selected: !1
192
- }
193
- });
194
- s.push(l);
173
+ const r = t.data.result, i = [];
174
+ for (const s of r) {
175
+ const { junctionId: o } = s;
176
+ if (s.signalId && !this.crossIdsInDistrict.includes(o) || this.crossLayer.graphics.some(
177
+ (c) => c.getAttribute("id") === o
178
+ ))
179
+ continue;
180
+ const m = new n({
181
+ geometry: {
182
+ type: "point",
183
+ x: s.lon,
184
+ y: s.lat
185
+ },
186
+ symbol: this.getCrossSymbolInSubDistrict(s),
187
+ attributes: {
188
+ id: o,
189
+ name: s.name,
190
+ signalId: s.signalId,
191
+ selected: !1
195
192
  }
196
- }
197
- ), this.crossLayer.addMany(s), { status: 0, message: "ok" };
193
+ });
194
+ i.push(m);
195
+ }
196
+ return this.crossLayer.addMany(i), { status: 0, message: "ok" };
198
197
  } else
199
198
  return { status: -1, message: t.data.message };
200
199
  else
@@ -204,13 +203,33 @@ class N {
204
203
  * 编辑子区的路口
205
204
  * @returns
206
205
  */
207
- async editSubSignalArea(e, t) {
206
+ async editSubSignalControlArea(e) {
208
207
  if (this.openDriveServer) {
209
- this.addCrossCallback = e, this.removeCrossCallback = t, this.clickWatcher || (this.clickWatcher = this.view.on("click", async (s) => {
208
+ this.crossIdsInDistrict = e.crossesInArea.map((s) => s.id);
209
+ const t = a.featureCollection(
210
+ e.crossesInArea.map((s) => a.point([s.x, s.y]))
211
+ ), r = g(t);
212
+ r && (this.districtControllerLayer.removeAll(), this.districtControllerLayer.add(
213
+ new n({
214
+ geometry: {
215
+ type: "polygon",
216
+ rings: r.geometry.coordinates
217
+ },
218
+ symbol: {
219
+ type: "simple-fill",
220
+ style: "none",
221
+ outline: {
222
+ color: [61, 139, 249],
223
+ width: 3,
224
+ style: "long-dash"
225
+ }
226
+ }
227
+ })
228
+ )), this.addCrossCallback = e.addCrossCallback, this.removeCrossCallback = e.removeCrossCallback, this.clickWatcher || (this.clickWatcher = this.view.on("click", async (s) => {
210
229
  await this.handleViewClick(s);
211
230
  }));
212
- const r = this.crossLayer.graphics.toArray().map((s) => s.getAttribute("id")).join(",");
213
- return await this.showNearbyCrosses(r);
231
+ const i = this.crossLayer.graphics.toArray().map((s) => s.getAttribute("id")).join(",");
232
+ return await this.showNearbyCrosses(i);
214
233
  } else
215
234
  return { status: 1, message: "未配置OpenDriveServer" };
216
235
  }
@@ -260,31 +279,31 @@ class N {
260
279
  drawArea(e, t) {
261
280
  const r = e.getAllCrossCoordinates();
262
281
  if (r.length >= 2) {
263
- let i = null;
282
+ let s = null;
264
283
  if (r.length === 2)
265
- i = n.lineString(r);
284
+ s = a.lineString(r);
266
285
  else {
267
286
  if (t) {
268
- const h = n.featureCollection(
269
- r.map((u) => n.point(u))
287
+ const h = a.featureCollection(
288
+ r.map((u) => a.point(u))
270
289
  );
271
- i = b(h);
290
+ s = g(h);
272
291
  } else {
273
292
  const h = f(r, 0.5);
274
- h.length >= 4 && (i = n.polygon([h]));
293
+ h.length >= 4 && (s = a.polygon([h]));
275
294
  }
276
- i || (i = n.lineString(r));
295
+ s || (s = a.lineString(r));
277
296
  }
278
- const a = p(
279
- i.geometry,
297
+ const o = d(
298
+ s.geometry,
280
299
  // 区控面积更大,需要更大的缓冲半径
281
300
  t ? 200 : 30,
282
301
  {
283
302
  units: "meters"
284
303
  }
285
304
  );
286
- let o;
287
- t ? o = [
305
+ let l;
306
+ t ? l = [
288
307
  {
289
308
  fieldName: "id",
290
309
  label: "区控编号"
@@ -297,7 +316,7 @@ class N {
297
316
  fieldName: "subDistrictCount",
298
317
  label: "子区数量"
299
318
  }
300
- ] : o = [
319
+ ] : l = [
301
320
  {
302
321
  fieldName: "parentName",
303
322
  label: "所属区控"
@@ -307,7 +326,7 @@ class N {
307
326
  label: "路口数量"
308
327
  }
309
328
  ];
310
- const l = {
329
+ const m = {
311
330
  type: "signalControlArea",
312
331
  id: e.id,
313
332
  name: e.name,
@@ -315,10 +334,10 @@ class N {
315
334
  parentName: e.parentName,
316
335
  crossCount: e.crossCount,
317
336
  subDistrictCount: e.subDistrictCount
318
- }, m = new c({
337
+ }, c = new n({
319
338
  geometry: {
320
339
  type: "polygon",
321
- rings: a.geometry.coordinates
340
+ rings: o.geometry.coordinates
322
341
  },
323
342
  symbol: {
324
343
  type: "simple-fill",
@@ -330,44 +349,44 @@ class N {
330
349
  style: t ? "long-dash" : "solid"
331
350
  }
332
351
  },
333
- attributes: l,
352
+ attributes: m,
334
353
  popupTemplate: {
335
354
  title: `${t ? "区控" : "子区"} ${e.name}`,
336
355
  content: [
337
356
  {
338
357
  type: "fields",
339
- fieldInfos: o
358
+ fieldInfos: l
340
359
  }
341
360
  ]
342
361
  }
343
362
  });
344
- t ? this.districtControllerLayer.add(m) : this.subDistrictControllerLayer.add(m);
363
+ t ? this.districtControllerLayer.add(c) : this.subDistrictControllerLayer.add(c);
345
364
  }
346
- for (const i of e.subDistricts)
347
- this.drawArea(i, !1);
348
- const s = [];
349
- e.crosses.forEach((i) => {
350
- const a = {
365
+ for (const s of e.subDistricts)
366
+ this.drawArea(s, !1);
367
+ const i = [];
368
+ e.crosses.forEach((s) => {
369
+ const o = {
351
370
  type: "cross",
352
- id: i.id,
353
- name: i.name,
371
+ id: s.id,
372
+ name: s.name,
354
373
  color: e.areaColor,
355
- signalId: i.signalId,
374
+ signalId: s.signalId,
356
375
  districtId: t ? e.id : e.parentId,
357
376
  districtName: t ? e.name : e.parentName,
358
377
  subDistrictId: t ? "" : e.id,
359
378
  subDistrictName: t ? "" : e.name,
360
- isKey: i.isKey
361
- }, o = new c({
379
+ isKey: s.isKey
380
+ }, l = new n({
362
381
  geometry: {
363
382
  type: "point",
364
- x: i.longitude,
365
- y: i.latitude
383
+ x: s.longitude,
384
+ y: s.latitude
366
385
  },
367
- symbol: this.getCrossGraphicSymbol(a, "marker"),
368
- attributes: a,
386
+ symbol: this.getCrossGraphicSymbol(o, "marker"),
387
+ attributes: o,
369
388
  popupTemplate: {
370
- title: i.name,
389
+ title: s.name,
371
390
  content: [
372
391
  {
373
392
  type: "fields",
@@ -393,8 +412,8 @@ class N {
393
412
  ]
394
413
  }
395
414
  });
396
- s.push(o);
397
- }), this.crossLayer.addMany(s);
415
+ i.push(l);
416
+ }), this.crossLayer.addMany(i);
398
417
  }
399
418
  /**
400
419
  * 显示子区时路口的样式
@@ -500,7 +519,7 @@ class N {
500
519
  * @returns
501
520
  */
502
521
  getCrossGraphicSymbol(e, t) {
503
- const { isKey: r, color: s } = e;
522
+ const { isKey: r, color: i } = e;
504
523
  if (t === "marker")
505
524
  return r ? {
506
525
  type: "picture-marker",
@@ -510,7 +529,7 @@ class N {
510
529
  } : {
511
530
  type: "simple-marker",
512
531
  style: "circle",
513
- color: s,
532
+ color: i,
514
533
  size: 8,
515
534
  outline: {
516
535
  color: "white",
@@ -607,5 +626,5 @@ class N {
607
626
  }
608
627
  }
609
628
  export {
610
- N as default
629
+ P as default
611
630
  };
@@ -270,3 +270,21 @@ export interface ISignalCountdownProps {
270
270
  rColor?: string;
271
271
  };
272
272
  }
273
+ export interface IShowSignalControlAreaParams {
274
+ areaList: any[];
275
+ style?: string;
276
+ }
277
+ export interface IEditSignalControlAreaParams {
278
+ crossesInArea: {
279
+ id: string;
280
+ x: number;
281
+ y: number;
282
+ }[];
283
+ addCrossCallback: (params: {
284
+ id: string;
285
+ name: string;
286
+ }) => void;
287
+ removeCrossCallback: (params: {
288
+ id: string;
289
+ }) => void;
290
+ }
@@ -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, IMaskParam, IOverlayParam, IQueueLengthParams, ISetMapCameraParams, ISetMapCenterParams, IShowOpenDriveFromFileParams, ISignalCountdownProps, ISplitOpenDriveLaneParams, IStartCrossBufferParam, IToggleTrafficInfoParams, IUnselectSumoParams } from '../types';
3
+ import { IEditSignalControlAreaParams, IFindSumoParams, ILaneNumberParams, ILayerVisibleParams, ILookAtParams, IMaskParam, IOverlayParam, IQueueLengthParams, ISetMapCameraParams, ISetMapCenterParams, IShowOpenDriveFromFileParams, IShowSignalControlAreaParams, ISignalCountdownProps, 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';
@@ -115,10 +115,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
115
115
  status: number;
116
116
  message: string;
117
117
  }>;
118
- showSignalControlArea: (params: {
119
- areaList: any[];
120
- style?: string;
121
- }) => import("../types").IResult;
118
+ showSignalControlArea: (params: IShowSignalControlAreaParams) => import("../types").IResult;
122
119
  clearSignalControlArea: () => void;
123
120
  locateSignalControlArea: (params: {
124
121
  id: string;
@@ -128,12 +125,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
128
125
  }) => Promise<import("../types").IResult>;
129
126
  resetHighlightSignalControlArea: () => import("../types").IResult;
130
127
  showSubSignalControlArea: (params: any) => import("../types").IResult;
131
- editSubSignalControlArea: (addCrossCallback: (params: {
132
- id: string;
133
- name: string;
134
- }) => void, removeCrossCallback: (params: {
135
- id: string;
136
- }) => void) => Promise<import("../types").IResult> | {
128
+ editSubSignalControlArea: (params: IEditSignalControlAreaParams) => Promise<import("../types").IResult> | {
137
129
  status: number;
138
130
  message: string;
139
131
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),h=require("./stores/index.js");require("./style/index.css");const Me=require("./utils/holo-flow/index.js"),Ve=require("./utils/holo-flow/signal-countdown-panel.vue.js"),Ne=require("./utils/map-initializer.js"),O=require("./utils/open-drive-renderer/index.js"),b=require("./utils/overlay.js"),Be=require("./utils/queue-length.js"),A=require("./utils/road-config-tool/index.js"),L=require("./utils/signal-control-area-controller/index.js"),He=require("./utils/traffic-flow.js"),Pe={class:"gis-viewer"},Ee={style:{position:"absolute",bottom:"80px",left:"10px","z-index":"9999"}},ze=n.defineComponent({__name:"gis-map",props:{config:{},assetsRoot:{}},emits:["mapLoaded","markerClick","mapClick"],setup(D,{expose:T,emit:_}){const p=n.ref(null);let i,m,l,o,r,s,g,t,a;const f=n.ref(!1);h.registerStore();const I=h.default.useAppDataStore,C=n.reactive([]);n.onMounted(async()=>{if(!p.value)return;document.addEventListener("keydown",d=>{d.ctrlKey&&d.key==="i"&&(f.value=!f.value)});const e=n.getCurrentInstance(),{$gisviewerAssetsRoot:u}=e.appContext.config.globalProperties,c=await(await fetch(k.config)).json();c.assetsRoot=k.assetsRoot||u,I.mapConfig=c,m=new Ne.default,i=await m.initialize({container:p.value,mapConfig:c,markerClickCallback:(d,v,w,qe)=>{y("markerClick",d,v,w,qe)},mapClickCallback:(d,v,w)=>{y("mapClick",d,v,w)}}),r=new Me.default(i,C),await r.init(),y("mapLoaded")}),n.onUnmounted(()=>{a==null||a.clearSignalControlArea(),t==null||t.clearOpenDrive(),r.clearHoloTrace(),r.clearHoloSignal(),o==null||o.disconnectTrafficFlow()});const x=n.computed(()=>i),q=()=>{const e=h.default.useAppDataStore;e.saveTrackLog=!0},M=()=>{r.downloadTrackLog()},V=()=>{S("vehicleId")},N=()=>{S("plateNumber")},B=async e=>await m.setMapCenter(e),H=async e=>await m.setMapCamera(e),P=async e=>await m.lookAt(e),E=e=>m.setLayerVisibility(e),z=(e,u)=>m.requestCoordinateTransform(e,u),j=e=>{m.cancelCoordinateTransform(e)},Q=e=>{m.setMapZoomRange(e)},Z=e=>(l||(l=new A.default(i)),l.showLaneNumber(e)),K=()=>{l==null||l.clearLaneNumber()},U=async e=>(l||(l=new A.default(i)),await l.initializeSearch(e)),G=async()=>l==null?void 0:l.calCrossIndicatorArea(),J=async()=>{},W=async(e,u)=>{o||(o=new He.default(i)),o.connectTrafficFlow(e,u)},X=()=>{o==null||o.disconnectTrafficFlow()},Y=async e=>{r.handleVehicleTraceData(e)},F=()=>{r.clearHoloTrace()},R=e=>{r.setInterpolate(e)},$=async e=>{await r.handleSignalData(e)},ee=()=>{r.clearHoloSignal()},te=e=>{o==null||o.toggleTrafficInfo(e),r==null||r.toggleTrafficInfo(e)},ae=e=>{r==null||r.togglePause(e)},ne=e=>{o==null||o.toggleTrafficObject(e),r==null||r.toggleTrafficObject(e)},S=e=>{r==null||r.updatePanelContent(e)},re=async e=>(s||(s=new b.default(i)),s.addOverlays(e)),se=e=>(s||(s=new b.default(i)),s.addMask(e)),oe=()=>{s==null||s.removeMask()},ie=e=>s==null?void 0:s.removeOverlaysByType(e),ce=e=>s==null?void 0:s.removeOverlaysById(e),le=()=>s==null?void 0:s.removeAllOverlays(),ue=()=>{s==null||s.showAllOverlays()},me=e=>{g||(g=new Be.default(i)),g.updateQueueLength(e)},de=()=>{g==null||g.removeQueueLength()},ge=async(e,u)=>(t||(t=new O.default(i)),await t.showOpenDriveFromServer(e,u)),pe=async e=>(t||(t=new O.default(i)),await t.clearOpenDrive(),await t.showOpenDriveFromFile(e)),fe=async()=>await(t==null?void 0:t.clearOpenDrive()),Se=async e=>t?await(t==null?void 0:t.findSumo(e)):{status:-1,message:"未加载OpenDrive地图"},ye=async e=>t?t.selectSumo(e):{status:-1,message:"未加载OpenDrive地图"},ve=async e=>t?t.unselectSumo(e):{status:-1,message:"未加载OpenDrive地图"},we=async e=>t?await t.geometrySearch(e):{status:-1,message:"未加载OpenDrive地图"},he=async e=>t?await t.getSumoInfo(e):{status:-1,message:"未加载OpenDrive地图"},Ce=async e=>t?await(t==null?void 0:t.splitLane(e)):{status:-1,message:"未加载OpenDrive地图"},ke=async()=>t?t==null?void 0:t.clearSplitLane():{status:-1,message:"未加载OpenDrive地图"},Oe=e=>(a||(a=new L.default(i)),a.showSignalControlArea(e)),be=()=>{a==null||a.clearSignalControlArea()},Ae=async e=>a?await a.locateSignalControlArea(e):{status:-1,message:"未加载信号控制区"},Le=async e=>a?await a.highlightSignalControlArea(e):{status:-1,message:"未加载信号控制区"},De=()=>a?a.resetHighlight():{status:-1,message:"未加载信号控制区"},Te=e=>(a||(a=new L.default(i)),a.showSubSignalControlArea(e)),_e=(e,u)=>a?a.editSubSignalArea(e,u):{status:-1,message:"未加载信号控制区"},Ie=e=>a?a.selectSubSignalControlAreaCross(e):{status:-1,message:"未加载信号控制区"},xe=e=>a?a.unselectSubSignalControlAreaCross(e):{status:-1,message:"未加载信号控制区"},k=D,y=_;return T({mapViewer:x,setLayerVisibility:E,setMapCenter:B,lookAt:P,setMapCamera:H,setMapZoomRange:Q,requestCoordinateTransform:z,cancelCoordinateTransform:j,addOverlays:re,addMask:se,removeMask:oe,showAllOverlays:ue,removeOverlaysByType:ie,removeOverlaysById:ce,removeAllOverlays:le,showLaneNumber:Z,clearLaneNumber:K,initializeAreaTool:U,calCrossIndicatorArea:G,calRoadIndicatorArea:J,connectCarFlow:W,disconnectCarFlow:X,handleHoloVehicleTraceData:Y,clearHoloTrace:F,handleHoloSignalData:$,clearHoloSignal:ee,setInterpolate:R,toggleTrafficInfo:te,toggleTrafficObject:ne,toggleVehicleInfo:S,togglePause:ae,updateQueueLength:me,removeQueueLength:de,showOpenDriveFromServer:ge,showOpenDriveFromFile:pe,clearOpenDrive:fe,geometrySearchInOpenDrive:we,findSumoInOpenDrive:Se,selectSumoInOpenDrive:ye,unselectSumoInOpenDrive:ve,getSumoInfo:he,splitOpenDriveLane:Ce,clearSplitOpenDriveLane:ke,showSignalControlArea:Oe,clearSignalControlArea:be,locateSignalControlArea:Ae,highlightSignalControlArea:Le,resetHighlightSignalControlArea:De,showSubSignalControlArea:Te,editSubSignalControlArea:_e,selectSubSignalControlAreaCross:Ie,unselectSubSignalControlAreaCross:xe}),(e,u)=>(n.openBlock(),n.createElementBlock("div",Pe,[n.createElementVNode("div",{class:"gis-viewer-main",ref_key:"mapContainer",ref:p},[n.withDirectives(n.createElementVNode("div",Ee,[n.createElementVNode("button",{style:{"margin-right":"10px"},onClick:q}," 开始记录 "),n.createElementVNode("button",{style:{"margin-right":"10px"},onClick:M}," 下载日志 "),n.createElementVNode("button",{style:{"margin-right":"10px"},onClick:V}," 显示车辆id "),n.createElementVNode("button",{onClick:N},"显示车辆号牌")],512),[[n.vShow,f.value]])],512),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(C,(c,d)=>(n.openBlock(),n.createBlock(Ve.default,{key:d,"display-mode":c.displayMode,"road-id":c.crossId,"cross-id":c.roadId,"map-point":c.mapPoint,"stop-line":c.stopLine,position:c.position,rotation:c.rotation,scale:c.scale,"lamp-status":c.lampStatus},null,8,["display-mode","road-id","cross-id","map-point","stop-line","position","rotation","scale","lamp-status"]))),128))]))}});exports.default=ze;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),h=require("./stores/index.js");require("./style/index.css");const Me=require("./utils/holo-flow/index.js"),Ve=require("./utils/holo-flow/signal-countdown-panel.vue.js"),Ne=require("./utils/map-initializer.js"),O=require("./utils/open-drive-renderer/index.js"),b=require("./utils/overlay.js"),Be=require("./utils/queue-length.js"),A=require("./utils/road-config-tool/index.js"),L=require("./utils/signal-control-area-controller/index.js"),He=require("./utils/traffic-flow.js"),Pe={class:"gis-viewer"},Ee={style:{position:"absolute",bottom:"80px",left:"10px","z-index":"9999"}},ze=n.defineComponent({__name:"gis-map",props:{config:{},assetsRoot:{}},emits:["mapLoaded","markerClick","mapClick"],setup(D,{expose:T,emit:_}){const p=n.ref(null);let i,u,l,o,r,s,g,t,a;const f=n.ref(!1);h.registerStore();const I=h.default.useAppDataStore,C=n.reactive([]);n.onMounted(async()=>{if(!p.value)return;document.addEventListener("keydown",d=>{d.ctrlKey&&d.key==="i"&&(f.value=!f.value)});const e=n.getCurrentInstance(),{$gisviewerAssetsRoot:m}=e.appContext.config.globalProperties,c=await(await fetch(k.config)).json();c.assetsRoot=k.assetsRoot||m,I.mapConfig=c,u=new Ne.default,i=await u.initialize({container:p.value,mapConfig:c,markerClickCallback:(d,v,w,qe)=>{y("markerClick",d,v,w,qe)},mapClickCallback:(d,v,w)=>{y("mapClick",d,v,w)}}),r=new Me.default(i,C),await r.init(),y("mapLoaded")}),n.onUnmounted(()=>{a==null||a.clearSignalControlArea(),t==null||t.clearOpenDrive(),r.clearHoloTrace(),r.clearHoloSignal(),o==null||o.disconnectTrafficFlow()});const x=n.computed(()=>i),q=()=>{const e=h.default.useAppDataStore;e.saveTrackLog=!0},M=()=>{r.downloadTrackLog()},V=()=>{S("vehicleId")},N=()=>{S("plateNumber")},B=async e=>await u.setMapCenter(e),H=async e=>await u.setMapCamera(e),P=async e=>await u.lookAt(e),E=e=>u.setLayerVisibility(e),z=(e,m)=>u.requestCoordinateTransform(e,m),j=e=>{u.cancelCoordinateTransform(e)},Q=e=>{u.setMapZoomRange(e)},Z=e=>(l||(l=new A.default(i)),l.showLaneNumber(e)),K=()=>{l==null||l.clearLaneNumber()},U=async e=>(l||(l=new A.default(i)),await l.initializeSearch(e)),G=async()=>l==null?void 0:l.calCrossIndicatorArea(),J=async()=>{},W=async(e,m)=>{o||(o=new He.default(i)),o.connectTrafficFlow(e,m)},X=()=>{o==null||o.disconnectTrafficFlow()},Y=async e=>{r.handleVehicleTraceData(e)},F=()=>{r.clearHoloTrace()},R=e=>{r.setInterpolate(e)},$=async e=>{await r.handleSignalData(e)},ee=()=>{r.clearHoloSignal()},te=e=>{o==null||o.toggleTrafficInfo(e),r==null||r.toggleTrafficInfo(e)},ae=e=>{r==null||r.togglePause(e)},ne=e=>{o==null||o.toggleTrafficObject(e),r==null||r.toggleTrafficObject(e)},S=e=>{r==null||r.updatePanelContent(e)},re=async e=>(s||(s=new b.default(i)),s.addOverlays(e)),se=e=>(s||(s=new b.default(i)),s.addMask(e)),oe=()=>{s==null||s.removeMask()},ie=e=>s==null?void 0:s.removeOverlaysByType(e),ce=e=>s==null?void 0:s.removeOverlaysById(e),le=()=>s==null?void 0:s.removeAllOverlays(),ue=()=>{s==null||s.showAllOverlays()},me=e=>{g||(g=new Be.default(i)),g.updateQueueLength(e)},de=()=>{g==null||g.removeQueueLength()},ge=async(e,m)=>(t||(t=new O.default(i)),await t.showOpenDriveFromServer(e,m)),pe=async e=>(t||(t=new O.default(i)),await t.clearOpenDrive(),await t.showOpenDriveFromFile(e)),fe=async()=>await(t==null?void 0:t.clearOpenDrive()),Se=async e=>t?await(t==null?void 0:t.findSumo(e)):{status:-1,message:"未加载OpenDrive地图"},ye=async e=>t?t.selectSumo(e):{status:-1,message:"未加载OpenDrive地图"},ve=async e=>t?t.unselectSumo(e):{status:-1,message:"未加载OpenDrive地图"},we=async e=>t?await t.geometrySearch(e):{status:-1,message:"未加载OpenDrive地图"},he=async e=>t?await t.getSumoInfo(e):{status:-1,message:"未加载OpenDrive地图"},Ce=async e=>t?await(t==null?void 0:t.splitLane(e)):{status:-1,message:"未加载OpenDrive地图"},ke=async()=>t?t==null?void 0:t.clearSplitLane():{status:-1,message:"未加载OpenDrive地图"},Oe=e=>(a||(a=new L.default(i)),a.showSignalControlArea(e)),be=()=>{a==null||a.clearSignalControlArea()},Ae=async e=>a?await a.locateSignalControlArea(e):{status:-1,message:"未加载信号控制区"},Le=async e=>a?await a.highlightSignalControlArea(e):{status:-1,message:"未加载信号控制区"},De=()=>a?a.resetHighlight():{status:-1,message:"未加载信号控制区"},Te=e=>(a||(a=new L.default(i)),a.showSubSignalControlArea(e)),_e=e=>a?a.editSubSignalControlArea(e):{status:-1,message:"未加载信号控制区"},Ie=e=>a?a.selectSubSignalControlAreaCross(e):{status:-1,message:"未加载信号控制区"},xe=e=>a?a.unselectSubSignalControlAreaCross(e):{status:-1,message:"未加载信号控制区"},k=D,y=_;return T({mapViewer:x,setLayerVisibility:E,setMapCenter:B,lookAt:P,setMapCamera:H,setMapZoomRange:Q,requestCoordinateTransform:z,cancelCoordinateTransform:j,addOverlays:re,addMask:se,removeMask:oe,showAllOverlays:ue,removeOverlaysByType:ie,removeOverlaysById:ce,removeAllOverlays:le,showLaneNumber:Z,clearLaneNumber:K,initializeAreaTool:U,calCrossIndicatorArea:G,calRoadIndicatorArea:J,connectCarFlow:W,disconnectCarFlow:X,handleHoloVehicleTraceData:Y,clearHoloTrace:F,handleHoloSignalData:$,clearHoloSignal:ee,setInterpolate:R,toggleTrafficInfo:te,toggleTrafficObject:ne,toggleVehicleInfo:S,togglePause:ae,updateQueueLength:me,removeQueueLength:de,showOpenDriveFromServer:ge,showOpenDriveFromFile:pe,clearOpenDrive:fe,geometrySearchInOpenDrive:we,findSumoInOpenDrive:Se,selectSumoInOpenDrive:ye,unselectSumoInOpenDrive:ve,getSumoInfo:he,splitOpenDriveLane:Ce,clearSplitOpenDriveLane:ke,showSignalControlArea:Oe,clearSignalControlArea:be,locateSignalControlArea:Ae,highlightSignalControlArea:Le,resetHighlightSignalControlArea:De,showSubSignalControlArea:Te,editSubSignalControlArea:_e,selectSubSignalControlAreaCross:Ie,unselectSubSignalControlAreaCross:xe}),(e,m)=>(n.openBlock(),n.createElementBlock("div",Pe,[n.createElementVNode("div",{class:"gis-viewer-main",ref_key:"mapContainer",ref:p},[n.withDirectives(n.createElementVNode("div",Ee,[n.createElementVNode("button",{style:{"margin-right":"10px"},onClick:q}," 开始记录 "),n.createElementVNode("button",{style:{"margin-right":"10px"},onClick:M}," 下载日志 "),n.createElementVNode("button",{style:{"margin-right":"10px"},onClick:V}," 显示车辆id "),n.createElementVNode("button",{onClick:N},"显示车辆号牌")],512),[[n.vShow,f.value]])],512),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(C,(c,d)=>(n.openBlock(),n.createBlock(Ve.default,{key:d,"display-mode":c.displayMode,"road-id":c.crossId,"cross-id":c.roadId,"map-point":c.mapPoint,"stop-line":c.stopLine,position:c.position,rotation:c.rotation,scale:c.scale,"lamp-status":c.lampStatus},null,8,["display-mode","road-id","cross-id","map-point","stop-line","position","rotation","scale","lamp-status"]))),128))]))}});exports.default=ze;
@@ -104,10 +104,7 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
104
104
  status: number;
105
105
  message: string;
106
106
  }>;
107
- showSignalControlArea: (params: {
108
- areaList: any[];
109
- style?: string | undefined;
110
- }) => import("../types").IResult;
107
+ showSignalControlArea: (params: import("../types").IShowSignalControlAreaParams) => import("../types").IResult;
111
108
  clearSignalControlArea: () => void;
112
109
  locateSignalControlArea: (params: {
113
110
  id: string;
@@ -117,12 +114,7 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
117
114
  }) => Promise<import("../types").IResult>;
118
115
  resetHighlightSignalControlArea: () => import("../types").IResult;
119
116
  showSubSignalControlArea: (params: any) => import("../types").IResult;
120
- editSubSignalControlArea: (addCrossCallback: (params: {
121
- id: string;
122
- name: string;
123
- }) => void, removeCrossCallback: (params: {
124
- id: string;
125
- }) => void) => Promise<import("../types").IResult> | {
117
+ editSubSignalControlArea: (params: import("../types").IEditSignalControlAreaParams) => Promise<import("../types").IResult> | {
126
118
  status: number;
127
119
  message: string;
128
120
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const P=require("@arcgis/core/core/reactiveUtils"),u=require("@arcgis/core/geometry"),g=require("@arcgis/core/geometry/support/webMercatorUtils.js"),m=require("@arcgis/core/layers/GraphicsLayer"),y=require("./signal-holo-flow.js");function w(f){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(f){for(const i in f)if(i!=="default"){const l=Object.getOwnPropertyDescriptor(f,i);Object.defineProperty(t,i,l.get?l:{enumerable:!0,get:()=>f[i]})}}return t.default=f,Object.freeze(t)}const L=w(P),d=w(g);class M extends y.default{constructor(t,i){super(t),this.stopLineLayer=new m,this.watchHandle=null,this.stopLineMap=new Map,this.countdownPanelProps=i,this.view.map.add(this.stopLineLayer)}async initializeLayer(){var p,c;console.time("初始化停止线图层");let t=(c=(p=this.mapConfig.holoFlow)==null?void 0:p.signal)==null?void 0:c.stopLineLayer;if(!t)return;t=this.mapConfig.assetsRoot+"/"+t,(await(await fetch(t)).json()).features.forEach(o=>{const{roadId:n,nodeId:e,angle:a,destinationPoint:s}=o.properties,{coordinates:r}=o.geometry,h=this.stopLineMap.get(e);h?h.set(n,{coord:r,panelPoint:s,angle:a}):this.stopLineMap.set(e,new Map([[n,{coord:r,panelPoint:s,angle:a}]]))}),console.timeEnd("初始化停止线图层")}getPanelScale(){const t=this.view.scale;let i=1;return t<1e3?i=1:t<2e3?i=.8:t<4e3?i=.4:i=0,i}async handleSignalData(t){this.watchHandle||(this.watchHandle=L.watch(()=>this.view.extent,()=>{const o=this.getPanelScale();for(const n of this.countdownPanelProps){o!==this.currentPanelScale&&(n.scale=o);const{mapPoint:e}=n;let a=new u.Point({x:e[0],y:e[1]});this.view.spatialReference.isWebMercator&&(a=d.geographicToWebMercator(a));const s=this.view.toScreen(a);if(n.position.left=s.x,n.position.top=s.y,this.view.type==="3d"){const r=this.getPanelRotation(n.stopLine);n.rotation=r}}this.currentPanelScale=o}));const i=t.crossId,l=this.stopLineMap.get(i);if(!l)return;const p=t.phaseCountDownList,c=new Map;for(const o of p){let n="";for(let r of o.roadIdList)if(r.startsWith("-")&&(r=r.slice(1)),l.has(r)){n=r;break}if(!n)continue;let e=c.get(n);if(e||(e={},c.set(n,e)),!o.direction){console.log(`没有找到对应的方向${i}--${JSON.stringify(o)}`);continue}const a=o.direction.toLowerCase(),s=o.color===1?"red":o.color===2?"yellow":"green";a==="u"?(e.uNumber=o.leftTime,e.uColor=s):a==="l"?(e.lNumber=o.leftTime,e.lColor=s):a==="s"?(e.sNumber=o.leftTime,e.sColor=s):a==="r"&&(e.rNumber=o.leftTime,e.rColor=s)}c.forEach((o,n)=>{const e=l.get(n);if(!e)return;const a=this.countdownPanelProps.find(s=>s.crossId===i&&s.roadId===n);if(a)a.lampStatus=o;else{let s=new u.Point({x:e.panelPoint[0],y:e.panelPoint[1]});this.view.spatialReference.isWebMercator&&(s=d.geographicToWebMercator(s));const r=this.view.toScreen(s),h=this.getPanelRotation(e.coord);console.log(n,h),this.countdownPanelProps.push({displayMode:"complex",crossId:i,roadId:n,mapPoint:e.panelPoint,stopLine:e.coord,position:{left:r.x,top:r.y},rotation:h,scale:this.getPanelScale(),lampStatus:o})}})}clearSignal(){var t;this.stopLineLayer.removeAll(),this.countdownPanelProps.length=0,(t=this.watchHandle)==null||t.remove(),this.watchHandle=null}getPanelRotation(t){const i=t[0];let l=new u.Point({x:i[0],y:i[1]});this.view.spatialReference.isWebMercator&&(l=d.geographicToWebMercator(l));const p=this.view.toScreen(l),c=t[t.length-1];let o=new u.Point({x:c[0],y:c[1]});this.view.spatialReference.isWebMercator&&(o=d.geographicToWebMercator(o));const n=this.view.toScreen(o),e=n.x-p.x,a=n.y-p.y;return Math.atan2(a,e)*(180/Math.PI)}}exports.default=M;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const P=require("@arcgis/core/core/reactiveUtils"),d=require("@arcgis/core/geometry"),g=require("@arcgis/core/geometry/support/webMercatorUtils.js"),m=require("@arcgis/core/layers/GraphicsLayer"),y=require("./signal-holo-flow.js");function w(f){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(f){for(const n in f)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(f,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:()=>f[n]})}}return t.default=f,Object.freeze(t)}const L=w(P),u=w(g);class M extends y.default{constructor(t,n){super(t),this.stopLineLayer=new m,this.watchHandle=null,this.stopLineMap=new Map,this.countdownPanelProps=n,this.view.map.add(this.stopLineLayer)}async initializeLayer(){var p,c;console.time("初始化停止线图层");let t=(c=(p=this.mapConfig.holoFlow)==null?void 0:p.signal)==null?void 0:c.stopLineLayer;if(!t)return;t=this.mapConfig.assetsRoot+"/"+t,(await(await fetch(t)).json()).features.forEach(o=>{const{roadId:i,nodeId:e,angle:a,destinationPoint:s}=o.properties,{coordinates:r}=o.geometry,h=this.stopLineMap.get(e);h?h.set(i,{coord:r,panelPoint:s,angle:a}):this.stopLineMap.set(e,new Map([[i,{coord:r,panelPoint:s,angle:a}]]))}),console.timeEnd("初始化停止线图层")}getPanelScale(){const t=this.view.scale;let n=1;return t<1e3?n=1:t<2e3?n=.8:t<4e3?n=.4:n=0,n}async handleSignalData(t){this.watchHandle||(this.watchHandle=L.watch(()=>this.view.extent,()=>{const o=this.getPanelScale();for(const i of this.countdownPanelProps){o!==this.currentPanelScale&&(i.scale=o);const{mapPoint:e}=i;let a=new d.Point({x:e[0],y:e[1]});this.view.spatialReference.isWebMercator&&(a=u.geographicToWebMercator(a));const s=this.view.toScreen(a);if(i.position.left=s.x,i.position.top=s.y,this.view.type==="3d"){const r=this.getPanelRotation(i.stopLine);i.rotation=r}}this.currentPanelScale=o}));const n=t.crossId,l=this.stopLineMap.get(n);if(!l)return;const p=t.phaseCountDownList,c=new Map;for(const o of p){let i="";for(let r of o.roadIdList)if(r.startsWith("-")&&(r=r.slice(1)),l.has(r)){i=r;break}if(!i)continue;let e=c.get(i);if(e||(e={},c.set(i,e)),!o.direction){console.log(`没有找到对应的方向${n}--${JSON.stringify(o)}`);continue}const a=o.direction.toLowerCase(),s=o.color===1?"red":o.color===2?"yellow":"green";a==="u"?(e.uNumber=o.leftTime,e.uColor=s):a==="l"?(e.lNumber=o.leftTime,e.lColor=s):a==="s"?(e.sNumber=o.leftTime,e.sColor=s):a==="r"&&(e.rNumber=o.leftTime,e.rColor=s)}c.forEach((o,i)=>{const e=l.get(i);if(!e)return;const a=this.countdownPanelProps.find(s=>s.crossId===n&&s.roadId===i);if(a)a.lampStatus=o;else{let s=new d.Point({x:e.panelPoint[0],y:e.panelPoint[1]});this.view.spatialReference.isWebMercator&&(s=u.geographicToWebMercator(s));const r=this.view.toScreen(s),h=this.getPanelRotation(e.coord);this.countdownPanelProps.push({displayMode:"complex",crossId:n,roadId:i,mapPoint:e.panelPoint,stopLine:e.coord,position:{left:r.x,top:r.y},rotation:h,scale:this.getPanelScale(),lampStatus:o})}})}clearSignal(){var t;this.stopLineLayer.removeAll(),this.countdownPanelProps.length=0,(t=this.watchHandle)==null||t.remove(),this.watchHandle=null}getPanelRotation(t){const n=t[0];let l=new d.Point({x:n[0],y:n[1]});this.view.spatialReference.isWebMercator&&(l=u.geographicToWebMercator(l));const p=this.view.toScreen(l),c=t[t.length-1];let o=new d.Point({x:c[0],y:c[1]});this.view.spatialReference.isWebMercator&&(o=u.geographicToWebMercator(o));const i=this.view.toScreen(o),e=i.x-p.x,a=i.y-p.y;return Math.atan2(a,e)*(180/Math.PI)}}exports.default=M;
@@ -3,10 +3,15 @@ export default class TraceRendererLayer implements ITraceRendererInterface {
3
3
  private view;
4
4
  private readonly vehicleLayer;
5
5
  private mapConfig;
6
+ private hasGpu;
6
7
  private rafSignal;
7
8
  private appDataStore;
8
9
  private logTable;
9
10
  constructor(view: __esri.MapView);
11
+ private getRendererText;
12
+ private em;
13
+ private el;
14
+ private getGpuText;
10
15
  getLog(): (string | number)[][];
11
16
  init(): Promise<void>;
12
17
  private needInterpolate;
@@ -45,6 +50,7 @@ export default class TraceRendererLayer implements ITraceRendererInterface {
45
50
  * @returns
46
51
  */
47
52
  private createCIMSymbol;
53
+ private createMarkerSymbol;
48
54
  /**
49
55
  * 根据车身颜色属性返回对应的车辆图标
50
56
  * @param carColor