@vcmap/ui 5.2.4 → 5.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/config/base.config.json +54 -0
  2. package/config/www.config.json +4 -0
  3. package/dist/assets/cesium.js +1 -1
  4. package/dist/assets/{core.83d353.js → core.380ce3.js} +3498 -3347
  5. package/dist/assets/core.js +1 -1
  6. package/dist/assets/index-b466fb2c.js +1 -0
  7. package/dist/assets/ol.js +1 -1
  8. package/dist/assets/{ui.300809.css → ui.cf282c.css} +1 -1
  9. package/dist/assets/{ui.300809.js → ui.cf282c.js} +7275 -6745
  10. package/dist/assets/ui.js +1 -1
  11. package/dist/assets/vue.js +2 -2
  12. package/dist/assets/{vuetify.b3de7a.js → vuetify.12f757.js} +1 -1
  13. package/dist/assets/vuetify.js +2 -2
  14. package/dist/index.html +1 -1
  15. package/index.d.ts +4 -0
  16. package/index.js +2 -0
  17. package/package.json +2 -2
  18. package/plugins/package.json +2 -1
  19. package/src/application/VcsApp.vue +162 -1
  20. package/src/application/VcsApp.vue.d.ts +15 -0
  21. package/src/application/VcsCustomScreen.vue +45 -0
  22. package/src/application/VcsCustomScreen.vue.d.ts +15 -0
  23. package/src/application/VcsSettings.vue +67 -0
  24. package/src/application/VcsSettings.vue.d.ts +2 -0
  25. package/src/application/VcsSplashScreen.vue +140 -0
  26. package/src/application/VcsSplashScreen.vue.d.ts +36 -0
  27. package/src/application/markdownHelper.js +19 -1
  28. package/src/components/icons/+all.js +4 -0
  29. package/src/components/icons/CrosshairIcon.vue +33 -0
  30. package/src/components/icons/CrosshairIcon.vue.d.ts +2 -0
  31. package/src/i18n/de.d.ts +43 -18
  32. package/src/i18n/de.js +25 -0
  33. package/src/i18n/en.d.ts +43 -18
  34. package/src/i18n/en.js +25 -0
  35. package/src/navigation/MapNavigation.vue +74 -4
  36. package/src/navigation/MapNavigation.vue.d.ts +36 -0
  37. package/src/navigation/ObliqueRotation.vue +8 -0
  38. package/src/navigation/ObliqueRotation.vue.d.ts +13 -1
  39. package/src/navigation/TiltSlider.vue +8 -1
  40. package/src/navigation/TiltSlider.vue.d.ts +13 -1
  41. package/src/navigation/VcsCompass.vue +7 -1
  42. package/src/navigation/VcsCompass.vue.d.ts +11 -0
  43. package/src/navigation/VcsZoomButton.vue +10 -0
  44. package/src/navigation/VcsZoomButton.vue.d.ts +15 -1
  45. package/src/navigation/locatorHelper.d.ts +9 -0
  46. package/src/navigation/locatorHelper.js +294 -0
  47. package/src/navigation/overviewMap.d.ts +21 -20
  48. package/src/navigation/overviewMap.js +51 -39
  49. package/src/uiConfig.d.ts +67 -0
  50. package/src/uiConfig.js +30 -0
  51. package/dist/assets/index-69733149.js +0 -1
  52. /package/dist/assets/{cesium.162cd3.js → cesium.86b93e.js} +0 -0
  53. /package/dist/assets/{ol.7cdede.js → ol.d0972a.js} +0 -0
  54. /package/dist/assets/{vue.27f25a.js → vue.89f1c0.js} +0 -0
  55. /package/dist/assets/{vuetify.b3de7a.css → vuetify.12f757.css} +0 -0
@@ -12,10 +12,11 @@ import {
12
12
  Viewpoint,
13
13
  deserializeLayer,
14
14
  maxZIndex,
15
+ CesiumMap,
15
16
  } from '@vcmap/core';
