gisviewer-vue3-arcgis 1.0.245 → 1.0.247

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/es/src/gis-map/gis-map.vue.d.ts +12 -7
  2. package/es/src/gis-map/gis-map.vue.mjs +154 -145
  3. package/es/src/gis-map/index.d.ts +9 -0
  4. package/es/src/gis-map/stores/appData.d.ts +2 -0
  5. package/es/src/gis-map/stores/appData.mjs +1 -0
  6. package/es/src/gis-map/utils/custom-layer/custom-wmts-layer.mjs +137 -14
  7. package/es/src/gis-map/utils/edpass-device-controller.d.ts +14 -0
  8. package/es/src/gis-map/utils/edpass-device-controller.mjs +237 -0
  9. package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.mjs +3 -3
  10. package/es/src/gis-map/utils/map-initializer.d.ts +1 -0
  11. package/es/src/gis-map/utils/map-initializer.mjs +118 -101
  12. package/es/src/gis-map/utils/police-jurisdiction.d.ts +9 -0
  13. package/es/src/gis-map/utils/police-jurisdiction.mjs +109 -0
  14. package/es/src/types/index.d.ts +10 -0
  15. package/lib/src/gis-map/gis-map.vue.d.ts +12 -7
  16. package/lib/src/gis-map/gis-map.vue.js +1 -1
  17. package/lib/src/gis-map/index.d.ts +9 -0
  18. package/lib/src/gis-map/stores/appData.d.ts +2 -0
  19. package/lib/src/gis-map/stores/appData.js +1 -1
  20. package/lib/src/gis-map/utils/custom-layer/custom-wmts-layer.js +1 -1
  21. package/lib/src/gis-map/utils/edpass-device-controller.d.ts +14 -0
  22. package/lib/src/gis-map/utils/edpass-device-controller.js +1 -0
  23. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.js +1 -1
  24. package/lib/src/gis-map/utils/map-initializer.d.ts +1 -0
  25. package/lib/src/gis-map/utils/map-initializer.js +1 -1
  26. package/lib/src/gis-map/utils/police-jurisdiction.d.ts +9 -0
  27. package/lib/src/gis-map/utils/police-jurisdiction.js +1 -0
  28. package/lib/src/types/index.d.ts +10 -0
  29. package/package.json +1 -1
