@vcmap/ui 6.2.0-rc.2 → 6.2.0-rc.3
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/build/postInstall.js +32 -0
- package/config/dev.config.json +12 -0
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-6b5c0363.js → core-deeb2b8d.js} +6873 -6477
- package/dist/assets/core-workers/panoramaImageWorker.js +1 -1
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol-f58f403b.js → ol-8db5c824.js} +1 -1
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-62439099.css +1 -0
- package/dist/assets/{ui-aadb7707.js → ui-62439099.js} +9551 -9134
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-533fb61b.js → vuetify-439ba6d5.js} +1 -1
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +8 -6
- package/index.js +5 -7
- package/package.json +3 -2
- package/plugins/package.json +1 -1
- package/src/actions/actionHelper.d.ts +16 -11
- package/src/actions/actionHelper.js +52 -61
- package/src/actions/flightActions.d.ts +10 -0
- package/src/actions/flightActions.js +109 -13
- package/src/application/VcsApp.vue +1 -1
- package/src/application/VcsMainMap.vue +40 -2
- package/src/application/VcsMainMap.vue.d.ts +4 -0
- package/src/application/VcsMap.vue +0 -9
- package/src/components/flight/VcsFlightAnchorsComponent.vue +1 -0
- package/src/components/flight/VcsFlightPlayer.vue +31 -17
- package/src/components/flight/VcsFlightPlayer.vue.d.ts +1 -0
- package/src/components/plugins/VcsLoadingOverlay.vue +138 -0
- package/src/components/plugins/VcsLoadingOverlay.vue.d.ts +2 -0
- package/src/components/plugins/{AbstractWorkspaceItemCreator.vue → VcsWorkspaceWrapper.vue} +1 -1
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue +20 -1
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue.d.ts +11 -0
- package/src/components/vector-properties/VcsFeatureInputEditor.vue +166 -0
- package/src/components/vector-properties/VcsFeatureInputEditor.vue.d.ts +17 -0
- package/src/contentTree/contentTreeCollection.js +2 -2
- package/src/contentTree/contentTreeItem.d.ts +2 -2
- package/src/contentTree/wmsGroupContentTreeItem.js +10 -3
- package/src/i18n/de.d.ts +21 -7
- package/src/i18n/de.js +11 -0
- package/src/i18n/en.d.ts +21 -7
- package/src/i18n/en.js +11 -0
- package/src/navigation/MapNavigation.vue +22 -27
- package/src/navigation/MapNavigation.vue.d.ts +2 -34
- package/src/navigation/overviewMap.d.ts +18 -8
- package/src/navigation/overviewMap.js +68 -63
- package/dist/assets/ui-aadb7707.css +0 -1
- /package/dist/assets/{cesium-8dd00805.js → cesium-7d4ab914.js} +0 -0
- /package/dist/assets/core-workers/{panoramaImageWorker.js-0ce7d2f3.js → panoramaImageWorker.js-f8148bc6.js} +0 -0
- /package/dist/assets/{vue-d7691a29.js → vue-1b861f55.js} +0 -0
- /package/dist/assets/{vuetify-533fb61b.css → vuetify-439ba6d5.css} +0 -0
- /package/src/components/plugins/{AbstractWorkspaceItemCreator.vue.d.ts → VcsWorkspaceWrapper.vue.d.ts} +0 -0
package/src/i18n/en.d.ts
CHANGED
|
@@ -293,6 +293,12 @@ declare namespace messages {
|
|
|
293
293
|
let _export: string;
|
|
294
294
|
export { _export as export };
|
|
295
295
|
export let exportPath: string;
|
|
296
|
+
export namespace record {
|
|
297
|
+
let standard: string;
|
|
298
|
+
let high: string;
|
|
299
|
+
let inProgress: string;
|
|
300
|
+
let success: string;
|
|
301
|
+
}
|
|
296
302
|
}
|
|
297
303
|
export namespace splashScreen {
|
|
298
304
|
let name_3: string;
|
|
@@ -378,6 +384,12 @@ declare namespace messages {
|
|
|
378
384
|
export let modifyHeader: string;
|
|
379
385
|
export let modifyInfo: string;
|
|
380
386
|
export let styleHeader: string;
|
|
387
|
+
export namespace position {
|
|
388
|
+
let x_1: string;
|
|
389
|
+
export { x_1 as x };
|
|
390
|
+
export let y: string;
|
|
391
|
+
export let z: string;
|
|
392
|
+
}
|
|
381
393
|
export namespace snapping {
|
|
382
394
|
let title_14: string;
|
|
383
395
|
export { title_14 as title };
|
|
@@ -457,9 +469,10 @@ declare namespace messages {
|
|
|
457
469
|
let title_16: string;
|
|
458
470
|
export { title_16 as title };
|
|
459
471
|
export namespace level {
|
|
460
|
-
let low: string;
|
|
461
|
-
let medium: string;
|
|
462
|
-
let
|
|
472
|
+
export let low: string;
|
|
473
|
+
export let medium: string;
|
|
474
|
+
let high_1: string;
|
|
475
|
+
export { high_1 as high };
|
|
463
476
|
}
|
|
464
477
|
}
|
|
465
478
|
export namespace theme {
|
|
@@ -565,10 +578,11 @@ declare namespace messages {
|
|
|
565
578
|
}
|
|
566
579
|
}
|
|
567
580
|
export namespace notification {
|
|
568
|
-
let error: string;
|
|
569
|
-
let warning: string;
|
|
570
|
-
let information: string;
|
|
571
|
-
let
|
|
581
|
+
export let error: string;
|
|
582
|
+
export let warning: string;
|
|
583
|
+
export let information: string;
|
|
584
|
+
let success_1: string;
|
|
585
|
+
export { success_1 as success };
|
|
572
586
|
}
|
|
573
587
|
export namespace datePicker {
|
|
574
588
|
let today: string;
|
package/src/i18n/en.js
CHANGED
|
@@ -175,6 +175,12 @@ const messages = {
|
|
|
175
175
|
zoom: 'Zoom to extent',
|
|
176
176
|
export: 'Export flight',
|
|
177
177
|
exportPath: 'Export flight path',
|
|
178
|
+
record: {
|
|
179
|
+
standard: 'Record standard resolution flight',
|
|
180
|
+
high: 'Record high resolution flight',
|
|
181
|
+
inProgress: 'Recording in progress',
|
|
182
|
+
success: 'Recording successful, the download will start shortly',
|
|
183
|
+
},
|
|
178
184
|
},
|
|
179
185
|
splashScreen: {
|
|
180
186
|
name: 'Splash Screen',
|
|
@@ -248,6 +254,11 @@ const messages = {
|
|
|
248
254
|
modifyInfo:
|
|
249
255
|
'For modifying the selected feature(s), click on one of the icons in the header above.',
|
|
250
256
|
styleHeader: 'Style',
|
|
257
|
+
position: {
|
|
258
|
+
x: 'Position X',
|
|
259
|
+
y: 'Position Y',
|
|
260
|
+
z: 'Position Z',
|
|
261
|
+
},
|
|
251
262
|
snapping: {
|
|
252
263
|
title: 'Snapping',
|
|
253
264
|
help: 'Snapping can be temporarily disabled by holding the CTRL key.',
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
<v-row justify="center">
|
|
67
67
|
<OrientationToolsButton
|
|
68
68
|
v-if="showOverviewButton"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
:color="
|
|
72
|
-
@click.stop="
|
|
69
|
+
icon="$vcsMap"
|
|
70
|
+
tooltip="navigation.overviewMapTooltip"
|
|
71
|
+
:color="overviewMapState ? 'primary' : undefined"
|
|
72
|
+
@click.stop="toggleOverviewMap"
|
|
73
73
|
/>
|
|
74
74
|
</v-row>
|
|
75
75
|
</template>
|
|
@@ -89,12 +89,8 @@
|
|
|
89
89
|
import { VContainer, VRow } from 'vuetify/components';
|
|
90
90
|
import { useDisplay } from 'vuetify';
|
|
91
91
|
import { Math as CesiumMath } from '@vcmap-cesium/engine';
|
|
92
|
-
import { createOverviewMapAction } from '../actions/actionHelper.js';
|
|
93
92
|
import { createLocatorAction } from './locatorHelper.js';
|
|
94
|
-
import {
|
|
95
|
-
getWindowComponentOptions,
|
|
96
|
-
overviewMapLayerSymbol,
|
|
97
|
-
} from './overviewMap.js';
|
|
93
|
+
import { overviewMapLayerSymbol } from './overviewMap.js';
|
|
98
94
|
import VcsCompass from './VcsCompass.vue';
|
|
99
95
|
import VcsZoomButton from './VcsZoomButton.vue';
|
|
100
96
|
import TiltSlider from './TiltSlider.vue';
|
|
@@ -372,23 +368,16 @@
|
|
|
372
368
|
},
|
|
373
369
|
});
|
|
374
370
|
|
|
375
|
-
const { action: overviewAction, destroy: overviewDestroy } =
|
|
376
|
-
createOverviewMapAction(
|
|
377
|
-
app.overviewMap,
|
|
378
|
-
getWindowComponentOptions(),
|
|
379
|
-
app.windowManager,
|
|
380
|
-
);
|
|
381
371
|
const showOverviewButton = ref(
|
|
382
372
|
app.overviewMap.map.layerCollection.size > 0,
|
|
383
373
|
);
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
});
|
|
374
|
+
const toggleOverviewMap = async () => {
|
|
375
|
+
if (app.overviewMap.currentState.value) {
|
|
376
|
+
app.overviewMap.deactivate();
|
|
377
|
+
} else {
|
|
378
|
+
await app.overviewMap.activate();
|
|
379
|
+
}
|
|
380
|
+
};
|
|
392
381
|
|
|
393
382
|
const overviewMapListeners = [
|
|
394
383
|
app.overviewMap.map.layerCollection.added.addEventListener(() => {
|
|
@@ -407,6 +396,14 @@
|
|
|
407
396
|
}),
|
|
408
397
|
];
|
|
409
398
|
|
|
399
|
+
// Locator
|
|
400
|
+
const { action: locatorAction, destroy: destroyLocator } =
|
|
401
|
+
createLocatorAction(app);
|
|
402
|
+
|
|
403
|
+
const showLocatorButton = computed(() => {
|
|
404
|
+
return app.uiConfig.config.showLocator ?? true;
|
|
405
|
+
});
|
|
406
|
+
|
|
410
407
|
const movementApiCallsDisabled = ref(
|
|
411
408
|
!!app.maps.activeMap?.movementApiCallsDisabled,
|
|
412
409
|
);
|
|
@@ -429,9 +426,6 @@
|
|
|
429
426
|
});
|
|
430
427
|
|
|
431
428
|
onUnmounted(() => {
|
|
432
|
-
if (overviewDestroy) {
|
|
433
|
-
overviewDestroy();
|
|
434
|
-
}
|
|
435
429
|
if (destroyLocator) {
|
|
436
430
|
destroyLocator();
|
|
437
431
|
}
|
|
@@ -468,7 +462,6 @@
|
|
|
468
462
|
zoomOut() {
|
|
469
463
|
zoom(app.maps.activeMap, true);
|
|
470
464
|
},
|
|
471
|
-
overviewAction: reactive(overviewAction),
|
|
472
465
|
locatorAction: reactive(locatorAction),
|
|
473
466
|
showOverviewButton,
|
|
474
467
|
showLocatorButton,
|
|
@@ -477,6 +470,8 @@
|
|
|
477
470
|
rotationAction,
|
|
478
471
|
movementApiCallsDisabled,
|
|
479
472
|
mobileLandscape,
|
|
473
|
+
overviewMapState: app.overviewMap.currentState,
|
|
474
|
+
toggleOverviewMap,
|
|
480
475
|
};
|
|
481
476
|
},
|
|
482
477
|
};
|
|
@@ -10,40 +10,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
10
10
|
isPanorama: import("vue").ComputedRef<boolean>;
|
|
11
11
|
zoomIn(): void;
|
|
12
12
|
zoomOut(): void;
|
|
13
|
-
overviewAction: {
|
|
14
|
-
/**
|
|
15
|
-
* - reactive and translatable name rendered in overflow
|
|
16
|
-
*/
|
|
17
|
-
name: string;
|
|
18
|
-
/**
|
|
19
|
-
* - reactive and translatable title rendered as tooltip
|
|
20
|
-
*/
|
|
21
|
-
title?: string | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* - icon rendered on the button. If no icon provided, item is rendered in overflow
|
|
24
|
-
*/
|
|
25
|
-
icon?: string | undefined;
|
|
26
|
-
/**
|
|
27
|
-
* - callback function is triggered when the button is clicked
|
|
28
|
-
*/
|
|
29
|
-
callback: import("../actions/actionHelper.js", { with: { "resolution-mode": "import" } }).ActionCallback;
|
|
30
|
-
/**
|
|
31
|
-
* - optional state of button. If active, button is rendered in primary color
|
|
32
|
-
*/
|
|
33
|
-
active?: boolean | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* - optional hasUpdate of button. If true, a yellow notification is rendered next to the button
|
|
36
|
-
*/
|
|
37
|
-
hasUpdate?: boolean | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* - optional background state. If active and background, button is rendered in primary color outlined
|
|
40
|
-
*/
|
|
41
|
-
background?: boolean | undefined;
|
|
42
|
-
/**
|
|
43
|
-
* - optional flag to indicate that the action is disabled
|
|
44
|
-
*/
|
|
45
|
-
disabled?: boolean | undefined;
|
|
46
|
-
};
|
|
47
13
|
locatorAction: {
|
|
48
14
|
/**
|
|
49
15
|
* - reactive and translatable name rendered in overflow
|
|
@@ -85,5 +51,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
85
51
|
rotationAction: any;
|
|
86
52
|
movementApiCallsDisabled: import("vue").Ref<boolean>;
|
|
87
53
|
mobileLandscape: import("vue").ComputedRef<boolean>;
|
|
54
|
+
overviewMapState: import("vue").ComputedRef<boolean>;
|
|
55
|
+
toggleOverviewMap: () => Promise<void>;
|
|
88
56
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
89
57
|
export default _default;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @returns {import("../manager/window/windowManager.js").WindowComponentOptions}
|
|
3
|
-
*/
|
|
4
|
-
export function getWindowComponentOptions(): import("../manager/window/windowManager.js").WindowComponentOptions;
|
|
5
|
-
export const overviewMapWindowId: "overview-map-container";
|
|
1
|
+
export const overviewMapContainerId: "overview-map-container";
|
|
6
2
|
export const overviewMapLayerSymbol: unique symbol;
|
|
7
3
|
export default OverviewMap;
|
|
8
4
|
/**
|
|
@@ -26,7 +22,7 @@ declare class OverviewMap {
|
|
|
26
22
|
*/
|
|
27
23
|
private _app;
|
|
28
24
|
/**
|
|
29
|
-
* @type {boolean}
|
|
25
|
+
* @type {import("vue").Ref<boolean>}
|
|
30
26
|
* @private
|
|
31
27
|
*/
|
|
32
28
|
private _active;
|
|
@@ -91,6 +87,11 @@ declare class OverviewMap {
|
|
|
91
87
|
* @type {number}
|
|
92
88
|
*/
|
|
93
89
|
minimumHeight: number;
|
|
90
|
+
/**
|
|
91
|
+
* Handles image selection on panorama features
|
|
92
|
+
* @type {import("@vcmap/core").PanoramaImageSelection}
|
|
93
|
+
*/
|
|
94
|
+
_panoramaImageSelection: import("@vcmap/core").PanoramaImageSelection;
|
|
94
95
|
/**
|
|
95
96
|
* Handles the events from the overview map.
|
|
96
97
|
* @type {EventHandler}
|
|
@@ -123,7 +124,11 @@ declare class OverviewMap {
|
|
|
123
124
|
* @private
|
|
124
125
|
*/
|
|
125
126
|
private _collectionListeners;
|
|
126
|
-
|
|
127
|
+
_uiConfigWatchers: import("vue").WatchStopHandle[];
|
|
128
|
+
/**
|
|
129
|
+
* @type {import("vue").ComputedRef<boolean>}
|
|
130
|
+
*/
|
|
131
|
+
currentState: import("vue").ComputedRef<boolean>;
|
|
127
132
|
/**
|
|
128
133
|
* @type {boolean}
|
|
129
134
|
*/
|
|
@@ -136,6 +141,10 @@ declare class OverviewMap {
|
|
|
136
141
|
* @type {EventHandler|null}
|
|
137
142
|
*/
|
|
138
143
|
get eventHandler(): EventHandler | null;
|
|
144
|
+
/**
|
|
145
|
+
* @type {import("@vcmap/core").PanoramaImageSelection}
|
|
146
|
+
*/
|
|
147
|
+
get panoramaImageSelection(): PanoramaImageSelection;
|
|
139
148
|
/**
|
|
140
149
|
* An event which is triggered whenever the overview map is clicked.
|
|
141
150
|
* Is passed a {@link InteractionEvent} as its only argument
|
|
@@ -158,7 +167,7 @@ declare class OverviewMap {
|
|
|
158
167
|
*/
|
|
159
168
|
activate(): Promise<void>;
|
|
160
169
|
/**
|
|
161
|
-
*
|
|
170
|
+
* clears all listeners
|
|
162
171
|
*/
|
|
163
172
|
deactivate(): void;
|
|
164
173
|
/**
|
|
@@ -211,3 +220,4 @@ declare class OverviewMap {
|
|
|
211
220
|
import { VectorStyleItem } from '@vcmap/core';
|
|
212
221
|
import { OpenlayersMap } from '@vcmap/core';
|
|
213
222
|
import { EventHandler } from '@vcmap/core';
|
|
223
|
+
import { PanoramaImageSelection } from '@vcmap/core';
|
|
@@ -22,41 +22,16 @@ import { Math as CesiumMath, Color, Cartographic } from '@vcmap-cesium/engine';
|
|
|
22
22
|
import { unByKey } from 'ol/Observable.js';
|
|
23
23
|
import VectorSource from 'ol/source/Vector.js';
|
|
24
24
|
import { Icon } from 'ol/style.js';
|
|
25
|
-
import { watch } from 'vue';
|
|
26
|
-
import { WindowSlot } from '../manager/window/windowManager.js';
|
|
25
|
+
import { computed, nextTick, ref, watch } from 'vue';
|
|
27
26
|
import OverviewMapClickedInteraction from './overviewMapClickedInteraction.js';
|
|
28
27
|
import {
|
|
29
28
|
getDefaultPrimaryColor,
|
|
30
29
|
getColorByKey,
|
|
31
30
|
} from '../vuePlugins/vuetify.js';
|
|
32
|
-
import { vcsAppSymbol } from '../pluginHelper.js';
|
|
33
|
-
import VcsMap from '../application/VcsMap.vue';
|
|
34
31
|
|
|
35
|
-
export const
|
|
32
|
+
export const overviewMapContainerId = 'overview-map-container';
|
|
36
33
|
export const overviewMapLayerSymbol = Symbol('overviewMapLayerSymbol');
|
|
37
34
|
|
|
38
|
-
/**
|
|
39
|
-
* @returns {import("../manager/window/windowManager.js").WindowComponentOptions}
|
|
40
|
-
*/
|
|
41
|
-
export function getWindowComponentOptions() {
|
|
42
|
-
return {
|
|
43
|
-
component: VcsMap,
|
|
44
|
-
props: { mapId: 'overview-map-container' },
|
|
45
|
-
slot: WindowSlot.DETACHED,
|
|
46
|
-
id: overviewMapWindowId,
|
|
47
|
-
state: {
|
|
48
|
-
hideHeader: true,
|
|
49
|
-
classes: ['overview-map'],
|
|
50
|
-
},
|
|
51
|
-
position: {
|
|
52
|
-
right: '100px',
|
|
53
|
-
bottom: '25px',
|
|
54
|
-
width: '300px',
|
|
55
|
-
height: '240px',
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
35
|
/**
|
|
61
36
|
* @param {string} color
|
|
62
37
|
* @returns {import("ol/style/Icon").Options}
|
|
@@ -112,17 +87,17 @@ class OverviewMap {
|
|
|
112
87
|
this._app = app;
|
|
113
88
|
|
|
114
89
|
/**
|
|
115
|
-
* @type {boolean}
|
|
90
|
+
* @type {import("vue").Ref<boolean>}
|
|
116
91
|
* @private
|
|
117
92
|
*/
|
|
118
|
-
this._active = false;
|
|
93
|
+
this._active = ref(false);
|
|
119
94
|
|
|
120
95
|
/**
|
|
121
96
|
* @type {import("@vcmap/core").OpenlayersMap||null}
|
|
122
97
|
* @private
|
|
123
98
|
*/
|
|
124
99
|
this._map = new OpenlayersMap({
|
|
125
|
-
target:
|
|
100
|
+
target: overviewMapContainerId,
|
|
126
101
|
});
|
|
127
102
|
|
|
128
103
|
/**
|
|
@@ -206,17 +181,22 @@ class OverviewMap {
|
|
|
206
181
|
*/
|
|
207
182
|
this.minimumHeight = 150;
|
|
208
183
|
|
|
184
|
+
const overviewMapClickedInteraction = new OverviewMapClickedInteraction();
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Handles image selection on panorama features
|
|
188
|
+
* @type {import("@vcmap/core").PanoramaImageSelection}
|
|
189
|
+
*/
|
|
190
|
+
this._panoramaImageSelection = new PanoramaImageSelection(this._app.maps);
|
|
191
|
+
|
|
209
192
|
/**
|
|
210
193
|
* Handles the events from the overview map.
|
|
211
194
|
* @type {EventHandler}
|
|
212
195
|
* @private
|
|
213
196
|
*/
|
|
214
197
|
this._eventHandler = new EventHandler();
|
|
215
|
-
const overviewMapClickedInteraction = new OverviewMapClickedInteraction();
|
|
216
198
|
this._eventHandler.addPersistentInteraction(overviewMapClickedInteraction);
|
|
217
|
-
this._eventHandler.addPersistentInteraction(
|
|
218
|
-
new PanoramaImageSelection(this._app.maps),
|
|
219
|
-
);
|
|
199
|
+
this._eventHandler.addPersistentInteraction(this._panoramaImageSelection);
|
|
220
200
|
|
|
221
201
|
/**
|
|
222
202
|
*
|
|
@@ -279,30 +259,50 @@ class OverviewMap {
|
|
|
279
259
|
),
|
|
280
260
|
];
|
|
281
261
|
|
|
282
|
-
this.
|
|
283
|
-
(
|
|
284
|
-
this._app.uiConfig.config.hideMapNavigation,
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
262
|
+
this._uiConfigWatchers = [
|
|
263
|
+
watch(
|
|
264
|
+
() => this._app.uiConfig.config.hideMapNavigation,
|
|
265
|
+
(hide) => {
|
|
266
|
+
if (hide && this._active.value) {
|
|
267
|
+
this.deactivate();
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
),
|
|
271
|
+
watch(
|
|
272
|
+
() => this._app.uiConfig.config.overviewMapActiveOnStartup,
|
|
273
|
+
async (activeOnStartup) => {
|
|
274
|
+
if (
|
|
275
|
+
activeOnStartup &&
|
|
276
|
+
!this._active.value &&
|
|
277
|
+
!this._app.uiConfig.config.hideMapNavigation
|
|
278
|
+
) {
|
|
279
|
+
await this.activate();
|
|
280
|
+
} else if (!activeOnStartup && this._active.value) {
|
|
281
|
+
this.deactivate();
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
),
|
|
285
|
+
watch(
|
|
286
|
+
() => this._app.uiConfig.config.overviewMapScaleFactor,
|
|
287
|
+
(scaleFactor) => {
|
|
288
|
+
if (scaleFactor) {
|
|
289
|
+
this._scaleFactor = scaleFactor;
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
),
|
|
293
|
+
];
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* @type {import("vue").ComputedRef<boolean>}
|
|
297
|
+
*/
|
|
298
|
+
this.currentState = computed(() => this._active.value);
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
/**
|
|
302
302
|
* @type {boolean}
|
|
303
303
|
*/
|
|
304
304
|
get active() {
|
|
305
|
-
return this._active;
|
|
305
|
+
return this._active.value;
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
/**
|
|
@@ -319,6 +319,13 @@ class OverviewMap {
|
|
|
319
319
|
return this._eventHandler;
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
+
/**
|
|
323
|
+
* @type {import("@vcmap/core").PanoramaImageSelection}
|
|
324
|
+
*/
|
|
325
|
+
get panoramaImageSelection() {
|
|
326
|
+
return this._panoramaImageSelection;
|
|
327
|
+
}
|
|
328
|
+
|
|
322
329
|
/**
|
|
323
330
|
* An event which is triggered whenever the overview map is clicked.
|
|
324
331
|
* Is passed a {@link InteractionEvent} as its only argument
|
|
@@ -350,9 +357,9 @@ class OverviewMap {
|
|
|
350
357
|
*/
|
|
351
358
|
async _activate() {
|
|
352
359
|
await this._map.activate();
|
|
353
|
-
this._map.setTarget(
|
|
360
|
+
this._map.setTarget(overviewMapContainerId);
|
|
354
361
|
this._map.target?.firstChild?.classList?.add('overviewMapElement');
|
|
355
|
-
if (!this._active) {
|
|
362
|
+
if (!this._active.value) {
|
|
356
363
|
this._mapActivatedListener = this._app.maps.mapActivated.addEventListener(
|
|
357
364
|
() => {
|
|
358
365
|
this._clearListeners();
|
|
@@ -361,7 +368,8 @@ class OverviewMap {
|
|
|
361
368
|
},
|
|
362
369
|
);
|
|
363
370
|
}
|
|
364
|
-
this._active = true;
|
|
371
|
+
this._active.value = true;
|
|
372
|
+
await nextTick();
|
|
365
373
|
const { activeMap } = this._app.maps;
|
|
366
374
|
if (activeMap instanceof ObliqueMap) {
|
|
367
375
|
await this._initializeForOblique(activeMap);
|
|
@@ -375,23 +383,20 @@ class OverviewMap {
|
|
|
375
383
|
* @returns {Promise<void>}
|
|
376
384
|
*/
|
|
377
385
|
async activate() {
|
|
378
|
-
if (!this._app.windowManager.has(overviewMapWindowId)) {
|
|
379
|
-
this._app.windowManager.add(getWindowComponentOptions(), vcsAppSymbol);
|
|
380
|
-
}
|
|
381
386
|
await this._activate();
|
|
382
387
|
}
|
|
383
388
|
|
|
384
389
|
/**
|
|
385
|
-
*
|
|
390
|
+
* clears all listeners
|
|
386
391
|
*/
|
|
387
392
|
deactivate() {
|
|
388
|
-
this.
|
|
393
|
+
this.map.deactivate();
|
|
389
394
|
this._clearListeners();
|
|
390
395
|
if (this._mapActivatedListener) {
|
|
391
396
|
this._mapActivatedListener();
|
|
392
397
|
this._mapActivatedListener = null;
|
|
393
398
|
}
|
|
394
|
-
this._active = false;
|
|
399
|
+
this._active.value = false;
|
|
395
400
|
}
|
|
396
401
|
|
|
397
402
|
/**
|
|
@@ -402,8 +407,8 @@ class OverviewMap {
|
|
|
402
407
|
async _initializePostRenderHandler(map) {
|
|
403
408
|
if (!this._cameraIconLayer) {
|
|
404
409
|
this._setupCameraIconLayer();
|
|
405
|
-
this._syncCameraViewAndFeature();
|
|
406
410
|
}
|
|
411
|
+
this._syncCameraViewAndFeature();
|
|
407
412
|
const navRemover = this._addNavigationListener(map);
|
|
408
413
|
const prRemover = map.postRender.addEventListener(
|
|
409
414
|
this._syncCameraViewAndFeature.bind(this),
|
|
@@ -678,7 +683,7 @@ class OverviewMap {
|
|
|
678
683
|
this._clearListeners();
|
|
679
684
|
this._collectionListeners.forEach((cb) => cb());
|
|
680
685
|
this._collectionListeners = [];
|
|
681
|
-
this.
|
|
686
|
+
this._uiConfigWatchers.forEach((cb) => cb());
|
|
682
687
|
if (this._mapPointerListener) {
|
|
683
688
|
this._mapPointerListener();
|
|
684
689
|
this._mapPointerListener = null;
|