@vcmap/ui 6.2.0-rc.1 → 6.2.0-rc.2
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/config/dev.config.json +28 -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-8dd00805.js} +44609 -44606
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/core-6b5c0363.js +34173 -0
- package/dist/assets/core-workers/panoramaImageWorker.js +1 -0
- package/dist/assets/core-workers/panoramaImageWorker.js-0ce7d2f3.js +34 -0
- package/dist/assets/core.js +1 -1
- package/dist/assets/ol.js +1 -1
- package/dist/assets/start.js +3 -1
- package/dist/assets/ui-aadb7707.css +1 -0
- package/dist/assets/{ui-4f308e45.js → ui-aadb7707.js} +7917 -7606
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-99195777.js → vuetify-533fb61b.js} +1 -1
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +8 -0
- package/index.js +4 -0
- package/package.json +4 -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/src/actions/actionHelper.js +138 -26
- 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/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/lists/VcsGroupedList.vue +10 -2
- package/src/components/lists/VcsTreeNode.vue +3 -0
- package/src/components/plugins/AbstractWorkspaceItemCreator.vue +104 -0
- package/src/components/plugins/AbstractWorkspaceItemCreator.vue.d.ts +82 -0
- package/src/components/section/VcsExpansionPanel.vue +13 -3
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +1 -1
- package/src/contentTree/LayerSwap.vue +15 -6
- 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 +4 -0
- package/src/i18n/de.js +3 -0
- package/src/i18n/en.d.ts +4 -0
- package/src/i18n/en.js +3 -0
- package/src/legend/VcsLegend.vue +5 -1
- package/src/navigation/MapNavigation.vue +60 -18
- package/src/navigation/MapNavigation.vue.d.ts +1 -0
- 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 +5 -0
- package/src/navigation/overviewMap.js +17 -0
- 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/{ol-94c57f2e.js → ol-f58f403b.js} +0 -0
- /package/dist/assets/{vue-62303c82.js → vue-d7691a29.js} +0 -0
- /package/dist/assets/{vuetify-99195777.css → vuetify-533fb61b.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';
|
|
@@ -87,6 +89,12 @@ function getCameraIcon(color) {
|
|
|
87
89
|
};
|
|
88
90
|
}
|
|
89
91
|
|
|
92
|
+
/**
|
|
93
|
+
* panorama behavior
|
|
94
|
+
* 1. in panorama, only allow clicking on a footprint
|
|
95
|
+
* 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)
|
|
96
|
+
*/
|
|
97
|
+
|
|
90
98
|
/**
|
|
91
99
|
* A 2D OverviewMap for cesium, openlayers and oblique map.
|
|
92
100
|
* Baselayers are added to the OverviewMap using `showInOverviewMap` flag within the properties bag of a layer configuration.
|
|
@@ -206,6 +214,9 @@ class OverviewMap {
|
|
|
206
214
|
this._eventHandler = new EventHandler();
|
|
207
215
|
const overviewMapClickedInteraction = new OverviewMapClickedInteraction();
|
|
208
216
|
this._eventHandler.addPersistentInteraction(overviewMapClickedInteraction);
|
|
217
|
+
this._eventHandler.addPersistentInteraction(
|
|
218
|
+
new PanoramaImageSelection(this._app.maps),
|
|
219
|
+
);
|
|
209
220
|
|
|
210
221
|
/**
|
|
211
222
|
*
|
|
@@ -253,6 +264,8 @@ class OverviewMap {
|
|
|
253
264
|
this._map.layerCollection.remove(clone);
|
|
254
265
|
this._map.layerCollection.add(clone, idx);
|
|
255
266
|
}
|
|
267
|
+
} else if (layer.className === 'PanoramaDatasetLayer') {
|
|
268
|
+
this._map.layerCollection.add(layer);
|
|
256
269
|
}
|
|
257
270
|
}),
|
|
258
271
|
this._app.maps.layerCollection.removed.addEventListener((layer) => {
|
|
@@ -553,6 +566,10 @@ class OverviewMap {
|
|
|
553
566
|
* @private
|
|
554
567
|
*/
|
|
555
568
|
_addNavigationListener(activeMap) {
|
|
569
|
+
if (activeMap instanceof PanoramaMap) {
|
|
570
|
+
return () => {};
|
|
571
|
+
}
|
|
572
|
+
|
|
556
573
|
return this._mapClicked.addEventListener((e) => {
|
|
557
574
|
const vp = activeMap.getViewpointSync();
|
|
558
575
|
const newPosition = Projection.mercatorToWgs84(e.positionOrPixel);
|
|
@@ -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
|
|