@vcmap/viewshed 2.0.9 → 3.0.0
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 +11 -0
- package/README.md +16 -1
- package/dist/index.js +1177 -771
- package/package.json +13 -13
- package/src/ViewshedConfigEditor.vue +6 -9
- package/src/ViewshedWindow.vue +42 -22
- package/src/index.js +45 -24
- package/src/util/toolboxHelper.js +4 -4
- package/src/util/windowHelper.js +1 -1
- 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 g = {
|
|
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, g), 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 === g.THREESIXTY && this._updateShadowMap(), this._viewshedType === g.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 === g.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 === g.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 === g.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 === g.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 === g.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 === g.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 p(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 w(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
|
+
p(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 && (p(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: w,
|
|
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,799 @@ 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 p = () => {
|
|
807
780
|
};
|
|
808
|
-
const
|
|
781
|
+
const w = 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 && (w.distance = e.value.distance, w.fov = e.value.fov, w.heading = e.value.heading, w.pitch = e.value.pitch, w.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(), p();
|
|
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
|
+
p();
|
|
840
813
|
});
|
|
841
|
-
|
|
842
|
-
var
|
|
843
|
-
|
|
814
|
+
p = () => {
|
|
815
|
+
var le;
|
|
816
|
+
E == null || E(), h.value = null, (le = e.value) == null || le.activate(o.maps.activeMap), p = () => {
|
|
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(), p(), 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
|
+
p(), e.value && (w[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 === g.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), p());
|
|
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: w.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 (p(), !!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: w,
|
|
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: g,
|
|
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"), p = b("VcsFormSection"), w = 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(p, {
|
|
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(w),
|
|
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(w),
|
|
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.0", Xt = "^6.0", se = {
|
|
1260
|
+
[g.CONE]: "$vcsViewshed",
|
|
1261
|
+
[g.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: (p) => ({
|
|
1278
|
+
...d,
|
|
984
1279
|
props: {
|
|
985
|
-
selection:
|
|
986
|
-
getViewshed: () =>
|
|
1280
|
+
selection: o.selection,
|
|
1281
|
+
getViewshed: () => o.collection.getByKey(p.name)
|
|
987
1282
|
}
|
|
988
1283
|
})
|
|
989
1284
|
});
|
|
990
|
-
function
|
|
991
|
-
|
|
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 = [
|
|
992
1287
|
"viewshed.create",
|
|
993
|
-
`viewshed.${
|
|
994
|
-
] :
|
|
1288
|
+
`viewshed.${i.currentViewshed.value.type}`
|
|
1289
|
+
] : e.value = [
|
|
995
1290
|
"viewshed.temporary",
|
|
996
|
-
`viewshed.${
|
|
1291
|
+
`viewshed.${i.currentViewshed.value.type}`
|
|
997
1292
|
]);
|
|
998
1293
|
}
|
|
999
|
-
function
|
|
1000
|
-
|
|
1294
|
+
function c() {
|
|
1295
|
+
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
1296
|
{
|
|
1002
|
-
...
|
|
1297
|
+
...d,
|
|
1003
1298
|
id: n,
|
|
1004
1299
|
parentId: "category-manager",
|
|
1005
|
-
slot:
|
|
1300
|
+
slot: ft.DYNAMIC_CHILD
|
|
1006
1301
|
},
|
|
1007
|
-
|
|
1302
|
+
j
|
|
1008
1303
|
));
|
|
1009
1304
|
}
|
|
1010
|
-
const
|
|
1011
|
-
|
|
1012
|
-
}),
|
|
1013
|
-
|
|
1014
|
-
}),
|
|
1015
|
-
|
|
1305
|
+
const C = z(i.currentViewshed, (p) => {
|
|
1306
|
+
p && c();
|
|
1307
|
+
}), u = z(i.currentIsPersisted, (p) => {
|
|
1308
|
+
p && l();
|
|
1309
|
+
}), h = z(i.mode, () => {
|
|
1310
|
+
i.mode.value ? c() : t.windowManager.remove(n);
|
|
1016
1311
|
});
|
|
1017
1312
|
return {
|
|
1018
1313
|
destroy() {
|
|
1019
|
-
|
|
1314
|
+
t.windowManager.remove(n), C(), h(), u();
|
|
1020
1315
|
}
|
|
1021
1316
|
};
|
|
1022
1317
|
}
|
|
1023
|
-
function
|
|
1024
|
-
const
|
|
1025
|
-
type:
|
|
1026
|
-
action:
|
|
1027
|
-
name:
|
|
1318
|
+
function Zt(i, t, o, e) {
|
|
1319
|
+
const s = {
|
|
1320
|
+
type: mt.SELECT,
|
|
1321
|
+
action: q({
|
|
1322
|
+
name: o,
|
|
1028
1323
|
currentIndex: 0,
|
|
1029
1324
|
active: !1,
|
|
1030
1325
|
background: !1,
|
|
1031
1326
|
disabled: !1,
|
|
1032
1327
|
callback() {
|
|
1033
1328
|
if (this.active)
|
|
1034
|
-
this.background &&
|
|
1329
|
+
this.background && t.currentViewshed.value ? t.editViewshed(t.currentViewshed.value) : t.stop();
|
|
1035
1330
|
else {
|
|
1036
|
-
const
|
|
1037
|
-
|
|
1331
|
+
const c = this.tools[this.currentIndex].name;
|
|
1332
|
+
t.createViewshed(c);
|
|
1038
1333
|
}
|
|
1039
1334
|
},
|
|
1040
|
-
selected(
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
e.createViewshed(f);
|
|
1045
|
-
}
|
|
1335
|
+
selected(c) {
|
|
1336
|
+
c !== this.currentIndex && (this.currentIndex = c);
|
|
1337
|
+
const C = this.tools[this.currentIndex].name;
|
|
1338
|
+
t.createViewshed(C);
|
|
1046
1339
|
},
|
|
1047
|
-
tools:
|
|
1048
|
-
name:
|
|
1049
|
-
icon:
|
|
1050
|
-
title: `viewshed.${
|
|
1051
|
-
} :
|
|
1052
|
-
name:
|
|
1053
|
-
icon:
|
|
1054
|
-
title: `viewshed.${
|
|
1340
|
+
tools: e.flatMap((c) => c === g.CONE ? {
|
|
1341
|
+
name: g.CONE,
|
|
1342
|
+
icon: se[g.CONE],
|
|
1343
|
+
title: `viewshed.${g.CONE}`
|
|
1344
|
+
} : c === g.THREESIXTY ? {
|
|
1345
|
+
name: g.THREESIXTY,
|
|
1346
|
+
icon: se[g.THREESIXTY],
|
|
1347
|
+
title: `viewshed.${g.THREESIXTY}`
|
|
1055
1348
|
} : [])
|
|
1056
1349
|
})
|
|
1057
|
-
}, n =
|
|
1058
|
-
|
|
1059
|
-
}),
|
|
1060
|
-
|
|
1061
|
-
(
|
|
1062
|
-
|
|
1063
|
-
(
|
|
1350
|
+
}, n = z(t.mode, (c) => {
|
|
1351
|
+
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);
|
|
1352
|
+
}), d = z(
|
|
1353
|
+
t.currentViewshed,
|
|
1354
|
+
(c) => {
|
|
1355
|
+
c && (s.action.currentIndex = s.action.tools.findIndex(
|
|
1356
|
+
(C) => C.name === c.type
|
|
1064
1357
|
));
|
|
1065
1358
|
}
|
|
1066
|
-
),
|
|
1067
|
-
|
|
1359
|
+
), l = i.maps.mapActivated.addEventListener((c) => {
|
|
1360
|
+
c instanceof G ? s.action.disabled = !1 : s.action.disabled = !0;
|
|
1068
1361
|
});
|
|
1069
1362
|
return {
|
|
1070
1363
|
destroy() {
|
|
1071
|
-
n(),
|
|
1364
|
+
n(), d(), l();
|
|
1072
1365
|
},
|
|
1073
|
-
toolbox:
|
|
1366
|
+
toolbox: s
|
|
1074
1367
|
};
|
|
1075
1368
|
}
|
|
1076
|
-
function
|
|
1077
|
-
|
|
1078
|
-
const { toolbox:
|
|
1369
|
+
function qt(i, t, o, e) {
|
|
1370
|
+
re(e, [Pt(g)]);
|
|
1371
|
+
const { toolbox: s, destroy: n } = Zt(i, t, o, e), d = i.toolboxManager.add(s, o).id;
|
|
1079
1372
|
return () => {
|
|
1080
|
-
|
|
1373
|
+
i.toolboxManager.remove(d), n();
|
|
1081
1374
|
};
|
|
1082
1375
|
}
|
|
1083
|
-
class
|
|
1376
|
+
class ne extends Ue {
|
|
1084
1377
|
static get className() {
|
|
1085
1378
|
return "ViewshedCategory";
|
|
1086
1379
|
}
|
|
1087
|
-
async _deserializeItem(
|
|
1088
|
-
var
|
|
1089
|
-
|
|
1380
|
+
async _deserializeItem(t) {
|
|
1381
|
+
var e;
|
|
1382
|
+
if (
|
|
1090
1383
|
/** @type {import("@vcmap/core").CesiumMap | undefined} */
|
|
1091
|
-
(
|
|
1092
|
-
)
|
|
1093
|
-
|
|
1094
|
-
return new T(e, i);
|
|
1384
|
+
(e = this._app) == null ? void 0 : e.maps.getByType(G.className)[0]
|
|
1385
|
+
)
|
|
1386
|
+
return new x(t);
|
|
1095
1387
|
throw new Error("No CesiumMap available");
|
|
1096
1388
|
}
|
|
1097
1389
|
}
|
|
1098
|
-
function
|
|
1099
|
-
let
|
|
1100
|
-
const
|
|
1101
|
-
|
|
1390
|
+
function Qt(i, t) {
|
|
1391
|
+
let o, e = 0;
|
|
1392
|
+
const s = new Set(
|
|
1393
|
+
t.filter((n) => n.type === i).map((n) => n.properties.title)
|
|
1102
1394
|
);
|
|
1103
1395
|
do
|
|
1104
|
-
|
|
1105
|
-
while (!
|
|
1106
|
-
return
|
|
1396
|
+
e += 1, s.has(`${i}-${e}`) || (o = `${i}-${e}`);
|
|
1397
|
+
while (!o);
|
|
1398
|
+
return o;
|
|
1107
1399
|
}
|
|
1108
|
-
async function
|
|
1109
|
-
const
|
|
1400
|
+
async function ei(i) {
|
|
1401
|
+
const t = new Y(), o = new Y(), { collectionComponent: e, category: s } = await i.categoryManager.requestCategory(
|
|
1110
1402
|
{
|
|
1111
|
-
type:
|
|
1403
|
+
type: ne.className,
|
|
1112
1404
|
name: "Viewsheds",
|
|
1113
|
-
title: "
|
|
1405
|
+
title: "viewshed.viewshedCategory"
|
|
1114
1406
|
},
|
|
1115
|
-
|
|
1407
|
+
j,
|
|
1116
1408
|
{
|
|
1117
1409
|
selectable: !0,
|
|
1118
1410
|
renamable: !0,
|
|
1119
1411
|
removable: !0
|
|
1120
1412
|
}
|
|
1121
1413
|
);
|
|
1122
|
-
|
|
1123
|
-
mappingFunction:
|
|
1124
|
-
[
|
|
1125
|
-
|
|
1414
|
+
e.addItemMapping({
|
|
1415
|
+
mappingFunction: vt(
|
|
1416
|
+
[G.className],
|
|
1417
|
+
i.maps
|
|
1126
1418
|
),
|
|
1127
|
-
owner:
|
|
1419
|
+
owner: j
|
|
1128
1420
|
});
|
|
1129
|
-
const n = (
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
},
|
|
1133
|
-
|
|
1421
|
+
const n = (u, h, p) => {
|
|
1422
|
+
p.title = u.properties.title, p.titleChanged = (w) => {
|
|
1423
|
+
u.properties.title = w, p.title = w, t.raiseEvent({ item: u, title: w });
|
|
1424
|
+
}, p.actions.push(
|
|
1425
|
+
q({
|
|
1134
1426
|
name: "visibilityAction",
|
|
1135
1427
|
icon: "$vcsCheckbox",
|
|
1136
1428
|
callback() {
|
|
1137
|
-
|
|
1429
|
+
o.raiseEvent(u);
|
|
1138
1430
|
}
|
|
1139
1431
|
})
|
|
1140
1432
|
);
|
|
1141
1433
|
};
|
|
1142
|
-
|
|
1434
|
+
i.categoryManager.addMappingFunction(
|
|
1143
1435
|
() => !0,
|
|
1144
1436
|
n,
|
|
1145
|
-
|
|
1146
|
-
[
|
|
1437
|
+
j,
|
|
1438
|
+
[e.id]
|
|
1147
1439
|
);
|
|
1148
|
-
const { action:
|
|
1149
|
-
|
|
1440
|
+
const { action: d, destroy: l } = pt(
|
|
1441
|
+
e.selection,
|
|
1150
1442
|
() => {
|
|
1151
|
-
const
|
|
1152
|
-
(
|
|
1443
|
+
const u = e.selection.value.map(
|
|
1444
|
+
(h) => e.collection.getByKey(h.name)
|
|
1153
1445
|
);
|
|
1154
|
-
|
|
1446
|
+
wt(JSON.stringify(u), "viewsheds.json");
|
|
1155
1447
|
},
|
|
1156
|
-
|
|
1157
|
-
), { action:
|
|
1158
|
-
async (
|
|
1159
|
-
const { vueI18n:
|
|
1160
|
-
|
|
1161
|
-
const
|
|
1448
|
+
j
|
|
1449
|
+
), { action: c, destroy: C } = gt(
|
|
1450
|
+
async (u) => {
|
|
1451
|
+
const { vueI18n: h } = i, w = (await Promise.all(
|
|
1452
|
+
u.map(async (S) => {
|
|
1453
|
+
const L = await S.text();
|
|
1162
1454
|
try {
|
|
1163
|
-
return JSON.parse(
|
|
1455
|
+
return JSON.parse(L).map((r) => new x(r));
|
|
1164
1456
|
} catch {
|
|
1165
|
-
|
|
1166
|
-
type:
|
|
1167
|
-
message:
|
|
1168
|
-
fileName:
|
|
1457
|
+
i.notifier.add({
|
|
1458
|
+
type: X.ERROR,
|
|
1459
|
+
message: h.t("components.import.failure", {
|
|
1460
|
+
fileName: S.name
|
|
1169
1461
|
})
|
|
1170
1462
|
});
|
|
1171
1463
|
}
|
|
1172
1464
|
return [];
|
|
1173
1465
|
})
|
|
1174
|
-
)).flat(),
|
|
1175
|
-
if (
|
|
1176
|
-
return
|
|
1177
|
-
type:
|
|
1178
|
-
message:
|
|
1466
|
+
)).flat(), V = w.map((S) => s.collection.add(S)).filter((S) => S != null), N = w.length - V.length;
|
|
1467
|
+
if (N > 0)
|
|
1468
|
+
return i.notifier.add({
|
|
1469
|
+
type: X.WARNING,
|
|
1470
|
+
message: h.t("components.import.addFailure", [N])
|
|
1179
1471
|
}), !1;
|
|
1180
|
-
if (
|
|
1181
|
-
|
|
1182
|
-
type:
|
|
1183
|
-
message:
|
|
1184
|
-
|
|
1472
|
+
if (V.length > 0)
|
|
1473
|
+
i.notifier.add({
|
|
1474
|
+
type: X.SUCCESS,
|
|
1475
|
+
message: h.t("components.import.featuresAdded", [
|
|
1476
|
+
V.length
|
|
1185
1477
|
])
|
|
1186
1478
|
});
|
|
1187
1479
|
else
|
|
1188
|
-
return
|
|
1189
|
-
type:
|
|
1190
|
-
message:
|
|
1480
|
+
return i.notifier.add({
|
|
1481
|
+
type: X.ERROR,
|
|
1482
|
+
message: h.t("components.import.nothingAdded")
|
|
1191
1483
|
}), !1;
|
|
1192
1484
|
return !0;
|
|
1193
1485
|
},
|
|
1194
|
-
|
|
1195
|
-
|
|
1486
|
+
i.windowManager,
|
|
1487
|
+
j,
|
|
1196
1488
|
"category-manager"
|
|
1197
1489
|
);
|
|
1198
|
-
return
|
|
1199
|
-
renamed:
|
|
1200
|
-
visibilityChanged:
|
|
1201
|
-
setSelection(
|
|
1202
|
-
|
|
1490
|
+
return e.addActions([d, c]), {
|
|
1491
|
+
renamed: t,
|
|
1492
|
+
visibilityChanged: o,
|
|
1493
|
+
setSelection(u) {
|
|
1494
|
+
u && (e.selection.value = e.items.value.filter((h) => u === h.name));
|
|
1203
1495
|
},
|
|
1204
1496
|
clearSelection() {
|
|
1205
|
-
|
|
1497
|
+
e.selection.value.length && (e.selection.value = []);
|
|
1206
1498
|
},
|
|
1207
|
-
setVisibility(
|
|
1208
|
-
const
|
|
1209
|
-
(
|
|
1499
|
+
setVisibility(u, h) {
|
|
1500
|
+
const p = e.items.value.find(
|
|
1501
|
+
(w) => u === w.name
|
|
1210
1502
|
);
|
|
1211
|
-
if (
|
|
1212
|
-
const
|
|
1213
|
-
(
|
|
1503
|
+
if (p) {
|
|
1504
|
+
const w = p.actions.find(
|
|
1505
|
+
(V) => V.name === "visibilityAction"
|
|
1214
1506
|
);
|
|
1215
|
-
|
|
1507
|
+
w && (w.icon = h ? "$vcsCheckboxChecked" : "$vcsCheckbox");
|
|
1216
1508
|
}
|
|
1217
1509
|
},
|
|
1218
|
-
add(
|
|
1219
|
-
|
|
1220
|
-
|
|
1510
|
+
add(u) {
|
|
1511
|
+
u.properties.title = Qt(
|
|
1512
|
+
u.type,
|
|
1221
1513
|
/** @type {import("./viewshed.js").default[]} */
|
|
1222
1514
|
[
|
|
1223
|
-
...
|
|
1515
|
+
...s.collection
|
|
1224
1516
|
]
|
|
1225
|
-
),
|
|
1517
|
+
), s.collection.add(u);
|
|
1226
1518
|
},
|
|
1227
|
-
remove(
|
|
1228
|
-
const
|
|
1229
|
-
|
|
1519
|
+
remove(u) {
|
|
1520
|
+
const h = s.collection.getByKey(u);
|
|
1521
|
+
h && s.collection.remove(h);
|
|
1230
1522
|
},
|
|
1231
|
-
collectionComponent:
|
|
1523
|
+
collectionComponent: e,
|
|
1232
1524
|
destroy() {
|
|
1233
|
-
|
|
1525
|
+
i.categoryManager.removeOwner(j), t.destroy(), o.destroy(), l(), C();
|
|
1234
1526
|
}
|
|
1235
1527
|
};
|
|
1236
1528
|
}
|
|
1237
|
-
function
|
|
1529
|
+
function J() {
|
|
1238
1530
|
return {
|
|
1239
|
-
visibleColor:
|
|
1240
|
-
shadowColor:
|
|
1241
|
-
tools: [...Object.values(
|
|
1531
|
+
visibleColor: x.getDefaultOptions().visibleColor,
|
|
1532
|
+
shadowColor: x.getDefaultOptions().shadowColor,
|
|
1533
|
+
tools: [...Object.values(g)]
|
|
1242
1534
|
};
|
|
1243
1535
|
}
|
|
1244
|
-
const
|
|
1536
|
+
const ti = {
|
|
1245
1537
|
name: "ViewshedConfigEditor",
|
|
1246
|
-
title: "Viewshed Editor",
|
|
1247
1538
|
components: {
|
|
1248
|
-
AbstractConfigEditor:
|
|
1249
|
-
VcsFormSection:
|
|
1250
|
-
VContainer:
|
|
1251
|
-
VRow:
|
|
1252
|
-
VCol:
|
|
1253
|
-
VcsLabel:
|
|
1254
|
-
VcsSelect:
|
|
1255
|
-
VColorPicker:
|
|
1539
|
+
AbstractConfigEditor: _t,
|
|
1540
|
+
VcsFormSection: Ce,
|
|
1541
|
+
VContainer: ye,
|
|
1542
|
+
VRow: Ve,
|
|
1543
|
+
VCol: be,
|
|
1544
|
+
VcsLabel: _e,
|
|
1545
|
+
VcsSelect: Ee,
|
|
1546
|
+
VColorPicker: Et
|
|
1256
1547
|
},
|
|
1257
1548
|
props: {
|
|
1258
1549
|
getConfig: {
|
|
@@ -1264,134 +1555,247 @@ const Rt = {
|
|
|
1264
1555
|
required: !0
|
|
1265
1556
|
}
|
|
1266
1557
|
},
|
|
1267
|
-
setup(
|
|
1268
|
-
const
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
});
|
|
1272
|
-
async function i() {
|
|
1273
|
-
await s.setConfig(e.value);
|
|
1558
|
+
setup(i) {
|
|
1559
|
+
const t = i.getConfig(), o = U({ ...J(), ...t });
|
|
1560
|
+
function e() {
|
|
1561
|
+
i.setConfig(o.value);
|
|
1274
1562
|
}
|
|
1275
1563
|
return {
|
|
1276
|
-
localConfig:
|
|
1277
|
-
ViewshedTypes:
|
|
1278
|
-
apply:
|
|
1279
|
-
toolItems: Object.values(
|
|
1280
|
-
value:
|
|
1281
|
-
|
|
1564
|
+
localConfig: o,
|
|
1565
|
+
ViewshedTypes: g,
|
|
1566
|
+
apply: e,
|
|
1567
|
+
toolItems: Object.values(g).map((s) => ({
|
|
1568
|
+
value: s,
|
|
1569
|
+
title: `viewshed.${s}`
|
|
1282
1570
|
}))
|
|
1283
1571
|
};
|
|
1284
1572
|
}
|
|
1285
1573
|
};
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
return
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
)
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1574
|
+
function ii(i, t, o, e, s, n) {
|
|
1575
|
+
const d = b("VcsLabel"), l = b("v-col"), c = b("VcsSelect"), C = b("v-row"), u = b("VColorPicker"), h = b("v-container"), p = b("VcsFormSection"), w = b("AbstractConfigEditor");
|
|
1576
|
+
return M(), D(w, it({ onSubmit: e.apply }, { ...i.$attrs, ...i.$props }), {
|
|
1577
|
+
default: f(() => [
|
|
1578
|
+
e.localConfig ? (M(), D(p, {
|
|
1579
|
+
key: 0,
|
|
1580
|
+
heading: "viewshed.editor.general"
|
|
1581
|
+
}, {
|
|
1582
|
+
default: f(() => [
|
|
1583
|
+
m(h, { class: "px-1 py-0" }, {
|
|
1584
|
+
default: f(() => [
|
|
1585
|
+
m(C, { "no-gutters": "" }, {
|
|
1586
|
+
default: f(() => [
|
|
1587
|
+
m(l, null, {
|
|
1588
|
+
default: f(() => [
|
|
1589
|
+
m(d, { "html-for": "viewshed-editor-tools" }, {
|
|
1590
|
+
default: f(() => [
|
|
1591
|
+
F(
|
|
1592
|
+
A(i.$t("viewshed.editor.tools")),
|
|
1593
|
+
1
|
|
1594
|
+
/* TEXT */
|
|
1595
|
+
)
|
|
1596
|
+
]),
|
|
1597
|
+
_: 1
|
|
1598
|
+
/* STABLE */
|
|
1599
|
+
})
|
|
1600
|
+
]),
|
|
1601
|
+
_: 1
|
|
1602
|
+
/* STABLE */
|
|
1603
|
+
}),
|
|
1604
|
+
m(l, null, {
|
|
1605
|
+
default: f(() => [
|
|
1606
|
+
m(c, {
|
|
1607
|
+
id: "viewshed-tools",
|
|
1608
|
+
items: e.toolItems,
|
|
1609
|
+
modelValue: e.localConfig.tools,
|
|
1610
|
+
"onUpdate:modelValue": t[0] || (t[0] = (V) => e.localConfig.tools = V),
|
|
1611
|
+
multiple: !0
|
|
1612
|
+
}, null, 8, ["items", "modelValue"])
|
|
1613
|
+
]),
|
|
1614
|
+
_: 1
|
|
1615
|
+
/* STABLE */
|
|
1616
|
+
})
|
|
1617
|
+
]),
|
|
1618
|
+
_: 1
|
|
1619
|
+
/* STABLE */
|
|
1620
|
+
}),
|
|
1621
|
+
m(C, { "no-gutters": "" }, {
|
|
1622
|
+
default: f(() => [
|
|
1623
|
+
m(l, null, {
|
|
1624
|
+
default: f(() => [
|
|
1625
|
+
m(d, { "html-for": "viewshed-editor-visible-color" }, {
|
|
1626
|
+
default: f(() => [
|
|
1627
|
+
F(
|
|
1628
|
+
A(i.$t("viewshed.editor.visibleColor")),
|
|
1629
|
+
1
|
|
1630
|
+
/* TEXT */
|
|
1631
|
+
)
|
|
1632
|
+
]),
|
|
1633
|
+
_: 1
|
|
1634
|
+
/* STABLE */
|
|
1635
|
+
})
|
|
1636
|
+
]),
|
|
1637
|
+
_: 1
|
|
1638
|
+
/* STABLE */
|
|
1639
|
+
}),
|
|
1640
|
+
m(l, null, {
|
|
1641
|
+
default: f(() => [
|
|
1642
|
+
m(u, {
|
|
1643
|
+
modelValue: e.localConfig.visibleColor,
|
|
1644
|
+
"onUpdate:modelValue": t[1] || (t[1] = (V) => e.localConfig.visibleColor = V),
|
|
1645
|
+
mode: "rgba"
|
|
1646
|
+
}, null, 8, ["modelValue"])
|
|
1647
|
+
]),
|
|
1648
|
+
_: 1
|
|
1649
|
+
/* STABLE */
|
|
1650
|
+
})
|
|
1651
|
+
]),
|
|
1652
|
+
_: 1
|
|
1653
|
+
/* STABLE */
|
|
1654
|
+
}),
|
|
1655
|
+
m(C, { "no-gutters": "" }, {
|
|
1656
|
+
default: f(() => [
|
|
1657
|
+
m(l, null, {
|
|
1658
|
+
default: f(() => [
|
|
1659
|
+
m(d, { "html-for": "viewshed-editor-shadow-color" }, {
|
|
1660
|
+
default: f(() => [
|
|
1661
|
+
F(
|
|
1662
|
+
A(i.$t("viewshed.editor.shadowColor")),
|
|
1663
|
+
1
|
|
1664
|
+
/* TEXT */
|
|
1665
|
+
)
|
|
1666
|
+
]),
|
|
1667
|
+
_: 1
|
|
1668
|
+
/* STABLE */
|
|
1669
|
+
})
|
|
1670
|
+
]),
|
|
1671
|
+
_: 1
|
|
1672
|
+
/* STABLE */
|
|
1673
|
+
}),
|
|
1674
|
+
m(l, null, {
|
|
1675
|
+
default: f(() => [
|
|
1676
|
+
m(u, {
|
|
1677
|
+
modelValue: e.localConfig.shadowColor,
|
|
1678
|
+
"onUpdate:modelValue": t[2] || (t[2] = (V) => e.localConfig.shadowColor = V),
|
|
1679
|
+
mode: "rgba"
|
|
1680
|
+
}, null, 8, ["modelValue"])
|
|
1681
|
+
]),
|
|
1682
|
+
_: 1
|
|
1683
|
+
/* STABLE */
|
|
1684
|
+
})
|
|
1685
|
+
]),
|
|
1686
|
+
_: 1
|
|
1687
|
+
/* STABLE */
|
|
1688
|
+
})
|
|
1689
|
+
]),
|
|
1690
|
+
_: 1
|
|
1691
|
+
/* STABLE */
|
|
1692
|
+
})
|
|
1693
|
+
]),
|
|
1694
|
+
_: 1
|
|
1695
|
+
/* STABLE */
|
|
1696
|
+
})) : $("v-if", !0)
|
|
1697
|
+
]),
|
|
1698
|
+
_: 1
|
|
1699
|
+
/* STABLE */
|
|
1700
|
+
}, 16, ["onSubmit"]);
|
|
1701
|
+
}
|
|
1702
|
+
const oi = /* @__PURE__ */ Se(ti, [["render", ii]]);
|
|
1703
|
+
function ui(i) {
|
|
1704
|
+
let t, o, e = () => {
|
|
1308
1705
|
};
|
|
1309
1706
|
return {
|
|
1310
1707
|
get name() {
|
|
1311
|
-
return
|
|
1708
|
+
return j;
|
|
1312
1709
|
},
|
|
1313
1710
|
get version() {
|
|
1314
|
-
return
|
|
1711
|
+
return Yt;
|
|
1315
1712
|
},
|
|
1316
1713
|
get mapVersion() {
|
|
1317
|
-
return
|
|
1714
|
+
return Xt;
|
|
1318
1715
|
},
|
|
1319
1716
|
/**
|
|
1320
1717
|
* @param {import("@vcmap/ui").VcsUiApp} vcsUiApp
|
|
1321
1718
|
* @param {ViewshedPluginState=} state
|
|
1322
1719
|
* @returns {Promise<void>}
|
|
1323
1720
|
*/
|
|
1324
|
-
async initialize(
|
|
1325
|
-
|
|
1326
|
-
this[
|
|
1327
|
-
|
|
1328
|
-
|
|
1721
|
+
async initialize(s, n) {
|
|
1722
|
+
o = s, s.categoryClassRegistry.registerClass(
|
|
1723
|
+
this[$e],
|
|
1724
|
+
ne.className,
|
|
1725
|
+
ne
|
|
1329
1726
|
);
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1332
|
-
t,
|
|
1727
|
+
const d = await ei(s);
|
|
1728
|
+
t = Lt(
|
|
1333
1729
|
s,
|
|
1334
|
-
|
|
1730
|
+
i,
|
|
1731
|
+
d
|
|
1335
1732
|
);
|
|
1336
|
-
const l =
|
|
1733
|
+
const l = qt(
|
|
1734
|
+
s,
|
|
1337
1735
|
t,
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
), { destroy: c } = Tt(
|
|
1342
|
-
e,
|
|
1736
|
+
j,
|
|
1737
|
+
i.tools || J().tools
|
|
1738
|
+
), { destroy: c } = Jt(
|
|
1343
1739
|
t,
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1740
|
+
s,
|
|
1741
|
+
d.collectionComponent
|
|
1742
|
+
), { activeMap: C } = s.maps;
|
|
1743
|
+
function u(w) {
|
|
1744
|
+
if (n != null && n.m && n.cv && w instanceof G) {
|
|
1745
|
+
n.cv.properties.title && delete n.cv.properties.title;
|
|
1746
|
+
const V = new x(n.cv);
|
|
1747
|
+
n.m === y.VIEW ? t.viewViewshed(V) : t.editViewshed(V);
|
|
1350
1748
|
}
|
|
1351
1749
|
}
|
|
1352
1750
|
let h = !1;
|
|
1353
|
-
|
|
1354
|
-
const
|
|
1355
|
-
(
|
|
1356
|
-
|
|
1751
|
+
C && (h = !0, u(C));
|
|
1752
|
+
const p = s.maps.mapActivated.addEventListener(
|
|
1753
|
+
(w) => {
|
|
1754
|
+
t.stop(), h || (u(w), h = !0);
|
|
1357
1755
|
}
|
|
1358
1756
|
);
|
|
1359
|
-
|
|
1360
|
-
|
|
1757
|
+
e = () => {
|
|
1758
|
+
p(), l(), c(), d.destroy(), t.destroy();
|
|
1361
1759
|
};
|
|
1362
1760
|
},
|
|
1363
1761
|
/**
|
|
1364
1762
|
* should return all default values of the configuration
|
|
1365
1763
|
* @returns {ViewshedPluginOptions}
|
|
1366
1764
|
*/
|
|
1367
|
-
getDefaultOptions:
|
|
1765
|
+
getDefaultOptions: J,
|
|
1368
1766
|
/**
|
|
1369
1767
|
* should return the plugin's serialization excluding all default values
|
|
1370
1768
|
* @returns {ViewshedPluginOptions}
|
|
1371
1769
|
*/
|
|
1372
1770
|
toJSON() {
|
|
1373
|
-
const
|
|
1374
|
-
return
|
|
1771
|
+
const s = {};
|
|
1772
|
+
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
1773
|
},
|
|
1376
1774
|
/**
|
|
1377
1775
|
* should return the plugins state
|
|
1378
1776
|
* @returns {ViewshedPluginState}
|
|
1379
1777
|
*/
|
|
1380
1778
|
getState() {
|
|
1381
|
-
var
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
currentViewshed: (t = e.currentViewshed.value) == null ? void 0 : t.toJSON()
|
|
1385
|
-
};
|
|
1779
|
+
var l;
|
|
1780
|
+
const s = {}, n = t.mode.value, d = (l = t.currentViewshed.value) == null ? void 0 : l.toJSON();
|
|
1781
|
+
return n !== null && n !== "create" && d && (s.m = n, s.cv = d), s;
|
|
1386
1782
|
},
|
|
1387
1783
|
/**
|
|
1388
1784
|
* components for configuring the plugin and/ or custom items defined by the plugin
|
|
1389
1785
|
* @returns {Array<import("@vcmap/ui").PluginConfigEditor>}
|
|
1390
1786
|
*/
|
|
1391
1787
|
getConfigEditors() {
|
|
1392
|
-
return [
|
|
1788
|
+
return [
|
|
1789
|
+
{
|
|
1790
|
+
component: oi,
|
|
1791
|
+
title: "viewshed.editor.title",
|
|
1792
|
+
infoUrlCallback: o == null ? void 0 : o.getHelpUrlCallback(
|
|
1793
|
+
"/components/plugins/viewshedToolConfig.html"
|
|
1794
|
+
)
|
|
1795
|
+
}
|
|
1796
|
+
];
|
|
1393
1797
|
},
|
|
1394
|
-
destroy:
|
|
1798
|
+
destroy: () => e(),
|
|
1395
1799
|
i18n: {
|
|
1396
1800
|
en: {
|
|
1397
1801
|
viewshed: {
|
|
@@ -1402,14 +1806,14 @@ function zt(s) {
|
|
|
1402
1806
|
position: "Position",
|
|
1403
1807
|
showPrimitive: "Show viewpoint",
|
|
1404
1808
|
viewpoint: "Viewpoint",
|
|
1405
|
-
|
|
1809
|
+
viewshedCategory: "Viewsheds",
|
|
1406
1810
|
heightMode: "Height mode",
|
|
1407
|
-
relative: "
|
|
1811
|
+
relative: "Relative to ground",
|
|
1408
1812
|
absolute: "Absolute",
|
|
1409
1813
|
new: "New",
|
|
1410
1814
|
cancel: "Cancel",
|
|
1411
|
-
[
|
|
1412
|
-
[
|
|
1815
|
+
[g.CONE]: "Cone viewshed analysis",
|
|
1816
|
+
[g.THREESIXTY]: "360° viewshed analysis",
|
|
1413
1817
|
create: "Create",
|
|
1414
1818
|
addToMyWorkspace: "Add to My Workspace",
|
|
1415
1819
|
temporary: "Temporary",
|
|
@@ -1420,6 +1824,7 @@ function zt(s) {
|
|
|
1420
1824
|
createThreeSixtyDescription: "Click the map twice. First click places the origin, second defines the distance of the viewshed.",
|
|
1421
1825
|
remove: "Remove",
|
|
1422
1826
|
editor: {
|
|
1827
|
+
title: "Viewshed Editor",
|
|
1423
1828
|
general: "General Settings",
|
|
1424
1829
|
visibleColor: "Visible color",
|
|
1425
1830
|
shadowColor: "Shadow color",
|
|
@@ -1434,26 +1839,27 @@ function zt(s) {
|
|
|
1434
1839
|
heading: "Ausrichtung",
|
|
1435
1840
|
pitch: "Neigung",
|
|
1436
1841
|
position: "Position",
|
|
1437
|
-
showPrimitive: "
|
|
1438
|
-
viewpoint: "
|
|
1439
|
-
|
|
1842
|
+
showPrimitive: "Standpunkt zeigen",
|
|
1843
|
+
viewpoint: "Standpunkt",
|
|
1844
|
+
viewshedCategory: "Sichtbarkeitsanalysen",
|
|
1440
1845
|
heightMode: "Höhenmodus",
|
|
1441
1846
|
relative: "Relativ zum Gelände",
|
|
1442
1847
|
absolute: "Absolut",
|
|
1443
1848
|
new: "Neu",
|
|
1444
1849
|
cancel: "Abbrechen",
|
|
1445
|
-
[
|
|
1446
|
-
[
|
|
1850
|
+
[g.CONE]: "Sichtkegelanalyse",
|
|
1851
|
+
[g.THREESIXTY]: "360° Sichtsanalyse",
|
|
1447
1852
|
create: "Erzeuge",
|
|
1448
1853
|
addToMyWorkspace: "Zu Mein Arbeitsbereich hinzufügen",
|
|
1449
|
-
temporary: "
|
|
1450
|
-
jumpToViewpoint: "Zu
|
|
1451
|
-
returnToViewpoint: "Zu vorherigem
|
|
1452
|
-
move: "
|
|
1453
|
-
createDescription: "
|
|
1454
|
-
createThreeSixtyDescription: "
|
|
1854
|
+
temporary: "Temporäre",
|
|
1855
|
+
jumpToViewpoint: "Zu Standpunkt springen",
|
|
1856
|
+
returnToViewpoint: "Zu vorherigem Standpunkt zurück springen",
|
|
1857
|
+
move: "Standpunkt verschieben",
|
|
1858
|
+
createDescription: "Klicken Sie zweimal in die Karte. Der erste Klick platziert den Ursprung, der zweite die Distanz und die Richtung des Sichtkegels.",
|
|
1859
|
+
createThreeSixtyDescription: "Klicken Sie zweimal in die Karte. Der erste Klick platziert den Ursprung, der zweite die Distanz der Sichtbarkeitsanalyse.",
|
|
1455
1860
|
remove: "Entfernen",
|
|
1456
1861
|
editor: {
|
|
1862
|
+
title: "Viewshed Editor",
|
|
1457
1863
|
general: "Allgemeine Einstellungen",
|
|
1458
1864
|
visibleColor: "Sichtbarer Bereich",
|
|
1459
1865
|
shadowColor: "Nicht sichtbarer Bereich",
|
|
@@ -1465,5 +1871,5 @@ function zt(s) {
|
|
|
1465
1871
|
};
|
|
1466
1872
|
}
|
|
1467
1873
|
export {
|
|
1468
|
-
|
|
1874
|
+
ui as default
|
|
1469
1875
|
};
|