@vcmap/ui 6.2.0-rc.2 → 6.2.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/build/postInstall.js +32 -0
  2. package/config/dev.config.json +12 -0
  3. package/dist/assets/cesium.js +1 -1
  4. package/dist/assets/{core-6b5c0363.js → core-640eba41.js} +6965 -6565
  5. package/dist/assets/core-workers/panoramaImageWorker.js +1 -1
  6. package/dist/assets/core.js +1 -1
  7. package/dist/assets/{ol-f58f403b.js → ol-2b44b2a9.js} +1 -1
  8. package/dist/assets/ol.js +1 -1
  9. package/dist/assets/ui-8896bb2c.css +1 -0
  10. package/dist/assets/{ui-aadb7707.js → ui-8896bb2c.js} +9668 -9247
  11. package/dist/assets/ui.js +1 -1
  12. package/dist/assets/vue.js +1 -1
  13. package/dist/assets/{vuetify-533fb61b.js → vuetify-45cc2bff.js} +1 -1
  14. package/dist/assets/vuetify.js +1 -1
  15. package/index.d.ts +8 -6
  16. package/index.js +5 -7
  17. package/package.json +3 -2
  18. package/plugins/package.json +8 -7
  19. package/src/actions/actionHelper.d.ts +16 -11
  20. package/src/actions/actionHelper.js +50 -61
  21. package/src/actions/flightActions.d.ts +10 -0
  22. package/src/actions/flightActions.js +103 -13
  23. package/src/application/VcsApp.vue +1 -1
  24. package/src/application/VcsMainMap.vue +40 -2
  25. package/src/application/VcsMainMap.vue.d.ts +4 -0
  26. package/src/application/VcsMap.vue +0 -9
  27. package/src/components/flight/VcsFlightAnchorsComponent.vue +1 -0
  28. package/src/components/flight/VcsFlightPlayer.vue +31 -17
  29. package/src/components/flight/VcsFlightPlayer.vue.d.ts +1 -0
  30. package/src/components/plugins/VcsLoadingOverlay.vue +138 -0
  31. package/src/components/plugins/VcsLoadingOverlay.vue.d.ts +2 -0
  32. package/src/components/plugins/{AbstractWorkspaceItemCreator.vue → VcsWorkspaceWrapper.vue} +3 -3
  33. package/src/components/vector-properties/VcsFeatureEditingWindow.vue +20 -1
  34. package/src/components/vector-properties/VcsFeatureEditingWindow.vue.d.ts +11 -0
  35. package/src/components/vector-properties/VcsFeatureInputEditor.vue +166 -0
  36. package/src/components/vector-properties/VcsFeatureInputEditor.vue.d.ts +17 -0
  37. package/src/contentTree/contentTreeCollection.d.ts +5 -0
  38. package/src/contentTree/contentTreeCollection.js +11 -3
  39. package/src/contentTree/contentTreeItem.d.ts +2 -2
  40. package/src/contentTree/wmsGroupContentTreeItem.js +10 -3
  41. package/src/featureInfo/iframeFeatureInfoView.d.ts +16 -3
  42. package/src/featureInfo/iframeFeatureInfoView.js +19 -2
  43. package/src/featureInfo/iframeWmsFeatureInfoView.d.ts +3 -1
  44. package/src/featureInfo/iframeWmsFeatureInfoView.js +1 -1
  45. package/src/i18n/de.d.ts +21 -7
  46. package/src/i18n/de.js +11 -0
  47. package/src/i18n/en.d.ts +21 -7
  48. package/src/i18n/en.js +11 -0
  49. package/src/navigation/MapNavigation.vue +22 -27
  50. package/src/navigation/MapNavigation.vue.d.ts +2 -34
  51. package/src/navigation/overviewMap.d.ts +23 -13
  52. package/src/navigation/overviewMap.js +73 -72
  53. package/dist/assets/ui-aadb7707.css +0 -1
  54. /package/dist/assets/{cesium-8dd00805.js → cesium-8502542e.js} +0 -0
  55. /package/dist/assets/core-workers/{panoramaImageWorker.js-0ce7d2f3.js → panoramaImageWorker.js-70e7fc33.js} +0 -0
  56. /package/dist/assets/{vue-d7691a29.js → vue-461b4f1b.js} +0 -0
  57. /package/dist/assets/{vuetify-533fb61b.css → vuetify-45cc2bff.css} +0 -0
  58. /package/src/components/plugins/{AbstractWorkspaceItemCreator.vue.d.ts → VcsWorkspaceWrapper.vue.d.ts} +0 -0
package/dist/assets/ui.js CHANGED
@@ -1 +1 @@
1
- export * from "./ui-aadb7707.js";
1
+ export * from "./ui-8896bb2c.js";
@@ -1 +1 @@
1
- export * from "./vue-d7691a29.js";
1
+ export * from "./vue-461b4f1b.js";
@@ -10,7 +10,7 @@ function loadCss(href) {
10
10
  elem.onerror = reject;
11
11
  document.head.appendChild(elem);
12
12
  });
