@vcmap/viewshed 2.0.10 → 3.0.1
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/CHANGELOG.md +7 -0
- package/README.md +16 -1
- package/dist/index.js +1184 -774
- package/package.json +13 -13
- package/src/ViewshedConfigEditor.vue +6 -9
- package/src/ViewshedWindow.vue +42 -22
- package/src/index.js +54 -26
- package/src/util/toolboxHelper.js +6 -6
- package/src/util/windowHelper.js +1 -4
- package/src/viewshed.js +2 -1
- package/src/viewshedCategory.js +2 -2
package/dist/index.js
CHANGED
|
@@ -1,244 +1,234 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { VcsCameraPrimitive as
|
|
5
|
-
import { Color as
|
|
6
|
-
import { shallowRef as
|
|
7
|
-
import { ol$Observable$unByKey as
|
|
8
|
-
import { VcsTextField as
|
|
9
|
-
import { VContainer as
|
|
10
|
-
const
|
|
1
|
+
var Oe = Object.defineProperty;
|
|
2
|
+
var Ie = (i, t, o) => t in i ? Oe(i, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : i[t] = o;
|
|
3
|
+
var de = (i, t, o) => Ie(i, typeof t != "symbol" ? t + "" : t, o);
|
|
4
|
+
import { VcsCameraPrimitive as Pe, VcsObject as Ae, VcsEvent as Y, AbstractInteraction as Re, EventType as K, Projection as H, SessionType as Ne, CesiumMap as G, startEditFeaturesSession as De, startEditGeometrySession as xe, VectorLayer as ke, wgs84Projection as Le, maxZIndex as Fe, markVolatile as je, Viewpoint as We, TransformationMode as Be, Category as Ue, moduleIdSymbol as $e } from "../../../assets/core.js";
|
|
5
|
+
import { Color as Z, Matrix4 as He, Transforms as ze, Primitive as ce, GeometryInstance as ue, SphereGeometry as Ge, ColorGeometryInstanceAttribute as he, PerInstanceColorAppearance as fe, SphereOutlineGeometry as Ke, Math as k, Cartesian3 as W, ShadowMap as Ye, Camera as Xe, HeightReference as Je } from "../../../assets/cesium.js";
|
|
6
|
+
import { shallowRef as te, ref as U, nextTick as Ze, inject as me, computed as ve, reactive as q, watchEffect as qe, watch as z, onMounted as Qe, onUnmounted as et, resolveComponent as b, openBlock as M, createElementBlock as B, createBlock as D, withCtx as f, createTextVNode as F, toDisplayString as A, createCommentVNode as $, createVNode as m, createElementVNode as tt, Fragment as pe, renderList as we, mergeProps as it } from "../../../assets/vue.js";
|
|
7
|
+
import { ol$Observable$unByKey as ot, Feature as st, ol$geom$Point as nt, ol$style$Style as at } from "../../../assets/ol.js";
|
|
8
|
+
import { VcsTextField as rt, VcsSlider as lt, VcsLabel as _e, VcsFormSection as Ce, VcsSelect as Ee, VcsFormButton as dt, VcsFeatureTransforms as ct, VcsHelp as ut, makeEditorCollectionComponentClass as ht, WindowSlot as ft, ToolboxType as mt, createSupportedMapMappingFunction as vt, createListExportAction as pt, downloadText as wt, createListImportAction as gt, NotificationType as X, AbstractConfigEditor as _t } from "../../../assets/ui.js";
|
|
9
|
+
import { VContainer as ye, VRow as Ve, VCol as be, VDivider as Ct, VColorPicker as Et } from "../../../assets/vuetify.js";
|
|
10
|
+
const Me = Symbol("isMatcher"), yt = Symbol("Integer"), Vt = Symbol("NonEmptyString"), ae = /* @__PURE__ */ new Map();
|
|
11
|
+
[
|
|
11
12
|
[String, "string"],
|
|
12
13
|
[Number, "number"],
|
|
13
14
|
[Boolean, "boolean"],
|
|
14
15
|
[Function, "function"],
|
|
15
16
|
[void 0, "undefined"],
|
|
16
17
|
[Symbol, "symbol"]
|
|
17
|
-
]
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
].forEach(([i, t]) => {
|
|
19
|
+
ae.set(i, t);
|
|
20
|
+
});
|
|
21
|
+
function bt(i) {
|
|
22
|
+
return i == null ? void 0 : i[Me];
|
|
23
|
+
}
|
|
24
|
+
function ie(i) {
|
|
25
|
+
if (!i || String(i) !== "[object Object]")
|
|
21
26
|
return !1;
|
|
22
|
-
const
|
|
23
|
-
if (!
|
|
27
|
+
const t = Object.getPrototypeOf(i);
|
|
28
|
+
if (!t)
|
|
24
29
|
return !0;
|
|
25
|
-
const
|
|
26
|
-
return typeof
|
|
30
|
+
const e = {}.hasOwnProperty.call(t, "constructor") && t.constructor;
|
|
31
|
+
return typeof e == "function" && String(e) === String(Object);
|
|
27
32
|
}
|
|
28
|
-
function
|
|
29
|
-
if (
|
|
33
|
+
function R(i, t) {
|
|
34
|
+
if (i === null)
|
|
30
35
|
return "null";
|
|
31
|
-
if (typeof
|
|
36
|
+
if (typeof i > "u")
|
|
32
37
|
return "undefined";
|
|
33
|
-
if (
|
|
34
|
-
return typeof
|
|
35
|
-
let
|
|
36
|
-
if (Array.isArray(
|
|
37
|
-
|
|
38
|
+
if (t)
|
|
39
|
+
return typeof i;
|
|
40
|
+
let o;
|
|
41
|
+
if (Array.isArray(i))
|
|
42
|
+
o = `[${i.map((s) => R(s, t)).join(",")}]`;
|
|
38
43
|
else
|
|
39
44
|
try {
|
|
40
|
-
|
|
45
|
+
o = JSON.stringify(i);
|
|
41
46
|
} catch {
|
|
42
|
-
|
|
47
|
+
o = typeof i;
|
|
43
48
|
}
|
|
44
|
-
return
|
|
49
|
+
return o = o || typeof i, o.length > 20 ? `${o.substring(0, 20)}...` : o;
|
|
45
50
|
}
|
|
46
|
-
function
|
|
47
|
-
return typeof
|
|
51
|
+
function Mt(i, t) {
|
|
52
|
+
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || typeof t == "symbol" ? i === t ? !1 : `Expected ${R(i)} to equal ${t.toString()}` : null;
|
|
48
53
|
}
|
|
49
|
-
function
|
|
50
|
-
if (Array.isArray(
|
|
51
|
-
if (
|
|
52
|
-
throw new Error("Array patterns may only have
|
|
53
|
-
if (Array.isArray(
|
|
54
|
-
let
|
|
55
|
-
return
|
|
56
|
-
try {
|
|
57
|
-
H(n, e[0], i);
|
|
58
|
-
} catch (l) {
|
|
59
|
-
t = l.message.replace(/Match failed:\s/, "");
|
|
60
|
-
}
|
|
61
|
-
return t;
|
|
62
|
-
}) > -1 ? `${t} in ${M(s)}` : !1;
|
|
54
|
+
function Tt(i, t, o) {
|
|
55
|
+
if (Array.isArray(t)) {
|
|
56
|
+
if (t.length !== 1)
|
|
57
|
+
throw new Error("Array patterns may only have one type");
|
|
58
|
+
if (Array.isArray(i)) {
|
|
59
|
+
let e = !1;
|
|
60
|
+
return i.findIndex((n) => (e = o(n, t[0]), e)) > -1 ? `${String(e)} in ${R(i)}` : !1;
|
|
63
61
|
}
|
|
64
|
-
return `Expected ${
|
|
62
|
+
return `Expected ${R(i)} to be an Array`;
|
|
65
63
|
}
|
|
66
64
|
return null;
|
|
67
65
|
}
|
|
68
|
-
function
|
|
69
|
-
const
|
|
70
|
-
if (!
|
|
71
|
-
return `Expected ${
|
|
72
|
-
let
|
|
73
|
-
const l = Object.keys(
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
n = Y(r, e[c], t + c);
|
|
77
|
-
else
|
|
78
|
-
try {
|
|
79
|
-
H(r, e[c]);
|
|
80
|
-
} catch (f) {
|
|
81
|
-
n = f.message.replace(/Match failed:\s/, "");
|
|
82
|
-
}
|
|
83
|
-
return n;
|
|
66
|
+
function oe(i, t, o, e) {
|
|
67
|
+
const s = e ? `${e}.` : "";
|
|
68
|
+
if (!ie(i))
|
|
69
|
+
return `Expected ${R(i)} to be a plain Object`;
|
|
70
|
+
let d = !1;
|
|
71
|
+
const l = Object.keys(t).find((c) => {
|
|
72
|
+
const C = i[c];
|
|
73
|
+
return ie(t[c]) ? d = oe(C, t[c], o, s + c) : d = o(C, t[c]), d;
|
|
84
74
|
});
|
|
85
|
-
return l ? `${
|
|
75
|
+
return l ? `${String(d)} in object.${s}${l}` : !1;
|
|
86
76
|
}
|
|
87
|
-
function
|
|
88
|
-
if (
|
|
89
|
-
return Number.isFinite(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
77
|
+
function St(i, t) {
|
|
78
|
+
if (t === Number)
|
|
79
|
+
return Number.isFinite(i) ? !1 : `expected ${R(i)} to be a number, excluding NaN`;
|
|
80
|
+
if (t === yt)
|
|
81
|
+
return Number.isInteger(i) ? !1 : `expected ${R(i)} to be an integer number`;
|
|
82
|
+
if (t === Vt)
|
|
83
|
+
return typeof i == "string" && i.length > 0 ? !1 : `expected ${R(i)} to be a non-empty string`;
|
|
84
|
+
const o = ae.get(t);
|
|
85
|
+
return o ? typeof i === o ? !1 : `expected ${R(i)} to be a ${String(o)}` : null;
|
|
94
86
|
}
|
|
95
|
-
function
|
|
96
|
-
if (
|
|
87
|
+
function Te(i) {
|
|
88
|
+
if (i === null)
|
|
97
89
|
return "null";
|
|
98
|
-
const
|
|
99
|
-
if (
|
|
100
|
-
return
|
|
101
|
-
|
|
102
|
-
if (
|
|
103
|
-
return
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
90
|
+
const t = ae.get(i);
|
|
91
|
+
if (t)
|
|
92
|
+
return t;
|
|
93
|
+
const o = i == null ? void 0 : i.className;
|
|
94
|
+
if (o)
|
|
95
|
+
return o;
|
|
96
|
+
let e = String(i);
|
|
97
|
+
const s = e.match(/function (.*)\(/);
|
|
98
|
+
if (s && s.length > 1) {
|
|
99
|
+
const n = i == null ? void 0 : i.name;
|
|
100
|
+
return n || s[1].substring(0, 20);
|
|
101
|
+
}
|
|
102
|
+
if (ie(i)) {
|
|
103
|
+
const n = {};
|
|
104
|
+
Object.keys(i).forEach((d) => {
|
|
105
|
+
n[d] = Te(i[d]);
|
|
111
106
|
});
|
|
112
107
|
try {
|
|
113
|
-
|
|
108
|
+
e = `Object of ${JSON.stringify(n)}`;
|
|
114
109
|
} catch {
|
|
115
|
-
|
|
110
|
+
e = "Object";
|
|
116
111
|
}
|
|
117
112
|
}
|
|
118
|
-
return
|
|
113
|
+
return e;
|
|
119
114
|
}
|
|
120
|
-
function
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
if (
|
|
135
|
-
return
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
return lt(l, c, i);
|
|
144
|
-
if (c instanceof Function)
|
|
145
|
-
return l instanceof c ? !1 : `Expected ${M(l, !0)} to be of Type ${J(c)}`;
|
|
146
|
-
if (c === Object)
|
|
147
|
-
return Y(l, {});
|
|
148
|
-
if (typeof c != "object")
|
|
149
|
-
throw new Error(`Cannot handler pattern ${c}`);
|
|
150
|
-
const h = Y(l, c);
|
|
151
|
-
return h || (i ? ve(l, c) : !1);
|
|
115
|
+
function Ot(i, t) {
|
|
116
|
+
const o = (e, s) => {
|
|
117
|
+
if (bt(s))
|
|
118
|
+
return s(e);
|
|
119
|
+
if (s == null)
|
|
120
|
+
return e === s ? !1 : `Expected ${R(e)} to be ${String(s)}`;
|
|
121
|
+
const n = St(e, s);
|
|
122
|
+
if (n !== null)
|
|
123
|
+
return n;
|
|
124
|
+
const d = Mt(e, s);
|
|
125
|
+
if (d !== null)
|
|
126
|
+
return d;
|
|
127
|
+
if (Array.isArray(s))
|
|
128
|
+
return Tt(e, s, o);
|
|
129
|
+
if (s === Object)
|
|
130
|
+
return oe(e, {}, o);
|
|
131
|
+
if (s instanceof Function)
|
|
132
|
+
return e instanceof s ? !1 : `Expected ${R(e, !0)} to be of Type ${Te(s)}`;
|
|
133
|
+
if (typeof s == "object") {
|
|
134
|
+
const l = oe(e, s, o);
|
|
135
|
+
return l || !1;
|
|
136
|
+
}
|
|
137
|
+
throw new Error(`Cannot handle pattern ${String(s)}`);
|
|
152
138
|
};
|
|
153
|
-
|
|
154
|
-
return Array.isArray(e) && e.length > 1 ? e.every((l) => t(s, l)) && (o = `Expected ${M(s)} to be a ${e.map((l) => J(l)).join(" or ")}`) : o = t(s, e), o;
|
|
139
|
+
return o(i, t);
|
|
155
140
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
141
|
+
let It = Error;
|
|
142
|
+
function re(i, t) {
|
|
143
|
+
const o = Ot(i, t);
|
|
144
|
+
if (o)
|
|
145
|
+
throw new It(`Match failed: ${o}`);
|
|
146
|
+
}
|
|
147
|
+
function Pt(i) {
|
|
148
|
+
re(i, Object);
|
|
149
|
+
const t = Object.values(i), o = (e) => t.includes(e) ? !1 : `expected ${R(e)} to be of enum: ${t.join(", ")}`;
|
|
150
|
+
return o[Me] = !0, o;
|
|
161
151
|
}
|
|
162
|
-
function
|
|
163
|
-
if (
|
|
164
|
-
const
|
|
165
|
-
if (
|
|
166
|
-
return
|
|
152
|
+
function At(i, t, o) {
|
|
153
|
+
if (i != null) {
|
|
154
|
+
const e = Object.values(t).find((s) => s == i);
|
|
155
|
+
if (e != null)
|
|
156
|
+
return e;
|
|
167
157
|
}
|
|
168
|
-
return
|
|
158
|
+
return o;
|
|
169
159
|
}
|
|
170
|
-
const
|
|
171
|
-
class
|
|
172
|
-
constructor(
|
|
173
|
-
super(
|
|
160
|
+
const Rt = new Z(), Q = new He();
|
|
161
|
+
class Nt extends Pe {
|
|
162
|
+
constructor(t) {
|
|
163
|
+
super(t), this.spot = t.spot;
|
|
174
164
|
}
|
|
175
165
|
/**
|
|
176
166
|
* Updates the camera primitive.
|
|
177
167
|
* @param {unknown} frameState
|
|
178
168
|
*/
|
|
179
|
-
update(
|
|
169
|
+
update(t) {
|
|
180
170
|
if (this.show)
|
|
181
171
|
if (this.spot)
|
|
182
|
-
super.update(
|
|
172
|
+
super.update(t);
|
|
183
173
|
else {
|
|
184
|
-
const
|
|
185
|
-
|
|
174
|
+
const o = this._planesPrimitives, e = this._outlinePrimitives;
|
|
175
|
+
o.length === 0 && (ze.eastNorthUpToFixedFrame(
|
|
186
176
|
this._camera.positionWC,
|
|
187
177
|
void 0,
|
|
188
|
-
|
|
189
|
-
),
|
|
178
|
+
Q
|
|
179
|
+
), o[0] = new ce({
|
|
190
180
|
allowPicking: this.allowPicking,
|
|
191
|
-
geometryInstances: new
|
|
192
|
-
geometry: new
|
|
181
|
+
geometryInstances: new ue({
|
|
182
|
+
geometry: new Ge({
|
|
193
183
|
radius: 2
|
|
194
184
|
}),
|
|
195
185
|
attributes: {
|
|
196
|
-
color:
|
|
197
|
-
|
|
186
|
+
color: he.fromColor(
|
|
187
|
+
Z.fromAlpha(this._color, 0.1, Rt)
|
|
198
188
|
)
|
|
199
189
|
},
|
|
200
|
-
modelMatrix:
|
|
190
|
+
modelMatrix: Q
|
|
201
191
|
}),
|
|
202
|
-
appearance: new
|
|
192
|
+
appearance: new fe({
|
|
203
193
|
translucent: !0,
|
|
204
194
|
flat: !0
|
|
205
195
|
}),
|
|
206
196
|
asynchronous: !1
|
|
207
|
-
}),
|
|
197
|
+
}), e[0] = new ce({
|
|
208
198
|
allowPicking: this.allowPicking,
|
|
209
|
-
geometryInstances: new
|
|
210
|
-
geometry: new
|
|
199
|
+
geometryInstances: new ue({
|
|
200
|
+
geometry: new Ke({
|
|
211
201
|
radius: 2
|
|
212
202
|
}),
|
|
213
203
|
attributes: {
|
|
214
|
-
color:
|
|
204
|
+
color: he.fromColor(this._color)
|
|
215
205
|
},
|
|
216
|
-
modelMatrix:
|
|
206
|
+
modelMatrix: Q
|
|
217
207
|
}),
|
|
218
|
-
appearance: new
|
|
208
|
+
appearance: new fe({
|
|
219
209
|
translucent: !1,
|
|
220
210
|
flat: !0
|
|
221
211
|
}),
|
|
222
212
|
asynchronous: !1
|
|
223
213
|
}));
|
|
224
|
-
const { length:
|
|
225
|
-
for (let n = 0; n <
|
|
226
|
-
|
|
214
|
+
const { length: s } = o;
|
|
215
|
+
for (let n = 0; n < s; ++n)
|
|
216
|
+
e[n].update(t), o[n].update(t);
|
|
227
217
|
}
|
|
228
218
|
}
|
|
229
219
|
}
|
|
230
|
-
const
|
|
220
|
+
const p = {
|
|
231
221
|
CONE: "cone",
|
|
232
222
|
THREESIXTY: "360"
|
|
233
223
|
};
|
|
234
|
-
function
|
|
235
|
-
const
|
|
224
|
+
function Dt(i, t) {
|
|
225
|
+
const o = new Xe(i), e = (
|
|
236
226
|
/** @type {import("@vcmap-cesium/engine").PerspectiveFrustum} */
|
|
237
|
-
|
|
227
|
+
o.frustum
|
|
238
228
|
);
|
|
239
|
-
return
|
|
229
|
+
return e.fov = t.fov, e.near = t.near, e.aspectRatio = t.aspectRatio, e.far = t.far, o;
|
|
240
230
|
}
|
|
241
|
-
const
|
|
231
|
+
const I = class I extends Ae {
|
|
242
232
|
static get className() {
|
|
243
233
|
return "Viewshed";
|
|
244
234
|
}
|
|
@@ -249,7 +239,7 @@ const y = class y extends _e {
|
|
|
249
239
|
static getDefaultOptions() {
|
|
250
240
|
return {
|
|
251
241
|
frustum: {
|
|
252
|
-
fov:
|
|
242
|
+
fov: k.PI / 3,
|
|
253
243
|
near: 1,
|
|
254
244
|
aspectRatio: 1,
|
|
255
245
|
far: 300
|
|
@@ -267,34 +257,34 @@ const y = class y extends _e {
|
|
|
267
257
|
/**
|
|
268
258
|
* @param {ViewshedOptions} options The options for the viewshed.
|
|
269
259
|
*/
|
|
270
|
-
constructor(
|
|
271
|
-
var
|
|
272
|
-
super(
|
|
273
|
-
fov: ((
|
|
274
|
-
far: ((
|
|
275
|
-
near: ((
|
|
276
|
-
aspectRatio: ((n =
|
|
277
|
-
}, this._headingPitchRollValues =
|
|
278
|
-
...
|
|
279
|
-
}, this._position =
|
|
280
|
-
visibleColor:
|
|
281
|
-
((
|
|
260
|
+
constructor(t) {
|
|
261
|
+
var o, e, s, n, d, l;
|
|
262
|
+
super(t), this._cesiumMap = null, this._shadowCamera = null, this._scene = null, this._frustumOptions = {
|
|
263
|
+
fov: ((o = t.frustumOptions) == null ? void 0 : o.fov) || I.getDefaultOptions().frustum.fov,
|
|
264
|
+
far: ((e = t.frustumOptions) == null ? void 0 : e.far) || I.getDefaultOptions().frustum.far,
|
|
265
|
+
near: ((s = t.frustumOptions) == null ? void 0 : s.near) || I.getDefaultOptions().frustum.near,
|
|
266
|
+
aspectRatio: ((n = t.frustumOptions) == null ? void 0 : n.aspectRatio) || I.getDefaultOptions().frustum.aspectRatio
|
|
267
|
+
}, this._headingPitchRollValues = t.orientation || {
|
|
268
|
+
...I.getDefaultOptions().orientation
|
|
269
|
+
}, this._position = t.position || I.getDefaultOptions().position, this._viewshedType = At(t.viewshedType, p), this._colors = {
|
|
270
|
+
visibleColor: Z.fromCssColorString(
|
|
271
|
+
((d = t.colorOptions) == null ? void 0 : d.visibleColor) || I.getDefaultOptions().visibleColor
|
|
282
272
|
),
|
|
283
|
-
shadowColor:
|
|
284
|
-
((
|
|
273
|
+
shadowColor: Z.fromCssColorString(
|
|
274
|
+
((l = t.colorOptions) == null ? void 0 : l.shadowColor) || I.getDefaultOptions().shadowColor
|
|
285
275
|
)
|
|
286
|
-
}, this._heightOffset =
|
|
276
|
+
}, this._heightOffset = t.heightOffset || 0, this._shadowMap = null, this._primitive = null, this._showPrimitive = !!t.showPrimitive, this._positionChanged = new Y(), this._active = !1;
|
|
287
277
|
}
|
|
288
278
|
/**
|
|
289
279
|
* Sets a new position for the shadow map. If no shadow map was created yet, due to missing position, this method triggers the creation of a shadow map.
|
|
290
280
|
* @param {import("ol/coordinate").Coordinate} coords The new positions coordinates in degrees
|
|
291
281
|
*/
|
|
292
|
-
set position(
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
), this._shadowCamera.setView({ orientation: this._headingPitchRollValues }), this._updatePrimitive()), this._positionChanged.raiseEvent(
|
|
282
|
+
set position(t) {
|
|
283
|
+
re(t, [Number]), this._position = t, this._shadowCamera && (this._shadowCamera.position = W.fromDegrees(
|
|
284
|
+
t[0],
|
|
285
|
+
t[1],
|
|
286
|
+
t[2] + this._heightOffset
|
|
287
|
+
), this._shadowCamera.setView({ orientation: this._headingPitchRollValues }), this._updatePrimitive()), this._positionChanged.raiseEvent(t);
|
|
298
288
|
}
|
|
299
289
|
/**
|
|
300
290
|
* @returns {import("ol/coordinate").Coordinate} The current position of the viewshed source.
|
|
@@ -313,11 +303,11 @@ const y = class y extends _e {
|
|
|
313
303
|
* Sets the height offset of the viewshed.
|
|
314
304
|
* @param {number} value the offset that is added to the position height.
|
|
315
305
|
*/
|
|
316
|
-
set heightOffset(
|
|
317
|
-
this._heightOffset =
|
|
306
|
+
set heightOffset(t) {
|
|
307
|
+
this._heightOffset = t, this._shadowCamera && (this._shadowCamera.position = W.fromDegrees(
|
|
318
308
|
this.position[0],
|
|
319
309
|
this.position[1],
|
|
320
|
-
this.position[2] +
|
|
310
|
+
this.position[2] + t
|
|
321
311
|
), this._updatePrimitive());
|
|
322
312
|
}
|
|
323
313
|
/**
|
|
@@ -331,8 +321,8 @@ const y = class y extends _e {
|
|
|
331
321
|
* Sets the reach of the viewshed.
|
|
332
322
|
* @param {number} value The distance in meters.
|
|
333
323
|
*/
|
|
334
|
-
set distance(
|
|
335
|
-
this._frustumOptions.far =
|
|
324
|
+
set distance(t) {
|
|
325
|
+
this._frustumOptions.far = t > I.MIN_DISTANCE ? t : I.MIN_DISTANCE, this._shadowCamera && (this._shadowCamera.frustum.far = this._frustumOptions.far, this._viewshedType === p.THREESIXTY && this._updateShadowMap(), this._viewshedType === p.CONE && this._updatePrimitive());
|
|
336
326
|
}
|
|
337
327
|
/**
|
|
338
328
|
* Returns the reach of the viewshed.
|
|
@@ -345,44 +335,44 @@ const y = class y extends _e {
|
|
|
345
335
|
* Sets the field of view of a cone viewshed. Does not have a impact on 360 viewshed.
|
|
346
336
|
* @param {number} value The field of view in degrees.
|
|
347
337
|
*/
|
|
348
|
-
set fov(
|
|
349
|
-
this._frustumOptions.fov =
|
|
338
|
+
set fov(t) {
|
|
339
|
+
this._frustumOptions.fov = t * k.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.frustum.fov = t * k.RADIANS_PER_DEGREE, this._viewshedType === p.CONE && (this._updateShadowMap(), this._updatePrimitive()));
|
|
350
340
|
}
|
|
351
341
|
/**
|
|
352
342
|
* Returns the field of view.
|
|
353
343
|
* @returns {number} The field of view in degrees.
|
|
354
344
|
*/
|
|
355
345
|
get fov() {
|
|
356
|
-
return this._frustumOptions.fov *
|
|
346
|
+
return this._frustumOptions.fov * k.DEGREES_PER_RADIAN;
|
|
357
347
|
}
|
|
358
348
|
/**
|
|
359
349
|
* Sets the heading of a cone viewshed. Does not have impact on 360 viewshed.
|
|
360
350
|
* @param {number} value Heading in degrees.
|
|
361
351
|
*/
|
|
362
|
-
set heading(
|
|
363
|
-
this._headingPitchRollValues.heading =
|
|
352
|
+
set heading(t) {
|
|
353
|
+
this._headingPitchRollValues.heading = t * k.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.setView({
|
|
364
354
|
orientation: {
|
|
365
|
-
heading:
|
|
355
|
+
heading: t * k.RADIANS_PER_DEGREE,
|
|
366
356
|
pitch: this._shadowCamera.pitch,
|
|
367
357
|
roll: 0
|
|
368
358
|
}
|
|
369
|
-
}), this._viewshedType ===
|
|
359
|
+
}), this._viewshedType === p.CONE && this._updatePrimitive());
|
|
370
360
|
}
|
|
371
361
|
/**
|
|
372
362
|
* Getter for the heading of a cone viewshed.
|
|
373
363
|
* @returns {number} The heading in degress.
|
|
374
364
|
*/
|
|
375
365
|
get heading() {
|
|
376
|
-
return this._headingPitchRollValues.heading *
|
|
366
|
+
return this._headingPitchRollValues.heading * k.DEGREES_PER_RADIAN;
|
|
377
367
|
}
|
|
378
368
|
/**
|
|
379
369
|
* Sets the pitch of a cone viewshed. 0 is horizontal. Does not have impact on 360 viewshed.
|
|
380
370
|
* @param {number} value The pitch in degrees.
|
|
381
371
|
*/
|
|
382
|
-
set pitch(
|
|
383
|
-
if (this._headingPitchRollValues.pitch =
|
|
384
|
-
const
|
|
385
|
-
this._shadowCamera.lookUp(
|
|
372
|
+
set pitch(t) {
|
|
373
|
+
if (this._headingPitchRollValues.pitch = t * k.RADIANS_PER_DEGREE, this._shadowCamera) {
|
|
374
|
+
const o = t * k.RADIANS_PER_DEGREE - this._shadowCamera.pitch;
|
|
375
|
+
this._shadowCamera.lookUp(o), this._viewshedType === p.CONE && this._updatePrimitive();
|
|
386
376
|
}
|
|
387
377
|
}
|
|
388
378
|
/**
|
|
@@ -390,14 +380,14 @@ const y = class y extends _e {
|
|
|
390
380
|
* @returns {number} The pitch in degrees.
|
|
391
381
|
*/
|
|
392
382
|
get pitch() {
|
|
393
|
-
return this._headingPitchRollValues.pitch *
|
|
383
|
+
return this._headingPitchRollValues.pitch * k.DEGREES_PER_RADIAN;
|
|
394
384
|
}
|
|
395
385
|
/**
|
|
396
386
|
* Sets whether the primitive of the viewshed should be shown or not.
|
|
397
387
|
* @param {boolean} value
|
|
398
388
|
*/
|
|
399
|
-
set showPrimitive(
|
|
400
|
-
this._showPrimitive =
|
|
389
|
+
set showPrimitive(t) {
|
|
390
|
+
this._showPrimitive = t, this._updatePrimitive();
|
|
401
391
|
}
|
|
402
392
|
/**
|
|
403
393
|
* Gets if the primitive of the viewshed is shown or not.
|
|
@@ -423,19 +413,19 @@ const y = class y extends _e {
|
|
|
423
413
|
* Deactivates the viewshed by removing primitive and removing shadowMap.
|
|
424
414
|
*/
|
|
425
415
|
deactivate() {
|
|
426
|
-
var
|
|
427
|
-
this._active && (this._removePrimitive(), this._shadowMap.enabled = !1, (
|
|
416
|
+
var t;
|
|
417
|
+
this._active && (this._removePrimitive(), this._shadowMap.enabled = !1, (t = this._shadowMap) == null || t.destroy(), this._shadowCamera = null, this._scene = null, this._cesiumMap = null, this._shadowMap = null, this._active = !1);
|
|
428
418
|
}
|
|
429
419
|
/**
|
|
430
420
|
* Activates viewshed.
|
|
431
421
|
* @param {import("@vcmap/core").CesiumMap} cesiumMap The cesium map to which the shadow map of the viewshed is applied to.
|
|
432
422
|
*/
|
|
433
|
-
activate(
|
|
434
|
-
if (this._active || (this._active = !0),
|
|
435
|
-
this._cesiumMap =
|
|
436
|
-
const
|
|
437
|
-
if (
|
|
438
|
-
this._shadowCamera =
|
|
423
|
+
activate(t) {
|
|
424
|
+
if (this._active || (this._active = !0), t !== this._cesiumMap) {
|
|
425
|
+
this._cesiumMap = t;
|
|
426
|
+
const o = t.getScene();
|
|
427
|
+
if (o)
|
|
428
|
+
this._shadowCamera = Dt(o, this._frustumOptions), this._position && (this.position = this._position), this._scene = o;
|
|
439
429
|
else
|
|
440
430
|
throw new Error("CesiumMap contains no scene");
|
|
441
431
|
this._updateShadowMap(), this._updatePrimitive();
|
|
@@ -445,13 +435,13 @@ const y = class y extends _e {
|
|
|
445
435
|
* Updates the shadow map by creating a new one and applying all the current parameters.
|
|
446
436
|
*/
|
|
447
437
|
_updateShadowMap() {
|
|
448
|
-
var
|
|
449
|
-
!this._active || !this._shadowCamera || !this._cesiumMap || !this._scene || ((
|
|
438
|
+
var t;
|
|
439
|
+
!this._active || !this._shadowCamera || !this._cesiumMap || !this._scene || ((t = this._shadowMap) == null || t.destroy(), this._shadowMap = new Ye({
|
|
450
440
|
// @ts-ignore
|
|
451
441
|
context: this._scene.context,
|
|
452
442
|
lightCamera: this._shadowCamera,
|
|
453
443
|
enabled: !0,
|
|
454
|
-
isPointLight: this._viewshedType ===
|
|
444
|
+
isPointLight: this._viewshedType === p.THREESIXTY,
|
|
455
445
|
softShadows: !0,
|
|
456
446
|
fromLightSource: !0,
|
|
457
447
|
cascadesEnabled: !1,
|
|
@@ -461,30 +451,30 @@ const y = class y extends _e {
|
|
|
461
451
|
}), this._shadowMap.viewshed = this._colors, this._cesiumMap.setShadowMap(this._shadowMap));
|
|
462
452
|
}
|
|
463
453
|
_removePrimitive() {
|
|
464
|
-
var
|
|
465
|
-
this._primitive && !
|
|
454
|
+
var t;
|
|
455
|
+
this._primitive && !this._primitive.isDestroyed() && ((t = this._scene) == null || t.primitives.remove(this._primitive), this._primitive.destroy(), this._primitive = null);
|
|
466
456
|
}
|
|
467
457
|
_updatePrimitive() {
|
|
468
|
-
this._showPrimitive && this._active && this._scene ? (this._removePrimitive(), this._primitive = new
|
|
458
|
+
this._showPrimitive && this._active && this._scene ? (this._removePrimitive(), this._primitive = new Nt({
|
|
469
459
|
camera: this._shadowCamera,
|
|
470
460
|
allowPicking: !1,
|
|
471
|
-
spot: this._viewshedType ===
|
|
461
|
+
spot: this._viewshedType === p.CONE
|
|
472
462
|
}), this._scene.primitives.add(this._primitive)) : this._removePrimitive();
|
|
473
463
|
}
|
|
474
464
|
/**
|
|
475
465
|
* Sets distance and, in case of cone viewsheds, also heading and pitch. Only works when viewshed is **active**.
|
|
476
466
|
* @param {number[]} target Point to calculate distance, heading and pitch from.
|
|
477
467
|
*/
|
|
478
|
-
lookAt(
|
|
468
|
+
lookAt(t) {
|
|
479
469
|
if (!this._shadowCamera)
|
|
480
470
|
return;
|
|
481
|
-
const
|
|
482
|
-
if (this.distance =
|
|
483
|
-
const
|
|
484
|
-
|
|
471
|
+
const o = W.fromDegrees(t[0], t[1], t[2]);
|
|
472
|
+
if (this.distance = W.distance(this._shadowCamera.position, o), this.type === p.CONE && !o.equals(this._shadowCamera.position)) {
|
|
473
|
+
const e = new W();
|
|
474
|
+
W.subtract(o, this._shadowCamera.position, o), W.normalize(o, o), W.normalize(this._shadowCamera.position, e), this._shadowCamera.setView({
|
|
485
475
|
orientation: {
|
|
486
|
-
direction:
|
|
487
|
-
up:
|
|
476
|
+
direction: o,
|
|
477
|
+
up: e
|
|
488
478
|
}
|
|
489
479
|
}), this._headingPitchRollValues.heading = this._shadowCamera.heading, this._headingPitchRollValues.pitch = this._shadowCamera.pitch;
|
|
490
480
|
}
|
|
@@ -513,20 +503,20 @@ const y = class y extends _e {
|
|
|
513
503
|
* Destroys the viewshed.
|
|
514
504
|
*/
|
|
515
505
|
destroy() {
|
|
516
|
-
var
|
|
517
|
-
const
|
|
518
|
-
this.deactivate(), ((
|
|
506
|
+
var e;
|
|
507
|
+
const t = this._cesiumMap, o = this._shadowMap;
|
|
508
|
+
this.deactivate(), ((e = t == null ? void 0 : t.getScene()) == null ? void 0 : e.shadowMap) === o && t.setDefaultShadowMap();
|
|
519
509
|
}
|
|
520
510
|
};
|
|
521
|
-
|
|
522
|
-
let
|
|
523
|
-
class
|
|
511
|
+
de(I, "MIN_DISTANCE", 10);
|
|
512
|
+
let x = I;
|
|
513
|
+
class xt extends Re {
|
|
524
514
|
/**
|
|
525
515
|
*
|
|
526
516
|
* @param {import("./viewshed").default} viewshed
|
|
527
517
|
*/
|
|
528
|
-
constructor(
|
|
529
|
-
super(
|
|
518
|
+
constructor(t) {
|
|
519
|
+
super(K.CLICKMOVE), this._viewshed = t, this._positioned = new Y(), this._finished = new Y(), this._position = !1, this.setActive();
|
|
530
520
|
}
|
|
531
521
|
get finished() {
|
|
532
522
|
return this._finished;
|
|
@@ -534,242 +524,219 @@ class pt extends Ce {
|
|
|
534
524
|
get positioned() {
|
|
535
525
|
return this._positioned;
|
|
536
526
|
}
|
|
537
|
-
async pipe(
|
|
538
|
-
return
|
|
527
|
+
async pipe(t) {
|
|
528
|
+
return t.position && (this._position ? (this._viewshed.lookAt(H.mercatorToWgs84(t.position)), t.type & K.CLICK && (this.setActive(!1), this._finished.raiseEvent(null))) : (this._viewshed.position = H.mercatorToWgs84(t.position), t.type & K.CLICK && (this._position = !0, this._positioned.raiseEvent(null)))), t;
|
|
539
529
|
}
|
|
540
530
|
destroy() {
|
|
541
531
|
super.destroy(), this._finished.destroy(), this._positioned.destroy();
|
|
542
532
|
}
|
|
543
533
|
}
|
|
544
|
-
const
|
|
534
|
+
const P = {
|
|
545
535
|
ABSOLUTE: "absolute",
|
|
546
536
|
RELATIVE: "relative"
|
|
547
|
-
},
|
|
537
|
+
}, y = {
|
|
548
538
|
CREATE: "create",
|
|
549
539
|
VIEW: "view",
|
|
550
540
|
EDIT: "edit",
|
|
551
541
|
MOVE: "move",
|
|
552
542
|
MULTI_SELECT: "multiSelect"
|
|
553
|
-
},
|
|
554
|
-
function
|
|
555
|
-
const
|
|
556
|
-
projection:
|
|
557
|
-
zIndex:
|
|
543
|
+
}, ge = 1.8;
|
|
544
|
+
function kt(i) {
|
|
545
|
+
const t = new ke({
|
|
546
|
+
projection: Le.toJSON(),
|
|
547
|
+
zIndex: Fe - 1
|
|
558
548
|
});
|
|
559
|
-
|
|
560
|
-
const
|
|
561
|
-
return
|
|
562
|
-
layer:
|
|
563
|
-
feature:
|
|
549
|
+
je(t), t.activate();
|
|
550
|
+
const o = new st(new nt(i));
|
|
551
|
+
return o.setStyle(new at({})), t.addFeatures([o]), t.vectorProperties.altitudeMode = Je.NONE, {
|
|
552
|
+
layer: t,
|
|
553
|
+
feature: o,
|
|
564
554
|
destroy() {
|
|
565
|
-
|
|
555
|
+
o.dispose(), t.destroy();
|
|
566
556
|
}
|
|
567
557
|
};
|
|
568
558
|
}
|
|
569
|
-
function
|
|
570
|
-
const
|
|
571
|
-
|
|
559
|
+
function ee(i, t) {
|
|
560
|
+
const o = t === P.ABSOLUTE ? K.CLICKMOVE : K.NONE;
|
|
561
|
+
i.setActive(o), i.pickPosition = o, i.pullPickedPosition = 1.8;
|
|
572
562
|
}
|
|
573
|
-
function
|
|
574
|
-
const
|
|
575
|
-
let
|
|
563
|
+
function Lt(i, t, o) {
|
|
564
|
+
const e = te(null), s = U(null), n = U(null), d = U(P.ABSOLUTE);
|
|
565
|
+
let l = () => {
|
|
576
566
|
};
|
|
577
|
-
const
|
|
578
|
-
let
|
|
567
|
+
const c = te(null);
|
|
568
|
+
let C = () => {
|
|
579
569
|
};
|
|
580
|
-
function
|
|
570
|
+
function u() {
|
|
581
571
|
var a;
|
|
582
|
-
|
|
572
|
+
s.value && e.value ? (e.value.deactivate(), o.setVisibility(e.value.name, !1)) : (a = e.value) == null || a.destroy();
|
|
583
573
|
}
|
|
584
|
-
function
|
|
585
|
-
|
|
574
|
+
function h(a = !0) {
|
|
575
|
+
C(), l(), u(), e.value = null, a && o.clearSelection(), s.value = null, n.value = null;
|
|
586
576
|
}
|
|
587
|
-
function
|
|
588
|
-
|
|
589
|
-
var
|
|
590
|
-
|
|
577
|
+
function w(a) {
|
|
578
|
+
C(), u(), i.maps.activeMap instanceof G && (e.value = a, a.activate(i.maps.activeMap), C = i.maps.activeMap.shadowMapChanged.addEventListener((r) => {
|
|
579
|
+
var _;
|
|
580
|
+
r !== ((_ = e.value) == null ? void 0 : _.shadowMap) && h(!1);
|
|
591
581
|
}));
|
|
592
582
|
}
|
|
593
|
-
async function
|
|
594
|
-
|
|
595
|
-
const { eventHandler:
|
|
583
|
+
async function g(a) {
|
|
584
|
+
h(), await Ze();
|
|
585
|
+
const { eventHandler: r } = i.maps, { featureInteraction: _ } = r, v = new x({
|
|
596
586
|
viewshedType: a,
|
|
597
587
|
colorOptions: {
|
|
598
|
-
visibleColor:
|
|
599
|
-
shadowColor:
|
|
588
|
+
visibleColor: t.visibleColor,
|
|
589
|
+
shadowColor: t.shadowColor
|
|
600
590
|
},
|
|
601
|
-
heightOffset:
|
|
591
|
+
heightOffset: d.value === P.ABSOLUTE ? 0 : ge
|
|
602
592
|
});
|
|
603
|
-
v
|
|
604
|
-
const E = new
|
|
593
|
+
w(v);
|
|
594
|
+
const E = new xt(e.value);
|
|
605
595
|
E.finished.addEventListener(() => {
|
|
606
|
-
|
|
596
|
+
l(), e.value ? (e.value.showPrimitive = !0, n.value = y.EDIT) : h();
|
|
607
597
|
});
|
|
608
|
-
const
|
|
598
|
+
const T = r.addExclusiveInteraction(
|
|
609
599
|
E,
|
|
610
600
|
() => {
|
|
611
601
|
E.destroy();
|
|
612
602
|
}
|
|
613
603
|
);
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
}),
|
|
617
|
-
|
|
604
|
+
ee(_, d.value), E.positioned.addEventListener(() => {
|
|
605
|
+
ee(_, P.ABSOLUTE);
|
|
606
|
+
}), l = () => {
|
|
607
|
+
T(), E.destroy(), _.setActive(), l = () => {
|
|
618
608
|
};
|
|
619
|
-
}, n.value =
|
|
609
|
+
}, n.value = y.CREATE;
|
|
620
610
|
}
|
|
621
|
-
function
|
|
622
|
-
var
|
|
623
|
-
if (
|
|
624
|
-
|
|
611
|
+
function V(a) {
|
|
612
|
+
var r;
|
|
613
|
+
if (e.value && a) {
|
|
614
|
+
l();
|
|
625
615
|
const {
|
|
626
|
-
layer:
|
|
627
|
-
feature:
|
|
616
|
+
layer: _,
|
|
617
|
+
feature: v,
|
|
628
618
|
destroy: E
|
|
629
|
-
} =
|
|
630
|
-
|
|
631
|
-
|
|
619
|
+
} = kt(e.value.position);
|
|
620
|
+
i.layers.add(_), d.value === P.ABSOLUTE ? (c.value = De(i, _), c.value.setFeatures([v])) : (c.value = xe(i, _), c.value.setFeature(v)), c.value.stopped.addEventListener(() => {
|
|
621
|
+
l();
|
|
632
622
|
});
|
|
633
|
-
const
|
|
634
|
-
|
|
623
|
+
const T = (r = v.getGeometry()) == null ? void 0 : r.on("change", () => {
|
|
624
|
+
e.value ? e.value.position = H.mercatorToWgs84(
|
|
635
625
|
/** @type {import("ol/geom").Point} */
|
|
636
|
-
|
|
637
|
-
) :
|
|
626
|
+
v.getGeometry().getCoordinates()
|
|
627
|
+
) : h();
|
|
638
628
|
});
|
|
639
|
-
n.value =
|
|
640
|
-
var
|
|
641
|
-
|
|
642
|
-
},
|
|
629
|
+
n.value = y.MOVE, l = () => {
|
|
630
|
+
var O;
|
|
631
|
+
l = () => {
|
|
632
|
+
}, T && ot(T), (O = c.value) == null || O.stop(), c.value = null, i.layers.remove(_), E(), n.value = y.EDIT;
|
|
643
633
|
};
|
|
644
634
|
} else
|
|
645
|
-
|
|
635
|
+
l();
|
|
646
636
|
}
|
|
647
|
-
function
|
|
648
|
-
|
|
637
|
+
function N(a, r) {
|
|
638
|
+
l(), e.value !== r && (w(r), d.value = r.heightOffset ? P.RELATIVE : P.ABSOLUTE), s.value = !!r.properties.title, n.value = a, s.value && o.setVisibility(r.name, !0);
|
|
649
639
|
}
|
|
650
|
-
const
|
|
651
|
-
|
|
640
|
+
const S = [
|
|
641
|
+
o.collectionComponent.collection.removed.addEventListener(
|
|
652
642
|
(a) => {
|
|
653
|
-
var
|
|
654
|
-
|
|
643
|
+
var r;
|
|
644
|
+
o.remove(a.name), ((r = e.value) == null ? void 0 : r.name) === a.name && h();
|
|
655
645
|
}
|
|
656
646
|
),
|
|
657
|
-
|
|
658
|
-
var
|
|
659
|
-
const
|
|
660
|
-
`${
|
|
647
|
+
o.renamed.addEventListener(({ item: a, title: r }) => {
|
|
648
|
+
var v;
|
|
649
|
+
const _ = i.windowManager.get(
|
|
650
|
+
`${o.collectionComponent.id}-editor`
|
|
661
651
|
);
|
|
662
|
-
|
|
652
|
+
_ && ((v = e.value) == null ? void 0 : v.name) === a.name && (_.state.headerTitle = r);
|
|
663
653
|
}),
|
|
664
|
-
|
|
665
|
-
var
|
|
666
|
-
const
|
|
667
|
-
|
|
654
|
+
o.visibilityChanged.addEventListener((a) => {
|
|
655
|
+
var _;
|
|
656
|
+
const r = ((_ = e.value) == null ? void 0 : _.name) === a.name;
|
|
657
|
+
r ? h() : (N(y.VIEW, a), o.clearSelection()), o.setVisibility(a.name, !r);
|
|
668
658
|
})
|
|
669
659
|
];
|
|
670
|
-
function
|
|
671
|
-
if (!(a ===
|
|
672
|
-
if (
|
|
673
|
-
|
|
674
|
-
|
|
660
|
+
function L(a) {
|
|
661
|
+
if (!(a === d.value || !e.value)) {
|
|
662
|
+
if (d.value = a, n.value === y.MOVE && l(), n.value === y.CREATE)
|
|
663
|
+
ee(
|
|
664
|
+
i.maps.eventHandler.featureInteraction,
|
|
675
665
|
a
|
|
676
|
-
),
|
|
677
|
-
else if (n.value ===
|
|
678
|
-
const { position:
|
|
679
|
-
a ===
|
|
680
|
-
const E =
|
|
681
|
-
|
|
682
|
-
}) : (
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
],
|
|
666
|
+
), e.value.heightOffset = a === P.ABSOLUTE ? 0 : ge;
|
|
667
|
+
else if (n.value === y.EDIT) {
|
|
668
|
+
const { position: r, heightOffset: _ } = e.value;
|
|
669
|
+
a === P.RELATIVE ? i.maps.activeMap.getHeightFromTerrain([H.wgs84ToMercator(r)]).then((v) => {
|
|
670
|
+
const E = H.mercatorToWgs84(v[0]);
|
|
671
|
+
e.value && (e.value.heightOffset = r[2] - E[2], e.value.position = E);
|
|
672
|
+
}) : (e.value.position = [
|
|
673
|
+
r[0],
|
|
674
|
+
r[1],
|
|
675
|
+
r[2] + _
|
|
676
|
+
], e.value.heightOffset = 0);
|
|
687
677
|
}
|
|
688
678
|
}
|
|
689
679
|
}
|
|
690
680
|
return {
|
|
691
|
-
currentViewshed:
|
|
692
|
-
currentIsPersisted:
|
|
693
|
-
currentEditSession:
|
|
694
|
-
createViewshed:
|
|
681
|
+
currentViewshed: e,
|
|
682
|
+
currentIsPersisted: s,
|
|
683
|
+
currentEditSession: c,
|
|
684
|
+
createViewshed: g,
|
|
695
685
|
viewViewshed(a) {
|
|
696
|
-
|
|
686
|
+
N(y.VIEW, a);
|
|
697
687
|
},
|
|
698
688
|
editViewshed(a) {
|
|
699
|
-
|
|
689
|
+
N(y.EDIT, a), s.value && (o.setSelection(a.name), o.collectionComponent.openEditorWindow(a));
|
|
700
690
|
},
|
|
701
691
|
persistCurrent() {
|
|
702
|
-
|
|
692
|
+
e.value && (o.add(e.value), s.value = !0, o.setSelection(e.value.name), o.setVisibility(e.value.name, !0));
|
|
703
693
|
},
|
|
704
|
-
moveCurrentViewshed:
|
|
694
|
+
moveCurrentViewshed: V,
|
|
705
695
|
setupMultiSelect() {
|
|
706
|
-
|
|
696
|
+
l(), n.value = y.MULTI_SELECT, u(), e.value = null;
|
|
707
697
|
},
|
|
708
698
|
mode: n,
|
|
709
|
-
heightMode:
|
|
710
|
-
changeHeightMode:
|
|
699
|
+
heightMode: d,
|
|
700
|
+
changeHeightMode: L,
|
|
711
701
|
async placeCurrentFeaturesOnTerrain() {
|
|
712
|
-
var a,
|
|
713
|
-
if (
|
|
714
|
-
const
|
|
715
|
-
|
|
716
|
-
]))[0][2] -
|
|
717
|
-
|
|
702
|
+
var a, r;
|
|
703
|
+
if (e.value && ((a = c.value) == null ? void 0 : a.type) === Ne.EDIT_FEATURES && i.maps.activeMap instanceof G) {
|
|
704
|
+
const v = (await i.maps.activeMap.getHeightFromTerrain([
|
|
705
|
+
H.wgs84ToMercator((r = e.value) == null ? void 0 : r.position)
|
|
706
|
+
]))[0][2] - e.value.position[2];
|
|
707
|
+
c.value.translate(0, 0, v);
|
|
718
708
|
}
|
|
719
709
|
},
|
|
720
|
-
stop:
|
|
710
|
+
stop: h,
|
|
721
711
|
destroy() {
|
|
722
|
-
|
|
723
|
-
}
|
|
724
|
-
};
|
|
725
|
-
}
|
|
726
|
-
function pe(s, e, i, t, o, n, l, c) {
|
|
727
|
-
var r = typeof s == "function" ? s.options : s;
|
|
728
|
-
e && (r.render = e, r.staticRenderFns = i, r._compiled = !0), t && (r.functional = !0), n && (r._scopeId = "data-v-" + n);
|
|
729
|
-
var f;
|
|
730
|
-
if (l ? (f = function(v) {
|
|
731
|
-
v = v || // cached call
|
|
732
|
-
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
733
|
-
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !v && typeof __VUE_SSR_CONTEXT__ < "u" && (v = __VUE_SSR_CONTEXT__), o && o.call(this, v), v && v._registeredComponents && v._registeredComponents.add(l);
|
|
734
|
-
}, r._ssrRegister = f) : o && (f = c ? function() {
|
|
735
|
-
o.call(
|
|
736
|
-
this,
|
|
737
|
-
(r.functional ? this.parent : this).$root.$options.shadowRoot
|
|
738
|
-
);
|
|
739
|
-
} : o), f)
|
|
740
|
-
if (r.functional) {
|
|
741
|
-
r._injectStyles = f;
|
|
742
|
-
var h = r.render;
|
|
743
|
-
r.render = function(_, C) {
|
|
744
|
-
return f.call(C), h(_, C);
|
|
745
|
-
};
|
|
746
|
-
} else {
|
|
747
|
-
var u = r.beforeCreate;
|
|
748
|
-
r.beforeCreate = u ? [].concat(u, f) : [f];
|
|
712
|
+
h(), S.forEach((a) => a());
|
|
749
713
|
}
|
|
750
|
-
return {
|
|
751
|
-
exports: s,
|
|
752
|
-
options: r
|
|
753
714
|
};
|
|
754
715
|
}
|
|
755
|
-
const
|
|
756
|
-
|
|
716
|
+
const Se = (i, t) => {
|
|
717
|
+
const o = i.__vccOpts || i;
|
|
718
|
+
for (const [e, s] of t)
|
|
719
|
+
o[e] = s;
|
|
720
|
+
return o;
|
|
721
|
+
}, Ft = {
|
|
722
|
+
distance: [x.MIN_DISTANCE, 2e3],
|
|
757
723
|
fov: [25, 85],
|
|
758
724
|
heading: [0, 360],
|
|
759
725
|
pitch: [-90, 90]
|
|
760
|
-
},
|
|
726
|
+
}, jt = {
|
|
761
727
|
components: {
|
|
762
|
-
VcsTextField:
|
|
763
|
-
VContainer:
|
|
764
|
-
VRow:
|
|
765
|
-
VCol:
|
|
766
|
-
VcsSlider:
|
|
767
|
-
VcsLabel:
|
|
768
|
-
VcsFormSection:
|
|
769
|
-
VDivider:
|
|
770
|
-
VcsSelect:
|
|
771
|
-
VcsFormButton:
|
|
772
|
-
VcsFeatureTransforms:
|
|
728
|
+
VcsTextField: rt,
|
|
729
|
+
VContainer: ye,
|
|
730
|
+
VRow: Ve,
|
|
731
|
+
VCol: be,
|
|
732
|
+
VcsSlider: lt,
|
|
733
|
+
VcsLabel: _e,
|
|
734
|
+
VcsFormSection: Ce,
|
|
735
|
+
VDivider: Ct,
|
|
736
|
+
VcsSelect: Ee,
|
|
737
|
+
VcsFormButton: dt,
|
|
738
|
+
VcsFeatureTransforms: ct,
|
|
739
|
+
VcsHelp: ut
|
|
773
740
|
},
|
|
774
741
|
name: "ViewshedWindow",
|
|
775
742
|
props: {
|
|
@@ -784,475 +751,796 @@ const gt = {
|
|
|
784
751
|
default: void 0
|
|
785
752
|
}
|
|
786
753
|
},
|
|
787
|
-
setup(
|
|
788
|
-
|
|
754
|
+
setup(i) {
|
|
755
|
+
var _;
|
|
756
|
+
const t = (
|
|
789
757
|
/** @type {import("./viewshedManager.js").ViewshedManager} */
|
|
790
|
-
|
|
791
|
-
),
|
|
758
|
+
me("manager")
|
|
759
|
+
), o = (
|
|
792
760
|
/** @type {import("@vcmap/ui").VcsUiApp} */
|
|
793
|
-
|
|
761
|
+
me("vcsApp")
|
|
794
762
|
), {
|
|
795
|
-
currentViewshed:
|
|
796
|
-
mode:
|
|
763
|
+
currentViewshed: e,
|
|
764
|
+
mode: s,
|
|
797
765
|
currentIsPersisted: n
|
|
798
|
-
} =
|
|
799
|
-
|
|
766
|
+
} = t, d = U(
|
|
767
|
+
((_ = o.maps.activeMap) == null ? void 0 : _.movementApiCallsDisabled) ?? !1
|
|
768
|
+
);
|
|
769
|
+
let l = () => {
|
|
770
|
+
};
|
|
771
|
+
const c = ve(() => i.selection);
|
|
772
|
+
let C = () => {
|
|
800
773
|
};
|
|
801
|
-
const
|
|
774
|
+
const u = q({
|
|
802
775
|
X: void 0,
|
|
803
776
|
Y: void 0,
|
|
804
777
|
Z: void 0
|
|
805
|
-
}),
|
|
806
|
-
let
|
|
778
|
+
}), h = te();
|
|
779
|
+
let w = () => {
|
|
807
780
|
};
|
|
808
|
-
const
|
|
781
|
+
const g = q({
|
|
809
782
|
showPrimitive: !1,
|
|
810
783
|
distance: void 0,
|
|
811
784
|
fov: void 0,
|
|
812
785
|
heading: void 0,
|
|
813
786
|
pitch: void 0
|
|
814
|
-
}),
|
|
815
|
-
function
|
|
816
|
-
|
|
787
|
+
}), V = U();
|
|
788
|
+
function N() {
|
|
789
|
+
e.value && (u.X = e.value.position[0], u.Y = e.value.position[1], u.Z = t.heightMode.value === P.ABSOLUTE ? e.value.position[2] : e.value.heightOffset);
|
|
817
790
|
}
|
|
818
|
-
function
|
|
819
|
-
|
|
791
|
+
function S() {
|
|
792
|
+
N(), e.value && (g.distance = e.value.distance, g.fov = e.value.fov, g.heading = e.value.heading, g.pitch = e.value.pitch, g.showPrimitive = e.value.showPrimitive, V.value = e.value.type);
|
|
820
793
|
}
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
}),
|
|
824
|
-
|
|
794
|
+
qe(() => {
|
|
795
|
+
e.value && s.value !== y.CREATE && S();
|
|
796
|
+
}), z(
|
|
797
|
+
e,
|
|
825
798
|
() => {
|
|
826
|
-
|
|
827
|
-
|
|
799
|
+
e.value && (C(), C = e.value.positionChanged.addEventListener(() => {
|
|
800
|
+
N(), w();
|
|
828
801
|
}));
|
|
829
802
|
},
|
|
830
803
|
{ immediate: !0 }
|
|
831
804
|
);
|
|
832
|
-
async function
|
|
833
|
-
var
|
|
834
|
-
(
|
|
835
|
-
const
|
|
805
|
+
async function L() {
|
|
806
|
+
var T, O;
|
|
807
|
+
(T = e.value) == null || T.deactivate();
|
|
808
|
+
const v = (
|
|
836
809
|
/** @type {import("@vcmap/core").CesiumMap} */
|
|
837
|
-
(
|
|
838
|
-
),
|
|
839
|
-
|
|
810
|
+
(O = o.maps.activeMap.getScene()) == null ? void 0 : O.camera
|
|
811
|
+
), E = v == null ? void 0 : v.changed.addEventListener(() => {
|
|
812
|
+
w();
|
|
840
813
|
});
|
|
841
|
-
|
|
842
|
-
var
|
|
843
|
-
|
|
814
|
+
w = () => {
|
|
815
|
+
var le;
|
|
816
|
+
E == null || E(), h.value = null, (le = e.value) == null || le.activate(o.maps.activeMap), w = () => {
|
|
844
817
|
};
|
|
845
818
|
};
|
|
846
819
|
}
|
|
847
|
-
|
|
848
|
-
var
|
|
849
|
-
const
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
820
|
+
Qe(() => {
|
|
821
|
+
var E, T;
|
|
822
|
+
const v = (E = i.getViewshed) == null ? void 0 : E.call(i);
|
|
823
|
+
v && t.editViewshed(v), l = (T = o.maps.activeMap) == null ? void 0 : T.movementDisabledChanged.addEventListener(
|
|
824
|
+
(O) => {
|
|
825
|
+
d.value = O.apiCalls;
|
|
826
|
+
}
|
|
827
|
+
);
|
|
828
|
+
}), et(() => {
|
|
829
|
+
C(), w(), l(), n.value || ((s.value === y.EDIT || s.value === y.MOVE) && e.value ? t.viewViewshed(e.value) : s.value === y.CREATE && t.stop()), c.value && (c.value.length > 1 ? t.setupMultiSelect() : c.value.length === 1 && e.value ? t.viewViewshed(e.value) : (
|
|
853
830
|
// when a persited viewshed is deselected, stops plugin
|
|
854
|
-
!
|
|
831
|
+
!c.value.length && s.value === y.EDIT && t.stop(!1)
|
|
855
832
|
));
|
|
856
|
-
}),
|
|
857
|
-
function
|
|
858
|
-
|
|
833
|
+
}), S();
|
|
834
|
+
function a(v, E) {
|
|
835
|
+
w(), e.value && (g[v] = E, e.value[v] = E);
|
|
859
836
|
}
|
|
860
|
-
const
|
|
861
|
-
const
|
|
862
|
-
return
|
|
837
|
+
const r = ve(() => {
|
|
838
|
+
const v = [];
|
|
839
|
+
return V.value === p.CONE && v.push({
|
|
863
840
|
name: "jumpToViewpoint",
|
|
864
|
-
title:
|
|
841
|
+
title: h.value ? "viewshed.returnToViewpoint" : "viewshed.jumpToViewpoint",
|
|
865
842
|
icon: "mdi-human-male",
|
|
866
|
-
active: !!
|
|
843
|
+
active: !!h.value,
|
|
844
|
+
disabled: d.value,
|
|
867
845
|
async callback() {
|
|
868
|
-
var
|
|
869
|
-
|
|
870
|
-
new
|
|
846
|
+
var E, T, O;
|
|
847
|
+
t.moveCurrentViewshed(!1), e.value && !h.value ? (h.value = await ((E = o.maps.activeMap) == null ? void 0 : E.getViewpoint()), await ((T = o.maps.activeMap) == null ? void 0 : T.gotoViewpoint(
|
|
848
|
+
new We({
|
|
871
849
|
groundPosition: [
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
850
|
+
e.value.position[0],
|
|
851
|
+
e.value.position[1],
|
|
852
|
+
e.value.position[2] + e.value.heightOffset
|
|
875
853
|
],
|
|
876
|
-
heading:
|
|
877
|
-
pitch:
|
|
854
|
+
heading: e.value.heading,
|
|
855
|
+
pitch: e.value.pitch,
|
|
878
856
|
distance: 0,
|
|
879
857
|
animate: !0
|
|
880
858
|
// if not animate, async does not work and the cameraChanged listener is triggered immediately. alternatively set timeout
|
|
881
859
|
})
|
|
882
|
-
)),
|
|
860
|
+
)), L()) : h.value && ((O = o.maps.activeMap) == null || O.gotoViewpoint(h.value), w());
|
|
883
861
|
}
|
|
884
|
-
}),
|
|
862
|
+
}), v.push({
|
|
885
863
|
name: "moveViewshed",
|
|
886
864
|
title: "viewshed.move",
|
|
887
|
-
icon:
|
|
888
|
-
active:
|
|
865
|
+
icon: t.heightMode.value === P.RELATIVE ? "$vcsEditVertices" : "mdi-axis-arrow",
|
|
866
|
+
active: s.value === y.MOVE,
|
|
889
867
|
callback() {
|
|
890
|
-
|
|
891
|
-
|
|
868
|
+
t.moveCurrentViewshed(
|
|
869
|
+
s.value !== y.MOVE
|
|
892
870
|
);
|
|
893
871
|
}
|
|
894
|
-
}),
|
|
872
|
+
}), v.unshift({
|
|
895
873
|
name: "showPrimitive",
|
|
896
874
|
title: "viewshed.showPrimitive",
|
|
897
875
|
icon: "mdi-eye",
|
|
898
|
-
active:
|
|
876
|
+
active: g.showPrimitive,
|
|
899
877
|
callback() {
|
|
900
|
-
this.active = !this.active,
|
|
878
|
+
this.active = !this.active, a("showPrimitive", this.active);
|
|
901
879
|
}
|
|
902
|
-
}),
|
|
880
|
+
}), v;
|
|
903
881
|
});
|
|
904
882
|
return {
|
|
905
|
-
position:
|
|
906
|
-
setPosition(
|
|
907
|
-
if (
|
|
908
|
-
if (
|
|
909
|
-
|
|
883
|
+
position: u,
|
|
884
|
+
setPosition(v, E, T) {
|
|
885
|
+
if (w(), !!e.value) {
|
|
886
|
+
if (T === 2 && t.heightMode.value === P.RELATIVE)
|
|
887
|
+
e.value.heightOffset = Number(v);
|
|
910
888
|
else {
|
|
911
|
-
const
|
|
912
|
-
|
|
889
|
+
const O = [...e.value.position];
|
|
890
|
+
O[T] = Number(v), e.value.position = O;
|
|
913
891
|
}
|
|
914
|
-
|
|
892
|
+
u[E] = Number(v);
|
|
915
893
|
}
|
|
916
894
|
},
|
|
917
|
-
parameters:
|
|
918
|
-
setParameter:
|
|
919
|
-
parameterRanges:
|
|
920
|
-
ViewshedPluginModes:
|
|
921
|
-
viewshedMode:
|
|
895
|
+
parameters: g,
|
|
896
|
+
setParameter: a,
|
|
897
|
+
parameterRanges: Ft,
|
|
898
|
+
ViewshedPluginModes: y,
|
|
899
|
+
viewshedMode: s,
|
|
922
900
|
currentIsPersisted: n,
|
|
923
|
-
viewshedType:
|
|
924
|
-
ViewshedTypes:
|
|
925
|
-
HeightModes:
|
|
926
|
-
heightMode:
|
|
927
|
-
TransformationMode:
|
|
928
|
-
changeHeightMode:
|
|
901
|
+
viewshedType: V,
|
|
902
|
+
ViewshedTypes: p,
|
|
903
|
+
HeightModes: P,
|
|
904
|
+
heightMode: t.heightMode,
|
|
905
|
+
TransformationMode: Be,
|
|
906
|
+
changeHeightMode: t.changeHeightMode,
|
|
929
907
|
async createNewViewshed() {
|
|
930
|
-
await
|
|
908
|
+
await t.createViewshed(V.value);
|
|
931
909
|
},
|
|
932
|
-
addToMyWorkspace: () =>
|
|
933
|
-
cancel: () =>
|
|
934
|
-
headerActions:
|
|
910
|
+
addToMyWorkspace: () => t.persistCurrent(),
|
|
911
|
+
cancel: () => t.stop(),
|
|
912
|
+
headerActions: r
|
|
935
913
|
};
|
|
936
914
|
}
|
|
915
|
+
}, Wt = { key: 0 }, Bt = { class: "px-1 py-0" }, Ut = { key: 0 }, $t = { key: 1 }, Ht = {
|
|
916
|
+
key: 3,
|
|
917
|
+
class: "d-flex w-full justify-space-between px-2 pt-2 pb-1"
|
|
918
|
+
}, zt = {
|
|
919
|
+
key: 4,
|
|
920
|
+
class: "d-flex w-full justify-end px-2 pt-2 pb-1"
|
|
937
921
|
};
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
return
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
)
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
922
|
+
function Gt(i, t, o, e, s, n) {
|
|
923
|
+
const d = b("VcsHelp"), l = b("v-row"), c = b("VcsFeatureTransforms"), C = b("VcsTextField"), u = b("v-col"), h = b("v-container"), w = b("VcsFormSection"), g = b("v-divider"), V = b("VcsLabel"), N = b("VcsSelect"), S = b("VcsSlider"), L = b("VcsFormButton");
|
|
924
|
+
return M(), B("div", null, [
|
|
925
|
+
e.viewshedMode === e.ViewshedPluginModes.CREATE ? (M(), B("div", Wt, [
|
|
926
|
+
e.viewshedType === e.ViewshedTypes.CONE ? (M(), D(d, { key: 0 }, {
|
|
927
|
+
default: f(() => [
|
|
928
|
+
F(
|
|
929
|
+
A(i.$t("viewshed.createDescription")),
|
|
930
|
+
1
|
|
931
|
+
/* TEXT */
|
|
932
|
+
)
|
|
933
|
+
]),
|
|
934
|
+
_: 1
|
|
935
|
+
/* STABLE */
|
|
936
|
+
})) : e.viewshedType === e.ViewshedTypes.THREESIXTY ? (M(), D(d, { key: 1 }, {
|
|
937
|
+
default: f(() => [
|
|
938
|
+
F(
|
|
939
|
+
A(i.$t("viewshed.createThreeSixtyDescription")),
|
|
940
|
+
1
|
|
941
|
+
/* TEXT */
|
|
942
|
+
)
|
|
943
|
+
]),
|
|
944
|
+
_: 1
|
|
945
|
+
/* STABLE */
|
|
946
|
+
})) : $("v-if", !0)
|
|
947
|
+
])) : e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? (M(), D(w, {
|
|
948
|
+
key: 1,
|
|
949
|
+
"header-actions": e.headerActions,
|
|
950
|
+
heading: "viewshed.viewpoint",
|
|
951
|
+
"action-button-list-overflow-count": 3
|
|
952
|
+
}, {
|
|
953
|
+
default: f(() => [
|
|
954
|
+
m(h, { class: "px-1 py-0" }, {
|
|
955
|
+
default: f(() => [
|
|
956
|
+
m(l, { "no-gutters": "" }, {
|
|
957
|
+
default: f(() => [
|
|
958
|
+
tt(
|
|
959
|
+
"span",
|
|
960
|
+
Bt,
|
|
961
|
+
A(i.$t("viewshed.position")),
|
|
962
|
+
1
|
|
963
|
+
/* TEXT */
|
|
964
|
+
)
|
|
965
|
+
]),
|
|
966
|
+
_: 1
|
|
967
|
+
/* STABLE */
|
|
968
|
+
}),
|
|
969
|
+
e.viewshedMode === e.ViewshedPluginModes.MOVE && e.heightMode === e.HeightModes.ABSOLUTE ? (M(), D(l, {
|
|
970
|
+
key: 0,
|
|
971
|
+
"no-gutters": ""
|
|
972
|
+
}, {
|
|
973
|
+
default: f(() => [
|
|
974
|
+
m(c, {
|
|
975
|
+
"transformation-mode": e.TransformationMode.TRANSLATE,
|
|
976
|
+
"feature-properties": { altitudeMode: "absolute" },
|
|
977
|
+
"allow-z-input": !0,
|
|
978
|
+
class: "w-100"
|
|
979
|
+
}, null, 8, ["transformation-mode"])
|
|
980
|
+
]),
|
|
981
|
+
_: 1
|
|
982
|
+
/* STABLE */
|
|
983
|
+
})) : (M(), D(l, {
|
|
984
|
+
key: 1,
|
|
985
|
+
"no-gutters": ""
|
|
986
|
+
}, {
|
|
987
|
+
default: f(() => [
|
|
988
|
+
(M(!0), B(
|
|
989
|
+
pe,
|
|
990
|
+
null,
|
|
991
|
+
we(e.position, (a, r, _) => (M(), D(
|
|
992
|
+
u,
|
|
993
|
+
{
|
|
994
|
+
key: _,
|
|
995
|
+
class: "pb-1"
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
default: f(() => [
|
|
999
|
+
m(C, {
|
|
1000
|
+
"model-value": a,
|
|
1001
|
+
"onUpdate:modelValue": (v) => e.setPosition(v, r, _),
|
|
1002
|
+
type: "number",
|
|
1003
|
+
prefix: r,
|
|
1004
|
+
step: r === "Z" ? 1 : 1e-4,
|
|
1005
|
+
unit: r === "Z" ? "m" : "°",
|
|
1006
|
+
decimals: r === "Z" ? 2 : 8,
|
|
1007
|
+
disabled: e.viewshedMode === e.ViewshedPluginModes.MOVE && !(r === "Z" && e.heightMode === e.HeightModes.RELATIVE),
|
|
1008
|
+
"hide-spin-buttons": !0
|
|
1009
|
+
}, null, 8, ["model-value", "onUpdate:modelValue", "prefix", "step", "unit", "decimals", "disabled"])
|
|
1010
|
+
]),
|
|
1011
|
+
_: 2
|
|
1012
|
+
/* DYNAMIC */
|
|
1013
|
+
},
|
|
1014
|
+
1024
|
|
1015
|
+
/* DYNAMIC_SLOTS */
|
|
1016
|
+
))),
|
|
1017
|
+
128
|
|
1018
|
+
/* KEYED_FRAGMENT */
|
|
1019
|
+
))
|
|
1020
|
+
]),
|
|
1021
|
+
_: 1
|
|
1022
|
+
/* STABLE */
|
|
1023
|
+
}))
|
|
1024
|
+
]),
|
|
1025
|
+
_: 1
|
|
1026
|
+
/* STABLE */
|
|
1027
|
+
})
|
|
1028
|
+
]),
|
|
1029
|
+
_: 1
|
|
1030
|
+
/* STABLE */
|
|
1031
|
+
}, 8, ["header-actions"])) : $("v-if", !0),
|
|
1032
|
+
m(g),
|
|
1033
|
+
m(h, { class: "px-1 py-0" }, {
|
|
1034
|
+
default: f(() => [
|
|
1035
|
+
m(l, { "no-gutters": "" }, {
|
|
1036
|
+
default: f(() => [
|
|
1037
|
+
m(u, null, {
|
|
1038
|
+
default: f(() => [
|
|
1039
|
+
m(V, { "html-for": "heightMode" }, {
|
|
1040
|
+
default: f(() => [
|
|
1041
|
+
F(
|
|
1042
|
+
A(i.$t("viewshed.heightMode")),
|
|
1043
|
+
1
|
|
1044
|
+
/* TEXT */
|
|
1045
|
+
)
|
|
1046
|
+
]),
|
|
1047
|
+
_: 1
|
|
1048
|
+
/* STABLE */
|
|
1049
|
+
})
|
|
1050
|
+
]),
|
|
1051
|
+
_: 1
|
|
1052
|
+
/* STABLE */
|
|
1053
|
+
}),
|
|
1054
|
+
m(u, null, {
|
|
1055
|
+
default: f(() => [
|
|
1056
|
+
m(N, {
|
|
1057
|
+
id: "heightMode",
|
|
1058
|
+
items: Object.values(e.HeightModes).map((a) => ({
|
|
1059
|
+
value: a,
|
|
1060
|
+
title: `viewshed.${a}`
|
|
1061
|
+
})),
|
|
1062
|
+
"model-value": e.heightMode,
|
|
1063
|
+
"onUpdate:modelValue": e.changeHeightMode
|
|
1064
|
+
}, null, 8, ["items", "model-value", "onUpdate:modelValue"])
|
|
1065
|
+
]),
|
|
1066
|
+
_: 1
|
|
1067
|
+
/* STABLE */
|
|
1068
|
+
})
|
|
1069
|
+
]),
|
|
1070
|
+
_: 1
|
|
1071
|
+
/* STABLE */
|
|
1072
|
+
})
|
|
1073
|
+
]),
|
|
1074
|
+
_: 1
|
|
1075
|
+
/* STABLE */
|
|
1076
|
+
}),
|
|
1077
|
+
e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? (M(), D(h, {
|
|
1078
|
+
key: 2,
|
|
1079
|
+
class: "px-1 pt-0 pb-2"
|
|
1080
|
+
}, {
|
|
1081
|
+
default: f(() => [
|
|
1082
|
+
(M(!0), B(
|
|
1083
|
+
pe,
|
|
1084
|
+
null,
|
|
1085
|
+
we(e.parameters, (a, r) => (M(), D(
|
|
1086
|
+
l,
|
|
1087
|
+
{
|
|
1088
|
+
"no-gutters": "",
|
|
1089
|
+
key: r
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
default: f(() => [
|
|
1093
|
+
r === "distance" || e.viewshedType === e.ViewshedTypes.CONE && r !== "showPrimitive" ? (M(), D(
|
|
1094
|
+
u,
|
|
1095
|
+
{ key: 0 },
|
|
1096
|
+
{
|
|
1097
|
+
default: f(() => [
|
|
1098
|
+
m(
|
|
1099
|
+
l,
|
|
1100
|
+
{
|
|
1101
|
+
"no-gutters": "",
|
|
1102
|
+
class: "px-1"
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
default: f(() => [
|
|
1106
|
+
m(
|
|
1107
|
+
u,
|
|
1108
|
+
null,
|
|
1109
|
+
{
|
|
1110
|
+
default: f(() => [
|
|
1111
|
+
m(V, {
|
|
1112
|
+
"html-for": r,
|
|
1113
|
+
class: "py-0"
|
|
1114
|
+
}, {
|
|
1115
|
+
default: f(() => [
|
|
1116
|
+
F(
|
|
1117
|
+
A(i.$t(`viewshed.${r}`)),
|
|
1118
|
+
1
|
|
1119
|
+
/* TEXT */
|
|
1120
|
+
)
|
|
1121
|
+
]),
|
|
1122
|
+
_: 2
|
|
1123
|
+
/* DYNAMIC */
|
|
1124
|
+
}, 1032, ["html-for"])
|
|
1125
|
+
]),
|
|
1126
|
+
_: 2
|
|
1127
|
+
/* DYNAMIC */
|
|
1128
|
+
},
|
|
1129
|
+
1024
|
|
1130
|
+
/* DYNAMIC_SLOTS */
|
|
1131
|
+
),
|
|
1132
|
+
m(
|
|
1133
|
+
u,
|
|
1134
|
+
{ class: "d-flex justify-end align-center" },
|
|
1135
|
+
{
|
|
1136
|
+
default: f(() => [
|
|
1137
|
+
r === "distance" ? (M(), B(
|
|
1138
|
+
"span",
|
|
1139
|
+
Ut,
|
|
1140
|
+
A(`${Math.round(a)} m`),
|
|
1141
|
+
1
|
|
1142
|
+
/* TEXT */
|
|
1143
|
+
)) : (M(), B(
|
|
1144
|
+
"span",
|
|
1145
|
+
$t,
|
|
1146
|
+
A(`${Math.round(a)} °`),
|
|
1147
|
+
1
|
|
1148
|
+
/* TEXT */
|
|
1149
|
+
))
|
|
1150
|
+
]),
|
|
1151
|
+
_: 2
|
|
1152
|
+
/* DYNAMIC */
|
|
1153
|
+
},
|
|
1154
|
+
1024
|
|
1155
|
+
/* DYNAMIC_SLOTS */
|
|
1156
|
+
)
|
|
1157
|
+
]),
|
|
1158
|
+
_: 2
|
|
1159
|
+
/* DYNAMIC */
|
|
1160
|
+
},
|
|
1161
|
+
1024
|
|
1162
|
+
/* DYNAMIC_SLOTS */
|
|
1163
|
+
),
|
|
1164
|
+
m(
|
|
1165
|
+
l,
|
|
1166
|
+
{ "no-gutters": "" },
|
|
1167
|
+
{
|
|
1168
|
+
default: f(() => [
|
|
1169
|
+
m(
|
|
1170
|
+
u,
|
|
1171
|
+
null,
|
|
1172
|
+
{
|
|
1173
|
+
default: f(() => [
|
|
1174
|
+
m(S, {
|
|
1175
|
+
id: r,
|
|
1176
|
+
class: "pa-0",
|
|
1177
|
+
"model-value": a,
|
|
1178
|
+
"onUpdate:modelValue": (_) => e.setParameter(r, _),
|
|
1179
|
+
type: "number",
|
|
1180
|
+
step: "1",
|
|
1181
|
+
min: e.parameterRanges[r][0],
|
|
1182
|
+
max: e.parameterRanges[r][1]
|
|
1183
|
+
}, null, 8, ["id", "model-value", "onUpdate:modelValue", "min", "max"])
|
|
1184
|
+
]),
|
|
1185
|
+
_: 2
|
|
1186
|
+
/* DYNAMIC */
|
|
1187
|
+
},
|
|
1188
|
+
1024
|
|
1189
|
+
/* DYNAMIC_SLOTS */
|
|
1190
|
+
)
|
|
1191
|
+
]),
|
|
1192
|
+
_: 2
|
|
1193
|
+
/* DYNAMIC */
|
|
1194
|
+
},
|
|
1195
|
+
1024
|
|
1196
|
+
/* DYNAMIC_SLOTS */
|
|
1197
|
+
)
|
|
1198
|
+
]),
|
|
1199
|
+
_: 2
|
|
1200
|
+
/* DYNAMIC */
|
|
1201
|
+
},
|
|
1202
|
+
1024
|
|
1203
|
+
/* DYNAMIC_SLOTS */
|
|
1204
|
+
)) : $("v-if", !0)
|
|
1205
|
+
]),
|
|
1206
|
+
_: 2
|
|
1207
|
+
/* DYNAMIC */
|
|
1208
|
+
},
|
|
1209
|
+
1024
|
|
1210
|
+
/* DYNAMIC_SLOTS */
|
|
1211
|
+
))),
|
|
1212
|
+
128
|
|
1213
|
+
/* KEYED_FRAGMENT */
|
|
1214
|
+
))
|
|
1215
|
+
]),
|
|
1216
|
+
_: 1
|
|
1217
|
+
/* STABLE */
|
|
1218
|
+
})) : $("v-if", !0),
|
|
1219
|
+
m(g),
|
|
1220
|
+
e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? (M(), B("div", Ht, [
|
|
1221
|
+
m(L, {
|
|
1222
|
+
onClick: t[0] || (t[0] = (a) => e.addToMyWorkspace()),
|
|
1223
|
+
tooltip: "viewshed.addToMyWorkspace",
|
|
1224
|
+
icon: "$vcsComponentsPlus",
|
|
1225
|
+
disabled: e.currentIsPersisted || void 0
|
|
1226
|
+
}, null, 8, ["disabled"]),
|
|
1227
|
+
m(L, {
|
|
1228
|
+
onClick: t[1] || (t[1] = (a) => e.createNewViewshed()),
|
|
1229
|
+
variant: "filled"
|
|
1230
|
+
}, {
|
|
1231
|
+
default: f(() => [
|
|
1232
|
+
F(
|
|
1233
|
+
A(i.$t("viewshed.new")),
|
|
1234
|
+
1
|
|
1235
|
+
/* TEXT */
|
|
1236
|
+
)
|
|
1237
|
+
]),
|
|
1238
|
+
_: 1
|
|
1239
|
+
/* STABLE */
|
|
1240
|
+
})
|
|
1241
|
+
])) : e.viewshedMode === e.ViewshedPluginModes.CREATE ? (M(), B("div", zt, [
|
|
1242
|
+
m(L, {
|
|
1243
|
+
onClick: t[2] || (t[2] = (a) => e.cancel()),
|
|
1244
|
+
variant: "outlined"
|
|
1245
|
+
}, {
|
|
1246
|
+
default: f(() => [
|
|
1247
|
+
F(
|
|
1248
|
+
A(i.$t("viewshed.cancel")),
|
|
1249
|
+
1
|
|
1250
|
+
/* TEXT */
|
|
1251
|
+
)
|
|
1252
|
+
]),
|
|
1253
|
+
_: 1
|
|
1254
|
+
/* STABLE */
|
|
1255
|
+
})
|
|
1256
|
+
])) : $("v-if", !0)
|
|
1257
|
+
]);
|
|
1258
|
+
}
|
|
1259
|
+
const Kt = /* @__PURE__ */ Se(jt, [["render", Gt]]), j = "@vcmap/viewshed", Yt = "3.0.1", Xt = "^6.0", se = {
|
|
1260
|
+
[p.CONE]: "$vcsViewshed",
|
|
1261
|
+
[p.THREESIXTY]: "$vcsViewshedCone"
|
|
967
1262
|
};
|
|
968
|
-
function
|
|
969
|
-
const
|
|
970
|
-
component:
|
|
1263
|
+
function Jt(i, t, o) {
|
|
1264
|
+
const e = U(), s = U(), n = `${o.id}-editor`, d = {
|
|
1265
|
+
component: Kt,
|
|
971
1266
|
provides: {
|
|
972
|
-
manager:
|
|
1267
|
+
manager: i
|
|
973
1268
|
},
|
|
974
1269
|
state: {
|
|
975
|
-
headerTitle:
|
|
976
|
-
headerIcon:
|
|
1270
|
+
headerTitle: e,
|
|
1271
|
+
headerIcon: s,
|
|
977
1272
|
styles: { width: "280px", height: "auto" },
|
|
978
|
-
infoUrlCallback:
|
|
1273
|
+
infoUrlCallback: t.getHelpUrlCallback("tools/viewshed.html")
|
|
979
1274
|
}
|
|
980
1275
|
};
|
|
981
|
-
|
|
982
|
-
editor: (
|
|
983
|
-
...
|
|
1276
|
+
ht(t, o, {
|
|
1277
|
+
editor: (w) => ({
|
|
1278
|
+
...d,
|
|
984
1279
|
props: {
|
|
985
|
-
selection:
|
|
986
|
-
getViewshed: () =>
|
|
1280
|
+
selection: o.selection,
|
|
1281
|
+
getViewshed: () => o.collection.getByKey(w.name)
|
|
987
1282
|
}
|
|
988
1283
|
})
|
|
989
1284
|
});
|
|
990
|
-
function
|
|
991
|
-
|
|
992
|
-
"viewshed.create",
|
|
993
|
-
`viewshed.${s.currentViewshed.value.type}`
|
|
994
|
-
] : t.value = [
|
|
1285
|
+
function l() {
|
|
1286
|
+
i.currentViewshed.value && (s.value = se[i.currentViewshed.value.type], i.currentIsPersisted.value ? e.value = i.currentViewshed.value.properties.title : i.mode.value === y.CREATE ? e.value = `viewshed.create.${i.currentViewshed.value.type}` : e.value = [
|
|
995
1287
|
"viewshed.temporary",
|
|
996
|
-
`viewshed.${
|
|
1288
|
+
`viewshed.${i.currentViewshed.value.type}`
|
|
997
1289
|
]);
|
|
998
1290
|
}
|
|
999
|
-
function
|
|
1000
|
-
|
|
1291
|
+
function c() {
|
|
1292
|
+
l(), i.currentViewshed.value && !i.currentIsPersisted.value && (i.mode.value === y.EDIT || i.mode.value === y.MOVE || i.mode.value === y.CREATE) && (t.windowManager.has(n) || t.windowManager.add(
|
|
1001
1293
|
{
|
|
1002
|
-
...
|
|
1294
|
+
...d,
|
|
1003
1295
|
id: n,
|
|
1004
1296
|
parentId: "category-manager",
|
|
1005
|
-
slot:
|
|
1297
|
+
slot: ft.DYNAMIC_CHILD
|
|
1006
1298
|
},
|
|
1007
|
-
|
|
1299
|
+
j
|
|
1008
1300
|
));
|
|
1009
1301
|
}
|
|
1010
|
-
const
|
|
1011
|
-
|
|
1012
|
-
}),
|
|
1013
|
-
|
|
1014
|
-
}),
|
|
1015
|
-
|
|
1302
|
+
const C = z(i.currentViewshed, (w) => {
|
|
1303
|
+
w && c();
|
|
1304
|
+
}), u = z(i.currentIsPersisted, (w) => {
|
|
1305
|
+
w && l();
|
|
1306
|
+
}), h = z(i.mode, () => {
|
|
1307
|
+
i.mode.value ? c() : t.windowManager.remove(n);
|
|
1016
1308
|
});
|
|
1017
1309
|
return {
|
|
1018
1310
|
destroy() {
|
|
1019
|
-
|
|
1311
|
+
t.windowManager.remove(n), C(), h(), u();
|
|
1020
1312
|
}
|
|
1021
1313
|
};
|
|
1022
1314
|
}
|
|
1023
|
-
function
|
|
1024
|
-
const
|
|
1025
|
-
type:
|
|
1026
|
-
action:
|
|
1027
|
-
name:
|
|
1315
|
+
function Zt(i, t, o, e) {
|
|
1316
|
+
const s = {
|
|
1317
|
+
type: mt.SELECT,
|
|
1318
|
+
action: q({
|
|
1319
|
+
name: o,
|
|
1028
1320
|
currentIndex: 0,
|
|
1029
1321
|
active: !1,
|
|
1030
1322
|
background: !1,
|
|
1031
1323
|
disabled: !1,
|
|
1032
1324
|
callback() {
|
|
1033
1325
|
if (this.active)
|
|
1034
|
-
this.background &&
|
|
1326
|
+
this.background && t.currentViewshed.value ? t.editViewshed(t.currentViewshed.value) : t.stop();
|
|
1035
1327
|
else {
|
|
1036
|
-
const
|
|
1037
|
-
|
|
1328
|
+
const c = this.tools[this.currentIndex].name;
|
|
1329
|
+
t.createViewshed(c);
|
|
1038
1330
|
}
|
|
1039
1331
|
},
|
|
1040
|
-
selected(
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
e.createViewshed(f);
|
|
1045
|
-
}
|
|
1332
|
+
selected(c) {
|
|
1333
|
+
c !== this.currentIndex && (this.currentIndex = c);
|
|
1334
|
+
const C = this.tools[this.currentIndex].name;
|
|
1335
|
+
t.createViewshed(C);
|
|
1046
1336
|
},
|
|
1047
|
-
tools:
|
|
1048
|
-
name:
|
|
1049
|
-
icon:
|
|
1050
|
-
title: `viewshed.${
|
|
1051
|
-
} :
|
|
1052
|
-
name:
|
|
1053
|
-
icon:
|
|
1054
|
-
title: `viewshed.${
|
|
1337
|
+
tools: e.flatMap((c) => c === p.CONE ? {
|
|
1338
|
+
name: p.CONE,
|
|
1339
|
+
icon: se[p.CONE],
|
|
1340
|
+
title: `viewshed.create.${p.CONE}`
|
|
1341
|
+
} : c === p.THREESIXTY ? {
|
|
1342
|
+
name: p.THREESIXTY,
|
|
1343
|
+
icon: se[p.THREESIXTY],
|
|
1344
|
+
title: `viewshed.create.${p.THREESIXTY}`
|
|
1055
1345
|
} : [])
|
|
1056
1346
|
})
|
|
1057
|
-
}, n =
|
|
1058
|
-
|
|
1059
|
-
}),
|
|
1060
|
-
|
|
1061
|
-
(
|
|
1062
|
-
|
|
1063
|
-
(
|
|
1347
|
+
}, n = z(t.mode, (c) => {
|
|
1348
|
+
c === y.VIEW ? (s.action.background = !0, s.action.active = !0) : c ? (s.action.background = !1, s.action.active = !0) : (s.action.background = !1, s.action.active = !1);
|
|
1349
|
+
}), d = z(
|
|
1350
|
+
t.currentViewshed,
|
|
1351
|
+
(c) => {
|
|
1352
|
+
c && (s.action.currentIndex = s.action.tools.findIndex(
|
|
1353
|
+
(C) => C.name === c.type
|
|
1064
1354
|
));
|
|
1065
1355
|
}
|
|
1066
|
-
),
|
|
1067
|
-
|
|
1356
|
+
), l = i.maps.mapActivated.addEventListener((c) => {
|
|
1357
|
+
c instanceof G ? s.action.disabled = !1 : s.action.disabled = !0;
|
|
1068
1358
|
});
|
|
1069
1359
|
return {
|
|
1070
1360
|
destroy() {
|
|
1071
|
-
n(),
|
|
1361
|
+
n(), d(), l();
|
|
1072
1362
|
},
|
|
1073
|
-
toolbox:
|
|
1363
|
+
toolbox: s
|
|
1074
1364
|
};
|
|
1075
1365
|
}
|
|
1076
|
-
function
|
|
1077
|
-
|
|
1078
|
-
const { toolbox:
|
|
1366
|
+
function qt(i, t, o, e) {
|
|
1367
|
+
re(e, [Pt(p)]);
|
|
1368
|
+
const { toolbox: s, destroy: n } = Zt(i, t, o, e), d = i.toolboxManager.add(s, o).id;
|
|
1079
1369
|
return () => {
|
|
1080
|
-
|
|
1370
|
+
i.toolboxManager.remove(d), n();
|
|
1081
1371
|
};
|
|
1082
1372
|
}
|
|
1083
|
-
class
|
|
1373
|
+
class ne extends Ue {
|
|
1084
1374
|
static get className() {
|
|
1085
1375
|
return "ViewshedCategory";
|
|
1086
1376
|
}
|
|
1087
|
-
async _deserializeItem(
|
|
1088
|
-
var
|
|
1089
|
-
|
|
1377
|
+
async _deserializeItem(t) {
|
|
1378
|
+
var e;
|
|
1379
|
+
if (
|
|
1090
1380
|
/** @type {import("@vcmap/core").CesiumMap | undefined} */
|
|
1091
|
-
(
|
|
1092
|
-
)
|
|
1093
|
-
|
|
1094
|
-
return new T(e, i);
|
|
1381
|
+
(e = this._app) == null ? void 0 : e.maps.getByType(G.className)[0]
|
|
1382
|
+
)
|
|
1383
|
+
return new x(t);
|
|
1095
1384
|
throw new Error("No CesiumMap available");
|
|
1096
1385
|
}
|
|
1097
1386
|
}
|
|
1098
|
-
function
|
|
1099
|
-
let
|
|
1100
|
-
const
|
|
1101
|
-
|
|
1387
|
+
function Qt(i, t) {
|
|
1388
|
+
let o, e = 0;
|
|
1389
|
+
const s = new Set(
|
|
1390
|
+
t.filter((n) => n.type === i).map((n) => n.properties.title)
|
|
1102
1391
|
);
|
|
1103
1392
|
do
|
|
1104
|
-
|
|
1105
|
-
while (!
|
|
1106
|
-
return
|
|
1393
|
+
e += 1, s.has(`${i}-${e}`) || (o = `${i}-${e}`);
|
|
1394
|
+
while (!o);
|
|
1395
|
+
return o;
|
|
1107
1396
|
}
|
|
1108
|
-
async function
|
|
1109
|
-
const
|
|
1397
|
+
async function ei(i) {
|
|
1398
|
+
const t = new Y(), o = new Y(), { collectionComponent: e, category: s } = await i.categoryManager.requestCategory(
|
|
1110
1399
|
{
|
|
1111
|
-
type:
|
|
1400
|
+
type: ne.className,
|
|
1112
1401
|
name: "Viewsheds",
|
|
1113
|
-
title: "
|
|
1402
|
+
title: "viewshed.viewshedCategory"
|
|
1114
1403
|
},
|
|
1115
|
-
|
|
1404
|
+
j,
|
|
1116
1405
|
{
|
|
1117
1406
|
selectable: !0,
|
|
1118
1407
|
renamable: !0,
|
|
1119
1408
|
removable: !0
|
|
1120
1409
|
}
|
|
1121
1410
|
);
|
|
1122
|
-
|
|
1123
|
-
mappingFunction:
|
|
1124
|
-
[
|
|
1125
|
-
|
|
1411
|
+
e.addItemMapping({
|
|
1412
|
+
mappingFunction: vt(
|
|
1413
|
+
[G.className],
|
|
1414
|
+
i.maps
|
|
1126
1415
|
),
|
|
1127
|
-
owner:
|
|
1416
|
+
owner: j
|
|
1128
1417
|
});
|
|
1129
|
-
const n = (
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
},
|
|
1133
|
-
|
|
1418
|
+
const n = (u, h, w) => {
|
|
1419
|
+
w.title = u.properties.title, w.titleChanged = (g) => {
|
|
1420
|
+
u.properties.title = g, w.title = g, t.raiseEvent({ item: u, title: g });
|
|
1421
|
+
}, w.actions.push(
|
|
1422
|
+
q({
|
|
1134
1423
|
name: "visibilityAction",
|
|
1135
1424
|
icon: "$vcsCheckbox",
|
|
1136
1425
|
callback() {
|
|
1137
|
-
|
|
1426
|
+
o.raiseEvent(u);
|
|
1138
1427
|
}
|
|
1139
1428
|
})
|
|
1140
1429
|
);
|
|
1141
1430
|
};
|
|
1142
|
-
|
|
1431
|
+
i.categoryManager.addMappingFunction(
|
|
1143
1432
|
() => !0,
|
|
1144
1433
|
n,
|
|
1145
|
-
|
|
1146
|
-
[
|
|
1434
|
+
j,
|
|
1435
|
+
[e.id]
|
|
1147
1436
|
);
|
|
1148
|
-
const { action:
|
|
1149
|
-
|
|
1437
|
+
const { action: d, destroy: l } = pt(
|
|
1438
|
+
e.selection,
|
|
1150
1439
|
() => {
|
|
1151
|
-
const
|
|
1152
|
-
(
|
|
1440
|
+
const u = e.selection.value.map(
|
|
1441
|
+
(h) => e.collection.getByKey(h.name)
|
|
1153
1442
|
);
|
|
1154
|
-
|
|
1443
|
+
wt(JSON.stringify(u), "viewsheds.json");
|
|
1155
1444
|
},
|
|
1156
|
-
|
|
1157
|
-
), { action:
|
|
1158
|
-
async (
|
|
1159
|
-
const { vueI18n:
|
|
1160
|
-
|
|
1161
|
-
const
|
|
1445
|
+
j
|
|
1446
|
+
), { action: c, destroy: C } = gt(
|
|
1447
|
+
async (u) => {
|
|
1448
|
+
const { vueI18n: h } = i, g = (await Promise.all(
|
|
1449
|
+
u.map(async (S) => {
|
|
1450
|
+
const L = await S.text();
|
|
1162
1451
|
try {
|
|
1163
|
-
return JSON.parse(
|
|
1452
|
+
return JSON.parse(L).map((r) => new x(r));
|
|
1164
1453
|
} catch {
|
|
1165
|
-
|
|
1166
|
-
type:
|
|
1167
|
-
message:
|
|
1168
|
-
fileName:
|
|
1454
|
+
i.notifier.add({
|
|
1455
|
+
type: X.ERROR,
|
|
1456
|
+
message: h.t("components.import.failure", {
|
|
1457
|
+
fileName: S.name
|
|
1169
1458
|
})
|
|
1170
1459
|
});
|
|
1171
1460
|
}
|
|
1172
1461
|
return [];
|
|
1173
1462
|
})
|
|
1174
|
-
)).flat(),
|
|
1175
|
-
if (
|
|
1176
|
-
return
|
|
1177
|
-
type:
|
|
1178
|
-
message:
|
|
1463
|
+
)).flat(), V = g.map((S) => s.collection.add(S)).filter((S) => S != null), N = g.length - V.length;
|
|
1464
|
+
if (N > 0)
|
|
1465
|
+
return i.notifier.add({
|
|
1466
|
+
type: X.WARNING,
|
|
1467
|
+
message: h.t("components.import.addFailure", [N])
|
|
1179
1468
|
}), !1;
|
|
1180
|
-
if (
|
|
1181
|
-
|
|
1182
|
-
type:
|
|
1183
|
-
message:
|
|
1184
|
-
|
|
1469
|
+
if (V.length > 0)
|
|
1470
|
+
i.notifier.add({
|
|
1471
|
+
type: X.SUCCESS,
|
|
1472
|
+
message: h.t("components.import.featuresAdded", [
|
|
1473
|
+
V.length
|
|
1185
1474
|
])
|
|
1186
1475
|
});
|
|
1187
1476
|
else
|
|
1188
|
-
return
|
|
1189
|
-
type:
|
|
1190
|
-
message:
|
|
1477
|
+
return i.notifier.add({
|
|
1478
|
+
type: X.ERROR,
|
|
1479
|
+
message: h.t("components.import.nothingAdded")
|
|
1191
1480
|
}), !1;
|
|
1192
1481
|
return !0;
|
|
1193
1482
|
},
|
|
1194
|
-
|
|
1195
|
-
|
|
1483
|
+
i.windowManager,
|
|
1484
|
+
j,
|
|
1196
1485
|
"category-manager"
|
|
1197
1486
|
);
|
|
1198
|
-
return
|
|
1199
|
-
renamed:
|
|
1200
|
-
visibilityChanged:
|
|
1201
|
-
setSelection(
|
|
1202
|
-
|
|
1487
|
+
return e.addActions([d, c]), {
|
|
1488
|
+
renamed: t,
|
|
1489
|
+
visibilityChanged: o,
|
|
1490
|
+
setSelection(u) {
|
|
1491
|
+
u && (e.selection.value = e.items.value.filter((h) => u === h.name));
|
|
1203
1492
|
},
|
|
1204
1493
|
clearSelection() {
|
|
1205
|
-
|
|
1494
|
+
e.selection.value.length && (e.selection.value = []);
|
|
1206
1495
|
},
|
|
1207
|
-
setVisibility(
|
|
1208
|
-
const
|
|
1209
|
-
(
|
|
1496
|
+
setVisibility(u, h) {
|
|
1497
|
+
const w = e.items.value.find(
|
|
1498
|
+
(g) => u === g.name
|
|
1210
1499
|
);
|
|
1211
|
-
if (
|
|
1212
|
-
const
|
|
1213
|
-
(
|
|
1500
|
+
if (w) {
|
|
1501
|
+
const g = w.actions.find(
|
|
1502
|
+
(V) => V.name === "visibilityAction"
|
|
1214
1503
|
);
|
|
1215
|
-
|
|
1504
|
+
g && (g.icon = h ? "$vcsCheckboxChecked" : "$vcsCheckbox");
|
|
1216
1505
|
}
|
|
1217
1506
|
},
|
|
1218
|
-
add(
|
|
1219
|
-
|
|
1220
|
-
|
|
1507
|
+
add(u) {
|
|
1508
|
+
u.properties.title = Qt(
|
|
1509
|
+
u.type,
|
|
1221
1510
|
/** @type {import("./viewshed.js").default[]} */
|
|
1222
1511
|
[
|
|
1223
|
-
...
|
|
1512
|
+
...s.collection
|
|
1224
1513
|
]
|
|
1225
|
-
),
|
|
1514
|
+
), s.collection.add(u);
|
|
1226
1515
|
},
|
|
1227
|
-
remove(
|
|
1228
|
-
const
|
|
1229
|
-
|
|
1516
|
+
remove(u) {
|
|
1517
|
+
const h = s.collection.getByKey(u);
|
|
1518
|
+
h && s.collection.remove(h);
|
|
1230
1519
|
},
|
|
1231
|
-
collectionComponent:
|
|
1520
|
+
collectionComponent: e,
|
|
1232
1521
|
destroy() {
|
|
1233
|
-
|
|
1522
|
+
i.categoryManager.removeOwner(j), t.destroy(), o.destroy(), l(), C();
|
|
1234
1523
|
}
|
|
1235
1524
|
};
|
|
1236
1525
|
}
|
|
1237
|
-
function
|
|
1526
|
+
function J() {
|
|
1238
1527
|
return {
|
|
1239
|
-
visibleColor:
|
|
1240
|
-
shadowColor:
|
|
1241
|
-
tools: [...Object.values(
|
|
1528
|
+
visibleColor: x.getDefaultOptions().visibleColor,
|
|
1529
|
+
shadowColor: x.getDefaultOptions().shadowColor,
|
|
1530
|
+
tools: [...Object.values(p)]
|
|
1242
1531
|
};
|
|
1243
1532
|
}
|
|
1244
|
-
const
|
|
1533
|
+
const ti = {
|
|
1245
1534
|
name: "ViewshedConfigEditor",
|
|
1246
|
-
title: "Viewshed Editor",
|
|
1247
1535
|
components: {
|
|
1248
|
-
AbstractConfigEditor:
|
|
1249
|
-
VcsFormSection:
|
|
1250
|
-
VContainer:
|
|
1251
|
-
VRow:
|
|
1252
|
-
VCol:
|
|
1253
|
-
VcsLabel:
|
|
1254
|
-
VcsSelect:
|
|
1255
|
-
VColorPicker:
|
|
1536
|
+
AbstractConfigEditor: _t,
|
|
1537
|
+
VcsFormSection: Ce,
|
|
1538
|
+
VContainer: ye,
|
|
1539
|
+
VRow: Ve,
|
|
1540
|
+
VCol: be,
|
|
1541
|
+
VcsLabel: _e,
|
|
1542
|
+
VcsSelect: Ee,
|
|
1543
|
+
VColorPicker: Et
|
|
1256
1544
|
},
|
|
1257
1545
|
props: {
|
|
1258
1546
|
getConfig: {
|
|
@@ -1264,134 +1552,248 @@ const Rt = {
|
|
|
1264
1552
|
required: !0
|
|
1265
1553
|
}
|
|
1266
1554
|
},
|
|
1267
|
-
setup(
|
|
1268
|
-
const
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
});
|
|
1272
|
-
async function i() {
|
|
1273
|
-
await s.setConfig(e.value);
|
|
1555
|
+
setup(i) {
|
|
1556
|
+
const t = i.getConfig(), o = U({ ...J(), ...t });
|
|
1557
|
+
function e() {
|
|
1558
|
+
i.setConfig(o.value);
|
|
1274
1559
|
}
|
|
1275
1560
|
return {
|
|
1276
|
-
localConfig:
|
|
1277
|
-
ViewshedTypes:
|
|
1278
|
-
apply:
|
|
1279
|
-
toolItems: Object.values(
|
|
1280
|
-
value:
|
|
1281
|
-
|
|
1561
|
+
localConfig: o,
|
|
1562
|
+
ViewshedTypes: p,
|
|
1563
|
+
apply: e,
|
|
1564
|
+
toolItems: Object.values(p).map((s) => ({
|
|
1565
|
+
value: s,
|
|
1566
|
+
title: `viewshed.${s}`
|
|
1282
1567
|
}))
|
|
1283
1568
|
};
|
|
1284
1569
|
}
|
|
1285
1570
|
};
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
return
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
)
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1571
|
+
function ii(i, t, o, e, s, n) {
|
|
1572
|
+
const d = b("VcsLabel"), l = b("v-col"), c = b("VcsSelect"), C = b("v-row"), u = b("VColorPicker"), h = b("v-container"), w = b("VcsFormSection"), g = b("AbstractConfigEditor");
|
|
1573
|
+
return M(), D(g, it({ onSubmit: e.apply }, { ...i.$attrs, ...i.$props }), {
|
|
1574
|
+
default: f(() => [
|
|
1575
|
+
e.localConfig ? (M(), D(w, {
|
|
1576
|
+
key: 0,
|
|
1577
|
+
heading: "viewshed.editor.general"
|
|
1578
|
+
}, {
|
|
1579
|
+
default: f(() => [
|
|
1580
|
+
m(h, { class: "px-1 py-0" }, {
|
|
1581
|
+
default: f(() => [
|
|
1582
|
+
m(C, { "no-gutters": "" }, {
|
|
1583
|
+
default: f(() => [
|
|
1584
|
+
m(l, null, {
|
|
1585
|
+
default: f(() => [
|
|
1586
|
+
m(d, { "html-for": "viewshed-editor-tools" }, {
|
|
1587
|
+
default: f(() => [
|
|
1588
|
+
F(
|
|
1589
|
+
A(i.$t("viewshed.editor.tools")),
|
|
1590
|
+
1
|
|
1591
|
+
/* TEXT */
|
|
1592
|
+
)
|
|
1593
|
+
]),
|
|
1594
|
+
_: 1
|
|
1595
|
+
/* STABLE */
|
|
1596
|
+
})
|
|
1597
|
+
]),
|
|
1598
|
+
_: 1
|
|
1599
|
+
/* STABLE */
|
|
1600
|
+
}),
|
|
1601
|
+
m(l, null, {
|
|
1602
|
+
default: f(() => [
|
|
1603
|
+
m(c, {
|
|
1604
|
+
id: "viewshed-tools",
|
|
1605
|
+
items: e.toolItems,
|
|
1606
|
+
modelValue: e.localConfig.tools,
|
|
1607
|
+
"onUpdate:modelValue": t[0] || (t[0] = (V) => e.localConfig.tools = V),
|
|
1608
|
+
multiple: !0
|
|
1609
|
+
}, null, 8, ["items", "modelValue"])
|
|
1610
|
+
]),
|
|
1611
|
+
_: 1
|
|
1612
|
+
/* STABLE */
|
|
1613
|
+
})
|
|
1614
|
+
]),
|
|
1615
|
+
_: 1
|
|
1616
|
+
/* STABLE */
|
|
1617
|
+
}),
|
|
1618
|
+
m(C, { "no-gutters": "" }, {
|
|
1619
|
+
default: f(() => [
|
|
1620
|
+
m(l, null, {
|
|
1621
|
+
default: f(() => [
|
|
1622
|
+
m(d, { "html-for": "viewshed-editor-visible-color" }, {
|
|
1623
|
+
default: f(() => [
|
|
1624
|
+
F(
|
|
1625
|
+
A(i.$t("viewshed.editor.visibleColor")),
|
|
1626
|
+
1
|
|
1627
|
+
/* TEXT */
|
|
1628
|
+
)
|
|
1629
|
+
]),
|
|
1630
|
+
_: 1
|
|
1631
|
+
/* STABLE */
|
|
1632
|
+
})
|
|
1633
|
+
]),
|
|
1634
|
+
_: 1
|
|
1635
|
+
/* STABLE */
|
|
1636
|
+
}),
|
|
1637
|
+
m(l, null, {
|
|
1638
|
+
default: f(() => [
|
|
1639
|
+
m(u, {
|
|
1640
|
+
modelValue: e.localConfig.visibleColor,
|
|
1641
|
+
"onUpdate:modelValue": t[1] || (t[1] = (V) => e.localConfig.visibleColor = V),
|
|
1642
|
+
mode: "rgba"
|
|
1643
|
+
}, null, 8, ["modelValue"])
|
|
1644
|
+
]),
|
|
1645
|
+
_: 1
|
|
1646
|
+
/* STABLE */
|
|
1647
|
+
})
|
|
1648
|
+
]),
|
|
1649
|
+
_: 1
|
|
1650
|
+
/* STABLE */
|
|
1651
|
+
}),
|
|
1652
|
+
m(C, { "no-gutters": "" }, {
|
|
1653
|
+
default: f(() => [
|
|
1654
|
+
m(l, null, {
|
|
1655
|
+
default: f(() => [
|
|
1656
|
+
m(d, { "html-for": "viewshed-editor-shadow-color" }, {
|
|
1657
|
+
default: f(() => [
|
|
1658
|
+
F(
|
|
1659
|
+
A(i.$t("viewshed.editor.shadowColor")),
|
|
1660
|
+
1
|
|
1661
|
+
/* TEXT */
|
|
1662
|
+
)
|
|
1663
|
+
]),
|
|
1664
|
+
_: 1
|
|
1665
|
+
/* STABLE */
|
|
1666
|
+
})
|
|
1667
|
+
]),
|
|
1668
|
+
_: 1
|
|
1669
|
+
/* STABLE */
|
|
1670
|
+
}),
|
|
1671
|
+
m(l, null, {
|
|
1672
|
+
default: f(() => [
|
|
1673
|
+
m(u, {
|
|
1674
|
+
modelValue: e.localConfig.shadowColor,
|
|
1675
|
+
"onUpdate:modelValue": t[2] || (t[2] = (V) => e.localConfig.shadowColor = V),
|
|
1676
|
+
mode: "rgba"
|
|
1677
|
+
}, null, 8, ["modelValue"])
|
|
1678
|
+
]),
|
|
1679
|
+
_: 1
|
|
1680
|
+
/* STABLE */
|
|
1681
|
+
})
|
|
1682
|
+
]),
|
|
1683
|
+
_: 1
|
|
1684
|
+
/* STABLE */
|
|
1685
|
+
})
|
|
1686
|
+
]),
|
|
1687
|
+
_: 1
|
|
1688
|
+
/* STABLE */
|
|
1689
|
+
})
|
|
1690
|
+
]),
|
|
1691
|
+
_: 1
|
|
1692
|
+
/* STABLE */
|
|
1693
|
+
})) : $("v-if", !0)
|
|
1694
|
+
]),
|
|
1695
|
+
_: 1
|
|
1696
|
+
/* STABLE */
|
|
1697
|
+
}, 16, ["onSubmit"]);
|
|
1698
|
+
}
|
|
1699
|
+
const oi = /* @__PURE__ */ Se(ti, [["render", ii]]);
|
|
1700
|
+
function ui(i) {
|
|
1701
|
+
let t, o, e = () => {
|
|
1308
1702
|
};
|
|
1309
1703
|
return {
|
|
1310
1704
|
get name() {
|
|
1311
|
-
return
|
|
1705
|
+
return j;
|
|
1312
1706
|
},
|
|
1313
1707
|
get version() {
|
|
1314
|
-
return
|
|
1708
|
+
return Yt;
|
|
1315
1709
|
},
|
|
1316
1710
|
get mapVersion() {
|
|
1317
|
-
return
|
|
1711
|
+
return Xt;
|
|
1318
1712
|
},
|
|
1319
1713
|
/**
|
|
1320
1714
|
* @param {import("@vcmap/ui").VcsUiApp} vcsUiApp
|
|
1321
1715
|
* @param {ViewshedPluginState=} state
|
|
1322
1716
|
* @returns {Promise<void>}
|
|
1323
1717
|
*/
|
|
1324
|
-
async initialize(
|
|
1325
|
-
|
|
1326
|
-
this[
|
|
1327
|
-
|
|
1328
|
-
|
|
1718
|
+
async initialize(s, n) {
|
|
1719
|
+
o = s, s.categoryClassRegistry.registerClass(
|
|
1720
|
+
this[$e],
|
|
1721
|
+
ne.className,
|
|
1722
|
+
ne
|
|
1329
1723
|
);
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1332
|
-
t,
|
|
1724
|
+
const d = await ei(s);
|
|
1725
|
+
t = Lt(
|
|
1333
1726
|
s,
|
|
1334
|
-
|
|
1727
|
+
i,
|
|
1728
|
+
d
|
|
1335
1729
|
);
|
|
1336
|
-
const l =
|
|
1730
|
+
const l = qt(
|
|
1731
|
+
s,
|
|
1337
1732
|
t,
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
), { destroy: c } = Tt(
|
|
1342
|
-
e,
|
|
1733
|
+
j,
|
|
1734
|
+
i.tools || J().tools
|
|
1735
|
+
), { destroy: c } = Jt(
|
|
1343
1736
|
t,
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1737
|
+
s,
|
|
1738
|
+
d.collectionComponent
|
|
1739
|
+
), { activeMap: C } = s.maps;
|
|
1740
|
+
function u(g) {
|
|
1741
|
+
if (n != null && n.m && n.cv && g instanceof G) {
|
|
1742
|
+
n.cv.properties.title && delete n.cv.properties.title;
|
|
1743
|
+
const V = new x(n.cv);
|
|
1744
|
+
n.m === y.VIEW ? t.viewViewshed(V) : t.editViewshed(V);
|
|
1350
1745
|
}
|
|
1351
1746
|
}
|
|
1352
1747
|
let h = !1;
|
|
1353
|
-
|
|
1354
|
-
const
|
|
1355
|
-
(
|
|
1356
|
-
|
|
1748
|
+
C && (h = !0, u(C));
|
|
1749
|
+
const w = s.maps.mapActivated.addEventListener(
|
|
1750
|
+
(g) => {
|
|
1751
|
+
t.stop(), h || (u(g), h = !0);
|
|
1357
1752
|
}
|
|
1358
1753
|
);
|
|
1359
|
-
|
|
1360
|
-
|
|
1754
|
+
e = () => {
|
|
1755
|
+
w(), l(), c(), d.destroy(), t.destroy();
|
|
1361
1756
|
};
|
|
1362
1757
|
},
|
|
1363
1758
|
/**
|
|
1364
1759
|
* should return all default values of the configuration
|
|
1365
1760
|
* @returns {ViewshedPluginOptions}
|
|
1366
1761
|
*/
|
|
1367
|
-
getDefaultOptions:
|
|
1762
|
+
getDefaultOptions: J,
|
|
1368
1763
|
/**
|
|
1369
1764
|
* should return the plugin's serialization excluding all default values
|
|
1370
1765
|
* @returns {ViewshedPluginOptions}
|
|
1371
1766
|
*/
|
|
1372
1767
|
toJSON() {
|
|
1373
|
-
const
|
|
1374
|
-
return
|
|
1768
|
+
const s = {};
|
|
1769
|
+
return i.tools && J().tools.length !== i.tools.length && (s.tools = [...i.tools]), i.shadowColor && i.shadowColor !== x.getDefaultOptions().shadowColor && (s.shadowColor = i.shadowColor), i.visibleColor && i.visibleColor !== x.getDefaultOptions().visibleColor && (s.visibleColor = i.visibleColor), s;
|
|
1375
1770
|
},
|
|
1376
1771
|
/**
|
|
1377
1772
|
* should return the plugins state
|
|
1378
1773
|
* @returns {ViewshedPluginState}
|
|
1379
1774
|
*/
|
|
1380
1775
|
getState() {
|
|
1381
|
-
var
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
currentViewshed: (t = e.currentViewshed.value) == null ? void 0 : t.toJSON()
|
|
1385
|
-
};
|
|
1776
|
+
var l;
|
|
1777
|
+
const s = {}, n = t.mode.value, d = (l = t.currentViewshed.value) == null ? void 0 : l.toJSON();
|
|
1778
|
+
return n !== null && n !== "create" && d && (s.m = n, s.cv = d), s;
|
|
1386
1779
|
},
|
|
1387
1780
|
/**
|
|
1388
1781
|
* components for configuring the plugin and/ or custom items defined by the plugin
|
|
1389
1782
|
* @returns {Array<import("@vcmap/ui").PluginConfigEditor>}
|
|
1390
1783
|
*/
|
|
1391
1784
|
getConfigEditors() {
|
|
1392
|
-
return [
|
|
1785
|
+
return [
|
|
1786
|
+
{
|
|
1787
|
+
component: oi,
|
|
1788
|
+
title: "viewshed.editor.title",
|
|
1789
|
+
infoUrlCallback: o == null ? void 0 : o.getHelpUrlCallback(
|
|
1790
|
+
"/components/plugins/viewshedToolConfig.html",
|
|
1791
|
+
"app-configurator"
|
|
1792
|
+
)
|
|
1793
|
+
}
|
|
1794
|
+
];
|
|
1393
1795
|
},
|
|
1394
|
-
destroy:
|
|
1796
|
+
destroy: () => e(),
|
|
1395
1797
|
i18n: {
|
|
1396
1798
|
en: {
|
|
1397
1799
|
viewshed: {
|
|
@@ -1402,15 +1804,18 @@ function zt(s) {
|
|
|
1402
1804
|
position: "Position",
|
|
1403
1805
|
showPrimitive: "Show viewpoint",
|
|
1404
1806
|
viewpoint: "Viewpoint",
|
|
1405
|
-
|
|
1807
|
+
viewshedCategory: "Viewsheds",
|
|
1406
1808
|
heightMode: "Height mode",
|
|
1407
|
-
relative: "
|
|
1809
|
+
relative: "Relative to ground",
|
|
1408
1810
|
absolute: "Absolute",
|
|
1409
1811
|
new: "New",
|
|
1410
1812
|
cancel: "Cancel",
|
|
1411
|
-
[
|
|
1412
|
-
[
|
|
1413
|
-
create:
|
|
1813
|
+
[p.CONE]: "Cone viewshed analysis",
|
|
1814
|
+
[p.THREESIXTY]: "360° viewshed analysis",
|
|
1815
|
+
create: {
|
|
1816
|
+
[p.CONE]: "Create cone viewshed analysis",
|
|
1817
|
+
[p.THREESIXTY]: "Create 360° viewshed analysis"
|
|
1818
|
+
},
|
|
1414
1819
|
addToMyWorkspace: "Add to My Workspace",
|
|
1415
1820
|
temporary: "Temporary",
|
|
1416
1821
|
jumpToViewpoint: "Jump to viewpoint",
|
|
@@ -1420,6 +1825,7 @@ function zt(s) {
|
|
|
1420
1825
|
createThreeSixtyDescription: "Click the map twice. First click places the origin, second defines the distance of the viewshed.",
|
|
1421
1826
|
remove: "Remove",
|
|
1422
1827
|
editor: {
|
|
1828
|
+
title: "Viewshed Editor",
|
|
1423
1829
|
general: "General Settings",
|
|
1424
1830
|
visibleColor: "Visible color",
|
|
1425
1831
|
shadowColor: "Shadow color",
|
|
@@ -1434,26 +1840,30 @@ function zt(s) {
|
|
|
1434
1840
|
heading: "Ausrichtung",
|
|
1435
1841
|
pitch: "Neigung",
|
|
1436
1842
|
position: "Position",
|
|
1437
|
-
showPrimitive: "
|
|
1438
|
-
viewpoint: "
|
|
1439
|
-
|
|
1843
|
+
showPrimitive: "Standpunkt zeigen",
|
|
1844
|
+
viewpoint: "Standpunkt",
|
|
1845
|
+
viewshedCategory: "Sichtbarkeitsanalysen",
|
|
1440
1846
|
heightMode: "Höhenmodus",
|
|
1441
1847
|
relative: "Relativ zum Gelände",
|
|
1442
1848
|
absolute: "Absolut",
|
|
1443
1849
|
new: "Neu",
|
|
1444
1850
|
cancel: "Abbrechen",
|
|
1445
|
-
[
|
|
1446
|
-
[
|
|
1447
|
-
create:
|
|
1851
|
+
[p.CONE]: "Sichtkegelanalyse",
|
|
1852
|
+
[p.THREESIXTY]: "360° Sichtsanalyse",
|
|
1853
|
+
create: {
|
|
1854
|
+
[p.CONE]: "Sichtkegelanalyse erstellen",
|
|
1855
|
+
[p.THREESIXTY]: "360° Sichtanalyse erstellen"
|
|
1856
|
+
},
|
|
1448
1857
|
addToMyWorkspace: "Zu Mein Arbeitsbereich hinzufügen",
|
|
1449
|
-
temporary: "
|
|
1450
|
-
jumpToViewpoint: "Zu
|
|
1451
|
-
returnToViewpoint: "Zu vorherigem
|
|
1452
|
-
move: "
|
|
1453
|
-
createDescription: "
|
|
1454
|
-
createThreeSixtyDescription: "
|
|
1858
|
+
temporary: "Temporäre",
|
|
1859
|
+
jumpToViewpoint: "Zu Standpunkt springen",
|
|
1860
|
+
returnToViewpoint: "Zu vorherigem Standpunkt zurück springen",
|
|
1861
|
+
move: "Standpunkt verschieben",
|
|
1862
|
+
createDescription: "Klicken Sie zweimal in die Karte. Der erste Klick platziert den Ursprung, der zweite die Distanz und die Richtung des Sichtkegels.",
|
|
1863
|
+
createThreeSixtyDescription: "Klicken Sie zweimal in die Karte. Der erste Klick platziert den Ursprung, der zweite die Distanz der Sichtbarkeitsanalyse.",
|
|
1455
1864
|
remove: "Entfernen",
|
|
1456
1865
|
editor: {
|
|
1866
|
+
title: "Viewshed Editor",
|
|
1457
1867
|
general: "Allgemeine Einstellungen",
|
|
1458
1868
|
visibleColor: "Sichtbarer Bereich",
|
|
1459
1869
|
shadowColor: "Nicht sichtbarer Bereich",
|
|
@@ -1465,5 +1875,5 @@ function zt(s) {
|
|
|
1465
1875
|
};
|
|
1466
1876
|
}
|
|
1467
1877
|
export {
|
|
1468
|
-
|
|
1878
|
+
ui as default
|
|
1469
1879
|
};
|