@vcmap/core 5.3.3 → 6.0.0-rc.10
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/cesium.d.ts +12 -0
- package/dist/index.d.ts +27 -19
- package/dist/index.js +22 -14
- package/dist/index.js.map +1 -1
- package/dist/ol.d.ts +15 -2
- package/dist/src/category/category.d.ts +5 -4
- 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.d.ts +1 -0
- package/dist/src/cesium/cesiumVcsCameraPrimitive.js +4 -0
- package/dist/src/cesium/cesiumVcsCameraPrimitive.js.map +1 -1
- package/dist/src/classRegistry.d.ts +4 -3
- package/dist/src/classRegistry.js +2 -0
- 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.d.ts +4 -12
- package/dist/src/interaction/featureAtPixelInteraction.js +5 -21
- 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.d.ts +12 -16
- package/dist/src/layer/cesium/clusterContext.js +75 -43
- 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.d.ts +2 -3
- package/dist/src/layer/cesium/vectorCesiumImpl.js +16 -10
- package/dist/src/layer/cesium/vectorCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorContext.d.ts +11 -54
- package/dist/src/layer/cesium/vectorContext.js +154 -171
- 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 +4 -5
- package/dist/src/layer/featureVisibility.js.map +1 -1
- package/dist/src/layer/geojsonHelpers.d.ts +1 -1
- package/dist/src/layer/geojsonHelpers.js +5 -10
- 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 +9 -9
- package/dist/src/layer/oblique/obliqueHelpers.js.map +1 -1
- package/dist/src/layer/oblique/vectorObliqueImpl.d.ts +3 -3
- 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.d.ts +2 -2
- package/dist/src/layer/openlayers/vectorOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.d.ts +1 -7
- package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.js +18 -47
- 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.d.ts +0 -37
- package/dist/src/layer/vectorLayer.js +1 -3
- package/dist/src/layer/vectorLayer.js.map +1 -1
- package/dist/src/layer/vectorProperties.d.ts +10 -5
- package/dist/src/layer/vectorProperties.js +59 -10
- 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 +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 +5 -5
- package/dist/src/oblique/helpers.js.map +1 -1
- package/dist/src/oblique/obliqueCollection.js.map +1 -1
- package/dist/src/oblique/obliqueDataSet.js +5 -5
- 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 +80 -6
- 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.d.ts +2 -2
- package/dist/src/overrideClassRegistry.js +5 -3
- package/dist/src/overrideClassRegistry.js.map +1 -1
- package/dist/src/style/arcStyle.js +1 -0
- package/dist/src/style/arcStyle.js.map +1 -1
- package/dist/src/style/arrowStyle.js +6 -6
- 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 +4 -2
- package/dist/src/style/styleHelpers.js.map +1 -1
- package/dist/src/style/styleItem.js.map +1 -1
- package/dist/src/style/vectorStyleItem.js +9 -9
- 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 +2 -2
- 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.d.ts +1 -0
- package/dist/src/util/displayQuality/displayQuality.js +13 -2
- package/dist/src/util/displayQuality/displayQuality.js.map +1 -1
- package/dist/src/util/editor/createFeatureSession.d.ts +10 -2
- package/dist/src/util/editor/createFeatureSession.js +75 -9
- package/dist/src/util/editor/createFeatureSession.js.map +1 -1
- package/dist/src/util/editor/editFeaturesSession.d.ts +10 -4
- package/dist/src/util/editor/editFeaturesSession.js +74 -37
- package/dist/src/util/editor/editFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/editGeometrySession.d.ts +7 -2
- package/dist/src/util/editor/editGeometrySession.js +109 -66
- package/dist/src/util/editor/editGeometrySession.js.map +1 -1
- package/dist/src/util/editor/editorHelpers.d.ts +13 -6
- package/dist/src/util/editor/editorHelpers.js +53 -23
- package/dist/src/util/editor/editorHelpers.js.map +1 -1
- package/dist/src/util/editor/editorSessionHelpers.d.ts +6 -6
- package/dist/src/util/editor/editorSessionHelpers.js +8 -18
- package/dist/src/util/editor/editorSessionHelpers.js.map +1 -1
- package/dist/src/util/editor/editorSymbols.d.ts +1 -1
- package/dist/src/util/editor/editorSymbols.js +1 -1
- package/dist/src/util/editor/editorSymbols.js.map +1 -1
- package/dist/src/util/editor/interactions/createBBoxInteraction.d.ts +1 -0
- package/dist/src/util/editor/interactions/createBBoxInteraction.js +20 -16
- package/dist/src/util/editor/interactions/createBBoxInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createCircleInteraction.js +1 -1
- package/dist/src/util/editor/interactions/createCircleInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createLineStringInteraction.js +3 -3
- package/dist/src/util/editor/interactions/createLineStringInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createPointInteraction.js +1 -1
- package/dist/src/util/editor/interactions/createPointInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createPolygonInteraction.d.ts +4 -0
- package/dist/src/util/editor/interactions/createPolygonInteraction.js +9 -3
- package/dist/src/util/editor/interactions/createPolygonInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/creationSnapping.d.ts +26 -0
- package/dist/src/util/editor/interactions/creationSnapping.js +139 -0
- package/dist/src/util/editor/interactions/creationSnapping.js.map +1 -0
- package/dist/src/util/editor/interactions/editFeaturesMouseOverInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.js +11 -9
- 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.d.ts +3 -1
- package/dist/src/util/editor/interactions/insertVertexInteraction.js +14 -6
- package/dist/src/util/editor/interactions/insertVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/layerSnapping.d.ts +19 -0
- package/dist/src/util/editor/interactions/layerSnapping.js +87 -0
- package/dist/src/util/editor/interactions/layerSnapping.js.map +1 -0
- package/dist/src/util/editor/interactions/mapInteractionController.js.map +1 -1
- package/dist/src/util/editor/interactions/removeVertexInteraction.d.ts +1 -1
- package/dist/src/util/editor/interactions/removeVertexInteraction.js +2 -2
- package/dist/src/util/editor/interactions/removeVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/segmentLengthInteraction.d.ts +16 -0
- package/dist/src/util/editor/interactions/segmentLengthInteraction.js +167 -0
- package/dist/src/util/editor/interactions/segmentLengthInteraction.js.map +1 -0
- 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 +4 -8
- package/dist/src/util/editor/interactions/translateVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/translationSnapping.d.ts +25 -0
- package/dist/src/util/editor/interactions/translationSnapping.js +180 -0
- package/dist/src/util/editor/interactions/translationSnapping.js.map +1 -0
- package/dist/src/util/editor/selectFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/snappingHelpers.d.ts +44 -0
- package/dist/src/util/editor/snappingHelpers.js +329 -0
- package/dist/src/util/editor/snappingHelpers.js.map +1 -0
- package/dist/src/util/editor/transformation/create2DHandlers.js +26 -26
- package/dist/src/util/editor/transformation/create2DHandlers.js.map +1 -1
- package/dist/src/util/editor/transformation/create3DHandlers.js +65 -14
- 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 +27 -5
- package/dist/src/util/editor/transformation/scaleInteraction.js.map +1 -1
- package/dist/src/util/editor/transformation/transformationHandler.js +56 -38
- package/dist/src/util/editor/transformation/transformationHandler.js.map +1 -1
- package/dist/src/util/editor/transformation/transformationTypes.d.ts +2 -0
- package/dist/src/util/editor/transformation/transformationTypes.js +6 -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/arcToCesium.d.ts +5 -19
- package/dist/src/util/featureconverter/arcToCesium.js +15 -42
- package/dist/src/util/featureconverter/arcToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/circleToCesium.d.ts +2 -27
- package/dist/src/util/featureconverter/circleToCesium.js +85 -64
- package/dist/src/util/featureconverter/circleToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/clampedPrimitive.d.ts +2 -0
- package/dist/src/util/featureconverter/clampedPrimitive.js +29 -0
- package/dist/src/util/featureconverter/clampedPrimitive.js.map +1 -0
- package/dist/src/util/featureconverter/convert.d.ts +30 -7
- package/dist/src/util/featureconverter/convert.js +221 -44
- package/dist/src/util/featureconverter/convert.js.map +1 -1
- package/dist/src/util/featureconverter/extent3D.d.ts +4 -3
- package/dist/src/util/featureconverter/extent3D.js +4 -3
- package/dist/src/util/featureconverter/extent3D.js.map +1 -1
- package/dist/src/util/featureconverter/lineStringToCesium.d.ts +12 -27
- package/dist/src/util/featureconverter/lineStringToCesium.js +85 -107
- package/dist/src/util/featureconverter/lineStringToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/pointHelpers.d.ts +8 -11
- package/dist/src/util/featureconverter/pointHelpers.js +141 -121
- package/dist/src/util/featureconverter/pointHelpers.js.map +1 -1
- package/dist/src/util/featureconverter/pointToCesium.d.ts +14 -17
- package/dist/src/util/featureconverter/pointToCesium.js +50 -98
- package/dist/src/util/featureconverter/pointToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/polygonToCesium.d.ts +2 -26
- package/dist/src/util/featureconverter/polygonToCesium.js +63 -73
- package/dist/src/util/featureconverter/polygonToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/storeyHelpers.d.ts +17 -0
- package/dist/src/util/featureconverter/storeyHelpers.js +78 -0
- package/dist/src/util/featureconverter/storeyHelpers.js.map +1 -0
- package/dist/src/util/featureconverter/vectorGeometryFactory.d.ts +54 -0
- package/dist/src/util/featureconverter/vectorGeometryFactory.js +278 -0
- package/dist/src/util/featureconverter/vectorGeometryFactory.js.map +1 -0
- package/dist/src/util/featureconverter/vectorHeightInfo.d.ts +86 -0
- package/dist/src/util/featureconverter/vectorHeightInfo.js +240 -0
- package/dist/src/util/featureconverter/vectorHeightInfo.js.map +1 -0
- 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.d.ts +11 -6
- package/dist/src/util/flight/flightPlayer.js +52 -16
- 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 +34 -2
- package/dist/src/util/geometryHelpers.js +172 -4
- package/dist/src/util/geometryHelpers.js.map +1 -1
- package/dist/src/util/hiddenObjects.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.d.ts +18 -2
- package/dist/src/util/math.js +55 -12
- package/dist/src/util/math.js.map +1 -1
- package/dist/src/util/overrideCollection.d.ts +7 -7
- package/dist/src/util/overrideCollection.js +10 -7
- 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.d.ts +1 -0
- package/dist/src/vcsModuleHelpers.js +16 -2
- package/dist/src/vcsModuleHelpers.js.map +1 -1
- package/dist/src/vcsObject.js.map +1 -1
- package/dist/tests/unit/helpers/cesiumHelpers.d.ts +11 -11
- package/dist/tests/unit/helpers/cesiumHelpers.js +6 -1
- package/dist/tests/unit/helpers/cesiumHelpers.js.map +1 -1
- package/dist/tests/unit/helpers/helpers.d.ts +2 -9
- package/dist/tests/unit/helpers/helpers.js +4 -10
- package/dist/tests/unit/helpers/helpers.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 +84 -36
- package/package.json +21 -21
- package/src/category/category.ts +11 -9
- package/src/category/categoryCollection.ts +1 -1
- package/src/cesium/cesium.d.ts +12 -0
- package/src/cesium/cesiumVcsCameraPrimitive.ts +5 -0
- package/src/classRegistry.ts +7 -4
- package/src/featureProvider/wmsFeatureProvider.ts +1 -1
- package/src/global.d.ts +6 -1
- package/src/interaction/featureAtPixelInteraction.ts +7 -26
- package/src/layer/cesium/clusterContext.ts +97 -93
- package/src/layer/cesium/vectorCesiumImpl.ts +17 -11
- package/src/layer/cesium/vectorContext.ts +229 -348
- package/src/layer/featureVisibility.ts +3 -6
- package/src/layer/geojsonHelpers.ts +9 -12
- package/src/layer/oblique/obliqueHelpers.ts +9 -9
- package/src/layer/oblique/vectorObliqueImpl.ts +2 -2
- package/src/layer/openlayers/vectorOpenlayersImpl.ts +2 -2
- package/src/layer/openlayers/vectorTileOpenlayersImpl.ts +23 -53
- package/src/layer/tileLoadedHelper.ts +1 -3
- package/src/layer/tileProvider/mvtTileProvider.ts +2 -2
- package/src/layer/vectorLayer.ts +1 -74
- package/src/layer/vectorProperties.ts +80 -16
- package/src/map/baseOLMap.ts +1 -1
- package/src/oblique/helpers.ts +11 -5
- package/src/oblique/obliqueDataSet.ts +4 -4
- package/src/ol/geom/geometryCollection.js +96 -6
- package/src/ol/ol.d.ts +15 -2
- package/src/overrideClassRegistry.ts +13 -7
- package/src/style/arcStyle.ts +1 -0
- package/src/style/arrowStyle.ts +7 -7
- package/src/style/declarativeStyleItem.ts +2 -2
- package/src/style/styleHelpers.ts +15 -13
- package/src/style/vectorStyleItem.ts +14 -14
- package/src/util/clipping/clippingObject.ts +1 -3
- package/src/util/clipping/clippingPlaneHelper.ts +3 -4
- package/src/util/displayQuality/displayQuality.ts +13 -1
- package/src/util/editor/createFeatureSession.ts +107 -13
- package/src/util/editor/editFeaturesSession.ts +105 -39
- package/src/util/editor/editGeometrySession.ts +157 -83
- package/src/util/editor/editorHelpers.ts +85 -33
- package/src/util/editor/editorSessionHelpers.ts +13 -20
- package/src/util/editor/editorSymbols.ts +1 -1
- package/src/util/editor/interactions/createBBoxInteraction.ts +25 -16
- package/src/util/editor/interactions/createCircleInteraction.ts +1 -1
- package/src/util/editor/interactions/createLineStringInteraction.ts +9 -3
- package/src/util/editor/interactions/createPointInteraction.ts +1 -1
- package/src/util/editor/interactions/createPolygonInteraction.ts +16 -3
- package/src/util/editor/interactions/creationSnapping.ts +226 -0
- package/src/util/editor/interactions/editGeometryMouseOverInteraction.ts +7 -6
- package/src/util/editor/interactions/insertVertexInteraction.ts +27 -7
- package/src/util/editor/interactions/layerSnapping.ts +136 -0
- package/src/util/editor/interactions/removeVertexInteraction.ts +3 -4
- package/src/util/editor/interactions/segmentLengthInteraction.ts +227 -0
- package/src/util/editor/interactions/translateVertexInteraction.ts +11 -12
- package/src/util/editor/interactions/translationSnapping.ts +302 -0
- package/src/util/editor/snappingHelpers.ts +490 -0
- package/src/util/editor/transformation/create2DHandlers.ts +38 -26
- package/src/util/editor/transformation/create3DHandlers.ts +84 -22
- package/src/util/editor/transformation/scaleInteraction.ts +28 -5
- package/src/util/editor/transformation/transformationHandler.ts +72 -41
- package/src/util/editor/transformation/transformationTypes.ts +5 -0
- package/src/util/featureconverter/arcToCesium.ts +25 -95
- package/src/util/featureconverter/circleToCesium.ts +128 -114
- package/src/util/featureconverter/clampedPrimitive.ts +70 -0
- package/src/util/featureconverter/convert.ts +447 -113
- package/src/util/featureconverter/extent3D.ts +13 -6
- package/src/util/featureconverter/lineStringToCesium.ts +134 -181
- package/src/util/featureconverter/pointHelpers.ts +285 -219
- package/src/util/featureconverter/pointToCesium.ts +117 -177
- package/src/util/featureconverter/polygonToCesium.ts +99 -118
- package/src/util/featureconverter/storeyHelpers.ts +104 -0
- package/src/util/featureconverter/vectorGeometryFactory.ts +601 -0
- package/src/util/featureconverter/vectorHeightInfo.ts +392 -0
- package/src/util/flight/flightPlayer.ts +64 -22
- package/src/util/geometryHelpers.ts +239 -9
- package/src/util/hiddenObjects.ts +4 -4
- package/src/util/math.ts +87 -12
- package/src/util/overrideCollection.ts +33 -21
- package/src/vcsApp.ts +11 -4
- package/src/vcsModuleHelpers.ts +25 -2
- package/dist/src/util/featureconverter/featureconverterHelper.d.ts +0 -35
- package/dist/src/util/featureconverter/featureconverterHelper.js +0 -403
- package/dist/src/util/featureconverter/featureconverterHelper.js.map +0 -1
- package/src/util/featureconverter/featureconverterHelper.ts +0 -668
|
@@ -5,7 +5,7 @@ import { check } from '@vcsuite/check';
|
|
|
5
5
|
* @returns {Array<import("ol/coordinate").Coordinate|Array<import("ol/coordinate").Coordinate>|Array<Array<import("ol/coordinate").Coordinate>>|Array<Array<Array<import("ol/coordinate").Coordinate>>>>}
|
|
6
6
|
*/
|
|
7
7
|
GeometryCollection.prototype.getCoordinates = function getCoordinates() {
|
|
8
|
-
return this.
|
|
8
|
+
return this.getGeometriesArray().map((g) => g.getCoordinates());
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -27,13 +27,103 @@ GeometryCollection.prototype.setCoordinates = function setCoordinates(
|
|
|
27
27
|
);
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
/**
|
|
31
|
+
* @type {Record<import("ol/geom/Geometry").GeometryLayout, number>}
|
|
32
|
+
*/
|
|
33
|
+
const layoutScore = {
|
|
34
|
+
XY: 1,
|
|
35
|
+
XYM: 2,
|
|
36
|
+
XYZ: 3,
|
|
37
|
+
XYZM: 4,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @type {Record<import("ol/geom/Geometry").GeometryLayout, number>}
|
|
42
|
+
*/
|
|
43
|
+
const layoutStride = {
|
|
44
|
+
XY: 2,
|
|
45
|
+
XYM: 3,
|
|
46
|
+
XYZ: 3,
|
|
47
|
+
XYZM: 4,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @param {import("ol/geom/Geometry").GeometryLayout} layout
|
|
52
|
+
* @param {import("ol/geom/Geometry").GeometryLayout=} minLayout
|
|
53
|
+
* @returns { import("ol/geom/Geometry").GeometryLayout}
|
|
54
|
+
*/
|
|
55
|
+
function getMinLayout(layout, minLayout) {
|
|
56
|
+
if (!minLayout) {
|
|
57
|
+
return layout;
|
|
58
|
+
}
|
|
59
|
+
if (
|
|
60
|
+
(minLayout === 'XYM' && layout !== 'XYM') ||
|
|
61
|
+
(layout === 'XYM' && minLayout !== 'XYM')
|
|
62
|
+
) {
|
|
63
|
+
return 'XY';
|
|
64
|
+
}
|
|
65
|
+
const inScore = layoutScore[layout];
|
|
66
|
+
const minScore = layoutScore[minLayout];
|
|
67
|
+
if (inScore < minScore) {
|
|
68
|
+
return layout;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return minLayout;
|
|
72
|
+
}
|
|
73
|
+
|
|
30
74
|
/**
|
|
31
75
|
* @returns {import("ol/geom/Geometry").GeometryLayout}
|
|
32
76
|
*/
|
|
33
77
|
GeometryCollection.prototype.getLayout = function getLayout() {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
78
|
+
let maxCommonLayout;
|
|
79
|
+
this.getGeometriesArrayRecursive().forEach((geom) => {
|
|
80
|
+
maxCommonLayout = getMinLayout(geom.getLayout(), maxCommonLayout);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
return maxCommonLayout ?? 'XY';
|
|
39
84
|
};
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @returns {number}
|
|
88
|
+
*/
|
|
89
|
+
GeometryCollection.prototype.getStride = function getStride() {
|
|
90
|
+
const layout = this.getLayout();
|
|
91
|
+
return layoutStride[layout];
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @returns {number[]}
|
|
96
|
+
*/
|
|
97
|
+
GeometryCollection.prototype.getFlatCoordinates =
|
|
98
|
+
function getFlatCoordinates() {
|
|
99
|
+
const commonStride = this.getStride();
|
|
100
|
+
const flatCoordinates = [];
|
|
101
|
+
this.getGeometriesArrayRecursive().forEach((geom) => {
|
|
102
|
+
const geometryStride = geom.getStride();
|
|
103
|
+
const geometryFlatCoordinates = geom.getFlatCoordinates();
|
|
104
|
+
if (geometryStride === commonStride) {
|
|
105
|
+
flatCoordinates.push(geometryFlatCoordinates);
|
|
106
|
+
} else if (geometryStride > commonStride) {
|
|
107
|
+
const geometryCoordinateLength = geometryFlatCoordinates.length;
|
|
108
|
+
const numberOfCoordinates = Math.round(
|
|
109
|
+
geometryCoordinateLength / geometryStride,
|
|
110
|
+
);
|
|
111
|
+
const slicedGeometryCoordinates = new Array(
|
|
112
|
+
numberOfCoordinates * commonStride,
|
|
113
|
+
);
|
|
114
|
+
for (let i = 0; i < geometryCoordinateLength; i += geometryStride) {
|
|
115
|
+
for (let j = 0; j < commonStride; j++) {
|
|
116
|
+
const slicedGeometryCoordinateOffset = Math.round(
|
|
117
|
+
(i / geometryStride) * commonStride,
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
slicedGeometryCoordinates[slicedGeometryCoordinateOffset + j] =
|
|
121
|
+
geometryFlatCoordinates[i + j];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
flatCoordinates.push(slicedGeometryCoordinates);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
return [].concat(...flatCoordinates);
|
|
129
|
+
};
|
package/src/ol/ol.d.ts
CHANGED
|
@@ -41,12 +41,17 @@ import {
|
|
|
41
41
|
fvLastUpdated,
|
|
42
42
|
globalHiderLastUpdated,
|
|
43
43
|
} from '../layer/vectorHelpers.js';
|
|
44
|
+
import { validityPlaceholder } from '../util/editor/interactions/createPolygonInteraction.js';
|
|
44
45
|
|
|
45
46
|
declare module 'ol/geom.js' {
|
|
46
47
|
interface Geometry {
|
|
47
48
|
getCoordinates(): any;
|
|
48
|
-
setCoordinates(
|
|
49
|
+
setCoordinates(
|
|
50
|
+
coordinates: any,
|
|
51
|
+
layout?: import('ol/geom/Geometry.js').GeometryLayout,
|
|
52
|
+
): void;
|
|
49
53
|
getFlatCoordinates(): number[];
|
|
54
|
+
getStride(): number;
|
|
50
55
|
getLayout(): import('ol/geom/Geometry.js').GeometryLayout;
|
|
51
56
|
[alreadyTransformedToMercator]?: boolean;
|
|
52
57
|
[actuallyIsCircle]?: boolean;
|
|
@@ -67,15 +72,23 @@ declare module 'ol/geom.js' {
|
|
|
67
72
|
| Array<Array<import('ol/coordinate.js').Coordinate>>
|
|
68
73
|
| Array<Array<Array<import('ol/coordinate.js').Coordinate>>>
|
|
69
74
|
>,
|
|
75
|
+
layout?: import('ol/geom/Geometry.js').GeometryLayout,
|
|
70
76
|
): void;
|
|
71
77
|
getLayout(): import('ol/geom/Geometry.js').GeometryLayout;
|
|
72
78
|
}
|
|
73
79
|
|
|
74
80
|
interface Circle {
|
|
75
81
|
getCoordinates(): import('ol/coordinate.js').Coordinate[];
|
|
76
|
-
setCoordinates(
|
|
82
|
+
setCoordinates(
|
|
83
|
+
coordinates: import('ol/coordinate.js').Coordinate[],
|
|
84
|
+
layout?: import('ol/geom/Geometry.js').GeometryLayout,
|
|
85
|
+
): void;
|
|
77
86
|
rotate(angle: number, anchor: import('ol/coordinate.js').Coordinate): void;
|
|
78
87
|
}
|
|
88
|
+
|
|
89
|
+
interface Polygon {
|
|
90
|
+
[validityPlaceholder]?: boolean;
|
|
91
|
+
}
|
|
79
92
|
}
|
|
80
93
|
|
|
81
94
|
declare module 'ol/index.js' {
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { check } from '@vcsuite/check';
|
|
2
2
|
import { getLogger, type Logger } from '@vcsuite/logger';
|
|
3
3
|
import VcsEvent from './vcsEvent.js';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import {
|
|
5
|
+
// eslint-disable-next-line import/no-named-default
|
|
6
|
+
default as ClassRegistry,
|
|
7
|
+
Ctor,
|
|
8
|
+
AbstractCtor,
|
|
9
|
+
} from './classRegistry.js';
|
|
6
10
|
|
|
7
11
|
function logger(): Logger {
|
|
8
12
|
return getLogger('OverrideClassRegistry');
|
|
9
13
|
}
|
|
10
14
|
|
|
11
|
-
type ModuleEntry<T extends
|
|
15
|
+
type ModuleEntry<T extends AbstractCtor> = { moduleId: string; ctor: Ctor<T> };
|
|
12
16
|
|
|
13
|
-
class OverrideClassRegistry<T extends
|
|
17
|
+
class OverrideClassRegistry<T extends AbstractCtor> {
|
|
14
18
|
private _coreClassRegistry: ClassRegistry<T>;
|
|
15
19
|
|
|
16
20
|
private _classMap: Map<string, ModuleEntry<T>> = new Map();
|
|
@@ -142,12 +146,13 @@ class OverrideClassRegistry<T extends Ctor<T>> {
|
|
|
142
146
|
create(className: string, ...args: unknown[]): InstanceType<T> | undefined {
|
|
143
147
|
check(className, String);
|
|
144
148
|
|
|
145
|
-
const
|
|
146
|
-
if (!
|
|
149
|
+
const Constructor = this.getClass(className);
|
|
150
|
+
if (!Constructor) {
|
|
147
151
|
logger().error(`could not find constructor ${className}`);
|
|
148
152
|
return undefined;
|
|
149
153
|
}
|
|
150
|
-
|
|
154
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
155
|
+
return new Constructor(...args);
|
|
151
156
|
}
|
|
152
157
|
|
|
153
158
|
/**
|
|
@@ -161,6 +166,7 @@ class OverrideClassRegistry<T extends Ctor<T>> {
|
|
|
161
166
|
): InstanceType<T> | undefined {
|
|
162
167
|
check(options, { type: String });
|
|
163
168
|
|
|
169
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
164
170
|
return this.create(options.type as string, options, ...args);
|
|
165
171
|
}
|
|
166
172
|
|
package/src/style/arcStyle.ts
CHANGED
package/src/style/arrowStyle.ts
CHANGED
|
@@ -189,22 +189,22 @@ class ArrowStyle extends Style {
|
|
|
189
189
|
* Same as getStroke().getWidth() / getStroke().setWidth()
|
|
190
190
|
*/
|
|
191
191
|
get width(): number | undefined {
|
|
192
|
-
return this.getStroke()
|
|
192
|
+
return this.getStroke()?.getWidth();
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
set width(width: number | undefined) {
|
|
196
|
-
this.getStroke()
|
|
196
|
+
this.getStroke()?.setWidth(width);
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
/**
|
|
200
200
|
* The color of the stroke and icon styles. Setting the color will not re-apply the icons color.
|
|
201
201
|
*/
|
|
202
202
|
get color(): ColorType {
|
|
203
|
-
return this.getStroke()
|
|
203
|
+
return this.getStroke()?.getColor() ?? [255, 255, 255, 1];
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
set color(color: ColorType) {
|
|
207
|
-
this.getStroke()
|
|
207
|
+
this.getStroke()?.setColor(color);
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
private _drawArrow(
|
|
@@ -214,7 +214,7 @@ class ArrowStyle extends Style {
|
|
|
214
214
|
pixelRatio: number,
|
|
215
215
|
): void {
|
|
216
216
|
ctx.save();
|
|
217
|
-
let scale = this.getImage()
|
|
217
|
+
let scale = this.getImage()?.getScale() ?? 1;
|
|
218
218
|
scale = Array.isArray(scale) ? scale : [scale, scale];
|
|
219
219
|
ctx.setTransform(
|
|
220
220
|
scale[0],
|
|
@@ -225,7 +225,7 @@ class ArrowStyle extends Style {
|
|
|
225
225
|
imagePosition[1],
|
|
226
226
|
);
|
|
227
227
|
ctx.rotate(Math.PI - rotation);
|
|
228
|
-
const image = this.getImage()
|
|
228
|
+
const image = this.getImage()!.getImage(pixelRatio);
|
|
229
229
|
ctx.translate(0, Math.floor(image.height / 2));
|
|
230
230
|
ctx.drawImage(image, -image.width / 2, -image.height / 2);
|
|
231
231
|
ctx.restore();
|
|
@@ -290,7 +290,7 @@ class ArrowStyle extends Style {
|
|
|
290
290
|
return {
|
|
291
291
|
color: this.color,
|
|
292
292
|
width: this.width,
|
|
293
|
-
arrowIcon: this.getImage()
|
|
293
|
+
arrowIcon: this.getImage()!.clone(),
|
|
294
294
|
zIndex: this.getZIndex(),
|
|
295
295
|
};
|
|
296
296
|
}
|
|
@@ -276,7 +276,7 @@ class DeclarativeStyleItem extends StyleItem {
|
|
|
276
276
|
scratchColor,
|
|
277
277
|
);
|
|
278
278
|
if (textColor) {
|
|
279
|
-
textStyle.getFill()
|
|
279
|
+
textStyle.getFill()!.setColor(cesiumColorToColor(textColor));
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
if (this.cesiumStyle.labelOutlineColor) {
|
|
@@ -364,7 +364,7 @@ class DeclarativeStyleItem extends StyleItem {
|
|
|
364
364
|
if (this.cesiumStyle.scale && style.getImage()) {
|
|
365
365
|
const scale = this.cesiumStyle.scale.evaluate<number>(feature);
|
|
366
366
|
if (scale && Number.isFinite(scale)) {
|
|
367
|
-
style.getImage()
|
|
367
|
+
style.getImage()!.setScale(scale);
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
|
|
@@ -401,8 +401,8 @@ export function getStrokeOptions(stroke: Stroke): StrokeOptions {
|
|
|
401
401
|
export function getTextOptions(text: OLText): VectorStyleItemText {
|
|
402
402
|
return {
|
|
403
403
|
font: text.getFont(),
|
|
404
|
-
fill: text.getFill() ? getFillOptions(text.getFill()) : undefined,
|
|
405
|
-
stroke: text.getStroke() ? getStrokeOptions(text.getStroke()) : undefined,
|
|
404
|
+
fill: text.getFill() ? getFillOptions(text.getFill()!) : undefined,
|
|
405
|
+
stroke: text.getStroke() ? getStrokeOptions(text.getStroke()!) : undefined,
|
|
406
406
|
textBaseline: text.getTextBaseline(),
|
|
407
407
|
offsetY: text.getOffsetY(),
|
|
408
408
|
offsetX: text.getOffsetX(),
|
|
@@ -469,13 +469,13 @@ export function getImageStyleOptions(image: ImageStyle): ImageStyleOptions {
|
|
|
469
469
|
scale: image.getScale(),
|
|
470
470
|
};
|
|
471
471
|
if (image.getFill()) {
|
|
472
|
-
options.fill = getFillOptions(image.getFill());
|
|
472
|
+
options.fill = getFillOptions(image.getFill()!);
|
|
473
473
|
}
|
|
474
474
|
if (image.getRadius() != null) {
|
|
475
475
|
options.radius = image.getRadius();
|
|
476
476
|
}
|
|
477
477
|
if (image.getStroke()) {
|
|
478
|
-
options.stroke = getStrokeOptions(image.getStroke());
|
|
478
|
+
options.stroke = getStrokeOptions(image.getStroke()!);
|
|
479
479
|
}
|
|
480
480
|
return options;
|
|
481
481
|
} else if (image instanceof RegularShape) {
|
|
@@ -483,7 +483,7 @@ export function getImageStyleOptions(image: ImageStyle): ImageStyleOptions {
|
|
|
483
483
|
scale: image.getScale(),
|
|
484
484
|
};
|
|
485
485
|
if (image.getFill()) {
|
|
486
|
-
options.fill = getFillOptions(image.getFill());
|
|
486
|
+
options.fill = getFillOptions(image.getFill()!);
|
|
487
487
|
}
|
|
488
488
|
if (image.getPoints()) {
|
|
489
489
|
options.points = image.getPoints();
|
|
@@ -501,7 +501,7 @@ export function getImageStyleOptions(image: ImageStyle): ImageStyleOptions {
|
|
|
501
501
|
options.radius2 = image.getRadius2();
|
|
502
502
|
}
|
|
503
503
|
if (image.getStroke()) {
|
|
504
|
-
options.stroke = getStrokeOptions(image.getStroke());
|
|
504
|
+
options.stroke = getStrokeOptions(image.getStroke()!);
|
|
505
505
|
}
|
|
506
506
|
return options;
|
|
507
507
|
}
|
|
@@ -572,12 +572,14 @@ export function getStyleFromOptions(options: StyleOptions): Style {
|
|
|
572
572
|
|
|
573
573
|
export function getStyleOptions(style: Style): StyleOptions {
|
|
574
574
|
return {
|
|
575
|
-
fill: style.getFill() ? getFillOptions(style.getFill()) : undefined,
|
|
576
|
-
stroke: style.getStroke()
|
|
575
|
+
fill: style.getFill() ? getFillOptions(style.getFill()!) : undefined,
|
|
576
|
+
stroke: style.getStroke()
|
|
577
|
+
? getStrokeOptions(style.getStroke()!)
|
|
578
|
+
: undefined,
|
|
577
579
|
image: style.getImage()
|
|
578
|
-
? getImageStyleOptions(style.getImage())
|
|
580
|
+
? getImageStyleOptions(style.getImage()!)
|
|
579
581
|
: undefined,
|
|
580
|
-
text: style.getText() ? getTextOptions(style.getText()) : undefined,
|
|
582
|
+
text: style.getText() ? getTextOptions(style.getText()!) : undefined,
|
|
581
583
|
};
|
|
582
584
|
}
|
|
583
585
|
|
|
@@ -592,14 +594,14 @@ export function getCssStyleFromTextStyle(textStyle: OLText): {
|
|
|
592
594
|
color: undefined,
|
|
593
595
|
};
|
|
594
596
|
if (textStyle.getStroke()) {
|
|
595
|
-
let width = textStyle.getStroke()
|
|
597
|
+
let width = textStyle.getStroke()!.getWidth() as number;
|
|
596
598
|
width = width > 1 ? 1 : width;
|
|
597
|
-
const color = olColorToHex(parseColor(textStyle.getStroke()
|
|
599
|
+
const color = olColorToHex(parseColor(textStyle.getStroke()!.getColor()));
|
|
598
600
|
style.textShadow = `-${width}px ${width}px 0 ${color},${width}px ${width}px 0 ${color},${width}px -${width}px 0 ${color},-${width}px -${width}px 0 ${color}`;
|
|
599
601
|
}
|
|
600
602
|
if (textStyle.getFill()) {
|
|
601
603
|
style.color = olColorToHex(
|
|
602
|
-
parseColor(textStyle.getFill()
|
|
604
|
+
parseColor(textStyle.getFill()!.getColor() as ColorType),
|
|
603
605
|
);
|
|
604
606
|
}
|
|
605
607
|
return style;
|
|
@@ -261,7 +261,7 @@ class VectorStyleItem extends StyleItem {
|
|
|
261
261
|
options.image.radius = 5;
|
|
262
262
|
}
|
|
263
263
|
if ((options.image.fill as FillOptions)?.color) {
|
|
264
|
-
checkColor(options.image.fill as
|
|
264
|
+
checkColor(options.image.fill as { color: ColorType }); // XXX PatternDescriptor
|
|
265
265
|
}
|
|
266
266
|
if ((options.image.stroke as StrokeOptions)?.color) {
|
|
267
267
|
checkStroke(options.image.stroke as StrokeOptions);
|
|
@@ -418,10 +418,10 @@ class VectorStyleItem extends StyleItem {
|
|
|
418
418
|
set style(style: Style | StyleFunction) {
|
|
419
419
|
check(style, maybe(oneOf(Style, Function)));
|
|
420
420
|
if (style instanceof Style) {
|
|
421
|
-
this._stroke = style.getStroke();
|
|
422
|
-
this._fill = style.getFill();
|
|
423
|
-
this._text = style.getText();
|
|
424
|
-
this._image = style.getImage();
|
|
421
|
+
this._stroke = style.getStroke() ?? undefined;
|
|
422
|
+
this._fill = style.getFill() ?? undefined;
|
|
423
|
+
this._text = style.getText() ?? undefined;
|
|
424
|
+
this._image = style.getImage() ?? undefined;
|
|
425
425
|
} else {
|
|
426
426
|
this._stroke = undefined;
|
|
427
427
|
this._fill = undefined;
|
|
@@ -485,7 +485,7 @@ class VectorStyleItem extends StyleItem {
|
|
|
485
485
|
if (this._image instanceof Circle && this._image.getFill()) {
|
|
486
486
|
colorConditions.splice(1, 0, [
|
|
487
487
|
`\${olcs_geometryType}===${OlcsGeometryType.POINT}`,
|
|
488
|
-
getStringColor(this._image.getFill()
|
|
488
|
+
getStringColor(this._image.getFill()!.getColor() as OLColor),
|
|
489
489
|
]);
|
|
490
490
|
}
|
|
491
491
|
if (this.fillColor) {
|
|
@@ -538,13 +538,13 @@ class VectorStyleItem extends StyleItem {
|
|
|
538
538
|
const stroke = this._image.getStroke();
|
|
539
539
|
let size = this._image.getRadius() * 2;
|
|
540
540
|
if (stroke) {
|
|
541
|
-
if (this._image.getStroke()
|
|
541
|
+
if (this._image.getStroke()?.getColor()) {
|
|
542
542
|
pointOutlineColorConditions.splice(1, 1, [
|
|
543
543
|
'true',
|
|
544
|
-
getStringColor(this._image.getStroke()
|
|
544
|
+
getStringColor(this._image.getStroke()!.getColor()),
|
|
545
545
|
]);
|
|
546
546
|
}
|
|
547
|
-
const width = this._image.getStroke()
|
|
547
|
+
const width = this._image.getStroke()!.getWidth() as number;
|
|
548
548
|
pointOutlineWidthConditions.splice(1, 1, ['true', `${width}`]);
|
|
549
549
|
size -= width;
|
|
550
550
|
}
|
|
@@ -620,21 +620,21 @@ class VectorStyleItem extends StyleItem {
|
|
|
620
620
|
`'${String(this._text.getText())}'`,
|
|
621
621
|
]);
|
|
622
622
|
}
|
|
623
|
-
if (this._text.getFill()
|
|
623
|
+
if (this._text.getFill()?.getColor()) {
|
|
624
624
|
labelColorConditions.splice(1, 1, [
|
|
625
625
|
'true',
|
|
626
|
-
getStringColor(this._text.getFill()
|
|
626
|
+
getStringColor(this._text.getFill()!.getColor() as OLColor),
|
|
627
627
|
]);
|
|
628
628
|
}
|
|
629
629
|
|
|
630
|
-
if (this._text.getStroke()
|
|
630
|
+
if (this._text.getStroke()?.getColor()) {
|
|
631
631
|
labelOutlineColorConditions.splice(1, 1, [
|
|
632
632
|
'true',
|
|
633
|
-
getStringColor(this._text.getStroke()
|
|
633
|
+
getStringColor(this._text.getStroke()!.getColor()),
|
|
634
634
|
]);
|
|
635
635
|
labelOutlineWidthConditions.splice(1, 1, [
|
|
636
636
|
'true',
|
|
637
|
-
`${this._text.getStroke()
|
|
637
|
+
`${this._text.getStroke()!.getWidth() || 1.25}`,
|
|
638
638
|
]);
|
|
639
639
|
}
|
|
640
640
|
}
|
|
@@ -166,9 +166,7 @@ class ClippingObject {
|
|
|
166
166
|
if (layer.active) {
|
|
167
167
|
const visualisations = map.getVisualizationsForLayer(layer);
|
|
168
168
|
const tilesets = visualisations
|
|
169
|
-
?
|
|
170
|
-
(v) => v instanceof Cesium3DTileset,
|
|
171
|
-
) as Cesium3DTileset[])
|
|
169
|
+
? [...visualisations].filter((v) => v instanceof Cesium3DTileset)
|
|
172
170
|
: [];
|
|
173
171
|
|
|
174
172
|
if (tilesets.length > 0) {
|
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
type Camera,
|
|
14
14
|
} from '@vcmap-cesium/engine';
|
|
15
15
|
import type { Coordinate } from 'ol/coordinate.js';
|
|
16
|
-
import type { Geometry } from 'ol/geom.js';
|
|
17
16
|
import Feature from 'ol/Feature.js';
|
|
18
17
|
import LineString from 'ol/geom/LineString.js';
|
|
19
18
|
import { offset } from 'ol/sphere.js';
|
|
@@ -27,7 +26,7 @@ import Extent3D from '../featureconverter/extent3D.js';
|
|
|
27
26
|
import {
|
|
28
27
|
enforceEndingVertex,
|
|
29
28
|
enforceRightHand,
|
|
30
|
-
|
|
29
|
+
getFlatCoordinateReferences,
|
|
31
30
|
} from '../geometryHelpers.js';
|
|
32
31
|
import { mercatorToCartesian } from '../math.js';
|
|
33
32
|
|
|
@@ -162,7 +161,7 @@ export function createClippingPlaneCollection(
|
|
|
162
161
|
check(transformMatrix, optional(Matrix4));
|
|
163
162
|
|
|
164
163
|
const clippingPlanes = [];
|
|
165
|
-
const geometry = feature.getGeometry()
|
|
164
|
+
const geometry = feature.getGeometry()!;
|
|
166
165
|
const geometryType = geometry.getType();
|
|
167
166
|
|
|
168
167
|
if (geometryType === 'Point') {
|
|
@@ -174,7 +173,7 @@ export function createClippingPlaneCollection(
|
|
|
174
173
|
),
|
|
175
174
|
);
|
|
176
175
|
} else {
|
|
177
|
-
const coords =
|
|
176
|
+
const coords = getFlatCoordinateReferences(geometry);
|
|
178
177
|
if (
|
|
179
178
|
coords.length < 2 ||
|
|
180
179
|
(coords[0][0] === coords[1][0] && coords[0][1] === coords[1][1])
|
|
@@ -20,6 +20,7 @@ export type DisplayQualityViewModelOptions = {
|
|
|
20
20
|
fogScreenSpaceErrorFactor?: number;
|
|
21
21
|
resolutionScale?: number;
|
|
22
22
|
layerSSEFactor?: number;
|
|
23
|
+
msaa?: 1 | 2 | 4 | 8;
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
export type DisplayQualityLayerModel = {
|
|
@@ -55,6 +56,7 @@ class DisplayQuality {
|
|
|
55
56
|
fogScreenSpaceErrorFactor: 6,
|
|
56
57
|
resolutionScale: 0.9,
|
|
57
58
|
layerSSEFactor: 2,
|
|
59
|
+
msaa: 1,
|
|
58
60
|
},
|
|
59
61
|
medium: {
|
|
60
62
|
sse: 2.333,
|
|
@@ -64,6 +66,7 @@ class DisplayQuality {
|
|
|
64
66
|
fogScreenSpaceErrorFactor: 4,
|
|
65
67
|
resolutionScale: 1,
|
|
66
68
|
layerSSEFactor: 1.1,
|
|
69
|
+
msaa: 1,
|
|
67
70
|
},
|
|
68
71
|
high: {
|
|
69
72
|
sse: 4 / 3,
|
|
@@ -73,6 +76,7 @@ class DisplayQuality {
|
|
|
73
76
|
fogScreenSpaceErrorFactor: 0,
|
|
74
77
|
resolutionScale: 1,
|
|
75
78
|
layerSSEFactor: 0.5,
|
|
79
|
+
msaa: 4,
|
|
76
80
|
},
|
|
77
81
|
};
|
|
78
82
|
}
|
|
@@ -172,7 +176,12 @@ class DisplayQuality {
|
|
|
172
176
|
key,
|
|
173
177
|
Object.fromEntries(
|
|
174
178
|
Object.entries(value as Record<string, unknown>).filter(
|
|
175
|
-
([, v]) =>
|
|
179
|
+
([innerKey, v]) => {
|
|
180
|
+
if (innerKey === 'msaa') {
|
|
181
|
+
return ([1, 2, 4, 8] as Array<unknown>).includes(v);
|
|
182
|
+
}
|
|
183
|
+
return v != null;
|
|
184
|
+
},
|
|
176
185
|
),
|
|
177
186
|
),
|
|
178
187
|
];
|
|
@@ -245,6 +254,9 @@ class DisplayQuality {
|
|
|
245
254
|
viewer.scene.fog.density = this._viewModel.fogDensity!;
|
|
246
255
|
viewer.scene.fog.screenSpaceErrorFactor =
|
|
247
256
|
this._viewModel.fogScreenSpaceErrorFactor!;
|
|
257
|
+
if (this._viewModel.msaa) {
|
|
258
|
+
viewer.scene.msaaSamples = this._viewModel.msaa;
|
|
259
|
+
}
|
|
248
260
|
}
|
|
249
261
|
|
|
250
262
|
if (this._currentQualityLevel !== previousLevel) {
|