13
- } await loadCss('./assets/vuetify-533fb61b.css');import { watch as Q, onScopeDispose as Ze, effectScope as Zl, shallowRef as K, Fragment as ie, reactive as it, computed as b, watchEffect as Fe, toRefs as Yt, capitalize as Nn, isVNode as Rc, Comment as Nc, unref as ot, warn as ja, getCurrentInstance as Hc, ref as j, provide as De, inject as ye, defineComponent as zc, camelize as Ir, h as Gt, toRaw as Be, createVNode as r, mergeProps as O, onBeforeUnmount as Qe, readonly as Ql, onDeactivated as _r, onActivated as Wc, onMounted as Ye, nextTick as we, TransitionGroup as Jl, Transition as jt, isRef as Tn, toRef as $, onBeforeMount as ra, withDirectives as $e, resolveDirective as gt, vShow as Ct, onUpdated as jc, Text as Uc, resolveDynamicComponent as Yc, markRaw as Gc, Teleport as Kc, cloneVNode as qc, createTextVNode as Tt, onUnmounted as Tr, onBeforeUpdate as Xc, withModifiers as Tl, toDisplayString as Zc, vModelText as Qc, resolveComponent as Jc, render as Ar } from "./vue-d7691a29.js";
13
+ } await loadCss('./assets/vuetify-45cc2bff.css');import { watch as Q, onScopeDispose as Ze, effectScope as Zl, shallowRef as K, Fragment as ie, reactive as it, computed as b, watchEffect as Fe, toRefs as Yt, capitalize as Nn, isVNode as Rc, Comment as Nc, unref as ot, warn as ja, getCurrentInstance as Hc, ref as j, provide as De, inject as ye, defineComponent as zc, camelize as Ir, h as Gt, toRaw as Be, createVNode as r, mergeProps as O, onBeforeUnmount as Qe, readonly as Ql, onDeactivated as _r, onActivated as Wc, onMounted as Ye, nextTick as we, TransitionGroup as Jl, Transition as jt, isRef as Tn, toRef as $, onBeforeMount as ra, withDirectives as $e, resolveDirective as gt, vShow as Ct, onUpdated as jc, Text as Uc, resolveDynamicComponent as Yc, markRaw as Gc, Teleport as Kc, cloneVNode as qc, createTextVNode as Tt, onUnmounted as Tr, onBeforeUpdate as Xc, withModifiers as Tl, toDisplayString as Zc, vModelText as Qc, resolveComponent as Jc, render as Ar } from "./vue-461b4f1b.js";
14
14
  function rt(e, n) {
15
15
  let t;
16
16
  function a() {
@@ -1 +1 @@
1
- export * from "./vuetify-533fb61b.js";
1
+ export * from "./vuetify-45cc2bff.js";
package/index.d.ts CHANGED
@@ -127,6 +127,8 @@ export { default as ObliqueRotation } from "./src/navigation/ObliqueRotation.vue
127
127
  export type * from "./src/navigation/ObliqueRotation.vue.d.ts";
128
128
  export { default as OrientationToolsButton } from "./src/navigation/OrientationToolsButton.vue";
129
129
  export type * from "./src/navigation/OrientationToolsButton.vue.d.ts";
130
+ export { default as OverviewMap } from "./src/navigation/overviewMap.js";
131
+ export type * from "./src/navigation/overviewMap.d.ts";
130
132
  export { default as OverviewMapClickedInteraction } from "./src/navigation/overviewMapClickedInteraction.js";
131
133
  export type * from "./src/navigation/overviewMapClickedInteraction.d.ts";
132
134
  export { default as TiltSlider } from "./src/navigation/TiltSlider.vue";
@@ -261,8 +263,10 @@ export { default as VcsFeatureStyleComponent } from "./src/components/style/VcsF
261
263
  export type * from "./src/components/style/VcsFeatureStyleComponent.vue.d.ts";
262
264
  export { default as AbstractConfigEditor } from "./src/components/plugins/AbstractConfigEditor.vue";
263
265
  export type * from "./src/components/plugins/AbstractConfigEditor.vue.d.ts";
264
- export { default as AbstractWorkspaceItemCreator } from "./src/components/plugins/AbstractWorkspaceItemCreator.vue";
265
- export type * from "./src/components/plugins/AbstractWorkspaceItemCreator.vue.d.ts";
266
+ export { default as VcsWorkspaceWrapper } from "./src/components/plugins/VcsWorkspaceWrapper.vue";
267
+ export type * from "./src/components/plugins/VcsWorkspaceWrapper.vue.d.ts";
268
+ export { default as VcsLoadingOverlay } from "./src/components/plugins/VcsLoadingOverlay.vue";
269
+ export type * from "./src/components/plugins/VcsLoadingOverlay.vue.d.ts";
266
270
  export { default as VcsFileDrop } from "./src/components/import/VcsFileDrop.vue";
267
271
  export type * from "./src/components/import/VcsFileDrop.vue.d.ts";
268
272
  export { default as VcsImportComponent } from "./src/components/import/VcsImportComponent.vue";
@@ -279,7 +283,7 @@ export { default as ResultItemComponent } from "./src/search/ResultItem.vue";
279
283
  export type * from "./src/search/ResultItem.vue.d.ts";
280
284
  export { default as ResultsComponent } from "./src/search/ResultsComponent.vue";
281
285
  export type * from "./src/search/ResultsComponent.vue.d.ts";
282
- export { callSafeAction, createMapButtonAction, createToggleAction, createOverviewMapAction, createModalAction, createLinkAction, createGoToViewpointAction, createZoomToFeatureAction, searchComponentId } from "./src/actions/actionHelper.js";
286
+ export { addLoadingOverlay, callSafeAction, createMapButtonAction, createToggleAction, createModalAction, createLinkAction, createGoToViewpointAction, createZoomToFeatureAction, searchComponentId } from "./src/actions/actionHelper.js";
283
287
  export type * from "./src/actions/actionHelper.d.ts";
284
288
  export { createDeepPickingAction, deepPickingWindowId } from "./src/actions/deepPickingAction.js";
285
289
  export type * from "./src/actions/deepPickingAction.d.ts";
@@ -287,7 +291,7 @@ export { createStateRefAction, StateActionState } from "./src/actions/stateRefAc
287
291
  export type * from "./src/actions/stateRefAction.d.ts";
288
292
  export { createLayerToggleAction, createZoomToExtentAction, createExtentFeatureAction, setupExtentComponentActions } from "./src/actions/extentActions.js";
289
293
  export type * from "./src/actions/extentActions.d.ts";
290
- export { createPlayAction, PlayerDirection, createStepAction, createFastAction, createFlightPlayerActions, setupFlightListItemPlayer, createZoomToFlightAction, createFlightVisualizationAction, createExportFlightAction, importFlights } from "./src/actions/flightActions.js";
294
+ export { createPlayAction, PlayerDirection, createStepAction, createFastAction, createFlightPlayerActions, setupFlightListItemPlayer, createZoomToFlightAction, createFlightVisualizationAction, createFlightMovieActions, createExportFlightAction, importFlights } from "./src/actions/flightActions.js";
291
295
  export type * from "./src/actions/flightActions.d.ts";
292
296
  export { createListItemDeleteAction, createListItemBulkAction, createListExportAction, createListImportAction, importIntoLayer } from "./src/actions/listActions.js";
293
297
  export type * from "./src/actions/listActions.d.ts";
@@ -325,8 +329,6 @@ export { getBalloonPosition, setBalloonPosition, setupBalloonPositionListener }
325
329
  export type * from "./src/featureInfo/balloonHelper.d.ts";
326
330
  export { getHighlightStyleFromStyle, getHighlightStyle, getClusterHighlightStyle, featureInfoViewSymbol } from "./src/featureInfo/featureInfo.js";
327
331
  export type * from "./src/featureInfo/featureInfo.d.ts";
328
- export { getWindowComponentOptions, default as OverviewMap, overviewMapWindowId } from "./src/navigation/overviewMap.js";
329
- export type * from "./src/navigation/overviewMap.d.ts";
330
332
  export { createVueI18n, setupI18n } from "./src/vuePlugins/i18n.js";
331
333
  export type * from "./src/vuePlugins/i18n.d.ts";
332
334
  export { default as I18nCollection, i18nPluginSymbol } from "./src/i18n/i18nCollection.js";
package/index.js CHANGED
@@ -3,10 +3,10 @@ import './src/styles/main.scss';
3
3
 
4
4
  export { default as StyleSelector } from './src/actions/StyleSelector.vue';
5
5
  export {
6
+ addLoadingOverlay,
6
7
  callSafeAction,
7
8
  createMapButtonAction,
8
9
  createToggleAction,
9
- createOverviewMapAction,
10
10
  createModalAction,
11
11
  createLinkAction,
12
12
  createGoToViewpointAction,
@@ -38,6 +38,7 @@ export {
38
38
  setupFlightListItemPlayer,
39
39
  createZoomToFlightAction,
40
40
  createFlightVisualizationAction,
41
+ createFlightMovieActions,
41
42
  createExportFlightAction,
42
43
  importFlights,
43
44
  } from './src/actions/flightActions.js';
@@ -211,11 +212,7 @@ export { default as MapNavCompass } from './src/navigation/MapNavCompass.vue';
211
212
  export { default as MapNavigation } from './src/navigation/MapNavigation.vue';
212
213
  export { default as ObliqueRotation } from './src/navigation/ObliqueRotation.vue';
213
214
  export { default as OrientationToolsButton } from './src/navigation/OrientationToolsButton.vue';
214
- export {
215
- getWindowComponentOptions,
216
- default as OverviewMap,
217
- overviewMapWindowId,
218
- } from './src/navigation/overviewMap.js';
215
+ export { default as OverviewMap } from './src/navigation/overviewMap.js';
219
216
  export { default as OverviewMapClickedInteraction } from './src/navigation/overviewMapClickedInteraction.js';
220
217
  export { default as TiltSlider } from './src/navigation/TiltSlider.vue';
221
218
  export { default as VcsCompass } from './src/navigation/VcsCompass.vue';
@@ -361,7 +358,8 @@ export { default as VcsFeatureTransforms } from './src/components/vector-propert
361
358
  export { default as VcsSnapTo } from './src/components/vector-properties/VcsSnapTo.vue';
362
359
  export { default as VcsFeatureStyleComponent } from './src/components/style/VcsFeatureStyleComponent.vue';
363
360
  export { default as AbstractConfigEditor } from './src/components/plugins/AbstractConfigEditor.vue';
364
- export { default as AbstractWorkspaceItemCreator } from './src/components/plugins/AbstractWorkspaceItemCreator.vue';
361
+ export { default as VcsWorkspaceWrapper } from './src/components/plugins/VcsWorkspaceWrapper.vue';
362
+ export { default as VcsLoadingOverlay } from './src/components/plugins/VcsLoadingOverlay.vue';
365
363
  export { default as VcsFileDrop } from './src/components/import/VcsFileDrop.vue';
366
364
  export { default as VcsImportComponent } from './src/components/import/VcsImportComponent.vue';
367
365
  export { default as VcsExpansionPanel } from './src/components/section/VcsExpansionPanel.vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcmap/ui",
3
- "version": "6.2.0-rc.2",
3
+ "version": "6.2.0-rc.4",
4
4
  "author": "Virtual City Systems",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -19,6 +19,7 @@
19
19
  "lint": "npm run lint:js && npm run lint:prettier && npm run lint:types",
20
20
  "format": "prettier --write --list-different . && npm run lint:js -- --fix",
21
21
  "prepack": "node build/build.js && node build/buildTypes.js",
22
+ "postinstall": "node build/postInstall.js",
22
23
  "install-plugins": "cd plugins && npm i --omit peer --no-package-lock --force",
23
24
  "story:dev": "histoire dev",
24
25
  "story:build": "histoire build",
@@ -57,7 +58,7 @@
57
58
  },
58
59
  "peerDependencies": {
59
60
  "@vcmap-cesium/engine": "^11.0.3",
60
- "@vcmap/core": "6.2.0-rc.1",
61
+ "@vcmap/core": "6.2.0-rc.3",
61
62
  "ol": "^10.4.0",
62
63
  "vue": "~3.4.38",
63
64
  "vuetify": "~3.7.14"
@@ -5,13 +5,13 @@
5
5
  "@vcmap/clipping-tool": "^2.0.0",
6
6
  "@vcmap/transparent-terrain": "^2.0.0",
7
7
  "@vcmap/height-profile": "^2.0.0",
8
- "@vcmap/flight": "^2.0.0",
9
- "@vcmap/swipe-tool": "^3.0.0",
8
+ "@vcmap/flight": "^3.0.0",
9
+ "@vcmap/swipe-tool": "^4.0.0",
10
10
  "@vcmap/export": "^2.0.0",
11
11
  "@vcmap/viewshed": "^3.0.0",
12
- "@vcmap/measurement": "^3.0.0",
12
+ "@vcmap/measurement": "^4.0.0",
13
13
  "@vcmap/multi-view": "^2.0.0",
14
- "@vcmap/draw": "^3.0.0",
14
+ "@vcmap/draw": "^4.0.0",
15
15
  "@vcmap/shadow": "^3.0.0",
16
16
  "@vcmap/search-wfs": "^2.0.0",
17
17
  "@vcmap/search-esri": "^2.0.0",
@@ -20,7 +20,7 @@
20
20
  "@vcmap/cesium-filters": "^2.0.0",
21
21
  "@vcmap/search-nominatim": "^2.0.0",
22
22
  "@vcmap/create-link": "^3.0.0",
23
- "@vcmap/module-selector": "^2.0.0",
23
+ "@vcmap/module-selector": "^3.0.0",
24
24
  "@vcmap/line-of-sight": "^1.0.0",
25
25
  "@vcmap/layer-slider": "^2.0.0",
26
26
  "@vcmap/vcs-solar-balloon": "^2.0.0",
@@ -29,9 +29,10 @@
29
29
  "@vcmap/gamepad": "^1.0.0",
30
30
  "@vcmap/sensorthings": "^1.0.0",
31
31
  "@vcmap/cesium-inspector": "^2.0.0",
32
- "@vcmap/event-control": "^1.0.1"
32
+ "@vcmap/event-control": "^1.0.1",
33
+ "@vcmap/dynamic-layer": "^1.0.0"
33
34
  },
34
35
  "optionalDependencies": {
35
- "@vcmap/planning": "^6.0.0"
36
+ "@vcmap/planning": "^7.0.0"
36
37
  }
37
38
  }
@@ -54,17 +54,6 @@ export function createSearchButtonAction(app: import("../vcsUiApp.js").default):
54
54
  searchAction: import("vue").Ref<import("vue").UnwrapRef<VcsAction> | null>;
55
55
  destroy: () => void;
56
56
  };
