gisviewer-vue3-arcgis 1.0.230 → 1.0.232

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.
@@ -25,5 +25,6 @@ export default class DistrictController {
25
25
  */
26
26
  getAllSignalCoordinates(): number[][];
27
27
  private getDarkNonGrayColor;
28
+ private cyrb53;
28
29
  }
29
30
  export {};
@@ -1,12 +1,12 @@
1
- import d from "../common-utils.mjs";
2
- class r {
3
- constructor(s, n) {
4
- this.parentName = "", this.signals = [], this.subDistricts = [], this.areaColor = this.getDarkNonGrayColor(), this.signalCount = 0, this.subDistrictCount = 0, this.id = s.name, this.name = s.areaDesc, this.parentId = s.parentId, n === "alarm" && (this.areaColor = [255, 0, 0]);
1
+ import u from "../common-utils.mjs";
2
+ class h {
3
+ constructor(s, a) {
4
+ this.parentName = "", this.signals = [], this.subDistricts = [], this.areaColor = this.getDarkNonGrayColor(), this.signalCount = 0, this.subDistrictCount = 0, this.id = s.name, this.name = s.areaDesc, this.parentId = s.parentId, a === "alarm" && (this.areaColor = [255, 0, 0]);
5
5
  for (const t of s.children)
6
6
  if (t.children) {
7
- const i = new r(t, n);
8
- i.id = t.id, i.name = `SS ${t.name}`, i.parentId = this.id, i.parentName = this.name, this.subDistricts.push(i), this.subDistrictCount++, this.signalCount += i.signalCount;
9
- } else if (d.isCoordinateValid(t)) {
7
+ const i = new h(t, a);
8
+ i.id = t.id, i.name = `SS ${t.name}`, i.parentId = this.id, i.parentName = this.name, i.areaColor = this.getDarkNonGrayColor(t.id), this.subDistricts.push(i), this.subDistrictCount++, this.signalCount += i.signalCount;
9
+ } else if (u.isCoordinateValid(t)) {
10
10
  const i = {
11
11
  id: t.id,
12
12
  name: t.name,
@@ -26,20 +26,32 @@ class r {
26
26
  */
27
27
  getAllSignalCoordinates() {
28
28
  const s = [];
29
- for (const n of this.signals)
30
- s.push([n.longitude, n.latitude]);
31
- for (const n of this.subDistricts)
32
- s.push(...n.getAllSignalCoordinates());
29
+ for (const a of this.signals)
30
+ s.push([a.longitude, a.latitude]);
31
+ for (const a of this.subDistricts)
32
+ s.push(...a.getAllSignalCoordinates());
33
33
  return s;
34
34
  }
35
- getDarkNonGrayColor() {
36
- const s = Math.floor(Math.random() * 360), n = 80 + Math.random() * 20, t = 15 + Math.random() * 15, i = n / 100 * Math.min(t / 100, 1 - t / 100), o = (e) => {
37
- const a = (e + s / 30) % 12, l = t / 100 - i * Math.max(Math.min(a - 3, 9 - a, 1), -1);
35
+ getDarkNonGrayColor(s) {
36
+ let a, t, i;
37
+ if (s) {
38
+ const r = this.cyrb53(s);
39
+ a = Math.abs(r) % 360, t = 80 + Math.abs(r >> 3) % 21, i = 10 + Math.abs(r >> 7) % 41;
40
+ } else
41
+ a = Math.floor(Math.random() * 360), t = 80 + Math.random() * 20, i = 15 + Math.random() * 35;
42
+ const o = t / 100 * Math.min(i / 100, 1 - i / 100), n = (r) => {
43
+ const e = (r + a / 30) % 12, l = i / 100 - o * Math.max(Math.min(e - 3, 9 - e, 1), -1);
38
44
  return Math.round(255 * l);
39
45
  };
40
- return [o(0), o(8), o(4)];
46
+ return [n(0), n(8), n(4)];
47
+ }
48
+ cyrb53(s, a = 0) {
49
+ let t = 3735928559 ^ a, i = 1103547991 ^ a;
50
+ for (let o = 0, n; o < s.length; o++)
51
+ n = s.charCodeAt(o), t = Math.imul(t ^ n, 2654435761), i = Math.imul(i ^ n, 1597334677);
52
+ return t = Math.imul(t ^ t >>> 16, 2246822507), t ^= Math.imul(i ^ i >>> 13, 3266489909), i = Math.imul(i ^ i >>> 16, 2246822507), i ^= Math.imul(t ^ t >>> 13, 3266489909), 4294967296 * (2097151 & i) + (t >>> 0);
41
53
  }
42
54
  }
43
55
  export {
44
- r as default
56
+ h as default
45
57
  };
@@ -5,10 +5,11 @@ declare const districtSolidLineLayerOptions: any;
5
5
  /** 子区图层 */
6
6
  declare const subDistrictLayerOptions: any;
7
7
  declare const subDistrictPointLayerOptions: any;
8
+ declare const subDistrictLineLayerOptions: any;
8
9
  /** 信号机圆点图层 */
9
10
  declare const signalMarkerLayerOptions: any;
10
11
  /** 信号机图标图层 */
11
12
  declare const signalPictureLayerOptions: any;
12
13
  /** 信号机聚合图层 */
13
14
  declare const signalClusterLayerOptions: any;
14
- export { districtDashLineLayerOptions, districtSolidLineLayerOptions, signalClusterLayerOptions, signalMarkerLayerOptions, signalPictureLayerOptions, subDistrictLayerOptions, subDistrictPointLayerOptions };
15
+ export { districtDashLineLayerOptions, districtSolidLineLayerOptions, signalClusterLayerOptions, signalMarkerLayerOptions, signalPictureLayerOptions, subDistrictLayerOptions, subDistrictLineLayerOptions, subDistrictPointLayerOptions };
@@ -131,7 +131,7 @@ const e = {
131
131
  ]
132
132
  }
133
133
  }, i = {
134
- id: "subDistrictController",
134
+ id: "subDistrictPointController",
135
135
  source: [],
136
136
  objectIdField: "ObjectID",
137
137
  outFields: ["*"],
@@ -205,6 +205,42 @@ const e = {
205
205
  ]
206
206
  }
207
207
  }, r = {
208
+ id: "subDistrictLineController",
209
+ source: [],
210
+ objectIdField: "ObjectID",
211
+ outFields: ["*"],
212
+ geometryType: "polyline",
213
+ fields: [
214
+ {
215
+ name: "ObjectID",
216
+ type: "oid"
217
+ },
218
+ {
219
+ name: "id",
220
+ type: "string"
221
+ },
222
+ {
223
+ name: "districtId",
224
+ type: "string"
225
+ },
226
+ {
227
+ name: "subDistrictId",
228
+ type: "string"
229
+ },
230
+ {
231
+ name: "fromNode",
232
+ type: "string"
233
+ },
234
+ {
235
+ name: "toNode",
236
+ type: "string"
237
+ },
238
+ {
239
+ name: "color",
240
+ type: "string"
241
+ }
242
+ ]
243
+ }, l = {
208
244
  id: "signalLayer",
209
245
  source: [],
210
246
  objectIdField: "ObjectID",
@@ -380,7 +416,7 @@ const e = {
380
416
  }
381
417
  ]
382
418
  }
383
- }, l = {
419
+ }, s = {
384
420
  id: "signalLayer",
385
421
  source: [],
386
422
  objectIdField: "ObjectID",
@@ -692,7 +728,7 @@ const e = {
692
728
  }
693
729
  ]
694
730
  }
695
- }, s = {
731
+ }, a = {
696
732
  id: "signalLayer",
697
733
  source: [],
698
734
  objectIdField: "ObjectID",
@@ -910,8 +946,9 @@ const e = {
910
946
  export {
911
947
  e as districtDashLineLayerOptions,
912
948
  t as districtSolidLineLayerOptions,
913
- s as signalClusterLayerOptions,
914
- r as signalMarkerLayerOptions,
915
- l as signalPictureLayerOptions,
949
+ a as signalClusterLayerOptions,
950
+ l as signalMarkerLayerOptions,
951
+ s as signalPictureLayerOptions,
952
+ r as subDistrictLineLayerOptions,
916
953
  i as subDistrictPointLayerOptions
917
954
  };
@@ -8,19 +8,9 @@ export default class SignalControlAreaController1 {
8
8
  private districtRenderer;
9
9
  private subDistrictRenderer;
10
10
  private signalRenderer;
11
- private clickHandler;
12
- private districtControllerOid;
13
- private subDistrictControllerOid;
14
- private signalOid;
15
- private popupEnabled;
16
11
  private mapConfig;
12
+ private roadLines;
17
13
  constructor(view: __esri.MapView | __esri.SceneView);
18
- /** 暂存等待绘制的区控graphic */
19
- private districtGraphics;
20
- /** 暂存等待绘制的子区graphic */
21
- private subDistrictGraphics;
22
- /** 暂存等待绘制的信号机graphic */
23
- private signalGraphics;
24
14
  /**
25
15
  * 显示所有区控、子区、信号机
26
16
  * @param params
@@ -62,15 +52,10 @@ export default class SignalControlAreaController1 {
62
52
  message: string;
63
53
  }>;
64
54
  /**
65
- * 生成区控、子区和信号机graphic
66
- * @param districtController
67
- * @param isDistrict 是否是区控
55
+ * 获取道路线
68
56
  * @returns
69
57
  */
70
- private generateGraphic;
71
- /**
72
- * 重置所有graphic的置灰状态
73
- */
58
+ private loadRoadLine;
74
59
  /**
75
60
  * 加载支队图层
76
61
  * 现场环境用url创建FeatureLayer有各种问题,