@vcmap/core 6.0.0-rc.7 → 6.0.0-rc.9
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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/category/category.d.ts +2 -1
- package/dist/src/category/category.js +2 -1
- package/dist/src/category/category.js.map +1 -1
- package/dist/src/category/categoryCollection.js.map +1 -1
- package/dist/src/cesium/cesiumVcsCameraPrimitive.js.map +1 -1
- package/dist/src/classRegistry.d.ts +1 -1
- package/dist/src/classRegistry.js.map +1 -1
- package/dist/src/featureProvider/abstractFeatureProvider.js.map +1 -1
- package/dist/src/featureProvider/wmsFeatureProvider.js.map +1 -1
- package/dist/src/interaction/abstractInteraction.js.map +1 -1
- package/dist/src/interaction/coordinateAtPixel.js.map +1 -1
- package/dist/src/interaction/eventHandler.js.map +1 -1
- package/dist/src/interaction/featureAtPixelInteraction.js.map +1 -1
- package/dist/src/interaction/featureProviderInteraction.js.map +1 -1
- package/dist/src/interaction/interactionChain.js.map +1 -1
- package/dist/src/interaction/interactionType.js +4 -4
- package/dist/src/interaction/interactionType.js.map +1 -1
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/clusterContext.js.map +1 -1
- package/dist/src/layer/cesium/dataSourceCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/rasterLayerCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/resourceHelper.js.map +1 -1
- package/dist/src/layer/cesium/singleImageCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/terrainCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/tmsCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorCesiumImpl.js +2 -2
- package/dist/src/layer/cesium/vectorCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorContext.js +79 -14
- package/dist/src/layer/cesium/vectorContext.js.map +1 -1
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorTileImageryProvider.js.map +1 -1
- package/dist/src/layer/cesium/wmsCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesiumTilesetLayer.js.map +1 -1
- package/dist/src/layer/czmlLayer.js.map +1 -1
- package/dist/src/layer/dataSourceLayer.js.map +1 -1
- package/dist/src/layer/featureLayer.js.map +1 -1
- package/dist/src/layer/featureStoreFeatureVisibility.js.map +1 -1
- package/dist/src/layer/featureStoreLayer.js.map +1 -1
- package/dist/src/layer/featureStoreLayerChanges.js.map +1 -1
- package/dist/src/layer/featureVisibility.js +1 -1
- package/dist/src/layer/featureVisibility.js.map +1 -1
- package/dist/src/layer/geojsonHelpers.js.map +1 -1
- package/dist/src/layer/geojsonLayer.js.map +1 -1
- package/dist/src/layer/globalHider.js.map +1 -1
- package/dist/src/layer/layer.js.map +1 -1
- package/dist/src/layer/layerImplementation.js.map +1 -1
- package/dist/src/layer/oblique/layerObliqueImpl.js.map +1 -1
- package/dist/src/layer/oblique/obliqueHelpers.js.map +1 -1
- package/dist/src/layer/oblique/vectorObliqueImpl.js.map +1 -1
- package/dist/src/layer/openStreetMapLayer.js.map +1 -1
- package/dist/src/layer/openlayers/layerOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/rasterLayerOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/singleImageOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/tmsOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/vectorOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/wmsOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/wmtsOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/pointCloudLayer.js.map +1 -1
- package/dist/src/layer/rasterLayer.js +1 -1
- package/dist/src/layer/rasterLayer.js.map +1 -1
- package/dist/src/layer/singleImageLayer.js.map +1 -1
- package/dist/src/layer/terrainHelpers.js.map +1 -1
- package/dist/src/layer/terrainLayer.js.map +1 -1
- package/dist/src/layer/tileLoadedHelper.js.map +1 -1
- package/dist/src/layer/tileProvider/mvtTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/tileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.js.map +1 -1
- package/dist/src/layer/tmsLayer.js.map +1 -1
- package/dist/src/layer/vectorHelpers.js.map +1 -1
- package/dist/src/layer/vectorLayer.js +1 -3
- package/dist/src/layer/vectorLayer.js.map +1 -1
- package/dist/src/layer/vectorProperties.js +23 -1
- package/dist/src/layer/vectorProperties.js.map +1 -1
- package/dist/src/layer/vectorTileLayer.js.map +1 -1
- package/dist/src/layer/wfsLayer.js.map +1 -1
- package/dist/src/layer/wmsHelpers.js.map +1 -1
- package/dist/src/layer/wmsLayer.js.map +1 -1
- package/dist/src/layer/wmtsLayer.js.map +1 -1
- package/dist/src/map/baseOLMap.js.map +1 -1
- package/dist/src/map/cameraLimiter.js +1 -1
- package/dist/src/map/cameraLimiter.js.map +1 -1
- package/dist/src/map/cesiumMap.js.map +1 -1
- package/dist/src/map/obliqueMap.js.map +1 -1
- package/dist/src/map/openlayersMap.js +1 -1
- package/dist/src/map/openlayersMap.js.map +1 -1
- package/dist/src/map/vcsMap.js.map +1 -1
- package/dist/src/oblique/helpers.js.map +1 -1
- package/dist/src/oblique/obliqueCollection.js.map +1 -1
- package/dist/src/oblique/obliqueDataSet.js +1 -1
- package/dist/src/oblique/obliqueDataSet.js.map +1 -1
- package/dist/src/oblique/obliqueImage.js.map +1 -1
- package/dist/src/oblique/obliqueImageMeta.js.map +1 -1
- package/dist/src/oblique/obliqueProvider.js.map +1 -1
- package/dist/src/oblique/obliqueView.js.map +1 -1
- package/dist/src/oblique/obliqueViewDirection.js +1 -1
- package/dist/src/oblique/obliqueViewDirection.js.map +1 -1
- package/dist/src/oblique/parseImageJson.js.map +1 -1
- package/dist/src/ol/feature.js.map +1 -1
- package/dist/src/ol/geom/geometryCollection.js +68 -11
- package/dist/src/ol/geom/geometryCollection.js.map +1 -1
- package/dist/src/ol/render/canvas/canvasTileRenderer.js.map +1 -1
- package/dist/src/ol/source/ClusterEnhancedVectorSource.js.map +1 -1
- package/dist/src/ol/source/VcsCluster.js.map +1 -1
- package/dist/src/overrideClassRegistry.js.map +1 -1
- package/dist/src/style/arcStyle.js.map +1 -1
- package/dist/src/style/arrowStyle.js +1 -1
- package/dist/src/style/arrowStyle.js.map +1 -1
- package/dist/src/style/declarativeStyleItem.js.map +1 -1
- package/dist/src/style/shapesCategory.js.map +1 -1
- package/dist/src/style/styleFactory.js.map +1 -1
- package/dist/src/style/styleHelpers.js +1 -1
- package/dist/src/style/styleHelpers.js.map +1 -1
- package/dist/src/style/styleItem.js.map +1 -1
- package/dist/src/style/vectorStyleItem.js +1 -1
- package/dist/src/style/vectorStyleItem.js.map +1 -1
- package/dist/src/style/writeStyle.js.map +1 -1
- package/dist/src/util/clipping/clippingObject.js.map +1 -1
- package/dist/src/util/clipping/clippingObjectManager.js.map +1 -1
- package/dist/src/util/clipping/clippingPlaneHelper.js.map +1 -1
- package/dist/src/util/collection.js.map +1 -1
- package/dist/src/util/displayQuality/displayQuality.js +1 -1
- package/dist/src/util/displayQuality/displayQuality.js.map +1 -1
- package/dist/src/util/editor/createFeatureSession.js.map +1 -1
- package/dist/src/util/editor/editFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/editGeometrySession.js.map +1 -1
- package/dist/src/util/editor/editorHelpers.js.map +1 -1
- package/dist/src/util/editor/editorSessionHelpers.js +2 -2
- package/dist/src/util/editor/editorSessionHelpers.js.map +1 -1
- package/dist/src/util/editor/interactions/createBBoxInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createCircleInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createLineStringInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createPointInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createPolygonInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/creationSnapping.js.map +1 -1
- package/dist/src/util/editor/interactions/editFeaturesMouseOverInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.js +5 -5
- package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/insertVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/layerSnapping.js.map +1 -1
- package/dist/src/util/editor/interactions/mapInteractionController.js.map +1 -1
- package/dist/src/util/editor/interactions/removeVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/selectFeatureMouseOverInteraction.js +1 -1
- package/dist/src/util/editor/interactions/selectFeatureMouseOverInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/selectMultiFeatureInteraction.d.ts +1 -1
- package/dist/src/util/editor/interactions/selectMultiFeatureInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/selectSingleFeatureInteraction.d.ts +1 -1
- package/dist/src/util/editor/interactions/selectSingleFeatureInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/translateVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/translationSnapping.js.map +1 -1
- package/dist/src/util/editor/selectFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/snappingHelpers.js.map +1 -1
- package/dist/src/util/editor/transformation/create2DHandlers.js.map +1 -1
- package/dist/src/util/editor/transformation/create3DHandlers.js.map +1 -1
- package/dist/src/util/editor/transformation/extrudeInteraction.js.map +1 -1
- package/dist/src/util/editor/transformation/rotateInteraction.js.map +1 -1
- package/dist/src/util/editor/transformation/scaleInteraction.js.map +1 -1
- package/dist/src/util/editor/transformation/transformationHandler.js.map +1 -1
- package/dist/src/util/editor/transformation/transformationTypes.js +2 -2
- package/dist/src/util/editor/transformation/transformationTypes.js.map +1 -1
- package/dist/src/util/editor/transformation/translateInteraction.js.map +1 -1
- package/dist/src/util/editor/validateGeoemetry.js.map +1 -1
- package/dist/src/util/exclusiveManager.js.map +1 -1
- package/dist/src/util/extent.js.map +1 -1
- package/dist/src/util/featureconverter/circleToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/clampedPrimitive.js.map +1 -1
- package/dist/src/util/featureconverter/convert.js.map +1 -1
- package/dist/src/util/featureconverter/extent3D.js.map +1 -1
- package/dist/src/util/featureconverter/lineStringToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/pointHelpers.js.map +1 -1
- package/dist/src/util/featureconverter/pointToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/polygonToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/storeyHelpers.js.map +1 -1
- package/dist/src/util/featureconverter/vectorGeometryFactory.js.map +1 -1
- package/dist/src/util/featureconverter/vectorHeightInfo.js +2 -4
- package/dist/src/util/featureconverter/vectorHeightInfo.js.map +1 -1
- package/dist/src/util/fetch.js.map +1 -1
- package/dist/src/util/flight/flightAnchor.js.map +1 -1
- package/dist/src/util/flight/flightCollection.js.map +1 -1
- package/dist/src/util/flight/flightHelpers.js.map +1 -1
- package/dist/src/util/flight/flightInstance.js.map +1 -1
- package/dist/src/util/flight/flightPlayer.js.map +1 -1
- package/dist/src/util/flight/flightVisualizer.js.map +1 -1
- package/dist/src/util/geometryHelpers.d.ts +1 -1
- package/dist/src/util/geometryHelpers.js +79 -56
- package/dist/src/util/geometryHelpers.js.map +1 -1
- package/dist/src/util/indexedCollection.js.map +1 -1
- package/dist/src/util/layerCollection.js.map +1 -1
- package/dist/src/util/locale.js.map +1 -1
- package/dist/src/util/mapCollection.js.map +1 -1
- package/dist/src/util/math.js.map +1 -1
- package/dist/src/util/overrideCollection.js.map +1 -1
- package/dist/src/util/projection.js.map +1 -1
- package/dist/src/util/urlHelpers.js.map +1 -1
- package/dist/src/util/viewpoint.js.map +1 -1
- package/dist/src/vcsApp.d.ts +3 -3
- package/dist/src/vcsApp.js +1 -0
- package/dist/src/vcsApp.js.map +1 -1
- package/dist/src/vcsEvent.js.map +1 -1
- package/dist/src/vcsModule.js.map +1 -1
- package/dist/src/vcsModuleHelpers.js.map +1 -1
- package/dist/src/vcsObject.js.map +1 -1
- package/dist/tests/unit/helpers/cesiumHelpers.d.ts +9 -9
- package/dist/tests/unit/helpers/cesiumHelpers.js.map +1 -1
- package/dist/tests/unit/helpers/importJSON.js.map +1 -1
- package/dist/tests/unit/helpers/obliqueHelpers.js.map +1 -1
- package/index.ts +1 -1
- package/package.json +5 -5
- package/src/category/category.ts +3 -2
- package/src/category/categoryCollection.ts +1 -1
- package/src/classRegistry.ts +1 -1
- package/src/global.d.ts +6 -1
- package/src/layer/cesium/clusterContext.ts +1 -1
- package/src/layer/cesium/vectorCesiumImpl.ts +2 -2
- package/src/layer/cesium/vectorContext.ts +124 -18
- package/src/layer/tileLoadedHelper.ts +1 -3
- package/src/layer/vectorLayer.ts +1 -3
- package/src/layer/vectorProperties.ts +27 -2
- package/src/ol/geom/geometryCollection.js +82 -13
- package/src/util/clipping/clippingObject.ts +1 -3
- package/src/util/featureconverter/pointHelpers.ts +4 -4
- package/src/util/featureconverter/vectorHeightInfo.ts +2 -3
- package/src/util/geometryHelpers.ts +111 -90
- package/src/vcsApp.ts +11 -4
|
@@ -272,104 +272,125 @@ export async function from2Dto3DLayout(
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
function setZCoordinate(geometry: Geometry, z: number): void {
|
|
276
|
+
const layout = geometry.getLayout();
|
|
277
|
+
const coordinates = geometry.getCoordinates() as any[];
|
|
278
|
+
const flatCoordinates = getFlatCoordinateReferences(geometry, coordinates);
|
|
279
|
+
|
|
280
|
+
flatCoordinates.forEach((c) => {
|
|
281
|
+
if (layout === 'XYM') {
|
|
282
|
+
c[3] = c[2];
|
|
283
|
+
c[2] = z;
|
|
284
|
+
} else {
|
|
285
|
+
c[2] = z;
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
geometry.setCoordinates(
|
|
290
|
+
coordinates,
|
|
291
|
+
layout === 'XYM' || layout === 'XYZM' ? 'XYZM' : 'XYZ',
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export async function createAbsoluteFeature(
|
|
296
|
+
feature: Feature,
|
|
277
297
|
vectorProperties: VectorProperties,
|
|
278
298
|
scene: Scene,
|
|
279
|
-
): Promise<Feature
|
|
280
|
-
const
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
return null;
|
|
286
|
-
}
|
|
299
|
+
): Promise<Feature | null> {
|
|
300
|
+
const clone = feature.clone();
|
|
301
|
+
const geometry = clone.getGeometry();
|
|
302
|
+
if (!geometry) {
|
|
303
|
+
return null;
|
|
304
|
+
}
|
|
287
305
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
if (is2DLayout(geometry.getLayout())) {
|
|
291
|
-
await from2Dto3DLayout(
|
|
292
|
-
geometry,
|
|
293
|
-
scene,
|
|
294
|
-
HeightReference.CLAMP_TO_GROUND,
|
|
295
|
-
);
|
|
296
|
-
}
|
|
297
|
-
} else if (isClampedHeightReference(altitudeMode)) {
|
|
298
|
-
await placeGeometryOnGround(
|
|
299
|
-
geometry,
|
|
300
|
-
scene,
|
|
301
|
-
altitudeMode !== HeightReference.CLAMP_TO_TERRAIN
|
|
302
|
-
? HeightReference.CLAMP_TO_GROUND
|
|
303
|
-
: HeightReference.CLAMP_TO_TERRAIN,
|
|
304
|
-
);
|
|
305
|
-
} else if (isRelativeHeightReference(altitudeMode)) {
|
|
306
|
-
const singleGeometries = getSingleGeometriesFromGeometry(geometry);
|
|
307
|
-
await Promise.all(
|
|
308
|
-
singleGeometries.map(async (singleGeometry) => {
|
|
309
|
-
const heightInfo = getHeightInfo(
|
|
310
|
-
feature,
|
|
311
|
-
singleGeometry,
|
|
312
|
-
vectorProperties,
|
|
313
|
-
) as VectorHeightInfo<RelativeHeightReference>;
|
|
306
|
+
const altitudeMode = vectorProperties.getAltitudeMode(clone);
|
|
307
|
+
let groundLevel = vectorProperties.getGroundLevel(clone);
|
|
314
308
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
309
|
+
if (altitudeMode === HeightReference.NONE) {
|
|
310
|
+
if (groundLevel != null) {
|
|
311
|
+
setZCoordinate(geometry, groundLevel);
|
|
312
|
+
} else if (is2DLayout(geometry.getLayout())) {
|
|
313
|
+
await from2Dto3DLayout(geometry, scene, HeightReference.CLAMP_TO_GROUND);
|
|
314
|
+
}
|
|
315
|
+
} else if (isClampedHeightReference(altitudeMode)) {
|
|
316
|
+
if (groundLevel != null) {
|
|
317
|
+
setZCoordinate(geometry, groundLevel);
|
|
318
|
+
} else {
|
|
319
|
+
await placeGeometryOnGround(
|
|
320
|
+
geometry,
|
|
321
|
+
scene,
|
|
322
|
+
altitudeMode !== HeightReference.CLAMP_TO_TERRAIN
|
|
323
|
+
? HeightReference.CLAMP_TO_GROUND
|
|
324
|
+
: HeightReference.CLAMP_TO_TERRAIN,
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
} else if (isRelativeHeightReference(altitudeMode)) {
|
|
328
|
+
const singleGeometries = getSingleGeometriesFromGeometry(geometry);
|
|
329
|
+
await Promise.all(
|
|
330
|
+
singleGeometries.map(async (singleGeometry) => {
|
|
331
|
+
const heightInfo = getHeightInfo(
|
|
332
|
+
clone,
|
|
333
|
+
singleGeometry,
|
|
334
|
+
vectorProperties,
|
|
335
|
+
) as VectorHeightInfo<RelativeHeightReference>;
|
|
333
336
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
337
|
+
({ groundLevel } = heightInfo);
|
|
338
|
+
if (heightInfo.clampOrigin) {
|
|
339
|
+
const cartographics = [
|
|
340
|
+
mercatorToCartographic(heightInfo.clampOrigin),
|
|
341
|
+
];
|
|
342
|
+
if (
|
|
343
|
+
heightInfo.heightReference === HeightReference.RELATIVE_TO_TERRAIN
|
|
344
|
+
) {
|
|
345
|
+
await sampleTerrainMostDetailed(
|
|
346
|
+
scene.terrainProvider,
|
|
347
|
+
cartographics,
|
|
338
348
|
);
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
singleGeometry.setCoordinates(coordinates, 'XYZ');
|
|
350
|
-
}),
|
|
349
|
+
} else {
|
|
350
|
+
await scene.sampleHeightMostDetailed(cartographics);
|
|
351
|
+
}
|
|
352
|
+
groundLevel = cartographics[0].height;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
const coordinates = singleGeometry.getCoordinates() as any[];
|
|
356
|
+
const flatCoordinates = getFlatCoordinateReferences(
|
|
357
|
+
singleGeometry,
|
|
358
|
+
coordinates,
|
|
351
359
|
);
|
|
360
|
+
const { heightAboveGround } = heightInfo;
|
|
361
|
+
const setCoordinate =
|
|
362
|
+
heightAboveGround == null
|
|
363
|
+
? (c: Coordinate): void => {
|
|
364
|
+
c[2] += groundLevel as number;
|
|
365
|
+
}
|
|
366
|
+
: (c: Coordinate): void => {
|
|
367
|
+
c[2] = (groundLevel as number) + heightAboveGround;
|
|
368
|
+
};
|
|
369
|
+
flatCoordinates.forEach(setCoordinate);
|
|
370
|
+
singleGeometry.setCoordinates(coordinates, 'XYZ');
|
|
371
|
+
}),
|
|
372
|
+
);
|
|
352
373
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
374
|
+
if (geometry instanceof MultiPoint) {
|
|
375
|
+
geometry.setCoordinates(
|
|
376
|
+
singleGeometries.map((g) => g.getCoordinates() as Coordinate),
|
|
377
|
+
);
|
|
378
|
+
} else if (geometry instanceof MultiPolygon) {
|
|
379
|
+
geometry.setCoordinates(
|
|
380
|
+
singleGeometries.map((g) => g.getCoordinates() as Coordinate[][]),
|
|
381
|
+
);
|
|
382
|
+
} else if (geometry instanceof MultiLineString) {
|
|
383
|
+
geometry.setCoordinates(
|
|
384
|
+
singleGeometries.map((g) => g.getCoordinates() as Coordinate[]),
|
|
385
|
+
);
|
|
386
|
+
} else if (geometry instanceof GeometryCollection) {
|
|
387
|
+
geometry.setGeometries(singleGeometries);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
369
390
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
);
|
|
391
|
+
clone.set('olcs_altitudeMode', 'absolute');
|
|
392
|
+
clone.unset('olcs_groundLevel');
|
|
393
|
+
clone.unset('olcs_heightAboveGround');
|
|
373
394
|
|
|
374
|
-
return
|
|
395
|
+
return clone;
|
|
375
396
|
}
|
package/src/vcsApp.ts
CHANGED
|
@@ -27,6 +27,7 @@ import { setDefaultProjectionOptions } from './util/projection.js';
|
|
|
27
27
|
import ObliqueMap from './map/obliqueMap.js';
|
|
28
28
|
import OverrideClassRegistry from './overrideClassRegistry.js';
|
|
29
29
|
import ClassRegistry, {
|
|
30
|
+
AbstractCtor,
|
|
30
31
|
categoryClassRegistry,
|
|
31
32
|
Ctor,
|
|
32
33
|
featureProviderClassRegistry,
|
|
@@ -117,7 +118,9 @@ class VcsApp {
|
|
|
117
118
|
|
|
118
119
|
private _flights: OverrideCollection<FlightInstance, FlightCollection>;
|
|
119
120
|
|
|
120
|
-
private _categoryClassRegistry: OverrideClassRegistry<
|
|
121
|
+
private _categoryClassRegistry: OverrideClassRegistry<
|
|
122
|
+
typeof Category<any, any>
|
|
123
|
+
>;
|
|
121
124
|
|
|
122
125
|
private _categories: CategoryCollection;
|
|
123
126
|
|
|
@@ -347,11 +350,13 @@ class VcsApp {
|
|
|
347
350
|
return this._styleClassRegistry;
|
|
348
351
|
}
|
|
349
352
|
|
|
350
|
-
get categoryClassRegistry(): OverrideClassRegistry<
|
|
353
|
+
get categoryClassRegistry(): OverrideClassRegistry<
|
|
354
|
+
typeof Category<any, any>
|
|
355
|
+
> {
|
|
351
356
|
return this._categoryClassRegistry;
|
|
352
357
|
}
|
|
353
358
|
|
|
354
|
-
get categoryItemClassRegistry(): OverrideClassRegistry<
|
|
359
|
+
get categoryItemClassRegistry(): OverrideClassRegistry<AbstractCtor> {
|
|
355
360
|
return this._categoryItemClassRegistry;
|
|
356
361
|
}
|
|
357
362
|
|
|
@@ -422,7 +427,7 @@ class VcsApp {
|
|
|
422
427
|
[...this._maps]
|
|
423
428
|
.filter((m) => m instanceof ObliqueMap)
|
|
424
429
|
.map((m) => {
|
|
425
|
-
return
|
|
430
|
+
return m.setCollection(startingObliqueCollection);
|
|
426
431
|
}),
|
|
427
432
|
);
|
|
428
433
|
}
|
|
@@ -623,5 +628,7 @@ export function getVcsAppById(id: string): VcsApp | undefined {
|
|
|
623
628
|
|
|
624
629
|
window.vcs = window.vcs || {};
|
|
625
630
|
window.vcs.apps = vcsApps;
|
|
631
|
+
window.vcs.createModuleFromConfig = (config: VcsModuleConfig): VcsModule =>
|
|
632
|
+
new VcsModule(config);
|
|
626
633
|
|
|
627
634
|
export default VcsApp;
|