57
- /**
58
- * Creates an action which will toggle the overview map (opening & closing the window and activating/ deactivating the overview map).
59
- * @param {import("../navigation/overviewMap.js").default} overviewMap
60
- * @param {import("../manager/window/windowManager.js").WindowComponentOptions} windowComponent
61
- * @param {import("../manager/window/windowManager.js").default} windowManager
62
- * @returns {{action: VcsAction, destroy: function(): void}}
63
- */
64
- export function createOverviewMapAction(overviewMap: import("../navigation/overviewMap.js").default, windowComponent: import("../manager/window/windowManager.js").WindowComponentOptions, windowManager: import("../manager/window/windowManager.js").default): {
65
- action: VcsAction;
66
- destroy: () => void;
67
- };
68
57
  /**
69
58
  * Creates a header less window which will close if anything outside of the window is clicked. The window will open
70
59
  * at the clicked position (the actions position) by default, unless the window component already has a position set.
@@ -113,6 +102,22 @@ export function createZoomToFeatureAction(actionOptions: ActionOptions, feature:
113
102
  * @param {PointerEvent} [p]
114
103
  */
115
104
  export function callSafeAction(action: VcsAction, p?: PointerEvent | undefined): void;
105
+ /**
106
+ * Adds a loading overlay to the application.
107
+ * @param {import("../vcsUiApp.js").default} app
108
+ * @param {string|symbol} owner The owner of the loading overlay.
109
+ * @param {{id?:string, progress?:import('vue').Ref<number>|undefined, title?:string, text?:string, cancel?:Function, maxWidth?:number|string, persistent?:boolean}} [options] The options for the loading overlay, passed as props.
110
+ * @returns {function(): void} A function to remove the loading overlay.
111
+ */
112
+ export function addLoadingOverlay(app: import("../vcsUiApp.js").default, owner: string | symbol, options?: {
113
+ id?: string | undefined;
114
+ progress?: import('vue').Ref<number> | undefined;
115
+ title?: string | undefined;
116
+ text?: string | undefined;
117
+ cancel?: Function | undefined;
118
+ maxWidth?: string | number | undefined;
119
+ persistent?: boolean | undefined;
120
+ } | undefined): () => void;
116
121
  export const searchComponentId: "searchId";
