@vcmap/ui 5.0.0-rc.6 → 5.0.0-rc.7

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 (121) hide show
  1. package/README.md +3 -0
  2. package/config/aerowest.config.json +2 -1
  3. package/config/base.config.json +7 -7
  4. package/dist/assets/cesium/Workers/{AttributeCompression-27507afe.js → AttributeCompression-80665726.js} +1 -1
  5. package/dist/assets/cesium/Workers/{AxisAlignedBoundingBox-7565c1e8.js → AxisAlignedBoundingBox-a655a4bc.js} +1 -1
  6. package/dist/assets/cesium/Workers/{BoundingRectangle-9d707275.js → BoundingRectangle-c3b79029.js} +1 -1
  7. package/dist/assets/cesium/Workers/{BoxGeometry-fb31d3b5.js → BoxGeometry-f8f9c981.js} +1 -1
  8. package/dist/assets/cesium/Workers/{Color-56bb5728.js → Color-de06a177.js} +1 -1
  9. package/dist/assets/cesium/Workers/{CoplanarPolygonGeometryLibrary-72143c19.js → CoplanarPolygonGeometryLibrary-48cdc26d.js} +1 -1
  10. package/dist/assets/cesium/Workers/{CorridorGeometryLibrary-7bae1712.js → CorridorGeometryLibrary-ddc027d3.js} +1 -1
  11. package/dist/assets/cesium/Workers/{CylinderGeometry-331891fe.js → CylinderGeometry-82a8cbe6.js} +1 -1
  12. package/dist/assets/cesium/Workers/{EllipseGeometry-5e3f67b6.js → EllipseGeometry-32d55454.js} +1 -1
  13. package/dist/assets/cesium/Workers/{EllipseGeometryLibrary-dbc15162.js → EllipseGeometryLibrary-b2ae188a.js} +1 -1
  14. package/dist/assets/cesium/Workers/{EllipseOutlineGeometry-21191fce.js → EllipseOutlineGeometry-f05a5a27.js} +1 -1
  15. package/dist/assets/cesium/Workers/{EllipsoidGeodesic-cc3bace8.js → EllipsoidGeodesic-19e75e11.js} +1 -1
  16. package/dist/assets/cesium/Workers/{EllipsoidGeometry-8bfa24a9.js → EllipsoidGeometry-7c99fc81.js} +1 -1
  17. package/dist/assets/cesium/Workers/{EllipsoidOutlineGeometry-48d9c023.js → EllipsoidOutlineGeometry-21c243df.js} +1 -1
  18. package/dist/assets/cesium/Workers/{EllipsoidRhumbLine-125a8b72.js → EllipsoidRhumbLine-6145377b.js} +1 -1
  19. package/dist/assets/cesium/Workers/EllipsoidTangentPlane-a01286f6.js +1 -0
  20. package/dist/assets/cesium/Workers/{EncodedCartesian3-96fdc0ef.js → EncodedCartesian3-d9f5c4a4.js} +1 -1
  21. package/dist/assets/cesium/Workers/{FrustumGeometry-9ab86004.js → FrustumGeometry-17776af8.js} +1 -1
  22. package/dist/assets/cesium/Workers/GeometryAttribute-89a520b9.js +1 -0
  23. package/dist/assets/cesium/Workers/{GeometryInstance-13e4ff38.js → GeometryInstance-4fbf16ba.js} +1 -1
  24. package/dist/assets/cesium/Workers/{GeometryPipeline-e0eb4567.js → GeometryPipeline-309fad76.js} +1 -1
  25. package/dist/assets/cesium/Workers/IntersectionTests-58aa8f80.js +1 -0
  26. package/dist/assets/cesium/Workers/{Matrix2-37e55508.js → Matrix2-47e98d76.js} +0 -0
  27. package/dist/assets/cesium/Workers/{OrientedBoundingBox-e9c07538.js → OrientedBoundingBox-fcb5b750.js} +1 -1
  28. package/dist/assets/cesium/Workers/{Plane-6ee42cab.js → Plane-3f01019d.js} +1 -1
  29. package/dist/assets/cesium/Workers/{PolygonGeometryLibrary-b408c688.js → PolygonGeometryLibrary-0b29eb16.js} +1 -1
  30. package/dist/assets/cesium/Workers/{PolygonPipeline-7b8e4643.js → PolygonPipeline-a934c4dd.js} +1 -1
  31. package/dist/assets/cesium/Workers/{PolylinePipeline-6757400c.js → PolylinePipeline-8095c9bc.js} +1 -1
  32. package/dist/assets/cesium/Workers/{PolylineVolumeGeometryLibrary-eb972210.js → PolylineVolumeGeometryLibrary-67d12fff.js} +1 -1
  33. package/dist/assets/cesium/Workers/{PrimitivePipeline-f244975e.js → PrimitivePipeline-980e44c5.js} +1 -1
  34. package/dist/assets/cesium/Workers/{RectangleGeometryLibrary-1bd6152a.js → RectangleGeometryLibrary-621c6de8.js} +1 -1
  35. package/dist/assets/cesium/Workers/{TerrainEncoding-5a21a97f.js → TerrainEncoding-f96552d5.js} +1 -1
  36. package/dist/assets/cesium/Workers/{Transforms-eb5c1a84.js → Transforms-c8cb8f43.js} +3 -3
  37. package/dist/assets/cesium/Workers/{WallGeometryLibrary-a6b6a368.js → WallGeometryLibrary-c03d8479.js} +1 -1
  38. package/dist/assets/cesium/Workers/{WebMercatorProjection-2839e524.js → WebMercatorProjection-79b3214e.js} +1 -1
  39. package/dist/assets/cesium/Workers/combineGeometry.js +1 -1
  40. package/dist/assets/cesium/Workers/createBoxGeometry.js +1 -1
  41. package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +1 -1
  42. package/dist/assets/cesium/Workers/createCircleGeometry.js +1 -1
  43. package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +1 -1
  44. package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +1 -1
  45. package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
  46. package/dist/assets/cesium/Workers/createCorridorGeometry.js +1 -1
  47. package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +1 -1
  48. package/dist/assets/cesium/Workers/createCylinderGeometry.js +1 -1
  49. package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +1 -1
  50. package/dist/assets/cesium/Workers/createEllipseGeometry.js +1 -1
  51. package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +1 -1
  52. package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +1 -1
  53. package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +1 -1
  54. package/dist/assets/cesium/Workers/createFrustumGeometry.js +1 -1
  55. package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +1 -1
  56. package/dist/assets/cesium/Workers/createGeometry.js +1 -1
  57. package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +1 -1
  58. package/dist/assets/cesium/Workers/createPlaneGeometry.js +1 -1
  59. package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +1 -1
  60. package/dist/assets/cesium/Workers/createPolygonGeometry.js +1 -1
  61. package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +1 -1
  62. package/dist/assets/cesium/Workers/createPolylineGeometry.js +1 -1
  63. package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +1 -1
  64. package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
  65. package/dist/assets/cesium/Workers/createRectangleGeometry.js +1 -1
  66. package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +1 -1
  67. package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +1 -1
  68. package/dist/assets/cesium/Workers/createSphereGeometry.js +1 -1
  69. package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +1 -1
  70. package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +1 -1
  71. package/dist/assets/cesium/Workers/createVectorTileGeometries.js +1 -1
  72. package/dist/assets/cesium/Workers/createVectorTilePoints.js +1 -1
  73. package/dist/assets/cesium/Workers/createVectorTilePolygons.js +1 -1
  74. package/dist/assets/cesium/Workers/createVectorTilePolylines.js +1 -1
  75. package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
  76. package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +1 -1
  77. package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
  78. package/dist/assets/cesium/Workers/createWallGeometry.js +1 -1
  79. package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +1 -1
  80. package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +1 -1
  81. package/dist/assets/{cesium.fba8ca.js → cesium.2a963a.js} +955 -968
  82. package/dist/assets/cesium.js +1 -1
  83. package/dist/assets/core.ba64c8.js +4 -0
  84. package/dist/assets/core.js +1 -1
  85. package/dist/assets/{index.6a83278e.js → index.83d29643.js} +1 -1
  86. package/dist/assets/{ol.abea3a.js → ol.5c9201.js} +0 -0
  87. package/dist/assets/ol.js +1 -1
  88. package/dist/assets/ui.c4abb7.css +1 -0
  89. package/dist/assets/ui.c4abb7.js +39 -0
  90. package/dist/assets/ui.js +1 -1
  91. package/dist/assets/uicomponents.5e36c1.css +1 -0
  92. package/dist/assets/uicomponents.5e36c1.js +32 -0
  93. package/dist/assets/uicomponents.js +1 -1
  94. package/dist/assets/{vue-composition-api.7051d7.js → vue-composition-api.ff8a0e.js} +1 -1
  95. package/dist/assets/vue-composition-api.js +2 -2
  96. package/dist/assets/{vue.9fd7f6.js → vue.f0d3bf.js} +0 -0
  97. package/dist/assets/vue.js +1 -1
  98. package/dist/assets/{vuetify.33dafc.css → vuetify.69b350.css} +1 -1
  99. package/dist/assets/{vuetify.33dafc.js → vuetify.69b350.js} +1 -1
  100. package/dist/assets/vuetify.js +2 -2
  101. package/dist/index.html +1 -1
  102. package/package.json +4 -4
  103. package/src/actions/actionHelper.js +39 -0
  104. package/src/application/Navbar.vue +32 -3
  105. package/src/application/VcsApp.vue +3 -1
  106. package/src/application/VcsMap.vue +1 -20
  107. package/src/manager/buttonManager.js +2 -1
  108. package/src/manager/window/WindowComponent.vue +27 -20
  109. package/src/manager/window/WindowComponentHeader.vue +13 -6
  110. package/src/navigation/mapNavigation.vue +26 -1
  111. package/src/navigation/overviewMap.js +616 -0
  112. package/src/navigation/overviewMapClickedInteraction.js +38 -0
  113. package/src/vcsUiApp.js +14 -0
  114. package/dist/assets/cesium/Workers/EllipsoidTangentPlane-678e34e4.js +0 -1
  115. package/dist/assets/cesium/Workers/GeometryAttribute-3915ea0b.js +0 -1
  116. package/dist/assets/cesium/Workers/IntersectionTests-ac2459de.js +0 -1
  117. package/dist/assets/core.d5ed0f.js +0 -4
  118. package/dist/assets/ui.ad1ec9.css +0 -1
  119. package/dist/assets/ui.ad1ec9.js +0 -39
  120. package/dist/assets/uicomponents.161461.css +0 -1
  121. package/dist/assets/uicomponents.161461.js +0 -31
