gisviewer-vue3-arcgis 1.0.134 → 1.0.136

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.
@@ -4,6 +4,7 @@ interface ICross {
4
4
  parentId: string;
5
5
  latitude: number;
6
6
  longitude: number;
7
+ signalId: string;
7
8
  }
8
9
  export default class DistrictController {
9
10
  id: string;
@@ -1,4 +1,4 @@
1
- class r {
1
+ class i {
2
2
  constructor(t) {
3
3
  this.parentName = "", this.crosses = [], this.subDistricts = [], this.areaColor = [
4
4
  Math.floor(Math.random() * 255),
@@ -7,7 +7,7 @@ class r {
7
7
  ], this.crossCount = 0, this.subDistrictCount = 0, this.id = t.id, this.name = t.name, this.parentId = t.parentId;
8
8
  for (const s of t.children)
9
9
  if (s.children) {
10
- const o = new r(s);
10
+ const o = new i(s);
11
11
  o.parentName = this.name, o.areaColor = this.areaColor, this.subDistricts.push(o), this.subDistrictCount++, this.crossCount += o.crossCount;
12
12
  } else {
13
13
  const o = {
@@ -15,7 +15,8 @@ class r {
15
15
  name: s.name,
16
16
  parentId: s.parentId,
17
17
  latitude: Number(s.latitude),
18
- longitude: Number(s.longitude)
18
+ longitude: Number(s.longitude),
19
+ signalId: s.signalId
19
20
  };
20
21
  this.crosses.push(o), this.crossCount++;
21
22
  }
@@ -30,5 +31,5 @@ class r {
30
31
  }
31
32
  }
32
33
  export {
33
- r as default
34
+ i as default
34
35
  };
@@ -5,7 +5,8 @@ export default class SignalControlAreaController {
5
5
  private subDistrictControllerLayer;
6
6
  private crossLayer;
7
7
  private highlightLayer;
8
- private eventHandle?;
8
+ private watchHandle?;
9
+ private readonly crossScale;
9
10
  constructor(view: __esri.MapView | __esri.SceneView);
10
11
  showSignalControlArea(params: any): IResult;
11
12
  clearSignalControlArea(): IResult;
@@ -1,12 +1,13 @@
1
- import h from "@arcgis/core/Graphic";
1
+ import * as m from "@arcgis/core/core/reactiveUtils.js";
2
+ import n from "@arcgis/core/Graphic";
2
3
  import a from "@arcgis/core/layers/GraphicsLayer";
3
- import y from "@turf/buffer";
4
- import g from "@turf/convex";
4
+ import u from "@turf/buffer";
5
+ import d from "@turf/convex";
5
6
  import * as c from "@turf/helpers";
6
- import m from "./district-controller.mjs";
7
+ import p from "./district-controller.mjs";
7
8
  class C {
8
9
  constructor(e) {
9
- this.view = e, this.view.popup.visibleElements = {
10
+ this.crossScale = 3e3, this.view = e, this.view.popup.visibleElements = {
10
11
  closeButton: !0,
11
12
  collapseButton: !1,
12
13
  actionBar: !0
@@ -34,19 +35,62 @@ class C {
34
35
  showSignalControlArea(e) {
35
36
  this.districtControllerLayer.removeAll(), this.subDistrictControllerLayer.removeAll(), this.crossLayer.removeAll(), this.highlightLayer.removeAll(), this.districtControllerLayer.visible = !0, this.subDistrictControllerLayer.visible = !0;
36
37
  for (const t of e) {
37
- const r = new m(t);
38
+ const r = new p(t);
38
39
  this.drawArea(r, !0);
39
40
  }
40
- return { status: 0, message: "ok" };
41
+ return this.watchHandle = m.watch(
42
+ () => this.view.scale,
43
+ (t, r) => {
44
+ if (t > this.crossScale && r <= this.crossScale)
45
+ this.crossLayer.graphics.forEach((s) => {
46
+ s.symbol = {
47
+ type: "simple-marker",
48
+ color: s.getAttribute("color"),
49
+ size: 8,
50
+ outline: {
51
+ color: "white",
52
+ width: 1
53
+ }
54
+ };
55
+ }), this.highlightLayer.graphics.forEach((s) => {
56
+ s.getAttribute("type") === "cross" && (s.symbol = {
57
+ type: "simple-marker",
58
+ color: s.getAttribute("color"),
59
+ size: 8,
60
+ outline: {
61
+ color: "white",
62
+ width: 1
63
+ }
64
+ });
65
+ });
66
+ else if (t <= this.crossScale && r > this.crossScale) {
67
+ const s = {
68
+ type: "picture-marker",
69
+ url: "/GisViewerAssets/Images/xhj_1.png",
70
+ width: "37px",
71
+ height: "57px",
72
+ yoffset: "25px"
73
+ };
74
+ this.crossLayer.graphics.forEach((i) => {
75
+ i.symbol = s;
76
+ }), this.highlightLayer.graphics.forEach((i) => {
77
+ i.getAttribute("type") === "cross" && (i.symbol = s);
78
+ });
79
+ }
80
+ }
81
+ ), { status: 0, message: "ok" };
41
82
  }
42
83
  clearSignalControlArea() {
43
84
  var e;
44
- return this.districtControllerLayer.removeAll(), this.subDistrictControllerLayer.removeAll(), this.crossLayer.removeAll(), this.highlightLayer.removeAll(), (e = this.eventHandle) == null || e.remove(), this.view.closePopup(), { status: 0, message: "ok" };
85
+ return this.districtControllerLayer.removeAll(), this.subDistrictControllerLayer.removeAll(), this.crossLayer.removeAll(), this.highlightLayer.removeAll(), (e = this.watchHandle) == null || e.remove(), this.view.closePopup(), { status: 0, message: "ok" };
45
86
  }
46
87
  async locateSignalControlArea(e) {
47
88
  const t = this.findAreaGraphic(e.id);
48
89
  if (t) {
49
- await this.view.goTo(t.geometry);
90
+ t.attributes.type === "cross" ? await this.view.goTo({
91
+ target: t.geometry,
92
+ scale: 1500
93
+ }) : await this.view.goTo(t.geometry);
50
94
  const r = t.geometry.type === "point" ? t.geometry : t.geometry.centroid;
51
95
  return this.view.openPopup({
52
96
  features: [t],
@@ -62,9 +106,10 @@ class C {
62
106
  ).toArray().map((i) => i.clone()), s = this.crossLayer.graphics.filter(
63
107
  (i) => i.getAttribute("id") === e.id || i.getAttribute("districtId") === e.id || i.getAttribute("subDistrictId") === e.id
64
108
  ).toArray().map((i) => i.clone());
65
- return t.length > 0 && this.highlightLayer.addMany(t), r.length > 0 && this.highlightLayer.addMany(r), s.length > 0 && this.highlightLayer.addMany(s), this.highlightLayer.graphics.length === 0 ? { status: 1, message: "未找到" } : (await this.view.goTo(
66
- t.length > 0 ? t : r.length > 0 ? r : s
67
- ), { status: 0, message: "ok" });
109
+ return t.length > 0 && this.highlightLayer.addMany(t), r.length > 0 && this.highlightLayer.addMany(r), s.length > 0 && this.highlightLayer.addMany(s), this.highlightLayer.graphics.length === 0 ? { status: 1, message: "未找到" } : (t.length > 0 ? await this.view.goTo(t) : r.length > 0 ? await this.view.goTo(r) : s.length > 1 ? await this.view.goTo(s) : await this.view.goTo({
110
+ target: s[0].geometry,
111
+ scale: 1500
112
+ }), { status: 0, message: "ok" });
68
113
  }
69
114
  resetHighlight() {
70
115
  return this.highlightLayer.removeAll(), this.districtControllerLayer.visible = !0, this.subDistrictControllerLayer.visible = !0, this.crossLayer.visible = !0, { status: 0, message: "ok" };
@@ -92,11 +137,11 @@ class C {
92
137
  const r = e.getAllCrossCoordinates();
93
138
  if (r.length > 2) {
94
139
  const i = c.featureCollection(
95
- r.map((d) => c.point(d))
96
- ), l = g(i);
140
+ r.map((y) => c.point(y))
141
+ ), l = d(i);
97
142
  if (!l)
98
143
  return;
99
- const u = y(
144
+ const g = u(
100
145
  l.geometry,
101
146
  // 区控面积更大,需要更大的缓冲半径
102
147
  t ? 200 : 30,
@@ -132,10 +177,10 @@ class C {
132
177
  label: "路口数量"
133
178
  }
134
179
  ];
135
- const n = new h({
180
+ const h = new n({
136
181
  geometry: {
137
182
  type: "polygon",
138
- rings: u.geometry.coordinates
183
+ rings: g.geometry.coordinates
139
184
  },
140
185
  symbol: {
141
186
  type: "simple-fill",
@@ -165,11 +210,11 @@ class C {
165
210
  ]
166
211
  }
167
212
  });
168
- t ? this.districtControllerLayer.add(n) : this.subDistrictControllerLayer.add(n);
213
+ t ? this.districtControllerLayer.add(h) : this.subDistrictControllerLayer.add(h);
169
214
  }
170
215
  for (const i of e.subDistricts)
171
216
  this.drawArea(i, !1);
172
- const s = e.crosses.map((i) => new h({
217
+ const s = e.crosses.map((i) => new n({
173
218
  geometry: {
174
219
  type: "point",
175
220
  x: i.longitude,
@@ -188,8 +233,12 @@ class C {
188
233
  type: "cross",
189
234
  id: i.id,
190
235
  name: i.name,
236
+ color: e.areaColor,
237
+ signalId: i.signalId,
191
238
  districtId: t ? e.id : e.parentId,
192
- subDistrictId: t ? "" : e.id
239
+ districtName: t ? e.name : e.parentName,
240
+ subDistrictId: t ? "" : e.id,
241
+ subDistrictName: t ? "" : e.name
193
242
  },
194
243
  popupTemplate: {
195
244
  title: i.name,
@@ -198,16 +247,20 @@ class C {
198
247
  type: "fields",
199
248
  fieldInfos: [
200
249
  {
201
- fieldName: "districtId",
202
- label: "区控编号"
250
+ fieldName: "districtName",
251
+ label: "区控名称"
203
252
  },
204
253
  {
205
- fieldName: "subDistrictId",
206
- label: "子区编号"
254
+ fieldName: "subDistrictName",
255
+ label: "子区名称"
207
256
  },
208
257
  {
209
258
  fieldName: "id",
210
259
  label: "路口编号"
260
+ },
261
+ {
262
+ fieldName: "signalId",
263
+ label: "信号机编号"
211
264
  }
212
265
  ]
213
266
  }
@@ -4,6 +4,7 @@ interface ICross {
4
4
  parentId: string;
5
5
  latitude: number;
6
6
  longitude: number;
7
+ signalId: string;
7
8
  }
8
9
  export default class DistrictController {
9
10
  id: string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});class e{constructor(s){this.parentName="",this.crosses=[],this.subDistricts=[],this.areaColor=[Math.floor(Math.random()*255),Math.floor(Math.random()*255),Math.floor(Math.random()*255)],this.crossCount=0,this.subDistrictCount=0,this.id=s.id,this.name=s.name,this.parentId=s.parentId;for(const t of s.children)if(t.children){const o=new e(t);o.parentName=this.name,o.areaColor=this.areaColor,this.subDistricts.push(o),this.subDistrictCount++,this.crossCount+=o.crossCount}else{const o={id:t.id,name:t.name,parentId:t.parentId,latitude:Number(t.latitude),longitude:Number(t.longitude)};this.crosses.push(o),this.crossCount++}}getAllCrossCoordinates(){const s=[];for(const t of this.crosses)s.push([t.longitude,t.latitude]);for(const t of this.subDistricts)s.push(...t.getAllCrossCoordinates());return s}}exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});class e{constructor(s){this.parentName="",this.crosses=[],this.subDistricts=[],this.areaColor=[Math.floor(Math.random()*255),Math.floor(Math.random()*255),Math.floor(Math.random()*255)],this.crossCount=0,this.subDistrictCount=0,this.id=s.id,this.name=s.name,this.parentId=s.parentId;for(const t of s.children)if(t.children){const o=new e(t);o.parentName=this.name,o.areaColor=this.areaColor,this.subDistricts.push(o),this.subDistrictCount++,this.crossCount+=o.crossCount}else{const o={id:t.id,name:t.name,parentId:t.parentId,latitude:Number(t.latitude),longitude:Number(t.longitude),signalId:t.signalId};this.crosses.push(o),this.crossCount++}}getAllCrossCoordinates(){const s=[];for(const t of this.crosses)s.push([t.longitude,t.latitude]);for(const t of this.subDistricts)s.push(...t.getAllCrossCoordinates());return s}}exports.default=e;
@@ -5,7 +5,8 @@ export default class SignalControlAreaController {
5
5
  private subDistrictControllerLayer;
6
6
  private crossLayer;
7
7
  private highlightLayer;
8
- private eventHandle?;
8
+ private watchHandle?;
9
+ private readonly crossScale;
9
10
  constructor(view: __esri.MapView | __esri.SceneView);
10
11
  showSignalControlArea(params: any): IResult;
11
12
  clearSignalControlArea(): IResult;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("@arcgis/core/Graphic"),o=require("@arcgis/core/layers/GraphicsLayer"),y=require("@turf/buffer"),p=require("@turf/convex"),m=require("@turf/helpers"),f=require("./district-controller.js");function b(s){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>s[t]})}}return e.default=s,Object.freeze(e)}const u=b(m);class L{constructor(e){this.view=e,this.view.popup.visibleElements={closeButton:!0,collapseButton:!1,actionBar:!0},this.districtControllerLayer=new o({id:"districtControllerLayer",maxScale:144447,minScale:1155582}),this.subDistrictControllerLayer=new o({id:"subDistrictControllerLayer",maxScale:0,minScale:144447}),this.crossLayer=new o({id:"crossLayer",maxScale:0,minScale:36112}),this.highlightLayer=new o({id:"highlightLayer"}),this.view.map.addMany([this.districtControllerLayer,this.subDistrictControllerLayer,this.crossLayer,this.highlightLayer])}showSignalControlArea(e){this.districtControllerLayer.removeAll(),this.subDistrictControllerLayer.removeAll(),this.crossLayer.removeAll(),this.highlightLayer.removeAll(),this.districtControllerLayer.visible=!0,this.subDistrictControllerLayer.visible=!0;for(const t of e){const i=new f.default(t);this.drawArea(i,!0)}return{status:0,message:"ok"}}clearSignalControlArea(){var e;return this.districtControllerLayer.removeAll(),this.subDistrictControllerLayer.removeAll(),this.crossLayer.removeAll(),this.highlightLayer.removeAll(),(e=this.eventHandle)==null||e.remove(),this.view.closePopup(),{status:0,message:"ok"}}async locateSignalControlArea(e){const t=this.findAreaGraphic(e.id);if(t){await this.view.goTo(t.geometry);const i=t.geometry.type==="point"?t.geometry:t.geometry.centroid;return this.view.openPopup({features:[t],location:i}),{status:0,message:"ok"}}else return{status:1,message:"未找到"}}async highlightSignalControlArea(e){this.highlightLayer.removeAll(),this.districtControllerLayer.visible=!1,this.subDistrictControllerLayer.visible=!1,this.crossLayer.visible=!1;const t=this.districtControllerLayer.graphics.filter(r=>r.getAttribute("id")===e.id).toArray().map(r=>r.clone()),i=this.subDistrictControllerLayer.graphics.filter(r=>r.getAttribute("id")===e.id||r.getAttribute("parentId")===e.id).toArray().map(r=>r.clone()),a=this.crossLayer.graphics.filter(r=>r.getAttribute("id")===e.id||r.getAttribute("districtId")===e.id||r.getAttribute("subDistrictId")===e.id).toArray().map(r=>r.clone());return t.length>0&&this.highlightLayer.addMany(t),i.length>0&&this.highlightLayer.addMany(i),a.length>0&&this.highlightLayer.addMany(a),this.highlightLayer.graphics.length===0?{status:1,message:"未找到"}:(await this.view.goTo(t.length>0?t:i.length>0?i:a),{status:0,message:"ok"})}resetHighlight(){return this.highlightLayer.removeAll(),this.districtControllerLayer.visible=!0,this.subDistrictControllerLayer.visible=!0,this.crossLayer.visible=!0,{status:0,message:"ok"}}findAreaGraphic(e){let t=this.districtControllerLayer.graphics.find(i=>i.attributes.id===e);return t||(t=this.subDistrictControllerLayer.graphics.find(i=>i.attributes.id===e)),t||(t=this.crossLayer.graphics.find(i=>i.attributes.id===e)),t}drawArea(e,t){const i=e.getAllCrossCoordinates();if(i.length>2){const r=u.featureCollection(i.map(g=>u.point(g))),n=p(r);if(!n)return;const d=y(n.geometry,t?200:30,{units:"meters"});let l;t?l=[{fieldName:"id",label:"区控编号"},{fieldName:"crossCount",label:"路口数量"},{fieldName:"subDistrictCount",label:"子区数量"}]:l=[{fieldName:"parentName",label:"区控名称"},{fieldName:"id",label:"子区编号"},{fieldName:"crossCount",label:"路口数量"}];const h=new c({geometry:{type:"polygon",rings:d.geometry.coordinates},symbol:{type:"simple-fill",color:[...e.areaColor,t?.6:.8],outline:{color:e.areaColor,width:2,style:t?"solid":"long-dash"}},attributes:{type:"signalControlArea",id:e.id,name:e.name,parentId:e.parentId,parentName:e.parentName,crossCount:e.crossCount,subDistrictCount:e.subDistrictCount},popupTemplate:{title:e.name,content:[{type:"fields",fieldInfos:l}]}});t?this.districtControllerLayer.add(h):this.subDistrictControllerLayer.add(h)}for(const r of e.subDistricts)this.drawArea(r,!1);const a=e.crosses.map(r=>new c({geometry:{type:"point",x:r.longitude,y:r.latitude},symbol:{type:"simple-marker",color:e.areaColor,size:8,outline:{color:"white",width:1}},attributes:{type:"cross",id:r.id,name:r.name,districtId:t?e.id:e.parentId,subDistrictId:t?"":e.id},popupTemplate:{title:r.name,content:[{type:"fields",fieldInfos:[{fieldName:"districtId",label:"区控编号"},{fieldName:"subDistrictId",label:"子区编号"},{fieldName:"id",label:"路口编号"}]}]}}));this.crossLayer.addMany(a)}}exports.default=L;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("@arcgis/core/core/reactiveUtils.js"),c=require("@arcgis/core/Graphic"),o=require("@arcgis/core/layers/GraphicsLayer"),p=require("@turf/buffer"),f=require("@turf/convex"),b=require("@turf/helpers"),L=require("./district-controller.js");function g(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const w=g(m),u=g(b);class v{constructor(e){this.crossScale=3e3,this.view=e,this.view.popup.visibleElements={closeButton:!0,collapseButton:!1,actionBar:!0},this.districtControllerLayer=new o({id:"districtControllerLayer",maxScale:144447,minScale:1155582}),this.subDistrictControllerLayer=new o({id:"subDistrictControllerLayer",maxScale:0,minScale:144447}),this.crossLayer=new o({id:"crossLayer",maxScale:0,minScale:36112}),this.highlightLayer=new o({id:"highlightLayer"}),this.view.map.addMany([this.districtControllerLayer,this.subDistrictControllerLayer,this.crossLayer,this.highlightLayer])}showSignalControlArea(e){this.districtControllerLayer.removeAll(),this.subDistrictControllerLayer.removeAll(),this.crossLayer.removeAll(),this.highlightLayer.removeAll(),this.districtControllerLayer.visible=!0,this.subDistrictControllerLayer.visible=!0;for(const t of e){const r=new L.default(t);this.drawArea(r,!0)}return this.watchHandle=w.watch(()=>this.view.scale,(t,r)=>{if(t>this.crossScale&&r<=this.crossScale)this.crossLayer.graphics.forEach(s=>{s.symbol={type:"simple-marker",color:s.getAttribute("color"),size:8,outline:{color:"white",width:1}}}),this.highlightLayer.graphics.forEach(s=>{s.getAttribute("type")==="cross"&&(s.symbol={type:"simple-marker",color:s.getAttribute("color"),size:8,outline:{color:"white",width:1}})});else if(t<=this.crossScale&&r>this.crossScale){const s={type:"picture-marker",url:"/GisViewerAssets/Images/xhj_1.png",width:"37px",height:"57px",yoffset:"25px"};this.crossLayer.graphics.forEach(i=>{i.symbol=s}),this.highlightLayer.graphics.forEach(i=>{i.getAttribute("type")==="cross"&&(i.symbol=s)})}}),{status:0,message:"ok"}}clearSignalControlArea(){var e;return this.districtControllerLayer.removeAll(),this.subDistrictControllerLayer.removeAll(),this.crossLayer.removeAll(),this.highlightLayer.removeAll(),(e=this.watchHandle)==null||e.remove(),this.view.closePopup(),{status:0,message:"ok"}}async locateSignalControlArea(e){const t=this.findAreaGraphic(e.id);if(t){t.attributes.type==="cross"?await this.view.goTo({target:t.geometry,scale:1500}):await this.view.goTo(t.geometry);const r=t.geometry.type==="point"?t.geometry:t.geometry.centroid;return this.view.openPopup({features:[t],location:r}),{status:0,message:"ok"}}else return{status:1,message:"未找到"}}async highlightSignalControlArea(e){this.highlightLayer.removeAll(),this.districtControllerLayer.visible=!1,this.subDistrictControllerLayer.visible=!1,this.crossLayer.visible=!1;const t=this.districtControllerLayer.graphics.filter(i=>i.getAttribute("id")===e.id).toArray().map(i=>i.clone()),r=this.subDistrictControllerLayer.graphics.filter(i=>i.getAttribute("id")===e.id||i.getAttribute("parentId")===e.id).toArray().map(i=>i.clone()),s=this.crossLayer.graphics.filter(i=>i.getAttribute("id")===e.id||i.getAttribute("districtId")===e.id||i.getAttribute("subDistrictId")===e.id).toArray().map(i=>i.clone());return t.length>0&&this.highlightLayer.addMany(t),r.length>0&&this.highlightLayer.addMany(r),s.length>0&&this.highlightLayer.addMany(s),this.highlightLayer.graphics.length===0?{status:1,message:"未找到"}:(t.length>0?await this.view.goTo(t):r.length>0?await this.view.goTo(r):s.length>1?await this.view.goTo(s):await this.view.goTo({target:s[0].geometry,scale:1500}),{status:0,message:"ok"})}resetHighlight(){return this.highlightLayer.removeAll(),this.districtControllerLayer.visible=!0,this.subDistrictControllerLayer.visible=!0,this.crossLayer.visible=!0,{status:0,message:"ok"}}findAreaGraphic(e){let t=this.districtControllerLayer.graphics.find(r=>r.attributes.id===e);return t||(t=this.subDistrictControllerLayer.graphics.find(r=>r.attributes.id===e)),t||(t=this.crossLayer.graphics.find(r=>r.attributes.id===e)),t}drawArea(e,t){const r=e.getAllCrossCoordinates();if(r.length>2){const i=u.featureCollection(r.map(d=>u.point(d))),n=f(i);if(!n)return;const y=p(n.geometry,t?200:30,{units:"meters"});let l;t?l=[{fieldName:"id",label:"区控编号"},{fieldName:"crossCount",label:"路口数量"},{fieldName:"subDistrictCount",label:"子区数量"}]:l=[{fieldName:"parentName",label:"区控名称"},{fieldName:"id",label:"子区编号"},{fieldName:"crossCount",label:"路口数量"}];const h=new c({geometry:{type:"polygon",rings:y.geometry.coordinates},symbol:{type:"simple-fill",color:[...e.areaColor,t?.6:.8],outline:{color:e.areaColor,width:2,style:t?"solid":"long-dash"}},attributes:{type:"signalControlArea",id:e.id,name:e.name,parentId:e.parentId,parentName:e.parentName,crossCount:e.crossCount,subDistrictCount:e.subDistrictCount},popupTemplate:{title:e.name,content:[{type:"fields",fieldInfos:l}]}});t?this.districtControllerLayer.add(h):this.subDistrictControllerLayer.add(h)}for(const i of e.subDistricts)this.drawArea(i,!1);const s=e.crosses.map(i=>new c({geometry:{type:"point",x:i.longitude,y:i.latitude},symbol:{type:"simple-marker",color:e.areaColor,size:8,outline:{color:"white",width:1}},attributes:{type:"cross",id:i.id,name:i.name,color:e.areaColor,signalId:i.signalId,districtId:t?e.id:e.parentId,districtName:t?e.name:e.parentName,subDistrictId:t?"":e.id,subDistrictName:t?"":e.name},popupTemplate:{title:i.name,content:[{type:"fields",fieldInfos:[{fieldName:"districtName",label:"区控名称"},{fieldName:"subDistrictName",label:"子区名称"},{fieldName:"id",label:"路口编号"},{fieldName:"signalId",label:"信号机编号"}]}]}}));this.crossLayer.addMany(s)}}exports.default=v;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gisviewer-vue3-arcgis",
3
- "version": "1.0.134",
3
+ "version": "1.0.136",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "files": [