@vcmap/core 6.2.4 → 6.3.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cesium.d.ts +12 -0
- package/dist/index.d.ts +13 -3
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/ol.d.ts +13 -2
- package/dist/src/category/category.d.ts +1 -1
- package/dist/src/category/category.js +3 -4
- package/dist/src/category/category.js.map +1 -1
- package/dist/src/cesium/cesium3DTileFeature.d.ts +1 -0
- package/dist/src/cesium/cesium3DTileFeature.js +14 -3
- package/dist/src/cesium/cesium3DTileFeature.js.map +1 -1
- package/dist/src/cesium/cesium3DTilePointFeature.js +2 -1
- package/dist/src/cesium/cesium3DTilePointFeature.js.map +1 -1
- package/dist/src/classRegistry.d.ts +7 -1
- package/dist/src/classRegistry.js.map +1 -1
- package/dist/src/featureProvider/abstractAttributeProvider.d.ts +62 -0
- package/dist/src/featureProvider/abstractAttributeProvider.js +129 -0
- package/dist/src/featureProvider/abstractAttributeProvider.js.map +1 -0
- package/dist/src/featureProvider/abstractFeatureProvider.d.ts +10 -19
- package/dist/src/featureProvider/abstractFeatureProvider.js +10 -42
- package/dist/src/featureProvider/abstractFeatureProvider.js.map +1 -1
- package/dist/src/featureProvider/compositeFeatureProvider.d.ts +27 -0
- package/dist/src/featureProvider/compositeFeatureProvider.js +53 -0
- package/dist/src/featureProvider/compositeFeatureProvider.js.map +1 -0
- package/dist/src/featureProvider/csvAttributeProvider.d.ts +41 -0
- package/dist/src/featureProvider/csvAttributeProvider.js +126 -0
- package/dist/src/featureProvider/csvAttributeProvider.js.map +1 -0
- package/dist/src/featureProvider/featureProviderFactory.d.ts +3 -0
- package/dist/src/featureProvider/featureProviderFactory.js +17 -0
- package/dist/src/featureProvider/featureProviderFactory.js.map +1 -0
- package/dist/src/featureProvider/i3sAttributeProvider.d.ts +7 -0
- package/dist/src/featureProvider/i3sAttributeProvider.js +43 -0
- package/dist/src/featureProvider/i3sAttributeProvider.js.map +1 -0
- package/dist/src/featureProvider/jsonAttributeProvider.d.ts +26 -0
- package/dist/src/featureProvider/jsonAttributeProvider.js +73 -0
- package/dist/src/featureProvider/jsonAttributeProvider.js.map +1 -0
- package/dist/src/featureProvider/tileProviderFeatureProvider.d.ts +4 -6
- package/dist/src/featureProvider/tileProviderFeatureProvider.js +9 -11
- package/dist/src/featureProvider/tileProviderFeatureProvider.js.map +1 -1
- package/dist/src/featureProvider/urlIdAttributeProvider.d.ts +28 -0
- package/dist/src/featureProvider/urlIdAttributeProvider.js +50 -0
- package/dist/src/featureProvider/urlIdAttributeProvider.js.map +1 -0
- package/dist/src/featureProvider/wmsFeatureProvider.d.ts +13 -4
- package/dist/src/featureProvider/wmsFeatureProvider.js +19 -9
- package/dist/src/featureProvider/wmsFeatureProvider.js.map +1 -1
- package/dist/src/interaction/coordinateAtPixel.js +4 -6
- package/dist/src/interaction/coordinateAtPixel.js.map +1 -1
- package/dist/src/interaction/ensurePositionInteraction.d.ts +14 -0
- package/dist/src/interaction/ensurePositionInteraction.js +42 -0
- package/dist/src/interaction/ensurePositionInteraction.js.map +1 -0
- package/dist/src/interaction/eventHandler.d.ts +3 -0
- package/dist/src/interaction/eventHandler.js +10 -1
- package/dist/src/interaction/eventHandler.js.map +1 -1
- package/dist/src/interaction/featureAtPixelInteraction.d.ts +15 -3
- package/dist/src/interaction/featureAtPixelInteraction.js +70 -18
- package/dist/src/interaction/featureAtPixelInteraction.js.map +1 -1
- package/dist/src/interaction/featureProviderInteraction.js +42 -26
- package/dist/src/interaction/featureProviderInteraction.js.map +1 -1
- package/dist/src/interaction/panoramaImageSelection.js +2 -2
- package/dist/src/interaction/panoramaImageSelection.js.map +1 -1
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.d.ts +17 -9
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js +244 -165
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/i3sCesiumImpl.d.ts +33 -0
- package/dist/src/layer/cesium/i3sCesiumImpl.js +107 -0
- package/dist/src/layer/cesium/i3sCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesium/rasterLayerCesiumImpl.d.ts +3 -3
- package/dist/src/layer/cesium/rasterLayerCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/terrainCesiumImpl.d.ts +3 -3
- package/dist/src/layer/cesium/terrainCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.js +2 -1
- package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.js.map +1 -1
- package/dist/src/layer/cesium/vectorContext.js +1 -1
- package/dist/src/layer/cesium/vectorContext.js.map +1 -1
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js +7 -6
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorTileImageryProvider.js +2 -2
- package/dist/src/layer/cesium/vectorTileImageryProvider.js.map +1 -1
- package/dist/src/layer/cesiumTilesetLayer.d.ts +10 -1
- package/dist/src/layer/cesiumTilesetLayer.js +33 -8
- package/dist/src/layer/cesiumTilesetLayer.js.map +1 -1
- package/dist/src/layer/cogLayer.d.ts +1 -1
- package/dist/src/layer/cogLayer.js +3 -4
- package/dist/src/layer/cogLayer.js.map +1 -1
- package/dist/src/layer/czmlLayer.d.ts +1 -1
- package/dist/src/layer/czmlLayer.js +4 -4
- package/dist/src/layer/czmlLayer.js.map +1 -1
- package/dist/src/layer/featureLayer.d.ts +1 -6
- package/dist/src/layer/featureLayer.js +3 -10
- package/dist/src/layer/featureLayer.js.map +1 -1
- package/dist/src/layer/featureStoreLayer.d.ts +3 -2
- package/dist/src/layer/featureStoreLayer.js +5 -5
- package/dist/src/layer/featureStoreLayer.js.map +1 -1
- package/dist/src/layer/flatGeobufLayer.d.ts +2 -0
- package/dist/src/layer/flatGeobufLayer.js +8 -0
- package/dist/src/layer/flatGeobufLayer.js.map +1 -1
- package/dist/src/layer/geojsonLayer.d.ts +1 -1
- package/dist/src/layer/geojsonLayer.js +5 -12
- package/dist/src/layer/geojsonLayer.js.map +1 -1
- package/dist/src/layer/i3sLayer.d.ts +80 -0
- package/dist/src/layer/i3sLayer.js +242 -0
- package/dist/src/layer/i3sLayer.js.map +1 -0
- package/dist/src/layer/layer.d.ts +29 -10
- package/dist/src/layer/layer.js +114 -34
- package/dist/src/layer/layer.js.map +1 -1
- package/dist/src/layer/layerSymbols.d.ts +4 -0
- package/dist/src/layer/layerSymbols.js +4 -0
- package/dist/src/layer/layerSymbols.js.map +1 -1
- package/dist/src/layer/openStreetMapLayer.d.ts +1 -1
- package/dist/src/layer/openStreetMapLayer.js +11 -6
- package/dist/src/layer/openStreetMapLayer.js.map +1 -1
- package/dist/src/layer/panorama/vectorPanoramaImpl.d.ts +38 -0
- package/dist/src/layer/panorama/vectorPanoramaImpl.js +164 -0
- package/dist/src/layer/panorama/vectorPanoramaImpl.js.map +1 -0
- package/dist/src/layer/panoramaDatasetLayer.d.ts +7 -3
- package/dist/src/layer/panoramaDatasetLayer.js +46 -20
- package/dist/src/layer/panoramaDatasetLayer.js.map +1 -1
- package/dist/src/layer/pointCloudLayer.d.ts +1 -5
- package/dist/src/layer/pointCloudLayer.js +3 -15
- package/dist/src/layer/pointCloudLayer.js.map +1 -1
- package/dist/src/layer/rasterLayer.d.ts +1 -1
- package/dist/src/layer/rasterLayer.js +4 -4
- package/dist/src/layer/rasterLayer.js.map +1 -1
- package/dist/src/layer/singleImageLayer.d.ts +1 -1
- package/dist/src/layer/singleImageLayer.js +3 -3
- package/dist/src/layer/singleImageLayer.js.map +1 -1
- package/dist/src/layer/terrainLayer.d.ts +1 -1
- package/dist/src/layer/terrainLayer.js +8 -6
- package/dist/src/layer/terrainLayer.js.map +1 -1
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.js +7 -5
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/mvtTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/mvtTileProvider.js +6 -5
- package/dist/src/layer/tileProvider/mvtTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.js +3 -3
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js +7 -4
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/tileProvider.d.ts +7 -1
- package/dist/src/layer/tileProvider/tileProvider.js +15 -5
- package/dist/src/layer/tileProvider/tileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.js +3 -3
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.js.map +1 -1
- package/dist/src/layer/tmsLayer.d.ts +1 -1
- package/dist/src/layer/tmsLayer.js +3 -10
- package/dist/src/layer/tmsLayer.js.map +1 -1
- package/dist/src/layer/vectorLayer.d.ts +11 -5
- package/dist/src/layer/vectorLayer.js +21 -10
- package/dist/src/layer/vectorLayer.js.map +1 -1
- package/dist/src/layer/vectorProperties.js +10 -1
- package/dist/src/layer/vectorProperties.js.map +1 -1
- package/dist/src/layer/vectorTileLayer.d.ts +14 -5
- package/dist/src/layer/vectorTileLayer.js +82 -31
- package/dist/src/layer/vectorTileLayer.js.map +1 -1
- package/dist/src/layer/wfsLayer.d.ts +1 -1
- package/dist/src/layer/wfsLayer.js +5 -4
- package/dist/src/layer/wfsLayer.js.map +1 -1
- package/dist/src/layer/wmsLayer.d.ts +4 -1
- package/dist/src/layer/wmsLayer.js +65 -36
- package/dist/src/layer/wmsLayer.js.map +1 -1
- package/dist/src/layer/wmtsLayer.d.ts +1 -1
- package/dist/src/layer/wmtsLayer.js +3 -10
- package/dist/src/layer/wmtsLayer.js.map +1 -1
- package/dist/src/map/baseCesiumMap.d.ts +69 -0
- package/dist/src/map/baseCesiumMap.js +393 -0
- package/dist/src/map/baseCesiumMap.js.map +1 -0
- package/dist/src/map/cesiumMap.d.ts +6 -98
- package/dist/src/map/cesiumMap.js +29 -266
- package/dist/src/map/cesiumMap.js.map +1 -1
- package/dist/src/map/obliqueMap.d.ts +1 -1
- package/dist/src/map/obliqueMap.js +14 -8
- package/dist/src/map/obliqueMap.js.map +1 -1
- package/dist/src/map/openlayersMap.d.ts +1 -1
- package/dist/src/map/openlayersMap.js +3 -4
- package/dist/src/map/openlayersMap.js.map +1 -1
- package/dist/src/map/panoramaMap.d.ts +17 -29
- package/dist/src/map/panoramaMap.js +56 -100
- package/dist/src/map/panoramaMap.js.map +1 -1
- package/dist/src/map/vcsMap.d.ts +15 -2
- package/dist/src/map/vcsMap.js +26 -3
- package/dist/src/map/vcsMap.js.map +1 -1
- package/dist/src/oblique/obliqueCollection.d.ts +1 -1
- package/dist/src/oblique/obliqueCollection.js +3 -4
- package/dist/src/oblique/obliqueCollection.js.map +1 -1
- package/dist/src/panorama/panoramaCameraController.d.ts +4 -0
- package/dist/src/panorama/panoramaCameraController.js +8 -0
- package/dist/src/panorama/panoramaCameraController.js.map +1 -1
- package/dist/src/panorama/panoramaImage.d.ts +10 -1
- package/dist/src/panorama/panoramaImage.js +15 -9
- package/dist/src/panorama/panoramaImage.js.map +1 -1
- package/dist/src/panorama/panoramaImageView.d.ts +6 -1
- package/dist/src/panorama/panoramaImageView.js +11 -2
- package/dist/src/panorama/panoramaImageView.js.map +1 -1
- package/dist/src/panorama/panoramaTileMaterial.d.ts +6 -0
- package/dist/src/panorama/panoramaTileMaterial.js +14 -0
- package/dist/src/panorama/panoramaTileMaterial.js.map +1 -1
- package/dist/src/panorama/panoramaTileMaterialFS.shader.d.ts +1 -1
- package/dist/src/panorama/panoramaTileMaterialFS.shader.js +16 -1
- package/dist/src/panorama/panoramaTileMaterialFS.shader.js.map +1 -1
- package/dist/src/panorama/panoramaTilePrimitiveCollection.d.ts +6 -0
- package/dist/src/panorama/panoramaTilePrimitiveCollection.js +28 -0
- package/dist/src/panorama/panoramaTilePrimitiveCollection.js.map +1 -1
- package/dist/src/style/declarativeStyleItem.js +7 -8
- package/dist/src/style/declarativeStyleItem.js.map +1 -1
- package/dist/src/util/clipping/clippingPolygonObject.d.ts +1 -1
- package/dist/src/util/clipping/clippingPolygonObject.js +3 -4
- package/dist/src/util/clipping/clippingPolygonObject.js.map +1 -1
- package/dist/src/util/displayQuality/displayQuality.js +4 -4
- package/dist/src/util/displayQuality/displayQuality.js.map +1 -1
- package/dist/src/util/editor/createFeatureSession.js +3 -1
- package/dist/src/util/editor/createFeatureSession.js.map +1 -1
- package/dist/src/util/editor/editFeaturesSession.js +9 -2
- package/dist/src/util/editor/editFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/editGeometrySession.js +3 -1
- package/dist/src/util/editor/editGeometrySession.js.map +1 -1
- package/dist/src/util/editor/editorSessionHelpers.d.ts +3 -3
- package/dist/src/util/editor/editorSessionHelpers.js +4 -2
- package/dist/src/util/editor/editorSessionHelpers.js.map +1 -1
- package/dist/src/util/editor/interactions/creationSnapping.js +4 -1
- package/dist/src/util/editor/interactions/creationSnapping.js.map +1 -1
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js +2 -2
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/layerSnapping.js +4 -1
- package/dist/src/util/editor/interactions/layerSnapping.js.map +1 -1
- package/dist/src/util/editor/interactions/mapInteractionController.js +12 -1
- package/dist/src/util/editor/interactions/mapInteractionController.js.map +1 -1
- package/dist/src/util/editor/interactions/translationSnapping.js +4 -2
- package/dist/src/util/editor/interactions/translationSnapping.js.map +1 -1
- package/dist/src/util/editor/selectFeaturesSession.js +1 -1
- package/dist/src/util/editor/selectFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/transformation/create3DHandlers.d.ts +2 -2
- package/dist/src/util/editor/transformation/create3DHandlers.js.map +1 -1
- package/dist/src/util/editor/transformation/transformationHandler.js +5 -2
- package/dist/src/util/editor/transformation/transformationHandler.js.map +1 -1
- package/dist/src/util/editor/transformation/translateInteraction.js +2 -2
- package/dist/src/util/editor/transformation/translateInteraction.js.map +1 -1
- package/dist/src/util/fetch.d.ts +7 -0
- package/dist/src/util/fetch.js +7 -0
- package/dist/src/util/fetch.js.map +1 -1
- package/dist/src/util/flight/flightInstance.d.ts +1 -1
- package/dist/src/util/flight/flightInstance.js +3 -4
- package/dist/src/util/flight/flightInstance.js.map +1 -1
- package/dist/src/util/mapCollection.d.ts +5 -0
- package/dist/src/util/mapCollection.js +14 -0
- package/dist/src/util/mapCollection.js.map +1 -1
- package/dist/src/util/renderScreenshot.js +2 -3
- package/dist/src/util/renderScreenshot.js.map +1 -1
- package/dist/src/util/viewpoint.js +1 -1
- package/dist/src/util/viewpoint.js.map +1 -1
- package/dist/src/vcsApp.d.ts +2 -3
- package/dist/src/vcsApp.js.map +1 -1
- package/dist/src/vcsModuleHelpers.d.ts +5 -2
- package/dist/src/vcsModuleHelpers.js +27 -1
- package/dist/src/vcsModuleHelpers.js.map +1 -1
- package/dist/src/vcsObject.d.ts +2 -1
- package/dist/src/vcsObject.js +9 -1
- package/dist/src/vcsObject.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterGroup.d.ts +1 -1
- package/dist/src/vectorCluster/vectorClusterGroup.js +3 -4
- package/dist/src/vectorCluster/vectorClusterGroup.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterStyleItem.d.ts +1 -1
- package/dist/src/vectorCluster/vectorClusterStyleItem.js +3 -4
- package/dist/src/vectorCluster/vectorClusterStyleItem.js.map +1 -1
- package/dist/tests/unit/helpers/cesiumHelpers.d.ts +11 -1
- package/dist/tests/unit/helpers/cesiumHelpers.js +26 -3
- package/dist/tests/unit/helpers/cesiumHelpers.js.map +1 -1
- package/dist/tests/unit/helpers/panoramaHelpers.js +1 -1
- package/dist/tests/unit/helpers/panoramaHelpers.js.map +1 -1
- package/index.ts +30 -5
- package/package.json +3 -3
- package/src/category/category.ts +3 -4
- package/src/cesium/cesium.d.ts +12 -0
- package/src/cesium/cesium3DTileFeature.ts +23 -3
- package/src/cesium/cesium3DTilePointFeature.ts +3 -1
- package/src/classRegistry.ts +8 -3
- package/src/featureProvider/abstractAttributeProvider.ts +201 -0
- package/src/featureProvider/abstractFeatureProvider.ts +32 -51
- package/src/featureProvider/compositeFeatureProvider.ts +103 -0
- package/src/featureProvider/csvAttributeProvider.ts +186 -0
- package/src/featureProvider/featureProviderFactory.ts +31 -0
- package/src/featureProvider/i3sAttributeProvider.ts +60 -0
- package/src/featureProvider/jsonAttributeProvider.ts +109 -0
- package/src/featureProvider/tileProviderFeatureProvider.ts +13 -14
- package/src/featureProvider/urlIdAttributeProvider.ts +82 -0
- package/src/featureProvider/wmsFeatureProvider.ts +31 -10
- package/src/global.d.ts +2 -0
- package/src/interaction/coordinateAtPixel.ts +4 -6
- package/src/interaction/ensurePositionInteraction.ts +50 -0
- package/src/interaction/eventHandler.ts +12 -1
- package/src/interaction/featureAtPixelInteraction.ts +92 -32
- package/src/interaction/featureProviderInteraction.ts +59 -38
- package/src/interaction/panoramaImageSelection.ts +4 -2
- package/src/layer/cesium/cesiumTilesetCesiumImpl.ts +297 -197
- package/src/layer/cesium/i3sCesiumImpl.ts +141 -0
- package/src/layer/cesium/rasterLayerCesiumImpl.ts +3 -3
- package/src/layer/cesium/terrainCesiumImpl.ts +3 -3
- package/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.ts +4 -3
- package/src/layer/cesium/vectorContext.ts +1 -1
- package/src/layer/cesium/vectorRasterTileCesiumImpl.ts +7 -6
- package/src/layer/cesium/vectorTileImageryProvider.ts +2 -2
- package/src/layer/cesiumTilesetLayer.ts +60 -8
- package/src/layer/cogLayer.ts +5 -5
- package/src/layer/czmlLayer.ts +4 -4
- package/src/layer/featureLayer.ts +5 -16
- package/src/layer/featureStoreLayer.ts +11 -5
- package/src/layer/flatGeobufLayer.ts +12 -0
- package/src/layer/geojsonLayer.ts +5 -12
- package/src/layer/i3sLayer.ts +343 -0
- package/src/layer/layer.ts +178 -39
- package/src/layer/layerSymbols.ts +5 -0
- package/src/layer/openStreetMapLayer.ts +13 -6
- package/src/layer/panorama/vectorPanoramaImpl.ts +238 -0
- package/src/layer/panoramaDatasetLayer.ts +69 -23
- package/src/layer/pointCloudLayer.ts +5 -20
- package/src/layer/rasterLayer.ts +4 -4
- package/src/layer/singleImageLayer.ts +5 -3
- package/src/layer/terrainLayer.ts +9 -6
- package/src/layer/tileProvider/flatGeobufTileProvider.ts +9 -5
- package/src/layer/tileProvider/mvtTileProvider.ts +10 -5
- package/src/layer/tileProvider/staticFeatureTileProvider.ts +5 -3
- package/src/layer/tileProvider/staticGeojsonTileProvider.ts +11 -4
- package/src/layer/tileProvider/tileProvider.ts +18 -5
- package/src/layer/tileProvider/urlTemplateTileProvider.ts +7 -3
- package/src/layer/tmsLayer.ts +3 -10
- package/src/layer/vectorLayer.ts +29 -11
- package/src/layer/vectorProperties.ts +10 -1
- package/src/layer/vectorTileLayer.ts +141 -53
- package/src/layer/wfsLayer.ts +7 -4
- package/src/layer/wmsLayer.ts +80 -48
- package/src/layer/wmtsLayer.ts +3 -10
- package/src/map/baseCesiumMap.ts +600 -0
- package/src/map/cesiumMap.ts +99 -457
- package/src/map/obliqueMap.ts +16 -10
- package/src/map/openlayersMap.ts +5 -5
- package/src/map/panoramaMap.ts +74 -139
- package/src/map/vcsMap.ts +44 -4
- package/src/oblique/obliqueCollection.ts +5 -4
- package/src/ol/ol.d.ts +13 -2
- package/src/panorama/panoramaCameraController.ts +13 -1
- package/src/panorama/panoramaImage.ts +25 -8
- package/src/panorama/panoramaImageView.ts +29 -3
- package/src/panorama/panoramaTileMaterial.ts +20 -0
- package/src/panorama/panoramaTileMaterialFS.glsl +16 -1
- package/src/panorama/panoramaTilePrimitiveCollection.ts +34 -0
- package/src/style/declarativeStyleItem.ts +7 -9
- package/src/util/clipping/clippingPolygonObject.ts +5 -4
- package/src/util/displayQuality/displayQuality.ts +4 -4
- package/src/util/editor/createFeatureSession.ts +4 -1
- package/src/util/editor/editFeaturesSession.ts +14 -4
- package/src/util/editor/editGeometrySession.ts +3 -1
- package/src/util/editor/editorSessionHelpers.ts +5 -3
- package/src/util/editor/interactions/creationSnapping.ts +7 -1
- package/src/util/editor/interactions/ensureHandlerSelectionInteraction.ts +2 -2
- package/src/util/editor/interactions/layerSnapping.ts +7 -1
- package/src/util/editor/interactions/mapInteractionController.ts +12 -2
- package/src/util/editor/interactions/translationSnapping.ts +6 -4
- package/src/util/editor/selectFeaturesSession.ts +1 -1
- package/src/util/editor/transformation/create3DHandlers.ts +2 -2
- package/src/util/editor/transformation/transformationHandler.ts +5 -3
- package/src/util/editor/transformation/translateInteraction.ts +4 -4
- package/src/util/fetch.ts +7 -0
- package/src/util/flight/flightInstance.ts +6 -5
- package/src/util/mapCollection.ts +18 -0
- package/src/util/renderScreenshot.ts +4 -8
- package/src/util/viewpoint.ts +2 -2
- package/src/vcsApp.ts +7 -8
- package/src/vcsModuleHelpers.ts +62 -4
- package/src/vcsObject.ts +10 -1
- package/src/vectorCluster/vectorClusterGroup.ts +7 -4
- package/src/vectorCluster/vectorClusterStyleItem.ts +8 -4
- package/dist/src/map/cesiumMapHelpers.d.ts +0 -7
- package/dist/src/map/cesiumMapHelpers.js +0 -144
- package/dist/src/map/cesiumMapHelpers.js.map +0 -1
- package/src/map/cesiumMapHelpers.ts +0 -219
|
@@ -68,6 +68,10 @@ export type PanoramaImage = Readonly<
|
|
|
68
68
|
* The image name
|
|
69
69
|
*/
|
|
70
70
|
readonly name: string;
|
|
71
|
+
/**
|
|
72
|
+
* The image time, if known
|
|
73
|
+
*/
|
|
74
|
+
readonly time?: Date;
|
|
71
75
|
readonly up: Cartesian3;
|
|
72
76
|
readonly modelMatrix: Matrix4;
|
|
73
77
|
readonly invModelMatrix: Matrix4;
|
|
@@ -122,6 +126,10 @@ export type CreatePanoramaImageOptions = {
|
|
|
122
126
|
* The dataset an image may belong to
|
|
123
127
|
*/
|
|
124
128
|
dataset?: PanoramaDatasetLayer;
|
|
129
|
+
/**
|
|
130
|
+
* The time of the image, if known
|
|
131
|
+
*/
|
|
132
|
+
time?: Date;
|
|
125
133
|
/**
|
|
126
134
|
* The root URL for the image. This is used to load the intensity and depth images.
|
|
127
135
|
*/
|
|
@@ -304,7 +312,7 @@ function parseRgbUrl(imageUrl: string): {
|
|
|
304
312
|
if (!fileName || !fileName.endsWith('_rgb.tif')) {
|
|
305
313
|
throw new Error('Invalid image url');
|
|
306
314
|
}
|
|
307
|
-
const name = fileName.slice(0, -8);
|
|
315
|
+
const name = decodeURIComponent(fileName.slice(0, -8));
|
|
308
316
|
|
|
309
317
|
return {
|
|
310
318
|
name,
|
|
@@ -333,9 +341,10 @@ export async function createPanoramaImage(
|
|
|
333
341
|
hasIntensity,
|
|
334
342
|
hasDepth,
|
|
335
343
|
} = await loadRGBImages(rgbImage);
|
|
336
|
-
const { name, absoluteRootUrl, intensityImage, depthImage, dataset } =
|
|
344
|
+
const { name, absoluteRootUrl, intensityImage, depthImage, dataset, time } =
|
|
337
345
|
options;
|
|
338
346
|
|
|
347
|
+
const imageTime = time ? new Date(time) : undefined;
|
|
339
348
|
const nameOrId = name ?? uuid();
|
|
340
349
|
const modelMatrix = Transforms.headingPitchRollToFixedFrame(
|
|
341
350
|
position,
|
|
@@ -358,11 +367,14 @@ export async function createPanoramaImage(
|
|
|
358
367
|
);
|
|
359
368
|
|
|
360
369
|
let getIntensityImages: (() => Promise<GeoTIFFImage[]>) | undefined;
|
|
361
|
-
if (intensityImage || (hasIntensity && absoluteRootUrl)) {
|
|
370
|
+
if (intensityImage || (hasIntensity && absoluteRootUrl && name)) {
|
|
362
371
|
getIntensityImages = async (): Promise<GeoTIFFImage[]> => {
|
|
363
372
|
const usedIntensityImage =
|
|
364
373
|
intensityImage ??
|
|
365
|
-
(await fromUrl(
|
|
374
|
+
(await fromUrl(
|
|
375
|
+
new URL(`${encodeURIComponent(name!)}_intensity.tif`, absoluteRootUrl)
|
|
376
|
+
.href,
|
|
377
|
+
));
|
|
366
378
|
|
|
367
379
|
const {
|
|
368
380
|
images: intensity,
|
|
@@ -389,10 +401,10 @@ export async function createPanoramaImage(
|
|
|
389
401
|
| undefined;
|
|
390
402
|
|
|
391
403
|
let usedDepthImage = depthImage;
|
|
392
|
-
if (!usedDepthImage && hasDepth && absoluteRootUrl) {
|
|
404
|
+
if (!usedDepthImage && hasDepth && absoluteRootUrl && name) {
|
|
393
405
|
try {
|
|
394
406
|
usedDepthImage = await fromUrl(
|
|
395
|
-
new URL(`${name}_depth.tif`, absoluteRootUrl).href,
|
|
407
|
+
new URL(`${encodeURIComponent(name)}_depth.tif`, absoluteRootUrl).href,
|
|
396
408
|
);
|
|
397
409
|
} catch (e) {
|
|
398
410
|
getLogger('PanoramaImage').warning(
|
|
@@ -449,7 +461,7 @@ export async function createPanoramaImage(
|
|
|
449
461
|
imageCoordinate,
|
|
450
462
|
)
|
|
451
463
|
: await tileProvider.getDepthAtImageCoordinate(imageCoordinate);
|
|
452
|
-
if (depthValue === undefined) {
|
|
464
|
+
if (depthValue === undefined || depthValue === 0) {
|
|
453
465
|
return undefined;
|
|
454
466
|
}
|
|
455
467
|
const cartesian = imageSphericalToCartesian(imageCoordinate, result);
|
|
@@ -463,6 +475,9 @@ export async function createPanoramaImage(
|
|
|
463
475
|
get name(): string {
|
|
464
476
|
return nameOrId;
|
|
465
477
|
},
|
|
478
|
+
get time(): Date | undefined {
|
|
479
|
+
return imageTime;
|
|
480
|
+
},
|
|
466
481
|
get position(): Cartesian3 {
|
|
467
482
|
return position;
|
|
468
483
|
},
|
|
@@ -534,12 +549,14 @@ export async function createPanoramaImage(
|
|
|
534
549
|
* Creates a panorama image from a URL. The URL must point to a RGB image with the name ending in "_rgb.tif".
|
|
535
550
|
* @param rgbImageUrl - the url to the RGB image
|
|
536
551
|
* @param [dataset] - the dataset to which the image belongs, if applicable
|
|
552
|
+
* @param [time] - the time of the image, if known
|
|
537
553
|
*/
|
|
538
554
|
export async function createPanoramaImageFromURL(
|
|
539
555
|
rgbImageUrl: string,
|
|
540
556
|
dataset?: PanoramaDatasetLayer,
|
|
557
|
+
time?: Date,
|
|
541
558
|
): Promise<PanoramaImage> {
|
|
542
559
|
const { name, absoluteRootUrl } = parseRgbUrl(rgbImageUrl);
|
|
543
560
|
const image = await fromUrl(absoluteRootUrl);
|
|
544
|
-
return createPanoramaImage(image, { dataset, absoluteRootUrl, name });
|
|
561
|
+
return createPanoramaImage(image, { dataset, absoluteRootUrl, name, time });
|
|
545
562
|
}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type {
|
|
2
|
+
Camera,
|
|
3
|
+
PerspectiveFrustum,
|
|
4
|
+
Primitive,
|
|
5
|
+
Scene,
|
|
6
|
+
} from '@vcmap-cesium/engine';
|
|
7
|
+
import {
|
|
8
|
+
Cartesian2,
|
|
9
|
+
Matrix4,
|
|
10
|
+
Cartesian3,
|
|
11
|
+
Math as CesiumMath,
|
|
12
|
+
} from '@vcmap-cesium/engine';
|
|
3
13
|
import { getWidth } from 'ol/extent.js';
|
|
4
14
|
import type { Size } from 'ol/size.js';
|
|
5
15
|
import { getLogger } from '@vcsuite/logger';
|
|
@@ -26,6 +36,10 @@ export type PanoramaImageView = {
|
|
|
26
36
|
* Suspends the loading of tiles. This is used as a debug feature.
|
|
27
37
|
*/
|
|
28
38
|
suspendTileLoading: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The default field of view to set when a new image is loaded in radians.
|
|
41
|
+
*/
|
|
42
|
+
defaultFov: number;
|
|
29
43
|
/**
|
|
30
44
|
* The primitive collection that contains the panorama tiles.
|
|
31
45
|
*/
|
|
@@ -369,8 +383,12 @@ function setupEmptyImageOverlay(container: HTMLElement): () => void {
|
|
|
369
383
|
* to the panorama camera and updates the panorama tiles accordingly. Typically, you will not
|
|
370
384
|
* have to create this directly, but rather use the PanoramaMap's imageView property.
|
|
371
385
|
* @param map
|
|
386
|
+
* @param [initialFov=CesiumMath.PI_OVER_FOUR] The default field of view to set when a new image is loaded in radians
|
|
372
387
|
*/
|
|
373
|
-
export function createPanoramaImageView(
|
|
388
|
+
export function createPanoramaImageView(
|
|
389
|
+
map: PanoramaMap,
|
|
390
|
+
initialFov = CesiumMath.PI_OVER_FOUR,
|
|
391
|
+
): PanoramaImageView {
|
|
374
392
|
const { scene } = map.getCesiumWidget();
|
|
375
393
|
const primitiveCollection = scene.primitives.add(
|
|
376
394
|
new PanoramaTilePrimitiveCollection({
|
|
@@ -382,6 +400,7 @@ export function createPanoramaImageView(map: PanoramaMap): PanoramaImageView {
|
|
|
382
400
|
const defaultPosition = Cartesian3.fromDegrees(12, 53, 0);
|
|
383
401
|
|
|
384
402
|
let currentView: ImageWrapper | undefined;
|
|
403
|
+
let defaultFov = initialFov;
|
|
385
404
|
let removeOverlay: (() => void) | undefined;
|
|
386
405
|
scene.camera.setView({
|
|
387
406
|
destination: defaultPosition,
|
|
@@ -400,6 +419,7 @@ export function createPanoramaImageView(map: PanoramaMap): PanoramaImageView {
|
|
|
400
419
|
if (image) {
|
|
401
420
|
currentView = createImageWrapper(image, primitiveCollection, scene, map);
|
|
402
421
|
currentView.suspendTileLoading = suspendTileLoading;
|
|
422
|
+
(scene.camera.frustum as PerspectiveFrustum).fov = defaultFov;
|
|
403
423
|
} else {
|
|
404
424
|
currentView = undefined;
|
|
405
425
|
if (scene.canvas.parentElement) {
|
|
@@ -433,6 +453,12 @@ export function createPanoramaImageView(map: PanoramaMap): PanoramaImageView {
|
|
|
433
453
|
get tilePrimitiveCollection(): PanoramaTilePrimitiveCollection {
|
|
434
454
|
return primitiveCollection;
|
|
435
455
|
},
|
|
456
|
+
get defaultFov(): number {
|
|
457
|
+
return defaultFov;
|
|
458
|
+
},
|
|
459
|
+
set defaultFov(value: number) {
|
|
460
|
+
defaultFov = value;
|
|
461
|
+
},
|
|
436
462
|
render,
|
|
437
463
|
destroy(): void {
|
|
438
464
|
this.render = (): void => {};
|
|
@@ -52,6 +52,8 @@ export type PanoramaTileMaterialUniforms = {
|
|
|
52
52
|
u_imageReady: boolean;
|
|
53
53
|
u_intensityReady: boolean;
|
|
54
54
|
u_cursorColor: Color;
|
|
55
|
+
u_contrast: number;
|
|
56
|
+
u_brightness: number;
|
|
55
57
|
};
|
|
56
58
|
|
|
57
59
|
function createDebugCanvas(tileSize: Size, text: string): HTMLCanvasElement {
|
|
@@ -100,6 +102,8 @@ export function getDefaultPanoramaTileMaterialUniforms(): PanoramaTileMaterialUn
|
|
|
100
102
|
u_depthReady: false,
|
|
101
103
|
u_overlayNaNColor: Color.RED,
|
|
102
104
|
u_cursorColor: Color.fromCssColorString(defaultCursorColor),
|
|
105
|
+
u_contrast: 1,
|
|
106
|
+
u_brightness: 0,
|
|
103
107
|
};
|
|
104
108
|
}
|
|
105
109
|
|
|
@@ -205,6 +209,22 @@ export default class PanoramaTileMaterial extends Material {
|
|
|
205
209
|
this.uniforms.u_opacity = value;
|
|
206
210
|
}
|
|
207
211
|
|
|
212
|
+
get contrast(): number {
|
|
213
|
+
return this.uniforms.u_contrast;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
set contrast(value: number) {
|
|
217
|
+
this.uniforms.u_contrast = value;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
get brightness(): number {
|
|
221
|
+
return this.uniforms.u_brightness;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
set brightness(value: number) {
|
|
225
|
+
this.uniforms.u_brightness = value;
|
|
226
|
+
}
|
|
227
|
+
|
|
208
228
|
/**
|
|
209
229
|
* The position of the cursor in the panorama tile. Internal API to render the depth cursor.
|
|
210
230
|
* (-1, -1, -1) means no data is available.
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
* @uniform {bool} u_intensityReady - Flag indicating if intensity data is ready
|
|
23
23
|
* @uniform {bool} u_depthReady - Flag indicating if depth data is ready
|
|
24
24
|
* @uniform {vec4} u_overlayNaNColor - Color used for missing/NaN overlay values
|
|
25
|
+
* @uniform {float} u_brightness - Brightness adjustment
|
|
26
|
+
* @uniform {float} u_contrast - Contrast adjustment
|
|
25
27
|
*/
|
|
26
28
|
|
|
27
29
|
#define OVERLAY_INTENSITY 1.0
|
|
@@ -92,7 +94,20 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
|
92
94
|
vec2 clamped_uv = clamp(materialInput.st, u_minUV, u_maxUV);
|
|
93
95
|
vec2 scaled_uv = (clamped_uv - u_minUV) / (u_maxUV - u_minUV);
|
|
94
96
|
|
|
95
|
-
vec4 t_color = texture(u_rgb, scaled_uv);
|
|
97
|
+
vec4 t_color = czm_srgbToLinear(texture(u_rgb, scaled_uv));
|
|
98
|
+
|
|
99
|
+
if (u_brightness != 0.0)
|
|
100
|
+
{
|
|
101
|
+
t_color.rgb += u_brightness;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (u_contrast != 1.0)
|
|
105
|
+
{
|
|
106
|
+
t_color.rgb = ((t_color.rgb - 0.5) * u_contrast) + 0.5;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
clamp(t_color, 0.0, 1.0);
|
|
110
|
+
|
|
96
111
|
if (u_intensityReady && u_overlay == OVERLAY_INTENSITY)
|
|
97
112
|
{
|
|
98
113
|
float inensity_value = get_texel_value(u_intensity, scaled_uv);
|
|
@@ -28,6 +28,10 @@ export default class PanoramaTilePrimitiveCollection extends PrimitiveCollection
|
|
|
28
28
|
|
|
29
29
|
private _cursorColor: Color = Color.fromCssColorString(defaultCursorColor);
|
|
30
30
|
|
|
31
|
+
private _contrast = 1.0;
|
|
32
|
+
|
|
33
|
+
private _brightness = 0.0;
|
|
34
|
+
|
|
31
35
|
overlayChanged = new VcsEvent<PanoramaOverlayMode>();
|
|
32
36
|
|
|
33
37
|
constructor(options?: ConstructorParameters<typeof PrimitiveCollection>[0]) {
|
|
@@ -104,6 +108,34 @@ export default class PanoramaTilePrimitiveCollection extends PrimitiveCollection
|
|
|
104
108
|
}
|
|
105
109
|
}
|
|
106
110
|
|
|
111
|
+
get contrast(): number {
|
|
112
|
+
return this._contrast;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
set contrast(value: number) {
|
|
116
|
+
if (this._contrast !== value) {
|
|
117
|
+
this._contrast = value;
|
|
118
|
+
this._primitives.forEach((primitive) => {
|
|
119
|
+
(primitive.appearance.material as PanoramaTileMaterial).contrast =
|
|
120
|
+
value;
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
get brightness(): number {
|
|
126
|
+
return this._brightness;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
set brightness(value: number) {
|
|
130
|
+
if (this._brightness !== value) {
|
|
131
|
+
this._brightness = value;
|
|
132
|
+
this._primitives.forEach((primitive) => {
|
|
133
|
+
(primitive.appearance.material as PanoramaTileMaterial).brightness =
|
|
134
|
+
value;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
107
139
|
get cursorPosition(): Cartesian3 {
|
|
108
140
|
return this._cursorPosition;
|
|
109
141
|
}
|
|
@@ -152,6 +184,8 @@ export default class PanoramaTilePrimitiveCollection extends PrimitiveCollection
|
|
|
152
184
|
material.opacity = this.opacity;
|
|
153
185
|
material.cursorPosition = this.cursorPosition;
|
|
154
186
|
material.cursorColor = this.cursorColor;
|
|
187
|
+
material.brightness = this.brightness;
|
|
188
|
+
material.contrast = this.contrast;
|
|
155
189
|
|
|
156
190
|
return super.add(primitive, index) as Primitive;
|
|
157
191
|
}
|
|
@@ -55,8 +55,6 @@ export type DeclarativeStyleItemOptions = StyleItemOptions & {
|
|
|
55
55
|
declarativeStyle?: DeclarativeStyleOptions;
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
const scratchColor = new Color();
|
|
59
|
-
|
|
60
58
|
const defaultText = new OLText({
|
|
61
59
|
font: '30px sans-serif',
|
|
62
60
|
fill: new Fill({ color: whiteColor }),
|
|
@@ -205,7 +203,7 @@ class DeclarativeStyleItem extends StyleItem {
|
|
|
205
203
|
private _stylePolygon(feature: Feature): Style {
|
|
206
204
|
const style = new Style({});
|
|
207
205
|
const color = this.cesiumStyle.color
|
|
208
|
-
? this.cesiumStyle.color.evaluate<Color>(feature,
|
|
206
|
+
? this.cesiumStyle.color.evaluate<Color>(feature, new Color())
|
|
209
207
|
: Color.WHITE;
|
|
210
208
|
if (color) {
|
|
211
209
|
style.setFill(
|
|
@@ -223,7 +221,7 @@ class DeclarativeStyleItem extends StyleItem {
|
|
|
223
221
|
const style = new Style({});
|
|
224
222
|
const isExtruded = !!feature.get('olcs_extrudedHeight');
|
|
225
223
|
const color = this.cesiumStyle.color
|
|
226
|
-
? this.cesiumStyle.color.evaluate<Color>(feature,
|
|
224
|
+
? this.cesiumStyle.color.evaluate<Color>(feature, new Color())
|
|
227
225
|
: Color.WHITE;
|
|
228
226
|
if (color) {
|
|
229
227
|
if (isExtruded) {
|
|
@@ -269,7 +267,7 @@ class DeclarativeStyleItem extends StyleItem {
|
|
|
269
267
|
if (this.cesiumStyle.labelColor) {
|
|
270
268
|
const textColor = this.cesiumStyle.labelColor.evaluateColor(
|
|
271
269
|
feature,
|
|
272
|
-
|
|
270
|
+
new Color(),
|
|
273
271
|
);
|
|
274
272
|
if (textColor) {
|
|
275
273
|
textStyle.getFill()!.setColor(cesiumColorToColor(textColor));
|
|
@@ -279,7 +277,7 @@ class DeclarativeStyleItem extends StyleItem {
|
|
|
279
277
|
const outlineColor =
|
|
280
278
|
this.cesiumStyle.labelOutlineColor.evaluate<Color>(
|
|
281
279
|
feature,
|
|
282
|
-
|
|
280
|
+
new Color(),
|
|
283
281
|
);
|
|
284
282
|
if (outlineColor) {
|
|
285
283
|
const outlineWidth = this.cesiumStyle.labelOutlineWidth
|
|
@@ -314,7 +312,7 @@ class DeclarativeStyleItem extends StyleItem {
|
|
|
314
312
|
}
|
|
315
313
|
} else {
|
|
316
314
|
const color =
|
|
317
|
-
this.cesiumStyle.color?.evaluate<Color>(feature,
|
|
315
|
+
this.cesiumStyle.color?.evaluate<Color>(feature, new Color()) ??
|
|
318
316
|
Color.WHITE;
|
|
319
317
|
|
|
320
318
|
let radius = 4;
|
|
@@ -330,7 +328,7 @@ class DeclarativeStyleItem extends StyleItem {
|
|
|
330
328
|
if (this.cesiumStyle.pointOutlineColor) {
|
|
331
329
|
pointOutlineColor = this.cesiumStyle.pointOutlineColor.evaluateColor(
|
|
332
330
|
feature,
|
|
333
|
-
|
|
331
|
+
new Color(),
|
|
334
332
|
);
|
|
335
333
|
}
|
|
336
334
|
radius += width / 2;
|
|
@@ -372,7 +370,7 @@ class DeclarativeStyleItem extends StyleItem {
|
|
|
372
370
|
if (this.cesiumStyle.strokeColor) {
|
|
373
371
|
const strokeColor = this.cesiumStyle.strokeColor.evaluateColor(
|
|
374
372
|
feature,
|
|
375
|
-
|
|
373
|
+
new Color(),
|
|
376
374
|
);
|
|
377
375
|
if (strokeColor) {
|
|
378
376
|
const strokeWidth = this.cesiumStyle.strokeWidth
|
|
@@ -82,8 +82,8 @@ class ClippingPolygonObject extends VcsObject {
|
|
|
82
82
|
terrainChanged = new VcsEvent<boolean>();
|
|
83
83
|
|
|
84
84
|
constructor(options: ClippingPolygonObjectOptions) {
|
|
85
|
-
super(options);
|
|
86
85
|
const defaultOptions = ClippingPolygonObject.getDefaultOptions();
|
|
86
|
+
super({ ...defaultOptions, ...options });
|
|
87
87
|
|
|
88
88
|
this.activeOnStartup = parseBoolean(
|
|
89
89
|
options.activeOnStartup,
|
|
@@ -190,12 +190,13 @@ class ClippingPolygonObject extends VcsObject {
|
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
toJSON(
|
|
193
|
+
toJSON(
|
|
194
|
+
defaultOptions = ClippingPolygonObject.getDefaultOptions(),
|
|
195
|
+
): ClippingPolygonObjectOptions {
|
|
194
196
|
const config: ClippingPolygonObjectOptions = {
|
|
195
|
-
...super.toJSON(),
|
|
197
|
+
...super.toJSON(defaultOptions),
|
|
196
198
|
coordinates: structuredClone(this._coordinates),
|
|
197
199
|
};
|
|
198
|
-
const defaultOptions = ClippingPolygonObject.getDefaultOptions();
|
|
199
200
|
|
|
200
201
|
if (!deepEqual(this._layerNames, defaultOptions.layerNames)) {
|
|
201
202
|
config.layerNames = getLayerNamesClone(this._layerNames);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { check, oneOf } from '@vcsuite/check';
|
|
2
2
|
import type VcsApp from '../../vcsApp.js';
|
|
3
3
|
import FeatureStoreLayer from '../../layer/featureStoreLayer.js';
|
|
4
|
-
import CesiumMap from '../../map/cesiumMap.js';
|
|
5
4
|
import { isMobile } from '../isMobile.js';
|
|
6
5
|
import CesiumTilesetLayer from '../../layer/cesiumTilesetLayer.js';
|
|
7
6
|
import VcsEvent from '../../vcsEvent.js';
|
|
7
|
+
import BaseCesiumMap from '../../map/baseCesiumMap.js';
|
|
8
8
|
|
|
9
9
|
export enum DisplayQualityLevel {
|
|
10
10
|
LOW = 'low',
|
|
@@ -104,7 +104,7 @@ class DisplayQuality {
|
|
|
104
104
|
this._listeners = [
|
|
105
105
|
this._app.maps.mapActivated.addEventListener(() => {
|
|
106
106
|
if (
|
|
107
|
-
this._app.maps.activeMap instanceof
|
|
107
|
+
this._app.maps.activeMap instanceof BaseCesiumMap &&
|
|
108
108
|
!this.currentQualityLevel
|
|
109
109
|
) {
|
|
110
110
|
if (isMobile()) {
|
|
@@ -115,7 +115,7 @@ class DisplayQuality {
|
|
|
115
115
|
}
|
|
116
116
|
}),
|
|
117
117
|
this._app.layers.stateChanged.addEventListener((layer) => {
|
|
118
|
-
if (layer.active && this._app.maps.activeMap instanceof
|
|
118
|
+
if (layer.active && this._app.maps.activeMap instanceof BaseCesiumMap) {
|
|
119
119
|
this._setLayerQuality(layer.name);
|
|
120
120
|
}
|
|
121
121
|
}),
|
|
@@ -222,7 +222,7 @@ class DisplayQuality {
|
|
|
222
222
|
),
|
|
223
223
|
);
|
|
224
224
|
|
|
225
|
-
if (!(this._app.maps.activeMap instanceof
|
|
225
|
+
if (!(this._app.maps.activeMap instanceof BaseCesiumMap)) {
|
|
226
226
|
this._currentQualityLevel = undefined;
|
|
227
227
|
this._viewModelSettings.startingQualityLevel = level;
|
|
228
228
|
this._viewModelSettings.startingMobileQualityLevel = level;
|
|
@@ -126,7 +126,7 @@ function startCreateFeatureSession<T extends GeometryType>(
|
|
|
126
126
|
interactionChain,
|
|
127
127
|
removed: interactionRemoved,
|
|
128
128
|
destroy: destroyInteractionChain,
|
|
129
|
-
} = setupInteractionChain(app.maps
|
|
129
|
+
} = setupInteractionChain(app.maps);
|
|
130
130
|
const { layer: scratchLayer, destroy: destroyScratchLayer } =
|
|
131
131
|
setupScratchLayer(app.layers, app.maps.eventHandler.featureInteraction);
|
|
132
132
|
|
|
@@ -340,6 +340,7 @@ function startCreateFeatureSession<T extends GeometryType>(
|
|
|
340
340
|
if (app.maps.target) {
|
|
341
341
|
app.maps.target.style.cursor = cursorMap.edit;
|
|
342
342
|
}
|
|
343
|
+
app.maps.pausePanoramaImageSelection = true;
|
|
343
344
|
|
|
344
345
|
const stop = (): void => {
|
|
345
346
|
isStopped = true; // setting stopped true immediately, to prevent the recreation of the interaction chain on finished
|
|
@@ -348,6 +349,8 @@ function startCreateFeatureSession<T extends GeometryType>(
|
|
|
348
349
|
if (app.maps.target) {
|
|
349
350
|
app.maps.target.style.cursor = cursorMap.auto;
|
|
350
351
|
}
|
|
352
|
+
app.maps.pausePanoramaImageSelection = false;
|
|
353
|
+
|
|
351
354
|
mapChangedListener();
|
|
352
355
|
obliqueImageChangedListener();
|
|
353
356
|
if (currentInteraction) {
|
|
@@ -39,6 +39,7 @@ import type VcsApp from '../../vcsApp.js';
|
|
|
39
39
|
import type VectorLayer from '../../layer/vectorLayer.js';
|
|
40
40
|
import type VcsMap from '../../map/vcsMap.js';
|
|
41
41
|
import RightClickInteraction from './interactions/rightClickInteraction.js';
|
|
42
|
+
import BaseCesiumMap from '../../map/baseCesiumMap.js';
|
|
42
43
|
|
|
43
44
|
/**
|
|
44
45
|
* Saves the original allowPicking settings and sets them to false if CTRL is not pressed.
|
|
@@ -189,7 +190,7 @@ function startEditFeaturesSession(
|
|
|
189
190
|
interactionChain,
|
|
190
191
|
removed: interactionRemoved,
|
|
191
192
|
destroy: destroyInteractionChain,
|
|
192
|
-
} = setupInteractionChain(app.maps
|
|
193
|
+
} = setupInteractionChain(app.maps, interactionId);
|
|
193
194
|
|
|
194
195
|
const { exclusiveInteractionId } = app.maps.eventHandler;
|
|
195
196
|
const removeRightClickStart = app.maps.eventHandler.addExclusiveInteraction(
|
|
@@ -328,7 +329,9 @@ function startEditFeaturesSession(
|
|
|
328
329
|
|
|
329
330
|
const createTransformations = (): void => {
|
|
330
331
|
destroyTransformation();
|
|
331
|
-
|
|
332
|
+
const currentEnsurePositionActive =
|
|
333
|
+
app.maps.eventHandler.ensurePositionInteraction.active;
|
|
334
|
+
app.maps.eventHandler.ensurePositionInteraction.setActive(false);
|
|
332
335
|
transformationHandler = createTransformationHandler(
|
|
333
336
|
app.maps.activeMap!,
|
|
334
337
|
layer,
|
|
@@ -374,6 +377,9 @@ function startEditFeaturesSession(
|
|
|
374
377
|
interactionChain.addInteraction(interaction);
|
|
375
378
|
|
|
376
379
|
destroyTransformation = (): void => {
|
|
380
|
+
app.maps.eventHandler.ensurePositionInteraction.setActive(
|
|
381
|
+
currentEnsurePositionActive,
|
|
382
|
+
);
|
|
377
383
|
interactionChain.removeInteraction(interaction);
|
|
378
384
|
interaction.destroy();
|
|
379
385
|
transformationHandler?.destroy();
|
|
@@ -410,7 +416,10 @@ function startEditFeaturesSession(
|
|
|
410
416
|
} else {
|
|
411
417
|
obliqueImageChangedListener = (): void => {};
|
|
412
418
|
}
|
|
413
|
-
if (
|
|
419
|
+
if (
|
|
420
|
+
mode === TransformationMode.EXTRUDE &&
|
|
421
|
+
!(map instanceof BaseCesiumMap)
|
|
422
|
+
) {
|
|
414
423
|
setMode(TransformationMode.TRANSLATE);
|
|
415
424
|
} else {
|
|
416
425
|
createTransformations();
|
|
@@ -432,7 +441,7 @@ function startEditFeaturesSession(
|
|
|
432
441
|
};
|
|
433
442
|
|
|
434
443
|
const originalCreateSyncMap = new Map<string | number, boolean>();
|
|
435
|
-
|
|
444
|
+
app.maps.pausePanoramaImageSelection = true;
|
|
436
445
|
const stop = (): void => {
|
|
437
446
|
destroyTransformation();
|
|
438
447
|
destroyInteractionChain();
|
|
@@ -440,6 +449,7 @@ function startEditFeaturesSession(
|
|
|
440
449
|
mapChangedListener();
|
|
441
450
|
modifierChangedListener();
|
|
442
451
|
unByKey(featureListeners);
|
|
452
|
+
app.maps.pausePanoramaImageSelection = false;
|
|
443
453
|
currentFeatures.forEach((feature) => {
|
|
444
454
|
clearAllowPicking(feature, allowPickingMap);
|
|
445
455
|
clearCreateSync(feature, originalCreateSyncMap);
|
|
@@ -456,7 +456,7 @@ function startEditGeometrySession(
|
|
|
456
456
|
interactionChain,
|
|
457
457
|
removed: interactionRemoved,
|
|
458
458
|
destroy: destroyInteractionChain,
|
|
459
|
-
} = setupInteractionChain(app.maps
|
|
459
|
+
} = setupInteractionChain(app.maps, interactionId);
|
|
460
460
|
|
|
461
461
|
const { layer: scratchLayer, destroy: destroyScratchLayer } =
|
|
462
462
|
setupScratchLayer(app.layers, app.maps.eventHandler.featureInteraction);
|
|
@@ -617,6 +617,7 @@ function startEditGeometrySession(
|
|
|
617
617
|
const mapActivatedListener =
|
|
618
618
|
app.maps.mapActivated.addEventListener(setupActiveMap);
|
|
619
619
|
setupActiveMap();
|
|
620
|
+
app.maps.pausePanoramaImageSelection = true;
|
|
620
621
|
|
|
621
622
|
const stop = (): void => {
|
|
622
623
|
destroyScratchLayer();
|
|
@@ -624,6 +625,7 @@ function startEditGeometrySession(
|
|
|
624
625
|
unByKey(featureListener);
|
|
625
626
|
}
|
|
626
627
|
mapActivatedListener();
|
|
628
|
+
app.maps.pausePanoramaImageSelection = false;
|
|
627
629
|
mapInteractionController.reset();
|
|
628
630
|
mouseOverInteraction.reset();
|
|
629
631
|
destroyCurrentInteractionSet();
|
|
@@ -10,10 +10,10 @@ import type LayerCollection from '../layerCollection.js';
|
|
|
10
10
|
import { maxZIndex } from '../layerCollection.js';
|
|
11
11
|
import { markVolatile } from '../../vcsModule.js';
|
|
12
12
|
import { PrimitiveOptionsType } from '../../layer/vectorProperties.js';
|
|
13
|
-
import type EventHandler from '../../interaction/eventHandler.js';
|
|
14
13
|
import type VcsApp from '../../vcsApp.js';
|
|
15
14
|
import type { InteractionEvent } from '../../interaction/abstractInteraction.js';
|
|
16
15
|
import type FeatureAtPixelInteraction from '../../interaction/featureAtPixelInteraction.js';
|
|
16
|
+
import type MapCollection from '../mapCollection.js';
|
|
17
17
|
|
|
18
18
|
export const alreadySnapped = Symbol('alreadySnapped');
|
|
19
19
|
|
|
@@ -50,6 +50,7 @@ export function setupScratchLayer(
|
|
|
50
50
|
): { layer: VectorLayer; destroy: () => void } {
|
|
51
51
|
// IDEA pass in stopped and cleanup ourselves?
|
|
52
52
|
const layer = new VectorLayer({
|
|
53
|
+
ignoreMapLayerTypes: true,
|
|
53
54
|
projection: mercatorProjection.toJSON(),
|
|
54
55
|
vectorProperties: {
|
|
55
56
|
altitudeMode: 'clampToGround',
|
|
@@ -110,18 +111,19 @@ export function setupScratchLayer(
|
|
|
110
111
|
* Sets up the default interaction chain for the editors. This will set the provided event handlers
|
|
111
112
|
* feature interaction to be active on CLICKMOVE & DRAGSTART. Destroying the setup will reset the interaction
|
|
112
113
|
* to its previous active state.
|
|
113
|
-
* @param
|
|
114
|
+
* @param maps
|
|
114
115
|
* @param [interactionId]
|
|
115
116
|
* @private
|
|
116
117
|
*/
|
|
117
118
|
export function setupInteractionChain(
|
|
118
|
-
|
|
119
|
+
maps: MapCollection,
|
|
119
120
|
interactionId?: string,
|
|
120
121
|
): {
|
|
121
122
|
interactionChain: InteractionChain;
|
|
122
123
|
removed: VcsEvent<void>;
|
|
123
124
|
destroy(this: void): void;
|
|
124
125
|
} {
|
|
126
|
+
const { eventHandler } = maps;
|
|
125
127
|
const interactionChain = new InteractionChain();
|
|
126
128
|
const removed = new VcsEvent<void>();
|
|
127
129
|
const listener = eventHandler.addExclusiveInteraction(
|
|
@@ -19,6 +19,7 @@ import type VectorLayer from '../../../layer/vectorLayer.js';
|
|
|
19
19
|
import { validityPlaceholder } from './createPolygonInteraction.js';
|
|
20
20
|
import type { SnappingInteractionEvent } from '../editorSessionHelpers.js';
|
|
21
21
|
import { alreadySnapped } from '../editorSessionHelpers.js';
|
|
22
|
+
import PanoramaMap from '../../../map/panoramaMap.js';
|
|
22
23
|
|
|
23
24
|
function getBearings(coordinates: Coordinate[]): number[] {
|
|
24
25
|
// we dont want to take into account the last bearing, since that would be our own
|
|
@@ -143,9 +144,14 @@ export default class CreationSnapping extends AbstractInteraction {
|
|
|
143
144
|
this._coordinatesDirty = true;
|
|
144
145
|
});
|
|
145
146
|
}
|
|
147
|
+
|
|
148
|
+
const ctrlKey = event.key === ModificationKeyType.CTRL;
|
|
149
|
+
const useSnapping =
|
|
150
|
+
event.map.className === PanoramaMap.className ? ctrlKey : !ctrlKey;
|
|
151
|
+
|
|
146
152
|
if (
|
|
147
153
|
!event[alreadySnapped] &&
|
|
148
|
-
|
|
154
|
+
useSnapping &&
|
|
149
155
|
this._coordinates.length >= 3
|
|
150
156
|
) {
|
|
151
157
|
const results = new Array<SnapResult | undefined>(2);
|
|
@@ -4,7 +4,7 @@ import type { EventAfterEventHandler } from '../../../interaction/abstractIntera
|
|
|
4
4
|
import AbstractInteraction from '../../../interaction/abstractInteraction.js';
|
|
5
5
|
import { EventType } from '../../../interaction/interactionType.js';
|
|
6
6
|
import { handlerSymbol } from '../editorSymbols.js';
|
|
7
|
-
import
|
|
7
|
+
import BaseCesiumMap from '../../../map/baseCesiumMap.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* This interaction ensure a potential handler is dragged in 3D when it is obscured by a transparent feature.
|
|
@@ -28,7 +28,7 @@ class EnsureHandlerSelectionInteraction extends AbstractInteraction {
|
|
|
28
28
|
event.feature &&
|
|
29
29
|
this._featureSelection.length > 0 &&
|
|
30
30
|
!(event.feature as Feature)[handlerSymbol] &&
|
|
31
|
-
event.map instanceof
|
|
31
|
+
event.map instanceof BaseCesiumMap
|
|
32
32
|
) {
|
|
33
33
|
const scene = event.map.getScene() as Scene;
|
|
34
34
|
const drillPicks = scene.drillPick(
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
setSnappingFeatures,
|
|
17
17
|
getGeometrySnapResult,
|
|
18
18
|
} from '../snappingHelpers.js';
|
|
19
|
+
import PanoramaMap from '../../../map/panoramaMap.js';
|
|
19
20
|
|
|
20
21
|
export default class LayerSnapping extends AbstractInteraction {
|
|
21
22
|
private _removeFeatures: (() => void) | undefined;
|
|
@@ -59,7 +60,12 @@ export default class LayerSnapping extends AbstractInteraction {
|
|
|
59
60
|
|
|
60
61
|
pipe(event: SnappingInteractionEvent): Promise<SnappingInteractionEvent> {
|
|
61
62
|
this._removeFeatures?.();
|
|
62
|
-
|
|
63
|
+
|
|
64
|
+
const ctrlKey = event.key === ModificationKeyType.CTRL;
|
|
65
|
+
const useSnapping =
|
|
66
|
+
event.map.className === PanoramaMap.className ? ctrlKey : !ctrlKey;
|
|
67
|
+
|
|
68
|
+
if (useSnapping) {
|
|
63
69
|
const coordinate = event.positionOrPixel!;
|
|
64
70
|
const bufferDistance = event.map.getCurrentResolution(coordinate) * 12;
|
|
65
71
|
const maxDistanceSquared = bufferDistance ** 2;
|