gisviewer-vue3-arcgis 1.0.164 → 1.0.166

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 (40) hide show
  1. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  2. package/es/src/gis-map/gis-map.vue.d.ts +111 -0
  3. package/es/src/gis-map/gis-map.vue.mjs +135 -124
  4. package/es/src/gis-map/index.d.ts +111 -0
  5. package/es/src/gis-map/stores/appData.d.ts +2 -0
  6. package/es/src/gis-map/stores/appData.mjs +4 -2
  7. package/es/src/gis-map/utils/common-utils.mjs +6 -6
  8. package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +85 -0
  9. package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.mjs +7 -0
  10. package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.mjs +120 -0
  11. package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue3.mjs +4 -0
  12. package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +13 -0
  13. package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.mjs +95 -35
  14. package/es/src/gis-map/utils/holo-flow/trace-renderer-layer.mjs +102 -99
  15. package/es/src/gis-map/utils/map-initializer.mjs +54 -45
  16. package/es/src/gis-map/utils/open-drive-renderer/index.d.ts +7 -0
  17. package/es/src/gis-map/utils/open-drive-renderer/index.mjs +314 -286
  18. package/es/src/gis-map/utils/traffic-flow.mjs +5 -4
  19. package/es/src/types/index.d.ts +21 -0
  20. package/es/style.css +1 -1
  21. package/lib/_virtual/_plugin-vue_export-helper.js +1 -0
  22. package/lib/src/gis-map/gis-map.vue.d.ts +111 -0
  23. package/lib/src/gis-map/gis-map.vue.js +1 -1
  24. package/lib/src/gis-map/index.d.ts +111 -0
  25. package/lib/src/gis-map/stores/appData.d.ts +2 -0
  26. package/lib/src/gis-map/stores/appData.js +1 -1
  27. package/lib/src/gis-map/utils/common-utils.js +1 -1
  28. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +85 -0
  29. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.js +1 -0
  30. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.js +1 -0
  31. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue3.js +1 -0
  32. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +13 -0
  33. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.js +1 -1
  34. package/lib/src/gis-map/utils/holo-flow/trace-renderer-layer.js +1 -1
  35. package/lib/src/gis-map/utils/map-initializer.js +1 -1
  36. package/lib/src/gis-map/utils/open-drive-renderer/index.d.ts +7 -0
  37. package/lib/src/gis-map/utils/open-drive-renderer/index.js +1 -1
  38. package/lib/src/gis-map/utils/traffic-flow.js +1 -1
  39. package/lib/src/types/index.d.ts +21 -0
  40. package/package.json +1 -1
@@ -1,22 +1,22 @@
1
1
  import g from "@arcgis/core/Graphic";
2
2
  import * as C from "@arcgis/core/core/promiseUtils";
3
3
  import * as $ from "@arcgis/core/core/reactiveUtils.js";
4
- import { Polygon as N } from "@arcgis/core/geometry";
5
- import * as L from "@arcgis/core/geometry/geometryEngine";
4
+ import { Polygon as L, Point as F } from "@arcgis/core/geometry";
5
+ import * as S from "@arcgis/core/geometry/geometryEngine";
6
6
  import k from "@arcgis/core/layers/FeatureLayer";
7
- import I from "@arcgis/core/layers/GraphicsLayer";
7
+ import w from "@arcgis/core/layers/GraphicsLayer";
8
8
  import * as D from "@turf/helpers";
9
- import { lineSliceAlong as G } from "@turf/line-slice-along";
9
+ import { lineSliceAlong as x } from "@turf/line-slice-along";
10
10
  import b from "axios";
11
- import { XMLParser as F } from "fast-xml-parser";
12
- import P from "md5";
13
- import x from "pako";
11
+ import { XMLParser as P } from "fast-xml-parser";
12
+ import J from "md5";
13
+ import G from "pako";
14
14
  import { watch as E } from "vue";
15
15
  import R from "../../stores/index.mjs";