16
17
  import Point from 'ol/geom/Point.js';
17
18
  import Feature from 'ol/Feature.js';
18
- import { Math as CesiumMath, Color } from '@vcmap-cesium/engine';
19
+ import { Math as CesiumMath, Color, Cartographic } from '@vcmap-cesium/engine';
19
20
  import { unByKey } from 'ol/Observable.js';
20
21
  import VectorSource from 'ol/source/Vector.js';
21
22
  import { Icon } from 'ol/style.js';
@@ -80,6 +81,7 @@ function getCameraIcon(color) {
80
81
  color,
81
82
  )}%22%20stroke%3D%22%23ffffff%22%20stroke-miterlimit%3D%2210%22%20id%3D%22circle427%22%20style%3D%22stroke-width%3A0.396874%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E`,
82
83
  color,
84
+ anchor: [0.5, 0.87],
83
85
  };
84
86
  }
85
87
 
@@ -120,19 +122,19 @@ class OverviewMap {
120
122
  this._cachedViewpoint = null;
121
123
 
122
124
  /**
123
- * @type {import("@vcmap/core").VectorLayer}
125
+ * @type {import("@vcmap/core").VectorLayer | null}
124
126
  * @private
125
127
  */
126
128
  this._obliqueTileLayer = null;
127
129
 
128
130
  /**
129
- * @type {import("@vcmap/core").VectorLayer}
131
+ * @type {import("@vcmap/core").VectorLayer | null}
130
132
  * @private
131
133
  */
132
134
  this._obliqueImageLayer = null;
133
135
 
134
136
  /**
135
- * @type {import("@vcmap/core").VectorLayer}
137
+ * @type {import("@vcmap/core").VectorLayer | null}
136
138
  * @private
137
139
  */
138
140
  this._obliqueSelectedImageLayer = null;
@@ -162,13 +164,13 @@ class OverviewMap {
162
164
  this._obliqueResolutionFactor = 2;
163
165
 
164
166
  /**
165
- * @type {import("@vcmap/core").ObliqueViewDirection}
167
+ * @type {import("@vcmap/core").ObliqueViewDirection | null}
166
168
  * @private
167
169
  */
168
170
  this._obliqueViewDirection = null;
169
171
 
170
172
  /**
171
- * @type {import("@vcmap/core").VectorLayer}
173
+ * @type {import("@vcmap/core").VectorLayer | null}
172
174
  * @private
173
175
  */
174
176
  this._cameraIconLayer = null;
@@ -188,24 +190,29 @@ class OverviewMap {
188
190
  this.minimumHeight = 150;
189
191
 
190
192
  /**
191
- * Handles the events from the overview map. Available after first activation.
192
- * @type {EventHandler|null}
193
+ * Handles the events from the overview map.
194
+ * @type {EventHandler}
193
195
  * @private
194
196
  */
195
- this._eventHandler = null;
197
+ this._eventHandler = new EventHandler();
198
+ const overviewMapClickedInteraction = new OverviewMapClickedInteraction();
199
+ this._eventHandler.addPersistentInteraction(overviewMapClickedInteraction);
196
200
 
197
201
  /**
198
- * An event, available after first activation, which is triggered whenever the overview map is clicked.
199
- * Is passed a {@link InteractionEvent} as its only argument
200
- * @type {import("@vcmap/core").VcsEvent<import("@vcmap/core").InteractionEvent>|null}
202
+ *
203
+ * @type {import("@vcmap/core").VcsEvent<import("@vcmap/core").InteractionEvent>}
201
204
  * @private
202
205
  */
203
- this._mapClicked = null;
206
+ this._mapClicked = overviewMapClickedInteraction.mapClicked;
204
207
 
205
208
  /**
206
- * @type {Function}
209
+ * @type {function():void}
210
+ * @private
207
211
  */
208
- this._mapPointerListener = null;
212
+ this._mapPointerListener =
213
+ this._map.pointerInteractionEvent.addEventListener((e) => {
214
+ this._eventHandler.handleMapEvent(e);
215
+ });
209
216
 
210
217
  /**
211
218
  * @type {Array<function():void>}
@@ -213,7 +220,7 @@ class OverviewMap {
213
220
  */
214
221
  this._listeners = [];
215
222
  /**
216
- * @type {function():void}
223
+ * @type {null | function():void}
217
224
  * @private
218
225
  */
219
226
  this._mapActivatedListener = null;
@@ -270,7 +277,9 @@ class OverviewMap {
270
277
  }
271
278
 
272
279
  /**
273
- * @type {import("@vcmap/core").VcsEvent<import("@vcmap/core").InteractionEvent>|null}
280
+ * An event which is triggered whenever the overview map is clicked.
281
+ * Is passed a {@link InteractionEvent} as its only argument
282
+ * @type {import("@vcmap/core").VcsEvent<import("@vcmap/core").InteractionEvent>}
274
283
  */
275
284
  get mapClicked() {
276
285
  return this._mapClicked;
@@ -291,29 +300,12 @@ class OverviewMap {
291
300
  ?.setStyle(this.cameraIconStyle.style);
292
301
  }
293
302
 
294
- /**
295
- * @private
296
- */
297
- _setupMapInteraction() {
298
- this._eventHandler = new EventHandler();
299
- const overviewMapClickedInteraction = new OverviewMapClickedInteraction();
300
- this._mapClicked = overviewMapClickedInteraction.mapClicked;
301
- this._eventHandler.addPersistentInteraction(overviewMapClickedInteraction);
302
- this._mapPointerListener =
303
- this._map.pointerInteractionEvent.addEventListener((e) => {
304
- this._eventHandler.handleMapEvent(e);
305
- });
306
- }
307
-
308
303
  /**
309
304
  * activates the overview map and initializes handlers for current active map
310
305
  * @private
311
306
  * @returns {Promise<void>}
312
307
  */
313
308
  async _activate() {
314
- if (!this._mapClicked) {
315
- this._setupMapInteraction();
316
- }
317
309
  await this._map.activate();
318
310
  this._map.setTarget('overview-map-container');
319
311
  this._map.target?.firstChild?.classList?.add('overviewMapElement');
@@ -532,14 +524,35 @@ class OverviewMap {
532
524
  _addNavigationListener(activeMap) {
533
525
  return this._mapClicked.addEventListener((e) => {
534
526
  const vp = activeMap.getViewpointSync();
535
- const height = vp.groundPosition[2] ? vp.groundPosition[2] : 0.0;
536
- vp.groundPosition = Projection.mercatorToWgs84(e.positionOrPixel);
537
- vp.groundPosition[2] = height;
538
- vp.cameraPosition = null;
527
+ const newPosition = Projection.mercatorToWgs84(e.positionOrPixel);
528
+ if (activeMap instanceof CesiumMap) {
529
+ const globe = activeMap.getScene()?.globe;
530
+ const newGroundLevel =
531
+ globe?.getHeight(
532
+ Cartographic.fromDegrees(newPosition[0], newPosition[1]),
533
+ ) || 0;
534
+ const oldGroundLevel =
535
+ globe?.getHeight(
536
+ Cartographic.fromDegrees(
537
+ vp.cameraPosition[0],
538
+ vp.cameraPosition[1],
539
+ ),
540
+ ) || 0;
541
+
542
+ newPosition[2] =
543
+ newGroundLevel + Math.abs(vp.cameraPosition[2] - oldGroundLevel);
544
+ vp.cameraPosition = newPosition;
545
+ } else {
546
+ vp.groundPosition = newPosition;
547
+ vp.cameraPosition = null;
548
+ }
539
549
  activeMap.gotoViewpoint(vp);
540
550
  });
541
551
  }
542
552
 
553
+ /**
554
+ * @private
555
+ */
543
556
  _setupCameraIconLayer() {
544
557
  if (!this._cameraIconLayer) {
545
558
  this._cameraIconLayer = new VectorLayer({
@@ -648,7 +661,6 @@ class OverviewMap {
648
661
  this.cameraIconStyle.destroy();
649
662
  this.obliqueSelectedStyle.destroy();
650
663
  this._cachedViewpoint = null;
651
- this._mapClicked = null;
652
664
  }
653
665
  }
654
666
 
package/src/uiConfig.d.ts CHANGED
@@ -8,6 +8,29 @@ export type TextPageType = {
8
8
  url?: string | URL | undefined;
9
9
  content?: string | undefined;
10
10
  };
11
+ export type SplashScreen = {
12
+ title?: string | undefined;
13
+ icon?: string | undefined;
14
+ content?: string | undefined;
15
+ name?: string | undefined;
16
+ checkBoxText?: string | undefined;
17
+ buttonTitle?: string | undefined;
18
+ menuEntry?: boolean | undefined;
19
+ acceptInput?: boolean | undefined;
20
+ position?: {
21
+ width?: string | undefined;
22
+ height?: string | undefined;
23
+ maxHeight?: string | undefined;
24
+ maxWidth?: string | undefined;
25
+ } | undefined;
26
+ };
27
+ export type CustomScreen = {
28
+ title?: string | undefined;
29
+ icon?: string | undefined;
30
+ content?: string | undefined;
31
+ name?: string | undefined;
32
+ windowPosition?: import("./manager/window/windowManager.js").WindowPositionOptions | undefined;
33
+ };
11
34
  export type UiConfigObject = {
12
35
  /**
13
36
  * - the company logo to display. this will override any and all css overrides.
@@ -45,6 +68,14 @@ export type UiConfigObject = {
45
68
  * - an option dataProtection, will show a link in the footer. Default title is 'footer.dataProtection.title'.
46
69
  */
47
70
  dataProtection?: TextPageType | undefined;
71
+ /**
72
+ * - an option splashScreen, will show a splash Screen on Map Load.
73
+ */
74
+ splashScreen?: SplashScreen | undefined;
75
+ /**
76
+ * - an option customScreen, will show a Custom Menu Point that opens a window with custom content.
77
+ */
78
+ customScreen?: CustomScreen | undefined;
48
79
  /**
49
80
  * - the favicon to set
50
81
  */
@@ -53,6 +84,14 @@ export type UiConfigObject = {
53
84
  * - the title to display in the tab of the browser
54
85
  */
55
86
  headerTitle?: string | undefined;
87
+ /**
88
+ * - an optional flag whether to show the Locator in the map.
89
+ */
90
+ showLocator?: boolean | undefined;
91
+ /**
92
+ * - the display quality settings
93
+ */
94
+ displayQuality?: import("@vcmap/core").DisplayQualityOptions | undefined;
56
95
  };
57
96
  /**
58
97
  * @typedef {{
@@ -67,6 +106,30 @@ export type UiConfigObject = {
67
106
  * @property {URL|string} [url]
68
107
  * @property {string} [content]
69
108
  */
109
+ /**
110
+ * @typedef {Object} SplashScreen
111
+ * @property {string|undefined} [title]
112
+ * @property {string} [icon]
113
+ * @property {string} [content]
114
+ * @property {string} [name]
115
+ * @property {string} [checkBoxText]
116
+ * @property {string} [buttonTitle]
117
+ * @property {boolean} [menuEntry]
118
+ * @property {boolean} [acceptInput]
119
+ * @property {Object} [position]
120
+ * @property {string} [position.width]
121
+ * @property {string} [position.height]
122
+ * @property {string} [position.maxHeight]
123
+ * @property {string} [position.maxWidth]
124
+ */
125
+ /**
126
+ * @typedef {Object} CustomScreen
127
+ * @property {string|undefined} [title]
128
+ * @property {string} [icon]
129
+ * @property {string} [content]
130
+ * @property {string} [name]
131
+ * @property {import("./manager/window/windowManager.js").WindowPositionOptions} [windowPosition]
132
+ */
70
133
  /**
71
134
  * @typedef {Object} UiConfigObject
72
135
  * @property {string} [logo] - the company logo to display. this will override any and all css overrides.
@@ -78,8 +141,12 @@ export type UiConfigObject = {
78
141
  * @property {string} [helpBaseUrl='https://help.vc.systems/'] - an optional URL to a help landing page
79
142
  * @property {TextPageType} [imprint] - an option imprint, will show a link in the footer. Default title is 'footer.imprint.title'.
80
143
  * @property {TextPageType} [dataProtection] - an option dataProtection, will show a link in the footer. Default title is 'footer.dataProtection.title'.
144
+ * @property {SplashScreen} [splashScreen] - an option splashScreen, will show a splash Screen on Map Load.
145
+ * @property {CustomScreen} [customScreen] - an option customScreen, will show a Custom Menu Point that opens a window with custom content.
81
146
  * @property {string} [favicon] - the favicon to set
82
147
  * @property {string} [headerTitle] - the title to display in the tab of the browser
148
+ * @property {boolean} [showLocator] - an optional flag whether to show the Locator in the map.
149
+ * @property {import("@vcmap/core").DisplayQualityOptions} [displayQuality] - the display quality settings
83
150
  */
84
151
  /**
85
152
  * @extends {Collection<UiConfigurationItem<unknown>>}
package/src/uiConfig.js CHANGED
@@ -16,6 +16,32 @@ import { ref } from 'vue';
16
16
  * @property {string} [content]
17
17
  */
18
18
 
19
+ /**
20
+ * @typedef {Object} SplashScreen
21
+ * @property {string|undefined} [title]
22
+ * @property {string} [icon]
23
+ * @property {string} [content]
24
+ * @property {string} [name]
25
+ * @property {string} [checkBoxText]
26
+ * @property {string} [buttonTitle]
27
+ * @property {boolean} [menuEntry]
28
+ * @property {boolean} [acceptInput]
29
+ * @property {Object} [position]
30
+ * @property {string} [position.width]
31
+ * @property {string} [position.height]
32
+ * @property {string} [position.maxHeight]
33
+ * @property {string} [position.maxWidth]
34
+ */
35
+
36
+ /**
37
+ * @typedef {Object} CustomScreen
38
+ * @property {string|undefined} [title]
39
+ * @property {string} [icon]
40
+ * @property {string} [content]
41
+ * @property {string} [name]
42
+ * @property {import("./manager/window/windowManager.js").WindowPositionOptions} [windowPosition]
43
+ */
44
+
19
45
  /**
20
46
  * @typedef {Object} UiConfigObject
21
47
  * @property {string} [logo] - the company logo to display. this will override any and all css overrides.
@@ -27,8 +53,12 @@ import { ref } from 'vue';
27
53
  * @property {string} [helpBaseUrl='https://help.vc.systems/'] - an optional URL to a help landing page
28
54
  * @property {TextPageType} [imprint] - an option imprint, will show a link in the footer. Default title is 'footer.imprint.title'.
29
55
  * @property {TextPageType} [dataProtection] - an option dataProtection, will show a link in the footer. Default title is 'footer.dataProtection.title'.
56
+ * @property {SplashScreen} [splashScreen] - an option splashScreen, will show a splash Screen on Map Load.
57
+ * @property {CustomScreen} [customScreen] - an option customScreen, will show a Custom Menu Point that opens a window with custom content.
30
58
  * @property {string} [favicon] - the favicon to set
31
59
  * @property {string} [headerTitle] - the title to display in the tab of the browser
60
+ * @property {boolean} [showLocator] - an optional flag whether to show the Locator in the map.
61
+ * @property {import("@vcmap/core").DisplayQualityOptions} [displayQuality] - the display quality settings
32
62
  */
33
63
 
34
64
  /**
@@ -1 +0,0 @@
1
- import{initAppFromAppConfig as p}from"./ui.300809.js";p("#app","app.config.json");
File without changes
File without changes