gisviewer-vue3-arcgis 1.0.174 → 1.0.175

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 (27) hide show
  1. package/es/src/gis-map/gis-map.vue.d.ts +12 -15
  2. package/es/src/gis-map/gis-map.vue.mjs +131 -119
  3. package/es/src/gis-map/index.d.ts +12 -15
  4. package/es/src/gis-map/style/index.css +2 -2
  5. package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +4 -12
  6. package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.mjs +67 -55
  7. package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.mjs +8 -8
  8. package/es/src/gis-map/utils/holo-flow/signal-holo-flow.mjs +1 -1
  9. package/es/src/gis-map/utils/holo-flow/trace-holo-flow.d.ts +1 -0
  10. package/es/src/gis-map/utils/holo-flow/trace-holo-flow.mjs +33 -28
  11. package/es/src/gis-map/utils/open-drive-renderer/index.mjs +20 -23
  12. package/es/src/gis-map/utils/signal-control-area-controller/index.d.ts +21 -3
  13. package/es/src/gis-map/utils/signal-control-area-controller/index.mjs +165 -88
  14. package/lib/src/gis-map/gis-map.vue.d.ts +12 -15
  15. package/lib/src/gis-map/gis-map.vue.js +1 -1
  16. package/lib/src/gis-map/index.d.ts +12 -15
  17. package/lib/src/gis-map/style/index.css +2 -2
  18. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +4 -12
  19. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.js +1 -1
  20. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.js +1 -1
  21. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.js +1 -1
  22. package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.d.ts +1 -0
  23. package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.js +2 -2
  24. package/lib/src/gis-map/utils/open-drive-renderer/index.js +1 -1
  25. package/lib/src/gis-map/utils/signal-control-area-controller/index.d.ts +21 -3
  26. package/lib/src/gis-map/utils/signal-control-area-controller/index.js +1 -1
  27. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import * as w from "@arcgis/core/core/reactiveUtils";
1
+ import * as d from "@arcgis/core/core/reactiveUtils";
2
2
  import { Point as f } from "@arcgis/core/geometry";
3
- import * as d from "@arcgis/core/geometry/support/webMercatorUtils.js";
3
+ import * as w from "@arcgis/core/geometry/support/webMercatorUtils.js";
4
4
  import P from "@arcgis/core/layers/GraphicsLayer";
5
5
  import m from "./signal-holo-flow.mjs";