16
- import J from "../common-utils.mjs";
17
- class M {
16
+ import T from "../common-utils.mjs";
17
+ class O {
18
18
  constructor(e) {
19
- this.junctionNames = /* @__PURE__ */ new Map(), this.junctionScale = 5e3, this.projectName = "", this.openDriveServer = "", this.currentSectionCode = "", this.selectedSectionIds = [], this.currentJunctionId = "", this.view = e, this.laneLayer = new k({
19
+ this.junctionNames = /* @__PURE__ */ new Map(), this.junctionScale = 5e3, this.xodrBorder = [], this.projectName = "", this.openDriveServer = "", this.currentSectionCode = "", this.selectedSectionIds = [], this.currentJunctionId = "", this.view = e, this.laneLayer = new k({
20
20
  id: "OpenDriveLane",
21
21
  fields: [
22
22
  {
@@ -289,7 +289,7 @@ class M {
289
289
  }
290
290
  }
291
291
  ]
292
- }), 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([
292
+ }), this.junctionLayer = new w({ id: "OpenDriveJunction" }), this.sectionLayer = new w({ id: "OpenDriveSection" }), this.highlightLayer = new w({ id: "OpenDriveHighlight" }), this.flashLayer = new w({ id: "OpenDriveFlash" }), this.drawLayer = new w({ id: "Draw" }), this.splitLaneLayer = new w({ id: "SplitLane" }), this.borderLayer = new w({ id: "OpenDriveBorder" }), this.view.map.addMany([
293
293
  this.laneLayer,
294
294
  this.sectionLayer,
295
295
  this.roadNameLayer,
@@ -302,18 +302,19 @@ class M {
302
302
  ]);
303
303
  }
304
304
  static getInstance(e) {
305
- return this.instance || (this.instance = new M(e)), this.instance;
305
+ return this.instance || (this.instance = new O(e)), this.instance;
306
306
  }
307
307
  async makeMd5FromFile(e) {
308
308
  var t;
309
309
  try {
310
- const r = await (await fetch(e)).text(), n = (t = new F({
310
+ const o = await (await fetch(e)).text();
311
+ let r = (t = new P({
311
312
  ignoreAttributes: !1,
312
313
  allowBooleanAttributes: !0
313
- }).parse(r).OpenDRIVE.userData) == null ? void 0 : t.border;
314
- return { status: 0, message: "ok", result: { md5: P(r), border: n } };
315
- } catch (i) {
316
- return { status: -1, message: i.message };
314
+ }).parse(o).OpenDRIVE.userData) == null ? void 0 : t.border;
315
+ return r ? r = JSON.parse(r) : r = [], { status: 0, message: "ok", result: { md5: J(o), border: r } };
316
+ } catch (s) {
317
+ return { status: -1, message: s.message };
317
318
  }
318
319
  }
319
320
  /**
@@ -322,32 +323,39 @@ class M {
322
323
  * @returns
323
324
  */
324
325
  async showOpenDriveFromFile(e) {
325
- var f, y;
326
- this.openDriveClickCallback = e.selectedCallback, $.watch(
326
+ var y, m;
327
+ this.openDriveClickCallback = e.selectedCallback, this.scaleWatch = $.watch(
327
328
  () => this.view.scale,
328
- (p, h) => {
329
- p > this.junctionScale && h <= this.junctionScale ? (console.log(p, h), this.junctionLayer.graphics.forEach((m) => {
330
- m.symbol = this.getCrossGraphicSymbol(
331
- m.attributes,
332
- "marker"
333
- );
334
- })) : p <= this.junctionScale && h > this.junctionScale && (console.log(p, h), this.junctionLayer.graphics.forEach((m) => {
335
- m.symbol = this.getCrossGraphicSymbol(
336
- m.attributes,
337
- "picture"
338
- );
339
- }));
329
+ (h, p) => {
330
+ h > this.junctionScale && p <= this.junctionScale ? this.updateAllJunctionSymbol("marker") : h <= this.junctionScale && p > this.junctionScale && this.updateAllJunctionSymbol("picture");
340
331
  }
341
332
  ), console.time("md5用时");
342
333
  const t = await this.makeMd5FromFile(e.file);
343
334
  if (t.status !== 0)
344
335
  return t;
345
- this.projectName = t.result.md5, console.timeEnd("md5用时"), console.log(t.result.border), this.openDriveServer = e.server;
346
- const i = `http://${this.openDriveServer}/api/openDrive/uploadXodr`;
347
- let r;
336
+ if (this.projectName = t.result.md5, console.timeEnd("md5用时"), this.xodrBorder = t.result.border, this.xodrBorder.length > 0) {
337
+ const h = new g({
338
+ geometry: new L({
339
+ rings: [this.xodrBorder]
340
+ }),
341
+ symbol: {
342
+ type: "simple-fill",
343
+ style: "none",
344
+ outline: {
345
+ style: "dash",
346
+ color: "black",
347
+ width: 2
348
+ }
349
+ }
350
+ });
351
+ console.log(h.toJSON()), this.borderLayer.add(h);
352
+ }
353
+ this.openDriveServer = e.server;
354
+ const s = `http://${this.openDriveServer}/api/openDrive/uploadXodr`;
355
+ let o;
348
356
  try {
349
- r = await b.post(
350
- i,
357
+ o = await b.post(
358
+ s,
351
359
  {},
352
360
  {
353
361
  params: {
@@ -356,34 +364,34 @@ class M {
356
364
  }
357
365
  }
358
366
  );
359
- } catch (p) {
360
- return { status: -1, message: p.message };
367
+ } catch (h) {
368
+ return { status: -1, message: h.message };
361
369
  }
362
- if (r.status !== 200)
363
- return { status: -1, message: r.statusText };
370
+ if (o.status !== 200)
371
+ return { status: -1, message: o.statusText };
364
372
  console.time("渲染用时");
365
- const s = r.data.result.geoSetting;
366
- J.setGeoData(
367
- s.geoReference,
368
- s.offsetX,
369
- s.offsetY
373
+ const i = o.data.result.geoSetting;
374
+ T.setGeoData(
375
+ i.geoReference,
376
+ i.offsetX,
377
+ i.offsetY
370
378
  );
371
- let c = r.data.result.json;
379
+ let c = o.data.result.json;
372
380
  c.startsWith(window.location.protocol) || (c = `${window.location.protocol}//${e.server}${c}`);
373
- const a = await (await fetch(c)).arrayBuffer(), o = x.inflate(a, { to: "string" }), l = JSON.parse(o);
381
+ const a = await (await fetch(c)).arrayBuffer(), n = G.inflate(a, { to: "string" }), l = JSON.parse(n);
374
382
  await this.showAllLanes(
375
383
  l,
376
- ((f = e.options) == null ? void 0 : f.showJunctionLane) || !1,
377
- ((y = e.options) == null ? void 0 : y.showRoadName) || !0
384
+ ((y = e.options) == null ? void 0 : y.showJunctionLane) || !1,
385
+ ((m = e.options) == null ? void 0 : m.showRoadName) || !0
378
386
  );
379
- const d = r.data.result.junctions;
387
+ const d = o.data.result.junctions;
380
388
  this.showJunction(d), e.options && e.options.centerMap !== !1 && await this.view.goTo(this.allLaneGraphics), this.mouseMoveHandler || this.monitorMouseMove(), this.mouseClickHandler || this.monitorMouseClick();
381
389
  const u = R.useAppDataStore;
382
390
  return E(
383
391
  () => u.isSketching,
384
392
  () => {
385
- var p, h;
386
- u.isSketching ? ((p = this.mouseMoveHandler) == null || p.remove(), this.mouseMoveHandler = void 0, (h = this.mouseClickHandler) == null || h.remove(), this.mouseClickHandler = void 0) : (this.monitorMouseMove(), this.monitorMouseClick());
393
+ var h, p;
394
+ u.isSketching ? ((h = this.mouseMoveHandler) == null || h.remove(), this.mouseMoveHandler = void 0, (p = this.mouseClickHandler) == null || p.remove(), this.mouseClickHandler = void 0) : (this.monitorMouseMove(), this.monitorMouseClick());
387
395
  }
388
396
  ), console.timeEnd("渲染用时"), { status: 0, message: "ok" };
389
397
  }
@@ -393,7 +401,7 @@ class M {
393
401
  * @param projectName
394
402
  */
395
403
  async showOpenDriveFromServer(e, t) {
396
- const i = `http://${e}/api/openDrive/analyzeXodr`, r = await b.get(i, {
404
+ const s = `http://${e}/api/openDrive/analyzeXodr`, o = await b.get(s, {
397
405
  headers: {
398
406
  projectName: t
399
407
  },
@@ -402,12 +410,12 @@ class M {
402
410
  compressed: !0
403
411
  }
404
412
  });
405
- if (r.status !== 200)
406
- throw new Error(`OpenDriveRenderer: ${r.statusText}`);
407
- let s = r.data.result.json;
408
- s.startsWith(window.location.protocol) || (s = `${window.location.protocol}//${e}${s}`);
409
- const n = await (await fetch(s)).arrayBuffer(), a = x.inflate(n, { to: "string" }), o = JSON.parse(a);
410
- return await this.showAllLanes(o, !1, !1), { status: 0, message: "ok" };
413
+ if (o.status !== 200)
414
+ throw new Error(`OpenDriveRenderer: ${o.statusText}`);
415
+ let i = o.data.result.json;
416
+ i.startsWith(window.location.protocol) || (i = `${window.location.protocol}//${e}${i}`);
417
+ const r = await (await fetch(i)).arrayBuffer(), a = G.inflate(r, { to: "string" }), n = JSON.parse(a);
418
+ return await this.showAllLanes(n, !1, !1), { status: 0, message: "ok" };
411
419
  }
412
420
  /**
413
421
  * 显示所有车道
@@ -416,21 +424,21 @@ class M {
416
424
  * @param showRoadName 是否显示道路名称
417
425
  * @returns
418
426
  */
419
- async showAllLanes(e, t, i) {
420
- const r = await this.laneLayer.queryFeatures();
421
- return r.features.length > 0 && this.laneLayer.applyEdits({
422
- deleteFeatures: r.features
423
- }), this.roadNameLayer.visible = i, new Promise((s) => {
427
+ async showAllLanes(e, t, s) {
428
+ const o = await this.laneLayer.queryFeatures();
429
+ return o.features.length > 0 && this.laneLayer.applyEdits({
430
+ deleteFeatures: o.features
431
+ }), this.roadNameLayer.visible = s, new Promise((i) => {
424
432
  let c = 0;
425
433
  this.allLaneGraphics = [], this.allRefLineGraphics = [];
426
- const n = [];
427
- for (const o of e) {
428
- if (!t && o.junction !== "-1")
434
+ const r = [];
435
+ for (const n of e) {
436
+ if (!t && n.junction !== "-1")
429
437
  continue;
430
- const { id: l, refLine: d } = o;
431
- let u = o.name;
438
+ const { id: l, refLine: d } = n;
439
+ let u = n.name;
432
440
  u.includes("(") && (u = u.slice(0, u.indexOf("("))), u = u.replace(/(.)/g, "$1 ");
433
- const f = new g({
441
+ const y = new g({
434
442
  geometry: {
435
443
  type: "polyline",
436
444
  paths: [d]
@@ -441,65 +449,65 @@ class M {
441
449
  roadName: u
442
450
  }
443
451
  });
444
- this.allRefLineGraphics.push(f), o.laneSections.sort((y, p) => Number(y.id) - Number(p.id));
445
- for (let y = 0; y < o.laneSections.length; y++) {
446
- const p = o.laneSections[y], h = Number(p.id);
447
- for (const m of p.lanePaths) {
448
- const v = Number(m.id);
452
+ this.allRefLineGraphics.push(y), n.laneSections.sort((m, h) => Number(m.id) - Number(h.id));
453
+ for (let m = 0; m < n.laneSections.length; m++) {
454
+ const h = n.laneSections[m], p = Number(h.id);
455
+ for (const f of h.lanePaths) {
456
+ const v = Number(f.id);
449
457
  if (v === 0)
450
458
  continue;
451
- const w = m.type, O = [...m.outerPath], S = m.innerPath.concat(
452
- O.reverse()
459
+ const I = f.type, M = [...f.outerPath], A = f.innerPath.concat(
460
+ M.reverse()
453
461
  );
454
- if (S.length <= 3) {
462
+ if (A.length <= 3) {
455
463
  console.warn(`lane ${v} has less than 3 points`);
456
464
  continue;
457
465
  }
458
- S.push(m.innerPath[0]);
459
- const A = new N({
460
- rings: [S]
466
+ A.push(f.innerPath[0]);
467
+ const N = new L({
468
+ rings: [A]
461
469
  });
462
- if (A) {
470
+ if (N) {
463
471
  const j = new g({
464
- geometry: A,
472
+ geometry: N,
465
473
  attributes: {
466
474
  ObjectID: c++,
467
- id: `${l}+${h}+${v}`,
468
- fromNode: o.fromNode,
469
- toNode: o.toNode,
475
+ id: `${l}+${p}+${v}`,
476
+ fromNode: n.fromNode,
477
+ toNode: n.toNode,
470
478
  roadId: String(l),
471
- roadName: o.name,
472
- sectionId: String(h),
473
- sectionIndex: y,
479
+ roadName: n.name,
480
+ sectionId: String(p),
481
+ sectionIndex: m,
474
482
  laneId: v,
475
- type: w,
483
+ type: I,
476
484
  sumoId: "",
477
485
  // 记录左右边线的起始点,用于按长度高亮车道的一部分
478
- leftLine: m.innerPath,
479
- rightLine: m.outerPath
486
+ leftLine: f.innerPath,
487
+ rightLine: f.outerPath
480
488
  }
481
489
  });
482
- this.allLaneGraphics.push(j), n.push(j);
490
+ this.allLaneGraphics.push(j), r.push(j);
483
491
  }
484
492
  }
485
493
  }
486
494
  }
487
495
  const a = setInterval(() => {
488
- if (n.length > 0 || this.allRefLineGraphics.length > 0) {
489
- if (n.length > 0) {
490
- const o = n.splice(0, 100);
496
+ if (r.length > 0 || this.allRefLineGraphics.length > 0) {
497
+ if (r.length > 0) {
498
+ const n = r.splice(0, 100);
491
499
  this.laneLayer.applyEdits({
492
- addFeatures: o
500
+ addFeatures: n
493
501
  });
494
502
  }
495
503
  if (this.allRefLineGraphics.length > 0) {
496
- const o = this.allRefLineGraphics.splice(0, 10);
504
+ const n = this.allRefLineGraphics.splice(0, 10);
497
505
  this.roadNameLayer.applyEdits({
498
- addFeatures: o
506
+ addFeatures: n
499
507
  });
500
508
  }
501
509
  } else
502
- clearInterval(a), s();
510
+ clearInterval(a), i();
503
511
  }, 10);
504
512
  });
505
513
  }
@@ -510,22 +518,29 @@ class M {
510
518
  */
511
519
  showJunction(e) {
512
520
  const t = [];
513
- for (const i of e)
514
- if (i && (this.junctionNames.set(i.id, i.name), i.nodeType = i.type, i.crossId)) {
515
- const r = new g({
516
- geometry: {
517
- type: "point",
518
- x: i.coordinates[0],
519
- y: i.coordinates[1]
520
- },
521
- attributes: {
522
- ...i,
523
- selected: !1,
524
- type: "OpenDriveJunction"
525
- },
526
- symbol: this.getCrossGraphicSymbol(i, "marker")
521
+ let s;
522
+ this.xodrBorder.length > 0 && (s = new L({
523
+ rings: [this.xodrBorder]
524
+ }));
525
+ for (const o of e)
526
+ if (o && (this.junctionNames.set(o.id, o.name), o.nodeType = o.type, o.crossId)) {
527
+ const i = new F({
528
+ x: o.coordinates[0],
529
+ y: o.coordinates[1]
527
530
  });
528
- t.push(r);
531
+ let c = !0;
532
+ if (s && (c = S.contains(s, i)), c) {
533
+ const r = new g({
534
+ geometry: i,
535
+ attributes: {
536
+ ...o,
537
+ selected: !1,
538
+ type: "OpenDriveJunction"
539
+ },
540
+ symbol: this.getCrossGraphicSymbol(o, "marker")
541
+ });
542
+ t.push(r);
543
+ }
529
544
  }
530
545
  this.junctionLayer.addMany(t);
531
546
  }
@@ -535,30 +550,30 @@ class M {
535
550
  monitorMouseMove() {
536
551
  const e = C.debounce(async (t) => {
537
552
  var c;
538
- const r = (c = (await this.view.hitTest(t, {
553
+ const o = (c = (await this.view.hitTest(t, {
539
554
  include: [this.laneLayer, this.junctionLayer]
540
555
  })).results) == null ? void 0 : c.filter(
541
- (n) => n.type === "graphic"
556
+ (r) => r.type === "graphic"
542
557
  );
543
- if (r.length === 0) {
558
+ if (o.length === 0) {
544
559
  this.currentSectionCode !== "" && (this.currentSectionCode = "", this.highlightLayer.removeAll()), this.currentJunctionId !== "" && (this.currentJunctionId = ""), this.view.closePopup();
545
560
  return;
546
561
  }
547
- const s = r[0];
548
- if (this.hitGraphic = s.graphic, s.layer.id === "OpenDriveLane") {
549
- const n = `${this.hitGraphic.getAttribute(
562
+ const i = o[0];
563
+ if (this.hitGraphic = i.graphic, i.layer.id === "OpenDriveLane") {
564
+ const r = `${this.hitGraphic.getAttribute(
550
565
  "roadId"
551
566
  )}+${this.hitGraphic.getAttribute("sectionId")}`;
552
- if (this.currentSectionCode === n || this.selectedSectionIds.includes(n) || this.sectionLayer.graphics.findIndex(
553
- (h) => h.getAttribute("id") === n
567
+ if (this.currentSectionCode === r || this.selectedSectionIds.includes(r) || this.sectionLayer.graphics.findIndex(
568
+ (p) => p.getAttribute("id") === r
554
569
  ) >= 0)
555
570
  return;
556
- this.currentSectionCode = n;
557
- const o = this.allLaneGraphics.filter(
558
- (h) => `${h.attributes.roadId}+${h.attributes.sectionId}` === n
559
- ), l = L.union(
560
- o.map((h) => h.geometry)
561
- ), d = this.hitGraphic.getAttribute("fromNode"), u = this.hitGraphic.getAttribute("toNode"), f = this.junctionNames.get(d) || d, y = this.junctionNames.get(u) || u, p = new g({
571
+ this.currentSectionCode = r;
572
+ const n = this.allLaneGraphics.filter(
573
+ (p) => `${p.attributes.roadId}+${p.attributes.sectionId}` === r
574
+ ), l = S.union(
575
+ n.map((p) => p.geometry)
576
+ ), d = this.hitGraphic.getAttribute("fromNode"), u = this.hitGraphic.getAttribute("toNode"), y = this.junctionNames.get(d) || d, m = this.junctionNames.get(u) || u, h = new g({
562
577
  geometry: l,
563
578
  symbol: {
564
579
  type: "simple-fill",
@@ -571,11 +586,11 @@ class M {
571
586
  },
572
587
  attributes: {
573
588
  type: "OpenDriveSection",
574
- id: n,
589
+ id: r,
575
590
  selected: !1,
576
- fromNodeName: f,
577
- toNodeName: y,
578
- laneCount: o.length
591
+ fromNodeName: y,
592
+ toNodeName: m,
593
+ laneCount: n.length
579
594
  },
580
595
  popupTemplate: {
581
596
  title: this.hitGraphic.getAttribute("roadName"),
@@ -600,12 +615,12 @@ class M {
600
615
  ]
601
616
  }
602
617
  });
603
- this.highlightLayer.removeAll(), this.highlightLayer.add(p);
604
- } else if (s.layer.id === "OpenDriveJunction") {
605
- const n = this.hitGraphic.getAttribute("id");
606
- if (n === this.currentJunctionId)
618
+ this.highlightLayer.removeAll(), this.highlightLayer.add(h);
619
+ } else if (i.layer.id === "OpenDriveJunction") {
620
+ const r = this.hitGraphic.getAttribute("id");
621
+ if (r === this.currentJunctionId)
607
622
  return;
608
- this.currentJunctionId = n;
623
+ this.currentJunctionId = r;
609
624
  }
610
625
  });
611
626
  this.mouseMoveHandler = this.view.on("pointer-move", async (t) => {
@@ -619,64 +634,64 @@ class M {
619
634
  monitorMouseClick() {
620
635
  const e = C.debounce(async (t) => {
621
636
  var a;
622
- const r = (a = (await this.view.hitTest(t, {
637
+ const o = (a = (await this.view.hitTest(t, {
623
638
  include: [this.highlightLayer, this.junctionLayer, this.sectionLayer]
624
639
  })).results) == null ? void 0 : a.filter(
625
- (o) => o.type === "graphic"
640
+ (n) => n.type === "graphic"
626
641
  );
627
- if (r.length === 0)
642
+ if (o.length === 0)
628
643
  return;
629
- const s = r[0].graphic, c = s.getAttribute("type"), n = s.getAttribute("id");
644
+ const i = o[0].graphic, c = i.getAttribute("type"), r = i.getAttribute("id");
630
645
  if (c === "OpenDriveJunction")
631
- if (s.getAttribute("selected") === !1) {
632
- const o = `http://${this.openDriveServer}/api/sumo/getSumoJunction`, l = await b.get(o, {
646
+ if (i.getAttribute("selected") === !1) {
647
+ const n = `http://${this.openDriveServer}/api/sumo/getSumoJunction`, l = await b.get(n, {
633
648
  params: {
634
- id: n,
649
+ id: r,
635
650
  projectName: this.projectName
636
651
  }
637
652
  });
638
653
  l.status === 200 && l.data.status === 0 && (this.openDriveClickCallback && this.openDriveClickCallback({
639
654
  type: "OpenDriveJunction",
640
- id: n,
655
+ id: r,
641
656
  details: l.data.result
642
- }), s.setAttribute("selected", !0), s.symbol = {
657
+ }), i.setAttribute("selected", !0), i.symbol = {
643
658
  type: "picture-marker",
644
659
  url: "/GisViewerAssets/Images/point_red.png",
645
660
  width: "20px",
646
661
  height: "20px"
647
- }, this.increasePictureMarkerSize(s, 50));
662
+ }, this.increasePictureMarkerSize(i, 50));
648
663
  } else
649
664
  this.openDriveClickCallback && this.openDriveClickCallback({
650
665
  type: "OpenDriveJunction",
651
- id: n,
666
+ id: r,
652
667
  details: void 0
653
- }), s.setAttribute("selected", !1), s.symbol = this.getCrossGraphicSymbol(
654
- s.attributes,
668
+ }), i.setAttribute("selected", !1), i.symbol = this.getCrossGraphicSymbol(
669
+ i.attributes,
655
670
  this.view.scale < this.junctionScale ? "picture" : "marker"
656
671
  );
657
672
  else if (c === "OpenDriveSection")
658
- if (s.layer.id === "OpenDriveHighlight") {
659
- this.highlightLayer.remove(s), this.sectionLayer.add(s), s.setAttribute("selected", !0), this.selectedSectionIds.push(n);
660
- const o = `http://${this.openDriveServer}/api/sumo/getSumoEdge`, l = await b.get(o, {
673
+ if (i.layer.id === "OpenDriveHighlight") {
674
+ this.highlightLayer.remove(i), this.sectionLayer.add(i), i.setAttribute("selected", !0), this.selectedSectionIds.push(r);
675
+ const n = `http://${this.openDriveServer}/api/sumo/getSumoEdge`, l = await b.get(n, {
661
676
  params: {
662
- id: n,
677
+ id: r,
663
678
  projectName: this.projectName
664
679
  }
665
680
  });
666
681
  if (l.status === 200 && l.data.status === 0 && this.openDriveClickCallback) {
667
682
  const d = l.data.result.obj_id;
668
- s.setAttribute("edgeId", d), this.openDriveClickCallback({
683
+ i.setAttribute("edgeId", d), this.openDriveClickCallback({
669
684
  type: "OpenDriveSection",
670
685
  id: d,
671
686
  details: l.data.result
672
687
  });
673
688
  }
674
689
  } else
675
- this.sectionLayer.remove(s), this.selectedSectionIds = this.selectedSectionIds.filter(
676
- (o) => o !== n
690
+ this.sectionLayer.remove(i), this.selectedSectionIds = this.selectedSectionIds.filter(
691
+ (n) => n !== r
677
692
  ), this.openDriveClickCallback && this.openDriveClickCallback({
678
693
  type: "OpenDriveSection",
679
- id: s.getAttribute("edgeId"),
694
+ id: i.getAttribute("edgeId"),
680
695
  details: void 0
681
696
  });
682
697
  });
@@ -691,14 +706,14 @@ class M {
691
706
  * @param targetSize
692
707
  */
693
708
  increasePictureMarkerSize(e, t) {
694
- const i = setInterval(() => {
695
- const r = e.symbol, s = r.width;
696
- s < t ? e.symbol = {
709
+ const s = setInterval(() => {
710
+ const o = e.symbol, i = o.width;
711
+ i < t ? e.symbol = {
697
712
  type: "picture-marker",
698
- url: r.url,
699
- width: s + 1,
700
- height: s + 1
701
- } : clearInterval(i);
713
+ url: o.url,
714
+ width: i + 1,
715
+ height: i + 1
716
+ } : clearInterval(s);
702
717
  }, 20);
703
718
  }
704
719
  /**
@@ -707,40 +722,40 @@ class M {
707
722
  * @param targetSize
708
723
  */
709
724
  decreasePictureMarkerSize(e, t) {
710
- const i = setInterval(() => {
711
- const r = e.symbol, s = r.width;
712
- s > t ? e.symbol = {
725
+ const s = setInterval(() => {
726
+ const o = e.symbol, i = o.width;
727
+ i > t ? e.symbol = {
713
728
  type: "picture-marker",
714
- url: r.url,
715
- width: s - 1,
716
- height: s - 1
717
- } : clearInterval(i);
729
+ url: o.url,
730
+ width: i - 1,
731
+ height: i - 1
732
+ } : clearInterval(s);
718
733
  }, 20);
719
734
  }
720
735
  async getSumoInfo(e) {
721
736
  switch (e.type) {
722
737
  case "junction": {
723
- const t = `http://${this.openDriveServer}/api/sumo/getSumoJunction`, i = await b.get(t, {
738
+ const t = `http://${this.openDriveServer}/api/sumo/getSumoJunction`, s = await b.get(t, {
724
739
  params: {
725
740
  id: e.id,
726
741
  projectName: this.projectName
727
742
  }
728
743
  });
729
- return i.status === 200 ? i.data : { status: -1, message: `路口信息查询失败: ${e.id}` };
744
+ return s.status === 200 ? s.data : { status: -1, message: `路口信息查询失败: ${e.id}` };
730
745
  }
731
746
  case "edge": {
732
747
  const t = e.id.split("#");
733
- let i = t[0];
734
- i.startsWith("-") && (i = i.slice(1));
735
- let r = 0;
736
- t.length === 2 && (r = Number(t[1]));
737
- const s = this.allLaneGraphics.find(
738
- (c) => c.getAttribute("roadId") === i && c.getAttribute("sectionIndex") === r
748
+ let s = t[0];
749
+ s.startsWith("-") && (s = s.slice(1));
750
+ let o = 0;
751
+ t.length === 2 && (o = Number(t[1]));
752
+ const i = this.allLaneGraphics.find(
753
+ (c) => c.getAttribute("roadId") === s && c.getAttribute("sectionIndex") === o
739
754
  );
740
- if (s) {
741
- const c = `${i}+${s.getAttribute(
755
+ if (i) {
756
+ const c = `${s}+${i.getAttribute(
742
757
  "sectionId"
743
- )}`, n = `http://${this.openDriveServer}/api/sumo/getSumoEdge`, a = await b.get(n, {
758
+ )}`, r = `http://${this.openDriveServer}/api/sumo/getSumoEdge`, a = await b.get(r, {
744
759
  params: {
745
760
  id: c,
746
761
  projectName: this.projectName
@@ -758,13 +773,13 @@ class M {
758
773
  * 清除OpenDrive内容
759
774
  */
760
775
  async clearOpenDrive() {
761
- var t, i;
776
+ var t, s, o;
762
777
  let e = await this.laneLayer.queryFeatures();
763
778
  e.features.length > 0 && await this.laneLayer.applyEdits({
764
779
  deleteFeatures: e.features
765
780
  }), e = await this.roadNameLayer.queryFeatures(), e.features.length > 0 && await this.roadNameLayer.applyEdits({
766
781
  deleteFeatures: e.features
767
- }), this.highlightLayer.removeAll(), this.junctionLayer.removeAll(), this.sectionLayer.removeAll(), this.flashLayer.removeAll(), (t = this.mouseMoveHandler) == null || t.remove(), this.mouseMoveHandler = void 0, (i = this.mouseClickHandler) == null || i.remove(), this.mouseClickHandler = void 0;
782
+ }), this.highlightLayer.removeAll(), this.junctionLayer.removeAll(), this.sectionLayer.removeAll(), this.flashLayer.removeAll(), this.borderLayer.removeAll(), (t = this.mouseMoveHandler) == null || t.remove(), this.mouseMoveHandler = void 0, (s = this.mouseClickHandler) == null || s.remove(), this.mouseClickHandler = void 0, (o = this.scaleWatch) == null || o.remove(), this.scaleWatch = void 0;
768
783
  }
769
784
  /**
770
785
  * 用sumo的id定位车道、基本段、路段
@@ -772,30 +787,30 @@ class M {
772
787
  * @returns
773
788
  */
774
789
  async findSumo(e) {
775
- const { type: t, id: i } = e, r = e.flash === void 0 ? !0 : e.flash;
790
+ const { type: t, id: s } = e, o = e.flash === void 0 ? !0 : e.flash;
776
791
  if (t === "junction")
777
- return await this.findJunction(i, r);
792
+ return await this.findJunction(s, o);
778
793
  if (t === "edge") {
779
- const s = i.split("_");
780
- if (s.length > 2)
794
+ const i = s.split("_");
795
+ if (i.length > 2)
781
796
  return { status: -1, message: "id格式错误" };
782
- const c = s.length === 2 ? Number(s[1]) : void 0, n = s[0].split("#");
783
- if (n.length > 2)
797
+ const c = i.length === 2 ? Number(i[1]) : void 0, r = i[0].split("#");
798
+ if (r.length > 2)
784
799
  return { status: -1, message: "id格式错误" };
785
- const a = n[0], o = n.length === 2 ? Number(n[1]) : void 0;
786
- return await this.findLane({ roadsectId: a, segmentId: o, laneId: c, flash: r });
800
+ const a = r[0], n = r.length === 2 ? Number(r[1]) : void 0;
801
+ return await this.findLane({ roadsectId: a, segmentId: n, laneId: c, flash: o });
787
802
  } else
788
803
  return { status: -1, message: "未知类型" };
789
804
  }
790
805
  async findJunction(e, t) {
791
- const i = this.junctionLayer.graphics.find(
792
- (r) => r.attributes.id === e
806
+ const s = this.junctionLayer.graphics.find(
807
+ (o) => o.attributes.id === e
793
808
  );
794
- if (!i)
809
+ if (!s)
795
810
  return { status: -1, message: "未找到。请检查路口编号" };
796
811
  if (t) {
797
- const r = new g({
798
- geometry: i.geometry,
812
+ const o = new g({
813
+ geometry: s.geometry,
799
814
  symbol: {
800
815
  type: "simple-marker",
801
816
  style: "circle",
@@ -807,9 +822,9 @@ class M {
807
822
  }
808
823
  }
809
824
  });
810
- this.flashGraphic(r);
825
+ this.flashGraphic(o);
811
826
  }
812
- return await this.view.goTo(i.geometry, { duration: 1e3 }), { status: 0, message: "ok" };
827
+ return await this.view.goTo(s.geometry, { duration: 1e3 }), { status: 0, message: "ok" };
813
828
  }
814
829
  /**
815
830
  * 用sumo的id定位车道、基本段、路段
@@ -817,44 +832,44 @@ class M {
817
832
  * @returns
818
833
  */
819
834
  async findLane(e) {
820
- let { roadsectId: t, segmentId: i, laneId: r } = e;
835
+ let { roadsectId: t, segmentId: s, laneId: o } = e;
821
836
  t.startsWith("-") && (t = t.slice(1));
822
- let s = this.allLaneGraphics.filter(
837
+ let i = this.allLaneGraphics.filter(
823
838
  (a) => a.attributes.roadId === t
824
839
  );
825
- if (s.length === 0)
840
+ if (i.length === 0)
826
841
  return { status: -1, message: "未找到。请检查路段编号" };
827
- if (i !== void 0) {
842
+ if (s !== void 0) {
828
843
  const a = [];
829
- if (s.forEach((o) => {
830
- const l = Number(o.attributes.sectionId);
844
+ if (i.forEach((n) => {
845
+ const l = Number(n.attributes.sectionId);
831
846
  a.indexOf(l) === -1 && a.push(l);
832
- }), a.sort((o, l) => o - l), i > a.length - 1)
847
+ }), a.sort((n, l) => n - l), s > a.length - 1)
833
848
  return { status: -1, message: "未找到。请检查基本段编号" };
834
- i = a[i], s = s.filter(
835
- (o) => Number(o.attributes.sectionId) === i
849
+ s = a[s], i = i.filter(
850
+ (n) => Number(n.attributes.sectionId) === s
836
851
  );
837
852
  }
838
- if (r !== void 0) {
853
+ if (o !== void 0) {
839
854
  const a = [];
840
- if (s.forEach((o) => {
841
- const l = Number(o.attributes.laneId);
855
+ if (i.forEach((n) => {
856
+ const l = Number(n.attributes.laneId);
842
857
  a.indexOf(l) === -1 && a.push(l);
843
- }), a.sort((o, l) => o - l), r > a.length - 1)
858
+ }), a.sort((n, l) => n - l), o > a.length - 1)
844
859
  return { status: -1, message: "未找到。请检查车道编号" };
845
- r = a[r], s = s.filter(
846
- (o) => Number(o.attributes.laneId) === r
860
+ o = a[o], i = i.filter(
861
+ (n) => Number(n.attributes.laneId) === o
847
862
  );
848
863
  }
849
- const c = s.map(
864
+ const c = i.map(
850
865
  (a) => a.geometry
851
- ), n = L.union(c);
866
+ ), r = S.union(c);
852
867
  if (e.flash) {
853
868
  const a = new g({
854
- geometry: n,
869
+ geometry: r,
855
870
  symbol: {
856
871
  type: "simple-fill",
857
- color: [0, 0, 255, 0.6],
872
+ color: [0, 255, 255, 0.6],
858
873
  style: "solid",
859
874
  outline: {
860
875
  width: 0
@@ -863,7 +878,7 @@ class M {
863
878
  });
864
879
  this.flashGraphic(a);
865
880
  }
866
- return await this.view.goTo(n, { duration: 1e3 }), { status: 0, message: "ok" };
881
+ return await this.view.goTo(r, { duration: 1e3 }), { status: 0, message: "ok" };
867
882
  }
868
883
  /**
869
884
  * graphic渐隐渐显闪烁
@@ -871,9 +886,9 @@ class M {
871
886
  */
872
887
  flashGraphic(e) {
873
888
  this.flashLayer.removeAll(), this.flashLayer.add(e);
874
- let t = 0, i = !0;
875
- const r = setInterval(() => {
876
- i ? (this.flashLayer.opacity -= 0.02, this.flashLayer.opacity <= 0.1 && (i = !1, t++)) : (this.flashLayer.opacity += 0.02, this.flashLayer.opacity >= 1 && (i = !0)), t >= 5 && (this.flashLayer.removeAll(), this.flashLayer.opacity = 1, clearInterval(r));
889
+ let t = 0, s = !0;
890
+ const o = setInterval(() => {
891
+ s ? (this.flashLayer.opacity -= 0.02, this.flashLayer.opacity <= 0.1 && (s = !1, t++)) : (this.flashLayer.opacity += 0.02, this.flashLayer.opacity >= 1 && (s = !0)), t >= 5 && (this.flashLayer.removeAll(), this.flashLayer.opacity = 1, clearInterval(o));
877
892
  }, 10);
878
893
  }
879
894
  /**
@@ -889,10 +904,10 @@ class M {
889
904
  ));
890
905
  }), !e || e.type === "edge") {
891
906
  let t;
892
- !e || !e.id || e.id === "" ? t = this.sectionLayer.graphics.toArray() : t = this.sectionLayer.graphics.filter((i) => i.getAttribute("edgeId") === e.id).toArray(), t.length > 0 && (t.forEach((i) => {
893
- const r = i.getAttribute("id");
907
+ !e || !e.id || e.id === "" ? t = this.sectionLayer.graphics.toArray() : t = this.sectionLayer.graphics.filter((s) => s.getAttribute("edgeId") === e.id).toArray(), t.length > 0 && (t.forEach((s) => {
908
+ const o = s.getAttribute("id");
894
909
  this.selectedSectionIds = this.selectedSectionIds.filter(
895
- (s) => s !== r
910
+ (i) => i !== o
896
911
  );
897
912
  }), this.sectionLayer.removeMany(t));
898
913
  }
@@ -912,25 +927,25 @@ class M {
912
927
  }), { status: -1, message: "未找到路口" };
913
928
  case "edge": {
914
929
  const t = e.id.split("#");
915
- let i = String(t[0]);
916
- i.startsWith("-") && (i = i.slice(1));
917
- let r = 0;
918
- t.length === 2 && (r = Number(t[1]));
919
- let s = [];
920
- if (t.length === 1 ? s = this.allLaneGraphics.filter(
921
- (c) => c.getAttribute("roadId") === i
922
- ) : t.length === 2 && (s = this.allLaneGraphics.filter(
923
- (c) => c.getAttribute("roadId") === i && c.getAttribute("sectionIndex") === r
924
- )), s.length > 0) {
930
+ let s = String(t[0]);
931
+ s.startsWith("-") && (s = s.slice(1));
932
+ let o = 0;
933
+ t.length === 2 && (o = Number(t[1]));
934
+ let i = [];
935
+ if (t.length === 1 ? i = this.allLaneGraphics.filter(
936
+ (c) => c.getAttribute("roadId") === s
937
+ ) : t.length === 2 && (i = this.allLaneGraphics.filter(
938
+ (c) => c.getAttribute("roadId") === s && c.getAttribute("sectionIndex") === o
939
+ )), i.length > 0) {
925
940
  const c = /* @__PURE__ */ new Map();
926
- return s.forEach((n) => {
927
- const a = n.getAttribute("roadId") + "+" + n.getAttribute("sectionId");
941
+ return i.forEach((r) => {
942
+ const a = r.getAttribute("roadId") + "+" + r.getAttribute("sectionId");
928
943
  this.selectedSectionIds.includes(a) || this.selectedSectionIds.push(a);
929
- let o = c.get(a);
930
- o ? o.push(n.geometry) : (o = [n.geometry], c.set(a, o));
931
- }), c.forEach((n, a) => {
932
- const o = L.union(n), l = new g({
933
- geometry: o,
944
+ let n = c.get(a);
945
+ n ? n.push(r.geometry) : (n = [r.geometry], c.set(a, n));
946
+ }), c.forEach((r, a) => {
947
+ const n = S.union(r), l = new g({
948
+ geometry: n,
934
949
  symbol: {
935
950
  type: "simple-fill",
936
951
  color: [0, 255, 255, 0.5],
@@ -957,81 +972,81 @@ class M {
957
972
  }
958
973
  }
959
974
  async geometrySearch(e) {
960
- const t = new N({
975
+ const t = new L({
961
976
  rings: [e]
962
- }), i = await this.laneLayer.queryFeatures({
977
+ }), s = await this.laneLayer.queryFeatures({
963
978
  geometry: t,
964
979
  outFields: ["*"]
965
- }), r = [], s = [];
966
- for (const a of i.features) {
967
- const o = a.getAttribute("roadId"), l = a.getAttribute("sectionIndex"), d = `${o}#${l}`;
968
- if (r.indexOf(d) === -1) {
969
- r.push(d), this.selectSumo({
980
+ }), o = [], i = [];
981
+ for (const a of s.features) {
982
+ const n = a.getAttribute("roadId"), l = a.getAttribute("sectionIndex"), d = `${n}#${l}`;
983
+ if (o.indexOf(d) === -1) {
984
+ o.push(d), this.selectSumo({
970
985
  type: "edge",
971
986
  id: d
972
987
  });
973
- const u = `http://${this.openDriveServer}/api/sumo/getSumoEdge`, f = await b.get(u, {
988
+ const u = `http://${this.openDriveServer}/api/sumo/getSumoEdge`, y = await b.get(u, {
974
989
  params: {
975
- id: `${o}+${a.getAttribute("sectionId")}`,
990
+ id: `${n}+${a.getAttribute("sectionId")}`,
976
991
  projectName: this.projectName
977
992
  }
978
993
  });
979
- f.status === 200 && f.data.status === 0 && s.push(f.data.result);
994
+ y.status === 200 && y.data.status === 0 && i.push(y.data.result);
980
995
  }
981
996
  }
982
997
  const c = this.junctionLayer.graphics.filter((a) => {
983
- const o = a.geometry;
984
- return L.contains(t, o);
985
- }), n = [];
998
+ const n = a.geometry;
999
+ return S.contains(t, n);
1000
+ }), r = [];
986
1001
  for (const a of c) {
987
- const o = a.getAttribute("id");
1002
+ const n = a.getAttribute("id");
988
1003
  this.selectSumo({
989
1004
  type: "junction",
990
- id: o
1005
+ id: n
991
1006
  });
992
1007
  const l = `http://${this.openDriveServer}/api/sumo/getSumoJunction`, d = await b.get(l, {
993
1008
  params: {
994
- id: o,
1009
+ id: n,
995
1010
  projectName: this.projectName
996
1011
  }
997
1012
  });
998
- d.status === 200 && d.data.status === 0 && n.push(d.data.result);
1013
+ d.status === 200 && d.data.status === 0 && r.push(d.data.result);
999
1014
  }
1000
1015
  return {
1001
1016
  status: 0,
1002
1017
  message: "ok",
1003
1018
  result: {
1004
- junctions: n,
1005
- edges: s
1019
+ junctions: r,
1020
+ edges: i
1006
1021
  }
1007
1022
  };
1008
1023
  }
1009
1024
  async splitLane(e) {
1010
- const i = e.id.split("_");
1011
- if (i.length !== 2)
1025
+ const s = e.id.split("_");
1026
+ if (s.length !== 2)
1012
1027
  return { status: -1, message: "车道编号格式错误" };
1013
- const r = Number(i[1]), s = i[0].split("#"), c = s.length === 2 ? Number(s[1]) : 0;
1014
- let n = s[0];
1015
- n.startsWith("-") && (n = n.slice(1));
1016
- const a = this.allLaneGraphics.filter((w) => w.getAttribute("roadId") === n && w.getAttribute("sectionIndex") === c);
1028
+ const o = Number(s[1]), i = s[0].split("#"), c = i.length === 2 ? Number(i[1]) : 0;
1029
+ let r = i[0];
1030
+ r.startsWith("-") && (r = r.slice(1));
1031
+ const a = this.allLaneGraphics.filter((I) => I.getAttribute("roadId") === r && I.getAttribute("sectionIndex") === c);
1017
1032
  if (a.length === 0)
1018
1033
  return { status: -1, message: "未找到路段" };
1019
- const o = a.length - r, l = a.find(
1020
- (w) => Math.abs(w.getAttribute("laneId")) === o
1034
+ const n = a.length - o, l = a.find(
1035
+ (I) => Math.abs(I.getAttribute("laneId")) === n
1021
1036
  );
1022
1037
  if (!l)
1023
1038
  return { status: -1, message: "未找到车道" };
1024
- const d = e.start || 0, u = e.end || 100, f = D.lineString(l.getAttribute("leftLine")), y = G(f, d, u, {
1039
+ const d = e.start || 0, u = e.end || 100, y = D.lineString(l.getAttribute("leftLine")), m = x(y, d, u, {
1025
1040
  units: "meters"
1026
- }), p = D.lineString(l.getAttribute("rightLine")), h = G(p, d, u, {
1041
+ }), h = D.lineString(l.getAttribute("rightLine")), p = x(h, d, u, {
1027
1042
  units: "meters"
1028
- }), m = y.geometry.coordinates.concat(
1029
- h.geometry.coordinates.reverse()
1043
+ }), f = m.geometry.coordinates.concat(
1044
+ p.geometry.coordinates.reverse()
1030
1045
  );
1031
- m.push(m[m.length - 1]);
1046
+ f.push(f[f.length - 1]);
1032
1047
  const v = new g({
1033
- geometry: new N({
1034
- rings: [m]
1048
+ geometry: new L({
1049
+ rings: [f]
1035
1050
  }),
1036
1051
  attributes: {
1037
1052
  ObjectID: l.getAttribute("ObjectID"),
@@ -1045,8 +1060,8 @@ class M {
1045
1060
  laneId: l.getAttribute("laneId"),
1046
1061
  type: l.getAttribute("type"),
1047
1062
  sumoId: l.getAttribute("sumoId"),
1048
- leftLine: y.geometry.coordinates,
1049
- rightLine: h.geometry.coordinates
1063
+ leftLine: m.geometry.coordinates,
1064
+ rightLine: p.geometry.coordinates
1050
1065
  },
1051
1066
  symbol: {
1052
1067
  type: "simple-fill",
@@ -1061,6 +1076,19 @@ class M {
1061
1076
  clearSplitLane() {
1062
1077
  this.splitLaneLayer.removeAll();
1063
1078
  }
1079
+ /**
1080
+ * 更新所有路口的symbol
1081
+ * @param symbolStyle
1082
+ */
1083
+ updateAllJunctionSymbol(e) {
1084
+ const t = this.junctionLayer.graphics.clone();
1085
+ this.junctionLayer.removeAll(), t.forEach((s) => {
1086
+ s.getAttribute("selected") || (s.symbol = this.getCrossGraphicSymbol(
1087
+ s.attributes,
1088
+ e
1089
+ ));
1090
+ }), this.junctionLayer.addMany(t.toArray());
1091
+ }
1064
1092
  /**
1065
1093
  * 生成路口点符号。在不同比例尺下,使用不同的符号
1066
1094
  * @param attributes
@@ -1068,17 +1096,17 @@ class M {
1068
1096
  * @returns
1069
1097
  */
1070
1098
  getCrossGraphicSymbol(e, t) {
1071
- const i = e.crossId !== "" && e.crossId !== void 0 && e.crossId !== null;
1099
+ const s = e.crossId !== "" && e.crossId !== void 0 && e.crossId !== null;
1072
1100
  if (t === "marker")
1073
1101
  return {
1074
1102
  type: "picture-marker",
1075
- url: `/GisViewerAssets/Images/xhj_${i ? 1 : 2}.png`,
1103
+ url: `/GisViewerAssets/Images/xhj_${s ? 1 : 2}.png`,
1076
1104
  width: "18px",
1077
1105
  height: "28px",
1078
1106
  yOffset: "12px"
1079
1107
  };
1080
1108
  if (t === "picture")
1081
- return i ? {
1109
+ return s ? {
1082
1110
  type: "cim",
1083
1111
  data: {
1084
1112
  type: "CIMSymbolReference",
@@ -1116,7 +1144,7 @@ class M {
1116
1144
  height: 12,
1117
1145
  horizontalAlignment: "Center",
1118
1146
  offsetX: 0,
1119
- offsetY: i ? 50 : 40,
1147
+ offsetY: s ? 50 : 40,
1120
1148
  haloSize: 2,
1121
1149
  haloSymbol: {
1122
1150
  type: "CIMPolygonSymbol",
@@ -1159,7 +1187,7 @@ class M {
1159
1187
  rotateClockwise: !0,
1160
1188
  textureFilter: "Picture",
1161
1189
  url: "/GisViewerAssets/Images/xhj_1.png",
1162
- offsetY: i ? 22 : 15
1190
+ offsetY: s ? 22 : 15
1163
1191
  }
1164
1192
  ]
1165
1193
  }
@@ -1174,5 +1202,5 @@ class M {
1174
1202
  }
1175
1203
  }
1176
1204
  export {
1177
- M as default
1205
+ O as default
1178
1206
  };