@vcmap/ui 6.1.0-rc.7 → 6.1.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.
- package/build/bundle.js +3 -3
- package/config/base.config.json +7 -3
- package/config/cluster.config.json +1 -1
- package/config/dev.config.json +172 -56
- package/config/projects.config.json +2 -1
- package/config/vectorTile.config.json +42 -1
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-52c2ef11.js → core-5ae90f6d.js} +7515 -5451
- package/dist/assets/core.js +1 -1
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui-dccb9009.css → ui-e659989f.css} +1 -1
- package/dist/assets/{ui-dccb9009.js → ui-e659989f.js} +21736 -20926
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-43a20e18.css → vuetify-cc6a8213.css} +2 -2
- package/dist/assets/{vuetify-43a20e18.js → vuetify-cc6a8213.js} +6694 -6593
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +14 -6
- package/index.js +14 -5
- package/package.json +18 -9
- package/plugins/@vcmap-show-case/vector-properties-example/src/LayerSettings.vue +39 -0
- package/plugins/@vcmap-show-case/vector-properties-example/src/VectorPropertiesExample.vue +3 -0
- package/plugins/@vcmap-show-case/vector-properties-example/src/lib.js +13 -0
- package/plugins/@vcmap-show-case/window-tester/src/WindowExample.vue +9 -0
- package/plugins/package.json +9 -5
- package/src/actions/actionHelper.d.ts +6 -0
- package/src/actions/actionHelper.js +30 -2
- package/src/actions/deepPickingAction.d.ts +23 -0
- package/src/actions/deepPickingAction.js +404 -0
- package/src/actions/extentActions.js +20 -6
- package/src/actions/flightActions.js +5 -1
- package/src/application/VcsApp.vue +33 -21
- package/src/application/VcsApp.vue.d.ts +4 -0
- package/src/application/VcsAttributionsFooter.vue +1 -0
- package/src/application/VcsContainer.vue +1 -0
- package/src/application/VcsContainer.vue.d.ts +4 -0
- package/src/application/VcsMobileMenuList.vue +34 -41
- package/src/application/VcsNavbar.vue +3 -0
- package/src/application/VcsNavbarMobile.vue +6 -18
- package/src/application/VcsNavbarMobile.vue.d.ts +0 -1
- package/src/application/VcsPositionDisplay.vue +1 -0
- package/src/callback/activateLayersCallback.js +9 -1
- package/src/callback/addModuleCallback.js +2 -1
- package/src/components/buttons/VcsActionButtonList.vue +1 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +8 -6
- package/src/components/icons/+all.d.ts +5 -0
- package/src/components/icons/+all.js +14 -0
- package/src/components/lists/VcsActionList.vue +1 -0
- package/src/components/lists/VcsGroupedList.vue +2 -1
- package/src/components/lists/VcsListItemComponent.vue +1 -0
- package/src/components/lists/VcsTreeNode.vue +5 -1
- package/src/components/lists/VcsTreeview.vue +14 -2
- package/src/components/style/{MenuWrapper.vue → StyleMenuWrapper.vue} +2 -1
- package/src/components/style/VcsFillMenu.vue +4 -4
- package/src/components/style/VcsImageMenu.vue +4 -4
- package/src/components/style/VcsStrokeMenu.vue +4 -4
- package/src/components/style/VcsTextMenu.vue +4 -4
- package/src/contentTree/LayerTree.vue +8 -46
- package/src/contentTree/LayerTree.vue.d.ts +1 -3
- package/src/contentTree/contentTreeCollection.d.ts +7 -0
- package/src/contentTree/contentTreeCollection.js +30 -10
- package/src/contentTree/contentTreeItem.d.ts +4 -4
- package/src/contentTree/contentTreeItem.js +2 -2
- package/src/contentTree/groupContentTreeItem.d.ts +5 -0
- package/src/contentTree/groupContentTreeItem.js +1 -1
- package/src/contentTree/layerContentTreeItem.js +1 -1
- package/src/contentTree/layerGroupContentTreeItem.js +11 -1
- package/src/contentTree/nodeContentTreeItem.d.ts +21 -0
- package/src/contentTree/nodeContentTreeItem.js +31 -2
- package/src/contentTree/wmsChildContentTreeItem.d.ts +56 -0
- package/src/contentTree/wmsChildContentTreeItem.js +159 -0
- package/src/contentTree/wmsGroupContentTreeItem.d.ts +171 -0
- package/src/contentTree/wmsGroupContentTreeItem.js +620 -0
- package/src/featureInfo/ClusterFeatureComponent.vue +47 -11
- package/src/featureInfo/ClusterFeatureComponent.vue.d.ts +1 -0
- package/src/featureInfo/balloonFeatureInfoView.d.ts +3 -0
- package/src/featureInfo/balloonFeatureInfoView.js +78 -11
- package/src/featureInfo/balloonHelper.js +8 -12
- package/src/featureInfo/featureInfo.d.ts +32 -7
- package/src/featureInfo/featureInfo.js +193 -91
- package/src/i18n/de.d.ts +22 -16
- package/src/i18n/de.js +4 -0
- package/src/i18n/en.d.ts +22 -16
- package/src/i18n/en.js +4 -0
- package/src/legend/legendHelper.d.ts +15 -0
- package/src/legend/legendHelper.js +28 -3
- package/src/manager/toolbox/GroupToolboxComponent.vue +1 -0
- package/src/manager/toolbox/SelectToolboxComponent.vue +2 -0
- package/src/manager/toolbox/ToolboxManagerComponent.vue +1 -0
- package/src/manager/window/windowManager.d.ts +2 -2
- package/src/manager/window/windowManager.js +17 -16
- package/src/navigation/MapNavigation.vue +3 -1
- package/src/navigation/overviewMap.js +1 -1
- package/src/notifier/NotifierComponent.vue +1 -0
- package/src/search/ResultsComponent.vue +10 -1
- package/src/search/SearchComponent.vue +11 -6
- package/src/search/search.js +3 -16
- package/src/state.d.ts +2 -1
- package/src/state.js +2 -1
- package/src/uiConfig.d.ts +9 -0
- package/src/uiConfig.js +1 -0
- package/src/vcsUiApp.js +7 -1
- /package/dist/assets/{cesium-6c6aa853.js → cesium-be8a1422.js} +0 -0
- /package/dist/assets/{ol-b0589b0c.js → ol-d5f8aba6.js} +0 -0
- /package/dist/assets/{vue-f7a0b088.js → vue-3435e55b.js} +0 -0
- /package/src/components/style/{MenuWrapper.vue.d.ts → StyleMenuWrapper.vue.d.ts} +0 -0
@@ -15,6 +15,8 @@ export type BalloonFeatureInfoViewProps = import("./abstractFeatureInfoView.js")
|
|
15
15
|
balloonTitle: string;
|
16
16
|
balloonSubtitle: string;
|
17
17
|
position: import("ol/coordinate.js").Coordinate;
|
18
|
+
heightReference: HeightReference;
|
19
|
+
heightOffset: number;
|
18
20
|
};
|
19
21
|
/**
|
20
22
|
* @class
|
@@ -46,4 +48,5 @@ declare class BalloonFeatureInfoView extends AbstractFeatureInfoView {
|
|
46
48
|
*/
|
47
49
|
toJSON(): BalloonFeatureInfoViewOptions;
|
48
50
|
}
|
51
|
+
import { HeightReference } from '@vcmap-cesium/engine';
|
49
52
|
import AbstractFeatureInfoView from './abstractFeatureInfoView.js';
|
@@ -1,7 +1,19 @@
|
|
1
1
|
import { Feature } from 'ol';
|
2
2
|
import { getCenter } from 'ol/extent.js';
|
3
|
-
import
|
4
|
-
import {
|
3
|
+
import Point from 'ol/geom/Point.js';
|
4
|
+
import {
|
5
|
+
Cartographic,
|
6
|
+
Entity,
|
7
|
+
HeightReference,
|
8
|
+
Math as CesiumMath,
|
9
|
+
} from '@vcmap-cesium/engine';
|
10
|
+
import {
|
11
|
+
getGeometryHeight,
|
12
|
+
getHeightInfo,
|
13
|
+
isAbsoluteHeightReference,
|
14
|
+
isRelativeHeightReference,
|
15
|
+
Projection,
|
16
|
+
} from '@vcmap/core';
|
5
17
|
import { check } from '@vcsuite/check';
|
6
18
|
import AbstractFeatureInfoView from './abstractFeatureInfoView.js';
|
7
19
|
import { WindowSlot } from '../manager/window/windowManager.js';
|
@@ -34,6 +46,8 @@ export function extractNestedKey(key, attrs, defaultValue = null) {
|
|
34
46
|
* balloonTitle: string,
|
35
47
|
* balloonSubtitle: string,
|
36
48
|
* position: import("ol/coordinate.js").Coordinate
|
49
|
+
* heightReference: HeightReference,
|
50
|
+
* heightOffset: number
|
37
51
|
* }} BalloonFeatureInfoViewProps
|
38
52
|
*/
|
39
53
|
|
@@ -53,17 +67,64 @@ function cartesian3ToCoordinate(cartesian) {
|
|
53
67
|
|
54
68
|
/**
|
55
69
|
* @param {FeatureType} feature
|
56
|
-
* @
|
70
|
+
* @param {import("@vcmap/core").Layer} layer
|
71
|
+
* @param {import("ol/coordinate.js").Coordinate|undefinded} clickedPosition
|
72
|
+
* @returns {{position?: import("ol/coordinate.js").Coordinate, heightReference: HeightReference, heightOffset: number}}
|
57
73
|
*/
|
58
|
-
function getPositionFromFeature(feature) {
|
59
|
-
|
60
|
-
|
74
|
+
function getPositionFromFeature(feature, layer, clickedPosition) {
|
75
|
+
let heightReference = HeightReference.NONE;
|
76
|
+
let heightOffset = 0;
|
77
|
+
let position = null;
|
78
|
+
if (feature instanceof Feature && feature.getGeometry() instanceof Point) {
|
79
|
+
const point = feature.getGeometry();
|
80
|
+
const renderAs = layer.vectorProperties.renderAs(feature);
|
81
|
+
if (renderAs === 'geometry') {
|
82
|
+
// special case where we do not want to use the clickedPosition but the exact Position of the Point
|
83
|
+
const heightInfo = getHeightInfo(feature, point, layer.vectorProperties);
|
84
|
+
({ heightReference } = heightInfo);
|
85
|
+
let height = clickedPosition?.[2] ?? 0;
|
86
|
+
position = point.getCoordinates();
|
87
|
+
// if clamped, do nothing
|
88
|
+
if (isRelativeHeightReference(heightReference)) {
|
89
|
+
height = getGeometryHeight(point, heightInfo);
|
90
|
+
if (heightInfo.groundLevel != null) {
|
91
|
+
// we have a groundLevel, so no need to clamp the point
|
92
|
+
heightReference = HeightReference.NONE;
|
93
|
+
}
|
94
|
+
if (heightInfo.heightAboveGround != null) {
|
95
|
+
heightOffset += heightInfo.heightAboveGround;
|
96
|
+
}
|
97
|
+
const extrudedHeight = heightInfo.storeyHeightsAboveGround.reduce(
|
98
|
+
(acc, storeyHeight) => acc + storeyHeight,
|
99
|
+
0,
|
100
|
+
);
|
101
|
+
heightOffset += extrudedHeight;
|
102
|
+
height += extrudedHeight;
|
103
|
+
position = [position[0], position[1], height];
|
104
|
+
} else if (isAbsoluteHeightReference(heightReference)) {
|
105
|
+
const extrudedHeight = heightInfo.storeyHeightsAboveGround.reduce(
|
106
|
+
(acc, storeyHeight) => acc + storeyHeight,
|
107
|
+
0,
|
108
|
+
);
|
109
|
+
position = [
|
110
|
+
position[0],
|
111
|
+
position[1],
|
112
|
+
heightInfo.groundLevelOrMinHeight + extrudedHeight,
|
113
|
+
];
|
114
|
+
}
|
115
|
+
return { position, heightOffset, heightReference };
|
116
|
+
}
|
117
|
+
}
|
118
|
+
if (clickedPosition) {
|
119
|
+
position = clickedPosition.slice();
|
120
|
+
} else if (feature instanceof Feature && feature.getGeometry()) {
|
121
|
+
position = getCenter(feature.getGeometry().getExtent());
|
61
122
|
} else if (feature instanceof Entity) {
|
62
|
-
|
123
|
+
position = cartesian3ToCoordinate(feature.position);
|
63
124
|
} else if (feature?.primitive?.boundingSphere?.center) {
|
64
|
-
|
125
|
+
position = cartesian3ToCoordinate(feature.primitive.boundingSphere.center);
|
65
126
|
}
|
66
|
-
return
|
127
|
+
return { position, heightReference, heightOffset };
|
67
128
|
}
|
68
129
|
|
69
130
|
/**
|
@@ -104,10 +165,16 @@ class BalloonFeatureInfoView extends AbstractFeatureInfoView {
|
|
104
165
|
*/
|
105
166
|
getProperties(featureInfo, layer) {
|
106
167
|
const properties = super.getProperties(featureInfo, layer);
|
168
|
+
const { position, heightReference, heightOffset } = getPositionFromFeature(
|
169
|
+
featureInfo.feature,
|
170
|
+
layer,
|
171
|
+
featureInfo.position,
|
172
|
+
);
|
107
173
|
return {
|
108
174
|
...properties,
|
109
|
-
position
|
110
|
-
|
175
|
+
position,
|
176
|
+
heightReference,
|
177
|
+
heightOffset,
|
111
178
|
balloonTitle:
|
112
179
|
this.balloonTitle != null
|
113
180
|
? extractNestedKey(
|
@@ -24,10 +24,14 @@ export const balloonOffset = { x: 55, y: 25 };
|
|
24
24
|
|
25
25
|
/**
|
26
26
|
* @param {import("@vcmap-cesium/engine").Scene} scene
|
27
|
-
* @param {import("
|
27
|
+
* @param {import("ol/coordinate.js").Coordinate} position
|
28
28
|
* @returns {undefined|import("@vcmap-cesium/engine").Cartesian2}
|
29
29
|
*/
|
30
|
-
function getBalloonPositionCesium(scene,
|
30
|
+
function getBalloonPositionCesium(scene, position) {
|
31
|
+
const wgs84Position = Projection.mercatorToWgs84(position);
|
32
|
+
const cartesian = Cartographic.toCartesian(
|
33
|
+
Cartographic.fromDegrees(...wgs84Position),
|
34
|
+
);
|
31
35
|
return SceneTransforms.worldToWindowCoordinates(scene, cartesian);
|
32
36
|
}
|
33
37
|
|
@@ -53,11 +57,7 @@ function getBalloonPositionOL(olMap, position) {
|
|
53
57
|
export async function getBalloonPosition(app, position) {
|
54
58
|
const map = app.maps.activeMap;
|
55
59
|
if (map instanceof CesiumMap) {
|
56
|
-
|
57
|
-
const cartesian = Cartographic.toCartesian(
|
58
|
-
Cartographic.fromDegrees(...wgs84Position),
|
59
|
-
);
|
60
|
-
return getBalloonPositionCesium(map.getScene(), cartesian);
|
60
|
+
return getBalloonPositionCesium(map.getScene(), position);
|
61
61
|
} else if (map instanceof OpenlayersMap) {
|
62
62
|
return getBalloonPositionOL(map.olMap, position);
|
63
63
|
} else if (map instanceof ObliqueMap) {
|
@@ -130,16 +130,12 @@ export async function setupBalloonPositionListener(
|
|
130
130
|
const [position3D] = await map.getHeightFromTerrain([position]);
|
131
131
|
position[2] = position3D[2];
|
132
132
|
}
|
133
|
-
const wgs84Position = Projection.mercatorToWgs84(position);
|
134
|
-
const cartesian = Cartographic.toCartesian(
|
135
|
-
Cartographic.fromDegrees(...wgs84Position),
|
136
|
-
);
|
137
133
|
listeners.push(
|
138
134
|
map.getScene().postRender.addEventListener((scene) => {
|
139
135
|
setBalloonPosition(
|
140
136
|
app.windowManager,
|
141
137
|
windowId,
|
142
|
-
getBalloonPositionCesium(scene,
|
138
|
+
getBalloonPositionCesium(scene, position),
|
143
139
|
app.maps.target,
|
144
140
|
);
|
145
141
|
}),
|
@@ -20,6 +20,26 @@ export function getHighlightStyle(feature: FeatureType, layer: import("@vcmap/co
|
|
20
20
|
* @returns {import("ol/style/Style.js").default}
|
21
21
|
*/
|
22
22
|
export function getClusterHighlightStyle(clusterFeature: import("ol").Feature, clusterGroup: import("@vcmap/core").VectorClusterGroup, clusterStyle: import("ol/style/Style.js").default, defaultFillColor: string): import("ol/style/Style.js").default;
|
23
|
+
/**
|
24
|
+
* @param {import("../vcsUiApp.js").default} app
|
25
|
+
* @param {import("ol").Feature} feature
|
26
|
+
* @returns {import("./abstractFeatureInfoView.js").default|null}
|
27
|
+
*/
|
28
|
+
export function getFeatureInfoViewForFeature(app: import("../vcsUiApp.js").default, feature: import("ol").Feature): import("./abstractFeatureInfoView.js").default | null;
|
29
|
+
/**
|
30
|
+
* Returns a VcsGroupedListItem for each provided feature and corresponding groups
|
31
|
+
* @param {import("../vcsUiApp.js").default} app
|
32
|
+
* @param {import("@vcmap/core").EventFeature[]} features
|
33
|
+
* @param {import("ol/coordinate.js").Coordinate?} position
|
34
|
+
* @returns {{
|
35
|
+
* groups: import("../components/lists/VcsGroupedList.vue").VcsListGroup,
|
36
|
+
* items: import("../components/lists/VcsGroupedList.vue").VcsGroupedListItem,
|
37
|
+
* }}
|
38
|
+
*/
|
39
|
+
export function getGroupedFeatureList(app: import("../vcsUiApp.js").default, features: import("@vcmap/core").EventFeature[], position?: import("ol/coordinate.js").Coordinate | null): {
|
40
|
+
groups: import("../components/lists/VcsGroupedList.vue").VcsListGroup;
|
41
|
+
items: import("../components/lists/VcsGroupedList.vue").VcsGroupedListItem;
|
42
|
+
};
|
23
43
|
/**
|
24
44
|
* @param {import("../vcsUiApp.js").default} app
|
25
45
|
* @returns {FeatureInfoSession}
|
@@ -89,7 +109,7 @@ declare class FeatureInfo extends Collection<AbstractFeatureInfoView> {
|
|
89
109
|
*/
|
90
110
|
private _clusterWindowId;
|
91
111
|
/**
|
92
|
-
* @type {VcsEvent<FeatureType|null>}
|
112
|
+
* @type {import("@vcmap/core").VcsEvent<FeatureType|null>}
|
93
113
|
* @private
|
94
114
|
*/
|
95
115
|
private _featureChanged;
|
@@ -118,6 +138,11 @@ declare class FeatureInfo extends Collection<AbstractFeatureInfoView> {
|
|
118
138
|
* @private
|
119
139
|
*/
|
120
140
|
private _selectedClusterFeatureId;
|
141
|
+
/**
|
142
|
+
* @type {Array<function():void>}
|
143
|
+
* @private
|
144
|
+
*/
|
145
|
+
private _destroyBalloonClampedListener;
|
121
146
|
/**
|
122
147
|
* @type {Array<function():void>}
|
123
148
|
* @private
|
@@ -126,14 +151,14 @@ declare class FeatureInfo extends Collection<AbstractFeatureInfoView> {
|
|
126
151
|
_destroyFeatureInfoTool: () => void;
|
127
152
|
/**
|
128
153
|
* A vector layer to render provided features on
|
129
|
-
* @type {VectorLayer|null}
|
154
|
+
* @type {import("@vcmap/core").VectorLayer|null}
|
130
155
|
* @private
|
131
156
|
*/
|
132
157
|
private _scratchLayer;
|
133
158
|
/**
|
134
159
|
* Emitted whenever a feature is selected or cleared.
|
135
160
|
* Does not reflect cluster feature changes!
|
136
|
-
* @type {VcsEvent<null|FeatureType>}
|
161
|
+
* @type {import("@vcmap/core").VcsEvent<null|FeatureType>}
|
137
162
|
*/
|
138
163
|
get featureChanged(): VcsEvent<FeatureType | null>;
|
139
164
|
/**
|
@@ -146,7 +171,7 @@ declare class FeatureInfo extends Collection<AbstractFeatureInfoView> {
|
|
146
171
|
get selectedFeatureId(): string | null;
|
147
172
|
/**
|
148
173
|
* Emitted whenever a cluster feature is selected or cleared.
|
149
|
-
* @type {VcsEvent<null|import("ol").Feature>}
|
174
|
+
* @type {import("@vcmap/core").VcsEvent<null|import("ol").Feature>}
|
150
175
|
*/
|
151
176
|
get clusterFeatureChanged(): VcsEvent<Feature<import("ol/geom.js").Geometry> | null>;
|
152
177
|
/**
|
@@ -173,7 +198,7 @@ declare class FeatureInfo extends Collection<AbstractFeatureInfoView> {
|
|
173
198
|
private _ensureScratchLayer;
|
174
199
|
/**
|
175
200
|
* @param {FeatureType} feature
|
176
|
-
* @returns {null|
|
201
|
+
* @returns {null|import("./abstractFeatureInfoView.js").default}
|
177
202
|
* @private
|
178
203
|
*/
|
179
204
|
private _getFeatureInfoViewForFeature;
|
@@ -187,10 +212,10 @@ declare class FeatureInfo extends Collection<AbstractFeatureInfoView> {
|
|
187
212
|
* @param {FeatureType} feature
|
188
213
|
* @param {import("ol/coordinate.js").Coordinate=} [position] - optional clicked position. If not given feature's center point is used to place balloons
|
189
214
|
* @param {import("ol/coordinate.js").Coordinate=} [windowPosition] - optional clicked window position. If not given derived from position for balloons
|
190
|
-
* @param {
|
215
|
+
* @param {import("./abstractFeatureInfoView.js").default=} featureInfoView
|
191
216
|
* @returns {Promise<void>}
|
192
217
|
*/
|
193
|
-
selectFeature(feature: FeatureType, position?: import("ol/coordinate.js").Coordinate | undefined, windowPosition?: import("ol/coordinate.js").Coordinate | undefined, featureInfoView?:
|
218
|
+
selectFeature(feature: FeatureType, position?: import("ol/coordinate.js").Coordinate | undefined, windowPosition?: import("ol/coordinate.js").Coordinate | undefined, featureInfoView?: import("./abstractFeatureInfoView.js").default | undefined): Promise<void>;
|
194
219
|
/**
|
195
220
|
* Selecting a cluster feature opens a window listing the features belonging to the cluster feature.
|
196
221
|
* To be listed the feature must meet the following criteria: a) the feature must be part of a layer, b) said layer must be managed in
|