117
122
  export type ActionOptions = Omit<VcsAction, 'callback'>;
118
123
  export type ActionCallback = (p?: PointerEvent) => (void | Promise<void>);
@@ -19,6 +19,7 @@ import {
19
19
  getTargetSize,
20
20
  } from '../manager/window/windowHelper.js';
21
21
  import SearchComponent from '../search/SearchComponent.vue';
22
+ import VcsLoadingOverlay from '../components/plugins/VcsLoadingOverlay.vue';
22
23
 
23
24
  /**
24
25
  * @typedef {Omit<VcsAction, 'callback'>} ActionOptions
@@ -322,57 +323,6 @@ export function createSearchButtonAction(app) {
322
323
  return { searchAction, destroy };
323
324
  }
324
325
 
325
- /**
326
- * Creates an action which will toggle the overview map (opening & closing the window and activating/ deactivating the overview map).
327
- * @param {import("../navigation/overviewMap.js").default} overviewMap
328
- * @param {import("../manager/window/windowManager.js").WindowComponentOptions} windowComponent
329
- * @param {import("../manager/window/windowManager.js").default} windowManager
330
- * @returns {{action: VcsAction, destroy: function(): void}}
331
- */
332
- export function createOverviewMapAction(
333
- overviewMap,
334
- windowComponent,
335
- windowManager,
336
- ) {
337
- const { action, destroy } = createToggleAction(
338
- {
339
- name: 'overviewMapToggle',
340
- icon: '$vcsMap',
341
- title: 'navigation.overviewMapTooltip',
342
- },
343
- windowComponent,
344
- windowManager,
345
- vcsAppSymbol,
346
- );
347
-
348
- const listeners = [
349
- windowManager.added.addEventListener(({ id }) => {
350
- if (id === windowComponent.id) {
351
- overviewMap.activate().catch((e) => {
352
- getLogger('createOverviewMapAction').error(
353
- 'failed to activate overview map',
354
- e,
355
- );
356
- windowManager.remove(windowComponent.id);
357
- });
358
- }
359
- }),
360
- windowManager.removed.addEventListener(({ id }) => {
361
- if (id === windowComponent.id) {
362
- overviewMap.deactivate();
363
- }
364
- }),
365
- ];
366
-
367
- const destroyAction = () => {
368
- destroy();
369
- listeners.forEach((cb) => {
370
- cb();
371
- });
372
- };
373
- return { action, destroy: destroyAction };
374
- }
375
-
376
326
  /**
377
327
  * Creates a header less window which will close if anything outside of the window is clicked. The window will open
378
328
  * at the clicked position (the actions position) by default, unless the window component already has a position set.
@@ -418,10 +368,7 @@ export function createModalAction(actionOptions, modalComponent, app, owner) {
418
368
  width,
419
369
  height,
420
370
  );
421
- const position = {
422
- ...fittedPosition,
423
- ...windowPositionOptions,
424
- };
371
+ const position = { ...fittedPosition, ...windowPositionOptions };
425
372
  const targetSize = getTargetSize(app.maps.target);
426
373
  if (contentHeight) {
427
374
  if (position.bottom) {
@@ -451,12 +398,7 @@ export function createModalAction(actionOptions, modalComponent, app, owner) {
451
398
  clickedWindowPosition = { x: event.x, y: event.y };
452
399
  const state = { ...modalComponent?.state, hideHeader: true };
453
400
  app.windowManager.add(
454
- {
455
- position: getPositionOptions(),
456
- ...component,
457
- id,
458
- state,
459
- },
401
+ { position: getPositionOptions(), ...component, id, state },
460
402
  owner,
461
403
  );
462
404
  document.addEventListener('mousedown', handleMouseDown);
@@ -638,3 +580,50 @@ export function callSafeAction(action, p) {
638
580
  logError(e);
639
581
  }
640
582
  }
583
+
584
+ /**
585
+ * Adds a loading overlay to the application.
586
+ * @param {import("../vcsUiApp.js").default} app
587
+ * @param {string|symbol} owner The owner of the loading overlay.
588
+ * @param {{id?:string, progress?:import('vue').Ref<number>|undefined, title?:string, text?:string, cancel?:Function, maxWidth?:number|string, persistent?:boolean}} [options] The options for the loading overlay, passed as props.
589
+ * @returns {function(): void} A function to remove the loading overlay.
590
+ */
591
+ export function addLoadingOverlay(app, owner, options) {
592
+ check(owner, oneOf(String, Symbol));
593
+ check(options?.progress?.value, optional(Number));
594
+ check(
595
+ options,
596
+ optional({
597
+ id: optional(String),
598
+ title: optional(String),
599
+ text: optional(String),
600
+ cancel: optional(Function),
601
+ maxWidth: optional(oneOf(Number, String)),
602
+ persistent: optional(Boolean),
603
+ }),
604
+ );
605
+
606
+ const id = options?.id || `loading-overlay-${uuid()}`;
607
+ const removeWindow = () => {
608
+ if (app.windowManager.has(id)) {
609
+ app.windowManager.remove(id);
610
+ }
611
+ };
612
+ app.windowManager.add(
613
+ {
614
+ component: VcsLoadingOverlay,
615
+ id,
616
+ state: { hideHeader: true, styles: { display: 'none !important' } },
617
+ props: {
618
+ ...options,
619
+ cancellable: !!options.cancel,
620
+ onCancel: () => {
621
+ options?.cancel?.();
622
+ removeWindow();
623
+ },
624
+ },
625
+ },
626
+ owner,
627
+ );
628
+ return removeWindow;
629
+ }
@@ -69,6 +69,16 @@ export function createFlightVisualizationAction(app: import("../vcsUiApp.js").de
69
69
  action: import("./actionHelper.js").VcsAction;
70
70
  destroy: () => void;
71
71
  }>;