6
6
  class M extends m {
@@ -36,7 +36,7 @@ class M extends m {
36
36
  return n < 1e3 ? s = 1 : n < 2e3 ? s = 0.8 : n < 4e3 ? s = 0.4 : s = 0, s;
37
37
  }
38
38
  async handleSignalData(n) {
39
- this.watchHandle || (this.watchHandle = w.watch(
39
+ this.watchHandle || (this.watchHandle = d.watch(
40
40
  () => this.view.extent,
41
41
  () => {
42
42
  const t = this.getPanelScale();
@@ -47,7 +47,7 @@ class M extends m {
47
47
  x: e[0],
48
48
  y: e[1]
49
49
  });
50
- this.view.spatialReference.isWebMercator && (a = d.geographicToWebMercator(
50
+ this.view.spatialReference.isWebMercator && (a = w.geographicToWebMercator(
51
51
  a
52
52
  ));
53
53
  const i = this.view.toScreen(a);
@@ -94,11 +94,11 @@ class M extends m {
94
94
  x: e.panelPoint[0],
95
95
  y: e.panelPoint[1]
96
96
  });
97
- this.view.spatialReference.isWebMercator && (i = d.geographicToWebMercator(
97
+ this.view.spatialReference.isWebMercator && (i = w.geographicToWebMercator(
98
98
  i
99
99
  ));
100
100
  const r = this.view.toScreen(i), h = this.getPanelRotation(e.coord);
101
- this.countdownPanelProps.push({
101
+ console.log(o, h), this.countdownPanelProps.push({
102
102
  displayMode: "complex",
103
103
  crossId: s,
104
104
  roadId: o,
@@ -132,7 +132,7 @@ class M extends m {
132
132
  x: s[0],
133
133
  y: s[1]
134
134
  });
135
- this.view.spatialReference.isWebMercator && (c = d.geographicToWebMercator(
135
+ this.view.spatialReference.isWebMercator && (c = w.geographicToWebMercator(
136
136
  c
137
137
  ));
138
138
  const p = this.view.toScreen(c), l = n[n.length - 1];
@@ -140,7 +140,7 @@ class M extends m {
140
140
  x: l[0],
141
141
  y: l[1]
142
142
  });
143
- this.view.spatialReference.isWebMercator && (t = d.geographicToWebMercator(
143
+ this.view.spatialReference.isWebMercator && (t = w.geographicToWebMercator(
144
144
  t
145
145
  ));
146
146
  const o = this.view.toScreen(t), e = o.x - p.x, a = o.y - p.y;
@@ -186,7 +186,7 @@ class v {
186
186
  drawCountdownText(e, t) {
187
187
  const a = e.getContext("2d");
188
188
  a.clearRect(0, 0, e.width, e.height), a.font = "24px Digital", a.textBaseline = "middle", a.textAlign = "center", a.fillStyle = t.stageRemainingTime <= t.stageAllRedTime ? "red" : t.stageRemainingTime <= t.stageAllRedTime + t.stageYellowTime ? "yellow" : "lime", a.fillText(
189
- `${t.stageRemainingTime.toFixed(0)}`,
189
+ t.stageRemainingTime.toFixed(0),
190
190
  e.width / 2,
191
191
  e.height / 2
192
192
  );
@@ -4,6 +4,7 @@ export default class TraceHoloFlow {
4
4
  constructor(view: __esri.View);
5
5
  init(): Promise<void>;
6
6
  downloadLog(): void;
7
+ private nullDataCount;
7
8
  /**
8
9
  * 处理全息流轨迹数据
9
10
  * */
@@ -1,46 +1,51 @@
1
1
  import * as f from "@arcgis/core/views/3d/externalRenderers";
2
- import R from "./trace-renderer-external.mjs";
3
- import T from "./trace-renderer-layer.mjs";
2
+ import T from "./trace-renderer-external.mjs";
3
+ import R from "./trace-renderer-layer.mjs";
4
4
  class L {
5
5
  constructor(e) {
6
- e.type === "3d" ? (this.traceRenderer = new R(e), f.add(
6
+ this.nullDataCount = 0, e.type === "3d" ? (this.traceRenderer = new T(e), f.add(
7
7
  e,
8
8
  this.traceRenderer
9
- )) : this.traceRenderer = new T(e);
9
+ )) : this.traceRenderer = new R(e);
10
10
  }
11
11
  async init() {
12
12
  await this.traceRenderer.init();
13
13
  }
14
14
  downloadLog() {
15
- const e = this.traceRenderer.getLog().map((i) => i.join(",")).join(`
16
- `).replace(/null/g, ""), o = new Blob([e], { type: "text/csv;charset=utf-8;" }), s = URL.createObjectURL(o), r = document.createElement("a");
17
- r.setAttribute("href", s), r.setAttribute("download", "trace-log.csv"), r.style.visibility = "hidden", document.body.appendChild(r), r.click(), document.body.removeChild(r);
15
+ const e = this.traceRenderer.getLog().map((s) => s.join(",")).join(`
16
+ `).replace(/null/g, ""), c = new Blob([e], { type: "text/csv;charset=utf-8;" }), o = URL.createObjectURL(c), r = document.createElement("a");
17
+ r.setAttribute("href", o), r.setAttribute("download", "trace-log.csv"), r.style.visibility = "hidden", document.body.appendChild(r), r.click(), document.body.removeChild(r);
18
18
  }
19
19
  /**
20
20
  * 处理全息流轨迹数据
21
21
  * */
22
22
  async handleVehicleTraceData(e) {
23
- const { newVehList: o, updateVehList: s, deleteVehList: r, jgsj: i } = e, n = e.crossId || "", l = [], a = [];
24
- if (o && o.length > 0) {
25
- for (const c of o) {
26
- c.localTimestamp || (c.localTimestamp = i || Date.now());
27
- const t = this.buildVehicleTrackData(c, n);
23
+ const { newVehList: c, updateVehList: o, deleteVehList: r, jgsj: s } = e;
24
+ if (!c && !o && !r) {
25
+ this.nullDataCount++, this.nullDataCount > 1 && (this.clearTrace(), this.nullDataCount = 0);
26
+ return;
27
+ }
28
+ const i = e.crossId || "", l = [], a = [];
29
+ if (c && c.length > 0) {
30
+ for (const n of c) {
31
+ n.localTimestamp || (n.localTimestamp = s || Date.now());
32
+ const t = this.buildVehicleTrackData(n, i);
28
33
  t && l.push(t);
29
34
  }
30
35
  await this.traceRenderer.addVehicles(l);
31
36
  }
32
- if (s && s.length > 0) {
33
- for (const c of s) {
34
- const t = this.buildVehicleTrackData(c, n);
37
+ if (o && o.length > 0) {
38
+ for (const n of o) {
39
+ const t = this.buildVehicleTrackData(n, i);
35
40
  t && a.push(t);
36
41
  }
37
42
  await this.traceRenderer.updateVehicles(a);
38
43
  }
39
44
  if (r && r.length > 0) {
40
- const c = r.map(
41
- (t) => n + "-" + (t.ptcId || t.vehno || t.vehNo)
45
+ const n = r.map(
46
+ (t) => i + "-" + (t.ptcId || t.vehno || t.vehNo)
42
47
  );
43
- this.traceRenderer.deleteVehicles(c);
48
+ this.traceRenderer.deleteVehicles(n);
44
49
  }
45
50
  }
46
51
  /**
@@ -74,19 +79,19 @@ class L {
74
79
  setInterpolate(e) {
75
80
  this.traceRenderer.setInterpolate(e);
76
81
  }
77
- buildVehicleTrackData(e, o) {
78
- const s = e.longitude, r = e.latitude, i = e.ptcId, n = Number(e.ptcType), l = e.heading, a = Number(e.vehicleType), c = Number(e.vehicleColor), t = e.plateNo || e.plateno, h = Number(e.plateColor), d = e.timestamp, p = e.localTimestamp, u = e.roadLayer ? String(e.roadLayer) : "1", g = e.step, m = e.speed;
79
- if (!(n < 0 || n > 8))
82
+ buildVehicleTrackData(e, c) {
83
+ const o = e.longitude, r = e.latitude, s = e.ptcId, i = Number(e.ptcType), l = e.heading, a = Number(e.vehicleType), n = Number(e.vehicleColor), t = e.plateNo || e.plateno, h = Number(e.plateColor), d = e.timestamp, p = e.localTimestamp, u = e.roadLayer ? String(e.roadLayer) : "1", g = e.step, m = e.speed;
84
+ if (!(i < 0 || i > 8))
80
85
  return {
81
- ptcId: i,
82
- crossId: o,
83
- vehicleId: o + "-" + i,
84
- x: s,
86
+ ptcId: s,
87
+ crossId: c,
88
+ vehicleId: c + "-" + s,
89
+ x: o,
85
90
  y: r,
86
- ptcType: n,
91
+ ptcType: i,
87
92
  vehicleType: a,
88
- heading: n === 2 ? -l : l,
89
- vehicleColor: c,
93
+ heading: i === 2 ? -l : l,
94
+ vehicleColor: n,
90
95
  showName: t && t !== "" && t !== "0" && t !== "000000" ? t : "",
91
96
  plateNo: t,
92
97
  plateColor: h,
@@ -1,9 +1,9 @@
1
1
  import g from "@arcgis/core/Graphic";
2
- import * as C from "@arcgis/core/core/promiseUtils";
2
+ import * as k from "@arcgis/core/core/promiseUtils";
3
3
  import * as $ from "@arcgis/core/core/reactiveUtils.js";
4
4
  import { Polygon as L, Point as F } from "@arcgis/core/geometry";
5
5
  import * as S from "@arcgis/core/geometry/geometryEngine";
6
- import k from "@arcgis/core/layers/FeatureLayer";
6
+ import C from "@arcgis/core/layers/FeatureLayer";
7
7
  import w from "@arcgis/core/layers/GraphicsLayer";
8
8
  import * as D from "@turf/helpers";
9
9
  import { lineSliceAlong as x } from "@turf/line-slice-along";
@@ -14,9 +14,9 @@ import G from "pako";
14
14
  import { watch as E } from "vue";
15
15
  import R from "../../stores/index.mjs";
16
16
  import T from "../common-utils.mjs";
17
- class O {
17
+ class M {
18
18
  constructor(e) {
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({
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 C({
20
20
  id: "OpenDriveLane",
21
21
  fields: [
22
22
  {
@@ -239,7 +239,7 @@ class O {
239
239
  }
240
240
  ]
241
241
  }
242
- }), this.roadNameLayer = new k({
242
+ }), this.roadNameLayer = new C({
243
243
  id: "OpenDriveRoadName",
244
244
  fields: [
245
245
  {
@@ -302,7 +302,7 @@ class O {
302
302
  ]);
303
303
  }
304
304
  static getInstance(e) {
305
- return this.instance || (this.instance = new O(e)), this.instance;
305
+ return this.instance || (this.instance = new M(e)), this.instance;
306
306
  }
307
307
  async makeMd5FromFile(e) {
308
308
  var t;
@@ -456,8 +456,8 @@ class O {
456
456
  const v = Number(y.id);
457
457
  if (v === 0)
458
458
  continue;
459
- const I = y.type, M = [...y.outerPath], A = y.innerPath.concat(
460
- M.reverse()
459
+ const I = y.type, O = [...y.outerPath], A = y.innerPath.concat(
460
+ O.reverse()
461
461
  );
462
462
  if (A.length <= 3) {
463
463
  console.warn(`lane ${v} has less than 3 points`);
@@ -548,7 +548,7 @@ class O {
548
548
  * 监听鼠标移动事件,高亮显示鼠标所在路段和路口
549
549
  */
550
550
  monitorMouseMove() {
551
- const e = C.debounce(async (t) => {
551
+ const e = k.debounce(async (t) => {
552
552
  var c;
553
553
  const o = (c = (await this.view.hitTest(t, {
554
554
  include: [this.laneLayer, this.junctionLayer]
@@ -632,7 +632,7 @@ class O {
632
632
  * 监听鼠标点击事件,获取高亮要素的拓扑信息
633
633
  */
634
634
  monitorMouseClick() {
635
- const e = C.debounce(async (t) => {
635
+ const e = k.debounce(async (t) => {
636
636
  var a;
637
637
  const o = (a = (await this.view.hitTest(t, {
638
638
  include: [this.highlightLayer, this.junctionLayer, this.sectionLayer]
@@ -1100,10 +1100,9 @@ class O {
1100
1100
  if (t === "marker")
1101
1101
  return {
1102
1102
  type: "picture-marker",
1103
- url: `/GisViewerAssets/Images/xhj_${s ? 1 : 2}.png`,
1104
- width: "18px",
1105
- height: "28px",
1106
- yOffset: "12px"
1103
+ url: `/GisViewerAssets/Images/cross/${s ? "gis_xhj_blue" : "gis_lkcz_xz"}.png`,
1104
+ width: "32px",
1105
+ height: "32px"
1107
1106
  };
1108
1107
  if (t === "picture")
1109
1108
  return s ? {
@@ -1144,7 +1143,7 @@ class O {
1144
1143
  height: 12,
1145
1144
  horizontalAlignment: "Center",
1146
1145
  offsetX: 0,
1147
- offsetY: s ? 50 : 40,
1146
+ offsetY: s ? 25 : 15,
1148
1147
  haloSize: 2,
1149
1148
  haloSymbol: {
1150
1149
  type: "CIMPolygonSymbol",
@@ -1183,24 +1182,22 @@ class O {
1183
1182
  y: 0
1184
1183
  },
1185
1184
  anchorPointUnits: "Relative",
1186
- size: 45,
1185
+ size: 32,
1187
1186
  rotateClockwise: !0,
1188
1187
  textureFilter: "Picture",
1189
- url: "/GisViewerAssets/Images/xhj_1.png",
1190
- offsetY: s ? 22 : 15
1188
+ url: "/GisViewerAssets/Images/cross/gis_xhj_blue.png"
1191
1189
  }
1192
1190
  ]
1193
1191
  }
1194
1192
  }
1195
1193
  } : {
1196
1194
  type: "picture-marker",
1197
- url: "/GisViewerAssets/Images/xhj_2.png",
1198
- width: "27px",
1199
- height: "42px",
1200
- yOffset: "22px"
1195
+ url: "/GisViewerAssets/Images/cross/gis_lkcz_xz.png",
1196
+ width: "32px",
1197
+ height: "32px"
1201
1198
  };
1202
1199
  }
1203
1200
  }
1204
1201
  export {
1205
- O as default
1202
+ M as default
1206
1203
  };
@@ -5,8 +5,10 @@ export default class SignalControlAreaController {
5
5
  private subDistrictControllerLayer;
6
6
  private crossLayer;
7
7
  private highlightLayer;
8
- private watchHandle?;
8
+ private scaleWatcher?;
9
+ private clickWatcher?;
9
10
  private readonly crossScale;
11
+ private openDriveServer;
10
12
  constructor(view: __esri.MapView | __esri.SceneView);
11
13
  showSignalControlArea(params: any): IResult;
12
14
  clearSignalControlArea(): IResult;
@@ -18,7 +20,18 @@ export default class SignalControlAreaController {
18
20
  }): Promise<IResult>;
19
21
  resetHighlight(): IResult;
20
22
  showSubSignalControlArea(params: any): IResult;
21
- editSubSignalArea(): IResult;
23
+ /**
24
+ * 点击路口时
25
+ * @param event
26
+ * @returns
27
+ */
28
+ private handleViewClick;
29
+ private showNearbyCrosses;
30
+ /**
31
+ * 编辑子区的路口
32
+ * @returns
33
+ */
34
+ editSubSignalArea(): Promise<IResult>;
22
35
  /**
23
36
  * 在区控\子区\路口图层中查找对应的graphic
24
37
  * @param id
@@ -32,7 +45,12 @@ export default class SignalControlAreaController {
32
45
  * @returns
33
46
  */
34
47
  private drawArea;
35
- private getCrossGraphicInSubDistrict;
48
+ /**
49
+ * 显示子区时路口的样式
50
+ * @param attributes
51
+ * @returns
52
+ */
53
+ private getCrossSymbolInSubDistrict;
36
54
  /**
37
55
  * 生成路口点符号。在不同比例尺下,使用不同的符号
38
56
  * @param attributes