gisviewer-vue3-arcgis 1.0.269 → 1.0.272

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.
@@ -193,6 +193,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
193
193
  status: number;
194
194
  message: string;
195
195
  };
196
+ changeSignalCrossShowName: (nameType: string) => void | {
197
+ status: number;
198
+ message: string;
199
+ };
196
200
  addGreenWaveBand: (params: IEditSignalControlAreaParams) => void;
197
201
  stopAddGreenWaveBand: () => {
198
202
  status: number;
@@ -1,23 +1,23 @@
1
- import { defineComponent as St, ref as x, reactive as Ct, onMounted as yt, getCurrentInstance as ht, onUnmounted as vt, computed as bt, openBlock as I, createElementBlock as G, createElementVNode as w, withDirectives as Ot, vShow as At, Fragment as kt, renderList as Dt, createBlock as Lt } from "vue";
2
- import H, { registerStore as Tt } from "./stores/index.mjs";
1
+ import { defineComponent as Ct, ref as x, reactive as yt, onMounted as ht, getCurrentInstance as vt, onUnmounted as bt, computed as Ot, openBlock as I, createElementBlock as G, createElementVNode as w, withDirectives as At, vShow as kt, Fragment as Dt, renderList as Lt, createBlock as Tt } from "vue";
2
+ import H, { registerStore as It } from "./stores/index.mjs";
3
3
  import "./style/index.css";
4
- import It from "./utils/dbscan-cluster/index.mjs";
5
- import Bt from "./utils/detect-gpu.mjs";
6
- import Mt from "./utils/edpass-device-controller.mjs";
7
- import E from "./utils/green-wave-band-controller/index.mjs";
8
- import Pt from "./utils/holo-flow/index.mjs";
9
- import Vt from "./utils/holo-flow/signal-countdown-panel.vue.mjs";
10
- import zt from "./utils/map-initializer.mjs";
11
- import N from "./utils/open-drive-renderer/index.mjs";
4
+ import Bt from "./utils/dbscan-cluster/index.mjs";
5
+ import Mt from "./utils/detect-gpu.mjs";
6
+ import Pt from "./utils/edpass-device-controller.mjs";
7
+ import N from "./utils/green-wave-band-controller/index.mjs";
8
+ import Vt from "./utils/holo-flow/index.mjs";
9
+ import zt from "./utils/holo-flow/signal-countdown-panel.vue.mjs";
10
+ import _t from "./utils/map-initializer.mjs";
11
+ import E from "./utils/open-drive-renderer/index.mjs";
12
12
  import W from "./utils/overlay.mjs";
13
- import _t from "./utils/police-jurisdiction.mjs";
14
- import xt from "./utils/queue-length.mjs";
13
+ import xt from "./utils/police-jurisdiction.mjs";
14
+ import Gt from "./utils/queue-length.mjs";
15
15
  import Z from "./utils/road-config-tool/index.mjs";
16
- import Gt from "./utils/signal-control-area/edit-area.mjs";
16
+ import Ht from "./utils/signal-control-area/edit-area.mjs";
17
17
  import B from "./utils/signal-control-area/signal-area-controller.mjs";
18
- import Ht from "./utils/signal-control-area/signal-cross-controller.mjs";
18
+ import Nt from "./utils/signal-control-area/signal-cross-controller.mjs";
19
19
  import Et from "./utils/traffic-flow.mjs";
20
- const Nt = { class: "gis-viewer" }, Wt = { style: { position: "absolute", bottom: "80px", left: "10px", "z-index": "9999" } }, cn = /* @__PURE__ */ St({
20
+ const Wt = { class: "gis-viewer" }, Zt = { style: { position: "absolute", bottom: "80px", left: "10px", "z-index": "9999" } }, ln = /* @__PURE__ */ Ct({
21
21
  __name: "gis-map",
22
22
  props: {
23
23
  config: {},
@@ -26,10 +26,10 @@ const Nt = { class: "gis-viewer" }, Wt = { style: { position: "absolute", bottom
26
26
  emits: ["mapLoaded", "markerClick", "mapClick", "update:zoom"],
27
27
  setup(Q, { expose: j, emit: J }) {
28
28
  const b = x(null);
29
- let n, p, c, o, r, s, d, t, l, a, S, g, C, O, f;
29
+ let n, p, c, o, r, s, f, t, l, a, d, g, C, O, S;
30
30
  const A = x(!1);
31
- Tt();
32
- const M = H.useAppDataStore, P = Ct([]), V = (e) => Math.log2(591657527591555e-6 / e);
31
+ It();
32
+ const M = H.useAppDataStore, P = yt([]), V = (e) => Math.log2(591657527591555e-6 / e);
33
33
  let y = null, z = null;
34
34
  const k = (e) => {
35
35
  if (!Number.isFinite(e))
@@ -37,14 +37,14 @@ const Nt = { class: "gis-viewer" }, Wt = { style: { position: "absolute", bottom
37
37
  const u = Math.round(e);
38
38
  u !== z && (z = u, h("update:zoom", u));
39
39
  };
40
- Bt(), yt(async () => {
40
+ Mt(), ht(async () => {
41
41
  if (!b.value)
42
42
  return;
43
43
  document.addEventListener("keydown", (m) => {
44
44
  m.ctrlKey && m.key === "i" && (A.value = !A.value);
45
45
  });
46
- const e = ht(), { $gisviewerAssetsRoot: u } = e.appContext.config.globalProperties, i = await (await fetch(_.config)).json();
47
- i.assetsRoot = _.assetsRoot || u, M.mapConfig = i, p = new zt(), M.mapInitializer = p, n = await p.initialize({
46
+ const e = vt(), { $gisviewerAssetsRoot: u } = e.appContext.config.globalProperties, i = await (await fetch(_.config)).json();
47
+ i.assetsRoot = _.assetsRoot || u, M.mapConfig = i, p = new _t(), M.mapInitializer = p, n = await p.initialize({
48
48
  container: b.value,
49
49
  mapConfig: i,
50
50
  markerClickCallback: (m, L, T, wt) => {
@@ -56,16 +56,16 @@ const Nt = { class: "gis-viewer" }, Wt = { style: { position: "absolute", bottom
56
56
  });
57
57
  const v = n.zoom ?? (n.scale ? V(n.scale) : void 0);
58
58
  typeof v == "number" && k(v);
59
- const ft = n.zoom !== void 0 ? n.watch("zoom", (m) => {
59
+ const St = n.zoom !== void 0 ? n.watch("zoom", (m) => {
60
60
  k(m);
61
61
  }) : n.watch("scale", (m) => {
62
62
  typeof m == "number" && m > 0 && k(V(m));
63
63
  });
64
- y = () => ft.remove(), r = new Pt(n, P), await r.init(), h("mapLoaded");
65
- }), vt(() => {
64
+ y = () => St.remove(), r = new Vt(n, P), await r.init(), h("mapLoaded");
65
+ }), bt(() => {
66
66
  a == null || a.clearSignalControlArea(), t == null || t.clearOpenDrive(), r.clearHoloTrace(), r.clearHoloSignal(), o == null || o.disconnectTrafficFlow(), y == null || y(), y = null;
67
67
  });
68
- const U = bt(() => n), $ = () => {
68
+ const U = Ot(() => n), $ = () => {
69
69
  const e = H.useAppDataStore;
70
70
  e.saveTrackLog = !0;
71
71
  }, q = () => {
@@ -93,9 +93,9 @@ const Nt = { class: "gis-viewer" }, Wt = { style: { position: "absolute", bottom
93
93
  r.setInterpolate(e);
94
94
  }, fe = async (e) => {
95
95
  await r.handleSignalData(e);
96
- }, we = async (e) => {
96
+ }, Se = async (e) => {
97
97
  await r.initializeLampGroup(e);
98
- }, Se = (e) => {
98
+ }, we = (e) => {
99
99
  r.handleUniSignalData(e);
100
100
  }, Ce = () => {
101
101
  r.clearHoloSignal();
@@ -107,17 +107,17 @@ const Nt = { class: "gis-viewer" }, Wt = { style: { position: "absolute", bottom
107
107
  o == null || o.toggleTrafficObject(e), r == null || r.toggleTrafficObject(e);
108
108
  }, D = (e) => {
109
109
  r == null || r.updatePanelContent(e);
110
- }, be = async (e) => (s || (s = new W(n)), s.addOverlays(e)), Oe = async (e) => (f || (f = new It(n)), f.addClusterPoints(e)), Ae = () => {
111
- f == null || f.removeAllClusterPoints();
110
+ }, be = async (e) => (s || (s = new W(n)), s.addOverlays(e)), Oe = async (e) => (S || (S = new Bt(n)), S.addClusterPoints(e)), Ae = () => {
111
+ S == null || S.removeAllClusterPoints();
112
112
  }, ke = (e) => (s || (s = new W(n)), s.addMask(e)), De = () => {
113
113
  s == null || s.removeMask();
114
114
  }, Le = (e) => s == null ? void 0 : s.removeOverlaysByType(e), Te = (e) => s == null ? void 0 : s.removeOverlaysById(e), Ie = () => s == null ? void 0 : s.removeAllOverlays(), Be = () => {
115
115
  s == null || s.showAllOverlays();
116
116
  }, Me = (e) => {
117
- d || (d = new xt(n)), d.updateQueueLength(e);
117
+ f || (f = new Gt(n)), f.updateQueueLength(e);
118
118
  }, Pe = () => {
119
- d == null || d.removeQueueLength();
120
- }, Ve = async (e, u) => (t || (t = new N(n)), await t.showOpenDriveFromServer(e, u)), ze = async (e) => (t || (t = new N(n)), await t.clearOpenDrive(), await t.showOpenDriveFromFile(e)), _e = (e) => t ? t.setOpendriveVisibility(e) : {
119
+ f == null || f.removeQueueLength();
120
+ }, Ve = async (e, u) => (t || (t = new E(n)), await t.showOpenDriveFromServer(e, u)), ze = async (e) => (t || (t = new E(n)), await t.clearOpenDrive(), await t.showOpenDriveFromFile(e)), _e = (e) => t ? t.setOpendriveVisibility(e) : {
121
121
  status: -1,
122
122
  message: "未加载OpenDrive地图"
123
123
  }, xe = async () => await (t == null ? void 0 : t.clearOpenDrive()), Ge = async (e) => t ? await (t == null ? void 0 : t.findSumo(e)) : {
@@ -126,10 +126,10 @@ const Nt = { class: "gis-viewer" }, Wt = { style: { position: "absolute", bottom
126
126
  }, He = async (e) => t ? t.selectSumo(e) : {
127
127
  status: -1,
128
128
  message: "未加载OpenDrive地图"
129
- }, Ee = async (e) => t ? t.unselectSumo(e) : {
129
+ }, Ne = async (e) => t ? t.unselectSumo(e) : {
130
130
  status: -1,
131
131
  message: "未加载OpenDrive地图"
132
- }, Ne = async (e) => t ? t.selectComputable(e) : {
132
+ }, Ee = async (e) => t ? t.selectComputable(e) : {
133
133
  status: -1,
134
134
  message: "未加载OpenDrive地图"
135
135
  }, We = async (e) => t ? await t.geometrySearch(e) : {
@@ -150,18 +150,18 @@ const Nt = { class: "gis-viewer" }, Wt = { style: { position: "absolute", bottom
150
150
  }, Ue = (e) => t ? t == null ? void 0 : t.clearBlockLane(e) : {
151
151
  status: -1,
152
152
  message: "未加载OpenDrive地图"
153
- }, $e = async (e) => (a || (a = new B(n)), await a.showSignalControlArea(e)), qe = async (e) => (a || (a = new B(n)), await a.showDistrict(e)), Ke = async (e) => (a || (a = new B(n)), await a.showSubDistrict(e)), Fe = async () => await (a == null ? void 0 : a.clearSignalControlArea()), Xe = (e) => a == null ? void 0 : a.setLayerVisibility(e), Ye = async (e) => a ? await (a == null ? void 0 : a.locateSignalControlArea(e)) : { status: -1, message: "未加载信号控制区" }, Re = async (e) => a ? await a.highlightSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, et = () => a ? a.resetHighlight() : { status: -1, message: "未加载信号控制区" }, tt = (e) => (l || (l = new Gt(n)), l.showSubSignalControlArea(e)), nt = (e) => l ? l.editSubSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, at = () => l ? l.stopEditSubSignalControlArea() : { status: -1, message: "未加载信号控制区" }, rt = (e) => l ? l.selectSubSignalControlAreaCross(e) : { status: -1, message: "未加载信号控制区" }, st = (e) => l ? l.unselectSubSignalControlAreaCross(e) : { status: -1, message: "未加载信号控制区" }, ot = (e) => {
153
+ }, $e = async (e) => (a || (a = new B(n)), await a.showSignalControlArea(e)), qe = async (e) => (a || (a = new B(n)), await a.showDistrict(e)), Ke = async (e) => (a || (a = new B(n)), await a.showSubDistrict(e)), Fe = async () => await (a == null ? void 0 : a.clearSignalControlArea()), Xe = (e) => a == null ? void 0 : a.setLayerVisibility(e), Ye = async (e) => a ? await (a == null ? void 0 : a.locateSignalControlArea(e)) : { status: -1, message: "未加载信号控制区" }, Re = async (e) => a ? await a.highlightSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, et = () => a ? a.resetHighlight() : { status: -1, message: "未加载信号控制区" }, tt = (e) => (l || (l = new Ht(n)), l.showSubSignalControlArea(e)), nt = (e) => l ? l.editSubSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, at = () => l ? l.stopEditSubSignalControlArea() : { status: -1, message: "未加载信号控制区" }, rt = (e) => l ? l.selectSubSignalControlAreaCross(e) : { status: -1, message: "未加载信号控制区" }, st = (e) => l ? l.unselectSubSignalControlAreaCross(e) : { status: -1, message: "未加载信号控制区" }, ot = (e) => {
154
154
  if (!l)
155
155
  return { status: -1, message: "未加载信号控制区" };
156
- }, it = (e) => (S || (S = new Ht(n)), S.showSignalCross(e)), ct = () => S ? S.clearSignalCross() : { status: -1, message: "未加载信号路口" }, lt = (e) => (g || (g = new E(n)), g.addGreenWaveBand(e)), ut = () => {
156
+ }, it = (e) => (d || (d = new Nt(n)), d.showSignalCross(e)), ct = () => d ? d.clearSignalCross() : { status: -1, message: "未加载信号路口" }, lt = (e) => d ? d.changeShowName(e) : { status: -1, message: "未加载信号路口" }, ut = (e) => (g || (g = new N(n)), g.addGreenWaveBand(e)), mt = () => {
157
157
  if (!g)
158
158
  return { status: -1, message: "未加载绿波带" };
159
159
  g.stopAddGreenWaveBand();
160
- }, mt = async (e) => (g || (g = new E(n)), await g.showGreenWaveBand(e)), pt = async (e) => (C || (C = new _t(n)), await C.showJurisdiction(e)), gt = () => {
160
+ }, pt = async (e) => (g || (g = new N(n)), await g.showGreenWaveBand(e)), gt = async (e) => (C || (C = new xt(n)), await C.showJurisdiction(e)), dt = () => {
161
161
  if (!C)
162
162
  return { status: -1, message: "未加载警务管辖区" };
163
163
  C.clearJurisdiction();
164
- }, dt = async (e) => (O || (O = new Mt(n)), await O.setEdpassLayerVisibility(e)), _ = Q, h = J;
164
+ }, ft = async (e) => (O || (O = new Pt(n)), await O.setEdpassLayerVisibility(e)), _ = Q, h = J;
165
165
  return j({
166
166
  mapViewer: U,
167
167
  setLayerVisibility: te,
@@ -190,8 +190,8 @@ const Nt = { class: "gis-viewer" }, Wt = { style: { position: "absolute", bottom
190
190
  disconnectCarFlow: me,
191
191
  handleHoloVehicleTraceData: pe,
192
192
  clearHoloTrace: ge,
193
- initializeLampGroup: we,
194
- handleUniSignalData: Se,
193
+ initializeLampGroup: Se,
194
+ handleUniSignalData: we,
195
195
  handleHoloSignalData: fe,
196
196
  clearHoloSignal: Ce,
197
197
  setInterpolate: de,
@@ -208,8 +208,8 @@ const Nt = { class: "gis-viewer" }, Wt = { style: { position: "absolute", bottom
208
208
  geometrySearchInOpenDrive: We,
209
209
  findSumoInOpenDrive: Ge,
210
210
  selectSumoInOpenDrive: He,
211
- unselectSumoInOpenDrive: Ee,
212
- selectComputableInOpenDrive: Ne,
211
+ unselectSumoInOpenDrive: Ne,
212
+ selectComputableInOpenDrive: Ee,
213
213
  getSumoInfo: Ze,
214
214
  splitOpenDriveLane: Qe,
215
215
  clearSplitOpenDriveLane: je,
@@ -231,19 +231,20 @@ const Nt = { class: "gis-viewer" }, Wt = { style: { position: "absolute", bottom
231
231
  changeSubSignalControlAreaBorderVisibility: ot,
232
232
  showSignalCross: it,
233
233
  clearSignalCross: ct,
234
- addGreenWaveBand: lt,
235
- stopAddGreenWaveBand: ut,
236
- showGreenWaveBand: mt,
237
- showPoliceArea: pt,
238
- clearPoliceArea: gt,
239
- setEdpassLayerVisibility: dt
240
- }), (e, u) => (I(), G("div", Nt, [
234
+ changeSignalCrossShowName: lt,
235
+ addGreenWaveBand: ut,
236
+ stopAddGreenWaveBand: mt,
237
+ showGreenWaveBand: pt,
238
+ showPoliceArea: gt,
239
+ clearPoliceArea: dt,
240
+ setEdpassLayerVisibility: ft
241
+ }), (e, u) => (I(), G("div", Wt, [
241
242
  w("div", {
242
243
  class: "gis-viewer-main",
243
244
  ref_key: "mapContainer",
244
245
  ref: b
245
246
  }, [
246
- Ot(w("div", Wt, [
247
+ At(w("div", Zt, [
247
248
  w("button", {
248
249
  style: { "margin-right": "10px" },
249
250
  onClick: $
@@ -258,10 +259,10 @@ const Nt = { class: "gis-viewer" }, Wt = { style: { position: "absolute", bottom
258
259
  }, " 显示车辆id "),
259
260
  w("button", { onClick: F }, "显示车辆号牌")
260
261
  ], 512), [
261
- [At, A.value]
262
+ [kt, A.value]
262
263
  ])
263
264
  ], 512),
264
- (I(!0), G(kt, null, Dt(P, (i, v) => (I(), Lt(Vt, {
265
+ (I(!0), G(Dt, null, Lt(P, (i, v) => (I(), Tt(zt, {
265
266
  key: v,
266
267
  "display-mode": i.displayMode,
267
268
  flash: i.flash,
@@ -278,5 +279,5 @@ const Nt = { class: "gis-viewer" }, Wt = { style: { position: "absolute", bottom
278
279
  }
279
280
  });
280
281
  export {
281
- cn as default
282
+ ln as default
282
283
  };
@@ -176,6 +176,10 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
176
176
  status: number;
177
177
  message: string;
178
178
  };
179
+ changeSignalCrossShowName: (nameType: string) => void | {
180
+ status: number;
181
+ message: string;
182
+ };
179
183
  addGreenWaveBand: (params: import("../types").IEditSignalControlAreaParams) => void;
180
184
  stopAddGreenWaveBand: () => {
181
185
  status: number;
@@ -1,14 +1,14 @@
1
- import { Point as L, Polyline as l } from "@arcgis/core/geometry";
1
+ import { Point as d, Polyline as l } from "@arcgis/core/geometry";
2
2
  import * as u from "@arcgis/core/geometry/geometryEngineAsync";
3
3
  import * as y from "@arcgis/core/geometry/support/webMercatorUtils";
4
4
  import h from "@turf/bearing";
5
5
  import p from "@turf/destination";
6
6
  import * as f from "@turf/helpers";
7
- import d from "@turf/length";
7
+ import L from "@turf/length";
8
8
  import O from "@turf/line-slice-along";
9
9
  import w from "pako";
10
10
  import P from "proj4";
11
- class s {
11
+ class o {
12
12
  /**
13
13
  * 得到某个点在一定方向、距离之外的另一个点
14
14
  * @param point
@@ -20,7 +20,7 @@ class s {
20
20
  const r = f.point([t.x, t.y]), i = p(r, n, e, {
21
21
  units: "meters"
22
22
  });
23
- return new L({
23
+ return new d({
24
24
  x: i.geometry.coordinates[0],
25
25
  y: i.geometry.coordinates[1]
26
26
  });
@@ -42,12 +42,12 @@ class s {
42
42
  static extendLineInTowDir(t, e) {
43
43
  const n = t.paths[0], r = f.point(n[0]), i = f.point(n[1]), a = h(i, r), c = p(r, e, a, {
44
44
  units: "meters"
45
- }), g = a > 0 ? a - 180 : a + 180, o = p(i, e, g, {
45
+ }), g = a > 0 ? a - 180 : a + 180, s = p(i, e, g, {
46
46
  units: "meters"
47
47
  });
48
48
  return new l({
49
49
  paths: [
50
- [c.geometry.coordinates, o.geometry.coordinates]
50
+ [c.geometry.coordinates, s.geometry.coordinates]
51
51
  ]
52
52
  });
53
53
  }
@@ -73,19 +73,19 @@ class s {
73
73
  * @returns
74
74
  */
75
75
  static async getIntersectPointsOfStopLineAndLane(t, e, n) {
76
- let r = await s.getIntersectPointOfLineAndPolygon(
76
+ let r = await o.getIntersectPointOfLineAndPolygon(
77
77
  t,
78
78
  e
79
79
  );
80
- if (await s.pointDistance(r) < 3 && n) {
80
+ if (await o.pointDistance(r) < 3 && n) {
81
81
  for (const i of n)
82
- if (r = await s.getIntersectPointOfLineAndPolygon(
82
+ if (r = await o.getIntersectPointOfLineAndPolygon(
83
83
  t,
84
84
  e,
85
85
  i
86
- ), await s.pointDistance(r) > 2.5) {
86
+ ), await o.pointDistance(r) > 2.5) {
87
87
  const a = new l({ paths: [r] });
88
- return (await s.getOffsetLine(
88
+ return (await o.getOffsetLine(
89
89
  a,
90
90
  -i
91
91
  )).paths[0];
@@ -113,7 +113,7 @@ class s {
113
113
  * @returns 线面交线的头尾端点
114
114
  */
115
115
  static async getIntersectPointOfLineAndPolygon(t, e, n = 0) {
116
- n !== 0 && (t = await s.getOffsetLine(t, n));
116
+ n !== 0 && (t = await o.getOffsetLine(t, n));
117
117
  const r = await u.intersect(t, e);
118
118
  if (r instanceof l) {
119
119
  const i = r.paths[0], a = i[0], c = i[i.length - 1];
@@ -164,7 +164,7 @@ class s {
164
164
  }
165
165
  static getStdMapEntries(t) {
166
166
  const e = [];
167
- for (const n of s.getStdMapKeys(t))
167
+ for (const n of o.getStdMapKeys(t))
168
168
  e.push([n, t.get(n)]);
169
169
  return e;
170
170
  }
@@ -175,7 +175,7 @@ class s {
175
175
  return r.delete(), e && t.delete(), n;
176
176
  }
177
177
  static setGeoData(t, e, n) {
178
- s.geoReference = t, s.xOffset = e, s.yOffset = n;
178
+ o.geoReference = t, o.xOffset = e, o.yOffset = n;
179
179
  }
180
180
  /**
181
181
  * OpenDrive坐标转换为WGS84坐标
@@ -185,28 +185,28 @@ class s {
185
185
  static transformLineProjection(t) {
186
186
  try {
187
187
  return t.map(
188
- (e) => P(s.geoReference).inverse([
189
- e[0] - s.xOffset,
190
- e[1] - s.yOffset
188
+ (e) => P(o.geoReference).inverse([
189
+ e[0] - o.xOffset,
190
+ e[1] - o.yOffset
191
191
  ])
192
192
  );
193
193
  } catch {
194
194
  return console.error(
195
195
  "OpenDrive坐标转换为WGS84坐标失败",
196
- s.geoReference
196
+ o.geoReference
197
197
  ), t;
198
198
  }
199
199
  }
200
200
  static transformPointProjection(t) {
201
201
  try {
202
- return P(s.geoReference).inverse([
203
- t[0] - s.xOffset,
204
- t[1] - s.yOffset
202
+ return P(o.geoReference).inverse([
203
+ t[0] - o.xOffset,
204
+ t[1] - o.yOffset
205
205
  ]);
206
206
  } catch {
207
207
  return console.error(
208
208
  "OpenDrive坐标转换为WGS84坐标失败",
209
- s.geoReference
209
+ o.geoReference
210
210
  ), t;
211
211
  }
212
212
  }
@@ -226,7 +226,7 @@ class s {
226
226
  * @returns
227
227
  */
228
228
  static getCenterPointInLine(t) {
229
- const e = f.lineString(t), n = d(e, { units: "meters" }) / 2, r = O(e, 0, n, {
229
+ const e = f.lineString(t), n = L(e, { units: "meters" }) / 2, r = O(e, 0, n, {
230
230
  units: "meters"
231
231
  });
232
232
  return r.geometry.coordinates[r.geometry.coordinates.length - 1];
@@ -236,12 +236,12 @@ class s {
236
236
  const i = localStorage.getItem("gpu") !== "Unknown";
237
237
  if (!n) {
238
238
  if (e.length > 0) {
239
- const g = e.map((o) => o.geometry).filter((o) => o);
239
+ const g = e.map((s) => s.geometry).filter((s) => s);
240
240
  if (g.length > 0) {
241
- const o = (a = await u.union(g)) == null ? void 0 : a.extent;
242
- o && (i ? await t.goTo(o.center, {
241
+ let s = (a = await u.union(g)) == null ? void 0 : a.extent;
242
+ s && (s = s.expand(1.3), i ? await t.goTo(s.center, {
243
243
  duration: 1e3
244
- }) : t.center = o.center);
244
+ }) : t.center = s.center);
245
245
  }
246
246
  }
247
247
  return;
@@ -251,14 +251,14 @@ class s {
251
251
  duration: 1e3
252
252
  });
253
253
  else if (e.length > 0) {
254
- const g = e.map((o) => o.geometry).filter((o) => o);
254
+ const g = e.map((s) => s.geometry).filter((s) => s);
255
255
  if (g.length > 0) {
256
- const o = (c = await u.union(g)) == null ? void 0 : c.extent;
257
- o && (t.extent = o);
256
+ let s = (c = await u.union(g)) == null ? void 0 : c.extent;
257
+ s && (s = s.expand(1.3), t.extent = s);
258
258
  }
259
259
  }
260
260
  }
261
261
  }
262
262
  export {
263
- s as default
263
+ o as default
264
264
  };
@@ -5,11 +5,13 @@ import { IResult, IShowSignalCrossParams } from 'packages/components/src/types';
5
5
  export default class SignalCrossController {
6
6
  private view;
7
7
  private crossLayer;
8
- private readonly symbolScale;
8
+ private readonly iconSymbolScale;
9
+ private readonly largeMarkerScale;
9
10
  private oldScale;
10
11
  private scaleWatchHandle;
11
12
  private showName;
12
13
  private showStyle;
14
+ private didCrossScaleThreshold;
13
15
  private readonly clusterRadius;
14
16
  private readonly minClusterPoints;
15
17
  private readonly maxClusterSymbolSize;
@@ -27,6 +29,15 @@ export default class SignalCrossController {
27
29
  */
28
30
  showSignalCross(params: IShowSignalCrossParams): IResult;
29
31
  clearSignalCross(): void;
32
+ /**
33
+ * 更改路口显示名称内容
34
+ * @param showName
35
+ */
36
+ changeShowName(showName: string): void;
37
+ /**
38
+ * 更新散点符号
39
+ */
40
+ private updateScatterSymbol;
30
41
  /**
31
42
  * 按照像素距离聚类
32
43
  * @param locations