72
+ /**
73
+ *
74
+ * @param {import("../vcsUiApp.js").default} app
75
+ * @param {import("@vcmap/core").FlightInstance} instance
76
+ * @returns {{actions: import("./actionHelper.js").VcsAction[], destroy: function(): void}}
77
+ */
78
+ export function createFlightMovieActions(app: import("../vcsUiApp.js").default, instance: import("@vcmap/core").FlightInstance): {
79
+ actions: import("./actionHelper.js").VcsAction[];
80
+ destroy: () => void;
81
+ };
72
82
  /**
73
83
  *
74
84
  * @param {import("@vcmap/core").FlightInstance} instance
@@ -1,16 +1,21 @@
1
- import { reactive } from 'vue';
1
+ import { reactive, ref } from 'vue';
2
2
  import { check, maybe, ofEnum } from '@vcsuite/check';
3
3
  import { getLogger } from '@vcsuite/logger';
4
4
  import {
5
5
  createFlightVisualization,
6
+ createFlightMovie,
6
7
  exportFlightAsGeoJson,
7
8
  exportFlightPathAsGeoJson,
8
9
  FlightInstance,
9
10
  moduleIdSymbol,
10
11
  parseFlightOptionsFromGeoJson,
12
+ createFlightPlayer,
13
+ LayerState,
11
14
  } from '@vcmap/core';
12
15
  import { NotificationType } from '../notifier/notifier.js';
13
- import { downloadText } from '../downloadHelper.js';
16
+ import { downloadBlob, downloadText } from '../downloadHelper.js';
17
+ import { addLoadingOverlay, callSafeAction } from './actionHelper.js';
18
+ import { vcsAppSymbol } from '../pluginHelper.js';
14
19
 
15
20
  /**
16
21
  * @param {import("../vcsUiApp.js").default} app
@@ -97,10 +102,7 @@ export function createPlayAction(app, instance) {
97
102
  /**
98
103
  * @enum {string}
99
104
  */
