@vcmap/core 5.0.0-rc.37 → 5.0.0-rc.38
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/dist/src/interaction/featureProviderInteraction.js +4 -2
- package/dist/src/interaction/featureProviderInteraction.js.map +1 -1
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.d.ts +1 -0
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js +50 -3
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/rasterLayerCesiumImpl.js +4 -0
- package/dist/src/layer/cesium/rasterLayerCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorCesiumImpl.d.ts +1 -1
- package/dist/src/layer/cesium/vectorCesiumImpl.js +17 -15
- package/dist/src/layer/cesium/vectorCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorContext.d.ts +1 -0
- package/dist/src/layer/cesium/vectorContext.js +17 -5
- package/dist/src/layer/cesium/vectorContext.js.map +1 -1
- package/dist/src/layer/featureVisibility.d.ts +2 -2
- package/dist/src/layer/featureVisibility.js +3 -2
- package/dist/src/layer/featureVisibility.js.map +1 -1
- package/dist/src/layer/vectorLayer.d.ts +1 -0
- package/dist/src/layer/vectorLayer.js.map +1 -1
- package/dist/src/map/cesiumMap.d.ts +6 -0
- package/dist/src/map/cesiumMap.js +4 -1
- package/dist/src/map/cesiumMap.js.map +1 -1
- package/dist/src/util/editor/createFeatureSession.js +7 -0
- package/dist/src/util/editor/createFeatureSession.js.map +1 -1
- package/dist/src/util/editor/editFeaturesSession.js +1 -6
- package/dist/src/util/editor/editFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/editGeometrySession.js +15 -1
- package/dist/src/util/editor/editGeometrySession.js.map +1 -1
- package/dist/src/util/editor/editorHelpers.d.ts +1 -0
- package/dist/src/util/editor/editorHelpers.js +5 -0
- package/dist/src/util/editor/editorHelpers.js.map +1 -1
- package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.js +8 -1
- package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.js.map +1 -1
- package/dist/src/util/featureconverter/arcToCesium.d.ts +1 -1
- package/dist/src/util/featureconverter/arcToCesium.js +2 -2
- package/dist/src/util/featureconverter/arcToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/convert.d.ts +1 -1
- package/dist/src/util/featureconverter/convert.js +13 -13
- package/dist/src/util/featureconverter/convert.js.map +1 -1
- package/dist/src/util/featureconverter/featureconverterHelper.js +1 -1
- package/dist/src/util/featureconverter/featureconverterHelper.js.map +1 -1
- package/dist/src/util/featureconverter/lineStringToCesium.d.ts +2 -2
- package/dist/src/util/featureconverter/lineStringToCesium.js +6 -6
- package/dist/src/util/featureconverter/lineStringToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/pointHelpers.d.ts +4 -4
- package/dist/src/util/featureconverter/pointHelpers.js +30 -21
- package/dist/src/util/featureconverter/pointHelpers.js.map +1 -1
- package/dist/src/util/featureconverter/pointToCesium.d.ts +1 -1
- package/dist/src/util/featureconverter/pointToCesium.js +5 -5
- package/dist/src/util/featureconverter/pointToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/polygonToCesium.d.ts +2 -2
- package/dist/src/util/featureconverter/polygonToCesium.js +13 -4
- package/dist/src/util/featureconverter/polygonToCesium.js.map +1 -1
- package/package.json +3 -3
- package/src/cesium/cesium.d.ts +5 -1
- package/src/interaction/featureProviderInteraction.ts +10 -8
- package/src/layer/cesium/cesiumTilesetCesiumImpl.ts +57 -4
- package/src/layer/cesium/rasterLayerCesiumImpl.ts +4 -0
- package/src/layer/cesium/vectorCesiumImpl.ts +17 -15
- package/src/layer/cesium/vectorContext.ts +46 -33
- package/src/layer/featureVisibility.ts +3 -11
- package/src/layer/vectorLayer.ts +5 -0
- package/src/map/cesiumMap.ts +12 -1
- package/src/util/editor/createFeatureSession.ts +8 -0
- package/src/util/editor/editFeaturesSession.ts +1 -7
- package/src/util/editor/editGeometrySession.ts +17 -1
- package/src/util/editor/editorHelpers.ts +6 -0
- package/src/util/editor/interactions/editGeometryMouseOverInteraction.ts +11 -1
- package/src/util/featureconverter/arcToCesium.ts +3 -3
- package/src/util/featureconverter/convert.ts +50 -32
- package/src/util/featureconverter/featureconverterHelper.ts +5 -1
- package/src/util/featureconverter/lineStringToCesium.ts +38 -36
- package/src/util/featureconverter/pointHelpers.ts +166 -144
- package/src/util/featureconverter/pointToCesium.ts +8 -8
- package/src/util/featureconverter/polygonToCesium.ts +16 -1
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
PolygonHierarchy,
|
|
8
8
|
PolylineGeometry,
|
|
9
9
|
type Scene,
|
|
10
|
+
Cartographic,
|
|
10
11
|
} from '@vcmap-cesium/engine';
|
|
11
12
|
import type { Style } from 'ol/style.js';
|
|
12
13
|
import type { Polygon } from 'ol/geom.js';
|
|
@@ -73,19 +74,32 @@ export function createFillGeometries(
|
|
|
73
74
|
export function getLineGeometryOptions(
|
|
74
75
|
options: PolygonGeometryOptions,
|
|
75
76
|
style: Style,
|
|
77
|
+
groundLevel?: number,
|
|
76
78
|
): PolylineGeometryOptions[] {
|
|
77
79
|
const width = parseNumber(style.getStroke().getWidth(), 1.0);
|
|
78
80
|
const geometryOptions: PolylineGeometryOptions[] = [];
|
|
81
|
+
|
|
79
82
|
geometryOptions.push({
|
|
80
83
|
positions: options.polygonHierarchy.positions,
|
|
81
84
|
width,
|
|
82
85
|
});
|
|
86
|
+
|
|
83
87
|
options.polygonHierarchy.holes.forEach((polygonHierarchy) => {
|
|
84
88
|
geometryOptions.push({
|
|
85
89
|
positions: polygonHierarchy.positions,
|
|
86
90
|
width,
|
|
87
91
|
});
|
|
88
92
|
});
|
|
93
|
+
|
|
94
|
+
if (groundLevel) {
|
|
95
|
+
geometryOptions.forEach((polylineOptions) => {
|
|
96
|
+
polylineOptions.positions = polylineOptions.positions.map((c) => {
|
|
97
|
+
const geographic = Cartographic.fromCartesian(c);
|
|
98
|
+
geographic.height = groundLevel;
|
|
99
|
+
return Cartographic.toCartesian(geographic);
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
}
|
|
89
103
|
return geometryOptions;
|
|
90
104
|
}
|
|
91
105
|
|
|
@@ -100,8 +114,9 @@ export function createGroundLineGeometries(
|
|
|
100
114
|
export function createLineGeometries(
|
|
101
115
|
options: PolygonGeometryOptions,
|
|
102
116
|
style: Style,
|
|
117
|
+
groundLevel?: number,
|
|
103
118
|
): PolylineGeometry[] {
|
|
104
|
-
return getLineGeometryOptions(options, style).map((option) => {
|
|
119
|
+
return getLineGeometryOptions(options, style, groundLevel).map((option) => {
|
|
105
120
|
return new PolylineGeometry(option);
|
|
106
121
|
});
|
|
107
122
|
}
|