@@ -0,0 +1,616 @@
1
+ import {
2
+ OpenlayersMap,
3
+ CesiumMap,
4
+ ObliqueMap,
5
+ VectorLayer,
6
+ VectorStyleItem,
7
+ Projection,
8
+ mercatorProjection,
9
+ EventHandler,
10
+ DataState,
11
+ emptyStyle,
12
+ Extent,
13
+ ViewPoint,
14
+ deserializeLayer,
15
+ } from '@vcmap/core';
16
+ import Point from 'ol/geom/Point';
17
+ import Feature from 'ol/Feature';
18
+ import { Math as CesiumMath, Color } from '@vcmap/cesium';
19
+ import { unByKey } from 'ol/Observable.js';
20
+ import VectorSource from 'ol/source/Vector.js';
21
+ import { WindowSlot } from '../manager/window/windowManager.js';
22
+ import OverviewMapClickedInteraction from './overviewMapClickedInteraction.js';
23
+ import { vuetify } from '../vuePlugins/vuetify.js';
24
+ import { vcsAppSymbol } from '../pluginHelper.js';
25
+ import VcsMap from '../application/VcsMap.vue';
26
+
27
+ /**
28
+ * @returns {WindowComponentOptions}
29
+ */
30
+ export function getWindowComponentOptions() {
31
+ return {
32
+ component: VcsMap,
33
+ props: { mapId: 'overview-map-container' },
34
+ slot: WindowSlot.DETACHED,
35
+ id: 'overview-map-container',
36
+ state: {
37
+ hideHeader: true,
38
+ },
39
+ position: {
40
+ right: '100px',
41
+ bottom: '25px',
42
+ width: '272px',
43
+ height: '223px',
44
+ },
45
+ };
46
+ }
47
+
48
+ /**
49
+ * A 2D OverviewMap for cesium, openlayers and oblique map.
50
+ * Baselayers are added to the OverviewMap using `showInOverviewMap` flag within the properties bag of a layer configuration.
51
+ * @class
52
+ */
53
+ class OverviewMap {
54
+ /**
55
+ * @param {VcsUiApp} app
56
+ */
57
+ constructor(app) {
58
+ /**
59
+ * @type {VcsUiApp}
60
+ * @private
61
+ */
62
+ this._app = app;
63
+
64
+ /**
65
+ * @type {boolean}
66
+ * @private
67
+ */
68
+ this._active = false;
69
+
70
+ /**
71
+ * @type {import("@vcmap/core").OpenlayersMap||null}
72
+ * @private
73
+ */
74
+ this._map = new OpenlayersMap({
75
+ target: 'overview-map-container',
76
+ });
77
+
78
+ /**
79
+ * @private
80
+ * @type {import("@vcmap/core").ViewPoint|null}
81
+ */
82
+ this._cachedViewPoint = null;
83
+
84
+ /**
85
+ * @type {import("@vcmap/core").VectorLayer}
86
+ * @private
87
+ */
88
+ this._obliqueTileLayer = null;
89
+
90
+ /**
91
+ * @type {import("@vcmap/core").VectorLayer}
92
+ * @private
93
+ */
94
+ this._obliqueImageLayer = null;
95
+
96
+ /**
97
+ * @type {import("@vcmap/core").VectorLayer}
98
+ * @private
99
+ */
100
+ this._obliqueSelectedImageLayer = null;
101
+
102
+ const { primary, accent } = vuetify.userPreset.theme.themes.light;
103
+ const fillColor = Color.fromCssColorString(accent);
104
+
105
+ /**
106
+ * @type {VectorStyleItem}
107
+ */
108
+ this.obliqueUnselectedStyle = new VectorStyleItem({
109
+ fill: {
110
+ color: fillColor.withAlpha(0.1).toCssColorString(),
111
+ },
112
+ stroke: {
113
+ color: primary,
114
+ width: 1,
115
+ },
116
+ });
117
+
118
+ /**
119
+ * @type {VectorStyleItem}
120
+ */
121
+ this.obliqueSelectedStyle = new VectorStyleItem({
122
+ fill: {
123
+ color: fillColor.withAlpha(0.8).toCssColorString(),
124
+ },
125
+ stroke: {
126
+ color: primary,
127
+ width: 3,
128
+ },
129
+ });
130
+
131
+ /**
132
+ * A factor by witch to multiply the resolution when zooming to a single oblique image.
133
+ * @type {number}
134
+ * @private
135
+ */
136
+ this._obliqueResolutionFactor = 2;
137
+
138
+ /**
139
+ * @type {import("@vcmap/core").ObliqueViewDirection}
140
+ * @private
141
+ */
142
+ this._obliqueViewDirection = null;
143
+
144
+ /**
145
+ * @type {import("@vcmap/core").VectorLayer}
146
+ * @private
147
+ */
148
+ this._cameraIconLayer = null;
149
+
150
+ /**
151
+ * The style of the camera icon in 2D and 3D
152
+ * @type {import("@vcmap/core").VectorStyleItem}
153
+ */
154
+ this.cameraIconStyle = new VectorStyleItem({
155
+ image: {
156
+ src: 'data:image/png;base64,iVB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4Uy2+9z2G+WhBWPHDgwK6urq5txWJx8/Dw8ATGrANmMReP5a3VV0KsJKhZauSFJ1lhAr1j7kJQYb+1trW19ZG2traNp06dkvv37y/39vbKwcFBMT09faWurq6qvb3d3rNnzxHkeX+CzOfE8qt3sTaBTEvSPza0E46RPqbMOdv6lpaWnYcPH97Q2NgoSqWS6OvrkwMDA3J+fl6SFlZNTU2J5uZmMTMz87SLvIMgz5m/7NGu1LOMfIUWKuxBjhFaScNK1dXVcm5uTpw9e5axYszs7Kyora2VII1fvz1ucIGveSmnI8fIbB9uaGiob2pqWlMoFMTIyMh/COzo6LBZOzs7Ow8NDQ1xo+DZtOvc/5twRD5KBJ2wbXtkdHS03NPT8w/4Ox1boMDyCbor21bLTctVRmItkuGqffv2Lezdu/d5STI+Pj7V3d1NSjnC25GvieUud0ZgiHC93LR7927enBL9/f2seYOEL1bbjf4twAD8sqEzJ5yLRwAAAABJRU5ErkJggg==',
157
+ anchor: [0.5, 1],
158
+ },
159
+ });
160
+
161
+ /**
162
+ * The minimum height to give to the overview map when synchronizing the view in 2D and 3D
163
+ * @type {number}
164
+ */
165
+ this.minimumHeight = 150;
166
+
167
+ /**
168
+ * Handles the events from the overview map. Available after first activation.
169
+ * @type {EventHandler|null}
170
+ * @private
171
+ */
172
+ this._eventHandler = null;
173
+
174
+ /**
175
+ * An event, available after first activation, which is triggered whenever the overview map is clicked.
176
+ * Is passed a {@link InteractionEvent} as its only argument
177
+ * @type {import("@vcmap/core").VcsEvent<import("@vcmap/core").InteractionEvent>|null}
178
+ * @private
179
+ */
180
+ this._mapClicked = null;
181
+
182
+ /**
183
+ * @type {Function}
184
+ */
185
+ this._mapPointerListener = null;
186
+
187
+ /**
188
+ * @type {Array<function():void>}
189
+ * @private
190
+ */
191
+ this._listeners = [];
192
+ /**
193
+ * @type {function():void}
194
+ * @private
195
+ */
196
+ this._mapActivatedListener = null;
197
+
198
+ /**
199
+ * @type {Array<function():void>}
200
+ * @private
201
+ */
202
+ this._layerCollectionListener = [
203
+ this._app.maps.layerCollection.added.addEventListener((layer) => {
204
+ if (layer.properties.showInOverviewMap) {
205
+ const clone = deserializeLayer(this._app, layer.toJSON());
206
+ clone.activate();
207
+ const idx = this._map.layerCollection.indexOf(clone);
208
+ if (idx < 0) {
209
+ this._map.layerCollection.add(clone);
210
+ } else {
211
+ this._map.layerCollection.remove(clone);
212
+ this._map.layerCollection.add(clone, idx);
213
+ }
214
+ }
215
+ }),
216
+ this._app.maps.layerCollection.removed.addEventListener((layer) => {
217
+ if (this._map.layerCollection.hasKey(layer.name)) {
218
+ const clone = this._map.layerCollection.getByKey(layer.name);
219
+ this._map.layerCollection.remove(clone);
220
+ }
221
+ }),
222
+ ];
223
+ }
224
+
225
+ /**
226
+ * @type {boolean}
227
+ * @readonly
228
+ */
229
+ get active() {
230
+ return this._active;
231
+ }
232
+
233
+ /**
234
+ * @type {import("@vcmap/core").OpenlayersMap|null}
235
+ * @readonly
236
+ */
237
+ get map() {
238
+ return this._map;
239
+ }
240
+
241
+ /**
242
+ * @type {EventHandler|null}
243
+ * @readonly
244
+ */
245
+ get eventHandler() {
246
+ return this._eventHandler;
247
+ }
248
+
249
+ /**
250
+ * @type {import("@vcmap/core").VcsEvent<import("@vcmap/core").InteractionEvent>|null}
251
+ * @readonly
252
+ */
253
+ get mapClicked() {
254
+ return this._mapClicked;
255
+ }
256
+
257
+ /**
258
+ * @private
259
+ */
260
+ _setupMapInteraction() {
261
+ this._eventHandler = new EventHandler();
262
+ const overviewMapClickedInteraction = new OverviewMapClickedInteraction();
263
+ this._mapClicked = overviewMapClickedInteraction.mapClicked;
264
+ this._eventHandler.addPersistentInteraction(overviewMapClickedInteraction);
265
+ this._mapPointerListener = this._map.pointerInteractionEvent.addEventListener((e) => {
266
+ this._eventHandler.handleMapEvent(e);
267
+ });
268
+ }
269
+
270
+ /**
271
+ * activates the overview map and initializes handlers for current active map
272
+ * @private
273
+ * @returns {Promise<void>}
274
+ */
275
+ async _activate() {
276
+ if (!this._mapClicked) {
277
+ this._setupMapInteraction();
278
+ }
279
+ await this._map.activate();
280
+ if (!this._active) {
281
+ this._mapActivatedListener = this._app.maps.mapActivated.addEventListener(() => {
282
+ this._clearListeners();
283
+ this._cachedViewPoint = null;
284
+ this._activate();
285
+ });
286
+ }
287
+ this._active = true;
288
+ const { activeMap } = this._app.maps;
289
+ if (activeMap instanceof CesiumMap) {
290
+ await this._initializeForCesium(activeMap);
291
+ } else if (activeMap instanceof OpenlayersMap) {
292
+ await this._initializeForOpenlayers(activeMap);
293
+ } else if (activeMap instanceof ObliqueMap) {
294
+ await this._initializeForOblique(activeMap);
295
+ }
296
+ }
297
+
298
+ /**
299
+ * opens window and sets target
300
+ * @returns {Promise<void>}
301
+ */
302
+ async activate() {
303
+ if (!this._app.windowManager.has('overview-map-container')) {
304
+ this._app.windowManager.add(getWindowComponentOptions(), vcsAppSymbol);
305
+ }
306
+ await this._activate();
307
+ this.map.setTarget('overview-map-container');
308
+ }
309
+
310
+ /**
311
+ * closes window and clears all listeners
312
+ */
313
+ deactivate() {
314
+ this._app.windowManager.remove('overview-map-container');
315
+ this._clearListeners();
316
+ if (this._mapActivatedListener) {
317
+ this._mapActivatedListener();
318
+ this._mapActivatedListener = null;
319
+ }
320
+ this._active = false;
321
+ }
322
+
323
+ /**
324
+ * @param {import("@vcmap/core").CesiumMap} cesiumMap
325
+ * @returns {Promise<void>}
326
+ * @private
327
+ */
328
+ async _initializeForCesium(cesiumMap) {
329
+ if (!this._cameraIconLayer) {
330
+ this._setupCameraIconLayer();
331
+ }
332
+ if (cesiumMap.initialized) {
333
+ const cesiumViewer = cesiumMap.getCesiumWidget();
334
+ const cesiumScene = cesiumViewer.scene;
335
+ const navRemover = this._addNavigationListener(cesiumMap);
336
+ const prRemover = cesiumScene.postRender.addEventListener(this._addCameraFeature, this);
337
+ const cleanupTasks = () => {
338
+ prRemover();
339
+ navRemover();
340
+ this._cameraIconLayer.deactivate();
341
+ };
342
+ this._listeners.push(cleanupTasks);
343
+ await this._cameraIconLayer.activate();
344
+ }
345
+ }
346
+
347
+ /**
348
+ * @param {import("@vcmap/core").OpenlayersMap} map
349
+ * @returns {Promise<void>}
350
+ * @private
351
+ */
352
+ async _initializeForOpenlayers(map) {
353
+ if (!this._cameraIconLayer) {
354
+ this._setupCameraIconLayer();
355
+ }
356
+ const { olMap } = map;
357
+ const navListener = this._addNavigationListener(map);
358
+ const prUnKey = olMap.on('postrender', this._addCameraFeature.bind(this));
359
+
360
+ const cleanupTasks = () => {
361
+ unByKey(prUnKey);
362
+ navListener();
363
+ this._cameraIconLayer.deactivate();
364
+ };
365
+ this._listeners.push(cleanupTasks);
366
+ await this._cameraIconLayer.activate();
367
+ }
368
+
369
+ /**
370
+ * @param {import("@vcmap/core").ObliqueMap} obliqueMap
371
+ * @returns {Promise<void>}
372
+ * @private
373
+ */
374
+ async _initializeForOblique(obliqueMap) {
375
+ if (!this._obliqueTileLayer) {
376
+ this._setupObliqueLayers();
377
+ }
378
+ const mapClickedListener = this._mapClicked.addEventListener(async (e) => {
379
+ if (e.feature) {
380
+ const id = e.feature.getId().toString();
381
+ if (this._obliqueTileLayer.getFeatureById(id)) {
382
+ const image = await obliqueMap.collection
383
+ .loadImageForCoordinate(e.positionOrPixel, this._obliqueViewDirection);
384
+ if (image) {
385
+ await obliqueMap.setImageByName(image.name);
386
+ }
387
+ } else {
388
+ await obliqueMap.setImageByName(id);
389
+ }
390
+ }
391
+ });
392
+
393
+ const listeners = [
394
+ mapClickedListener,
395
+ obliqueMap.imageChanged.addEventListener(this._obliqueImageChange.bind(this)),
396
+ obliqueMap.collectionChanged.addEventListener(this._obliqueCollectionChanged.bind(this)),
397
+ ];
398
+
399
+ const prUnKey = this._map.olMap.once('postrender', () => {
400
+ this._obliqueCollectionChanged(obliqueMap.collection);
401
+ this._obliqueImageChange(obliqueMap.currentImage);
402
+ });
403
+
404
+ const cleanupTasks = () => {
405
+ this._obliqueTileLayer.deactivate();
406
+ this._obliqueImageLayer.deactivate();
407
+ this._obliqueSelectedImageLayer.deactivate();
408
+ unByKey(prUnKey);
409
+ listeners.forEach((l) => { l(); });
410
+ };
411
+ this._listeners.push(cleanupTasks);
412
+ await this._obliqueTileLayer.activate();
413
+ await this._obliqueImageLayer.activate();
414
+ await this._obliqueSelectedImageLayer.activate();
415
+ }
416
+
417
+ /**
418
+ * @param {import("@vcmap/core").ObliqueCollection} collection
419
+ * @private
420
+ */
421
+ _obliqueCollectionChanged(collection) {
422
+ this._obliqueTileLayer.source = collection.tileFeatureSource;
423
+ this._obliqueTileLayer.forceRedraw();
424
+ this._obliqueImageLayer.source = collection.imageFeatureSource;
425
+ this._obliqueImageLayer.forceRedraw();
426
+ this._obliqueSelectedImageLayer.removeAllFeatures();
427
+ }
428
+
429
+ /**
430
+ * @param {import("@vcmap/core").ObliqueImage=} image
431
+ * @private
432
+ */
433
+ _obliqueImageChange(image) {
434
+ const { source } = this._obliqueImageLayer;
435
+ if (this._obliqueViewDirection !== image.viewDirection) {
436
+ this._obliqueViewDirection = image.viewDirection;
437
+ source.changed();
438
+ }
439
+ const activeFeature = source.getFeatureById(image.name);
440
+ if (activeFeature) {
441
+ this._obliqueSelectedImageLayer.removeAllFeatures();
442
+ this._obliqueSelectedImageLayer.addFeatures([activeFeature]);
443
+ const extent = new Extent({
444
+ coordinates: activeFeature.getGeometry().getExtent(),
445
+ projection: mercatorProjection.toJSON(),
446
+ });
447
+
448
+ const vp = ViewPoint.createViewPointFromExtent(extent);
449
+ vp.distance /= this._obliqueResolutionFactor;
450
+ this._map.gotoViewPoint(vp);
451
+ }
452
+ }
453
+
454
+ /**
455
+ * @private
456
+ */
457
+ _setupObliqueLayers() {
458
+ const obliqueTileStyle = new VectorStyleItem({});
459
+ obliqueTileStyle.style = (feature) => {
460
+ if (feature.get('state') === DataState.PENDING) {
461
+ return /** @type {ol/style/Style} */ (this.obliqueUnselectedStyle.style);
462
+ }
463
+ return emptyStyle;
464
+ };
465
+
466
+ this._obliqueTileLayer = new VectorLayer({
467
+ projection: mercatorProjection.toJSON(),
468
+ style: obliqueTileStyle,
469
+ zIndex: 1,
470
+ });
471
+
472
+ const obliqueImageStyle = new VectorStyleItem({});
473
+ obliqueImageStyle.style = (feature) => {
474
+ if (feature.get('viewDirection') === this._obliqueViewDirection) {
475
+ return this.obliqueUnselectedStyle.style;
476
+ }
477
+ return emptyStyle;
478
+ };
479
+
480
+ this._obliqueImageLayer = new VectorLayer({
481
+ projection: mercatorProjection.toJSON(),
482
+ style: obliqueImageStyle,
483
+ });
484
+ this._obliqueSelectedImageLayer = new VectorLayer({
485
+ projection: mercatorProjection.toJSON(),
486
+ style: this.obliqueSelectedStyle,
487
+ });
488
+ this._map.layerCollection.add(this._obliqueImageLayer);
489
+ this._map.layerCollection.add(this._obliqueSelectedImageLayer);
490
+ this._map.layerCollection.add(this._obliqueTileLayer);
491
+ }
492
+
493
+ /**
494
+ * @param {import("@vcmap/core").VcsMap} activeMap
495
+ * @returns {Function}
496
+ * @private
497
+ */
498
+ _addNavigationListener(activeMap) {
499
+ return this._mapClicked.addEventListener((e) => {
500
+ const vp = activeMap.getViewPointSync();
501
+ const height = vp.groundPosition[2] ? vp.groundPosition[2] : 0.0;
502
+ vp.groundPosition = Projection.mercatorToWgs84(e.positionOrPixel);
503
+ vp.groundPosition[2] = height;
504
+ vp.cameraPosition = null;
505
+ activeMap.gotoViewPoint(vp);
506
+ });
507
+ }
508
+
509
+ _setupCameraIconLayer() {
510
+ if (!this._cameraIconLayer) {
511
+ this._cameraIconLayer = new VectorLayer({
512
+ projection: mercatorProjection.toJSON(),
513
+ zIndex: 50,
514
+ });
515
+ this._map.layerCollection.add(this._cameraIconLayer);
516
+ }
517
+ }
518
+
519
+ /**
520
+ * Adds and maintains the view and camera feature
521
+ * @private
522
+ */
523
+ _addCameraFeature() {
524
+ const viewpoint = this._app.maps.activeMap.getViewPointSync();
525
+ if (!viewpoint || !viewpoint.isValid() || viewpoint.equals(this._cachedViewPoint)) {
526
+ return;
527
+ }
528
+ this._cachedViewPoint = viewpoint.clone();
529
+ const gp = viewpoint.groundPosition;
530
+ const position = viewpoint.cameraPosition || gp;
531
+ const { heading } = viewpoint;
532
+ let { distance } = viewpoint;
533
+ if (position[2] && !(distance && distance < position[2] * 4)) {
534
+ distance = position[2] * 4;
535
+ } else if (position[2] == null) {
536
+ position[2] = distance;
537
+ }
538
+
539
+ distance = distance > this.minimumHeight ? distance : this.minimumHeight;
540
+ if (heading == null || distance == null) {
541
+ return;
542
+ }
543
+ let cameraFeature = this._cameraIconLayer.getFeatureById('cameraFeature');
544
+ if (!cameraFeature) {
545
+ const cameraGeometry = new Point([position[0], position[1]]);
546
+ cameraFeature = new Feature({
547
+ geometry: cameraGeometry,
548
+ });
549
+ cameraFeature.setId('cameraFeature');
550
+ cameraFeature.setStyle(this.cameraIconStyle.style);
551
+ this._cameraIconLayer.addFeatures([cameraFeature]);
552
+ }
553
+ cameraFeature.getGeometry().setCoordinates(Projection.wgs84ToMercator(position));
554
+
555
+ const rotationDegrees = viewpoint.heading;
556
+ const rotationRadians = CesiumMath.toRadians(rotationDegrees);
557
+
558
+ this.cameraIconStyle.image.setRotation(rotationRadians);
559
+
560
+ viewpoint.heading = 0;
561
+ viewpoint.cameraPosition = position;
562
+ viewpoint.groundPosition = null;
563
+ viewpoint.distance = distance * 4;
564
+
565
+ this._map.gotoViewPoint(viewpoint);
566
+ }
567
+
568
+ /**
569
+ * @private
570
+ */
571
+ _clearListeners() {
572
+ this._listeners.forEach(cb => cb());
573
+ this._listeners.splice(0);
574
+ }
575
+
576
+ destroy() {
577
+ this._clearListeners();
578
+ this._layerCollectionListener.forEach(cb => cb());
579
+ if (this._mapPointerListener) {
580
+ this._mapPointerListener();
581
+ this._mapPointerListener = null;
582
+ }
583
+ if (this._mapActivatedListener) {
584
+ this._mapActivatedListener();
585
+ this._mapActivatedListener = null;
586
+ }
587
+ if (this._map) {
588
+ this._map.destroy();
589
+ }
590
+ if (this._obliqueTileLayer) {
591
+ this._obliqueTileLayer.source = new VectorSource({});
592
+ this._obliqueTileLayer.destroy();
593
+ }
594
+ if (this._obliqueImageLayer) {
595
+ this._obliqueImageLayer.source = new VectorSource({});
596
+ this._obliqueImageLayer.destroy();
597
+ }
598
+ if (this._obliqueSelectedImageLayer) {
599
+ this._obliqueSelectedImageLayer.source = new VectorSource({});
600
+ this._obliqueSelectedImageLayer.destroy();
601
+ }
602
+ if (this._cameraIconLayer) {
603
+ this._cameraIconLayer.destroy();
604
+ }
605
+ if (this._eventHandler) {
606
+ this._eventHandler.destroy();
607
+ }
608
+ this.cameraIconStyle.destroy();
609
+ this.obliqueUnselectedStyle.destroy();
610
+ this.obliqueSelectedStyle.destroy();
611
+ this._cachedViewPoint = null;
612
+ this._mapClicked = null;
613
+ }
614
+ }
615
+
616
+ export default OverviewMap;
@@ -0,0 +1,38 @@
1
+ import { VcsEvent, EventType, ModificationKeyType, AbstractInteraction } from '@vcmap/core';
2
+
3
+ /**
4
+ * @class
5
+ * @extends {import("@vcmap/core").AbstractInteraction}
6
+ */
7
+ class OverviewMapClickedInteraction extends AbstractInteraction {
8
+ constructor() {
9
+ super(EventType.CLICK, ModificationKeyType.ALL);
10
+
11
+ /**
12
+ * @type {import("@vcmap/core").VcsEvent<import("@vcmap/core").InteractionEvent>}
13
+ */
14
+ this.mapClicked = new VcsEvent();
15
+ this.setActive();
16
+ }
17
+
18
+ /**
19
+ * @inheritDoc
20
+ * @param {import("@vcmap/core").InteractionEvent} event
21
+ * @returns {Promise<import("@vcmap/core").InteractionEvent>}
22
+ */
23
+ async pipe(event) {
24
+ this.mapClicked.raiseEvent(event);
25
+ event.stopPropagation = true;
26
+ return event;
27
+ }
28
+
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ destroy() {
33
+ this.mapClicked.destroy();
34
+ super.destroy();
35
+ }
36
+ }
37
+
38
+ export default OverviewMapClickedInteraction;
package/src/vcsUiApp.js CHANGED
@@ -18,6 +18,7 @@ import { WindowManager } from './manager/window/windowManager.js';
18
18
  import ButtonManager from './manager/buttonManager.js';
