@vcmap/core 6.1.11 → 6.2.0-rc.1
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 +52 -18
- package/dist/geojson.d.ts +3 -2
- package/dist/index.d.ts +239 -109
- package/dist/index.js +78 -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/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/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/layerOpenlayersImpl.d.ts +1 -1
- package/dist/src/layer/openlayers/layerOpenlayersImpl.js +0 -1
- 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 +54 -0
- package/dist/src/layer/panoramaDatasetLayer.js +201 -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 +293 -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/panoramaImageCache.d.ts +8 -0
- package/dist/src/panorama/panoramaImageCache.js +18 -0
- package/dist/src/panorama/panoramaImageCache.js.map +1 -0
- package/dist/src/panorama/panoramaImageView.d.ts +25 -0
- package/dist/src/panorama/panoramaImageView.js +331 -0
- package/dist/src/panorama/panoramaImageView.js.map +1 -0
- package/dist/src/panorama/panoramaTile.d.ts +19 -0
- package/dist/src/panorama/panoramaTile.js +57 -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 +102 -0
- package/dist/src/panorama/panoramaTileMaterial.js +225 -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 +313 -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/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/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/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 +316 -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 +52 -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/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/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/layerOpenlayersImpl.ts +2 -3
- 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 +283 -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 +410 -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/panoramaImageCache.ts +19 -0
- package/src/panorama/panoramaImageView.ts +448 -0
- package/src/panorama/panoramaTile.ts +89 -0
- package/src/panorama/panoramaTileCache.ts +40 -0
- package/src/panorama/panoramaTileCoordinate.ts +166 -0
- package/src/panorama/panoramaTileMaterial.ts +323 -0
- package/src/panorama/panoramaTileMaterialFS.glsl +165 -0
- package/src/panorama/panoramaTilePrimitiveCollection.ts +158 -0
- package/src/panorama/panoramaTileProvider.ts +536 -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/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/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,269 @@
|
|
|
1
|
+
import { Cartesian3, Cartesian4, HeadingPitchRoll, Matrix4, Transforms, } from '@vcmap-cesium/engine';
|
|
2
|
+
import { v4 as uuid } from 'uuid';
|
|
3
|
+
import { fromUrl } from 'geotiff';
|
|
4
|
+
import { getLogger } from '@vcsuite/logger';
|
|
5
|
+
import { createPanoramaTileProvider } from './panoramaTileProvider.js';
|
|
6
|
+
import { imageSphericalToCartesian } from './sphericalCoordinates.js';
|
|
7
|
+
function createDefaultMetadata() {
|
|
8
|
+
return {
|
|
9
|
+
version: '1.0',
|
|
10
|
+
position: Cartesian3.fromDegrees(0, 0, 0),
|
|
11
|
+
orientation: HeadingPitchRoll.fromDegrees(0, 0, 0),
|
|
12
|
+
hasDepth: false,
|
|
13
|
+
hasIntensity: false,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function parsePanoramaGDALMetadata(gdalMetadata) {
|
|
17
|
+
const version = gdalMetadata?.PANORAMA_VERSION ?? '';
|
|
18
|
+
if (version !== '1.0') {
|
|
19
|
+
return createDefaultMetadata();
|
|
20
|
+
}
|
|
21
|
+
const position = Cartesian3.fromDegrees(0, 0, 0);
|
|
22
|
+
const orientation = new HeadingPitchRoll(0, 0, 0);
|
|
23
|
+
if (gdalMetadata?.PANORAMA_POSITION) {
|
|
24
|
+
const [lat, lon, z] = gdalMetadata.PANORAMA_POSITION.split(',')
|
|
25
|
+
.map(Number)
|
|
26
|
+
.filter((n) => !Number.isNaN(n));
|
|
27
|
+
if (lat != null && lon != null && z != null) {
|
|
28
|
+
Cartesian3.fromDegrees(lon, lat, z, undefined, position);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (gdalMetadata?.PANORAMA_ORIENTATION) {
|
|
32
|
+
const [heading, pitch, roll] = gdalMetadata.PANORAMA_ORIENTATION.split(',')
|
|
33
|
+
.map(Number)
|
|
34
|
+
.filter((n) => !Number.isNaN(n));
|
|
35
|
+
if (heading != null && pitch != null && roll != null) {
|
|
36
|
+
orientation.heading = heading;
|
|
37
|
+
orientation.pitch = pitch;
|
|
38
|
+
orientation.roll = roll;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const hasDepth = gdalMetadata?.PANORAMA_DEPTH === '1';
|
|
42
|
+
const hasIntensity = gdalMetadata?.PANORAMA_INTENSITY === '1';
|
|
43
|
+
return {
|
|
44
|
+
version,
|
|
45
|
+
position,
|
|
46
|
+
orientation,
|
|
47
|
+
hasDepth,
|
|
48
|
+
hasIntensity,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function createDefaultDepthMetadata() {
|
|
52
|
+
return {
|
|
53
|
+
version: '1.0',
|
|
54
|
+
min: 0,
|
|
55
|
+
max: 50,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function parseDepthGDALMetadata(gdalMetadata) {
|
|
59
|
+
const version = gdalMetadata?.PANORAMA_DEPTH_VERSION ?? '';
|
|
60
|
+
const metadata = createDefaultDepthMetadata();
|
|
61
|
+
if (version !== '1.0') {
|
|
62
|
+
return metadata;
|
|
63
|
+
}
|
|
64
|
+
const max = gdalMetadata?.PANORAMA_DEPTH_MAX ?? '';
|
|
65
|
+
if (max) {
|
|
66
|
+
const maxNumber = Number(max);
|
|
67
|
+
if (Number.isFinite(maxNumber)) {
|
|
68
|
+
metadata.max = maxNumber;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const min = gdalMetadata?.PANORAMA_DEPTH_MIN ?? '';
|
|
72
|
+
if (min) {
|
|
73
|
+
const minNumber = Number(min);
|
|
74
|
+
if (Number.isFinite(minNumber)) {
|
|
75
|
+
metadata.min = minNumber;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return metadata;
|
|
79
|
+
}
|
|
80
|
+
async function loadMetadataFromImage(image) {
|
|
81
|
+
let imageCount = await image.getImageCount();
|
|
82
|
+
const promises = [];
|
|
83
|
+
while (imageCount) {
|
|
84
|
+
imageCount -= 1;
|
|
85
|
+
promises.push(image.getImage(imageCount));
|
|
86
|
+
}
|
|
87
|
+
const images = await Promise.all(promises);
|
|
88
|
+
const tileSize = [images[0].getTileWidth(), images[0].getTileHeight()];
|
|
89
|
+
let minLevelImage = images[0];
|
|
90
|
+
let minLevel = minLevelImage.getHeight() / tileSize[0] - 1;
|
|
91
|
+
while (minLevel < 0) {
|
|
92
|
+
getLogger('PanoramaImage').warning('Lowest level is not a full tile');
|
|
93
|
+
// lowest image is not a full tile, we skip it
|
|
94
|
+
images.shift();
|
|
95
|
+
minLevelImage = images[0];
|
|
96
|
+
minLevel = minLevelImage.getHeight() / tileSize[0] - 1;
|
|
97
|
+
}
|
|
98
|
+
const maxLevel = images.length - 1 + minLevel;
|
|
99
|
+
return {
|
|
100
|
+
images,
|
|
101
|
+
tileSize,
|
|
102
|
+
minLevel,
|
|
103
|
+
maxLevel,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
async function loadRGBImages(image) {
|
|
107
|
+
const { images, ...meta } = await loadMetadataFromImage(image);
|
|
108
|
+
const gdalMetadata = parsePanoramaGDALMetadata(images.at(-1).getGDALMetadata());
|
|
109
|
+
images.forEach((i) => {
|
|
110
|
+
i.fileDirectory.vcsPanorama = { type: 'image' };
|
|
111
|
+
});
|
|
112
|
+
return {
|
|
113
|
+
images,
|
|
114
|
+
...meta,
|
|
115
|
+
...gdalMetadata,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function parseRgbUrl(imageUrl) {
|
|
119
|
+
const absoluteImageUrl = new URL(imageUrl, window.location.href);
|
|
120
|
+
const fileName = absoluteImageUrl.pathname.split('/').pop();
|
|
121
|
+
if (!fileName || !fileName.endsWith('_rgb.tif')) {
|
|
122
|
+
throw new Error('Invalid image url');
|
|
123
|
+
}
|
|
124
|
+
const name = fileName.slice(0, -8);
|
|
125
|
+
return {
|
|
126
|
+
name,
|
|
127
|
+
absoluteRootUrl: absoluteImageUrl.href,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* This is an internal function to create a panorama image for specific use cases (e.g. testing).
|
|
132
|
+
* In most cases, you should use {@link createPanoramaImageFromURL} directly.
|
|
133
|
+
* Creates a panorama image from a GeoTIFF image. The image should contain the metadata in the GDAL metadata format.
|
|
134
|
+
* @param rgbImage - the RGB image
|
|
135
|
+
* @param [options]
|
|
136
|
+
*/
|
|
137
|
+
export async function createPanoramaImage(rgbImage, options = {}) {
|
|
138
|
+
const { images: rgb, tileSize, minLevel, maxLevel, position, orientation, hasIntensity, hasDepth, } = await loadRGBImages(rgbImage);
|
|
139
|
+
const { name, absoluteRootUrl, intensityImage, depthImage, dataset } = options;
|
|
140
|
+
const nameOrId = name ?? uuid();
|
|
141
|
+
const modelMatrix = Transforms.headingPitchRollToFixedFrame(position, new HeadingPitchRoll(orientation.heading + Math.PI / 2, // spheres are oriented down the X axis, twist it to align.
|
|
142
|
+
-orientation.pitch, // turn against camera pitch,
|
|
143
|
+
-orientation.roll));
|
|
144
|
+
const scaledModelMatrix = Matrix4.clone(modelMatrix);
|
|
145
|
+
Matrix4.setScale(modelMatrix, new Cartesian3(50, 50, 50), scaledModelMatrix);
|
|
146
|
+
const upCart4 = Matrix4.getColumn(modelMatrix, 2, new Cartesian4());
|
|
147
|
+
Cartesian4.normalize(upCart4, upCart4);
|
|
148
|
+
const up = Cartesian3.fromCartesian4(upCart4, new Cartesian3());
|
|
149
|
+
const invModelMatrix = Matrix4.inverseTransformation(modelMatrix, new Matrix4());
|
|
150
|
+
let getIntensityImages;
|
|
151
|
+
if (intensityImage || (hasIntensity && absoluteRootUrl)) {
|
|
152
|
+
getIntensityImages = async () => {
|
|
153
|
+
const usedIntensityImage = intensityImage ??
|
|
154
|
+
(await fromUrl(new URL(`${name}_intensity.tif`, absoluteRootUrl).href));
|
|
155
|
+
const { images: intensity, minLevel: intensityMinLevel, maxLevel: intensityMaxLevel, } = await loadMetadataFromImage(usedIntensityImage);
|
|
156
|
+
if (intensityMinLevel !== minLevel || intensityMaxLevel !== maxLevel) {
|
|
157
|
+
throw new Error('Intensity levels do not match RGB levels');
|
|
158
|
+
}
|
|
159
|
+
intensity.forEach((i) => {
|
|
160
|
+
i.fileDirectory.vcsPanorama = { type: 'image' };
|
|
161
|
+
});
|
|
162
|
+
return intensity;
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
let depth;
|
|
166
|
+
let usedDepthImage = depthImage;
|
|
167
|
+
if (!usedDepthImage && hasDepth && absoluteRootUrl) {
|
|
168
|
+
try {
|
|
169
|
+
usedDepthImage = await fromUrl(new URL(`${name}_depth.tif`, absoluteRootUrl).href);
|
|
170
|
+
}
|
|
171
|
+
catch (e) {
|
|
172
|
+
getLogger('PanoramaImage').warning(`ailed to load depth image for ${name}`);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
if (usedDepthImage) {
|
|
176
|
+
const { images: depthImages, minLevel: depthMinLevel, maxLevel: depthMaxLevel, } = await loadMetadataFromImage(usedDepthImage);
|
|
177
|
+
if (depthMinLevel !== minLevel || depthMaxLevel !== maxLevel) {
|
|
178
|
+
throw new Error('Depth levels do not match RGB levels');
|
|
179
|
+
}
|
|
180
|
+
const depthMetadata = parseDepthGDALMetadata(depthImages.at(-1).getGDALMetadata());
|
|
181
|
+
depthImages.forEach((i) => {
|
|
182
|
+
i.fileDirectory.vcsPanorama = {
|
|
183
|
+
type: 'depth',
|
|
184
|
+
};
|
|
185
|
+
});
|
|
186
|
+
depth = { levelImages: depthImages, metadata: depthMetadata };
|
|
187
|
+
}
|
|
188
|
+
const tileProvider = createPanoramaTileProvider(rgb, scaledModelMatrix, tileSize, minLevel, maxLevel, getIntensityImages, depth, options.tileCacheSize, options.providerConcurrency, options.poolOrDecoder);
|
|
189
|
+
const positionAtDepth = async (imageCoordinate, mostDetailed, result) => {
|
|
190
|
+
const depthValue = mostDetailed
|
|
191
|
+
? await tileProvider.getDepthAtImageCoordinateMostDetailed(imageCoordinate)
|
|
192
|
+
: await tileProvider.getDepthAtImageCoordinate(imageCoordinate);
|
|
193
|
+
if (depthValue === undefined) {
|
|
194
|
+
return undefined;
|
|
195
|
+
}
|
|
196
|
+
const cartesian = imageSphericalToCartesian(imageCoordinate, result);
|
|
197
|
+
Cartesian3.normalize(cartesian, cartesian);
|
|
198
|
+
Cartesian3.multiplyByScalar(cartesian, depthValue, cartesian);
|
|
199
|
+
Matrix4.multiplyByPoint(modelMatrix, cartesian, cartesian);
|
|
200
|
+
return cartesian;
|
|
201
|
+
};
|
|
202
|
+
return {
|
|
203
|
+
get name() {
|
|
204
|
+
return nameOrId;
|
|
205
|
+
},
|
|
206
|
+
get position() {
|
|
207
|
+
return position;
|
|
208
|
+
},
|
|
209
|
+
get orientation() {
|
|
210
|
+
return orientation;
|
|
211
|
+
},
|
|
212
|
+
get modelMatrix() {
|
|
213
|
+
return modelMatrix;
|
|
214
|
+
},
|
|
215
|
+
get up() {
|
|
216
|
+
return up;
|
|
217
|
+
},
|
|
218
|
+
get invModelMatrix() {
|
|
219
|
+
return invModelMatrix;
|
|
220
|
+
},
|
|
221
|
+
get tileProvider() {
|
|
222
|
+
return tileProvider;
|
|
223
|
+
},
|
|
224
|
+
get hasIntensity() {
|
|
225
|
+
return hasIntensity;
|
|
226
|
+
},
|
|
227
|
+
get hasDepth() {
|
|
228
|
+
return hasDepth;
|
|
229
|
+
},
|
|
230
|
+
get image() {
|
|
231
|
+
return rgbImage;
|
|
232
|
+
},
|
|
233
|
+
get tileSize() {
|
|
234
|
+
return tileSize;
|
|
235
|
+
},
|
|
236
|
+
get minLevel() {
|
|
237
|
+
return minLevel;
|
|
238
|
+
},
|
|
239
|
+
get maxLevel() {
|
|
240
|
+
return maxLevel;
|
|
241
|
+
},
|
|
242
|
+
get maxDepth() {
|
|
243
|
+
return depth?.metadata?.max ?? 50;
|
|
244
|
+
},
|
|
245
|
+
get dataset() {
|
|
246
|
+
return dataset;
|
|
247
|
+
},
|
|
248
|
+
async getPositionAtImageCoordinate(imageCoordinate, result) {
|
|
249
|
+
return positionAtDepth(imageCoordinate, false, result);
|
|
250
|
+
},
|
|
251
|
+
async getPositionAtImageCoordinateMostDetailed(imageCoordinate, result) {
|
|
252
|
+
return positionAtDepth(imageCoordinate, true, result);
|
|
253
|
+
},
|
|
254
|
+
destroy() {
|
|
255
|
+
tileProvider.destroy();
|
|
256
|
+
},
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Creates a panorama image from a URL. The URL must point to a RGB image with the name ending in "_rgb.tif".
|
|
261
|
+
* @param rgbImageUrl - the url to the RGB image
|
|
262
|
+
* @param [dataset] - the dataset to which the image belongs, if applicable
|
|
263
|
+
*/
|
|
264
|
+
export async function createPanoramaImageFromURL(rgbImageUrl, dataset) {
|
|
265
|
+
const { name, absoluteRootUrl } = parseRgbUrl(rgbImageUrl);
|
|
266
|
+
const image = await fromUrl(absoluteRootUrl);
|
|
267
|
+
return createPanoramaImage(image, { dataset, absoluteRootUrl, name });
|
|
268
|
+
}
|
|
269
|
+
//# sourceMappingURL=panoramaImage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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AQ,CAAC;QAClB,CAAC;QACD,IAAI,QAAQ;YACV,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,IAAI,QAAQ;YACV,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,IAAI,QAAQ;YACV,OAAO,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,CAAC;QACpC,CAAC;QACD,IAAI,OAAO;YACT,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,KAAK,CAAC,4BAA4B,CAChC,eAAiC,EACjC,MAAmB;YAEnB,OAAO,eAAe,CAAC,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACzD,CAAC;QACD,KAAK,CAAC,wCAAwC,CAC5C,eAAiC,EACjC,MAAmB;YAEnB,OAAO,eAAe,CAAC,eAAe,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACxD,CAAC;QACD,OAAO;YACL,YAAY,CAAC,OAAO,EAAE,CAAC;QACzB,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,WAAmB,EACnB,OAA8B;IAE9B,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC;IAC3D,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;IAC7C,OAAO,mBAAmB,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;AACxE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import LRUCache from 'ol/structs/LRUCache.js';
|
|
2
|
+
/**
|
|
3
|
+
* A specialized LRU cache
|
|
4
|
+
*/
|
|
5
|
+
export class PanoramaImageCache extends LRUCache {
|
|
6
|
+
deleteOldest() {
|
|
7
|
+
const entry = this.pop();
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
9
|
+
if (entry) {
|
|
10
|
+
entry
|
|
11
|
+
.then((image) => {
|
|
12
|
+
image.destroy();
|
|
13
|
+
})
|
|
14
|
+
.catch(() => { });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=panoramaImageCache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panoramaImageCache.js","sourceRoot":"","sources":["../../../src/panorama/panoramaImageCache.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAG9C;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,QAAgC;IACtE,YAAY;QACV,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACzB,kEAAkE;QAClE,IAAI,KAAK,EAAE,CAAC;YACV,KAAK;iBACF,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;gBACd,KAAK,CAAC,OAAO,EAAE,CAAC;YAClB,CAAC,CAAC;iBACD,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type PanoramaMap from '../map/panoramaMap.js';
|
|
2
|
+
import PanoramaTilePrimitiveCollection from './panoramaTilePrimitiveCollection.js';
|
|
3
|
+
export type PanoramaImageView = {
|
|
4
|
+
/**
|
|
5
|
+
* Suspends the loading of tiles. This is used as a debug feature.
|
|
6
|
+
*/
|
|
7
|
+
suspendTileLoading: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The primitive collection that contains the panorama tiles.
|
|
10
|
+
*/
|
|
11
|
+
readonly tilePrimitiveCollection: PanoramaTilePrimitiveCollection;
|
|
12
|
+
/**
|
|
13
|
+
* Force a render of the panorama image. You do not need to call this for the normal rendering loop.
|
|
14
|
+
*/
|
|
15
|
+
render(): void;
|
|
16
|
+
destroy(): void;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The panorama image view is responsible for rendering the current panorama image of a PanoramaMap.
|
|
20
|
+
* It will react to image changes and update the view. It tracks changes
|
|
21
|
+
* to the panorama camera and updates the panorama tiles accordingly. Typically, you will not
|
|
22
|
+
* have to create this directly, but rather use the PanoramaMap's imageView property.
|
|
23
|
+
* @param map
|
|
24
|
+
*/
|
|
25
|
+
export declare function createPanoramaImageView(map: PanoramaMap): PanoramaImageView;
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import { Cartesian2, Matrix4, Cartesian3 } from '@vcmap-cesium/engine';
|
|
2
|
+
import { getWidth } from 'ol/extent.js';
|
|
3
|
+
import { getLogger } from '@vcsuite/logger';
|
|
4
|
+
import { getFovImageSphericalExtent, windowPositionToImageSpherical, } from './fieldOfView.js';
|
|
5
|
+
import { createTileCoordinate, getDistanceToTileCoordinate, getTileCoordinatesInImageExtent, tileSizeInRadians, } from './panoramaTileCoordinate.js';
|
|
6
|
+
import PanoramaTilePrimitiveCollection from './panoramaTilePrimitiveCollection.js';
|
|
7
|
+
import { imageSphericalToCartesian } from './sphericalCoordinates.js';
|
|
8
|
+
import { PanoramaOverlayMode } from './panoramaTileMaterial.js';
|
|
9
|
+
const baseLevelScaled = Symbol('baseLevelScaled');
|
|
10
|
+
const MIN_DEPTH_MOVEMENT_DISTANCE = 5 ** 2; // 5 pixels squared, to avoid too many updates
|
|
11
|
+
/**
|
|
12
|
+
* Creates all the tile coordinates for the minimum level of the panorama image.
|
|
13
|
+
* @param minLevel
|
|
14
|
+
*/
|
|
15
|
+
function createMinLevelTiles(minLevel) {
|
|
16
|
+
const tiles = [];
|
|
17
|
+
for (let x = 0; x < 2 ** minLevel * 2; x++) {
|
|
18
|
+
for (let y = 0; y < 2 ** minLevel; y++) {
|
|
19
|
+
tiles.push(createTileCoordinate(x, y, minLevel));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return tiles;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Calculates the pixel per radians for the given level and tile size.
|
|
26
|
+
* @param level
|
|
27
|
+
* @param tileSize
|
|
28
|
+
*/
|
|
29
|
+
function getLevelPixelPerRadians(level, tileSize) {
|
|
30
|
+
return tileSize[0] / tileSizeInRadians(level);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* 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.
|
|
34
|
+
* This is set up by the panorama image wrapper, should the image have depth information.
|
|
35
|
+
* @param image
|
|
36
|
+
* @param primitiveCollection
|
|
37
|
+
* @param camera
|
|
38
|
+
* @param canvas
|
|
39
|
+
*/
|
|
40
|
+
function setupDepthHandling(image, primitiveCollection, camera, canvas) {
|
|
41
|
+
let windowPositon;
|
|
42
|
+
const handlePointerChanged = (x, y) => {
|
|
43
|
+
if (x != null && y != null) {
|
|
44
|
+
const newPosition = new Cartesian2(x, y);
|
|
45
|
+
if (windowPositon &&
|
|
46
|
+
Cartesian2.distanceSquared(windowPositon, newPosition) <
|
|
47
|
+
MIN_DEPTH_MOVEMENT_DISTANCE) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
windowPositon = newPosition;
|
|
51
|
+
const imageSpherical = windowPositionToImageSpherical(windowPositon, camera, image.invModelMatrix);
|
|
52
|
+
if (imageSpherical) {
|
|
53
|
+
image.tileProvider
|
|
54
|
+
.getDepthAtImageCoordinate(imageSpherical)
|
|
55
|
+
.then((depth) => {
|
|
56
|
+
if (windowPositon !== newPosition) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (depth !== undefined) {
|
|
60
|
+
const imageCartesian = imageSphericalToCartesian(imageSpherical);
|
|
61
|
+
Cartesian3.multiplyByScalar(imageCartesian, depth / image.maxDepth, imageCartesian);
|
|
62
|
+
primitiveCollection.cursorPosition = imageCartesian;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
primitiveCollection.cursorPosition = new Cartesian3(-1, -1, -1);
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
.catch(() => {
|
|
69
|
+
getLogger('PanoramaImageView').warning('Failed to get depth');
|
|
70
|
+
primitiveCollection.cursorPosition = new Cartesian3(-1, -1, -1);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
primitiveCollection.cursorPosition = new Cartesian3(-1, -1, -1);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
primitiveCollection.cursorPosition = new Cartesian3(-1, -1, -1);
|
|
79
|
+
windowPositon = undefined;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
const mouseMoveHandler = (event) => {
|
|
83
|
+
handlePointerChanged(event.offsetX, event.offsetY);
|
|
84
|
+
};
|
|
85
|
+
const leaveHandler = () => {
|
|
86
|
+
handlePointerChanged();
|
|
87
|
+
};
|
|
88
|
+
const touchMoveHandler = (event) => {
|
|
89
|
+
const { clientX, clientY } = event.touches[0];
|
|
90
|
+
handlePointerChanged(clientX, clientY);
|
|
91
|
+
};
|
|
92
|
+
canvas.addEventListener('mousemove', mouseMoveHandler);
|
|
93
|
+
canvas.addEventListener('mouseleave', leaveHandler);
|
|
94
|
+
canvas.addEventListener('touchmove', touchMoveHandler);
|
|
95
|
+
canvas.addEventListener('touchend', leaveHandler);
|
|
96
|
+
return () => {
|
|
97
|
+
canvas.removeEventListener('mousemove', mouseMoveHandler);
|
|
98
|
+
canvas.removeEventListener('mouseleave', leaveHandler);
|
|
99
|
+
canvas.removeEventListener('touchmove', touchMoveHandler);
|
|
100
|
+
canvas.removeEventListener('touchend', leaveHandler);
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* The image wrapper is responsible for managing the panorama image tiles and rendering them.
|
|
105
|
+
* @param image
|
|
106
|
+
* @param primitiveCollection
|
|
107
|
+
* @param camera
|
|
108
|
+
* @param canvas
|
|
109
|
+
*/
|
|
110
|
+
function createImageWrapper(image, primitiveCollection, camera, canvas) {
|
|
111
|
+
const { tileSize, maxLevel, minLevel, hasDepth } = image;
|
|
112
|
+
const baseTileCoordinates = createMinLevelTiles(minLevel);
|
|
113
|
+
const destroyDepth = hasDepth
|
|
114
|
+
? setupDepthHandling(image, primitiveCollection, camera, canvas)
|
|
115
|
+
: () => { };
|
|
116
|
+
const currentTiles = new Map();
|
|
117
|
+
let currentLevel = minLevel;
|
|
118
|
+
let currentTileCoordinates = [
|
|
119
|
+
...baseTileCoordinates,
|
|
120
|
+
];
|
|
121
|
+
const createCurrentTiles = () => {
|
|
122
|
+
image.tileProvider.currentLevel = currentLevel;
|
|
123
|
+
image.tileProvider
|
|
124
|
+
.createVisibleTiles(currentTileCoordinates)
|
|
125
|
+
.forEach((tile) => {
|
|
126
|
+
if (!currentTiles.has(tile.tileCoordinate.key)) {
|
|
127
|
+
if (tile.tileCoordinate.level === minLevel &&
|
|
128
|
+
!tile[baseLevelScaled]) {
|
|
129
|
+
tile.primitive.modelMatrix = Matrix4.multiplyByScale(tile.primitive.modelMatrix, new Cartesian3(1.01, 1.01, 1.01), new Matrix4());
|
|
130
|
+
tile[baseLevelScaled] = true;
|
|
131
|
+
}
|
|
132
|
+
currentTiles.set(tile.tileCoordinate.key, tile);
|
|
133
|
+
primitiveCollection.add(tile.primitive);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
image.tileProvider.showIntensity =
|
|
138
|
+
primitiveCollection.overlay === PanoramaOverlayMode.Intensity;
|
|
139
|
+
const showIntensityListener = primitiveCollection.overlayChanged.addEventListener((overlayMode) => {
|
|
140
|
+
image.tileProvider.showIntensity =
|
|
141
|
+
overlayMode === PanoramaOverlayMode.Intensity;
|
|
142
|
+
});
|
|
143
|
+
camera.setView({
|
|
144
|
+
destination: image.position,
|
|
145
|
+
orientation: {
|
|
146
|
+
heading: camera.heading,
|
|
147
|
+
pitch: image.orientation.pitch,
|
|
148
|
+
roll: image.orientation.roll,
|
|
149
|
+
},
|
|
150
|
+
});
|
|
151
|
+
const levelPixelPerRadians = new Array(maxLevel); // XXX can be cached or pre calculated?
|
|
152
|
+
for (let i = 0; i <= maxLevel - minLevel; i++) {
|
|
153
|
+
levelPixelPerRadians[i] = getLevelPixelPerRadians(i + minLevel, tileSize);
|
|
154
|
+
}
|
|
155
|
+
let suspendTileLoading = false;
|
|
156
|
+
const render = () => {
|
|
157
|
+
if (suspendTileLoading) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
const { extents, center: imageCenter } = getFovImageSphericalExtent(camera, image.invModelMatrix);
|
|
161
|
+
const currentImageRadiansWidth = extents.reduce((acc, extent) => acc + getWidth(extent), 0);
|
|
162
|
+
const currentScenePixelWidth = canvas.width;
|
|
163
|
+
const currentRadiansPerPixel = currentScenePixelWidth / currentImageRadiansWidth;
|
|
164
|
+
currentLevel = minLevel;
|
|
165
|
+
if (currentRadiansPerPixel > levelPixelPerRadians[maxLevel - minLevel]) {
|
|
166
|
+
currentLevel = maxLevel;
|
|
167
|
+
}
|
|
168
|
+
else if (currentRadiansPerPixel > levelPixelPerRadians[0]) {
|
|
169
|
+
currentLevel =
|
|
170
|
+
levelPixelPerRadians.findIndex((rpp) => rpp >= currentRadiansPerPixel) +
|
|
171
|
+
minLevel;
|
|
172
|
+
}
|
|
173
|
+
if (currentLevel === minLevel) {
|
|
174
|
+
currentTileCoordinates = [];
|
|
175
|
+
}
|
|
176
|
+
else if (extents.length === 1) {
|
|
177
|
+
currentTileCoordinates = [
|
|
178
|
+
...getTileCoordinatesInImageExtent(extents[0], currentLevel),
|
|
179
|
+
];
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
const leftExtent = extents[0];
|
|
183
|
+
const rightExtent = extents[1];
|
|
184
|
+
leftExtent[2] -= 0.0001; // dont overlap the extents since 0 === 2 * PI
|
|
185
|
+
currentTileCoordinates = [
|
|
186
|
+
...getTileCoordinatesInImageExtent(leftExtent, currentLevel),
|
|
187
|
+
...getTileCoordinatesInImageExtent(rightExtent, currentLevel),
|
|
188
|
+
];
|
|
189
|
+
}
|
|
190
|
+
currentTileCoordinates = currentTileCoordinates
|
|
191
|
+
.map((tc) => ({
|
|
192
|
+
tc,
|
|
193
|
+
distance: getDistanceToTileCoordinate(imageCenter, tc),
|
|
194
|
+
}))
|
|
195
|
+
// we sort furthest first, since tiles are loaded from the back of the array with pop.
|
|
196
|
+
.sort((a, b) => b.distance - a.distance)
|
|
197
|
+
.map((tc) => tc.tc);
|
|
198
|
+
// push base tile coordinates onto the back of the array, so they are always loaded first.
|
|
199
|
+
currentTileCoordinates.push(...baseTileCoordinates);
|
|
200
|
+
currentTiles.forEach((tile) => {
|
|
201
|
+
if (!currentTileCoordinates.find((c) => c.key === tile.tileCoordinate.key)) {
|
|
202
|
+
primitiveCollection.remove(tile.primitive);
|
|
203
|
+
currentTiles.delete(tile.tileCoordinate.key);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
createCurrentTiles();
|
|
207
|
+
};
|
|
208
|
+
render();
|
|
209
|
+
return {
|
|
210
|
+
image,
|
|
211
|
+
get suspendTileLoading() {
|
|
212
|
+
return suspendTileLoading;
|
|
213
|
+
},
|
|
214
|
+
set suspendTileLoading(value) {
|
|
215
|
+
suspendTileLoading = value;
|
|
216
|
+
},
|
|
217
|
+
render,
|
|
218
|
+
destroy() {
|
|
219
|
+
currentTiles.forEach((tile) => {
|
|
220
|
+
primitiveCollection.remove(tile.primitive);
|
|
221
|
+
});
|
|
222
|
+
currentTiles.clear();
|
|
223
|
+
showIntensityListener();
|
|
224
|
+
destroyDepth();
|
|
225
|
+
},
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
let emptyImageOverlay;
|
|
229
|
+
function getEmptyImageBitmap() {
|
|
230
|
+
if (!emptyImageOverlay) {
|
|
231
|
+
const overlay = document.createElement('div');
|
|
232
|
+
overlay.style.position = 'absolute';
|
|
233
|
+
overlay.style.display = 'block';
|
|
234
|
+
overlay.style.top = '0px';
|
|
235
|
+
overlay.style.left = '0px';
|
|
236
|
+
overlay.style.bottom = '0px';
|
|
237
|
+
overlay.style.right = '0px';
|
|
238
|
+
overlay.style.backgroundColor = '#409D76';
|
|
239
|
+
overlay.style.padding = '8px';
|
|
240
|
+
overlay.style.font = 'bold 64px Monospace, Courier New';
|
|
241
|
+
overlay.style.textAlign = 'center';
|
|
242
|
+
overlay.style.alignContent = 'center';
|
|
243
|
+
overlay.style.color = '#424242';
|
|
244
|
+
overlay.innerText = 'No Image';
|
|
245
|
+
emptyImageOverlay = overlay;
|
|
246
|
+
}
|
|
247
|
+
return emptyImageOverlay;
|
|
248
|
+
}
|
|
249
|
+
function setupEmptyImageOverlay(container) {
|
|
250
|
+
const overlay = getEmptyImageBitmap();
|
|
251
|
+
container.appendChild(overlay);
|
|
252
|
+
let remover = () => {
|
|
253
|
+
container.removeChild(overlay);
|
|
254
|
+
remover = undefined; // we need to ensure this is only called once
|
|
255
|
+
};
|
|
256
|
+
return () => {
|
|
257
|
+
remover?.();
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* The panorama image view is responsible for rendering the current panorama image of a PanoramaMap.
|
|
262
|
+
* It will react to image changes and update the view. It tracks changes
|
|
263
|
+
* to the panorama camera and updates the panorama tiles accordingly. Typically, you will not
|
|
264
|
+
* have to create this directly, but rather use the PanoramaMap's imageView property.
|
|
265
|
+
* @param map
|
|
266
|
+
*/
|
|
267
|
+
export function createPanoramaImageView(map) {
|
|
268
|
+
const { scene } = map.getCesiumWidget();
|
|
269
|
+
const primitiveCollection = scene.primitives.add(new PanoramaTilePrimitiveCollection({
|
|
270
|
+
destroyPrimitives: false,
|
|
271
|
+
show: true,
|
|
272
|
+
}));
|
|
273
|
+
const defaultPosition = Cartesian3.fromDegrees(12, 53, 0);
|
|
274
|
+
let currentView;
|
|
275
|
+
let removeOverlay;
|
|
276
|
+
scene.camera.setView({
|
|
277
|
+
destination: defaultPosition,
|
|
278
|
+
orientation: {
|
|
279
|
+
heading: scene.camera.heading ?? 0,
|
|
280
|
+
pitch: 0,
|
|
281
|
+
roll: 0,
|
|
282
|
+
},
|
|
283
|
+
});
|
|
284
|
+
let suspendTileLoading = false;
|
|
285
|
+
const setCurrentView = (image) => {
|
|
286
|
+
const oldView = currentView;
|
|
287
|
+
removeOverlay?.();
|
|
288
|
+
if (image) {
|
|
289
|
+
currentView = createImageWrapper(image, primitiveCollection, scene.camera, scene.canvas);
|
|
290
|
+
currentView.suspendTileLoading = suspendTileLoading;
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
currentView = undefined;
|
|
294
|
+
if (scene.canvas.parentElement) {
|
|
295
|
+
removeOverlay = setupEmptyImageOverlay(scene.canvas.parentElement);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
oldView?.destroy();
|
|
299
|
+
};
|
|
300
|
+
setCurrentView(map.currentPanoramaImage);
|
|
301
|
+
const imageChangedListener = map.currentImageChanged.addEventListener(setCurrentView);
|
|
302
|
+
const render = () => {
|
|
303
|
+
currentView?.render();
|
|
304
|
+
};
|
|
305
|
+
const cameraChangedListener = scene.camera.changed.addEventListener(render);
|
|
306
|
+
render();
|
|
307
|
+
return {
|
|
308
|
+
get suspendTileLoading() {
|
|
309
|
+
return suspendTileLoading;
|
|
310
|
+
},
|
|
311
|
+
set suspendTileLoading(value) {
|
|
312
|
+
suspendTileLoading = value;
|
|
313
|
+
if (currentView) {
|
|
314
|
+
currentView.suspendTileLoading = value;
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
get tilePrimitiveCollection() {
|
|
318
|
+
return primitiveCollection;
|
|
319
|
+
},
|
|
320
|
+
render,
|
|
321
|
+
destroy() {
|
|
322
|
+
this.render = () => { };
|
|
323
|
+
scene.primitives.remove(primitiveCollection);
|
|
324
|
+
currentView?.destroy();
|
|
325
|
+
imageChangedListener();
|
|
326
|
+
cameraChangedListener();
|
|
327
|
+
removeOverlay?.();
|
|
328
|
+
},
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
//# sourceMappingURL=panoramaImageView.js.map
|