100
- export const PlayerDirection = {
101
- Forward: 'forward',
102
- Backward: 'backward',
103
- };
105
+ export const PlayerDirection = { Forward: 'forward', Backward: 'backward' };
104
106
 
105
107
  /**
106
108
  * @param {import("../vcsUiApp.js").default} app
@@ -365,18 +367,32 @@ export async function createFlightVisualizationAction(
365
367
  instance,
366
368
  active = true,
367
369
  ) {
368
- let flightVis = await createFlightVisualization(instance, app);
370
+ let flightVis;
371
+ let flightVisListener;
372
+ let flightVisStateListener;
369
373
 
370
374
  const action = reactive({
371
375
  name: 'components.flight.hidePath',
372
376
  title: 'components.flight.hidePath',
373
377
  icon: '$vcsEye',
374
- active,
378
+ active: false,
375
379
  async callback() {
376
380
  if (!flightVis) {
377
381
  flightVis = await createFlightVisualization(instance, app);
382
+ flightVisListener?.();
383
+ flightVisListener = flightVis.destroyed.addEventListener(() => {
384
+ flightVis = undefined;
385
+ flightVisListener?.();
386
+ flightVisStateListener?.();
387
+ });
388
+ flightVisStateListener?.();
389
+ flightVisStateListener = flightVis.stateChanged.addEventListener(
390
+ (state) => {
391
+ action.active = state === LayerState.ACTIVE;
392
+ },
393
+ );
378
394
  }
379
- if (this.active) {
395
+ if (flightVis.state === LayerState.ACTIVE) {
380
396
  flightVis.deactivate();
381
397
  } else {
382
398
  flightVis.activate().catch(() => {
@@ -384,22 +400,96 @@ export async function createFlightVisualizationAction(
384
400
  this.active = false;
385
401
  });
386
402
  }
387
- this.active = !this.active;
403
+ this.active = flightVis.state === LayerState.ACTIVE;
388
404
  },
389
405
  });
390
406
 
391
407
  if (active) {
392
- await flightVis.activate();
408
+ callSafeAction(action);
393
409
  }
394
410
 
395
411
  const destroy = () => {
396
- flightVis.deactivate();
397
- flightVis.destroy();
412
+ flightVis?.deactivate?.();
413
+ flightVis?.destroy?.();
398
414
  };
399
415
 
400
416
  return { action, destroy };
401
417
  }
402
418
 
419
+ /**
420
+ *
421
+ * @param {import("../vcsUiApp.js").default} app
422
+ * @param {import("@vcmap/core").FlightInstance} instance
423
+ * @returns {{actions: import("./actionHelper.js").VcsAction[], destroy: function(): void}}
424
+ */
425
+ export function createFlightMovieActions(app, instance) {
426
+ const progress = ref(0);
427
+
428
+ function updateProgress(playerClock) {
429
+ const duration = playerClock.endTime - playerClock.startTime;
430
+ const currentTime = playerClock.currentTime - playerClock.startTime;
431
+ progress.value = currentTime / duration;
432
+ }
433
+
434
+ async function recordFlight(options = {}) {
435
+ let player;
436
+ let flightVis;
437
+ let playerListener = () => {};
438
+ let removeLoadingOverlay = () => {};
439
+ try {
440
+ flightVis = await createFlightVisualization(instance, app);
441
+ if (flightVis.state === LayerState.ACTIVE) {
442
+ flightVis.deactivate();
443
+ }
444
+ player = await createFlightPlayer(instance, app);
445
+ playerListener = player.clock.changed.addEventListener(updateProgress);
446
+ const { start, cancel } = createFlightMovie(app, player, options);
447
+ removeLoadingOverlay = addLoadingOverlay(app, vcsAppSymbol, {
448
+ progress,
449
+ title: 'components.flight.record.inProgress',
450
+ cancel,
451
+ });
452
+ const blob = await start();
453
+ removeLoadingOverlay?.();
454
+ app.notifier.add({
455
+ type: NotificationType.SUCCESS,
456
+ message: app.vueI18n.t('components.flight.record.success'),
457
+ });
458
+ const title = instance.properties?.title || 'flight';
459
+ downloadBlob(blob, `${title}.webm`);
460
+ } catch (e) {
461
+ getLogger('flightActions').error('Error while creating flight movie', e);
462
+ } finally {
463
+ player?.destroy();
464
+ flightVis?.destroy();
465
+ playerListener?.();
466
+ removeLoadingOverlay?.();
467
+ }
468
+ }
469
+
470
+ const actions = [
471
+ reactive({
472
+ name: 'components.flight.record.standard',
473
+ callback: recordFlight,
474
+ }),
475
+ reactive({
476
+ name: 'components.flight.record.high',
477
+ callback: recordFlight.bind(null, {
478
+ fps: 60,
479
+ highDefinition: true,
480
+ }),
481
+ }),
482
+ ];
483
+
484
+ const destroy = instance.anchorsChanged.addEventListener(() => {
485
+ actions.forEach((action) => {
486
+ action.disabled = !instance.isValid();
487
+ });
488
+ });
489
+
490
+ return { actions, destroy };
491
+ }
492
+
403
493
  /**
404
494
  *
405
495
  * @param {import("@vcmap/core").FlightInstance} instance
@@ -170,7 +170,7 @@
170
170
  OpenlayersMap: '$vcs2d',
171
171
  CesiumMap: '$vcs3d',
172
172
  ObliqueMap: '$vcsObliqueView',
173
- PanoramaMap: 'mdi-image',
173
+ PanoramaMap: 'mdi-panorama-variant-outline',
174
174
  };
175
175
 
176
176
  const mapBtnWeight = {
@@ -2,14 +2,23 @@
2
2
  <div class="vcs-main-map">
3
3
  <VcsMap :map-id="mapId" />
4
4
  <MapNavigation v-if="showMapNavigation" />
5
+ <div
6
+ :id="overviewMapContainerId"
7
+ class="overviewmap-container"
8
+ :class="xs || mobileLandscape ? 'mobile' : ''"
9
+ :style="{ display: overviewMapState ? 'block' : 'none' }"
10
+ />
5
11
  </div>
6
12
  </template>
7
13
 
8
14
  <script>
9
15
  import { inject, onMounted, onUnmounted, ref, computed } from 'vue';
10
16
  import { v4 as uuid } from 'uuid';
11
- import MapNavigation from '../navigation/MapNavigation.vue';
17
+ import { useDisplay } from 'vuetify';
12
18
  import VcsMap from './VcsMap.vue';
19
+ import MapNavigation from '../navigation/MapNavigation.vue';
20
+ import { overviewMapContainerId } from '../navigation/overviewMap.js';
21
+ import { isMobileLandscape } from '../vuePlugins/vuetify.js';
13
22
 
14
23
  export function setupMapNavigation(app) {
15
24
  const mapSize = ref(app.maps.size);
@@ -48,6 +57,9 @@
48
57
  const id = uuid();
49
58
  const mapId = `mapCollection-${id}`;
50
59
 
60
+ const mobileLandscape = isMobileLandscape();
61
+ const { xs } = useDisplay();
62
+
51
63
  const { showMapNavigation, destroy: destroyMapNavigationListener } =
52
64
  setupMapNavigation(app);
53
65
 
@@ -63,9 +75,35 @@
63
75
  return {
64
76
  mapId,
65
77
  showMapNavigation,
78
+ overviewMapContainerId,
79
+ overviewMapState: app.overviewMap.currentState,
80
+ mobileLandscape,
81
+ xs,
66
82
  };
67
83
  },
68
84
  };
69
85
  </script>
70
86
 
71
- <style lang="scss" scoped></style>
87
+ <style lang="scss" scoped>
88
+ .overviewmap-container {
89
+ position: absolute;
90
+ right: 100px;
91
+ bottom: 25px;
92
+ width: 300px;
93
+ height: 240px;
94
+ background: rgb(var(--v-theme-surface));
95
+ border: 3px solid rgb(var(--v-theme-surface));
96
+ border-radius: 3px;
97
+ &.mobile {
98
+ width: 100%;
99
+ right: 0px;
100
+ bottom: 0px;
101
+ border-radius: 0px;
102
+ }
103
+ }
104
+
105
+ :deep(.overviewMapElement) {
106
+ width: 100%;
107
+ height: 100%;
108
+ }
109
+ </style>
@@ -5,5 +5,9 @@ export function setupMapNavigation(app: any): {
5
5
  declare const _default: import("vue").DefineComponent<{}, {
6
6
  mapId: string;
7
7
  showMapNavigation: import("vue").ComputedRef<boolean>;
8
+ overviewMapContainerId: string;
9
+ overviewMapState: any;
10
+ mobileLandscape: import("vue").ComputedRef<boolean>;
11
+ xs: import("vue").Ref<boolean>;
8
12
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
9
13
  export default _default;
@@ -36,15 +36,6 @@
36
36
  overflow: hidden; /* Fix for iFrame content */
37
37
  }
38
38
 
39
- :deep(.overviewMapElement) {
40
- position: absolute;
41
- top: 3px;
42
- bottom: 3px;
43
- left: 3px;
44
- right: 3px;
45
- overflow: hidden; /* Fix for iFrame content */
46
- }
47
-
48
39
  :deep(.cesium-widget),
49
40
  :deep(.cesium-widget canvas) {
50
41
  width: 100%;