19
19
  import { createContentTreeCollection } from './contentTree/contentTreeCollection.js';
20
20
  import { contentTreeClassRegistry } from './contentTree/contentTreeItem.js';
21
+ import OverviewMap from './navigation/overviewMap.js';
21
22
 
22
23
  /**
23
24
  * @typedef {import("@vcmap/core").VcsAppConfig} VcsUiAppConfig
@@ -125,6 +126,12 @@ class VcsUiApp extends VcsApp {
125
126
  * @private
126
127
  */
127
128
  this._navbarManager = new ButtonManager();
129
+
130
+ /**
131
+ * @type {OverviewMap}
132
+ * @private
133
+ */
134
+ this._overviewMap = new OverviewMap(this);
128
135
  }
129
136
 
130
137
  /**
@@ -163,6 +170,12 @@ class VcsUiApp extends VcsApp {
163
170
  */
164
171
  get navbarManager() { return this._navbarManager; }
165
172
 
173
+ /**
174
+ * @type {OverviewMap}
175
+ * @readonly
176
+ */
177
+ get overviewMap() { return this._overviewMap; }
178
+
166
179
  /**
167
180
  * @param {import("@vcmap/core").Context} context
168
181
  * @returns {Promise<void>}
@@ -211,6 +224,7 @@ class VcsUiApp extends VcsApp {
211
224
  destroy() {
212
225
  this.windowManager.destroy();
213
226
  this.navbarManager.destroy();
227
+ this._overviewMap.destroy();
214
228
  // TODO destroy other manager
215
229
  this._pluginAddedListener();
216
230
  destroyCollection(this._plugins);
@@ -1 +0,0 @@
1
- define(["exports","./AxisAlignedBoundingBox-7565c1e8","./Matrix2-37e55508","./RuntimeError-8952249c","./defaultValue-81eec7ed","./IntersectionTests-ac2459de","./Plane-6ee42cab","./Transforms-eb5c1a84"],(function(t,e,n,i,o,r,s,a){"use strict";const l=new n.Cartesian4;function c(t,e){t=(e=o.defaultValue(e,n.Ellipsoid.WGS84)).scaleToGeodeticSurface(t);const i=a.Transforms.eastNorthUpToFixedFrame(t,e);this._ellipsoid=e,this._origin=t,this._xAxis=n.Cartesian3.fromCartesian4(n.Matrix4.getColumn(i,0,l)),this._yAxis=n.Cartesian3.fromCartesian4(n.Matrix4.getColumn(i,1,l));const r=n.Cartesian3.fromCartesian4(n.Matrix4.getColumn(i,2,l));this._plane=s.Plane.fromPointNormal(t,r)}Object.defineProperties(c.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});const d=new e.AxisAlignedBoundingBox;c.fromPoints=function(t,n){return new c(e.AxisAlignedBoundingBox.fromPoints(t,d).center,n)};const p=new r.Ray,u=new n.Cartesian3;c.prototype.projectPointOntoPlane=function(t,e){const i=p;i.origin=t,n.Cartesian3.normalize(t,i.direction);let s=r.IntersectionTests.rayPlane(i,this._plane,u);if(o.defined(s)||(n.Cartesian3.negate(i.direction,i.direction),s=r.IntersectionTests.rayPlane(i,this._plane,u)),o.defined(s)){const t=n.Cartesian3.subtract(s,this._origin,s),i=n.Cartesian3.dot(this._xAxis,t),r=n.Cartesian3.dot(this._yAxis,t);return o.defined(e)?(e.x=i,e.y=r,e):new n.Cartesian2(i,r)}},c.prototype.projectPointsOntoPlane=function(t,e){o.defined(e)||(e=[]);let n=0;const i=t.length;for(let r=0;r<i;r++){const i=this.projectPointOntoPlane(t[r],e[n]);o.defined(i)&&(e[n]=i,n++)}return e.length=n,e},c.prototype.projectPointToNearestOnPlane=function(t,e){o.defined(e)||(e=new n.Cartesian2);const i=p;i.origin=t,n.Cartesian3.clone(this._plane.normal,i.direction);let s=r.IntersectionTests.rayPlane(i,this._plane,u);o.defined(s)||(n.Cartesian3.negate(i.direction,i.direction),s=r.IntersectionTests.rayPlane(i,this._plane,u));const a=n.Cartesian3.subtract(s,this._origin,s),l=n.Cartesian3.dot(this._xAxis,a),c=n.Cartesian3.dot(this._yAxis,a);return e.x=l,e.y=c,e},c.prototype.projectPointsToNearestOnPlane=function(t,e){o.defined(e)||(e=[]);const n=t.length;e.length=n;for(let i=0;i<n;i++)e[i]=this.projectPointToNearestOnPlane(t[i],e[i]);return e};const f=new n.Cartesian3;c.prototype.projectPointOntoEllipsoid=function(t,e){o.defined(e)||(e=new n.Cartesian3);const i=this._ellipsoid,r=this._origin,s=this._xAxis,a=this._yAxis,l=f;return n.Cartesian3.multiplyByScalar(s,t.x,l),e=n.Cartesian3.add(r,l,e),n.Cartesian3.multiplyByScalar(a,t.y,l),n.Cartesian3.add(e,l,e),i.scaleToGeocentricSurface(e,e),e},c.prototype.projectPointsOntoEllipsoid=function(t,e){const n=t.length;o.defined(e)?e.length=n:e=new Array(n);for(let i=0;i<n;++i)e[i]=this.projectPointOntoEllipsoid(t[i],e[i]);return e},t.EllipsoidTangentPlane=c}));