@vcmap/core 6.1.11 → 6.2.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/README.md +8 -6
- package/build/buildShader.js +61 -0
- package/build/postinstall.js +6 -3
- package/dist/cesium.d.ts +57 -18
- package/dist/geojson.d.ts +3 -2
- package/dist/index.d.ts +244 -109
- package/dist/index.js +82 -63
- package/dist/index.js.map +1 -1
- package/dist/ol.d.ts +27 -29
- package/dist/src/category/category.d.ts +3 -2
- package/dist/src/category/category.js +2 -2
- package/dist/src/category/category.js.map +1 -1
- package/dist/src/category/categoryCollection.d.ts +3 -2
- package/dist/src/category/categoryCollection.js.map +1 -1
- package/dist/src/cesium/cesium3DTileFeature.d.ts +2 -1
- package/dist/src/cesium/cesium3DTileFeature.js +2 -3
- package/dist/src/cesium/cesium3DTileFeature.js.map +1 -1
- package/dist/src/cesium/cesiumVcsCameraPrimitive.js +6 -5
- package/dist/src/cesium/cesiumVcsCameraPrimitive.js.map +1 -1
- package/dist/src/cesium/entity.js +1 -1
- package/dist/src/cesium/entity.js.map +1 -1
- package/dist/src/classRegistry.d.ts +4 -4
- package/dist/src/classRegistry.js +2 -0
- package/dist/src/classRegistry.js.map +1 -1
- package/dist/src/featureProvider/abstractFeatureProvider.d.ts +2 -1
- package/dist/src/featureProvider/abstractFeatureProvider.js +8 -2
- package/dist/src/featureProvider/abstractFeatureProvider.js.map +1 -1
- package/dist/src/featureProvider/wmsFeatureProvider.d.ts +38 -10
- package/dist/src/featureProvider/wmsFeatureProvider.js +69 -15
- package/dist/src/featureProvider/wmsFeatureProvider.js.map +1 -1
- package/dist/src/interaction/abstractInteraction.d.ts +5 -4
- package/dist/src/interaction/abstractInteraction.js +1 -1
- package/dist/src/interaction/abstractInteraction.js.map +1 -1
- package/dist/src/interaction/coordinateAtPixel.js +23 -0
- package/dist/src/interaction/coordinateAtPixel.js.map +1 -1
- package/dist/src/interaction/eventHandler.d.ts +4 -3
- package/dist/src/interaction/eventHandler.js +1 -1
- package/dist/src/interaction/eventHandler.js.map +1 -1
- package/dist/src/interaction/featureAtPixelInteraction.d.ts +5 -0
- package/dist/src/interaction/featureAtPixelInteraction.js +7 -4
- package/dist/src/interaction/featureAtPixelInteraction.js.map +1 -1
- package/dist/src/interaction/featureProviderInteraction.js.map +1 -1
- package/dist/src/interaction/interactionType.js +1 -0
- package/dist/src/interaction/interactionType.js.map +1 -1
- package/dist/src/interaction/panoramaFeatureHighlight.d.ts +29 -0
- package/dist/src/interaction/panoramaFeatureHighlight.js +88 -0
- package/dist/src/interaction/panoramaFeatureHighlight.js.map +1 -0
- package/dist/src/interaction/panoramaImageSelection.d.ts +8 -0
- package/dist/src/interaction/panoramaImageSelection.js +29 -0
- package/dist/src/interaction/panoramaImageSelection.js.map +1 -0
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.d.ts +6 -5
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js +2 -2
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/cogCesiumImpl.d.ts +14 -0
- package/dist/src/layer/cesium/cogCesiumImpl.js +28 -0
- package/dist/src/layer/cesium/cogCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesium/cogImageryProvider.d.ts +31 -0
- package/dist/src/layer/cesium/cogImageryProvider.js +258 -0
- package/dist/src/layer/cesium/cogImageryProvider.js.map +1 -0
- package/dist/src/layer/cesium/dataSourceCesiumImpl.d.ts +3 -2
- package/dist/src/layer/cesium/dataSourceCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/resourceHelper.js +0 -1
- package/dist/src/layer/cesium/resourceHelper.js.map +1 -1
- package/dist/src/layer/cesium/sourceVectorContextSync.d.ts +2 -2
- package/dist/src/layer/cesium/sourceVectorContextSync.js +1 -1
- package/dist/src/layer/cesium/sourceVectorContextSync.js.map +1 -1
- package/dist/src/layer/cesium/terrainCesiumImpl.d.ts +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsChildTile.d.ts +3 -2
- package/dist/src/layer/cesium/vcsTile/vcsChildTile.js +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsChildTile.js.map +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsDebugTile.d.ts +3 -2
- package/dist/src/layer/cesium/vcsTile/vcsDebugTile.js +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsDebugTile.js.map +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsNoDataTile.d.ts +3 -2
- package/dist/src/layer/cesium/vcsTile/vcsNoDataTile.js +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsNoDataTile.js.map +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.d.ts +6 -5
- package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.js +4 -4
- package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.js.map +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsTileHelpers.d.ts +6 -5
- package/dist/src/layer/cesium/vcsTile/vcsTileHelpers.js.map +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsVectorTile.d.ts +3 -2
- package/dist/src/layer/cesium/vcsTile/vcsVectorTile.js +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsVectorTile.js.map +1 -1
- package/dist/src/layer/cesium/vectorCesiumImpl.js +1 -1
- package/dist/src/layer/cesium/vectorCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorContext.d.ts +9 -8
- package/dist/src/layer/cesium/vectorContext.js +6 -5
- package/dist/src/layer/cesium/vectorContext.js.map +1 -1
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.d.ts +1 -1
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js +1 -1
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorTileCesiumImpl.d.ts +3 -3
- package/dist/src/layer/cesium/vectorTileCesiumImpl.js +2 -1
- package/dist/src/layer/cesium/vectorTileCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorTileImageryProvider.d.ts +1 -1
- package/dist/src/layer/cesium/vectorTileImageryProvider.js +3 -2
- package/dist/src/layer/cesium/vectorTileImageryProvider.js.map +1 -1
- package/dist/src/layer/cesium/wmsCesiumImpl.js +3 -2
- package/dist/src/layer/cesium/wmsCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesiumTilesetLayer.d.ts +6 -4
- package/dist/src/layer/cesiumTilesetLayer.js.map +1 -1
- package/dist/src/layer/cogLayer.d.ts +37 -0
- package/dist/src/layer/cogLayer.js +119 -0
- package/dist/src/layer/cogLayer.js.map +1 -0
- package/dist/src/layer/czmlLayer.js.map +1 -1
- package/dist/src/layer/dataSourceLayer.d.ts +4 -2
- package/dist/src/layer/dataSourceLayer.js +1 -1
- package/dist/src/layer/dataSourceLayer.js.map +1 -1
- package/dist/src/layer/featureLayer.d.ts +4 -2
- package/dist/src/layer/featureLayer.js.map +1 -1
- package/dist/src/layer/featureStoreFeatureVisibility.d.ts +2 -1
- package/dist/src/layer/featureStoreFeatureVisibility.js.map +1 -1
- package/dist/src/layer/featureStoreLayer.d.ts +8 -6
- package/dist/src/layer/featureStoreLayer.js +2 -2
- package/dist/src/layer/featureStoreLayer.js.map +1 -1
- package/dist/src/layer/featureStoreLayerChanges.d.ts +1 -1
- package/dist/src/layer/featureStoreLayerChanges.js.map +1 -1
- package/dist/src/layer/featureVisibility.d.ts +2 -1
- package/dist/src/layer/featureVisibility.js.map +1 -1
- package/dist/src/layer/flatGeobufHelpers.d.ts +18 -3
- package/dist/src/layer/flatGeobufHelpers.js +21 -1
- package/dist/src/layer/flatGeobufHelpers.js.map +1 -1
- package/dist/src/layer/flatGeobufLayer.d.ts +2 -1
- package/dist/src/layer/flatGeobufLayer.js.map +1 -1
- package/dist/src/layer/geojsonHelpers.d.ts +1 -1
- package/dist/src/layer/geojsonHelpers.js +8 -6
- package/dist/src/layer/geojsonHelpers.js.map +1 -1
- package/dist/src/layer/geojsonLayer.d.ts +2 -1
- package/dist/src/layer/geojsonLayer.js +3 -1
- package/dist/src/layer/geojsonLayer.js.map +1 -1
- package/dist/src/layer/globalHider.d.ts +1 -1
- package/dist/src/layer/globalHider.js.map +1 -1
- package/dist/src/layer/layer.d.ts +9 -7
- package/dist/src/layer/layer.js +1 -1
- package/dist/src/layer/layer.js.map +1 -1
- package/dist/src/layer/oblique/obliqueHelpers.js +2 -0
- package/dist/src/layer/oblique/obliqueHelpers.js.map +1 -1
- package/dist/src/layer/oblique/sourceObliqueSync.d.ts +1 -1
- package/dist/src/layer/oblique/sourceObliqueSync.js +7 -7
- package/dist/src/layer/oblique/sourceObliqueSync.js.map +1 -1
- package/dist/src/layer/oblique/vectorObliqueImpl.d.ts +2 -2
- package/dist/src/layer/oblique/vectorObliqueImpl.js +3 -3
- package/dist/src/layer/oblique/vectorObliqueImpl.js.map +1 -1
- package/dist/src/layer/openStreetMapLayer.d.ts +5 -4
- package/dist/src/layer/openStreetMapLayer.js +1 -1
- package/dist/src/layer/openStreetMapLayer.js.map +1 -1
- package/dist/src/layer/openlayers/cogOpenlayersImpl.d.ts +23 -0
- package/dist/src/layer/openlayers/cogOpenlayersImpl.js +54 -0
- package/dist/src/layer/openlayers/cogOpenlayersImpl.js.map +1 -0
- package/dist/src/layer/openlayers/layerOpenlayersImpl.d.ts +4 -2
- package/dist/src/layer/openlayers/layerOpenlayersImpl.js +5 -4
- package/dist/src/layer/openlayers/layerOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/loadFunctionHelpers.js +0 -1
- package/dist/src/layer/openlayers/loadFunctionHelpers.js.map +1 -1
- package/dist/src/layer/openlayers/tileDebugOpenlayersImpl.d.ts +1 -1
- package/dist/src/layer/openlayers/tileDebugOpenlayersImpl.js +2 -2
- package/dist/src/layer/openlayers/tileDebugOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/vectorOpenlayersImpl.js +1 -1
- package/dist/src/layer/openlayers/vectorOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.js +1 -1
- package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/wmsOpenlayersImpl.d.ts +1 -1
- package/dist/src/layer/panorama/panoramaDatasetPanoramaImpl.d.ts +13 -0
- package/dist/src/layer/panorama/panoramaDatasetPanoramaImpl.js +34 -0
- package/dist/src/layer/panorama/panoramaDatasetPanoramaImpl.js.map +1 -0
- package/dist/src/layer/panorama/vectorTilePanoramaImpl.d.ts +28 -0
- package/dist/src/layer/panorama/vectorTilePanoramaImpl.js +114 -0
- package/dist/src/layer/panorama/vectorTilePanoramaImpl.js.map +1 -0
- package/dist/src/layer/panoramaDatasetLayer.d.ts +53 -0
- package/dist/src/layer/panoramaDatasetLayer.js +192 -0
- package/dist/src/layer/panoramaDatasetLayer.js.map +1 -0
- package/dist/src/layer/pointCloudLayer.d.ts +8 -5
- package/dist/src/layer/pointCloudLayer.js +1 -1
- package/dist/src/layer/pointCloudLayer.js.map +1 -1
- package/dist/src/layer/rasterLayer.d.ts +6 -4
- package/dist/src/layer/rasterLayer.js.map +1 -1
- package/dist/src/layer/singleImageLayer.d.ts +3 -2
- package/dist/src/layer/singleImageLayer.js.map +1 -1
- package/dist/src/layer/terrainHelpers.d.ts +1 -1
- package/dist/src/layer/terrainHelpers.js.map +1 -1
- package/dist/src/layer/terrainLayer.d.ts +3 -2
- package/dist/src/layer/terrainLayer.js.map +1 -1
- package/dist/src/layer/tileLoadedHelper.d.ts +2 -2
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.d.ts +7 -4
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.js +10 -2
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/mvtTileProvider.d.ts +3 -2
- package/dist/src/layer/tileProvider/mvtTileProvider.js +3 -3
- package/dist/src/layer/tileProvider/mvtTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.d.ts +3 -2
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.js +0 -1
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.d.ts +2 -1
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js +0 -1
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/tileProvider.d.ts +3 -2
- package/dist/src/layer/tileProvider/tileProvider.js +10 -3
- package/dist/src/layer/tileProvider/tileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.d.ts +2 -1
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.js.map +1 -1
- package/dist/src/layer/tmsLayer.d.ts +3 -2
- package/dist/src/layer/tmsLayer.js +1 -1
- package/dist/src/layer/tmsLayer.js.map +1 -1
- package/dist/src/layer/vectorHelpers.d.ts +2 -2
- package/dist/src/layer/vectorHelpers.js +1 -1
- package/dist/src/layer/vectorHelpers.js.map +1 -1
- package/dist/src/layer/vectorLayer.d.ts +12 -8
- package/dist/src/layer/vectorLayer.js +1 -1
- package/dist/src/layer/vectorLayer.js.map +1 -1
- package/dist/src/layer/vectorProperties.d.ts +3 -3
- package/dist/src/layer/vectorProperties.js +4 -0
- package/dist/src/layer/vectorProperties.js.map +1 -1
- package/dist/src/layer/vectorSymbols.d.ts +8 -0
- package/dist/src/layer/vectorSymbols.js +8 -0
- package/dist/src/layer/vectorSymbols.js.map +1 -1
- package/dist/src/layer/vectorTileLayer.d.ts +17 -10
- package/dist/src/layer/vectorTileLayer.js +8 -1
- package/dist/src/layer/vectorTileLayer.js.map +1 -1
- package/dist/src/layer/wfsLayer.d.ts +2 -1
- package/dist/src/layer/wfsLayer.js +6 -4
- package/dist/src/layer/wfsLayer.js.map +1 -1
- package/dist/src/layer/wmsHelpers.js +2 -2
- package/dist/src/layer/wmsHelpers.js.map +1 -1
- package/dist/src/layer/wmsLayer.d.ts +4 -3
- package/dist/src/layer/wmsLayer.js.map +1 -1
- package/dist/src/layer/wmtsLayer.d.ts +3 -2
- package/dist/src/layer/wmtsLayer.js +1 -1
- package/dist/src/layer/wmtsLayer.js.map +1 -1
- package/dist/src/map/baseOLMap.d.ts +1 -1
- package/dist/src/map/baseOLMap.js +17 -8
- package/dist/src/map/baseOLMap.js.map +1 -1
- package/dist/src/map/cameraLimiter.d.ts +2 -1
- package/dist/src/map/cameraLimiter.js.map +1 -1
- package/dist/src/map/cesiumMap.d.ts +5 -7
- package/dist/src/map/cesiumMap.js +27 -186
- package/dist/src/map/cesiumMap.js.map +1 -1
- package/dist/src/map/cesiumMapHelpers.d.ts +7 -0
- package/dist/src/map/cesiumMapHelpers.js +144 -0
- package/dist/src/map/cesiumMapHelpers.js.map +1 -0
- package/dist/src/map/navigation/cameraHelper.d.ts +3 -2
- package/dist/src/map/navigation/cameraHelper.js.map +1 -1
- package/dist/src/map/navigation/cesiumNavigation.d.ts +4 -3
- package/dist/src/map/navigation/cesiumNavigation.js.map +1 -1
- package/dist/src/map/navigation/controller/controller.d.ts +1 -1
- package/dist/src/map/navigation/controller/controller.js +2 -2
- package/dist/src/map/navigation/controller/controller.js.map +1 -1
- package/dist/src/map/navigation/controller/keyboardController.d.ts +3 -2
- package/dist/src/map/navigation/controller/keyboardController.js +4 -2
- package/dist/src/map/navigation/controller/keyboardController.js.map +1 -1
- package/dist/src/map/navigation/easingHelper.d.ts +1 -1
- package/dist/src/map/navigation/easingHelper.js +1 -1
- package/dist/src/map/navigation/easingHelper.js.map +1 -1
- package/dist/src/map/navigation/navigation.d.ts +6 -6
- package/dist/src/map/navigation/navigation.js +6 -2
- package/dist/src/map/navigation/navigation.js.map +1 -1
- package/dist/src/map/navigation/navigationImpl.d.ts +2 -2
- package/dist/src/map/navigation/obliqueNavigation.d.ts +4 -3
- package/dist/src/map/navigation/obliqueNavigation.js +3 -1
- package/dist/src/map/navigation/obliqueNavigation.js.map +1 -1
- package/dist/src/map/navigation/openlayersNavigation.d.ts +4 -3
- package/dist/src/map/navigation/openlayersNavigation.js.map +1 -1
- package/dist/src/map/navigation/viewHelper.d.ts +2 -2
- package/dist/src/map/navigation/viewHelper.js +0 -1
- package/dist/src/map/navigation/viewHelper.js.map +1 -1
- package/dist/src/map/obliqueMap.d.ts +3 -3
- package/dist/src/map/obliqueMap.js +1 -1
- package/dist/src/map/obliqueMap.js.map +1 -1
- package/dist/src/map/panoramaMap.d.ts +98 -0
- package/dist/src/map/panoramaMap.js +298 -0
- package/dist/src/map/panoramaMap.js.map +1 -0
- package/dist/src/map/vcsMap.d.ts +3 -3
- package/dist/src/map/vcsMap.js +17 -11
- package/dist/src/map/vcsMap.js.map +1 -1
- package/dist/src/moduleIdSymbol.js +0 -1
- package/dist/src/moduleIdSymbol.js.map +1 -1
- package/dist/src/oblique/defaultObliqueCollection.js +3 -1
- package/dist/src/oblique/defaultObliqueCollection.js.map +1 -1
- package/dist/src/oblique/helpers.d.ts +1 -1
- package/dist/src/oblique/helpers.js +1 -1
- package/dist/src/oblique/helpers.js.map +1 -1
- package/dist/src/oblique/obliqueCollection.d.ts +3 -2
- package/dist/src/oblique/obliqueCollection.js.map +1 -1
- package/dist/src/oblique/obliqueDataSet.d.ts +2 -1
- package/dist/src/oblique/obliqueDataSet.js.map +1 -1
- package/dist/src/oblique/obliqueImage.d.ts +1 -1
- package/dist/src/oblique/obliqueProvider.d.ts +1 -1
- package/dist/src/oblique/obliqueProvider.js.map +1 -1
- package/dist/src/oblique/obliqueView.js +1 -0
- package/dist/src/oblique/obliqueView.js.map +1 -1
- package/dist/src/oblique/parseImageJson.js +2 -3
- package/dist/src/oblique/parseImageJson.js.map +1 -1
- package/dist/src/ol/feature.js.map +1 -1
- package/dist/src/ol/geom/circle.js.map +1 -1
- package/dist/src/ol/render/canvas/canvasTileRenderer.js +0 -1
- package/dist/src/ol/render/canvas/canvasTileRenderer.js.map +1 -1
- package/dist/src/ol/source/ClusterEnhancedVectorSource.d.ts +1 -1
- package/dist/src/ol/source/VcsCluster.d.ts +3 -3
- package/dist/src/ol/source/VcsCluster.js.map +1 -1
- package/dist/src/overrideClassRegistry.d.ts +3 -3
- package/dist/src/overrideClassRegistry.js +1 -0
- package/dist/src/overrideClassRegistry.js.map +1 -1
- package/dist/src/panorama/fieldOfView.d.ts +57 -0
- package/dist/src/panorama/fieldOfView.js +135 -0
- package/dist/src/panorama/fieldOfView.js.map +1 -0
- package/dist/src/panorama/panoramaCameraController.d.ts +35 -0
- package/dist/src/panorama/panoramaCameraController.js +146 -0
- package/dist/src/panorama/panoramaCameraController.js.map +1 -0
- package/dist/src/panorama/panoramaImage.d.ts +135 -0
- package/dist/src/panorama/panoramaImage.js +269 -0
- package/dist/src/panorama/panoramaImage.js.map +1 -0
- package/dist/src/panorama/panoramaImageView.d.ts +25 -0
- package/dist/src/panorama/panoramaImageView.js +328 -0
- package/dist/src/panorama/panoramaImageView.js.map +1 -0
- package/dist/src/panorama/panoramaTile.d.ts +23 -0
- package/dist/src/panorama/panoramaTile.js +101 -0
- package/dist/src/panorama/panoramaTile.js.map +1 -0
- package/dist/src/panorama/panoramaTileCache.d.ts +16 -0
- package/dist/src/panorama/panoramaTileCache.js +34 -0
- package/dist/src/panorama/panoramaTileCache.js.map +1 -0
- package/dist/src/panorama/panoramaTileCoordinate.d.ts +56 -0
- package/dist/src/panorama/panoramaTileCoordinate.js +110 -0
- package/dist/src/panorama/panoramaTileCoordinate.js.map +1 -0
- package/dist/src/panorama/panoramaTileMaterial.d.ts +96 -0
- package/dist/src/panorama/panoramaTileMaterial.js +213 -0
- package/dist/src/panorama/panoramaTileMaterial.js.map +1 -0
- package/dist/src/panorama/panoramaTileMaterialFS.shader.d.ts +2 -0
- package/dist/src/panorama/panoramaTileMaterialFS.shader.js +170 -0
- package/dist/src/panorama/panoramaTileMaterialFS.shader.js.map +1 -0
- package/dist/src/panorama/panoramaTilePrimitiveCollection.d.ts +31 -0
- package/dist/src/panorama/panoramaTilePrimitiveCollection.js +113 -0
- package/dist/src/panorama/panoramaTilePrimitiveCollection.js.map +1 -0
- package/dist/src/panorama/panoramaTileProvider.d.ts +67 -0
- package/dist/src/panorama/panoramaTileProvider.js +312 -0
- package/dist/src/panorama/panoramaTileProvider.js.map +1 -0
- package/dist/src/panorama/sphericalCoordinates.d.ts +20 -0
- package/dist/src/panorama/sphericalCoordinates.js +78 -0
- package/dist/src/panorama/sphericalCoordinates.js.map +1 -0
- package/dist/src/style/arrowStyle.d.ts +1 -1
- package/dist/src/style/arrowStyle.js.map +1 -1
- package/dist/src/style/declarativeStyleItem.d.ts +1 -1
- package/dist/src/style/declarativeStyleItem.js +12 -14
- package/dist/src/style/declarativeStyleItem.js.map +1 -1
- package/dist/src/style/styleFactory.d.ts +2 -2
- package/dist/src/style/styleFactory.js +1 -2
- package/dist/src/style/styleFactory.js.map +1 -1
- package/dist/src/style/styleHelpers.d.ts +2 -2
- package/dist/src/style/styleHelpers.js +6 -6
- package/dist/src/style/styleHelpers.js.map +1 -1
- package/dist/src/style/styleItem.d.ts +4 -2
- package/dist/src/style/styleItem.js +3 -1
- package/dist/src/style/styleItem.js.map +1 -1
- package/dist/src/style/vectorStyleItem.d.ts +7 -5
- package/dist/src/style/vectorStyleItem.js +9 -19
- package/dist/src/style/vectorStyleItem.js.map +1 -1
- package/dist/src/style/writeStyle.d.ts +2 -2
- 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/clippingPolygonHelper.d.ts +2 -1
- package/dist/src/util/clipping/clippingPolygonHelper.js.map +1 -1
- package/dist/src/util/clipping/clippingPolygonObject.d.ts +4 -3
- package/dist/src/util/clipping/clippingPolygonObject.js.map +1 -1
- package/dist/src/util/clipping/clippingPolygonObjectCollection.d.ts +3 -4
- package/dist/src/util/clipping/clippingPolygonObjectCollection.js +37 -11
- package/dist/src/util/clipping/clippingPolygonObjectCollection.js.map +1 -1
- package/dist/src/util/collection.js.map +1 -1
- package/dist/src/util/createAbsoluteFeature.d.ts +4 -0
- package/dist/src/util/createAbsoluteFeature.js +98 -0
- package/dist/src/util/createAbsoluteFeature.js.map +1 -0
- package/dist/src/util/displayQuality/displayQuality.d.ts +3 -5
- package/dist/src/util/displayQuality/displayQuality.js +4 -5
- package/dist/src/util/displayQuality/displayQuality.js.map +1 -1
- package/dist/src/util/editor/createFeatureSession.d.ts +4 -3
- package/dist/src/util/editor/createFeatureSession.js.map +1 -1
- package/dist/src/util/editor/editFeaturesSession.d.ts +2 -1
- package/dist/src/util/editor/editFeaturesSession.js +3 -1
- package/dist/src/util/editor/editFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/editGeometrySession.d.ts +3 -2
- package/dist/src/util/editor/editGeometrySession.js.map +1 -1
- package/dist/src/util/editor/editorHelpers.d.ts +5 -4
- package/dist/src/util/editor/editorHelpers.js +4 -0
- package/dist/src/util/editor/editorHelpers.js.map +1 -1
- package/dist/src/util/editor/editorSessionHelpers.d.ts +3 -3
- package/dist/src/util/editor/editorSessionHelpers.js.map +1 -1
- package/dist/src/util/editor/interactions/createCircleInteraction.d.ts +2 -1
- package/dist/src/util/editor/interactions/createCircleInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createLineStringInteraction.d.ts +3 -2
- package/dist/src/util/editor/interactions/createLineStringInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createPointInteraction.d.ts +3 -2
- package/dist/src/util/editor/interactions/createPointInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createPolygonInteraction.d.ts +3 -2
- package/dist/src/util/editor/interactions/createPolygonInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/creationSnapping.d.ts +2 -2
- package/dist/src/util/editor/interactions/creationSnapping.js +1 -1
- package/dist/src/util/editor/interactions/creationSnapping.js.map +1 -1
- package/dist/src/util/editor/interactions/editFeaturesMouseOverInteraction.d.ts +2 -1
- package/dist/src/util/editor/interactions/editFeaturesMouseOverInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.d.ts +2 -1
- package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.d.ts +2 -1
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/insertVertexInteraction.d.ts +3 -2
- package/dist/src/util/editor/interactions/insertVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/layerSnapping.d.ts +4 -4
- package/dist/src/util/editor/interactions/layerSnapping.js +1 -1
- package/dist/src/util/editor/interactions/layerSnapping.js.map +1 -1
- package/dist/src/util/editor/interactions/mapInteractionController.d.ts +2 -1
- package/dist/src/util/editor/interactions/mapInteractionController.js +1 -0
- package/dist/src/util/editor/interactions/mapInteractionController.js.map +1 -1
- package/dist/src/util/editor/interactions/removeVertexInteraction.d.ts +3 -2
- package/dist/src/util/editor/interactions/removeVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/rightClickInteraction.d.ts +2 -1
- package/dist/src/util/editor/interactions/rightClickInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/segmentLengthInteraction.d.ts +2 -1
- package/dist/src/util/editor/interactions/segmentLengthInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/selectFeatureMouseOverInteraction.d.ts +3 -2
- package/dist/src/util/editor/interactions/selectFeatureMouseOverInteraction.js +13 -13
- package/dist/src/util/editor/interactions/selectFeatureMouseOverInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/selectMultiFeatureInteraction.d.ts +3 -3
- package/dist/src/util/editor/interactions/selectMultiFeatureInteraction.js +1 -1
- package/dist/src/util/editor/interactions/selectMultiFeatureInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/selectSingleFeatureInteraction.d.ts +2 -1
- package/dist/src/util/editor/interactions/selectSingleFeatureInteraction.js +1 -1
- package/dist/src/util/editor/interactions/selectSingleFeatureInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/translateVertexInteraction.d.ts +3 -2
- package/dist/src/util/editor/interactions/translateVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/translationSnapping.d.ts +2 -2
- package/dist/src/util/editor/interactions/translationSnapping.js +1 -1
- package/dist/src/util/editor/interactions/translationSnapping.js.map +1 -1
- package/dist/src/util/editor/selectFeaturesSession.d.ts +3 -2
- package/dist/src/util/editor/selectFeaturesSession.js +1 -1
- package/dist/src/util/editor/selectFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/snappingHelpers.d.ts +3 -3
- package/dist/src/util/editor/snappingHelpers.js.map +1 -1
- package/dist/src/util/editor/transformation/create2DHandlers.d.ts +2 -1
- package/dist/src/util/editor/transformation/create2DHandlers.js.map +1 -1
- package/dist/src/util/editor/transformation/create3DHandlers.d.ts +3 -2
- package/dist/src/util/editor/transformation/create3DHandlers.js.map +1 -1
- package/dist/src/util/editor/transformation/extrudeInteraction.d.ts +3 -2
- package/dist/src/util/editor/transformation/extrudeInteraction.js +1 -1
- package/dist/src/util/editor/transformation/extrudeInteraction.js.map +1 -1
- package/dist/src/util/editor/transformation/rotateInteraction.d.ts +4 -2
- package/dist/src/util/editor/transformation/rotateInteraction.js +1 -1
- package/dist/src/util/editor/transformation/rotateInteraction.js.map +1 -1
- package/dist/src/util/editor/transformation/scaleInteraction.d.ts +3 -2
- package/dist/src/util/editor/transformation/scaleInteraction.js +1 -1
- package/dist/src/util/editor/transformation/scaleInteraction.js.map +1 -1
- package/dist/src/util/editor/transformation/transformationHandler.d.ts +2 -1
- package/dist/src/util/editor/transformation/transformationHandler.js +1 -1
- package/dist/src/util/editor/transformation/transformationHandler.js.map +1 -1
- package/dist/src/util/editor/transformation/translateInteraction.d.ts +3 -2
- 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/exclusiveManager.d.ts +1 -1
- package/dist/src/util/exclusiveManager.js.map +1 -1
- package/dist/src/util/featureconverter/arcToCesium.d.ts +1 -1
- package/dist/src/util/featureconverter/arcToCesium.js +1 -2
- package/dist/src/util/featureconverter/arcToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/circleToCesium.d.ts +1 -1
- package/dist/src/util/featureconverter/circleToCesium.js +1 -1
- package/dist/src/util/featureconverter/circleToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/clampedPrimitive.d.ts +2 -1
- package/dist/src/util/featureconverter/clampedPrimitive.js +0 -1
- package/dist/src/util/featureconverter/clampedPrimitive.js.map +1 -1
- package/dist/src/util/featureconverter/convert.d.ts +4 -3
- package/dist/src/util/featureconverter/convert.js +1 -1
- package/dist/src/util/featureconverter/convert.js.map +1 -1
- package/dist/src/util/featureconverter/extent3D.d.ts +2 -2
- package/dist/src/util/featureconverter/extent3D.js.map +1 -1
- package/dist/src/util/featureconverter/lineStringToCesium.d.ts +5 -5
- package/dist/src/util/featureconverter/lineStringToCesium.js +1 -2
- package/dist/src/util/featureconverter/lineStringToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/pointHelpers.d.ts +6 -5
- package/dist/src/util/featureconverter/pointHelpers.js +2 -3
- package/dist/src/util/featureconverter/pointHelpers.js.map +1 -1
- package/dist/src/util/featureconverter/pointToCesium.d.ts +6 -11
- package/dist/src/util/featureconverter/pointToCesium.js +3 -20
- package/dist/src/util/featureconverter/pointToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/polygonToCesium.d.ts +1 -1
- package/dist/src/util/featureconverter/polygonToCesium.js +1 -1
- package/dist/src/util/featureconverter/polygonToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/storeyHelpers.d.ts +2 -2
- package/dist/src/util/featureconverter/vectorGeometryFactory.d.ts +2 -2
- package/dist/src/util/featureconverter/vectorGeometryFactory.js.map +1 -1
- package/dist/src/util/featureconverter/vectorHeightInfo.d.ts +8 -2
- package/dist/src/util/featureconverter/vectorHeightInfo.js +17 -0
- package/dist/src/util/featureconverter/vectorHeightInfo.js.map +1 -1
- package/dist/src/util/flight/flightAnchor.js +4 -3
- package/dist/src/util/flight/flightAnchor.js.map +1 -1
- package/dist/src/util/flight/flightCollection.d.ts +2 -2
- package/dist/src/util/flight/flightCollection.js.map +1 -1
- package/dist/src/util/flight/flightHelpers.d.ts +1 -1
- package/dist/src/util/flight/flightInstance.d.ts +3 -2
- package/dist/src/util/flight/flightInstance.js.map +1 -1
- package/dist/src/util/flight/flightPlayer.js +1 -1
- package/dist/src/util/flight/flightPlayer.js.map +1 -1
- package/dist/src/util/flight/flightRecorder.d.ts +10 -0
- package/dist/src/util/flight/flightRecorder.js +172 -0
- package/dist/src/util/flight/flightRecorder.js.map +1 -0
- package/dist/src/util/flight/flightVisualizer.d.ts +1 -1
- package/dist/src/util/flight/flightVisualizer.js.map +1 -1
- package/dist/src/util/geometryHelpers.d.ts +3 -5
- package/dist/src/util/geometryHelpers.js +0 -91
- package/dist/src/util/geometryHelpers.js.map +1 -1
- package/dist/src/util/hiddenObjects.d.ts +2 -2
- package/dist/src/util/hiddenObjects.js +0 -1
- package/dist/src/util/hiddenObjects.js.map +1 -1
- package/dist/src/util/indexedCollection.js.map +1 -1
- package/dist/src/util/isMobile.js +3 -2
- package/dist/src/util/isMobile.js.map +1 -1
- package/dist/src/util/layerCollection.d.ts +6 -1
- package/dist/src/util/layerCollection.js +5 -1
- package/dist/src/util/layerCollection.js.map +1 -1
- package/dist/src/util/locale.js +0 -1
- package/dist/src/util/locale.js.map +1 -1
- package/dist/src/util/mapCollection.d.ts +9 -4
- package/dist/src/util/mapCollection.js +67 -34
- package/dist/src/util/mapCollection.js.map +1 -1
- package/dist/src/util/math.d.ts +4 -1
- package/dist/src/util/math.js +20 -1
- package/dist/src/util/math.js.map +1 -1
- package/dist/src/util/overrideCollection.d.ts +1 -1
- package/dist/src/util/overrideCollection.js +3 -1
- package/dist/src/util/overrideCollection.js.map +1 -1
- package/dist/src/util/projection.d.ts +1 -1
- package/dist/src/util/projection.js +2 -2
- package/dist/src/util/projection.js.map +1 -1
- package/dist/src/util/renderScreenshot.d.ts +1 -1
- package/dist/src/util/rotation.d.ts +4 -3
- package/dist/src/util/rotation.js +1 -1
- package/dist/src/util/rotation.js.map +1 -1
- package/dist/src/util/urlHelpers.js +0 -1
- package/dist/src/util/urlHelpers.js.map +1 -1
- package/dist/src/util/vcsTemplate.js +2 -4
- package/dist/src/util/vcsTemplate.js.map +1 -1
- package/dist/src/util/viewpoint.d.ts +6 -2
- package/dist/src/util/viewpoint.js +11 -1
- package/dist/src/util/viewpoint.js.map +1 -1
- package/dist/src/vcsApp.d.ts +7 -6
- package/dist/src/vcsApp.js +20 -14
- package/dist/src/vcsApp.js.map +1 -1
- package/dist/src/vcsEvent.js.map +1 -1
- package/dist/src/vcsModuleHelpers.js +3 -3
- package/dist/src/vcsModuleHelpers.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterCesiumContext.d.ts +4 -4
- package/dist/src/vectorCluster/vectorClusterCesiumContext.js +1 -1
- package/dist/src/vectorCluster/vectorClusterCesiumContext.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterGroup.d.ts +9 -6
- package/dist/src/vectorCluster/vectorClusterGroup.js +17 -5
- package/dist/src/vectorCluster/vectorClusterGroup.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterGroupCesiumImpl.d.ts +2 -2
- package/dist/src/vectorCluster/vectorClusterGroupCesiumImpl.js +1 -1
- package/dist/src/vectorCluster/vectorClusterGroupCesiumImpl.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterGroupCollection.d.ts +1 -1
- package/dist/src/vectorCluster/vectorClusterGroupImpl.d.ts +5 -5
- package/dist/src/vectorCluster/vectorClusterGroupObliqueImpl.d.ts +2 -2
- package/dist/src/vectorCluster/vectorClusterGroupObliqueImpl.js +1 -1
- package/dist/src/vectorCluster/vectorClusterGroupObliqueImpl.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterGroupOpenlayersImpl.d.ts +2 -2
- package/dist/src/vectorCluster/vectorClusterStyleItem.d.ts +4 -3
- package/dist/src/vectorCluster/vectorClusterStyleItem.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterSymbols.js +0 -1
- package/dist/src/vectorCluster/vectorClusterSymbols.js.map +1 -1
- package/dist/src/workers/panoramaImageWorker.d.ts +1 -0
- package/dist/src/workers/panoramaImageWorker.js +34 -0
- package/dist/src/workers/panoramaImageWorker.js.map +1 -0
- package/dist/tests/data/cog/test_grey_world.tif +0 -0
- package/dist/tests/data/cog/test_rgb.tif +0 -0
- package/dist/tests/data/cog/test_rgb_world.tif +0 -0
- package/dist/tests/data/panorama/badOrientation.tif +0 -0
- package/dist/tests/data/panorama/badPosition.tif +0 -0
- package/dist/tests/data/panorama/lowOverview.tif +0 -0
- package/dist/tests/data/panorama/noVersionDepth.tif +0 -0
- package/dist/tests/data/panorama/noVersionRgb.tif +0 -0
- package/dist/tests/data/panorama/testDepthGeotiff.tif +0 -0
- package/dist/tests/data/panorama/testRgbGeotiff.tif +0 -0
- package/dist/tests/unit/helpers/cesiumHelpers.d.ts +6 -2
- package/dist/tests/unit/helpers/cesiumHelpers.js +15 -6
- package/dist/tests/unit/helpers/cesiumHelpers.js.map +1 -1
- package/dist/tests/unit/helpers/flatGeobufHelpers.d.ts +2 -0
- package/dist/tests/unit/helpers/flatGeobufHelpers.js +13 -0
- package/dist/tests/unit/helpers/flatGeobufHelpers.js.map +1 -0
- package/dist/tests/unit/helpers/helpers.d.ts +4 -0
- package/dist/tests/unit/helpers/helpers.js +26 -1
- package/dist/tests/unit/helpers/helpers.js.map +1 -1
- package/dist/tests/unit/helpers/panoramaHelpers.d.ts +30 -0
- package/dist/tests/unit/helpers/panoramaHelpers.js +76 -0
- package/dist/tests/unit/helpers/panoramaHelpers.js.map +1 -0
- package/index.ts +325 -279
- package/package.json +17 -49
- package/src/category/category.ts +9 -6
- package/src/category/categoryCollection.ts +4 -3
- package/src/cesium/cesium.d.ts +57 -18
- package/src/cesium/cesium3DTileFeature.ts +6 -7
- package/src/cesium/cesiumVcsCameraPrimitive.ts +6 -5
- package/src/cesium/entity.ts +1 -1
- package/src/classRegistry.ts +19 -18
- package/src/featureProvider/abstractFeatureProvider.ts +8 -4
- package/src/featureProvider/wmsFeatureProvider.ts +97 -23
- package/src/global.d.ts +6 -1
- package/src/interaction/abstractInteraction.ts +5 -5
- package/src/interaction/coordinateAtPixel.ts +37 -0
- package/src/interaction/eventHandler.ts +6 -8
- package/src/interaction/featureAtPixelInteraction.ts +24 -13
- package/src/interaction/featureProviderInteraction.ts +6 -7
- package/src/interaction/interactionType.ts +1 -0
- package/src/interaction/panoramaFeatureHighlight.ts +109 -0
- package/src/interaction/panoramaImageSelection.ts +37 -0
- package/src/layer/cesium/cesiumTilesetCesiumImpl.ts +14 -10
- package/src/layer/cesium/cogCesiumImpl.ts +36 -0
- package/src/layer/cesium/cogImageryProvider.ts +389 -0
- package/src/layer/cesium/dataSourceCesiumImpl.ts +8 -6
- package/src/layer/cesium/resourceHelper.ts +0 -1
- package/src/layer/cesium/sourceVectorContextSync.ts +4 -4
- package/src/layer/cesium/terrainCesiumImpl.ts +1 -1
- package/src/layer/cesium/vcsTile/vcsChildTile.ts +3 -3
- package/src/layer/cesium/vcsTile/vcsDebugTile.ts +5 -10
- package/src/layer/cesium/vcsTile/vcsNoDataTile.ts +3 -3
- package/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.ts +19 -17
- package/src/layer/cesium/vcsTile/vcsTileHelpers.ts +10 -8
- package/src/layer/cesium/vcsTile/vcsVectorTile.ts +7 -11
- package/src/layer/cesium/vectorCesiumImpl.ts +2 -4
- package/src/layer/cesium/vectorContext.ts +32 -25
- package/src/layer/cesium/vectorRasterTileCesiumImpl.ts +2 -2
- package/src/layer/cesium/vectorTileCesiumImpl.ts +5 -7
- package/src/layer/cesium/vectorTileImageryProvider.ts +4 -4
- package/src/layer/cesium/wmsCesiumImpl.ts +3 -2
- package/src/layer/cesiumTilesetLayer.ts +6 -8
- package/src/layer/cogLayer.ts +162 -0
- package/src/layer/czmlLayer.ts +2 -2
- package/src/layer/dataSourceLayer.ts +4 -6
- package/src/layer/featureLayer.ts +6 -4
- package/src/layer/featureStoreFeatureVisibility.ts +2 -1
- package/src/layer/featureStoreLayer.ts +18 -14
- package/src/layer/featureStoreLayerChanges.ts +7 -7
- package/src/layer/featureVisibility.ts +3 -2
- package/src/layer/flatGeobufHelpers.ts +46 -6
- package/src/layer/flatGeobufLayer.ts +2 -1
- package/src/layer/geojsonHelpers.ts +11 -8
- package/src/layer/geojsonLayer.ts +8 -5
- package/src/layer/globalHider.ts +5 -3
- package/src/layer/layer.ts +14 -14
- package/src/layer/oblique/obliqueHelpers.ts +2 -0
- package/src/layer/oblique/sourceObliqueSync.ts +9 -9
- package/src/layer/oblique/vectorObliqueImpl.ts +6 -8
- package/src/layer/openStreetMapLayer.ts +7 -8
- package/src/layer/openlayers/cogOpenlayersImpl.ts +75 -0
- package/src/layer/openlayers/layerOpenlayersImpl.ts +9 -7
- package/src/layer/openlayers/loadFunctionHelpers.ts +0 -1
- package/src/layer/openlayers/tileDebugOpenlayersImpl.ts +3 -3
- package/src/layer/openlayers/vectorOpenlayersImpl.ts +1 -1
- package/src/layer/openlayers/vectorTileOpenlayersImpl.ts +3 -3
- package/src/layer/openlayers/wmsOpenlayersImpl.ts +1 -1
- package/src/layer/panorama/panoramaDatasetPanoramaImpl.ts +49 -0
- package/src/layer/panorama/vectorTilePanoramaImpl.ts +163 -0
- package/src/layer/panoramaDatasetLayer.ts +272 -0
- package/src/layer/pointCloudLayer.ts +9 -12
- package/src/layer/rasterLayer.ts +6 -5
- package/src/layer/singleImageLayer.ts +3 -2
- package/src/layer/terrainHelpers.ts +2 -1
- package/src/layer/terrainLayer.ts +3 -2
- package/src/layer/tileLoadedHelper.ts +2 -2
- package/src/layer/tileProvider/flatGeobufTileProvider.ts +22 -10
- package/src/layer/tileProvider/mvtTileProvider.ts +4 -6
- package/src/layer/tileProvider/staticFeatureTileProvider.ts +3 -3
- package/src/layer/tileProvider/staticGeojsonTileProvider.ts +2 -2
- package/src/layer/tileProvider/tileProvider.ts +15 -10
- package/src/layer/tileProvider/urlTemplateTileProvider.ts +2 -1
- package/src/layer/tmsLayer.ts +3 -3
- package/src/layer/vectorHelpers.ts +3 -4
- package/src/layer/vectorLayer.ts +14 -15
- package/src/layer/vectorProperties.ts +27 -16
- package/src/layer/vectorSymbols.ts +10 -0
- package/src/layer/vectorTileLayer.ts +39 -29
- package/src/layer/wfsLayer.ts +10 -7
- package/src/layer/wmsHelpers.ts +2 -2
- package/src/layer/wmsLayer.ts +5 -5
- package/src/layer/wmtsLayer.ts +3 -3
- package/src/map/baseOLMap.ts +18 -9
- package/src/map/cameraLimiter.ts +1 -1
- package/src/map/cesiumMap.ts +49 -265
- package/src/map/cesiumMapHelpers.ts +219 -0
- package/src/map/navigation/cameraHelper.ts +2 -3
- package/src/map/navigation/cesiumNavigation.ts +5 -4
- package/src/map/navigation/controller/controller.ts +3 -6
- package/src/map/navigation/controller/keyboardController.ts +7 -7
- package/src/map/navigation/easingHelper.ts +2 -5
- package/src/map/navigation/navigation.ts +18 -14
- package/src/map/navigation/navigationImpl.ts +2 -2
- package/src/map/navigation/obliqueNavigation.ts +7 -6
- package/src/map/navigation/openlayersNavigation.ts +4 -3
- package/src/map/navigation/viewHelper.ts +2 -3
- package/src/map/obliqueMap.ts +7 -9
- package/src/map/panoramaMap.ts +415 -0
- package/src/map/vcsMap.ts +19 -16
- package/src/moduleIdSymbol.ts +0 -1
- package/src/oblique/defaultObliqueCollection.ts +1 -0
- package/src/oblique/helpers.ts +2 -4
- package/src/oblique/obliqueCollection.ts +7 -7
- package/src/oblique/obliqueDataSet.ts +7 -6
- package/src/oblique/obliqueImage.ts +1 -1
- package/src/oblique/obliqueProvider.ts +3 -3
- package/src/oblique/obliqueView.ts +1 -0
- package/src/oblique/parseImageJson.ts +11 -12
- package/src/ol/feature.ts +1 -0
- package/src/ol/geojson.d.ts +3 -2
- package/src/ol/geom/circle.ts +1 -1
- package/src/ol/ol.d.ts +27 -29
- package/src/ol/render/canvas/canvasTileRenderer.js +0 -1
- package/src/ol/source/ClusterEnhancedVectorSource.ts +1 -1
- package/src/ol/source/VcsCluster.ts +4 -4
- package/src/overrideClassRegistry.ts +14 -10
- package/src/panorama/fieldOfView.ts +254 -0
- package/src/panorama/panoramaCameraController.ts +206 -0
- package/src/panorama/panoramaImage.ts +531 -0
- package/src/panorama/panoramaImageView.ts +445 -0
- package/src/panorama/panoramaTile.ts +154 -0
- package/src/panorama/panoramaTileCache.ts +40 -0
- package/src/panorama/panoramaTileCoordinate.ts +166 -0
- package/src/panorama/panoramaTileMaterial.ts +309 -0
- package/src/panorama/panoramaTileMaterialFS.glsl +165 -0
- package/src/panorama/panoramaTilePrimitiveCollection.ts +158 -0
- package/src/panorama/panoramaTileProvider.ts +533 -0
- package/src/panorama/sphericalCoordinates.ts +96 -0
- package/src/style/arrowStyle.ts +1 -1
- package/src/style/declarativeStyleItem.ts +19 -19
- package/src/style/styleFactory.ts +6 -7
- package/src/style/styleHelpers.ts +9 -9
- package/src/style/styleItem.ts +8 -3
- package/src/style/vectorStyleItem.ts +24 -30
- package/src/style/writeStyle.ts +3 -2
- package/src/util/clipping/clippingObject.ts +2 -3
- package/src/util/clipping/clippingObjectManager.ts +3 -3
- package/src/util/clipping/clippingPolygonHelper.ts +1 -2
- package/src/util/clipping/clippingPolygonObject.ts +4 -3
- package/src/util/clipping/clippingPolygonObjectCollection.ts +43 -27
- package/src/util/collection.ts +1 -1
- package/src/util/createAbsoluteFeature.ts +155 -0
- package/src/util/displayQuality/displayQuality.ts +7 -8
- package/src/util/editor/createFeatureSession.ts +12 -12
- package/src/util/editor/editFeaturesSession.ts +6 -4
- package/src/util/editor/editGeometrySession.ts +4 -3
- package/src/util/editor/editorHelpers.ts +14 -12
- package/src/util/editor/editorSessionHelpers.ts +13 -12
- package/src/util/editor/interactions/createCircleInteraction.ts +2 -3
- package/src/util/editor/interactions/createLineStringInteraction.ts +3 -4
- package/src/util/editor/interactions/createPointInteraction.ts +3 -4
- package/src/util/editor/interactions/createPolygonInteraction.ts +3 -4
- package/src/util/editor/interactions/creationSnapping.ts +4 -7
- package/src/util/editor/interactions/editFeaturesMouseOverInteraction.ts +2 -3
- package/src/util/editor/interactions/editGeometryMouseOverInteraction.ts +4 -4
- package/src/util/editor/interactions/ensureHandlerSelectionInteraction.ts +2 -3
- package/src/util/editor/interactions/insertVertexInteraction.ts +3 -4
- package/src/util/editor/interactions/layerSnapping.ts +6 -8
- package/src/util/editor/interactions/mapInteractionController.ts +5 -3
- package/src/util/editor/interactions/removeVertexInteraction.ts +4 -4
- package/src/util/editor/interactions/rightClickInteraction.ts +2 -3
- package/src/util/editor/interactions/segmentLengthInteraction.ts +2 -3
- package/src/util/editor/interactions/selectFeatureMouseOverInteraction.ts +15 -14
- package/src/util/editor/interactions/selectMultiFeatureInteraction.ts +9 -9
- package/src/util/editor/interactions/selectSingleFeatureInteraction.ts +5 -7
- package/src/util/editor/interactions/translateVertexInteraction.ts +4 -4
- package/src/util/editor/interactions/translationSnapping.ts +4 -7
- package/src/util/editor/selectFeaturesSession.ts +5 -8
- package/src/util/editor/snappingHelpers.ts +21 -20
- package/src/util/editor/transformation/create2DHandlers.ts +1 -1
- package/src/util/editor/transformation/create3DHandlers.ts +3 -3
- package/src/util/editor/transformation/extrudeInteraction.ts +5 -5
- package/src/util/editor/transformation/rotateInteraction.ts +7 -6
- package/src/util/editor/transformation/scaleInteraction.ts +7 -6
- package/src/util/editor/transformation/transformationHandler.ts +3 -3
- package/src/util/editor/transformation/translateInteraction.ts +7 -11
- package/src/util/exclusiveManager.ts +1 -1
- package/src/util/featureconverter/arcToCesium.ts +4 -6
- package/src/util/featureconverter/circleToCesium.ts +3 -5
- package/src/util/featureconverter/clampedPrimitive.ts +6 -5
- package/src/util/featureconverter/convert.ts +22 -24
- package/src/util/featureconverter/extent3D.ts +3 -3
- package/src/util/featureconverter/lineStringToCesium.ts +7 -7
- package/src/util/featureconverter/pointHelpers.ts +10 -11
- package/src/util/featureconverter/pointToCesium.ts +18 -44
- package/src/util/featureconverter/polygonToCesium.ts +3 -5
- package/src/util/featureconverter/storeyHelpers.ts +2 -2
- package/src/util/featureconverter/vectorGeometryFactory.ts +41 -39
- package/src/util/featureconverter/vectorHeightInfo.ts +60 -30
- package/src/util/flight/flightAnchor.ts +4 -3
- package/src/util/flight/flightCollection.ts +3 -2
- package/src/util/flight/flightHelpers.ts +1 -1
- package/src/util/flight/flightInstance.ts +7 -4
- package/src/util/flight/flightPlayer.ts +2 -2
- package/src/util/flight/flightRecorder.ts +234 -0
- package/src/util/flight/flightVisualizer.ts +2 -2
- package/src/util/geometryHelpers.ts +3 -135
- package/src/util/hiddenObjects.ts +3 -4
- package/src/util/indexedCollection.ts +1 -1
- package/src/util/isMobile.ts +2 -1
- package/src/util/layerCollection.ts +7 -2
- package/src/util/locale.ts +0 -1
- package/src/util/mapCollection.ts +104 -47
- package/src/util/math.ts +34 -0
- package/src/util/overrideCollection.ts +4 -5
- package/src/util/projection.ts +3 -7
- package/src/util/renderScreenshot.ts +2 -2
- package/src/util/rotation.ts +3 -4
- package/src/util/urlHelpers.ts +0 -1
- package/src/util/vcsTemplate.ts +6 -5
- package/src/util/viewpoint.ts +20 -3
- package/src/vcsApp.ts +42 -42
- package/src/vcsEvent.ts +1 -1
- package/src/vcsModuleHelpers.ts +4 -3
- package/src/vectorCluster/vectorClusterCesiumContext.ts +8 -9
- package/src/vectorCluster/vectorClusterGroup.ts +26 -16
- package/src/vectorCluster/vectorClusterGroupCesiumImpl.ts +10 -10
- package/src/vectorCluster/vectorClusterGroupCollection.ts +1 -1
- package/src/vectorCluster/vectorClusterGroupImpl.ts +5 -5
- package/src/vectorCluster/vectorClusterGroupObliqueImpl.ts +4 -6
- package/src/vectorCluster/vectorClusterGroupOpenlayersImpl.ts +2 -2
- package/src/vectorCluster/vectorClusterStyleItem.ts +5 -3
- package/src/vectorCluster/vectorClusterSymbols.ts +0 -1
- package/src/workers/panoramaImageWorker.ts +50 -0
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
import type { Camera, Primitive } from '@vcmap-cesium/engine';
|
|
2
|
+
import { Cartesian2, Matrix4, Cartesian3 } from '@vcmap-cesium/engine';
|
|
3
|
+
import { getWidth } from 'ol/extent.js';
|
|
4
|
+
import type { Size } from 'ol/size.js';
|
|
5
|
+
import { getLogger } from '@vcsuite/logger';
|
|
6
|
+
import type { PanoramaImage } from './panoramaImage.js';
|
|
7
|
+
import type { PanoramaTile } from './panoramaTile.js';
|
|
8
|
+
import {
|
|
9
|
+
getFovImageSphericalExtent,
|
|
10
|
+
windowPositionToImageSpherical,
|
|
11
|
+
} from './fieldOfView.js';
|
|
12
|
+
import type PanoramaMap from '../map/panoramaMap.js';
|
|
13
|
+
import type { PanoramaTileCoordinate } from './panoramaTileCoordinate.js';
|
|
14
|
+
import {
|
|
15
|
+
createTileCoordinate,
|
|
16
|
+
getDistanceToTileCoordinate,
|
|
17
|
+
getTileCoordinatesInImageExtent,
|
|
18
|
+
tileSizeInRadians,
|
|
19
|
+
} from './panoramaTileCoordinate.js';
|
|
20
|
+
import PanoramaTilePrimitiveCollection from './panoramaTilePrimitiveCollection.js';
|
|
21
|
+
import { imageSphericalToCartesian } from './sphericalCoordinates.js';
|
|
22
|
+
import { PanoramaOverlayMode } from './panoramaTileMaterial.js';
|
|
23
|
+
|
|
24
|
+
export type PanoramaImageView = {
|
|
25
|
+
/**
|
|
26
|
+
* Suspends the loading of tiles. This is used as a debug feature.
|
|
27
|
+
*/
|
|
28
|
+
suspendTileLoading: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The primitive collection that contains the panorama tiles.
|
|
31
|
+
*/
|
|
32
|
+
readonly tilePrimitiveCollection: PanoramaTilePrimitiveCollection;
|
|
33
|
+
/**
|
|
34
|
+
* Force a render of the panorama image. You do not need to call this for the normal rendering loop.
|
|
35
|
+
*/
|
|
36
|
+
render(): void;
|
|
37
|
+
destroy(): void;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const baseLevelScaled = Symbol('baseLevelScaled');
|
|
41
|
+
const MIN_DEPTH_MOVEMENT_DISTANCE = 5 ** 2; // 5 pixels squared, to avoid too many updates
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Creates all the tile coordinates for the minimum level of the panorama image.
|
|
45
|
+
* @param minLevel
|
|
46
|
+
*/
|
|
47
|
+
function createMinLevelTiles(minLevel: number): PanoramaTileCoordinate[] {
|
|
48
|
+
const tiles: PanoramaTileCoordinate[] = [];
|
|
49
|
+
for (let x = 0; x < 2 ** minLevel * 2; x++) {
|
|
50
|
+
for (let y = 0; y < 2 ** minLevel; y++) {
|
|
51
|
+
tiles.push(createTileCoordinate(x, y, minLevel));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return tiles;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Calculates the pixel per radians for the given level and tile size.
|
|
59
|
+
* @param level
|
|
60
|
+
* @param tileSize
|
|
61
|
+
*/
|
|
62
|
+
function getLevelPixelPerRadians(level: number, tileSize: Size): number {
|
|
63
|
+
return tileSize[0] / tileSizeInRadians(level);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
type ImageWrapper = {
|
|
67
|
+
readonly image: PanoramaImage;
|
|
68
|
+
suspendTileLoading: boolean;
|
|
69
|
+
render(): void;
|
|
70
|
+
destroy(): void;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Creates an event listener that handles cursor position changes and sets the cursor position in the primitive collection based on depth information from the panorama image.
|
|
75
|
+
* This is set up by the panorama image wrapper, should the image have depth information.
|
|
76
|
+
* @param image
|
|
77
|
+
* @param primitiveCollection
|
|
78
|
+
* @param camera
|
|
79
|
+
* @param canvas
|
|
80
|
+
*/
|
|
81
|
+
function setupDepthHandling(
|
|
82
|
+
image: PanoramaImage,
|
|
83
|
+
primitiveCollection: PanoramaTilePrimitiveCollection,
|
|
84
|
+
camera: Camera,
|
|
85
|
+
canvas: HTMLCanvasElement,
|
|
86
|
+
): () => void {
|
|
87
|
+
let windowPositon: Cartesian2 | undefined;
|
|
88
|
+
const handlePointerChanged = (x?: number, y?: number): void => {
|
|
89
|
+
if (x != null && y != null) {
|
|
90
|
+
const newPosition = new Cartesian2(x, y);
|
|
91
|
+
if (
|
|
92
|
+
windowPositon &&
|
|
93
|
+
Cartesian2.distanceSquared(windowPositon, newPosition) <
|
|
94
|
+
MIN_DEPTH_MOVEMENT_DISTANCE
|
|
95
|
+
) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
windowPositon = newPosition;
|
|
100
|
+
const imageSpherical = windowPositionToImageSpherical(
|
|
101
|
+
windowPositon,
|
|
102
|
+
camera,
|
|
103
|
+
image.invModelMatrix,
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
if (imageSpherical) {
|
|
107
|
+
image.tileProvider
|
|
108
|
+
.getDepthAtImageCoordinate(imageSpherical)
|
|
109
|
+
.then((depth) => {
|
|
110
|
+
if (windowPositon !== newPosition) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (depth !== undefined) {
|
|
115
|
+
const imageCartesian = imageSphericalToCartesian(imageSpherical);
|
|
116
|
+
Cartesian3.multiplyByScalar(
|
|
117
|
+
imageCartesian,
|
|
118
|
+
depth / image.maxDepth,
|
|
119
|
+
imageCartesian,
|
|
120
|
+
);
|
|
121
|
+
primitiveCollection.cursorPosition = imageCartesian;
|
|
122
|
+
} else {
|
|
123
|
+
primitiveCollection.cursorPosition = new Cartesian3(-1, -1, -1);
|
|
124
|
+
}
|
|
125
|
+
})
|
|
126
|
+
.catch(() => {
|
|
127
|
+
getLogger('PanoramaImageView').warning('Failed to get depth');
|
|
128
|
+
primitiveCollection.cursorPosition = new Cartesian3(-1, -1, -1);
|
|
129
|
+
});
|
|
130
|
+
} else {
|
|
131
|
+
primitiveCollection.cursorPosition = new Cartesian3(-1, -1, -1);
|
|
132
|
+
}
|
|
133
|
+
} else {
|
|
134
|
+
primitiveCollection.cursorPosition = new Cartesian3(-1, -1, -1);
|
|
135
|
+
windowPositon = undefined;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const mouseMoveHandler = (event: MouseEvent): void => {
|
|
140
|
+
handlePointerChanged(event.offsetX, event.offsetY);
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
const leaveHandler = (): void => {
|
|
144
|
+
handlePointerChanged();
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const touchMoveHandler = (event: TouchEvent): void => {
|
|
148
|
+
const { clientX, clientY } = event.touches[0];
|
|
149
|
+
handlePointerChanged(clientX, clientY);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
canvas.addEventListener('mousemove', mouseMoveHandler);
|
|
153
|
+
canvas.addEventListener('mouseleave', leaveHandler);
|
|
154
|
+
canvas.addEventListener('touchmove', touchMoveHandler);
|
|
155
|
+
canvas.addEventListener('touchend', leaveHandler);
|
|
156
|
+
|
|
157
|
+
return (): void => {
|
|
158
|
+
canvas.removeEventListener('mousemove', mouseMoveHandler);
|
|
159
|
+
canvas.removeEventListener('mouseleave', leaveHandler);
|
|
160
|
+
canvas.removeEventListener('touchmove', touchMoveHandler);
|
|
161
|
+
canvas.removeEventListener('touchend', leaveHandler);
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The image wrapper is responsible for managing the panorama image tiles and rendering them.
|
|
167
|
+
*/
|
|
168
|
+
function createImageWrapper(
|
|
169
|
+
image: PanoramaImage,
|
|
170
|
+
primitiveCollection: PanoramaTilePrimitiveCollection,
|
|
171
|
+
camera: Camera,
|
|
172
|
+
canvas: HTMLCanvasElement,
|
|
173
|
+
map: PanoramaMap,
|
|
174
|
+
): ImageWrapper {
|
|
175
|
+
const { tileSize, maxLevel, minLevel, hasDepth } = image;
|
|
176
|
+
const baseTileCoordinates = createMinLevelTiles(minLevel);
|
|
177
|
+
const destroyDepth = hasDepth
|
|
178
|
+
? setupDepthHandling(image, primitiveCollection, camera, canvas)
|
|
179
|
+
: (): void => {};
|
|
180
|
+
|
|
181
|
+
const currentTiles = new Map<string, Primitive>();
|
|
182
|
+
let currentLevel = minLevel;
|
|
183
|
+
let currentTileCoordinates: PanoramaTileCoordinate[] = [
|
|
184
|
+
...baseTileCoordinates,
|
|
185
|
+
];
|
|
186
|
+
|
|
187
|
+
const createCurrentTiles = (): void => {
|
|
188
|
+
image.tileProvider.currentLevel = currentLevel;
|
|
189
|
+
image.tileProvider
|
|
190
|
+
.createVisibleTiles(currentTileCoordinates)
|
|
191
|
+
.forEach((tile) => {
|
|
192
|
+
if (!currentTiles.has(tile.tileCoordinate.key)) {
|
|
193
|
+
const primitive = tile.getPrimitive(map);
|
|
194
|
+
if (
|
|
195
|
+
tile.tileCoordinate.level === minLevel &&
|
|
196
|
+
!(tile as PanoramaTile & { [baseLevelScaled]?: boolean })[
|
|
197
|
+
baseLevelScaled
|
|
198
|
+
]
|
|
199
|
+
) {
|
|
200
|
+
primitive.modelMatrix = Matrix4.multiplyByScale(
|
|
201
|
+
primitive.modelMatrix,
|
|
202
|
+
new Cartesian3(1.01, 1.01, 1.01),
|
|
203
|
+
new Matrix4(),
|
|
204
|
+
);
|
|
205
|
+
(tile as PanoramaTile & { [baseLevelScaled]?: boolean })[
|
|
206
|
+
baseLevelScaled
|
|
207
|
+
] = true;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
currentTiles.set(tile.tileCoordinate.key, primitive);
|
|
211
|
+
primitiveCollection.add(primitive);
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
image.tileProvider.showIntensity =
|
|
217
|
+
primitiveCollection.overlay === PanoramaOverlayMode.Intensity;
|
|
218
|
+
|
|
219
|
+
const showIntensityListener =
|
|
220
|
+
primitiveCollection.overlayChanged.addEventListener((overlayMode) => {
|
|
221
|
+
image.tileProvider.showIntensity =
|
|
222
|
+
overlayMode === PanoramaOverlayMode.Intensity;
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
camera.setView({
|
|
226
|
+
destination: image.position,
|
|
227
|
+
orientation: {
|
|
228
|
+
heading: camera.heading,
|
|
229
|
+
pitch: image.orientation.pitch,
|
|
230
|
+
roll: image.orientation.roll,
|
|
231
|
+
},
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
const levelPixelPerRadians = new Array<number>(maxLevel); // XXX can be cached or pre calculated?
|
|
235
|
+
for (let i = 0; i <= maxLevel - minLevel; i++) {
|
|
236
|
+
levelPixelPerRadians[i] = getLevelPixelPerRadians(i + minLevel, tileSize);
|
|
237
|
+
}
|
|
238
|
+
let suspendTileLoading = false;
|
|
239
|
+
const render = (): void => {
|
|
240
|
+
if (suspendTileLoading) {
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
const { extents, center: imageCenter } = getFovImageSphericalExtent(
|
|
244
|
+
camera,
|
|
245
|
+
image.invModelMatrix,
|
|
246
|
+
);
|
|
247
|
+
const currentImageRadiansWidth = extents.reduce(
|
|
248
|
+
(acc, extent) => acc + getWidth(extent),
|
|
249
|
+
0,
|
|
250
|
+
);
|
|
251
|
+
const currentScenePixelWidth = canvas.width;
|
|
252
|
+
const currentRadiansPerPixel =
|
|
253
|
+
currentScenePixelWidth / currentImageRadiansWidth;
|
|
254
|
+
currentLevel = minLevel;
|
|
255
|
+
|
|
256
|
+
if (currentRadiansPerPixel > levelPixelPerRadians[maxLevel - minLevel]) {
|
|
257
|
+
currentLevel = maxLevel;
|
|
258
|
+
} else if (currentRadiansPerPixel > levelPixelPerRadians[0]) {
|
|
259
|
+
currentLevel =
|
|
260
|
+
levelPixelPerRadians.findIndex((rpp) => rpp >= currentRadiansPerPixel) +
|
|
261
|
+
minLevel;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (currentLevel === minLevel) {
|
|
265
|
+
currentTileCoordinates = [];
|
|
266
|
+
} else if (extents.length === 1) {
|
|
267
|
+
currentTileCoordinates = [
|
|
268
|
+
...getTileCoordinatesInImageExtent(extents[0], currentLevel),
|
|
269
|
+
];
|
|
270
|
+
} else {
|
|
271
|
+
const leftExtent = extents[0];
|
|
272
|
+
const rightExtent = extents[1];
|
|
273
|
+
leftExtent[2] -= 0.0001; // dont overlap the extents since 0 === 2 * PI
|
|
274
|
+
currentTileCoordinates = [
|
|
275
|
+
...getTileCoordinatesInImageExtent(leftExtent, currentLevel),
|
|
276
|
+
...getTileCoordinatesInImageExtent(rightExtent, currentLevel),
|
|
277
|
+
];
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
currentTileCoordinates = currentTileCoordinates
|
|
281
|
+
.map((tc) => ({
|
|
282
|
+
tc,
|
|
283
|
+
distance: getDistanceToTileCoordinate(imageCenter, tc),
|
|
284
|
+
}))
|
|
285
|
+
// we sort furthest first, since tiles are loaded from the back of the array with pop.
|
|
286
|
+
.sort((a, b) => b.distance - a.distance)
|
|
287
|
+
.map((tc) => tc.tc);
|
|
288
|
+
|
|
289
|
+
// push base tile coordinates onto the back of the array, so they are always loaded first.
|
|
290
|
+
currentTileCoordinates.push(...baseTileCoordinates);
|
|
291
|
+
currentTiles.forEach((primitive, key) => {
|
|
292
|
+
if (!currentTileCoordinates.find((c) => c.key === key)) {
|
|
293
|
+
primitiveCollection.remove(primitive);
|
|
294
|
+
currentTiles.delete(key);
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
createCurrentTiles();
|
|
299
|
+
};
|
|
300
|
+
render();
|
|
301
|
+
|
|
302
|
+
return {
|
|
303
|
+
image,
|
|
304
|
+
get suspendTileLoading(): boolean {
|
|
305
|
+
return suspendTileLoading;
|
|
306
|
+
},
|
|
307
|
+
set suspendTileLoading(value: boolean) {
|
|
308
|
+
suspendTileLoading = value;
|
|
309
|
+
},
|
|
310
|
+
render,
|
|
311
|
+
destroy(): void {
|
|
312
|
+
currentTiles.forEach((primitive) => {
|
|
313
|
+
primitiveCollection.remove(primitive);
|
|
314
|
+
});
|
|
315
|
+
currentTiles.clear();
|
|
316
|
+
showIntensityListener();
|
|
317
|
+
destroyDepth();
|
|
318
|
+
},
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
let emptyImageOverlay: HTMLDivElement | undefined;
|
|
323
|
+
function getEmptyImageBitmap(): HTMLDivElement {
|
|
324
|
+
if (!emptyImageOverlay) {
|
|
325
|
+
const overlay = document.createElement('div');
|
|
326
|
+
overlay.style.position = 'absolute';
|
|
327
|
+
overlay.style.display = 'block';
|
|
328
|
+
overlay.style.top = '0px';
|
|
329
|
+
overlay.style.left = '0px';
|
|
330
|
+
overlay.style.bottom = '0px';
|
|
331
|
+
overlay.style.right = '0px';
|
|
332
|
+
overlay.style.backgroundColor = '#409D76';
|
|
333
|
+
overlay.style.padding = '8px';
|
|
334
|
+
overlay.style.font = 'bold 64px Monospace, Courier New';
|
|
335
|
+
overlay.style.textAlign = 'center';
|
|
336
|
+
overlay.style.alignContent = 'center';
|
|
337
|
+
overlay.style.color = '#424242';
|
|
338
|
+
overlay.innerText = 'No Image';
|
|
339
|
+
|
|
340
|
+
emptyImageOverlay = overlay;
|
|
341
|
+
}
|
|
342
|
+
return emptyImageOverlay;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
function setupEmptyImageOverlay(container: HTMLElement): () => void {
|
|
346
|
+
const overlay = getEmptyImageBitmap();
|
|
347
|
+
container.appendChild(overlay);
|
|
348
|
+
|
|
349
|
+
let remover: (() => void) | undefined = () => {
|
|
350
|
+
container.removeChild(overlay);
|
|
351
|
+
remover = undefined; // we need to ensure this is only called once
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
return () => {
|
|
355
|
+
remover?.();
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* The panorama image view is responsible for rendering the current panorama image of a PanoramaMap.
|
|
361
|
+
* It will react to image changes and update the view. It tracks changes
|
|
362
|
+
* to the panorama camera and updates the panorama tiles accordingly. Typically, you will not
|
|
363
|
+
* have to create this directly, but rather use the PanoramaMap's imageView property.
|
|
364
|
+
* @param map
|
|
365
|
+
*/
|
|
366
|
+
export function createPanoramaImageView(map: PanoramaMap): PanoramaImageView {
|
|
367
|
+
const { scene } = map.getCesiumWidget();
|
|
368
|
+
const primitiveCollection = scene.primitives.add(
|
|
369
|
+
new PanoramaTilePrimitiveCollection({
|
|
370
|
+
destroyPrimitives: false,
|
|
371
|
+
show: true,
|
|
372
|
+
}),
|
|
373
|
+
) as PanoramaTilePrimitiveCollection;
|
|
374
|
+
|
|
375
|
+
const defaultPosition = Cartesian3.fromDegrees(12, 53, 0);
|
|
376
|
+
|
|
377
|
+
let currentView: ImageWrapper | undefined;
|
|
378
|
+
let removeOverlay: (() => void) | undefined;
|
|
379
|
+
scene.camera.setView({
|
|
380
|
+
destination: defaultPosition,
|
|
381
|
+
orientation: {
|
|
382
|
+
heading: scene.camera.heading ?? 0,
|
|
383
|
+
pitch: 0,
|
|
384
|
+
roll: 0,
|
|
385
|
+
},
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
let suspendTileLoading = false;
|
|
389
|
+
|
|
390
|
+
const setCurrentView = (image?: PanoramaImage): void => {
|
|
391
|
+
const oldView = currentView;
|
|
392
|
+
removeOverlay?.();
|
|
393
|
+
if (image) {
|
|
394
|
+
currentView = createImageWrapper(
|
|
395
|
+
image,
|
|
396
|
+
primitiveCollection,
|
|
397
|
+
scene.camera,
|
|
398
|
+
scene.canvas,
|
|
399
|
+
map,
|
|
400
|
+
);
|
|
401
|
+
currentView.suspendTileLoading = suspendTileLoading;
|
|
402
|
+
} else {
|
|
403
|
+
currentView = undefined;
|
|
404
|
+
if (scene.canvas.parentElement) {
|
|
405
|
+
removeOverlay = setupEmptyImageOverlay(scene.canvas.parentElement);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
oldView?.destroy();
|
|
410
|
+
};
|
|
411
|
+
setCurrentView(map.currentPanoramaImage);
|
|
412
|
+
|
|
413
|
+
const imageChangedListener =
|
|
414
|
+
map.currentImageChanged.addEventListener(setCurrentView);
|
|
415
|
+
|
|
416
|
+
const render = (): void => {
|
|
417
|
+
currentView?.render();
|
|
418
|
+
};
|
|
419
|
+
const cameraChangedListener = scene.camera.changed.addEventListener(render);
|
|
420
|
+
render();
|
|
421
|
+
|
|
422
|
+
return {
|
|
423
|
+
get suspendTileLoading(): boolean {
|
|
424
|
+
return suspendTileLoading;
|
|
425
|
+
},
|
|
426
|
+
set suspendTileLoading(value: boolean) {
|
|
427
|
+
suspendTileLoading = value;
|
|
428
|
+
if (currentView) {
|
|
429
|
+
currentView.suspendTileLoading = value;
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
get tilePrimitiveCollection(): PanoramaTilePrimitiveCollection {
|
|
433
|
+
return primitiveCollection;
|
|
434
|
+
},
|
|
435
|
+
render,
|
|
436
|
+
destroy(): void {
|
|
437
|
+
this.render = (): void => {};
|
|
438
|
+
scene.primitives.remove(primitiveCollection);
|
|
439
|
+
currentView?.destroy();
|
|
440
|
+
imageChangedListener();
|
|
441
|
+
cameraChangedListener();
|
|
442
|
+
removeOverlay?.();
|
|
443
|
+
},
|
|
444
|
+
};
|
|
445
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Cartesian3,
|
|
3
|
+
EllipsoidGeometry,
|
|
4
|
+
GeometryInstance,
|
|
5
|
+
MaterialAppearance,
|
|
6
|
+
Primitive,
|
|
7
|
+
VertexFormat,
|
|
8
|
+
type Matrix4,
|
|
9
|
+
} from '@vcmap-cesium/engine';
|
|
10
|
+
import type { Size } from 'ol/size.js';
|
|
11
|
+
import PanoramaTileMaterial from './panoramaTileMaterial.js';
|
|
12
|
+
import type { PanoramaTileCoordinate } from './panoramaTileCoordinate.js';
|
|
13
|
+
import { tileSizeInRadians } from './panoramaTileCoordinate.js';
|
|
14
|
+
import type PanoramaMap from '../map/panoramaMap.js';
|
|
15
|
+
import type {
|
|
16
|
+
PanoramaResourceData,
|
|
17
|
+
PanoramaResourceType,
|
|
18
|
+
} from './panoramaTileProvider.js';
|
|
19
|
+
|
|
20
|
+
export type PanoramaTile = {
|
|
21
|
+
hasResource(type: PanoramaResourceType): boolean;
|
|
22
|
+
setResource<T extends PanoramaResourceType>(
|
|
23
|
+
type: T,
|
|
24
|
+
resource: PanoramaResourceData<T>,
|
|
25
|
+
): void;
|
|
26
|
+
getDepthAtPixel(x: number, y: number): number | undefined;
|
|
27
|
+
readonly tileCoordinate: PanoramaTileCoordinate;
|
|
28
|
+
getPrimitive(map: PanoramaMap): Primitive;
|
|
29
|
+
getMaterial(map: PanoramaMap): PanoramaTileMaterial | undefined;
|
|
30
|
+
destroy(): void;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
function createPanoramaTilePrimitive(
|
|
34
|
+
{ x, y, level }: PanoramaTileCoordinate,
|
|
35
|
+
modelMatrix: Matrix4,
|
|
36
|
+
material: PanoramaTileMaterial,
|
|
37
|
+
): Primitive {
|
|
38
|
+
const sizeR = tileSizeInRadians(level);
|
|
39
|
+
const heading = x * sizeR;
|
|
40
|
+
|
|
41
|
+
const tilt = y * sizeR;
|
|
42
|
+
return new Primitive({
|
|
43
|
+
geometryInstances: [
|
|
44
|
+
new GeometryInstance({
|
|
45
|
+
geometry: new EllipsoidGeometry({
|
|
46
|
+
vertexFormat: VertexFormat.POSITION_AND_ST,
|
|
47
|
+
radii: new Cartesian3(1, 1, 1),
|
|
48
|
+
minimumClock: heading,
|
|
49
|
+
maximumClock: heading + sizeR,
|
|
50
|
+
minimumCone: tilt,
|
|
51
|
+
maximumCone: tilt + sizeR,
|
|
52
|
+
stackPartitions: (level + 1) * 64,
|
|
53
|
+
slicePartitions: (level + 1) * 64,
|
|
54
|
+
}),
|
|
55
|
+
}),
|
|
56
|
+
],
|
|
57
|
+
appearance: new MaterialAppearance({
|
|
58
|
+
material,
|
|
59
|
+
closed: false,
|
|
60
|
+
flat: true,
|
|
61
|
+
}),
|
|
62
|
+
modelMatrix,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Creates a panorama tile primitive with the given tile coordinate and image. Typically only called
|
|
68
|
+
* by the PanoramaTileProvider when creating tiles.
|
|
69
|
+
* @param tileCoordinate
|
|
70
|
+
* @param modelMatrix
|
|
71
|
+
* @param tileSize
|
|
72
|
+
*/
|
|
73
|
+
export function createPanoramaTile(
|
|
74
|
+
tileCoordinate: PanoramaTileCoordinate,
|
|
75
|
+
modelMatrix: Matrix4,
|
|
76
|
+
tileSize: Size,
|
|
77
|
+
): PanoramaTile {
|
|
78
|
+
let destroyed = false;
|
|
79
|
+
const primitives = new Map<
|
|
80
|
+
PanoramaMap,
|
|
81
|
+
{ primitive: Primitive; material: PanoramaTileMaterial }
|
|
82
|
+
>();
|
|
83
|
+
|
|
84
|
+
let resources: { [K in PanoramaResourceType]?: PanoramaResourceData<K> } = {};
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
get tileCoordinate(): PanoramaTileCoordinate {
|
|
88
|
+
return tileCoordinate;
|
|
89
|
+
},
|
|
90
|
+
hasResource(type: PanoramaResourceType): boolean {
|
|
91
|
+
return resources[type] != null;
|
|
92
|
+
},
|
|
93
|
+
setResource<T extends PanoramaResourceType>(
|
|
94
|
+
type: T,
|
|
95
|
+
resource: PanoramaResourceData<T>,
|
|
96
|
+
): void {
|
|
97
|
+
if (this.hasResource(type)) {
|
|
98
|
+
throw new Error(
|
|
99
|
+
`Resource of type "${type}" already set for this tile. Cannot overwrite.`,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
resources[type] = resource as ImageBitmap & Float32Array;
|
|
103
|
+
primitives.forEach(({ material }) => {
|
|
104
|
+
material.setTexture(type, resource);
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
getPrimitive(map: PanoramaMap): Primitive {
|
|
108
|
+
if (destroyed) {
|
|
109
|
+
throw new Error('Cannot get primitive from destroyed panorama tile.');
|
|
110
|
+
}
|
|
111
|
+
if (primitives.has(map)) {
|
|
112
|
+
return primitives.get(map)!.primitive;
|
|
113
|
+
}
|
|
114
|
+
const material = new PanoramaTileMaterial(tileCoordinate, tileSize);
|
|
115
|
+
Object.entries(resources).forEach(([type, resource]) => {
|
|
116
|
+
material.setTexture(type as PanoramaResourceType, resource);
|
|
117
|
+
});
|
|
118
|
+
const primitive = createPanoramaTilePrimitive(
|
|
119
|
+
tileCoordinate,
|
|
120
|
+
modelMatrix,
|
|
121
|
+
material,
|
|
122
|
+
);
|
|
123
|
+
primitives.set(map, { primitive, material });
|
|
124
|
+
return primitive;
|
|
125
|
+
},
|
|
126
|
+
getMaterial(map: PanoramaMap): PanoramaTileMaterial | undefined {
|
|
127
|
+
if (primitives.has(map)) {
|
|
128
|
+
return primitives.get(map)!.material;
|
|
129
|
+
}
|
|
130
|
+
return undefined;
|
|
131
|
+
},
|
|
132
|
+
/**
|
|
133
|
+
* Returns the normalized depth value [0, 1] at the given pixel coordinates in the panorama tile.
|
|
134
|
+
* @param x
|
|
135
|
+
* @param y
|
|
136
|
+
*/
|
|
137
|
+
getDepthAtPixel(x: number, y: number): number | undefined {
|
|
138
|
+
if (!resources.depth) {
|
|
139
|
+
return undefined;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const index = y * tileSize[0] + x;
|
|
143
|
+
return resources.depth[index];
|
|
144
|
+
},
|
|
145
|
+
destroy(): void {
|
|
146
|
+
destroyed = true;
|
|
147
|
+
resources = {};
|
|
148
|
+
primitives.forEach(({ primitive, material }) => {
|
|
149
|
+
primitive.destroy();
|
|
150
|
+
material.destroy();
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import LRUCache from 'ol/structs/LRUCache.js';
|
|
2
|
+
import type { PanoramaTile } from './panoramaTile.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A specialized LRU cache
|
|
6
|
+
*/
|
|
7
|
+
export class PanoramaTileCache extends LRUCache<PanoramaTile> {
|
|
8
|
+
deleteOldest(): void {
|
|
9
|
+
const entry = this.pop();
|
|
10
|
+
if (entry) {
|
|
11
|
+
entry.destroy();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
expireCache(usedTiles: Record<string, boolean> = {}): void {
|
|
16
|
+
while (this.canExpireCache()) {
|
|
17
|
+
const tile = this.peekLast();
|
|
18
|
+
if (usedTiles[tile.tileCoordinate.key]) {
|
|
19
|
+
break;
|
|
20
|
+
} else {
|
|
21
|
+
this.pop().destroy();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* convenience function to cache a tile and cleanup all the non-visible tiles
|
|
29
|
+
* @param tile
|
|
30
|
+
* @param cache
|
|
31
|
+
* @param currentlyVisibleTileKeys
|
|
32
|
+
*/
|
|
33
|
+
export function addTileToCache(
|
|
34
|
+
tile: PanoramaTile,
|
|
35
|
+
cache: PanoramaTileCache,
|
|
36
|
+
currentlyVisibleTileKeys: Record<string, boolean>,
|
|
37
|
+
): void {
|
|
38
|
+
cache.set(tile.tileCoordinate.key, tile);
|
|
39
|
+
cache.expireCache(currentlyVisibleTileKeys);
|
|
40
|
+
}
|