gisviewer-vue3-arcgis 1.0.231 → 1.0.233

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,4 +1,4 @@
1
- import { IResult } from '../../../types';
1
+ import { IResult, IRoadLine } from '../../../types';
2
2
  import DistrictController from './district-controller';
3
3
  export default class SubDistrictRenderer {
4
4
  private view;
@@ -6,8 +6,10 @@ export default class SubDistrictRenderer {
6
6
  private clickHandler;
7
7
  private subDistrictPointLayer;
8
8
  private subDistrictLineLayer;
9
+ roadLines: IRoadLine[];
9
10
  constructor(view: __esri.MapView | __esri.SceneView, hasGpu: boolean);
10
11
  showSubDistricts(controllers: DistrictController[]): Promise<void>;
12
+ showRoads(districtId: string): Promise<void>;
11
13
  clearSubDistricts(): Promise<void>;
12
14
  setVisible(visible: boolean): void;
13
15
  /**
@@ -34,6 +36,7 @@ export default class SubDistrictRenderer {
34
36
  * 重置过滤器,显示所有子区
35
37
  */
36
38
  resetFilter(): void;
37
- private currentRenderer;
39
+ private currentPointRenderer;
40
+ private currentLineRenderer;
38
41
  private viewHitTest;
39
42
  }
@@ -1,60 +1,63 @@
1
- import o from "@arcgis/core/Graphic";
2
- import u from "@arcgis/core/layers/FeatureLayer";
3
- import { subDistrictPointLayerOptions as c, subDistrictLineLayerOptions as l } from "./layer-symbol.mjs";
4
- class y {
5
- constructor(i, s) {
6
- this.view = i, this.hasGpu = s, this.subDistrictPointLayer = new u(
7
- c
8
- ), this.subDistrictPointLayer.spatialReference = i.spatialReference, this.subDistrictPointLayer.popupEnabled = !0, this.subDistrictLineLayer = new u(
9
- l
10
- ), this.subDistrictLineLayer.spatialReference = i.spatialReference, this.subDistrictLineLayer.popupEnabled = !1, this.view.map.add(this.subDistrictPointLayer);
1
+ import L from "@arcgis/core/Graphic";
2
+ import D from "@arcgis/core/layers/FeatureLayer";
3
+ import { subDistrictPointLayerOptions as m, subDistrictLineLayerOptions as w } from "./layer-symbol.mjs";
4
+ class x {
5
+ constructor(e, t) {
6
+ this.view = e, this.hasGpu = t, this.subDistrictPointLayer = new D(
7
+ m
8
+ ), this.subDistrictPointLayer.spatialReference = e.spatialReference, this.subDistrictPointLayer.popupEnabled = !0, this.subDistrictLineLayer = new D(
9
+ w
10
+ ), this.subDistrictLineLayer.spatialReference = e.spatialReference, this.subDistrictLineLayer.popupEnabled = !1, this.view.map.addMany([
11
+ this.subDistrictLineLayer,
12
+ this.subDistrictPointLayer
13
+ ]);
11
14
  }
12
- async showSubDistricts(i) {
15
+ async showSubDistricts(e) {
13
16
  await this.clearSubDistricts(), this.clickHandler = this.view.on("click", this.viewHitTest.bind(this));
14
- let s = 0;
15
- const e = [], r = [];
16
- i.forEach((t) => {
17
+ let t = 0;
18
+ const s = [], r = [];
19
+ e.forEach((i) => {
17
20
  r.push({
18
- value: t.id,
19
- label: t.name,
21
+ value: i.id,
22
+ label: i.name,
20
23
  symbol: {
21
24
  type: "simple-marker",
22
25
  style: "circle",
23
26
  color: [0, 0, 0, 0],
24
27
  size: "8px",
25
28
  outline: {
26
- color: [...t.areaColor],
29
+ color: [...i.areaColor],
27
30
  width: 4
28
31
  }
29
32
  }
30
- }), t.signals.forEach((a) => {
31
- const n = new o({
33
+ }), i.signals.forEach((a) => {
34
+ const u = new L({
32
35
  geometry: {
33
36
  type: "point",
34
37
  longitude: a.longitude,
35
38
  latitude: a.latitude
36
39
  },
37
40
  attributes: {
38
- ObjectID: s++,
41
+ ObjectID: t++,
39
42
  id: a.id,
40
43
  name: a.name,
41
- subDistrictId: t.id,
42
- subDistrictName: t.name,
43
- districtId: t.parentId,
44
- districtName: t.parentName,
45
- signalCount: t.signalCount,
46
- color: t.areaColor.join(","),
44
+ subDistrictId: i.id,
45
+ subDistrictName: i.name,
46
+ districtId: i.parentId,
47
+ districtName: i.parentName,
48
+ signalCount: i.signalCount,
49
+ color: i.areaColor.join(","),
47
50
  type: "subDistrict"
48
51
  }
49
52
  });
50
- e.push(n);
53
+ s.push(u);
51
54
  });
52
55
  }), this.subDistrictPointLayer.renderer = {
53
56
  type: "unique-value",
54
57
  field: "subDistrictId",
55
58
  defaultSymbol: {
56
59
  type: "simple-marker",
57
- color: "gray",
60
+ color: [180, 180, 180, 0.5],
58
61
  size: "8px",
59
62
  outline: {
60
63
  color: "white",
@@ -91,35 +94,137 @@ class y {
91
94
  ]
92
95
  }
93
96
  ]
94
- }, this.currentRenderer = this.subDistrictPointLayer.renderer.clone(), await this.subDistrictPointLayer.applyEdits({
95
- addFeatures: e
96
- }), await this.view.goTo(e, {
97
+ }, this.currentPointRenderer = this.subDistrictPointLayer.renderer.clone(), await this.subDistrictPointLayer.applyEdits({
98
+ addFeatures: s
99
+ }), await this.view.goTo(s, {
97
100
  duration: this.hasGpu ? 1e3 : 0
98
101
  });
99
102
  }
103
+ async showRoads(e) {
104
+ const t = this.subDistrictPointLayer.createQuery();
105
+ t.where = `districtId = '${e}'`;
106
+ const s = await this.subDistrictPointLayer.queryFeatures(
107
+ t
108
+ ), r = /* @__PURE__ */ new Map();
109
+ s.features.forEach((u) => {
110
+ var o;
111
+ const { subDistrictId: l, color: c, id: n } = u.attributes;
112
+ r.has(l) || r.set(l, { color: c, signalIds: [] }), (o = r.get(l)) == null || o.signalIds.push(n);
113
+ });
114
+ const i = [], a = [];
115
+ for (const u of r) {
116
+ let l = 0;
117
+ const c = u[0];
118
+ i.push({
119
+ value: c,
120
+ symbol: {
121
+ type: "simple-line",
122
+ color: u[1].color.split(",").map(Number),
123
+ width: 2,
124
+ style: "solid"
125
+ }
126
+ });
127
+ const n = u[1].signalIds;
128
+ if (!(n.length < 2))
129
+ for (let o = 0; o < n.length; o++)
130
+ for (let d = 0; d < n.length; d++) {
131
+ if (o === d)
132
+ continue;
133
+ const p = n[o], y = n[d];
134
+ if (a.some((h) => {
135
+ const f = h.attributes;
136
+ return f && f.fromNode === y && f.toNode === p;
137
+ }))
138
+ continue;
139
+ const b = this.roadLines.find(
140
+ (h) => h.fromNode === p && h.toNode === y
141
+ );
142
+ if (!b)
143
+ continue;
144
+ const v = new L({
145
+ geometry: {
146
+ type: "polyline",
147
+ paths: [b.coordinates]
148
+ },
149
+ attributes: {
150
+ ObjectID: l++,
151
+ id: b.id,
152
+ districtId: e,
153
+ subDistrictId: c,
154
+ fromNode: p,
155
+ toNode: y,
156
+ color: u[1].color
157
+ }
158
+ });
159
+ a.push(v);
160
+ }
161
+ }
162
+ this.subDistrictLineLayer.renderer = {
163
+ type: "unique-value",
164
+ field: "subDistrictId",
165
+ defaultSymbol: {
166
+ type: "simple-line",
167
+ color: [180, 180, 180, 0.5],
168
+ width: 2,
169
+ style: "solid"
170
+ },
171
+ defaultLabel: "其他子区",
172
+ uniqueValueInfos: i,
173
+ visualVariables: [
174
+ {
175
+ type: "size",
176
+ valueExpression: "$view.scale",
177
+ stops: [
178
+ {
179
+ size: 6,
180
+ value: 2500
181
+ },
182
+ {
183
+ size: 5,
184
+ value: 5e3
185
+ },
186
+ {
187
+ size: 4,
188
+ value: 18055.954822000003
189
+ },
190
+ {
191
+ size: 3,
192
+ value: 144447.638572
193
+ },
194
+ {
195
+ size: 2,
196
+ value: 1155581108577e-6
197
+ }
198
+ ]
199
+ }
200
+ ]
201
+ }, this.currentLineRenderer = this.subDistrictLineLayer.renderer.clone(), await this.subDistrictLineLayer.applyEdits({
202
+ addFeatures: a
203
+ });
204
+ }
100
205
  async clearSubDistricts() {
101
- var e;
102
- const i = await this.subDistrictPointLayer.queryFeatures();
103
- i.features.length > 0 && await this.subDistrictPointLayer.applyEdits({
104
- deleteFeatures: i.features
206
+ var s;
207
+ const e = await this.subDistrictPointLayer.queryFeatures();
208
+ e.features.length > 0 && await this.subDistrictPointLayer.applyEdits({
209
+ deleteFeatures: e.features
105
210
  }), this.subDistrictPointLayer.definitionExpression = "1=1";
106
- const s = await this.subDistrictLineLayer.queryFeatures();
107
- s.features.length > 0 && await this.subDistrictLineLayer.applyEdits({
108
- deleteFeatures: s.features
109
- }), this.subDistrictLineLayer.definitionExpression = "1=1", (e = this.clickHandler) == null || e.remove();
211
+ const t = await this.subDistrictLineLayer.queryFeatures();
212
+ t.features.length > 0 && await this.subDistrictLineLayer.applyEdits({
213
+ deleteFeatures: t.features
214
+ }), this.subDistrictLineLayer.definitionExpression = "1=1", (s = this.clickHandler) == null || s.remove();
110
215
  }
111
- setVisible(i) {
112
- this.subDistrictPointLayer.visible = i, this.subDistrictLineLayer.visible = i;
216
+ setVisible(e) {
217
+ this.subDistrictPointLayer.visible = e, this.subDistrictLineLayer.visible = e;
113
218
  }
114
219
  /**
115
220
  * 定位子区
116
221
  * @param id 子区ID
117
222
  */
118
- async locateSubDistrict(i) {
119
- const s = this.subDistrictPointLayer.createQuery();
120
- s.where = `subDistrictId = '${i}'`, s.returnGeometry = !0;
121
- const e = await this.subDistrictPointLayer.queryFeatures(s);
122
- return e.features.length > 0 ? (await this.view.goTo(e.features, {
223
+ async locateSubDistrict(e) {
224
+ const t = this.subDistrictPointLayer.createQuery();
225
+ t.where = `subDistrictId = '${e}'`, t.returnGeometry = !0;
226
+ const s = await this.subDistrictPointLayer.queryFeatures(t);
227
+ return s.features.length > 0 ? (await this.view.goTo(s.features, {
123
228
  duration: this.hasGpu ? 1e3 : 0
124
229
  }), { status: 0, message: "ok" }) : { status: 1, message: "未找到子区" };
125
230
  }
@@ -128,23 +233,23 @@ class y {
128
233
  * @param id 子区ID
129
234
  * @return 返回高亮子区的数量以及区控id
130
235
  */
131
- async highlightSubDistrict(i) {
132
- let s = "";
133
- const e = this.subDistrictPointLayer.definitionExpression;
134
- this.subDistrictPointLayer.definitionExpression = `subDistrictId = '${i}'`;
135
- const r = await this.subDistrictPointLayer.queryFeatures(), t = r.features.length;
136
- return t > 0 ? (this.subDistrictLineLayer.definitionExpression = `subDistrictId = '${i}'`, s = r.features[0].attributes.districtId, await this.view.goTo(r.features, {
236
+ async highlightSubDistrict(e) {
237
+ let t = "";
238
+ const s = this.subDistrictPointLayer.definitionExpression;
239
+ this.subDistrictPointLayer.definitionExpression = `subDistrictId = '${e}'`;
240
+ const r = await this.subDistrictPointLayer.queryFeatures(), i = r.features.length;
241
+ return i > 0 ? (this.subDistrictLineLayer.definitionExpression = `subDistrictId = '${e}'`, t = r.features[0].attributes.districtId, await this.view.goTo(r.features, {
137
242
  duration: this.hasGpu ? 1e3 : 0
138
- })) : this.subDistrictPointLayer.definitionExpression = e, { count: t, parentId: s };
243
+ })) : this.subDistrictPointLayer.definitionExpression = s, { count: i, parentId: t };
139
244
  }
140
245
  /**
141
246
  * 按照区控、子区id显示子区
142
247
  * @param type 类型,district 或 subDistrict
143
248
  * @param id
144
249
  */
145
- filter(i, s) {
146
- const e = `${i === "district" ? "districtId" : "subDistrictId"} = '${s}'`;
147
- this.subDistrictPointLayer.definitionExpression = e, this.subDistrictLineLayer.definitionExpression = e;
250
+ filter(e, t) {
251
+ const s = `${e === "district" ? "districtId" : "subDistrictId"} = '${t}'`;
252
+ this.subDistrictPointLayer.definitionExpression = s, this.subDistrictLineLayer.definitionExpression = s;
148
253
  }
149
254
  /**
150
255
  * 重置过滤器,显示所有子区
@@ -152,17 +257,17 @@ class y {
152
257
  resetFilter() {
153
258
  this.subDistrictPointLayer.definitionExpression = "1=1", this.subDistrictLineLayer.definitionExpression = "1=1";
154
259
  }
155
- async viewHitTest(i) {
260
+ async viewHitTest(e) {
156
261
  var r;
157
- const e = (r = (await this.view.hitTest(i, {
158
- include: [this.subDistrictPointLayer]
262
+ const s = (r = (await this.view.hitTest(e, {
263
+ include: [this.subDistrictPointLayer, this.subDistrictLineLayer]
159
264
  })).results) == null ? void 0 : r.filter(
160
- (t) => t.type === "graphic"
265
+ (i) => i.type === "graphic"
161
266
  );
162
- if (e.length === 0)
163
- this.currentRenderer && (this.subDistrictPointLayer.renderer = this.currentRenderer);
267
+ if (s.length === 0)
268
+ this.subDistrictPointLayer.renderer = this.currentPointRenderer, this.subDistrictLineLayer.renderer = this.currentLineRenderer;
164
269
  else {
165
- const t = e[0].graphic;
270
+ const i = s[0].graphic;
166
271
  this.subDistrictPointLayer.renderer = {
167
272
  type: "unique-value",
168
273
  field: "subDistrictId",
@@ -179,14 +284,14 @@ class y {
179
284
  defaultLabel: "其他子区",
180
285
  uniqueValueInfos: [
181
286
  {
182
- value: t.attributes.subDistrictId,
287
+ value: i.attributes.subDistrictId,
183
288
  symbol: {
184
289
  type: "simple-marker",
185
290
  style: "circle",
186
291
  color: [0, 0, 0, 0],
187
292
  size: "8px",
188
293
  outline: {
189
- color: t.attributes.color.split(",").map(Number),
294
+ color: i.attributes.color.split(",").map(Number),
190
295
  width: 4
191
296
  }
192
297
  }
@@ -220,10 +325,59 @@ class y {
220
325
  ]
221
326
  }
222
327
  ]
328
+ }, this.subDistrictLineLayer.renderer = {
329
+ type: "unique-value",
330
+ field: "subDistrictId",
331
+ defaultSymbol: {
332
+ type: "simple-line",
333
+ style: "solid",
334
+ color: [180, 180, 180, 0.5],
335
+ width: "8px"
336
+ },
337
+ defaultLabel: "其他子区",
338
+ uniqueValueInfos: [
339
+ {
340
+ value: i.attributes.subDistrictId,
341
+ symbol: {
342
+ type: "simple-line",
343
+ style: "solid",
344
+ color: i.attributes.color.split(",").map(Number),
345
+ width: "8px"
346
+ }
347
+ }
348
+ ],
349
+ visualVariables: [
350
+ {
351
+ type: "size",
352
+ valueExpression: "$view.scale",
353
+ stops: [
354
+ {
355
+ size: 6,
356
+ value: 2500
357
+ },
358
+ {
359
+ size: 5,
360
+ value: 5e3
361
+ },
362
+ {
363
+ size: 4,
364
+ value: 18055.954822000003
365
+ },
366
+ {
367
+ size: 3,
368
+ value: 144447.638572
369
+ },
370
+ {
371
+ size: 2,
372
+ value: 1155581108577e-6
373
+ }
374
+ ]
375
+ }
376
+ ]
223
377
  };
224
378
  }
225
379
  }
226
380
  }
227
381
  export {
228
- y as default
382
+ x as default
229
383
  };
@@ -302,3 +302,9 @@ export interface IShowGreenWaveBandParams {
302
302
  coordinates: number[][];
303
303
  nodeList: INode[];
304
304
  }
305
+ export interface IRoadLine {
306
+ id: string;
307
+ fromNode: string;
308
+ toNode: string;
309
+ coordinates: number[][];
310
+ }
@@ -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 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../common-utils.js");class e{constructor(s,n){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]);for(const t of s.children)if(t.children){const i=new e(t,n);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}else if(d.default.isCoordinateValid(t)){const i={id:t.id,name:t.name,parentId:t.parentId,latitude:Number(t.latitude),longitude:Number(t.longitude),signalId:t.signalId,nodeId:t.nodeId,isKey:t.isKey===1};this.signals.push(i),this.signalCount++}}getAllSignalCoordinates(){const s=[];for(const n of this.signals)s.push([n.longitude,n.latitude]);for(const n of this.subDistricts)s.push(...n.getAllSignalCoordinates());return s}getDarkNonGrayColor(){const s=Math.floor(Math.random()*360),n=80+Math.random()*20,t=15+Math.random()*35,i=n/100*Math.min(t/100,1-t/100),o=r=>{const a=(r+s/30)%12,l=t/100-i*Math.max(Math.min(a-3,9-a,1),-1);return Math.round(255*l)};return[o(0),o(8),o(4)]}}exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("../common-utils.js");class r{constructor(s,a){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]);for(const t of s.children)if(t.children){const i=new r(t,a);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}else if(u.default.isCoordinateValid(t)){const i={id:t.id,name:t.name,parentId:t.parentId,latitude:Number(t.latitude),longitude:Number(t.longitude),signalId:t.signalId,nodeId:t.nodeId,isKey:t.isKey===1};this.signals.push(i),this.signalCount++}}getAllSignalCoordinates(){const s=[];for(const a of this.signals)s.push([a.longitude,a.latitude]);for(const a of this.subDistricts)s.push(...a.getAllSignalCoordinates());return s}getDarkNonGrayColor(s){let a,t,i;if(s){const e=this.cyrb53(s);a=Math.abs(e)%360,t=80+Math.abs(e>>3)%21,i=10+Math.abs(e>>7)%41}else a=Math.floor(Math.random()*360),t=80+Math.random()*20,i=15+Math.random()*35;const o=t/100*Math.min(i/100,1-i/100),n=e=>{const l=(e+a/30)%12,h=i/100-o*Math.max(Math.min(l-3,9-l,1),-1);return Math.round(255*h)};return[n(0),n(8),n(4)]}cyrb53(s,a=0){let t=3735928559^a,i=1103547991^a;for(let o=0,n;o<s.length;o++)n=s.charCodeAt(o),t=Math.imul(t^n,2654435761),i=Math.imul(i^n,1597334677);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)}}exports.default=r;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={id:"districtController",source:[],objectIdField:"ObjectID",geometryType:"polyline",outFields:["*"],fields:[{name:"ObjectID",type:"oid"},{name:"id",type:"string"},{name:"name",type:"string"},{name:"subDistrictCount",type:"integer"},{name:"signalCount",type:"integer"},{name:"selected",type:"string"}],renderer:{type:"unique-value",field:"selected",defaultSymbol:{type:"simple-line",style:"long-dash",color:[111,100,255],width:2},uniqueValueInfos:[{value:"false",symbol:{type:"simple-line",style:"long-dash",color:[180,180,180],width:1}}]}},t={id:"districtController",source:[],objectIdField:"ObjectID",outFields:["*"],geometryType:"polyline",fields:[{name:"ObjectID",type:"oid"},{name:"id",type:"string"},{name:"name",type:"string"},{name:"subDistrictCount",type:"integer"},{name:"signalCount",type:"integer"},{name:"type",type:"string"},{name:"selected",type:"string"}],popupTemplate:{title:"{name}",content:[{type:"fields",fieldInfos:[{fieldName:"id",label:"区控编号"},{fieldName:"subDistrictCount",label:"子区数量"},{fieldName:"signalCount",label:"信号机数量"}]}]},renderer:{type:"unique-value",field:"selected",defaultSymbol:{type:"simple-line",style:"solid",color:[111,100,255,.4],width:2},uniqueValueInfos:[{value:"false",symbol:{type:"simple-line",style:"solid",color:[180,180,180,.4],width:1}}]}},i={id:"subDistrictController",source:[],objectIdField:"ObjectID",outFields:["*"],geometryType:"point",fields:[{name:"ObjectID",type:"oid"},{name:"id",type:"string"},{name:"name",type:"string"},{name:"districtId",type:"string"},{name:"districtName",type:"string"},{name:"subDistrictId",type:"string"},{name:"subDistrictName",type:"string"},{name:"signalCount",type:"integer"},{name:"selected",type:"string"},{name:"type",type:"string"},{name:"color",type:"string"}],popupTemplate:{title:"{subDistrictName} 子区",content:[{type:"fields",fieldInfos:[{fieldName:"subDistrictId",label:"子区编号"},{fieldName:"districtName",label:"所属区控"},{fieldName:"signalCount",label:"信号机数量"}]}]}},r={id:"subDistrictController",source:[],objectIdField:"ObjectID",outFields:["*"],geometryType:"point",fields:[{name:"ObjectID",type:"oid"},{name:"id",type:"string"},{name:"name",type:"string"},{name:"districtId",type:"string"},{name:"districtName",type:"string"},{name:"subDistrictId",type:"string"},{name:"subDistrictName",type:"string"},{name:"signalCount",type:"integer"},{name:"selected",type:"string"},{name:"type",type:"string"},{name:"color",type:"string"}]},s={id:"signalLayer",source:[],objectIdField:"ObjectID",outFields:["*"],geometryType:"point",maxScale:5e3,fields:[{name:"ObjectID",type:"oid"},{name:"id",type:"string"},{name:"name",type:"string"},{name:"signalId",type:"string"},{name:"nodeId",type:"string"},{name:"isKey",type:"string"},{name:"districtId",type:"string"},{name:"districtName",type:"string"},{name:"subDistrictId",type:"string"},{name:"subDistrictName",type:"string"},{name:"type",type:"string"},{name:"selected",type:"string"}],popupTemplate:{title:"{name}信号机",content:[{type:"fields",fieldInfos:[{fieldName:"districtName",label:"区控名称"},{fieldName:"subDistrictName",label:"子区名称"},{fieldName:"signalId",label:"信号机编号"},{fieldName:"nodeId",label:"路口编号"}]}]},renderer:{type:"unique-value",field:"isKey",field2:"selected",defaultSymbol:{type:"simple-marker",style:"circle",color:"gray",size:4,outline:{color:"white",width:0}},uniqueValueInfos:[{value:"true,true",symbol:{type:"simple-marker",style:"circle",color:[254,172,22,.8],size:8,outline:{color:"white",width:0}}},{value:"false,true",symbol:{type:"simple-marker",style:"circle",color:[5,116,255,.8],size:8,outline:{color:"white",width:0}}},{value:"true,false",symbol:{type:"simple-marker",style:"circle",color:[180,180,180,.8],size:8,outline:{color:"white",width:0}}},{value:"false,false",symbol:{type:"simple-marker",style:"circle",color:[180,180,180,.8],size:8,outline:{color:"white",width:0}}}],visualVariables:[{type:"size",valueExpression:"$view.scale",stops:[{size:8,value:9000.954822000003},{size:6,value:18055.954822000003},{size:3,value:144447.638572},{size:2,value:1155581108577e-6}]}]}},l={id:"signalLayer",source:[],objectIdField:"ObjectID",outFields:["*"],geometryType:"point",minScale:5e3,fields:[{name:"ObjectID",type:"oid"},{name:"id",type:"string"},{name:"name",type:"string"},{name:"signalId",type:"string"},{name:"nodeId",type:"string"},{name:"isKey",type:"string"},{name:"districtId",type:"string"},{name:"districtName",type:"string"},{name:"subDistrictId",type:"string"},{name:"subDistrictName",type:"string"},{name:"type",type:"string"},{name:"selected",type:"string"}],popupTemplate:{title:"{name}信号机",content:[{type:"fields",fieldInfos:[{fieldName:"districtName",label:"区控名称"},{fieldName:"subDistrictName",label:"子区名称"},{fieldName:"signalId",label:"信号机编号"},{fieldName:"nodeId",label:"路口编号"}]}]},renderer:{type:"unique-value",field:"isKey",field2:"selected",defaultSymbol:{type:"simple-marker",style:"circle",color:"gray",size:4,outline:{color:"white",width:1}},uniqueValueInfos:[{value:"true,true",symbol:{type:"cim",data:{type:"CIMSymbolReference",primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"textGraphic",propertyName:"TextString",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Custom",expression:'Replace($feature.name, "与", "/") + " " + $feature.signalId',returnType:"Default"}}],symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",size:32,colorLocked:!0,anchorPointUnits:"Relative",frame:{xmin:-16,ymin:-16,xmax:16,ymax:16},markerGraphics:[{type:"CIMMarkerGraphic",primitiveName:"textGraphic",geometry:{x:0,y:0},symbol:{type:"CIMTextSymbol",height:12,horizontalAlignment:"Center",offsetX:0,offsetY:30,haloSize:1,haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[255,255,255,255]}]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[0,0,0,255]}]},verticalAlignment:"Center"},textString:""}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMPictureMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",size:20,rotateClockwise:!0,textureFilter:"Picture",url:"/GisViewerAssets/Images/cross/gis_gjxklk_orange.png"}]}}}},{value:"false,true",symbol:{type:"cim",data:{type:"CIMSymbolReference",primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"textGraphic",propertyName:"TextString",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Custom",expression:'Replace($feature.name, "与", "/") + " " + $feature.signalId',returnType:"Default"}}],symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",size:32,colorLocked:!0,anchorPointUnits:"Relative",frame:{xmin:-16,ymin:-16,xmax:16,ymax:16},markerGraphics:[{type:"CIMMarkerGraphic",primitiveName:"textGraphic",geometry:{x:0,y:0},symbol:{type:"CIMTextSymbol",height:12,horizontalAlignment:"Center",offsetX:0,offsetY:15,haloSize:1,haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[255,255,255,255]}]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[0,0,0,255]}]},verticalAlignment:"Center"},textString:""}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMPictureMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",size:20,rotateClockwise:!0,textureFilter:"Picture",url:"/GisViewerAssets/Images/cross/gis_xhj_blue.png"}]}}}},{value:"true,false",symbol:{type:"picture-marker",url:"/GisViewerAssets/Images/cross/gis_gjxk_gray.png",width:20,height:20}},{value:"false,false",symbol:{type:"picture-marker",url:"/GisViewerAssets/Images/cross/gis_xhj_gray.png",width:20,height:20}}],visualVariables:[{type:"size",valueExpression:"$view.scale",stops:[{size:28,value:2250},{size:24,value:4500}]}]}},n={id:"signalLayer",source:[],objectIdField:"ObjectID",outFields:["*"],geometryType:"point",maxScale:5e3,fields:[{name:"ObjectID",type:"oid"},{name:"id",type:"string"},{name:"name",type:"string"},{name:"signalId",type:"string"},{name:"nodeId",type:"string"},{name:"isKey",type:"string"},{name:"districtId",type:"string"},{name:"districtName",type:"string"},{name:"subDistrictId",type:"string"},{name:"subDistrictName",type:"string"},{name:"type",type:"string"},{name:"type",type:"string"},{name:"selected",type:"string"}],featureReduction:{type:"cluster",clusterRadius:"120px",clusterMaxSize:"50px",clusterMinSize:"30px",symbol:{type:"cim",data:{type:"CIMSymbolReference",primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"textGraphic",propertyName:"TextString",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Custom",expression:"$feature.cluster_count",returnType:"Default"}}],symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",size:32,colorLocked:!0,anchorPointUnits:"Relative",frame:{xmin:-16,ymin:-16,xmax:16,ymax:16},markerGraphics:[{type:"CIMMarkerGraphic",primitiveName:"textGraphic",geometry:{x:0,y:0},symbol:{type:"CIMTextSymbol",height:16,horizontalAlignment:"Center",offsetX:0,offsetY:30,symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[255,255,255,255]}]},verticalAlignment:"Center"},textString:""},{type:"CIMMarkerGraphic",geometry:{rings:[[[-15,40],[15,40],[15,20],[-15,20],[-15,40]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[2,72,200,255]},{type:"CIMSolidStroke",enable:!0,width:5,color:[2,72,200,128]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMPictureMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",size:40,rotateClockwise:!0,textureFilter:"Picture",url:"/GisViewerAssets/Images/cross/gis_xhj_blue.png"}]}}}},popupTemplate:{title:"{name}信号机",content:[{type:"fields",fieldInfos:[{fieldName:"districtName",label:"区控名称"},{fieldName:"subDistrictName",label:"子区名称"},{fieldName:"signalId",label:"信号机编号"},{fieldName:"nodeId",label:"路口编号"}]}]},renderer:{type:"simple",symbol:{type:"simple-marker",style:"circle",color:[5,116,255],size:8,outline:{color:"white",width:1}}}};exports.districtDashLineLayerOptions=e;exports.districtSolidLineLayerOptions=t;exports.signalClusterLayerOptions=n;exports.signalMarkerLayerOptions=s;exports.signalPictureLayerOptions=l;exports.subDistrictLineLayerOptions=r;exports.subDistrictPointLayerOptions=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={id:"districtController",source:[],objectIdField:"ObjectID",geometryType:"polyline",outFields:["*"],fields:[{name:"ObjectID",type:"oid"},{name:"id",type:"string"},{name:"name",type:"string"},{name:"subDistrictCount",type:"integer"},{name:"signalCount",type:"integer"},{name:"selected",type:"string"}],renderer:{type:"unique-value",field:"selected",defaultSymbol:{type:"simple-line",style:"long-dash",color:[111,100,255],width:2},uniqueValueInfos:[{value:"false",symbol:{type:"simple-line",style:"long-dash",color:[180,180,180],width:1}}]}},t={id:"districtController",source:[],objectIdField:"ObjectID",outFields:["*"],geometryType:"polyline",fields:[{name:"ObjectID",type:"oid"},{name:"id",type:"string"},{name:"name",type:"string"},{name:"subDistrictCount",type:"integer"},{name:"signalCount",type:"integer"},{name:"type",type:"string"},{name:"selected",type:"string"}],popupTemplate:{title:"{name}",content:[{type:"fields",fieldInfos:[{fieldName:"id",label:"区控编号"},{fieldName:"subDistrictCount",label:"子区数量"},{fieldName:"signalCount",label:"信号机数量"}]}]},renderer:{type:"unique-value",field:"selected",defaultSymbol:{type:"simple-line",style:"solid",color:[111,100,255,.4],width:2},uniqueValueInfos:[{value:"false",symbol:{type:"simple-line",style:"solid",color:[180,180,180,.4],width:1}}]}},i={id:"subDistrictPointController",source:[],objectIdField:"ObjectID",outFields:["*"],geometryType:"point",fields:[{name:"ObjectID",type:"oid"},{name:"id",type:"string"},{name:"name",type:"string"},{name:"districtId",type:"string"},{name:"districtName",type:"string"},{name:"subDistrictId",type:"string"},{name:"subDistrictName",type:"string"},{name:"signalCount",type:"integer"},{name:"selected",type:"string"},{name:"type",type:"string"},{name:"color",type:"string"}],popupTemplate:{title:"{subDistrictName} 子区",content:[{type:"fields",fieldInfos:[{fieldName:"subDistrictId",label:"子区编号"},{fieldName:"districtName",label:"所属区控"},{fieldName:"signalCount",label:"信号机数量"}]}]}},r={id:"subDistrictLineController",source:[],objectIdField:"ObjectID",outFields:["*"],geometryType:"polyline",fields:[{name:"ObjectID",type:"oid"},{name:"id",type:"string"},{name:"districtId",type:"string"},{name:"subDistrictId",type:"string"},{name:"fromNode",type:"string"},{name:"toNode",type:"string"},{name:"color",type:"string"}]},s={id:"signalLayer",source:[],objectIdField:"ObjectID",outFields:["*"],geometryType:"point",maxScale:5e3,fields:[{name:"ObjectID",type:"oid"},{name:"id",type:"string"},{name:"name",type:"string"},{name:"signalId",type:"string"},{name:"nodeId",type:"string"},{name:"isKey",type:"string"},{name:"districtId",type:"string"},{name:"districtName",type:"string"},{name:"subDistrictId",type:"string"},{name:"subDistrictName",type:"string"},{name:"type",type:"string"},{name:"selected",type:"string"}],popupTemplate:{title:"{name}信号机",content:[{type:"fields",fieldInfos:[{fieldName:"districtName",label:"区控名称"},{fieldName:"subDistrictName",label:"子区名称"},{fieldName:"signalId",label:"信号机编号"},{fieldName:"nodeId",label:"路口编号"}]}]},renderer:{type:"unique-value",field:"isKey",field2:"selected",defaultSymbol:{type:"simple-marker",style:"circle",color:"gray",size:4,outline:{color:"white",width:0}},uniqueValueInfos:[{value:"true,true",symbol:{type:"simple-marker",style:"circle",color:[254,172,22,.8],size:8,outline:{color:"white",width:0}}},{value:"false,true",symbol:{type:"simple-marker",style:"circle",color:[5,116,255,.8],size:8,outline:{color:"white",width:0}}},{value:"true,false",symbol:{type:"simple-marker",style:"circle",color:[180,180,180,.8],size:8,outline:{color:"white",width:0}}},{value:"false,false",symbol:{type:"simple-marker",style:"circle",color:[180,180,180,.8],size:8,outline:{color:"white",width:0}}}],visualVariables:[{type:"size",valueExpression:"$view.scale",stops:[{size:8,value:9000.954822000003},{size:6,value:18055.954822000003},{size:3,value:144447.638572},{size:2,value:1155581108577e-6}]}]}},l={id:"signalLayer",source:[],objectIdField:"ObjectID",outFields:["*"],geometryType:"point",minScale:5e3,fields:[{name:"ObjectID",type:"oid"},{name:"id",type:"string"},{name:"name",type:"string"},{name:"signalId",type:"string"},{name:"nodeId",type:"string"},{name:"isKey",type:"string"},{name:"districtId",type:"string"},{name:"districtName",type:"string"},{name:"subDistrictId",type:"string"},{name:"subDistrictName",type:"string"},{name:"type",type:"string"},{name:"selected",type:"string"}],popupTemplate:{title:"{name}信号机",content:[{type:"fields",fieldInfos:[{fieldName:"districtName",label:"区控名称"},{fieldName:"subDistrictName",label:"子区名称"},{fieldName:"signalId",label:"信号机编号"},{fieldName:"nodeId",label:"路口编号"}]}]},renderer:{type:"unique-value",field:"isKey",field2:"selected",defaultSymbol:{type:"simple-marker",style:"circle",color:"gray",size:4,outline:{color:"white",width:1}},uniqueValueInfos:[{value:"true,true",symbol:{type:"cim",data:{type:"CIMSymbolReference",primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"textGraphic",propertyName:"TextString",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Custom",expression:'Replace($feature.name, "与", "/") + " " + $feature.signalId',returnType:"Default"}}],symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",size:32,colorLocked:!0,anchorPointUnits:"Relative",frame:{xmin:-16,ymin:-16,xmax:16,ymax:16},markerGraphics:[{type:"CIMMarkerGraphic",primitiveName:"textGraphic",geometry:{x:0,y:0},symbol:{type:"CIMTextSymbol",height:12,horizontalAlignment:"Center",offsetX:0,offsetY:30,haloSize:1,haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[255,255,255,255]}]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[0,0,0,255]}]},verticalAlignment:"Center"},textString:""}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMPictureMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",size:20,rotateClockwise:!0,textureFilter:"Picture",url:"/GisViewerAssets/Images/cross/gis_gjxklk_orange.png"}]}}}},{value:"false,true",symbol:{type:"cim",data:{type:"CIMSymbolReference",primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"textGraphic",propertyName:"TextString",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Custom",expression:'Replace($feature.name, "与", "/") + " " + $feature.signalId',returnType:"Default"}}],symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",size:32,colorLocked:!0,anchorPointUnits:"Relative",frame:{xmin:-16,ymin:-16,xmax:16,ymax:16},markerGraphics:[{type:"CIMMarkerGraphic",primitiveName:"textGraphic",geometry:{x:0,y:0},symbol:{type:"CIMTextSymbol",height:12,horizontalAlignment:"Center",offsetX:0,offsetY:15,haloSize:1,haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[255,255,255,255]}]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[0,0,0,255]}]},verticalAlignment:"Center"},textString:""}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMPictureMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",size:20,rotateClockwise:!0,textureFilter:"Picture",url:"/GisViewerAssets/Images/cross/gis_xhj_blue.png"}]}}}},{value:"true,false",symbol:{type:"picture-marker",url:"/GisViewerAssets/Images/cross/gis_gjxk_gray.png",width:20,height:20}},{value:"false,false",symbol:{type:"picture-marker",url:"/GisViewerAssets/Images/cross/gis_xhj_gray.png",width:20,height:20}}],visualVariables:[{type:"size",valueExpression:"$view.scale",stops:[{size:28,value:2250},{size:24,value:4500}]}]}},n={id:"signalLayer",source:[],objectIdField:"ObjectID",outFields:["*"],geometryType:"point",maxScale:5e3,fields:[{name:"ObjectID",type:"oid"},{name:"id",type:"string"},{name:"name",type:"string"},{name:"signalId",type:"string"},{name:"nodeId",type:"string"},{name:"isKey",type:"string"},{name:"districtId",type:"string"},{name:"districtName",type:"string"},{name:"subDistrictId",type:"string"},{name:"subDistrictName",type:"string"},{name:"type",type:"string"},{name:"type",type:"string"},{name:"selected",type:"string"}],featureReduction:{type:"cluster",clusterRadius:"120px",clusterMaxSize:"50px",clusterMinSize:"30px",symbol:{type:"cim",data:{type:"CIMSymbolReference",primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"textGraphic",propertyName:"TextString",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Custom",expression:"$feature.cluster_count",returnType:"Default"}}],symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",size:32,colorLocked:!0,anchorPointUnits:"Relative",frame:{xmin:-16,ymin:-16,xmax:16,ymax:16},markerGraphics:[{type:"CIMMarkerGraphic",primitiveName:"textGraphic",geometry:{x:0,y:0},symbol:{type:"CIMTextSymbol",height:16,horizontalAlignment:"Center",offsetX:0,offsetY:30,symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[255,255,255,255]}]},verticalAlignment:"Center"},textString:""},{type:"CIMMarkerGraphic",geometry:{rings:[[[-15,40],[15,40],[15,20],[-15,20],[-15,40]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[2,72,200,255]},{type:"CIMSolidStroke",enable:!0,width:5,color:[2,72,200,128]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMPictureMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",size:40,rotateClockwise:!0,textureFilter:"Picture",url:"/GisViewerAssets/Images/cross/gis_xhj_blue.png"}]}}}},popupTemplate:{title:"{name}信号机",content:[{type:"fields",fieldInfos:[{fieldName:"districtName",label:"区控名称"},{fieldName:"subDistrictName",label:"子区名称"},{fieldName:"signalId",label:"信号机编号"},{fieldName:"nodeId",label:"路口编号"}]}]},renderer:{type:"simple",symbol:{type:"simple-marker",style:"circle",color:[5,116,255],size:8,outline:{color:"white",width:1}}}};exports.districtDashLineLayerOptions=e;exports.districtSolidLineLayerOptions=t;exports.signalClusterLayerOptions=n;exports.signalMarkerLayerOptions=s;exports.signalPictureLayerOptions=l;exports.subDistrictLineLayerOptions=r;exports.subDistrictPointLayerOptions=i;
@@ -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有各种问题,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("@arcgis/core/geometry"),m=require("@arcgis/core/geometry/support/webMercatorUtils"),g=require("@arcgis/core/Graphic"),w=require("@arcgis/core/layers/GraphicsLayer"),D=require("@turf/buffer"),R=require("@turf/convex"),S=require("@turf/helpers"),G=require("concaveman"),O=require("../../stores/index.js"),C=require("./district-controller.js"),I=require("./district-renderer.js"),v=require("./signal-renderer.js"),L=require("./sub-district-renderer.js");function q(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>o[t]})}}return e.default=o,Object.freeze(e)}const l=q(S);class k{constructor(e){this.detachmentLayerLoaded=!1,this.districtControllerOid=0,this.subDistrictControllerOid=0,this.signalOid=0,this.popupEnabled=!0,this.districtGraphics=[],this.subDistrictGraphics=[],this.signalGraphics=[],this.view=e,this.hasGpu=localStorage.getItem("gpu")!=="Unknown";const t=O.default.useAppDataStore;this.mapConfig=JSON.parse(JSON.stringify(t.mapConfig)),this.detachmentLayer=new w,this.view.map.add(this.detachmentLayer),this.districtRenderer=new I.default(e,this.hasGpu),this.subDistrictRenderer=new L.default(e,this.hasGpu),this.signalRenderer=new v.default(e,this.hasGpu)}async showSignalControlArea(e){this.detachmentLayerLoaded||await this.loadDetachmentLayer(),await this.clearSignalControlArea(),this.districtRenderer.setVisible(!1),this.subDistrictRenderer.setVisible(!1),this.signalRenderer.setClusterVisible(!1),this.signalRenderer.setPointVisible(!1);const t=[],s=[];for(const r of e.areaList){const n=new C.default(r,e.style||"");t.push(n),s.push(...n.subDistricts)}return this.districtRenderer.style=e.style||"",await this.districtRenderer.showDistricts(t),await this.subDistrictRenderer.showSubDistricts(s),await this.signalRenderer.showSignals(t),{status:0,message:"ok"}}async clearSignalControlArea(){return this.districtGraphics=[],this.subDistrictGraphics=[],this.signalGraphics=[],this.districtControllerOid=0,this.subDistrictControllerOid=0,this.signalOid=0,await this.districtRenderer.clearDistricts(),await this.subDistrictRenderer.clearSubDistricts(),await this.signalRenderer.clearSignals(),{status:0,message:"ok"}}setLayerVisibility(e){switch(e.visible===!1&&this.view.closePopup(),e.id){case"district":this.districtRenderer.setVisible(e.visible);break;case"subDistrict":this.subDistrictRenderer.setVisible(e.visible);break;case"signal":this.signalRenderer.setPointVisible(e.visible);break;case"signalCluster":this.signalRenderer.setClusterVisible(e.visible);break;case"shanghai_district":this.detachmentLayer.visible=e.visible;break}return{status:0,message:"ok"}}async locateSignalControlArea(e){switch(e.type){case"district":return await this.districtRenderer.locateDistrict(e.id);case"subDistrict":return await this.subDistrictRenderer.locateSubDistrict(e.id);case"signal":return await this.signalRenderer.locateSignal(e.id);default:return{status:1,message:"未知类型"}}}async highlightSignalControlArea(e){switch(this.view.closePopup(),e.type){case"district":return await this.districtRenderer.highlightDistrict(e.id)?(this.subDistrictRenderer.filter("district",e.id),this.signalRenderer.filter("district",e.id),{status:0,message:"ok"}):{status:1,message:"未找到区控"};case"subDistrict":{const{count:t,parentId:s}=await this.subDistrictRenderer.highlightSubDistrict(e.id);return t>0?(this.districtRenderer.filter(s),this.signalRenderer.filter("subDistrict",e.id),{status:0,message:"ok"}):{status:1,message:"未找到子区"}}case"signal":{const{districtId:t,subDistrictId:s,count:r}=await this.signalRenderer.highlightSignal(e.id);return r>0?(this.districtRenderer.filter(t),this.subDistrictRenderer.filter("subDistrict",s),await this.view.goTo({target:this.signalGraphics,scale:e.scale||1e3},{duration:this.hasGpu?1e3:0}),{status:0,message:"ok"}):{status:1,message:"未找到信号机"}}default:return{status:1,message:"未知类型"}}}async resetHighlight(){return this.districtRenderer.resetFilter(),this.subDistrictRenderer.resetFilter(),this.signalRenderer.resetFilter(),{status:0,message:"ok"}}generateGraphic(e,t,s){const r=e.getAllSignalCoordinates();let n=null;if(r.length>=2)if(r.length===2)n=l.lineString(r);else{if(t){const i=l.featureCollection(r.map(c=>l.point(c)));n=R(i)}else{const i=G(r,.5);i.length>=4&&(n=l.polygon([i]))}n||(n=l.lineString(r))}else if(r.length===1)n=l.point(r[0]);else return;const a=D(n.geometry,t?200:30,{units:"meters"}),u=new g({geometry:{type:"polyline",paths:a.geometry.coordinates},attributes:{ObjectID:t?this.districtControllerOid++:this.subDistrictControllerOid++,id:e.id,name:e.name,subDistrictCount:e.subDistrictCount,signalCount:e.signalCount,parentId:e.parentId,parentName:e.parentName,selected:s,type:t?"district":"subDistrict"}});t?this.districtGraphics.push(u):this.subDistrictGraphics.push(u);for(const i of e.subDistricts)this.generateGraphic(i,!1,s);e.signals.forEach(i=>{const c=new g({geometry:{type:"point",x:i.longitude,y:i.latitude},attributes:{ObjectID:this.signalOid++,id:i.id,name:i.name,signalId:i.signalId,nodeId:i.nodeId,isKey:i.isKey,districtId:t?e.id:e.parentId,districtName:t?e.name:e.parentName,subDistrictId:t?"":e.id,subDistrictName:t?"":e.name,type:"signal",selected:!0}});this.signalGraphics.push(c)})}async loadDetachmentLayer(){const e=this.mapConfig.baseLayers;if(!e)return;const t=e.find(s=>s.options.id==="shanghai_district");if(t)try{const r=await(await fetch("/GisViewerAssets/ShangHai/Layers/district.json")).json(),n=[],{renderer:a,labelingInfo:u}=t.options;r.features.forEach(i=>{const c=i.attributes.ZD_NAME;if(c!=="高架支队"){let d=new y.Polygon({rings:i.geometry.rings});d=m.webMercatorToGeographic(d);const h=new g({geometry:d,attributes:i.attributes});if(a){if(a.type==="simple")h.symbol=a.symbol;else if(a.type==="unique-value"){const b=h.getAttribute("OBJECTID"),f=a.uniqueValueInfos.find(p=>p.value==b);h.symbol=f?f.symbol:a.defaultSymbol}}else h.symbol={type:"simple-fill",color:[227,237,255,.4],outline:{color:[255,195,153],width:2}};if(n.push(h),u&&c!=="边防港航支队"&&c!=="机场支队"){const b=new g({geometry:d.centroid,symbol:{...u.symbol,text:c}});n.push(b)}}}),this.detachmentLayer.addMany(n),this.detachmentLayerLoaded=!0}catch(s){console.error("加载支队图层失败:",s);return}}}exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("@arcgis/core/geometry"),y=require("@arcgis/core/geometry/support/webMercatorUtils"),g=require("@arcgis/core/Graphic"),R=require("@arcgis/core/layers/GraphicsLayer"),w=require("papaparse"),D=require("../../stores/index.js"),p=require("./district-controller.js"),m=require("./district-renderer.js"),L=require("./signal-renderer.js"),S=require("./sub-district-renderer.js");class C{constructor(e){this.detachmentLayerLoaded=!1,this.view=e,this.hasGpu=localStorage.getItem("gpu")!=="Unknown";const t=D.default.useAppDataStore;this.mapConfig=JSON.parse(JSON.stringify(t.mapConfig)),this.detachmentLayer=new R,this.view.map.add(this.detachmentLayer),this.districtRenderer=new m.default(e,this.hasGpu),this.subDistrictRenderer=new S.default(e,this.hasGpu),this.signalRenderer=new L.default(e,this.hasGpu)}async showSignalControlArea(e){this.detachmentLayerLoaded||await this.loadDetachmentLayer(),this.roadLines||(await this.loadRoadLine(),this.subDistrictRenderer.roadLines=this.roadLines),await this.clearSignalControlArea(),this.districtRenderer.setVisible(!1),this.subDistrictRenderer.setVisible(!1),this.signalRenderer.setClusterVisible(!1),this.signalRenderer.setPointVisible(!1);const t=[],s=[];for(const a of e.areaList){const i=new p.default(a,e.style||"");t.push(i),s.push(...i.subDistricts)}return this.districtRenderer.style=e.style||"",await this.districtRenderer.showDistricts(t),await this.subDistrictRenderer.showSubDistricts(s),await this.signalRenderer.showSignals(t),{status:0,message:"ok"}}async clearSignalControlArea(){return await this.districtRenderer.clearDistricts(),await this.subDistrictRenderer.clearSubDistricts(),await this.signalRenderer.clearSignals(),{status:0,message:"ok"}}setLayerVisibility(e){switch(e.visible===!1&&this.view.closePopup(),e.id){case"district":this.districtRenderer.setVisible(e.visible);break;case"subDistrict":this.subDistrictRenderer.setVisible(e.visible);break;case"signal":this.signalRenderer.setPointVisible(e.visible);break;case"signalCluster":this.signalRenderer.setClusterVisible(e.visible);break;case"shanghai_district":this.detachmentLayer.visible=e.visible;break}return{status:0,message:"ok"}}async locateSignalControlArea(e){switch(e.type){case"district":return await this.districtRenderer.locateDistrict(e.id);case"subDistrict":return await this.subDistrictRenderer.locateSubDistrict(e.id);case"signal":return await this.signalRenderer.locateSignal(e.id);default:return{status:1,message:"未知类型"}}}async highlightSignalControlArea(e){switch(this.view.closePopup(),e.type){case"district":return await this.districtRenderer.highlightDistrict(e.id)?(this.subDistrictRenderer.filter("district",e.id),this.signalRenderer.filter("district",e.id),this.roadLines&&this.roadLines.length>0&&await this.subDistrictRenderer.showRoads(e.id),{status:0,message:"ok"}):{status:1,message:"未找到区控"};case"subDistrict":{const{count:t,parentId:s}=await this.subDistrictRenderer.highlightSubDistrict(e.id);return t>0?(this.districtRenderer.filter(s),this.signalRenderer.filter("subDistrict",e.id),{status:0,message:"ok"}):{status:1,message:"未找到子区"}}case"signal":{const{districtId:t,subDistrictId:s,count:a}=await this.signalRenderer.highlightSignal(e.id);return a>0?(this.districtRenderer.filter(t),this.subDistrictRenderer.filter("subDistrict",s),{status:0,message:"ok"}):{status:1,message:"未找到信号机"}}default:return{status:1,message:"未知类型"}}}async resetHighlight(){return this.districtRenderer.resetFilter(),this.subDistrictRenderer.resetFilter(),this.signalRenderer.resetFilter(),{status:0,message:"ok"}}async loadRoadLine(){var t;const e=(t=this.mapConfig.signalControlArea)==null?void 0:t.roadLayerUrl;if(!e){console.warn("未配置道路线图层URL");return}try{const a=await(await fetch(`/GisViewerAssets/${e}`)).text();w.parse(a,{header:!0,skipEmptyLines:!0,complete:i=>{const{data:r}=i;this.roadLines=r.map(n=>({id:n.ROADSECT_ID,fromNode:n.FROM_NODE_ID,toNode:n.TO_NODE_ID,coordinates:JSON.parse(n.GEOM).coordinates}))},error:i=>{console.error("道路线CSV解析失败:",i)}})}catch(s){console.error("读取道路线CSV失败:",s)}}async loadDetachmentLayer(){const e=this.mapConfig.baseLayers;if(!e)return;const t=e.find(s=>s.options.id==="shanghai_district");if(t)try{const a=await(await fetch("/GisViewerAssets/ShangHai/Layers/district.json")).json(),i=[],{renderer:r,labelingInfo:n}=t.options;a.features.forEach(d=>{const c=d.attributes.ZD_NAME;if(c!=="高架支队"){let l=new f.Polygon({rings:d.geometry.rings});l=y.webMercatorToGeographic(l);const o=new g({geometry:l,attributes:d.attributes});if(r){if(r.type==="simple")o.symbol=r.symbol;else if(r.type==="unique-value"){const h=o.getAttribute("OBJECTID"),u=r.uniqueValueInfos.find(b=>b.value==h);o.symbol=u?u.symbol:r.defaultSymbol}}else o.symbol={type:"simple-fill",color:[227,237,255,.4],outline:{color:[255,195,153],width:2}};if(i.push(o),n&&c!=="边防港航支队"&&c!=="机场支队"){const h=new g({geometry:l.centroid,symbol:{...n.symbol,text:c}});i.push(h)}}}),this.detachmentLayer.addMany(i),this.detachmentLayerLoaded=!0}catch(s){console.error("加载支队图层失败:",s);return}}}exports.default=C;
@@ -1,4 +1,4 @@
1
- import { IResult } from '../../../types';
1
+ import { IResult, IRoadLine } from '../../../types';
2
2
  import DistrictController from './district-controller';
3
3
  export default class SubDistrictRenderer {
4
4
  private view;
@@ -6,8 +6,10 @@ export default class SubDistrictRenderer {
6
6
  private clickHandler;
7
7
  private subDistrictPointLayer;
8
8
  private subDistrictLineLayer;
9
+ roadLines: IRoadLine[];
9
10
  constructor(view: __esri.MapView | __esri.SceneView, hasGpu: boolean);
10
11
  showSubDistricts(controllers: DistrictController[]): Promise<void>;
12
+ showRoads(districtId: string): Promise<void>;
11
13
  clearSubDistricts(): Promise<void>;
12
14
  setVisible(visible: boolean): void;
13
15
  /**
@@ -34,6 +36,7 @@ export default class SubDistrictRenderer {
34
36
  * 重置过滤器,显示所有子区
35
37
  */
36
38
  resetFilter(): void;
37
- private currentRenderer;
39
+ private currentPointRenderer;
40
+ private currentLineRenderer;
38
41
  private viewHitTest;
39
42
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("@arcgis/core/Graphic"),u=require("@arcgis/core/layers/FeatureLayer"),n=require("./layer-symbol.js");class l{constructor(i,s){this.view=i,this.hasGpu=s,this.subDistrictPointLayer=new u(n.subDistrictPointLayerOptions),this.subDistrictPointLayer.spatialReference=i.spatialReference,this.subDistrictPointLayer.popupEnabled=!0,this.subDistrictLineLayer=new u(n.subDistrictLineLayerOptions),this.subDistrictLineLayer.spatialReference=i.spatialReference,this.subDistrictLineLayer.popupEnabled=!1,this.view.map.add(this.subDistrictPointLayer)}async showSubDistricts(i){await this.clearSubDistricts(),this.clickHandler=this.view.on("click",this.viewHitTest.bind(this));let s=0;const t=[],r=[];i.forEach(e=>{r.push({value:e.id,label:e.name,symbol:{type:"simple-marker",style:"circle",color:[0,0,0,0],size:"8px",outline:{color:[...e.areaColor],width:4}}}),e.signals.forEach(a=>{const o=new c({geometry:{type:"point",longitude:a.longitude,latitude:a.latitude},attributes:{ObjectID:s++,id:a.id,name:a.name,subDistrictId:e.id,subDistrictName:e.name,districtId:e.parentId,districtName:e.parentName,signalCount:e.signalCount,color:e.areaColor.join(","),type:"subDistrict"}});t.push(o)})}),this.subDistrictPointLayer.renderer={type:"unique-value",field:"subDistrictId",defaultSymbol:{type:"simple-marker",color:"gray",size:"8px",outline:{color:"white",width:1}},defaultLabel:"其他子区",uniqueValueInfos:r,visualVariables:[{type:"size",valueExpression:"$view.scale",stops:[{size:24,value:2500},{size:20,value:5e3},{size:8,value:18055.954822000003},{size:4,value:144447.638572},{size:2,value:1155581108577e-6}]}]},this.currentRenderer=this.subDistrictPointLayer.renderer.clone(),await this.subDistrictPointLayer.applyEdits({addFeatures:t}),await this.view.goTo(t,{duration:this.hasGpu?1e3:0})}async clearSubDistricts(){var t;const i=await this.subDistrictPointLayer.queryFeatures();i.features.length>0&&await this.subDistrictPointLayer.applyEdits({deleteFeatures:i.features}),this.subDistrictPointLayer.definitionExpression="1=1";const s=await this.subDistrictLineLayer.queryFeatures();s.features.length>0&&await this.subDistrictLineLayer.applyEdits({deleteFeatures:s.features}),this.subDistrictLineLayer.definitionExpression="1=1",(t=this.clickHandler)==null||t.remove()}setVisible(i){this.subDistrictPointLayer.visible=i,this.subDistrictLineLayer.visible=i}async locateSubDistrict(i){const s=this.subDistrictPointLayer.createQuery();s.where=`subDistrictId = '${i}'`,s.returnGeometry=!0;const t=await this.subDistrictPointLayer.queryFeatures(s);return t.features.length>0?(await this.view.goTo(t.features,{duration:this.hasGpu?1e3:0}),{status:0,message:"ok"}):{status:1,message:"未找到子区"}}async highlightSubDistrict(i){let s="";const t=this.subDistrictPointLayer.definitionExpression;this.subDistrictPointLayer.definitionExpression=`subDistrictId = '${i}'`;const r=await this.subDistrictPointLayer.queryFeatures(),e=r.features.length;return e>0?(this.subDistrictLineLayer.definitionExpression=`subDistrictId = '${i}'`,s=r.features[0].attributes.districtId,await this.view.goTo(r.features,{duration:this.hasGpu?1e3:0})):this.subDistrictPointLayer.definitionExpression=t,{count:e,parentId:s}}filter(i,s){const t=`${i==="district"?"districtId":"subDistrictId"} = '${s}'`;this.subDistrictPointLayer.definitionExpression=t,this.subDistrictLineLayer.definitionExpression=t}resetFilter(){this.subDistrictPointLayer.definitionExpression="1=1",this.subDistrictLineLayer.definitionExpression="1=1"}async viewHitTest(i){var r;const t=(r=(await this.view.hitTest(i,{include:[this.subDistrictPointLayer]})).results)==null?void 0:r.filter(e=>e.type==="graphic");if(t.length===0)this.currentRenderer&&(this.subDistrictPointLayer.renderer=this.currentRenderer);else{const e=t[0].graphic;this.subDistrictPointLayer.renderer={type:"unique-value",field:"subDistrictId",defaultSymbol:{type:"simple-marker",style:"circle",color:[0,0,0,0],size:"8px",outline:{color:[180,180,180,.5],width:4}},defaultLabel:"其他子区",uniqueValueInfos:[{value:e.attributes.subDistrictId,symbol:{type:"simple-marker",style:"circle",color:[0,0,0,0],size:"8px",outline:{color:e.attributes.color.split(",").map(Number),width:4}}}],visualVariables:[{type:"size",valueExpression:"$view.scale",stops:[{size:24,value:2500},{size:20,value:5e3},{size:8,value:18055.954822000003},{size:4,value:144447.638572},{size:2,value:1155581108577e-6}]}]}}}}exports.default=l;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("@arcgis/core/Graphic"),D=require("@arcgis/core/layers/FeatureLayer"),v=require("./layer-symbol.js");class w{constructor(e,t){this.view=e,this.hasGpu=t,this.subDistrictPointLayer=new D(v.subDistrictPointLayerOptions),this.subDistrictPointLayer.spatialReference=e.spatialReference,this.subDistrictPointLayer.popupEnabled=!0,this.subDistrictLineLayer=new D(v.subDistrictLineLayerOptions),this.subDistrictLineLayer.spatialReference=e.spatialReference,this.subDistrictLineLayer.popupEnabled=!1,this.view.map.addMany([this.subDistrictLineLayer,this.subDistrictPointLayer])}async showSubDistricts(e){await this.clearSubDistricts(),this.clickHandler=this.view.on("click",this.viewHitTest.bind(this));let t=0;const s=[],r=[];e.forEach(i=>{r.push({value:i.id,label:i.name,symbol:{type:"simple-marker",style:"circle",color:[0,0,0,0],size:"8px",outline:{color:[...i.areaColor],width:4}}}),i.signals.forEach(a=>{const u=new f({geometry:{type:"point",longitude:a.longitude,latitude:a.latitude},attributes:{ObjectID:t++,id:a.id,name:a.name,subDistrictId:i.id,subDistrictName:i.name,districtId:i.parentId,districtName:i.parentName,signalCount:i.signalCount,color:i.areaColor.join(","),type:"subDistrict"}});s.push(u)})}),this.subDistrictPointLayer.renderer={type:"unique-value",field:"subDistrictId",defaultSymbol:{type:"simple-marker",color:[180,180,180,.5],size:"8px",outline:{color:"white",width:1}},defaultLabel:"其他子区",uniqueValueInfos:r,visualVariables:[{type:"size",valueExpression:"$view.scale",stops:[{size:24,value:2500},{size:20,value:5e3},{size:8,value:18055.954822000003},{size:4,value:144447.638572},{size:2,value:1155581108577e-6}]}]},this.currentPointRenderer=this.subDistrictPointLayer.renderer.clone(),await this.subDistrictPointLayer.applyEdits({addFeatures:s}),await this.view.goTo(s,{duration:this.hasGpu?1e3:0})}async showRoads(e){const t=this.subDistrictPointLayer.createQuery();t.where=`districtId = '${e}'`;const s=await this.subDistrictPointLayer.queryFeatures(t),r=new Map;s.features.forEach(u=>{var o;const{subDistrictId:l,color:c,id:n}=u.attributes;r.has(l)||r.set(l,{color:c,signalIds:[]}),(o=r.get(l))==null||o.signalIds.push(n)});const i=[],a=[];for(const u of r){let l=0;const c=u[0];i.push({value:c,symbol:{type:"simple-line",color:u[1].color.split(",").map(Number),width:2,style:"solid"}});const n=u[1].signalIds;if(!(n.length<2))for(let o=0;o<n.length;o++)for(let d=0;d<n.length;d++){if(o===d)continue;const p=n[o],y=n[d];if(a.some(h=>{const L=h.attributes;return L&&L.fromNode===y&&L.toNode===p}))continue;const b=this.roadLines.find(h=>h.fromNode===p&&h.toNode===y);if(!b)continue;const m=new f({geometry:{type:"polyline",paths:[b.coordinates]},attributes:{ObjectID:l++,id:b.id,districtId:e,subDistrictId:c,fromNode:p,toNode:y,color:u[1].color}});a.push(m)}}this.subDistrictLineLayer.renderer={type:"unique-value",field:"subDistrictId",defaultSymbol:{type:"simple-line",color:[180,180,180,.5],width:2,style:"solid"},defaultLabel:"其他子区",uniqueValueInfos:i,visualVariables:[{type:"size",valueExpression:"$view.scale",stops:[{size:6,value:2500},{size:5,value:5e3},{size:4,value:18055.954822000003},{size:3,value:144447.638572},{size:2,value:1155581108577e-6}]}]},this.currentLineRenderer=this.subDistrictLineLayer.renderer.clone(),await this.subDistrictLineLayer.applyEdits({addFeatures:a})}async clearSubDistricts(){var s;const e=await this.subDistrictPointLayer.queryFeatures();e.features.length>0&&await this.subDistrictPointLayer.applyEdits({deleteFeatures:e.features}),this.subDistrictPointLayer.definitionExpression="1=1";const t=await this.subDistrictLineLayer.queryFeatures();t.features.length>0&&await this.subDistrictLineLayer.applyEdits({deleteFeatures:t.features}),this.subDistrictLineLayer.definitionExpression="1=1",(s=this.clickHandler)==null||s.remove()}setVisible(e){this.subDistrictPointLayer.visible=e,this.subDistrictLineLayer.visible=e}async locateSubDistrict(e){const t=this.subDistrictPointLayer.createQuery();t.where=`subDistrictId = '${e}'`,t.returnGeometry=!0;const s=await this.subDistrictPointLayer.queryFeatures(t);return s.features.length>0?(await this.view.goTo(s.features,{duration:this.hasGpu?1e3:0}),{status:0,message:"ok"}):{status:1,message:"未找到子区"}}async highlightSubDistrict(e){let t="";const s=this.subDistrictPointLayer.definitionExpression;this.subDistrictPointLayer.definitionExpression=`subDistrictId = '${e}'`;const r=await this.subDistrictPointLayer.queryFeatures(),i=r.features.length;return i>0?(this.subDistrictLineLayer.definitionExpression=`subDistrictId = '${e}'`,t=r.features[0].attributes.districtId,await this.view.goTo(r.features,{duration:this.hasGpu?1e3:0})):this.subDistrictPointLayer.definitionExpression=s,{count:i,parentId:t}}filter(e,t){const s=`${e==="district"?"districtId":"subDistrictId"} = '${t}'`;this.subDistrictPointLayer.definitionExpression=s,this.subDistrictLineLayer.definitionExpression=s}resetFilter(){this.subDistrictPointLayer.definitionExpression="1=1",this.subDistrictLineLayer.definitionExpression="1=1"}async viewHitTest(e){var r;const s=(r=(await this.view.hitTest(e,{include:[this.subDistrictPointLayer,this.subDistrictLineLayer]})).results)==null?void 0:r.filter(i=>i.type==="graphic");if(s.length===0)this.subDistrictPointLayer.renderer=this.currentPointRenderer,this.subDistrictLineLayer.renderer=this.currentLineRenderer;else{const i=s[0].graphic;this.subDistrictPointLayer.renderer={type:"unique-value",field:"subDistrictId",defaultSymbol:{type:"simple-marker",style:"circle",color:[0,0,0,0],size:"8px",outline:{color:[180,180,180,.5],width:4}},defaultLabel:"其他子区",uniqueValueInfos:[{value:i.attributes.subDistrictId,symbol:{type:"simple-marker",style:"circle",color:[0,0,0,0],size:"8px",outline:{color:i.attributes.color.split(",").map(Number),width:4}}}],visualVariables:[{type:"size",valueExpression:"$view.scale",stops:[{size:24,value:2500},{size:20,value:5e3},{size:8,value:18055.954822000003},{size:4,value:144447.638572},{size:2,value:1155581108577e-6}]}]},this.subDistrictLineLayer.renderer={type:"unique-value",field:"subDistrictId",defaultSymbol:{type:"simple-line",style:"solid",color:[180,180,180,.5],width:"8px"},defaultLabel:"其他子区",uniqueValueInfos:[{value:i.attributes.subDistrictId,symbol:{type:"simple-line",style:"solid",color:i.attributes.color.split(",").map(Number),width:"8px"}}],visualVariables:[{type:"size",valueExpression:"$view.scale",stops:[{size:6,value:2500},{size:5,value:5e3},{size:4,value:18055.954822000003},{size:3,value:144447.638572},{size:2,value:1155581108577e-6}]}]}}}}exports.default=w;