@vcmap/ui 6.2.0-rc.1 → 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/build.js +52 -7
- package/build/postInstall.js +32 -0
- package/config/dev.config.json +40 -0
- package/config/pano.config.json +420 -0
- package/config/projects.config.json +5 -0
- package/dist/assets/cesium/Workers/{chunk-P6TRGU3S.js → chunk-2PFJ45KC.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-7ZZ5LMZY.js → chunk-35ALNMG5.js} +15 -15
- package/dist/assets/cesium/Workers/{chunk-7YIOHQWH.js → chunk-35EJBV7X.js} +13 -13
- package/dist/assets/cesium/Workers/{chunk-EJVGYGLF.js → chunk-3E3OH65K.js} +7 -7
- package/dist/assets/cesium/Workers/{chunk-JBSKHTNX.js → chunk-4FHUY275.js} +4 -4
- package/dist/assets/cesium/Workers/{chunk-Z2QP3CXW.js → chunk-565T3GIE.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-IZGUQO6Q.js → chunk-5LGDCKCZ.js} +13 -13
- package/dist/assets/cesium/Workers/{chunk-3IFRSGEY.js → chunk-6JXJYBWN.js} +9 -9
- package/dist/assets/cesium/Workers/{chunk-WGDFYAGC.js → chunk-6RAEC3AW.js} +4 -4
- package/dist/assets/cesium/Workers/{chunk-44QAAS4P.js → chunk-6Z67VIOY.js} +7 -7
- package/dist/assets/cesium/Workers/{chunk-NGZJIN5Z.js → chunk-ADDGROZ6.js} +4 -4
- package/dist/assets/cesium/Workers/{chunk-GBT7MJ6X.js → chunk-ASYGMBRG.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-C4WPMOKT.js → chunk-BABDQOWA.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-IBRIWOCM.js → chunk-BQHHGIFB.js} +13 -13
- package/dist/assets/cesium/Workers/{chunk-LLAF3CPH.js → chunk-C33B4KHN.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-JXVLNVXC.js → chunk-CMCR2ZK4.js} +7 -7
- package/dist/assets/cesium/Workers/{chunk-3HQMMUPU.js → chunk-EGGJIATZ.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-RJM36CNY.js → chunk-EWS5LXAB.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-OPP2SKMA.js → chunk-FDXPBTSX.js} +12 -12
- package/dist/assets/cesium/Workers/{chunk-QN6TBED4.js → chunk-FIFQP4YX.js} +11 -11
- package/dist/assets/cesium/Workers/{chunk-JISPSEF3.js → chunk-HOGDZ2EB.js} +4 -4
- package/dist/assets/cesium/Workers/{chunk-2PTKXHJB.js → chunk-I4NB77NH.js} +10 -10
- package/dist/assets/cesium/Workers/{chunk-QQOZO7KO.js → chunk-JX4A2BCF.js} +7 -7
- package/dist/assets/cesium/Workers/{chunk-XIUSRWL6.js → chunk-K6PDUSH6.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-KHZNBFOH.js → chunk-KFHZFU5O.js} +7 -7
- package/dist/assets/cesium/Workers/{chunk-U5HSOKPQ.js → chunk-KYGXRFA6.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-56EDBCGT.js → chunk-LNWNAP2C.js} +10 -10
- package/dist/assets/cesium/Workers/{chunk-YCDZX5LS.js → chunk-LWN2B3KW.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-TI3TRKIC.js → chunk-LXLABO2L.js} +10 -10
- package/dist/assets/cesium/Workers/{chunk-C3EQ27WF.js → chunk-MB6B2UUL.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-57H6I3SV.js → chunk-MZSRINXK.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-ZVUUPJEM.js → chunk-NBI3GZSK.js} +17 -17
- package/dist/assets/cesium/Workers/{chunk-O72GZTSE.js → chunk-NUAXNUP5.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-M24KHENR.js → chunk-PNZR4RLL.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-HJMNR3GC.js → chunk-Q4K22DSJ.js} +11 -11
- package/dist/assets/cesium/Workers/{chunk-2LOWCAMW.js → chunk-Q4OS4EFN.js} +13 -13
- package/dist/assets/cesium/Workers/{chunk-TK5IIG2F.js → chunk-QLIMO7TQ.js} +4 -4
- package/dist/assets/cesium/Workers/{chunk-EDLRS3AW.js → chunk-RQ4F6YFU.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-JSQJDZI4.js → chunk-SB67D3JL.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-RTJKHZWU.js → chunk-SS6WRJ5J.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-L5GODJAR.js → chunk-TC4NTWIJ.js} +14 -14
- package/dist/assets/cesium/Workers/{chunk-IZJ42N4W.js → chunk-TKNA6WSZ.js} +17 -17
- package/dist/assets/cesium/Workers/{chunk-HP5XLODI.js → chunk-VQYEP77L.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-YSIJTJ7N.js → chunk-WKS5H3VW.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-XWOUPGUF.js → chunk-WPGX7DEA.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-6SQMLVGV.js → chunk-X3EPFVG3.js} +7 -7
- package/dist/assets/cesium/Workers/{chunk-NDDI2LWR.js → chunk-XH7MSR3A.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-FFLMY4TE.js → chunk-YDEBBUNQ.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-YK3QIKY7.js → chunk-YSVI7YNN.js} +9 -9
- package/dist/assets/cesium/Workers/{chunk-BVKITG4N.js → chunk-YVAS5WPH.js} +7 -7
- package/dist/assets/cesium/Workers/{chunk-X7IQYYHF.js → chunk-Z4QVAZM6.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-LJ2JQHJT.js → chunk-ZXOK77EW.js} +7 -7
- package/dist/assets/cesium/Workers/combineGeometry.js +22 -22
- package/dist/assets/cesium/Workers/createBoxGeometry.js +16 -16
- package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +14 -14
- package/dist/assets/cesium/Workers/createCircleGeometry.js +24 -24
- package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +17 -17
- package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +31 -31
- package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
- package/dist/assets/cesium/Workers/createCorridorGeometry.js +27 -27
- package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +26 -26
- package/dist/assets/cesium/Workers/createCylinderGeometry.js +18 -18
- package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +16 -16
- package/dist/assets/cesium/Workers/createEllipseGeometry.js +24 -24
- package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +17 -17
- package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +17 -17
- package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +16 -16
- package/dist/assets/cesium/Workers/createFrustumGeometry.js +16 -16
- package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +16 -16
- package/dist/assets/cesium/Workers/createGeometry.js +22 -22
- package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +20 -20
- package/dist/assets/cesium/Workers/createPlaneGeometry.js +14 -14
- package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +13 -13
- package/dist/assets/cesium/Workers/createPolygonGeometry.js +30 -30
- package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +28 -28
- package/dist/assets/cesium/Workers/createPolylineGeometry.js +23 -23
- package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +29 -29
- package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +25 -25
- package/dist/assets/cesium/Workers/createRectangleGeometry.js +25 -25
- package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +18 -18
- package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +21 -21
- package/dist/assets/cesium/Workers/createSphereGeometry.js +17 -17
- package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +16 -16
- package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +3 -3
- package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +13 -13
- package/dist/assets/cesium/Workers/createVectorTileGeometries.js +22 -22
- package/dist/assets/cesium/Workers/createVectorTilePoints.js +12 -12
- package/dist/assets/cesium/Workers/createVectorTilePolygons.js +20 -20
- package/dist/assets/cesium/Workers/createVectorTilePolylines.js +13 -13
- package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
- package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +20 -20
- package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
- package/dist/assets/cesium/Workers/createWallGeometry.js +22 -22
- package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +21 -21
- package/dist/assets/cesium/Workers/decodeDraco.js +11 -11
- package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/dist/assets/cesium/Workers/decodeI3S.js +10 -10
- package/dist/assets/cesium/Workers/transcodeKTX2.js +7 -7
- package/dist/assets/cesium/Workers/transferTypedArrayTest.js +1 -1
- package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +20 -20
- package/dist/assets/{cesium-ac6c193a.js → cesium-7d4ab914.js} +44609 -44606
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/core-deeb2b8d.js +34569 -0
- package/dist/assets/core-workers/panoramaImageWorker.js +1 -0
- package/dist/assets/core-workers/panoramaImageWorker.js-f8148bc6.js +34 -0
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol-94c57f2e.js → ol-8db5c824.js} +1 -1
- package/dist/assets/ol.js +1 -1
- package/dist/assets/start.js +3 -1
- package/dist/assets/ui-62439099.css +1 -0
- package/dist/assets/{ui-4f308e45.js → ui-62439099.js} +9581 -8853
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-99195777.js → vuetify-439ba6d5.js} +1 -1
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +14 -4
- package/index.js +8 -6
- package/package.json +5 -4
- package/plugins/@vcmap-show-case/panorama-inspector/package.json +10 -0
- package/plugins/@vcmap-show-case/panorama-inspector/src/PanoramaDebugInfo.vue +86 -0
- package/plugins/@vcmap-show-case/panorama-inspector/src/PanoramaDebugTools.vue +259 -0
- package/plugins/@vcmap-show-case/panorama-inspector/src/PanoramaInspector.vue +31 -0
- package/plugins/@vcmap-show-case/panorama-inspector/src/api.js +161 -0
- package/plugins/@vcmap-show-case/panorama-inspector/src/index.js +57 -0
- package/plugins/@vcmap-show-case/panorama-inspector/src/showClickInteraction.js +20 -0
- package/plugins/package.json +1 -1
- package/src/actions/actionHelper.d.ts +16 -11
- package/src/actions/actionHelper.js +190 -87
- package/src/actions/flightActions.d.ts +10 -0
- package/src/actions/flightActions.js +109 -13
- package/src/application/VcsApp.vue +11 -0
- package/src/application/VcsApp.vue.d.ts +4 -0
- package/src/application/VcsContainer.vue.d.ts +4 -0
- 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/application/VcsNavbar.vue +2 -1
- package/src/callback/activateMapCallback.d.ts +30 -0
- package/src/callback/activateMapCallback.js +63 -0
- package/src/callback/activateOverviewMapCallback.d.ts +7 -0
- package/src/callback/activateOverviewMapCallback.js +26 -0
- package/src/callback/deactivateOverviewMapCallback.d.ts +7 -0
- package/src/callback/deactivateOverviewMapCallback.js +20 -0
- 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/lists/VcsGroupedList.vue +10 -2
- package/src/components/lists/VcsTreeNode.vue +3 -0
- package/src/components/plugins/VcsLoadingOverlay.vue +138 -0
- package/src/components/plugins/VcsLoadingOverlay.vue.d.ts +2 -0
- package/src/components/plugins/VcsWorkspaceWrapper.vue +104 -0
- package/src/components/plugins/VcsWorkspaceWrapper.vue.d.ts +82 -0
- package/src/components/section/VcsExpansionPanel.vue +13 -3
- 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/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +1 -1
- package/src/contentTree/LayerSwap.vue +15 -6
- package/src/contentTree/contentTreeCollection.js +2 -2
- package/src/contentTree/contentTreeItem.d.ts +2 -2
- package/src/contentTree/wmsGroupContentTreeItem.js +10 -3
- package/src/featureInfo/featureInfo.js +6 -25
- package/src/featureInfo/iframeWmsFeatureInfoView.d.ts +10 -0
- package/src/featureInfo/iframeWmsFeatureInfoView.js +42 -0
- package/src/i18n/de.d.ts +25 -7
- package/src/i18n/de.js +14 -0
- package/src/i18n/en.d.ts +25 -7
- package/src/i18n/en.js +14 -0
- package/src/legend/VcsLegend.vue +5 -1
- package/src/navigation/MapNavigation.vue +82 -45
- package/src/navigation/MapNavigation.vue.d.ts +3 -34
- package/src/navigation/TiltSlider.vue +10 -2
- package/src/navigation/TiltSlider.vue.d.ts +20 -0
- package/src/navigation/VcsCompass.vue +3 -1
- package/src/navigation/overviewMap.d.ts +23 -8
- package/src/navigation/overviewMap.js +82 -60
- package/src/search/ResultsComponent.vue +8 -1
- package/src/search/SearchComponent.vue +3 -17
- package/src/search/SearchComponent.vue.d.ts +1 -2
- package/src/search/search.d.ts +13 -0
- package/src/search/search.js +21 -1
- package/src/uiConfig.d.ts +9 -0
- package/src/uiConfig.js +1 -0
- package/dist/assets/core-de8e51b5.js +0 -26236
- package/dist/assets/ui-4f308e45.css +0 -1
- /package/dist/assets/{vue-62303c82.js → vue-1b861f55.js} +0 -0
- /package/dist/assets/{vuetify-99195777.css → vuetify-439ba6d5.css} +0 -0
|
@@ -13,6 +13,8 @@ import {
|
|
|
13
13
|
deserializeLayer,
|
|
14
14
|
maxZIndex,
|
|
15
15
|
CesiumMap,
|
|
16
|
+
PanoramaMap,
|
|
17
|
+
PanoramaImageSelection,
|
|
16
18
|
} from '@vcmap/core';
|
|
17
19
|
import Point from 'ol/geom/Point.js';
|
|
18
20
|
import Feature from 'ol/Feature.js';
|
|
@@ -20,41 +22,16 @@ import { Math as CesiumMath, Color, Cartographic } from '@vcmap-cesium/engine';
|
|
|
20
22
|
import { unByKey } from 'ol/Observable.js';
|
|
21
23
|
import VectorSource from 'ol/source/Vector.js';
|
|
22
24
|
import { Icon } from 'ol/style.js';
|
|
23
|
-
import { watch } from 'vue';
|
|
24
|
-
import { WindowSlot } from '../manager/window/windowManager.js';
|
|
25
|
+
import { computed, nextTick, ref, watch } from 'vue';
|
|
25
26
|
import OverviewMapClickedInteraction from './overviewMapClickedInteraction.js';
|
|
26
27
|
import {
|
|
27
28
|
getDefaultPrimaryColor,
|
|
28
29
|
getColorByKey,
|
|
29
30
|
} from '../vuePlugins/vuetify.js';
|
|
30
|
-
import { vcsAppSymbol } from '../pluginHelper.js';
|
|
31
|
-
import VcsMap from '../application/VcsMap.vue';
|
|
32
31
|
|
|
33
|
-
export const
|
|
32
|
+
export const overviewMapContainerId = 'overview-map-container';
|
|
34
33
|
export const overviewMapLayerSymbol = Symbol('overviewMapLayerSymbol');
|
|
35
34
|
|
|
36
|
-
/**
|
|
37
|
-
* @returns {import("../manager/window/windowManager.js").WindowComponentOptions}
|
|
38
|
-
*/
|
|
39
|
-
export function getWindowComponentOptions() {
|
|
40
|
-
return {
|
|
41
|
-
component: VcsMap,
|
|
42
|
-
props: { mapId: 'overview-map-container' },
|
|
43
|
-
slot: WindowSlot.DETACHED,
|
|
44
|
-
id: overviewMapWindowId,
|
|
45
|
-
state: {
|
|
46
|
-
hideHeader: true,
|
|
47
|
-
classes: ['overview-map'],
|
|
48
|
-
},
|
|
49
|
-
position: {
|
|
50
|
-
right: '100px',
|
|
51
|
-
bottom: '25px',
|
|
52
|
-
width: '300px',
|
|
53
|
-
height: '240px',
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
35
|
/**
|
|
59
36
|
* @param {string} color
|
|
60
37
|
* @returns {import("ol/style/Icon").Options}
|
|
@@ -87,6 +64,12 @@ function getCameraIcon(color) {
|
|
|
87
64
|
};
|
|
88
65
|
}
|
|
89
66
|
|
|
67
|
+
/**
|
|
68
|
+
* panorama behavior
|
|
69
|
+
* 1. in panorama, only allow clicking on a footprint
|
|
70
|
+
* 2. in other maps, if you click directly on a panorama footprint, switch maps and go to image (same as clicking on the footprint in the main map)
|
|
71
|
+
*/
|
|
72
|
+
|
|
90
73
|
/**
|
|
91
74
|
* A 2D OverviewMap for cesium, openlayers and oblique map.
|
|
92
75
|
* Baselayers are added to the OverviewMap using `showInOverviewMap` flag within the properties bag of a layer configuration.
|
|
@@ -104,17 +87,17 @@ class OverviewMap {
|
|
|
104
87
|
this._app = app;
|
|
105
88
|
|
|
106
89
|
/**
|
|
107
|
-
* @type {boolean}
|
|
90
|
+
* @type {import("vue").Ref<boolean>}
|
|
108
91
|
* @private
|
|
109
92
|
*/
|
|
110
|
-
this._active = false;
|
|
93
|
+
this._active = ref(false);
|
|
111
94
|
|
|
112
95
|
/**
|
|
113
96
|
* @type {import("@vcmap/core").OpenlayersMap||null}
|
|
114
97
|
* @private
|
|
115
98
|
*/
|
|
116
99
|
this._map = new OpenlayersMap({
|
|
117
|
-
target:
|
|
100
|
+
target: overviewMapContainerId,
|
|
118
101
|
});
|
|
119
102
|
|
|
120
103
|
/**
|
|
@@ -198,14 +181,22 @@ class OverviewMap {
|
|
|
198
181
|
*/
|
|
199
182
|
this.minimumHeight = 150;
|
|
200
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
|
+
|
|
201
192
|
/**
|
|
202
193
|
* Handles the events from the overview map.
|
|
203
194
|
* @type {EventHandler}
|
|
204
195
|
* @private
|
|
205
196
|
*/
|
|
206
197
|
this._eventHandler = new EventHandler();
|
|
207
|
-
const overviewMapClickedInteraction = new OverviewMapClickedInteraction();
|
|
208
198
|
this._eventHandler.addPersistentInteraction(overviewMapClickedInteraction);
|
|
199
|
+
this._eventHandler.addPersistentInteraction(this._panoramaImageSelection);
|
|
209
200
|
|
|
210
201
|
/**
|
|
211
202
|
*
|
|
@@ -253,6 +244,8 @@ class OverviewMap {
|
|
|
253
244
|
this._map.layerCollection.remove(clone);
|
|
254
245
|
this._map.layerCollection.add(clone, idx);
|
|
255
246
|
}
|
|
247
|
+
} else if (layer.className === 'PanoramaDatasetLayer') {
|
|
248
|
+
this._map.layerCollection.add(layer);
|
|
256
249
|
}
|
|
257
250
|
}),
|
|
258
251
|
this._app.maps.layerCollection.removed.addEventListener((layer) => {
|
|
@@ -266,30 +259,50 @@ class OverviewMap {
|
|
|
266
259
|
),
|
|
267
260
|
];
|
|
268
261
|
|
|
269
|
-
this.
|
|
270
|
-
(
|
|
271
|
-
this._app.uiConfig.config.hideMapNavigation,
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
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);
|
|
286
299
|
}
|
|
287
300
|
|
|
288
301
|
/**
|
|
289
302
|
* @type {boolean}
|
|
290
303
|
*/
|
|
291
304
|
get active() {
|
|
292
|
-
return this._active;
|
|
305
|
+
return this._active.value;
|
|
293
306
|
}
|
|
294
307
|
|
|
295
308
|
/**
|
|
@@ -306,6 +319,13 @@ class OverviewMap {
|
|
|
306
319
|
return this._eventHandler;
|
|
307
320
|
}
|
|
308
321
|
|
|
322
|
+
/**
|
|
323
|
+
* @type {import("@vcmap/core").PanoramaImageSelection}
|
|
324
|
+
*/
|
|
325
|
+
get panoramaImageSelection() {
|
|
326
|
+
return this._panoramaImageSelection;
|
|
327
|
+
}
|
|
328
|
+
|
|
309
329
|
/**
|
|
310
330
|
* An event which is triggered whenever the overview map is clicked.
|
|
311
331
|
* Is passed a {@link InteractionEvent} as its only argument
|
|
@@ -337,9 +357,9 @@ class OverviewMap {
|
|
|
337
357
|
*/
|
|
338
358
|
async _activate() {
|
|
339
359
|
await this._map.activate();
|
|
340
|
-
this._map.setTarget(
|
|
360
|
+
this._map.setTarget(overviewMapContainerId);
|
|
341
361
|
this._map.target?.firstChild?.classList?.add('overviewMapElement');
|
|
342
|
-
if (!this._active) {
|
|
362
|
+
if (!this._active.value) {
|
|
343
363
|
this._mapActivatedListener = this._app.maps.mapActivated.addEventListener(
|
|
344
364
|
() => {
|
|
345
365
|
this._clearListeners();
|
|
@@ -348,7 +368,8 @@ class OverviewMap {
|
|
|
348
368
|
},
|
|
349
369
|
);
|
|
350
370
|
}
|
|
351
|
-
this._active = true;
|
|
371
|
+
this._active.value = true;
|
|
372
|
+
await nextTick();
|
|
352
373
|
const { activeMap } = this._app.maps;
|
|
353
374
|
if (activeMap instanceof ObliqueMap) {
|
|
354
375
|
await this._initializeForOblique(activeMap);
|
|
@@ -362,23 +383,20 @@ class OverviewMap {
|
|
|
362
383
|
* @returns {Promise<void>}
|
|
363
384
|
*/
|
|
364
385
|
async activate() {
|
|
365
|
-
if (!this._app.windowManager.has(overviewMapWindowId)) {
|
|
366
|
-
this._app.windowManager.add(getWindowComponentOptions(), vcsAppSymbol);
|
|
367
|
-
}
|
|
368
386
|
await this._activate();
|
|
369
387
|
}
|
|
370
388
|
|
|
371
389
|
/**
|
|
372
|
-
*
|
|
390
|
+
* clears all listeners
|
|
373
391
|
*/
|
|
374
392
|
deactivate() {
|
|
375
|
-
this.
|
|
393
|
+
this.map.deactivate();
|
|
376
394
|
this._clearListeners();
|
|
377
395
|
if (this._mapActivatedListener) {
|
|
378
396
|
this._mapActivatedListener();
|
|
379
397
|
this._mapActivatedListener = null;
|
|
380
398
|
}
|
|
381
|
-
this._active = false;
|
|
399
|
+
this._active.value = false;
|
|
382
400
|
}
|
|
383
401
|
|
|
384
402
|
/**
|
|
@@ -389,8 +407,8 @@ class OverviewMap {
|
|
|
389
407
|
async _initializePostRenderHandler(map) {
|
|
390
408
|
if (!this._cameraIconLayer) {
|
|
391
409
|
this._setupCameraIconLayer();
|
|
392
|
-
this._syncCameraViewAndFeature();
|
|
393
410
|
}
|
|
411
|
+
this._syncCameraViewAndFeature();
|
|
394
412
|
const navRemover = this._addNavigationListener(map);
|
|
395
413
|
const prRemover = map.postRender.addEventListener(
|
|
396
414
|
this._syncCameraViewAndFeature.bind(this),
|
|
@@ -553,6 +571,10 @@ class OverviewMap {
|
|
|
553
571
|
* @private
|
|
554
572
|
*/
|
|
555
573
|
_addNavigationListener(activeMap) {
|
|
574
|
+
if (activeMap instanceof PanoramaMap) {
|
|
575
|
+
return () => {};
|
|
576
|
+
}
|
|
577
|
+
|
|
556
578
|
return this._mapClicked.addEventListener((e) => {
|
|
557
579
|
const vp = activeMap.getViewpointSync();
|
|
558
580
|
const newPosition = Projection.mercatorToWgs84(e.positionOrPixel);
|
|
@@ -661,7 +683,7 @@ class OverviewMap {
|
|
|
661
683
|
this._clearListeners();
|
|
662
684
|
this._collectionListeners.forEach((cb) => cb());
|
|
663
685
|
this._collectionListeners = [];
|
|
664
|
-
this.
|
|
686
|
+
this._uiConfigWatchers.forEach((cb) => cb());
|
|
665
687
|
if (this._mapPointerListener) {
|
|
666
688
|
this._mapPointerListener();
|
|
667
689
|
this._mapPointerListener = null;
|
|
@@ -64,8 +64,15 @@
|
|
|
64
64
|
}));
|
|
65
65
|
});
|
|
66
66
|
const selectedRef = ref([]);
|
|
67
|
-
/** @type {import("
|
|
67
|
+
/** @type {import("../vcsUiApp.js").default} */
|
|
68
68
|
const app = inject('vcsApp');
|
|
69
|
+
|
|
70
|
+
const selectedIndex = items.value.findIndex(
|
|
71
|
+
(r) => r.feature === app.featureInfo.selectedFeature,
|
|
72
|
+
);
|
|
73
|
+
if (selectedIndex !== -1) {
|
|
74
|
+
selectedRef.value = [selectedIndex];
|
|
75
|
+
}
|
|
69
76
|
const selectedListener = app.featureInfo.featureChanged.addEventListener(
|
|
70
77
|
(feature) => {
|
|
71
78
|
if (selectedRef.value.length > 0) {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</template>
|
|
62
62
|
|
|
63
63
|
<script>
|
|
64
|
-
import { inject,
|
|
64
|
+
import { inject, ref, computed } from 'vue';
|
|
65
65
|
import { getLogger } from '@vcsuite/logger';
|
|
66
66
|
import { v4 as uuid } from 'uuid';
|
|
67
67
|
import { VSheet, VDivider, VIcon, VRow, VCol } from 'vuetify/components';
|
|
@@ -87,11 +87,11 @@
|
|
|
87
87
|
VCol,
|
|
88
88
|
},
|
|
89
89
|
setup() {
|
|
90
|
-
/** @type {import("
|
|
90
|
+
/** @type {import("../vcsUiApp.js").default} */
|
|
91
91
|
const app = inject('vcsApp');
|
|
92
92
|
const searching = ref(false);
|
|
93
93
|
const suggesting = ref('');
|
|
94
|
-
const query =
|
|
94
|
+
const { query } = app.search;
|
|
95
95
|
const suggestions = ref([]);
|
|
96
96
|
const selectedSuggestion = ref(-1);
|
|
97
97
|
const results = app.search.currentResults;
|
|
@@ -143,15 +143,6 @@
|
|
|
143
143
|
showSelectedOnly.value = false;
|
|
144
144
|
};
|
|
145
145
|
|
|
146
|
-
const clear = () => {
|
|
147
|
-
reset();
|
|
148
|
-
searching.value = false;
|
|
149
|
-
suggestions.value = [];
|
|
150
|
-
query.value = null;
|
|
151
|
-
queryPreSuggestion = '';
|
|
152
|
-
showSelectedOnly.value = false;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
146
|
const search = async () => {
|
|
156
147
|
reset();
|
|
157
148
|
searching.value = true;
|
|
@@ -167,10 +158,6 @@
|
|
|
167
158
|
app.search.zoomToAll();
|
|
168
159
|
};
|
|
169
160
|
|
|
170
|
-
onUnmounted(() => {
|
|
171
|
-
clear();
|
|
172
|
-
});
|
|
173
|
-
|
|
174
161
|
const fontSize = useFontSize();
|
|
175
162
|
const searchIconSize = computed(() => {
|
|
176
163
|
return fontSize.value + 11;
|
|
@@ -182,7 +169,6 @@
|
|
|
182
169
|
searching,
|
|
183
170
|
results,
|
|
184
171
|
reset,
|
|
185
|
-
clear,
|
|
186
172
|
search,
|
|
187
173
|
zoomToAll,
|
|
188
174
|
searchIconSize,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
2
|
showSelectedOnly: import("vue").Ref<boolean>;
|
|
3
3
|
xs: import("vue").Ref<boolean>;
|
|
4
|
-
query: import("vue").Ref<
|
|
4
|
+
query: import("vue").Ref<string>;
|
|
5
5
|
searching: import("vue").Ref<boolean>;
|
|
6
6
|
results: import("vue").Ref<import("./search.js", { with: { "resolution-mode": "import" } }).ResultItem[]>;
|
|
7
7
|
reset: () => void;
|
|
8
|
-
clear: () => void;
|
|
9
8
|
search: () => Promise<void>;
|
|
10
9
|
zoomToAll: () => void;
|
|
11
10
|
searchIconSize: import("vue").ComputedRef<number>;
|
package/src/search/search.d.ts
CHANGED
|
@@ -49,6 +49,11 @@ declare class Search extends IndexedCollection<SearchImpl> {
|
|
|
49
49
|
* @private
|
|
50
50
|
*/
|
|
51
51
|
private _app;
|
|
52
|
+
/**
|
|
53
|
+
* @type {import("vue").Ref<string>}
|
|
54
|
+
* @private
|
|
55
|
+
*/
|
|
56
|
+
private _query;
|
|
52
57
|
/**
|
|
53
58
|
* An event triggered every time the currentResults array changes,
|
|
54
59
|
* either by a new search providing the new results or
|
|
@@ -79,6 +84,10 @@ declare class Search extends IndexedCollection<SearchImpl> {
|
|
|
79
84
|
* @type {import("@vcmap/core").VcsEvent<Array<ResultItem>>}
|
|
80
85
|
*/
|
|
81
86
|
get resultsChanged(): VcsEvent<ResultItem[]>;
|
|
87
|
+
/**
|
|
88
|
+
* @type {import("vue").Ref<string>}
|
|
89
|
+
*/
|
|
90
|
+
get query(): import("vue").Ref<string>;
|
|
82
91
|
/**
|
|
83
92
|
* @type {import("vue").Ref<Array<ResultItem>>}
|
|
84
93
|
*/
|
|
@@ -126,6 +135,10 @@ add(item: SearchImpl, owner: string | symbol, index?: number | undefined): void;
|
|
|
126
135
|
* Clears the results and aborts running request
|
|
127
136
|
*/
|
|
128
137
|
clearResults(): void;
|
|
138
|
+
/**
|
|
139
|
+
* Clears the search query, the results and aborts running request
|
|
140
|
+
*/
|
|
141
|
+
clearSearch(): void;
|
|
129
142
|
}
|
|
130
143
|
import { IndexedCollection } from '@vcmap/core';
|
|
131
144
|
import { VcsEvent } from '@vcmap/core';
|
package/src/search/search.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
VectorStyleItem,
|
|
10
10
|
Viewpoint,
|
|
11
11
|
} from '@vcmap/core';
|
|
12
|
-
import { shallowRef } from 'vue';
|
|
12
|
+
import { ref, shallowRef } from 'vue';
|
|
13
13
|
import { check, oneOf } from '@vcsuite/check';
|
|
14
14
|
import { Icon } from 'ol/style.js';
|
|
15
15
|
import { getLogger } from '@vcsuite/logger';
|
|
@@ -113,6 +113,12 @@ class Search extends IndexedCollection {
|
|
|
113
113
|
*/
|
|
114
114
|
this._app = app;
|
|
115
115
|
|
|
116
|
+
/**
|
|
117
|
+
* @type {import("vue").Ref<string>}
|
|
118
|
+
* @private
|
|
119
|
+
*/
|
|
120
|
+
this._query = ref('');
|
|
121
|
+
|
|
116
122
|
/**
|
|
117
123
|
* An event triggered every time the currentResults array changes,
|
|
118
124
|
* either by a new search providing the new results or
|
|
@@ -150,6 +156,12 @@ class Search extends IndexedCollection {
|
|
|
150
156
|
return this._resultsChanged;
|
|
151
157
|
}
|
|
152
158
|
|
|
159
|
+
/**
|
|
160
|
+
* @type {import("vue").Ref<string>}
|
|
161
|
+
*/
|
|
162
|
+
get query() {
|
|
163
|
+
return this._query;
|
|
164
|
+
}
|
|
153
165
|
/**
|
|
154
166
|
* @type {import("vue").Ref<Array<ResultItem>>}
|
|
155
167
|
*/
|
|
@@ -309,6 +321,14 @@ class Search extends IndexedCollection {
|
|
|
309
321
|
}
|
|
310
322
|
}
|
|
311
323
|
|
|
324
|
+
/**
|
|
325
|
+
* Clears the search query, the results and aborts running request
|
|
326
|
+
*/
|
|
327
|
+
clearSearch() {
|
|
328
|
+
this.clearResults();
|
|
329
|
+
this._query.value = '';
|
|
330
|
+
}
|
|
331
|
+
|
|
312
332
|
/**
|
|
313
333
|
* @inheritDoc
|
|
314
334
|
*/
|
package/src/uiConfig.d.ts
CHANGED
|
@@ -199,6 +199,10 @@ export type UiConfigObject = {
|
|
|
199
199
|
* - open the legend window, if new layer has a config
|
|
200
200
|
*/
|
|
201
201
|
openLegendOnAdd?: boolean | undefined;
|
|
202
|
+
/**
|
|
203
|
+
* - automatically close the legend window, if no layer has a config
|
|
204
|
+
*/
|
|
205
|
+
autoCloseLegend?: boolean | undefined;
|
|
202
206
|
/**
|
|
203
207
|
* - can be used to apply a scale factor to the overviewMap
|
|
204
208
|
*/
|
|
@@ -287,6 +291,7 @@ export type UiConfigObject = {
|
|
|
287
291
|
* @property {import("@vcmap/core").DisplayQualityOptions} [displayQuality] - the display quality settings
|
|
288
292
|
* @property {import("./vuetifyPlugins/vuetify.js").VcsThemes} [vuetifyTheme] - Vuetify Theming, also see vuetify configuraton https://vuetifyjs.com/en/features/theme/
|
|
289
293
|
* @property {boolean} [openLegendOnAdd] - open the legend window, if new layer has a config
|
|
294
|
+
* @property {boolean} [autoCloseLegend] - automatically close the legend window, if no layer has a config
|
|
290
295
|
* @property {number} [overviewMapScaleFactor] - can be used to apply a scale factor to the overviewMap
|
|
291
296
|
*/
|
|
292
297
|
/**
|
|
@@ -627,6 +632,10 @@ declare class UiConfig extends Collection<UiConfigurationItem<unknown>> {
|
|
|
627
632
|
* - open the legend window, if new layer has a config
|
|
628
633
|
*/
|
|
629
634
|
readonly openLegendOnAdd?: boolean | undefined;
|
|
635
|
+
/**
|
|
636
|
+
* - automatically close the legend window, if no layer has a config
|
|
637
|
+
*/
|
|
638
|
+
readonly autoCloseLegend?: boolean | undefined;
|
|
630
639
|
/**
|
|
631
640
|
* - can be used to apply a scale factor to the overviewMap
|
|
632
641
|
*/
|
package/src/uiConfig.js
CHANGED
|
@@ -88,6 +88,7 @@ import { reactive, readonly, ref } from 'vue';
|
|
|
88
88
|
* @property {import("@vcmap/core").DisplayQualityOptions} [displayQuality] - the display quality settings
|
|
89
89
|
* @property {import("./vuetifyPlugins/vuetify.js").VcsThemes} [vuetifyTheme] - Vuetify Theming, also see vuetify configuraton https://vuetifyjs.com/en/features/theme/
|
|
90
90
|
* @property {boolean} [openLegendOnAdd] - open the legend window, if new layer has a config
|
|
91
|
+
* @property {boolean} [autoCloseLegend] - automatically close the legend window, if no layer has a config
|
|
91
92
|
* @property {number} [overviewMapScaleFactor] - can be used to apply a scale factor to the overviewMap
|
|
92
93
|
*/
|
|
93
94
|
|