gisviewer-vue3-arcgis 1.0.166 → 1.0.168
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.
- package/es/src/gis-map/gis-map.vue.d.ts +24 -4
- package/es/src/gis-map/gis-map.vue.mjs +144 -138
- package/es/src/gis-map/index.d.ts +24 -4
- package/es/src/gis-map/utils/common-utils.mjs +9 -9
- package/es/src/gis-map/utils/holo-flow/index.mjs +37 -36
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +17 -1
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.mjs +2 -2
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.mjs +41 -39
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +3 -0
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.mjs +117 -71
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow.mjs +6 -5
- package/es/src/gis-map/utils/holo-flow/trace-renderer-external.d.ts +2 -1
- package/es/src/gis-map/utils/holo-flow/trace-renderer-external.mjs +10 -9
- package/es/src/gis-map/utils/holo-flow/trace-renderer-layer.mjs +6 -5
- package/es/src/gis-map/utils/map-initializer.d.ts +1 -0
- package/es/src/gis-map/utils/map-initializer.mjs +121 -122
- package/es/src/gis-map/utils/signal-control-area-controller/index.d.ts +3 -1
- package/es/src/gis-map/utils/signal-control-area-controller/index.mjs +169 -67
- package/es/src/types/index.d.ts +2 -0
- package/es/style.css +1 -1
- package/lib/src/gis-map/gis-map.vue.d.ts +24 -4
- package/lib/src/gis-map/gis-map.vue.js +1 -1
- package/lib/src/gis-map/index.d.ts +24 -4
- package/lib/src/gis-map/utils/common-utils.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/index.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +17 -1
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +3 -0
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/trace-renderer-external.d.ts +2 -1
- package/lib/src/gis-map/utils/holo-flow/trace-renderer-external.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/trace-renderer-layer.js +1 -1
- package/lib/src/gis-map/utils/map-initializer.d.ts +1 -0
- package/lib/src/gis-map/utils/map-initializer.js +1 -1
- package/lib/src/gis-map/utils/signal-control-area-controller/index.d.ts +3 -1
- package/lib/src/gis-map/utils/signal-control-area-controller/index.js +1 -1
- package/lib/src/types/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import c from "@arcgis/core/Graphic";
|
|
2
2
|
import p from "@arcgis/core/layers/GraphicsLayer";
|
|
3
|
-
import m from "
|
|
4
|
-
|
|
3
|
+
import { toRaw as m } from "vue";
|
|
4
|
+
import g from "../../stores/index.mjs";
|
|
5
|
+
class M {
|
|
5
6
|
constructor(i) {
|
|
6
|
-
this.appDataStore =
|
|
7
|
+
this.appDataStore = g.useAppDataStore, this.logTable = [
|
|
7
8
|
[
|
|
8
9
|
"uuid",
|
|
9
10
|
"ptcId",
|
|
@@ -29,7 +30,7 @@ class f {
|
|
|
29
30
|
"step",
|
|
30
31
|
"receiveTimestamp"
|
|
31
32
|
]
|
|
32
|
-
], this.needInterpolate = !0, this.isPaused = !1, this.showVehiclePlate = !1, this.showGroundVehicle = !0, this.showElevatedVehicle = !0, this.historyPositionMap = /* @__PURE__ */ new Map(), this.vehicleObjectMap = /* @__PURE__ */ new Map(), this.view = i, this.mapConfig =
|
|
33
|
+
], this.needInterpolate = !0, this.isPaused = !1, this.showVehiclePlate = !1, this.showGroundVehicle = !0, this.showElevatedVehicle = !0, this.historyPositionMap = /* @__PURE__ */ new Map(), this.vehicleObjectMap = /* @__PURE__ */ new Map(), this.view = i, this.mapConfig = m(this.appDataStore.mapConfig), this.vehicleLayer = new p({
|
|
33
34
|
id: "vehicleLayer"
|
|
34
35
|
}), this.view.map.add(this.vehicleLayer), this.rafSignal = requestAnimationFrame(() => this.render());
|
|
35
36
|
}
|
|
@@ -350,5 +351,5 @@ class f {
|
|
|
350
351
|
}
|
|
351
352
|
}
|
|
352
353
|
export {
|
|
353
|
-
|
|
354
|
+
M as default
|
|
354
355
|
};
|
|
@@ -11,6 +11,7 @@ export default class MapInitializer {
|
|
|
11
11
|
*/
|
|
12
12
|
initialize(params: {
|
|
13
13
|
container: HTMLElement;
|
|
14
|
+
mapConfig: any;
|
|
14
15
|
markerClickCallback?: (type: string, id: string, detail: any, event?: any) => void;
|
|
15
16
|
mapClickCallback?: (mapPoint: number[], screenPoint: number[], event?: any) => void;
|
|
16
17
|
}): Promise<MapView | SceneView>;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import * as
|
|
4
|
-
import { Polygon as
|
|
5
|
-
import * as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import * as
|
|
15
|
-
import G from "../stores/index.mjs";
|
|
1
|
+
import C from "@arcgis/core/Basemap";
|
|
2
|
+
import d from "@arcgis/core/config";
|
|
3
|
+
import * as k from "@arcgis/core/core/reactiveUtils";
|
|
4
|
+
import { Polygon as W, Polyline as z, Point as T } from "@arcgis/core/geometry";
|
|
5
|
+
import * as w from "@arcgis/core/geometry/support/webMercatorUtils";
|
|
6
|
+
import L from "@arcgis/core/layers/GeoJSONLayer";
|
|
7
|
+
import x from "@arcgis/core/layers/MapImageLayer";
|
|
8
|
+
import I from "@arcgis/core/layers/TileLayer";
|
|
9
|
+
import R from "@arcgis/core/layers/WebTileLayer";
|
|
10
|
+
import H from "@arcgis/core/Map";
|
|
11
|
+
import G from "@arcgis/core/views/MapView";
|
|
12
|
+
import O from "@arcgis/core/views/SceneView";
|
|
13
|
+
import S from "@turf/destination";
|
|
14
|
+
import * as B from "@turf/helpers";
|
|
16
15
|
import N from "./custom-layer/custom-wmts-layer.mjs";
|
|
17
|
-
function
|
|
16
|
+
function P(h, e) {
|
|
18
17
|
return h && (h.startsWith("http://") || h.startsWith("https://") ? h : e + h);
|
|
19
18
|
}
|
|
20
19
|
class Z {
|
|
@@ -27,25 +26,25 @@ class Z {
|
|
|
27
26
|
* @returns view
|
|
28
27
|
*/
|
|
29
28
|
async initialize(e) {
|
|
30
|
-
|
|
31
|
-
this.mapConfig =
|
|
32
|
-
const { container:
|
|
33
|
-
|
|
34
|
-
const n = new
|
|
35
|
-
if ((
|
|
29
|
+
var p, u, b, v;
|
|
30
|
+
this.mapConfig = e.mapConfig;
|
|
31
|
+
const { container: t, markerClickCallback: s, mapClickCallback: a } = e;
|
|
32
|
+
d.assetsPath = `${this.mapConfig.assetsRoot}/ArcgisAssets`, d.fontsUrl = `${this.mapConfig.assetsRoot}/fonts`, d.apiKey = "AAPKf5a3e1044d7a4faeb3b1ec7060f5c68equIrP2KbRyL-t_b40Kk4GTWUQ1BFCyttvyQPQnWpFmBd7kp9gkrVihjfmcKBwxjW";
|
|
33
|
+
const n = new H();
|
|
34
|
+
if (((p = this.mapConfig) == null ? void 0 : p.mapOptions.mode.toLowerCase()) === "2d" ? this.view = new G({
|
|
36
35
|
map: n,
|
|
37
|
-
container:
|
|
38
|
-
...
|
|
39
|
-
}) : this.view = new
|
|
36
|
+
container: t,
|
|
37
|
+
...this.mapConfig.mapOptions
|
|
38
|
+
}) : this.view = new O({
|
|
40
39
|
map: n,
|
|
41
|
-
container:
|
|
40
|
+
container: t,
|
|
42
41
|
environment: {
|
|
43
42
|
atmosphereEnabled: !0,
|
|
44
43
|
lighting: {
|
|
45
44
|
type: "virtual"
|
|
46
45
|
}
|
|
47
46
|
},
|
|
48
|
-
...
|
|
47
|
+
...(u = this.mapConfig) == null ? void 0 : u.mapOptions
|
|
49
48
|
}), this.view.popup.visibleElements = {
|
|
50
49
|
closeButton: !0,
|
|
51
50
|
collapseButton: !1,
|
|
@@ -54,35 +53,35 @@ class Z {
|
|
|
54
53
|
}, this.view.popup.dockOptions = {
|
|
55
54
|
buttonEnabled: !1,
|
|
56
55
|
breakpoint: !1
|
|
57
|
-
}, this.view.on("click", async (
|
|
58
|
-
var
|
|
59
|
-
if (
|
|
60
|
-
let o =
|
|
61
|
-
o.spatialReference.isWebMercator && (o =
|
|
56
|
+
}, this.view.on("click", async (i) => {
|
|
57
|
+
var y, M;
|
|
58
|
+
if (a) {
|
|
59
|
+
let o = i.mapPoint;
|
|
60
|
+
o.spatialReference.isWebMercator && (o = w.webMercatorToGeographic(
|
|
62
61
|
o
|
|
63
|
-
)),
|
|
62
|
+
)), a(
|
|
64
63
|
[o.x, o.y],
|
|
65
|
-
[
|
|
66
|
-
|
|
64
|
+
[i.screenPoint.x, i.screenPoint.y],
|
|
65
|
+
i
|
|
67
66
|
);
|
|
68
67
|
}
|
|
69
68
|
if (this.view.type === "3d") {
|
|
70
69
|
const o = this.view.camera;
|
|
71
70
|
if (this.view.spatialReference.isWebMercator) {
|
|
72
|
-
const
|
|
71
|
+
const m = w.webMercatorToGeographic(
|
|
73
72
|
o.position
|
|
74
|
-
),
|
|
73
|
+
), f = {
|
|
75
74
|
heading: o.heading,
|
|
76
75
|
tilt: o.tilt,
|
|
77
|
-
position:
|
|
76
|
+
position: m.toJSON()
|
|
78
77
|
};
|
|
79
|
-
console.log(
|
|
78
|
+
console.log(f), (y = navigator.clipboard) == null || y.writeText(JSON.stringify(f));
|
|
80
79
|
} else
|
|
81
80
|
console.log(o.toJSON());
|
|
82
81
|
console.log(this.view.zoom, this.view.scale);
|
|
83
82
|
} else {
|
|
84
83
|
let o = this.view.center;
|
|
85
|
-
this.view.spatialReference.isWebMercator && (o =
|
|
84
|
+
this.view.spatialReference.isWebMercator && (o = w.webMercatorToGeographic(
|
|
86
85
|
o
|
|
87
86
|
)), console.log({
|
|
88
87
|
center: o.toJSON(),
|
|
@@ -90,101 +89,101 @@ class Z {
|
|
|
90
89
|
scale: this.view.scale
|
|
91
90
|
});
|
|
92
91
|
}
|
|
93
|
-
const r = (
|
|
92
|
+
const r = (M = (await this.view.hitTest(i)).results) == null ? void 0 : M.filter(
|
|
94
93
|
(o) => o.type === "graphic"
|
|
95
94
|
);
|
|
96
95
|
r.length > 0 && r.forEach((o) => {
|
|
97
|
-
var
|
|
98
|
-
const
|
|
99
|
-
(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
96
|
+
var f;
|
|
97
|
+
const m = o.graphic;
|
|
98
|
+
(f = m.attributes) != null && f.type && s && s(
|
|
99
|
+
m.attributes.type,
|
|
100
|
+
m.attributes.id,
|
|
101
|
+
m.attributes,
|
|
102
|
+
i
|
|
104
103
|
);
|
|
105
104
|
});
|
|
106
|
-
}),
|
|
107
|
-
const
|
|
108
|
-
switch (
|
|
105
|
+
}), (b = this.mapConfig) != null && b.baseLayers ? this.mapConfig.baseLayers.forEach((i) => {
|
|
106
|
+
const c = P(i.url, this.mapConfig.assetsRoot);
|
|
107
|
+
switch (i.type.toLowerCase()) {
|
|
109
108
|
case "webTile".toLowerCase(): {
|
|
110
|
-
const r = new
|
|
111
|
-
urlTemplate:
|
|
112
|
-
...
|
|
109
|
+
const r = new R({
|
|
110
|
+
urlTemplate: c,
|
|
111
|
+
...i.options
|
|
113
112
|
});
|
|
114
113
|
n.add(r);
|
|
115
114
|
break;
|
|
116
115
|
}
|
|
117
116
|
case "tile": {
|
|
118
|
-
const r = new
|
|
119
|
-
url:
|
|
120
|
-
...
|
|
117
|
+
const r = new I({
|
|
118
|
+
url: c,
|
|
119
|
+
...i.options
|
|
121
120
|
});
|
|
122
121
|
n.add(r);
|
|
123
122
|
break;
|
|
124
123
|
}
|
|
125
124
|
case "customWMTS".toLowerCase(): {
|
|
126
125
|
const r = new N({
|
|
127
|
-
urlTemplate:
|
|
128
|
-
...
|
|
126
|
+
urlTemplate: c,
|
|
127
|
+
...i.options
|
|
129
128
|
});
|
|
130
129
|
n.add(r);
|
|
131
130
|
break;
|
|
132
131
|
}
|
|
133
132
|
case "mapImage".toLowerCase(): {
|
|
134
|
-
const r = new
|
|
135
|
-
url:
|
|
136
|
-
...
|
|
133
|
+
const r = new x({
|
|
134
|
+
url: c,
|
|
135
|
+
...i.options
|
|
137
136
|
});
|
|
138
|
-
n.add(r)
|
|
137
|
+
n.add(r);
|
|
139
138
|
break;
|
|
140
139
|
}
|
|
141
140
|
case "arcgis": {
|
|
142
|
-
const r = new
|
|
141
|
+
const r = new C(i.options);
|
|
143
142
|
n.basemap = r;
|
|
144
143
|
break;
|
|
145
144
|
}
|
|
146
145
|
}
|
|
147
|
-
})
|
|
146
|
+
}) : n.basemap = new C({
|
|
148
147
|
style: {
|
|
149
148
|
id: "arcgis/light-gray",
|
|
150
149
|
language: "zh-CN"
|
|
151
150
|
}
|
|
152
|
-
}),
|
|
153
|
-
const
|
|
154
|
-
(
|
|
151
|
+
}), (v = this.mapConfig) != null && v.hdLayers) {
|
|
152
|
+
const i = this.mapConfig.hdLayers.map(
|
|
153
|
+
(c) => (
|
|
155
154
|
// 图层文件为GeoJson格式, renderer和symbol使用autocast配置
|
|
156
|
-
new
|
|
157
|
-
url:
|
|
158
|
-
...
|
|
159
|
-
title:
|
|
155
|
+
new L({
|
|
156
|
+
url: P(c.url, this.mapConfig.assetsRoot),
|
|
157
|
+
...c.options,
|
|
158
|
+
title: c.options.id
|
|
160
159
|
})
|
|
161
160
|
)
|
|
162
161
|
);
|
|
163
|
-
n.addMany(
|
|
162
|
+
n.addMany(i);
|
|
164
163
|
}
|
|
165
|
-
this.view.ui.remove("attribution"),
|
|
166
|
-
const
|
|
167
|
-
let
|
|
164
|
+
this.view.ui.remove("attribution"), await this.view.when();
|
|
165
|
+
const g = this.mapConfig.camera;
|
|
166
|
+
let l;
|
|
168
167
|
if (this.view.type === "2d") {
|
|
169
|
-
let
|
|
170
|
-
this.view.spatialReference.isWebMercator && (
|
|
171
|
-
|
|
172
|
-
)),
|
|
168
|
+
let i = this.view.center;
|
|
169
|
+
this.view.spatialReference.isWebMercator && (i = w.webMercatorToGeographic(
|
|
170
|
+
i
|
|
171
|
+
)), l = { center: [i.x, i.y], zoom: this.view.zoom };
|
|
173
172
|
} else {
|
|
174
|
-
let
|
|
175
|
-
this.view.spatialReference.isWebMercator && (
|
|
176
|
-
|
|
177
|
-
)),
|
|
178
|
-
position:
|
|
173
|
+
let i = this.view.camera.position;
|
|
174
|
+
this.view.spatialReference.isWebMercator && (i = w.webMercatorToGeographic(
|
|
175
|
+
i
|
|
176
|
+
)), l = {
|
|
177
|
+
position: i,
|
|
179
178
|
heading: this.view.camera.heading,
|
|
180
179
|
tilt: this.view.camera.tilt
|
|
181
180
|
};
|
|
182
181
|
}
|
|
183
|
-
return
|
|
182
|
+
return g ? g.home = l : this.mapConfig.camera = { home: l }, this.view;
|
|
184
183
|
}
|
|
185
184
|
setLayerVisibility(e) {
|
|
186
|
-
const { id:
|
|
187
|
-
return a ? (a.visible =
|
|
185
|
+
const { id: t, visible: s } = e, a = this.view.map.findLayerById(t);
|
|
186
|
+
return a ? (a.visible = s, { status: 0, message: "ok" }) : { status: -1, message: "未找到图层" };
|
|
188
187
|
}
|
|
189
188
|
/**
|
|
190
189
|
* 设置地图中心点
|
|
@@ -192,19 +191,19 @@ class Z {
|
|
|
192
191
|
* @returns
|
|
193
192
|
*/
|
|
194
193
|
async setMapCenter(e) {
|
|
195
|
-
var
|
|
194
|
+
var t;
|
|
196
195
|
if (!this.view)
|
|
197
196
|
return { status: -1, message: "未初始化" };
|
|
198
197
|
if (e.center || e.target) {
|
|
199
|
-
switch ((
|
|
198
|
+
switch ((t = e.target) == null ? void 0 : t.type) {
|
|
200
199
|
case "point":
|
|
201
|
-
e.target = new
|
|
200
|
+
e.target = new T(e.target);
|
|
202
201
|
break;
|
|
203
202
|
case "polyline":
|
|
204
|
-
e.target = new
|
|
203
|
+
e.target = new z(e.target);
|
|
205
204
|
break;
|
|
206
205
|
case "polygon":
|
|
207
|
-
e.target = new
|
|
206
|
+
e.target = new W(e.target);
|
|
208
207
|
break;
|
|
209
208
|
}
|
|
210
209
|
await this.view.goTo(e, { duration: (e.duration || 0) * 1e3 });
|
|
@@ -217,8 +216,8 @@ class Z {
|
|
|
217
216
|
async lookAt(e) {
|
|
218
217
|
if (this.view.type === "2d")
|
|
219
218
|
return;
|
|
220
|
-
const
|
|
221
|
-
if (
|
|
219
|
+
const t = e.tilt || 0, s = e.heading || 0;
|
|
220
|
+
if (t === 0)
|
|
222
221
|
await this.view.goTo(
|
|
223
222
|
{
|
|
224
223
|
position: {
|
|
@@ -226,16 +225,16 @@ class Z {
|
|
|
226
225
|
y: e.center[1],
|
|
227
226
|
z: e.height
|
|
228
227
|
},
|
|
229
|
-
heading:
|
|
228
|
+
heading: s,
|
|
230
229
|
tilt: 0
|
|
231
230
|
},
|
|
232
231
|
{ duration: (e.duration || 2) * 1e3 }
|
|
233
232
|
);
|
|
234
233
|
else {
|
|
235
|
-
const a = Math.tan(
|
|
236
|
-
|
|
234
|
+
const a = Math.tan(t * Math.PI / 180) * e.height, n = S(
|
|
235
|
+
B.point(e.center),
|
|
237
236
|
a,
|
|
238
|
-
|
|
237
|
+
s + 180,
|
|
239
238
|
{
|
|
240
239
|
units: "meters"
|
|
241
240
|
}
|
|
@@ -243,12 +242,12 @@ class Z {
|
|
|
243
242
|
await this.view.goTo(
|
|
244
243
|
{
|
|
245
244
|
position: {
|
|
246
|
-
x:
|
|
247
|
-
y:
|
|
245
|
+
x: n.geometry.coordinates[0],
|
|
246
|
+
y: n.geometry.coordinates[1],
|
|
248
247
|
z: e.height
|
|
249
248
|
},
|
|
250
|
-
heading:
|
|
251
|
-
tilt:
|
|
249
|
+
heading: s,
|
|
250
|
+
tilt: t
|
|
252
251
|
},
|
|
253
252
|
{ duration: (e.duration || 2) * 1e3 }
|
|
254
253
|
);
|
|
@@ -257,32 +256,32 @@ class Z {
|
|
|
257
256
|
async setMapCamera(e) {
|
|
258
257
|
if (!this.view)
|
|
259
258
|
return { status: -1, message: "未初始化" };
|
|
260
|
-
const { name:
|
|
259
|
+
const { name: t, duration: s = 0 } = e, { camera: a } = this.mapConfig;
|
|
261
260
|
if (!a)
|
|
262
261
|
return { status: -1, message: "未配置camera" };
|
|
263
|
-
const
|
|
264
|
-
return
|
|
262
|
+
const n = a[t];
|
|
263
|
+
return n ? (await this.view.goTo(n, { duration: s * 1e3 }), { status: 0, message: "成功" }) : { status: -1, message: "未配置camera" };
|
|
265
264
|
}
|
|
266
265
|
/**
|
|
267
266
|
* 经纬度转像素坐标,在地图移动时回调
|
|
268
267
|
* */
|
|
269
|
-
requestCoordinateTransform(e,
|
|
270
|
-
let
|
|
271
|
-
const
|
|
268
|
+
requestCoordinateTransform(e, t) {
|
|
269
|
+
let s = 0;
|
|
270
|
+
const n = 1e3 / 30, g = k.watch(
|
|
272
271
|
() => this.view.center,
|
|
273
272
|
() => {
|
|
274
|
-
const
|
|
275
|
-
|
|
273
|
+
const l = this.transformPoints(e), p = Date.now();
|
|
274
|
+
p - s > n && (t(l), s = p);
|
|
276
275
|
}
|
|
277
276
|
);
|
|
278
|
-
return this.handleIndex++, this.watchHandleMap.set(this.handleIndex,
|
|
277
|
+
return this.handleIndex++, this.watchHandleMap.set(this.handleIndex, g), { handle: this.handleIndex, points: this.transformPoints(e) };
|
|
279
278
|
}
|
|
280
279
|
transformPoints(e) {
|
|
281
|
-
return e.map((
|
|
282
|
-
const
|
|
283
|
-
x:
|
|
284
|
-
y:
|
|
285
|
-
}), a = this.view.toScreen(
|
|
280
|
+
return e.map((t) => {
|
|
281
|
+
const s = new T({
|
|
282
|
+
x: t[0],
|
|
283
|
+
y: t[1]
|
|
284
|
+
}), a = this.view.toScreen(s);
|
|
286
285
|
return [a.x, a.y];
|
|
287
286
|
});
|
|
288
287
|
}
|
|
@@ -290,18 +289,18 @@ class Z {
|
|
|
290
289
|
* 停止坐标转换回调
|
|
291
290
|
* */
|
|
292
291
|
cancelCoordinateTransform(e) {
|
|
293
|
-
const
|
|
294
|
-
|
|
292
|
+
const t = this.watchHandleMap.get(e);
|
|
293
|
+
t && (t.remove(), this.watchHandleMap.delete(e));
|
|
295
294
|
}
|
|
296
295
|
/**
|
|
297
296
|
* 设置地图zoom范围
|
|
298
297
|
* */
|
|
299
298
|
setMapZoomRange(e) {
|
|
300
|
-
const { min:
|
|
301
|
-
!
|
|
299
|
+
const { min: t, max: s } = e;
|
|
300
|
+
!t && !s || (this.zoomWatchHandle && this.zoomWatchHandle.remove(), this.zoomWatchHandle = k.watch(
|
|
302
301
|
() => this.view.zoom,
|
|
303
302
|
(a) => {
|
|
304
|
-
|
|
303
|
+
t && a <= t && (this.view.zoom = t), s && a >= s && (this.view.zoom = s);
|
|
305
304
|
}
|
|
306
305
|
));
|
|
307
306
|
}
|
|
@@ -13,11 +13,12 @@ export default class SignalControlAreaController {
|
|
|
13
13
|
locateSignalControlArea(params: {
|
|
14
14
|
id: string;
|
|
15
15
|
}): Promise<IResult>;
|
|
16
|
-
private showPopup;
|
|
17
16
|
highlightSignalControlArea(params: {
|
|
18
17
|
id: string;
|
|
19
18
|
}): Promise<IResult>;
|
|
20
19
|
resetHighlight(): IResult;
|
|
20
|
+
showSubSignalControlArea(params: any): IResult;
|
|
21
|
+
editSubSignalArea(): IResult;
|
|
21
22
|
/**
|
|
22
23
|
* 在区控\子区\路口图层中查找对应的graphic
|
|
23
24
|
* @param id
|
|
@@ -31,6 +32,7 @@ export default class SignalControlAreaController {
|
|
|
31
32
|
* @returns
|
|
32
33
|
*/
|
|
33
34
|
private drawArea;
|
|
35
|
+
private getCrossGraphicInSubDistrict;
|
|
34
36
|
/**
|
|
35
37
|
* 生成路口点符号。在不同比例尺下,使用不同的符号
|
|
36
38
|
* @param attributes
|