@@ -1,21 +1,144 @@
1
- import { subclass as a } from "@arcgis/core/core/accessorSupport/decorators";
2
- import c from "@arcgis/core/layers/BaseTileLayer.js";
3
- var i = Object.defineProperty, m = Object.getOwnPropertyDescriptor, f = (e, l, t, s) => {
4
- for (var r = s > 1 ? void 0 : s ? m(l, t) : l, p = e.length - 1, o; p >= 0; p--)
5
- (o = e[p]) && (r = (s ? o(l, t, r) : o(r)) || r);
6
- return s && r && i(l, t, r), r;
1
+ import { subclass as u } from "@arcgis/core/core/accessorSupport/decorators";
2
+ import a from "@arcgis/core/layers/BaseTileLayer.js";
3
+ var c = Object.defineProperty, v = Object.getOwnPropertyDescriptor, p = (e, s, o, r) => {
4
+ for (var l = r > 1 ? void 0 : r ? v(s, o) : s, t = e.length - 1, i; t >= 0; t--)
5
+ (i = e[t]) && (l = (r ? i(s, o, l) : i(l)) || l);
6
+ return r && l && c(s, o, l), l;
7
7
  };
8
- let u = class extends c {
8
+ let n = class extends a {
9
9
  constructor(e) {
10
- super(e), this.urlTemplate = "", this.urlTemplate = e.urlTemplate;
10
+ e.tileInfo || (e.tileInfo = {
11
+ dpi: 96,
12
+ size: [256, 256],
13
+ format: "png",
14
+ origin: {
15
+ x: -400,
16
+ y: 400
17
+ },
18
+ spatialReference: {
19
+ wkid: 4326
20
+ },
21
+ lods: [
22
+ {
23
+ level: "0",
24
+ scale: 591657527591555e-6,
25
+ resolution: 1.4078260157100582
26
+ },
27
+ {
28
+ level: "1",
29
+ scale: 295828763795777e-6,
30
+ resolution: 0.703913007855028
31
+ },
32
+ {
33
+ level: "2",
34
+ scale: 147914381897889e-6,
35
+ resolution: 0.35195650392751515
36
+ },
37
+ {
38
+ level: "3",
39
+ scale: 7395719094894399e-8,
40
+ resolution: 0.17597825196375638
41
+ },
42
+ {
43
+ level: "4",
44
+ scale: 36978595474471994e-9,
45
+ resolution: 0.08798912598187819
46
+ },
47
+ {
48
+ level: "5",
49
+ scale: 18489297737235997e-9,
50
+ resolution: 0.043994562990939096
51
+ },
52
+ {
53
+ level: "6",
54
+ scale: 9244648868617998e-9,
55
+ resolution: 0.021997281495469548
56
+ },
57
+ {
58
+ level: "7",
59
+ scale: 4622324434308999e-9,
60
+ resolution: 0.010998640747734774
61
+ },
62
+ {
63
+ level: "8",
64
+ scale: 2311162217155e-6,
65
+ resolution: 0.005499320373868577
66
+ },
67
+ {
68
+ level: "9",
69
+ scale: 1155581108577e-6,
70
+ resolution: 0.0027496601869330985
71
+ },
72
+ {
73
+ level: "10",
74
+ scale: 577790.554289,
75
+ resolution: 0.001374830093467739
76
+ },
77
+ {
78
+ level: "11",
79
+ scale: 288895.277144,
80
+ resolution: 6874150467326798e-19
81
+ },
82
+ {
83
+ level: "12",
84
+ scale: 144447.638572,
85
+ resolution: 3437075233663399e-19
86
+ },
87
+ {
88
+ level: "13",
89
+ scale: 72223.819286,
90
+ resolution: 17185376168316996e-20
91
+ },
92
+ {
93
+ level: "14",
94
+ scale: 36111.909643,
95
+ resolution: 8592688084158498e-20
96
+ },
97
+ {
98
+ level: "15",
99
+ scale: 9027.99546661377,
100
+ resolution: 4296344042198222e-20
101
+ },
102
+ {
103
+ level: "16",
104
+ scale: 9027.977411,
105
+ resolution: 2148172021099111e-20
106
+ },
107
+ {
108
+ level: "17",
109
+ scale: 4513.988705,
110
+ resolution: 10740860104305824e-21
111
+ },
112
+ {
113
+ level: "18",
114
+ scale: 2256.994353,
115
+ resolution: 53704300533426425e-22
116
+ },
117
+ {
118
+ level: "19",
119
+ scale: 1128.497176,
120
+ resolution: 2685215025481591e-21
121
+ },
122
+ {
123
+ level: "20",
124
+ scale: 564.248588,
125
+ resolution: 13426075127407955e-22
126
+ },
127
+ {
128
+ level: "21",
129
+ scale: 282.124294,
130
+ resolution: 6713037563703978e-22
131
+ }
132
+ ]
133
+ }), super(e), this.urlTemplate = "", this.urlTemplate = e.urlTemplate;
11
134
  }
12
- getTileUrl(e, l, t) {
13
- return this.urlTemplate.replace("{level}", String(e)).replace("{col}", String(t)).replace("{row}", String(l));
135
+ getTileUrl(e, s, o) {
136
+ return this.urlTemplate.replace("{level}", String(e)).replace("{col}", String(o)).replace("{row}", String(s));
14
137
  }
15
138
  };
16
- u = f([
17
- a("CustomWMTS")
18
- ], u);
139
+ n = p([
140
+ u("CustomWMTS")
141
+ ], n);
19
142
  export {
20
- u as default
143
+ n as default
21
144
  };
@@ -0,0 +1,14 @@
1
+ import { IResult, IShowEdpassDeviceParams } from '../../types';
2
+ export default class EdpassDeviceController {
3
+ private view;
4
+ private cameraNormalLayer;
5
+ private cameraAbnormalLayer;
6
+ private kkNormalLayer;
7
+ private kkAbnormalLayer;
8
+ private mapInitializer;
9
+ private watchHandle;
10
+ constructor(view: __esri.MapView | __esri.SceneView);
11
+ setEdpassLayerVisibility(params: IShowEdpassDeviceParams): Promise<IResult>;
12
+ private getLayerConfig;
13
+ private showClusterInExtent;
14
+ }
@@ -0,0 +1,237 @@
1
+ import * as h from "@arcgis/core/core/reactiveUtils.js";
2
+ import d from "@arcgis/core/Graphic";
3
+ import o from "@arcgis/core/layers/GraphicsLayer";
4
+ import { toRaw as u } from "vue";
5
+ import v from "../stores/index.mjs";
6
+ class x {
7
+ constructor(e) {
8
+ this.watchHandle = null, this.view = e;
9
+ const t = v.useAppDataStore;
10
+ this.mapInitializer = u(t.mapInitializer), this.cameraNormalLayer = new o({
11
+ id: "cameraNormalLayer"
12
+ }), this.kkNormalLayer = new o({
13
+ id: "kkNormalLayer"
14
+ }), this.cameraAbnormalLayer = new o({
15
+ id: "cameraAbnormalLayer"
16
+ }), this.kkAbnormalLayer = new o({
17
+ id: "kkAbnormalLayer"
18
+ }), this.view.map.addMany([
19
+ this.cameraNormalLayer,
20
+ this.kkNormalLayer,
21
+ this.cameraAbnormalLayer,
22
+ this.kkAbnormalLayer
23
+ ]);
24
+ }
25
+ async setEdpassLayerVisibility(e) {
26
+ var t;
27
+ if (e.deviceType !== "camera" && e.deviceType !== "kk")
28
+ return { status: -1, message: "不支持的设备类型" };
29
+ switch (e.mode) {
30
+ case "scatter":
31
+ return this.mapInitializer.setLayerVisibility({
32
+ id: `${e.deviceType}-${e.deviceState}`,
33
+ visible: e.visible
34
+ });
35
+ case "cluster": {
36
+ const { deviceLayer: i } = this.getLayerConfig(e);
37
+ i.visible = e.visible, e.visible ? (await this.showClusterInExtent(e, this.view.extent), this.watchHandle || (this.watchHandle = h.when(
38
+ () => this.view.stationary,
39
+ async () => {
40
+ this.cameraNormalLayer.visible && await this.showClusterInExtent(
41
+ {
42
+ deviceType: "camera",
43
+ deviceState: "normal",
44
+ mode: "cluster",
45
+ visible: !0
46
+ },
47
+ this.view.extent
48
+ ), this.cameraAbnormalLayer.visible && await this.showClusterInExtent(
49
+ {
50
+ deviceType: "camera",
51
+ deviceState: "abnormal",
52
+ mode: "cluster",
53
+ visible: !0
54
+ },
55
+ this.view.extent
56
+ ), this.kkNormalLayer.visible && await this.showClusterInExtent(
57
+ {
58
+ deviceType: "kk",
59
+ deviceState: "normal",
60
+ mode: "cluster",
61
+ visible: !0
62
+ },
63
+ this.view.extent
64
+ ), this.kkAbnormalLayer.visible && await this.showClusterInExtent(
65
+ {
66
+ deviceType: "kk",
67
+ deviceState: "abnormal",
68
+ mode: "cluster",
69
+ visible: !0
70
+ },
71
+ this.view.extent
72
+ );
73
+ }
74
+ ))) : (i.removeAll(), !this.cameraNormalLayer.visible && !this.cameraAbnormalLayer.visible && !this.kkNormalLayer.visible && !this.kkAbnormalLayer.visible && ((t = this.watchHandle) == null || t.remove(), this.watchHandle = null));
75
+ break;
76
+ }
77
+ }
78
+ return {
79
+ status: 0,
80
+ message: "Success"
81
+ };
82
+ }
83
+ getLayerConfig(e) {
84
+ let t, i, r;
85
+ return e.deviceType === "camera" ? e.deviceState === "normal" ? (t = "/GisViewerAssets/Images/gis/gis_sxj_map.png", i = [45, 108, 196], r = this.cameraNormalLayer) : (t = "/GisViewerAssets/Images/gis/gis_sxj_yc.png", i = [189, 49, 50], r = this.cameraAbnormalLayer) : e.deviceState === "normal" ? (t = "/GisViewerAssets/Images/gis/gis_kk_map.png", i = [45, 108, 196], r = this.kkNormalLayer) : (t = "/GisViewerAssets/Images/gis/gis_kk_yc.png", i = [189, 49, 50], r = this.kkAbnormalLayer), {
86
+ icon: t,
87
+ color: i,
88
+ deviceLayer: r
89
+ };
90
+ }
91
+ async showClusterInExtent(e, t) {
92
+ console.time("request");
93
+ const i = await fetch("/es/queryGeoAggregation", {
94
+ method: "POST",
95
+ headers: {
96
+ "Content-Type": "application/json"
97
+ },
98
+ body: JSON.stringify({
99
+ deviceType: e.deviceType,
100
+ topLeftLat: t.ymax,
101
+ topLeftLon: t.xmin,
102
+ bottomRightLat: t.ymin,
103
+ bottomRightLon: t.xmax,
104
+ devStateSet: [e.deviceState === "normal" ? "1" : "2"],
105
+ // meter: Math.round(this.view.scale / 6)
106
+ mapLevel: this.view.zoom + 9
107
+ })
108
+ });
109
+ if (i.status !== 200) {
110
+ console.error(i.statusText);
111
+ return;
112
+ }
113
+ const r = await i.json();
114
+ if (r.code !== 200)
115
+ return;
116
+ console.timeEnd("request"), console.time("render");
117
+ const { icon: l, color: n, deviceLayer: c } = this.getLayerConfig(e);
118
+ c.removeAll();
119
+ const m = r.data.map((a, y) => {
120
+ const s = (a.count.toString().length * 6 + 6) / 2;
121
+ return new d({
122
+ geometry: {
123
+ type: "point",
124
+ x: a.lon,
125
+ y: a.lat
126
+ },
127
+ attributes: {
128
+ gid: y,
129
+ count: a.count
130
+ },
131
+ symbol: a.count > 1 ? {
132
+ type: "cim",
133
+ data: {
134
+ type: "CIMSymbolReference",
135
+ symbol: {
136
+ type: "CIMPointSymbol",
137
+ symbolLayers: [
138
+ // 聚合数量
139
+ {
140
+ type: "CIMVectorMarker",
141
+ size: 32,
142
+ colorLocked: !0,
143
+ anchorPointUnits: "Relative",
144
+ frame: { xmin: -16, ymin: -16, xmax: 16, ymax: 16 },
145
+ markerGraphics: [
146
+ // 数量文本框
147
+ {
148
+ type: "CIMMarkerGraphic",
149
+ geometry: {
150
+ rings: [
151
+ [
152
+ [-s, 30],
153
+ [s, 30],
154
+ [s, 15],
155
+ [-s, 15],
156
+ [-s, 30]
157
+ ]
158
+ ]
159
+ },
160
+ symbol: {
161
+ type: "CIMPolygonSymbol",
162
+ symbolLayers: [
163
+ {
164
+ type: "CIMSolidFill",
165
+ enable: !0,
166
+ color: n.concat([255])
167
+ },
168
+ {
169
+ type: "CIMSolidStroke",
170
+ enable: !0,
171
+ width: 3,
172
+ color: n.concat([128])
173
+ }
174
+ ]
175
+ }
176
+ },
177
+ // 数量文字
178
+ {
179
+ type: "CIMMarkerGraphic",
180
+ primitiveName: "textGraphic",
181
+ geometry: { x: 0, y: 0 },
182
+ symbol: {
183
+ type: "CIMTextSymbol",
184
+ fontFamilyName: "msyh",
185
+ height: 12,
186
+ horizontalAlignment: "Center",
187
+ offsetX: 0,
188
+ offsetY: 22,
189
+ symbol: {
190
+ type: "CIMPolygonSymbol",
191
+ symbolLayers: [
192
+ {
193
+ type: "CIMSolidFill",
194
+ enable: !0,
195
+ color: [255, 255, 255, 255]
196
+ }
197
+ ]
198
+ },
199
+ verticalAlignment: "Center"
200
+ },
201
+ textString: a.count.toString()
202
+ }
203
+ ],
204
+ scaleSymbolsProportionally: !0,
205
+ respectFrame: !0
206
+ },
207
+ // 聚合图标
208
+ {
209
+ type: "CIMPictureMarker",
210
+ enable: !0,
211
+ anchorPoint: {
212
+ x: 0,
213
+ y: 0
214
+ },
215
+ anchorPointUnits: "Relative",
216
+ size: 24,
217
+ rotateClockwise: !0,
218
+ textureFilter: "Picture",
219
+ url: l
220
+ }
221
+ ]
222
+ }
223
+ }
224
+ } : {
225
+ type: "picture-marker",
226
+ url: l,
227
+ width: 24,
228
+ height: 24
229
+ }
230
+ });
231
+ });
232
+ c.addMany(m), console.timeEnd("render");
233
+ }
234
+ }
235
+ export {
236
+ x as default
237
+ };
@@ -4,7 +4,7 @@ import * as g from "@arcgis/core/geometry/support/webMercatorUtils.js";
4
4
  import L from "@arcgis/core/Graphic";
5
5
  import b from "@arcgis/core/layers/GraphicsLayer";
6
6
  import M from "./signal-holo-flow.mjs";
7
- class v extends M {
7
+ class G extends M {
8
8
  constructor(e, o) {
9
9
  var s, n;
10
10
  super(e), this.waitingAreaLayer = new b(), this.watchHandle = null, this.trajectoryDelayTime = 2, this.stopLineMap = /* @__PURE__ */ new Map(), this.waitingAreaMap = /* @__PURE__ */ new Map(), this.lampGroupMap = /* @__PURE__ */ new Map(), this.countdownPanelProps = o, this.view.map.add(this.waitingAreaLayer), this.trajectoryDelayTime = (n = (s = this.mapConfig.holoFlow) == null ? void 0 : s.signal) == null ? void 0 : n.delay, this.trajectoryDelayTime === void 0 && (this.trajectoryDelayTime = 2);
@@ -207,7 +207,7 @@ class v extends M {
207
207
  const l = i.direction.toLowerCase(), c = i.color === 1 ? "red" : i.color === 2 ? "yellow" : "green";
208
208
  l === "u" ? (t.uNumber = i.leftTime, t.uColor = c) : l === "l" ? (t.lNumber = i.leftTime, t.lColor = c) : l === "s" ? (t.sNumber = i.leftTime, t.sColor = c) : l === "r" && (t.rNumber = i.leftTime, t.rColor = c);
209
209
  }
210
- this.updateLampGroupPanelStatus(o, a), s && this.updateWaitingArea(o, a);
210
+ this.updateLampGroupPanelStatus(o, a), s ? (this.updateWaitingArea(o, a), this.waitingAreaLayer.visible = !0) : this.waitingAreaLayer.visible = !1;
211
211
  }
212
212
  updateWaitingArea(e, o) {
213
213
  o.forEach((s, n) => {
@@ -332,5 +332,5 @@ class v extends M {
332
332
  }
333
333
  }
334
334
  export {
335
- v as default
335
+ G as default
336
336
  };
@@ -4,6 +4,7 @@ import { ILayerVisibleParams, ILookAtParams, IResult, ISetMapCameraParams, ISetM
4
4
  export default class MapInitializer {
5
5
  private view;
6
6
  private mapConfig;
7
+ private processUrl;
7
8
  /**
8
9
  * 初始化地图
9
10
  * @param params 容器