@vcmap/core 6.2.4 → 6.3.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cesium.d.ts +12 -0
- package/dist/index.d.ts +13 -3
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/ol.d.ts +13 -2
- package/dist/src/category/category.d.ts +1 -1
- package/dist/src/category/category.js +3 -4
- package/dist/src/category/category.js.map +1 -1
- package/dist/src/cesium/cesium3DTileFeature.d.ts +1 -0
- package/dist/src/cesium/cesium3DTileFeature.js +14 -3
- package/dist/src/cesium/cesium3DTileFeature.js.map +1 -1
- package/dist/src/cesium/cesium3DTilePointFeature.js +2 -1
- package/dist/src/cesium/cesium3DTilePointFeature.js.map +1 -1
- package/dist/src/classRegistry.d.ts +7 -1
- package/dist/src/classRegistry.js.map +1 -1
- package/dist/src/featureProvider/abstractAttributeProvider.d.ts +62 -0
- package/dist/src/featureProvider/abstractAttributeProvider.js +129 -0
- package/dist/src/featureProvider/abstractAttributeProvider.js.map +1 -0
- package/dist/src/featureProvider/abstractFeatureProvider.d.ts +10 -19
- package/dist/src/featureProvider/abstractFeatureProvider.js +10 -42
- package/dist/src/featureProvider/abstractFeatureProvider.js.map +1 -1
- package/dist/src/featureProvider/compositeFeatureProvider.d.ts +27 -0
- package/dist/src/featureProvider/compositeFeatureProvider.js +53 -0
- package/dist/src/featureProvider/compositeFeatureProvider.js.map +1 -0
- package/dist/src/featureProvider/csvAttributeProvider.d.ts +41 -0
- package/dist/src/featureProvider/csvAttributeProvider.js +126 -0
- package/dist/src/featureProvider/csvAttributeProvider.js.map +1 -0
- package/dist/src/featureProvider/featureProviderFactory.d.ts +3 -0
- package/dist/src/featureProvider/featureProviderFactory.js +17 -0
- package/dist/src/featureProvider/featureProviderFactory.js.map +1 -0
- package/dist/src/featureProvider/i3sAttributeProvider.d.ts +7 -0
- package/dist/src/featureProvider/i3sAttributeProvider.js +43 -0
- package/dist/src/featureProvider/i3sAttributeProvider.js.map +1 -0
- package/dist/src/featureProvider/jsonAttributeProvider.d.ts +26 -0
- package/dist/src/featureProvider/jsonAttributeProvider.js +73 -0
- package/dist/src/featureProvider/jsonAttributeProvider.js.map +1 -0
- package/dist/src/featureProvider/tileProviderFeatureProvider.d.ts +4 -6
- package/dist/src/featureProvider/tileProviderFeatureProvider.js +9 -11
- package/dist/src/featureProvider/tileProviderFeatureProvider.js.map +1 -1
- package/dist/src/featureProvider/urlIdAttributeProvider.d.ts +28 -0
- package/dist/src/featureProvider/urlIdAttributeProvider.js +50 -0
- package/dist/src/featureProvider/urlIdAttributeProvider.js.map +1 -0
- package/dist/src/featureProvider/wmsFeatureProvider.d.ts +13 -4
- package/dist/src/featureProvider/wmsFeatureProvider.js +19 -9
- package/dist/src/featureProvider/wmsFeatureProvider.js.map +1 -1
- package/dist/src/interaction/coordinateAtPixel.js +4 -6
- package/dist/src/interaction/coordinateAtPixel.js.map +1 -1
- package/dist/src/interaction/ensurePositionInteraction.d.ts +14 -0
- package/dist/src/interaction/ensurePositionInteraction.js +42 -0
- package/dist/src/interaction/ensurePositionInteraction.js.map +1 -0
- package/dist/src/interaction/eventHandler.d.ts +3 -0
- package/dist/src/interaction/eventHandler.js +10 -1
- package/dist/src/interaction/eventHandler.js.map +1 -1
- package/dist/src/interaction/featureAtPixelInteraction.d.ts +15 -3
- package/dist/src/interaction/featureAtPixelInteraction.js +70 -18
- package/dist/src/interaction/featureAtPixelInteraction.js.map +1 -1
- package/dist/src/interaction/featureProviderInteraction.js +42 -26
- package/dist/src/interaction/featureProviderInteraction.js.map +1 -1
- package/dist/src/interaction/panoramaImageSelection.js +2 -2
- package/dist/src/interaction/panoramaImageSelection.js.map +1 -1
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.d.ts +17 -9
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js +244 -165
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/i3sCesiumImpl.d.ts +33 -0
- package/dist/src/layer/cesium/i3sCesiumImpl.js +107 -0
- package/dist/src/layer/cesium/i3sCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesium/rasterLayerCesiumImpl.d.ts +3 -3
- package/dist/src/layer/cesium/rasterLayerCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/terrainCesiumImpl.d.ts +3 -3
- package/dist/src/layer/cesium/terrainCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.js +2 -1
- package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.js.map +1 -1
- package/dist/src/layer/cesium/vectorContext.js +1 -1
- package/dist/src/layer/cesium/vectorContext.js.map +1 -1
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js +7 -6
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorTileImageryProvider.js +2 -2
- package/dist/src/layer/cesium/vectorTileImageryProvider.js.map +1 -1
- package/dist/src/layer/cesiumTilesetLayer.d.ts +10 -1
- package/dist/src/layer/cesiumTilesetLayer.js +33 -8
- package/dist/src/layer/cesiumTilesetLayer.js.map +1 -1
- package/dist/src/layer/cogLayer.d.ts +1 -1
- package/dist/src/layer/cogLayer.js +3 -4
- package/dist/src/layer/cogLayer.js.map +1 -1
- package/dist/src/layer/czmlLayer.d.ts +1 -1
- package/dist/src/layer/czmlLayer.js +4 -4
- package/dist/src/layer/czmlLayer.js.map +1 -1
- package/dist/src/layer/featureLayer.d.ts +1 -6
- package/dist/src/layer/featureLayer.js +3 -10
- package/dist/src/layer/featureLayer.js.map +1 -1
- package/dist/src/layer/featureStoreLayer.d.ts +3 -2
- package/dist/src/layer/featureStoreLayer.js +5 -5
- package/dist/src/layer/featureStoreLayer.js.map +1 -1
- package/dist/src/layer/flatGeobufLayer.d.ts +2 -0
- package/dist/src/layer/flatGeobufLayer.js +8 -0
- package/dist/src/layer/flatGeobufLayer.js.map +1 -1
- package/dist/src/layer/geojsonLayer.d.ts +1 -1
- package/dist/src/layer/geojsonLayer.js +5 -12
- package/dist/src/layer/geojsonLayer.js.map +1 -1
- package/dist/src/layer/i3sLayer.d.ts +80 -0
- package/dist/src/layer/i3sLayer.js +242 -0
- package/dist/src/layer/i3sLayer.js.map +1 -0
- package/dist/src/layer/layer.d.ts +29 -10
- package/dist/src/layer/layer.js +114 -34
- package/dist/src/layer/layer.js.map +1 -1
- package/dist/src/layer/layerSymbols.d.ts +4 -0
- package/dist/src/layer/layerSymbols.js +4 -0
- package/dist/src/layer/layerSymbols.js.map +1 -1
- package/dist/src/layer/openStreetMapLayer.d.ts +1 -1
- package/dist/src/layer/openStreetMapLayer.js +11 -6
- package/dist/src/layer/openStreetMapLayer.js.map +1 -1
- package/dist/src/layer/panorama/vectorPanoramaImpl.d.ts +38 -0
- package/dist/src/layer/panorama/vectorPanoramaImpl.js +164 -0
- package/dist/src/layer/panorama/vectorPanoramaImpl.js.map +1 -0
- package/dist/src/layer/panoramaDatasetLayer.d.ts +7 -3
- package/dist/src/layer/panoramaDatasetLayer.js +46 -20
- package/dist/src/layer/panoramaDatasetLayer.js.map +1 -1
- package/dist/src/layer/pointCloudLayer.d.ts +1 -5
- package/dist/src/layer/pointCloudLayer.js +3 -15
- package/dist/src/layer/pointCloudLayer.js.map +1 -1
- package/dist/src/layer/rasterLayer.d.ts +1 -1
- package/dist/src/layer/rasterLayer.js +4 -4
- package/dist/src/layer/rasterLayer.js.map +1 -1
- package/dist/src/layer/singleImageLayer.d.ts +1 -1
- package/dist/src/layer/singleImageLayer.js +3 -3
- package/dist/src/layer/singleImageLayer.js.map +1 -1
- package/dist/src/layer/terrainLayer.d.ts +1 -1
- package/dist/src/layer/terrainLayer.js +8 -6
- package/dist/src/layer/terrainLayer.js.map +1 -1
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.js +7 -5
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/mvtTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/mvtTileProvider.js +6 -5
- package/dist/src/layer/tileProvider/mvtTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.js +3 -3
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js +7 -4
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/tileProvider.d.ts +7 -1
- package/dist/src/layer/tileProvider/tileProvider.js +15 -5
- package/dist/src/layer/tileProvider/tileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.js +3 -3
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.js.map +1 -1
- package/dist/src/layer/tmsLayer.d.ts +1 -1
- package/dist/src/layer/tmsLayer.js +3 -10
- package/dist/src/layer/tmsLayer.js.map +1 -1
- package/dist/src/layer/vectorLayer.d.ts +11 -5
- package/dist/src/layer/vectorLayer.js +21 -10
- package/dist/src/layer/vectorLayer.js.map +1 -1
- package/dist/src/layer/vectorProperties.js +10 -1
- package/dist/src/layer/vectorProperties.js.map +1 -1
- package/dist/src/layer/vectorTileLayer.d.ts +14 -5
- package/dist/src/layer/vectorTileLayer.js +82 -31
- package/dist/src/layer/vectorTileLayer.js.map +1 -1
- package/dist/src/layer/wfsLayer.d.ts +1 -1
- package/dist/src/layer/wfsLayer.js +5 -4
- package/dist/src/layer/wfsLayer.js.map +1 -1
- package/dist/src/layer/wmsLayer.d.ts +4 -1
- package/dist/src/layer/wmsLayer.js +65 -36
- package/dist/src/layer/wmsLayer.js.map +1 -1
- package/dist/src/layer/wmtsLayer.d.ts +1 -1
- package/dist/src/layer/wmtsLayer.js +3 -10
- package/dist/src/layer/wmtsLayer.js.map +1 -1
- package/dist/src/map/baseCesiumMap.d.ts +69 -0
- package/dist/src/map/baseCesiumMap.js +393 -0
- package/dist/src/map/baseCesiumMap.js.map +1 -0
- package/dist/src/map/cesiumMap.d.ts +6 -98
- package/dist/src/map/cesiumMap.js +29 -266
- package/dist/src/map/cesiumMap.js.map +1 -1
- package/dist/src/map/obliqueMap.d.ts +1 -1
- package/dist/src/map/obliqueMap.js +14 -8
- package/dist/src/map/obliqueMap.js.map +1 -1
- package/dist/src/map/openlayersMap.d.ts +1 -1
- package/dist/src/map/openlayersMap.js +3 -4
- package/dist/src/map/openlayersMap.js.map +1 -1
- package/dist/src/map/panoramaMap.d.ts +17 -29
- package/dist/src/map/panoramaMap.js +56 -100
- package/dist/src/map/panoramaMap.js.map +1 -1
- package/dist/src/map/vcsMap.d.ts +15 -2
- package/dist/src/map/vcsMap.js +26 -3
- package/dist/src/map/vcsMap.js.map +1 -1
- package/dist/src/oblique/obliqueCollection.d.ts +1 -1
- package/dist/src/oblique/obliqueCollection.js +3 -4
- package/dist/src/oblique/obliqueCollection.js.map +1 -1
- package/dist/src/panorama/panoramaCameraController.d.ts +4 -0
- package/dist/src/panorama/panoramaCameraController.js +8 -0
- package/dist/src/panorama/panoramaCameraController.js.map +1 -1
- package/dist/src/panorama/panoramaImage.d.ts +10 -1
- package/dist/src/panorama/panoramaImage.js +15 -9
- package/dist/src/panorama/panoramaImage.js.map +1 -1
- package/dist/src/panorama/panoramaImageView.d.ts +6 -1
- package/dist/src/panorama/panoramaImageView.js +11 -2
- package/dist/src/panorama/panoramaImageView.js.map +1 -1
- package/dist/src/panorama/panoramaTileMaterial.d.ts +6 -0
- package/dist/src/panorama/panoramaTileMaterial.js +14 -0
- package/dist/src/panorama/panoramaTileMaterial.js.map +1 -1
- package/dist/src/panorama/panoramaTileMaterialFS.shader.d.ts +1 -1
- package/dist/src/panorama/panoramaTileMaterialFS.shader.js +16 -1
- package/dist/src/panorama/panoramaTileMaterialFS.shader.js.map +1 -1
- package/dist/src/panorama/panoramaTilePrimitiveCollection.d.ts +6 -0
- package/dist/src/panorama/panoramaTilePrimitiveCollection.js +28 -0
- package/dist/src/panorama/panoramaTilePrimitiveCollection.js.map +1 -1
- package/dist/src/style/declarativeStyleItem.js +7 -8
- package/dist/src/style/declarativeStyleItem.js.map +1 -1
- package/dist/src/util/clipping/clippingPolygonObject.d.ts +1 -1
- package/dist/src/util/clipping/clippingPolygonObject.js +3 -4
- package/dist/src/util/clipping/clippingPolygonObject.js.map +1 -1
- package/dist/src/util/displayQuality/displayQuality.js +4 -4
- package/dist/src/util/displayQuality/displayQuality.js.map +1 -1
- package/dist/src/util/editor/createFeatureSession.js +3 -1
- package/dist/src/util/editor/createFeatureSession.js.map +1 -1
- package/dist/src/util/editor/editFeaturesSession.js +9 -2
- package/dist/src/util/editor/editFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/editGeometrySession.js +3 -1
- package/dist/src/util/editor/editGeometrySession.js.map +1 -1
- package/dist/src/util/editor/editorSessionHelpers.d.ts +3 -3
- package/dist/src/util/editor/editorSessionHelpers.js +4 -2
- package/dist/src/util/editor/editorSessionHelpers.js.map +1 -1
- package/dist/src/util/editor/interactions/creationSnapping.js +4 -1
- package/dist/src/util/editor/interactions/creationSnapping.js.map +1 -1
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js +2 -2
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/layerSnapping.js +4 -1
- package/dist/src/util/editor/interactions/layerSnapping.js.map +1 -1
- package/dist/src/util/editor/interactions/mapInteractionController.js +12 -1
- package/dist/src/util/editor/interactions/mapInteractionController.js.map +1 -1
- package/dist/src/util/editor/interactions/translationSnapping.js +4 -2
- package/dist/src/util/editor/interactions/translationSnapping.js.map +1 -1
- package/dist/src/util/editor/selectFeaturesSession.js +1 -1
- package/dist/src/util/editor/selectFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/transformation/create3DHandlers.d.ts +2 -2
- package/dist/src/util/editor/transformation/create3DHandlers.js.map +1 -1
- package/dist/src/util/editor/transformation/transformationHandler.js +5 -2
- package/dist/src/util/editor/transformation/transformationHandler.js.map +1 -1
- package/dist/src/util/editor/transformation/translateInteraction.js +2 -2
- package/dist/src/util/editor/transformation/translateInteraction.js.map +1 -1
- package/dist/src/util/fetch.d.ts +7 -0
- package/dist/src/util/fetch.js +7 -0
- package/dist/src/util/fetch.js.map +1 -1
- package/dist/src/util/flight/flightInstance.d.ts +1 -1
- package/dist/src/util/flight/flightInstance.js +3 -4
- package/dist/src/util/flight/flightInstance.js.map +1 -1
- package/dist/src/util/mapCollection.d.ts +5 -0
- package/dist/src/util/mapCollection.js +14 -0
- package/dist/src/util/mapCollection.js.map +1 -1
- package/dist/src/util/renderScreenshot.js +2 -3
- package/dist/src/util/renderScreenshot.js.map +1 -1
- package/dist/src/util/viewpoint.js +1 -1
- package/dist/src/util/viewpoint.js.map +1 -1
- package/dist/src/vcsApp.d.ts +2 -3
- package/dist/src/vcsApp.js.map +1 -1
- package/dist/src/vcsModuleHelpers.d.ts +5 -2
- package/dist/src/vcsModuleHelpers.js +27 -1
- package/dist/src/vcsModuleHelpers.js.map +1 -1
- package/dist/src/vcsObject.d.ts +2 -1
- package/dist/src/vcsObject.js +9 -1
- package/dist/src/vcsObject.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterGroup.d.ts +1 -1
- package/dist/src/vectorCluster/vectorClusterGroup.js +3 -4
- package/dist/src/vectorCluster/vectorClusterGroup.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterStyleItem.d.ts +1 -1
- package/dist/src/vectorCluster/vectorClusterStyleItem.js +3 -4
- package/dist/src/vectorCluster/vectorClusterStyleItem.js.map +1 -1
- package/dist/tests/unit/helpers/cesiumHelpers.d.ts +11 -1
- package/dist/tests/unit/helpers/cesiumHelpers.js +26 -3
- package/dist/tests/unit/helpers/cesiumHelpers.js.map +1 -1
- package/dist/tests/unit/helpers/panoramaHelpers.js +1 -1
- package/dist/tests/unit/helpers/panoramaHelpers.js.map +1 -1
- package/index.ts +30 -5
- package/package.json +3 -3
- package/src/category/category.ts +3 -4
- package/src/cesium/cesium.d.ts +12 -0
- package/src/cesium/cesium3DTileFeature.ts +23 -3
- package/src/cesium/cesium3DTilePointFeature.ts +3 -1
- package/src/classRegistry.ts +8 -3
- package/src/featureProvider/abstractAttributeProvider.ts +201 -0
- package/src/featureProvider/abstractFeatureProvider.ts +32 -51
- package/src/featureProvider/compositeFeatureProvider.ts +103 -0
- package/src/featureProvider/csvAttributeProvider.ts +186 -0
- package/src/featureProvider/featureProviderFactory.ts +31 -0
- package/src/featureProvider/i3sAttributeProvider.ts +60 -0
- package/src/featureProvider/jsonAttributeProvider.ts +109 -0
- package/src/featureProvider/tileProviderFeatureProvider.ts +13 -14
- package/src/featureProvider/urlIdAttributeProvider.ts +82 -0
- package/src/featureProvider/wmsFeatureProvider.ts +31 -10
- package/src/global.d.ts +2 -0
- package/src/interaction/coordinateAtPixel.ts +4 -6
- package/src/interaction/ensurePositionInteraction.ts +50 -0
- package/src/interaction/eventHandler.ts +12 -1
- package/src/interaction/featureAtPixelInteraction.ts +92 -32
- package/src/interaction/featureProviderInteraction.ts +59 -38
- package/src/interaction/panoramaImageSelection.ts +4 -2
- package/src/layer/cesium/cesiumTilesetCesiumImpl.ts +297 -197
- package/src/layer/cesium/i3sCesiumImpl.ts +141 -0
- package/src/layer/cesium/rasterLayerCesiumImpl.ts +3 -3
- package/src/layer/cesium/terrainCesiumImpl.ts +3 -3
- package/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.ts +4 -3
- package/src/layer/cesium/vectorContext.ts +1 -1
- package/src/layer/cesium/vectorRasterTileCesiumImpl.ts +7 -6
- package/src/layer/cesium/vectorTileImageryProvider.ts +2 -2
- package/src/layer/cesiumTilesetLayer.ts +60 -8
- package/src/layer/cogLayer.ts +5 -5
- package/src/layer/czmlLayer.ts +4 -4
- package/src/layer/featureLayer.ts +5 -16
- package/src/layer/featureStoreLayer.ts +11 -5
- package/src/layer/flatGeobufLayer.ts +12 -0
- package/src/layer/geojsonLayer.ts +5 -12
- package/src/layer/i3sLayer.ts +343 -0
- package/src/layer/layer.ts +178 -39
- package/src/layer/layerSymbols.ts +5 -0
- package/src/layer/openStreetMapLayer.ts +13 -6
- package/src/layer/panorama/vectorPanoramaImpl.ts +238 -0
- package/src/layer/panoramaDatasetLayer.ts +69 -23
- package/src/layer/pointCloudLayer.ts +5 -20
- package/src/layer/rasterLayer.ts +4 -4
- package/src/layer/singleImageLayer.ts +5 -3
- package/src/layer/terrainLayer.ts +9 -6
- package/src/layer/tileProvider/flatGeobufTileProvider.ts +9 -5
- package/src/layer/tileProvider/mvtTileProvider.ts +10 -5
- package/src/layer/tileProvider/staticFeatureTileProvider.ts +5 -3
- package/src/layer/tileProvider/staticGeojsonTileProvider.ts +11 -4
- package/src/layer/tileProvider/tileProvider.ts +18 -5
- package/src/layer/tileProvider/urlTemplateTileProvider.ts +7 -3
- package/src/layer/tmsLayer.ts +3 -10
- package/src/layer/vectorLayer.ts +29 -11
- package/src/layer/vectorProperties.ts +10 -1
- package/src/layer/vectorTileLayer.ts +141 -53
- package/src/layer/wfsLayer.ts +7 -4
- package/src/layer/wmsLayer.ts +80 -48
- package/src/layer/wmtsLayer.ts +3 -10
- package/src/map/baseCesiumMap.ts +600 -0
- package/src/map/cesiumMap.ts +99 -457
- package/src/map/obliqueMap.ts +16 -10
- package/src/map/openlayersMap.ts +5 -5
- package/src/map/panoramaMap.ts +74 -139
- package/src/map/vcsMap.ts +44 -4
- package/src/oblique/obliqueCollection.ts +5 -4
- package/src/ol/ol.d.ts +13 -2
- package/src/panorama/panoramaCameraController.ts +13 -1
- package/src/panorama/panoramaImage.ts +25 -8
- package/src/panorama/panoramaImageView.ts +29 -3
- package/src/panorama/panoramaTileMaterial.ts +20 -0
- package/src/panorama/panoramaTileMaterialFS.glsl +16 -1
- package/src/panorama/panoramaTilePrimitiveCollection.ts +34 -0
- package/src/style/declarativeStyleItem.ts +7 -9
- package/src/util/clipping/clippingPolygonObject.ts +5 -4
- package/src/util/displayQuality/displayQuality.ts +4 -4
- package/src/util/editor/createFeatureSession.ts +4 -1
- package/src/util/editor/editFeaturesSession.ts +14 -4
- package/src/util/editor/editGeometrySession.ts +3 -1
- package/src/util/editor/editorSessionHelpers.ts +5 -3
- package/src/util/editor/interactions/creationSnapping.ts +7 -1
- package/src/util/editor/interactions/ensureHandlerSelectionInteraction.ts +2 -2
- package/src/util/editor/interactions/layerSnapping.ts +7 -1
- package/src/util/editor/interactions/mapInteractionController.ts +12 -2
- package/src/util/editor/interactions/translationSnapping.ts +6 -4
- package/src/util/editor/selectFeaturesSession.ts +1 -1
- package/src/util/editor/transformation/create3DHandlers.ts +2 -2
- package/src/util/editor/transformation/transformationHandler.ts +5 -3
- package/src/util/editor/transformation/translateInteraction.ts +4 -4
- package/src/util/fetch.ts +7 -0
- package/src/util/flight/flightInstance.ts +6 -5
- package/src/util/mapCollection.ts +18 -0
- package/src/util/renderScreenshot.ts +4 -8
- package/src/util/viewpoint.ts +2 -2
- package/src/vcsApp.ts +7 -8
- package/src/vcsModuleHelpers.ts +62 -4
- package/src/vcsObject.ts +10 -1
- package/src/vectorCluster/vectorClusterGroup.ts +7 -4
- package/src/vectorCluster/vectorClusterStyleItem.ts +8 -4
- package/dist/src/map/cesiumMapHelpers.d.ts +0 -7
- package/dist/src/map/cesiumMapHelpers.js +0 -144
- package/dist/src/map/cesiumMapHelpers.js.map +0 -1
- package/src/map/cesiumMapHelpers.ts +0 -219
package/src/map/cesiumMap.ts
CHANGED
|
@@ -1,38 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
BillboardVisualizer,
|
|
3
|
+
BoundingSphere,
|
|
4
|
+
Camera,
|
|
5
|
+
Cartesian3,
|
|
6
|
+
type CesiumTerrainProvider,
|
|
7
|
+
CesiumWidget,
|
|
3
8
|
Clock,
|
|
4
|
-
DataSourceClock,
|
|
5
9
|
Color,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
type ContextOptions,
|
|
11
|
+
CustomDataSource,
|
|
12
|
+
type DataSource,
|
|
13
|
+
DataSourceClock,
|
|
9
14
|
DataSourceCollection,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
DataSourceDisplay,
|
|
16
|
+
type EntityCluster,
|
|
17
|
+
type EntityCollection,
|
|
18
|
+
type Event as CesiumEvent,
|
|
19
|
+
Intersect,
|
|
20
|
+
JulianDate,
|
|
16
21
|
LabelVisualizer,
|
|
22
|
+
Math as CesiumMath,
|
|
17
23
|
PointVisualizer,
|
|
18
|
-
CustomDataSource,
|
|
19
|
-
BoundingSphere,
|
|
20
|
-
Intersect,
|
|
21
|
-
ImageryLayer,
|
|
22
|
-
PrimitiveCollection,
|
|
23
24
|
type Scene,
|
|
24
|
-
type ImageryLayerCollection,
|
|
25
|
-
type Cesium3DTileset,
|
|
26
|
-
type TerrainProvider,
|
|
27
|
-
type Event as CesiumEvent,
|
|
28
|
-
type CzmlDataSource,
|
|
29
|
-
type CesiumTerrainProvider,
|
|
30
|
-
type EntityCollection,
|
|
31
|
-
type EntityCluster,
|
|
32
|
-
type DataSource,
|
|
33
|
-
type Visualizer,
|
|
34
25
|
type ShadowMap,
|
|
35
|
-
|
|
26
|
+
ShadowMode,
|
|
27
|
+
type Visualizer,
|
|
36
28
|
} from '@vcmap-cesium/engine';
|
|
37
29
|
import type { Coordinate } from 'ol/coordinate.js';
|
|
38
30
|
import { check, maybe } from '@vcsuite/check';
|
|
@@ -46,102 +38,12 @@ import type { CameraLimiterOptions } from './cameraLimiter.js';
|
|
|
46
38
|
import CameraLimiter from './cameraLimiter.js';
|
|
47
39
|
import { mapClassRegistry } from '../classRegistry.js';
|
|
48
40
|
import type LayerCollection from '../util/layerCollection.js';
|
|
49
|
-
import type Layer from '../layer/layer.js';
|
|
50
41
|
import VcsEvent from '../vcsEvent.js';
|
|
51
42
|
import type { DisableMapControlOptions } from '../util/mapCollection.js';
|
|
52
43
|
import { vectorClusterGroupName } from '../vectorCluster/vectorClusterSymbols.js';
|
|
53
|
-
import {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
setupCesiumInteractions,
|
|
57
|
-
} from './cesiumMapHelpers.js';
|
|
58
|
-
|
|
59
|
-
export type CesiumMapOptions = VcsMapOptions & {
|
|
60
|
-
/**
|
|
61
|
-
* if true, lighting will be activated.
|
|
62
|
-
*/
|
|
63
|
-
enableLightning?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* the tilecache size of cesium terrain and tile layer
|
|
66
|
-
*/
|
|
67
|
-
tileCacheSize?: number;
|
|
68
|
-
/**
|
|
69
|
-
* activates webGL antialiasing (not every Browser respects this value)
|
|
70
|
-
*/
|
|
71
|
-
webGLaa?: boolean;
|
|
72
|
-
cameraLimiter?: CameraLimiterOptions;
|
|
73
|
-
/**
|
|
74
|
-
* the color of the globe, if no image is provided
|
|
75
|
-
*/
|
|
76
|
-
globeColor?: string;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* use Original Cesium Shader, otherwise the VCS Customized Shader will be used.
|
|
80
|
-
* This is a global Setting for all VCMap Instances on the same page.
|
|
81
|
-
*/
|
|
82
|
-
useOriginalCesiumShader?: boolean;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* changes the default Cesium Sunlight Intensity (default is 3.0)
|
|
86
|
-
* Cesium Default is 2.0
|
|
87
|
-
*/
|
|
88
|
-
lightIntensity?: number;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* can be used to forward contextOptions to the CesiumWidget
|
|
92
|
-
* https://cesium.com/learn/cesiumjs/ref-doc/global.html#ContextOptions
|
|
93
|
-
*/
|
|
94
|
-
contextOptions?: ContextOptions;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export type CesiumMapEvent = {
|
|
98
|
-
scene: Scene;
|
|
99
|
-
time: JulianDate;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Ensures, a primitive/imageryLayer/entity is part of a collection and placed at the correct location
|
|
104
|
-
* @param cesiumCollection
|
|
105
|
-
* @param item
|
|
106
|
-
* @param layerCollection
|
|
107
|
-
* @private
|
|
108
|
-
*/
|
|
109
|
-
export function ensureInCollection<
|
|
110
|
-
T extends PrimitiveCollection | ImageryLayerCollection,
|
|
111
|
-
>(
|
|
112
|
-
cesiumCollection: T,
|
|
113
|
-
item: T extends PrimitiveCollection
|
|
114
|
-
? PrimitiveCollection | Cesium3DTileset
|
|
115
|
-
: ImageryLayer,
|
|
116
|
-
layerCollection: LayerCollection,
|
|
117
|
-
): void {
|
|
118
|
-
const targetIndex = layerCollection.indexOfKey(item[vcsLayerName]) as number;
|
|
119
|
-
if (targetIndex > -1) {
|
|
120
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
121
|
-
// @ts-ignore
|
|
122
|
-
if (!cesiumCollection.contains(item)) {
|
|
123
|
-
const primitivesLength = cesiumCollection.length;
|
|
124
|
-
let index = primitivesLength;
|
|
125
|
-
for (let i = 0; i < primitivesLength; i++) {
|
|
126
|
-
const collectionItem = cesiumCollection.get(
|
|
127
|
-
i,
|
|
128
|
-
) as T extends PrimitiveCollection
|
|
129
|
-
? PrimitiveCollection | Cesium3DTileset
|
|
130
|
-
: ImageryLayer;
|
|
131
|
-
if (
|
|
132
|
-
(layerCollection.indexOfKey(collectionItem[vcsLayerName]) as number) >
|
|
133
|
-
targetIndex
|
|
134
|
-
) {
|
|
135
|
-
index = i;
|
|
136
|
-
break;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
140
|
-
// @ts-ignore
|
|
141
|
-
cesiumCollection.add(item, index);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
44
|
+
import BaseCesiumMap, {
|
|
45
|
+
type CesiumVisualisationType,
|
|
46
|
+
} from './baseCesiumMap.js';
|
|
145
47
|
|
|
146
48
|
/**
|
|
147
49
|
* @param dataSourceCollection
|
|
@@ -149,7 +51,7 @@ export function ensureInCollection<
|
|
|
149
51
|
* @param layerCollection
|
|
150
52
|
* @private
|
|
151
53
|
*/
|
|
152
|
-
|
|
54
|
+
async function ensureInDataSourceCollection(
|
|
153
55
|
dataSourceCollection: DataSourceCollection,
|
|
154
56
|
dataSource: CustomDataSource,
|
|
155
57
|
layerCollection: LayerCollection,
|
|
@@ -199,46 +101,13 @@ export async function ensureInDataSourceCollection(
|
|
|
199
101
|
}
|
|
200
102
|
}
|
|
201
103
|
|
|
202
|
-
/**
|
|
203
|
-
* @param primitiveCollection
|
|
204
|
-
* @param item
|
|
205
|
-
* @param layerCollection
|
|
206
|
-
* @private
|
|
207
|
-
*/
|
|
208
|
-
export function indexChangedOnPrimitive(
|
|
209
|
-
primitiveCollection: PrimitiveCollection,
|
|
210
|
-
item: PrimitiveCollection,
|
|
211
|
-
layerCollection: LayerCollection,
|
|
212
|
-
): void {
|
|
213
|
-
const { destroyPrimitives } = primitiveCollection;
|
|
214
|
-
primitiveCollection.destroyPrimitives = false;
|
|
215
|
-
primitiveCollection.remove(item);
|
|
216
|
-
ensureInCollection(primitiveCollection, item, layerCollection);
|
|
217
|
-
primitiveCollection.destroyPrimitives = destroyPrimitives;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* @param imageryLayerCollection
|
|
222
|
-
* @param item
|
|
223
|
-
* @param layerCollection
|
|
224
|
-
* @private
|
|
225
|
-
*/
|
|
226
|
-
export function indexChangedOnImageryLayer(
|
|
227
|
-
imageryLayerCollection: ImageryLayerCollection,
|
|
228
|
-
item: ImageryLayer,
|
|
229
|
-
layerCollection: LayerCollection,
|
|
230
|
-
): void {
|
|
231
|
-
imageryLayerCollection.remove(item, false);
|
|
232
|
-
ensureInCollection(imageryLayerCollection, item, layerCollection);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
104
|
/**
|
|
236
105
|
* @param dataSourceCollection
|
|
237
106
|
* @param item
|
|
238
107
|
* @param layerCollection
|
|
239
108
|
* @private
|
|
240
109
|
*/
|
|
241
|
-
|
|
110
|
+
function indexChangedOnDataSource(
|
|
242
111
|
dataSourceCollection: DataSourceCollection,
|
|
243
112
|
item: CustomDataSource,
|
|
244
113
|
layerCollection: LayerCollection,
|
|
@@ -251,6 +120,49 @@ export function indexChangedOnDataSource(
|
|
|
251
120
|
);
|
|
252
121
|
}
|
|
253
122
|
|
|
123
|
+
export type CesiumMapOptions = VcsMapOptions & {
|
|
124
|
+
/**
|
|
125
|
+
* if true, lighting will be activated.
|
|
126
|
+
*/
|
|
127
|
+
enableLightning?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* the tilecache size of cesium terrain and tile layer
|
|
130
|
+
*/
|
|
131
|
+
tileCacheSize?: number;
|
|
132
|
+
/**
|
|
133
|
+
* activates webGL antialiasing (not every Browser respects this value)
|
|
134
|
+
*/
|
|
135
|
+
webGLaa?: boolean;
|
|
136
|
+
cameraLimiter?: CameraLimiterOptions;
|
|
137
|
+
/**
|
|
138
|
+
* the color of the globe, if no image is provided
|
|
139
|
+
*/
|
|
140
|
+
globeColor?: string;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* use Original Cesium Shader, otherwise the VCS Customized Shader will be used.
|
|
144
|
+
* This is a global Setting for all VCMap Instances on the same page.
|
|
145
|
+
*/
|
|
146
|
+
useOriginalCesiumShader?: boolean;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* changes the default Cesium Sunlight Intensity (default is 3.0)
|
|
150
|
+
* Cesium Default is 2.0
|
|
151
|
+
*/
|
|
152
|
+
lightIntensity?: number;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* can be used to forward contextOptions to the CesiumWidget
|
|
156
|
+
* https://cesium.com/learn/cesiumjs/ref-doc/global.html#ContextOptions
|
|
157
|
+
*/
|
|
158
|
+
contextOptions?: ContextOptions;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export type CesiumMapEvent = {
|
|
162
|
+
scene: Scene;
|
|
163
|
+
time: JulianDate;
|
|
164
|
+
};
|
|
165
|
+
|
|
254
166
|
/**
|
|
255
167
|
* @param source
|
|
256
168
|
* @param target
|
|
@@ -280,18 +192,11 @@ export function synchronizeClock(
|
|
|
280
192
|
);
|
|
281
193
|
}
|
|
282
194
|
|
|
283
|
-
export type CesiumVisualisationType =
|
|
284
|
-
| CustomDataSource
|
|
285
|
-
| CzmlDataSource
|
|
286
|
-
| PrimitiveCollection
|
|
287
|
-
| Cesium3DTileset
|
|
288
|
-
| ImageryLayer;
|
|
289
|
-
|
|
290
195
|
/**
|
|
291
196
|
* Cesium Globe Map Class (3D map)
|
|
292
197
|
* @group Map
|
|
293
198
|
*/
|
|
294
|
-
class CesiumMap extends
|
|
199
|
+
class CesiumMap extends BaseCesiumMap {
|
|
295
200
|
static get className(): string {
|
|
296
201
|
return 'CesiumMap';
|
|
297
202
|
}
|
|
@@ -310,8 +215,6 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
310
215
|
};
|
|
311
216
|
}
|
|
312
217
|
|
|
313
|
-
private _cesiumWidget: CesiumWidget | null = null;
|
|
314
|
-
|
|
315
218
|
dataSourceDisplay: DataSourceDisplay | null = null;
|
|
316
219
|
|
|
317
220
|
/**
|
|
@@ -334,10 +237,6 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
334
237
|
|
|
335
238
|
tileCacheSize: number;
|
|
336
239
|
|
|
337
|
-
screenSpaceEventHandler: ScreenSpaceEventHandler | null = null;
|
|
338
|
-
|
|
339
|
-
private _screenSpaceListener: (() => void) | undefined;
|
|
340
|
-
|
|
341
240
|
defaultJDate: JulianDate;
|
|
342
241
|
|
|
343
242
|
/**
|
|
@@ -358,10 +257,6 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
358
257
|
|
|
359
258
|
private _clusterDataSourceDisplay: DataSourceDisplay | undefined;
|
|
360
259
|
|
|
361
|
-
private _terrainProvider: TerrainProvider | null = null;
|
|
362
|
-
|
|
363
|
-
defaultTerrainProvider: TerrainProvider | null = null;
|
|
364
|
-
|
|
365
260
|
useOriginalCesiumShader: boolean;
|
|
366
261
|
|
|
367
262
|
private _cameraLimiter: CameraLimiter | null = null;
|
|
@@ -372,16 +267,14 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
372
267
|
|
|
373
268
|
private _clockSyncListener: (() => void) | undefined;
|
|
374
269
|
|
|
375
|
-
private _listeners: (() => void)[] = [];
|
|
376
|
-
|
|
377
270
|
private _lightIntensity: number;
|
|
378
271
|
|
|
379
272
|
private _contextOptions: ContextOptions | undefined;
|
|
380
273
|
|
|
381
274
|
constructor(options: CesiumMapOptions) {
|
|
382
|
-
super(options);
|
|
383
|
-
|
|
384
275
|
const defaultOptions = CesiumMap.getDefaultOptions();
|
|
276
|
+
super({ ...defaultOptions, ...options });
|
|
277
|
+
|
|
385
278
|
this.dataSourceDisplayClock = new Clock({ shouldAnimate: true });
|
|
386
279
|
|
|
387
280
|
const defaultClock = new DataSourceClock();
|
|
@@ -454,10 +347,6 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
454
347
|
return this._defaultShadowMap;
|
|
455
348
|
}
|
|
456
349
|
|
|
457
|
-
get terrainProvider(): TerrainProvider | null {
|
|
458
|
-
return this._terrainProvider;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
350
|
/**
|
|
462
351
|
* A camera limit to not allow the camera to get too close to the globe.
|
|
463
352
|
*/
|
|
@@ -506,6 +395,7 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
506
395
|
'Cannot activate Original Cesium Shader, flag to use VCS Shader is already set by another Cesium Map or VCMap Instance',
|
|
507
396
|
);
|
|
508
397
|
}
|
|
398
|
+
|
|
509
399
|
const contextOptions = {
|
|
510
400
|
...this._contextOptions,
|
|
511
401
|
webgl: {
|
|
@@ -513,7 +403,8 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
513
403
|
antialias: this.webGLaa,
|
|
514
404
|
},
|
|
515
405
|
};
|
|
516
|
-
|
|
406
|
+
|
|
407
|
+
const cesiumWidget = new CesiumWidget(this.mapElement, {
|
|
517
408
|
requestRenderMode: false,
|
|
518
409
|
scene3DOnly: true,
|
|
519
410
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -523,21 +414,16 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
523
414
|
terrainShadows: ShadowMode.ENABLED,
|
|
524
415
|
contextOptions,
|
|
525
416
|
});
|
|
526
|
-
|
|
527
|
-
|
|
417
|
+
|
|
418
|
+
cesiumWidget.scene.globe.tileCacheSize = this.tileCacheSize;
|
|
419
|
+
cesiumWidget.scene.globe.baseColor = this.globeColor;
|
|
528
420
|
|
|
529
421
|
this.dataSourceDisplay = new DataSourceDisplay({
|
|
530
|
-
scene:
|
|
422
|
+
scene: cesiumWidget.scene,
|
|
531
423
|
dataSourceCollection: new DataSourceCollection(),
|
|
532
424
|
});
|
|
533
425
|
|
|
534
|
-
|
|
535
|
-
this._cesiumWidget.scene.frameState.creditDisplay.beginFrame =
|
|
536
|
-
(): void => {};
|
|
537
|
-
this._cesiumWidget.scene.frameState.creditDisplay.endFrame =
|
|
538
|
-
(): void => {};
|
|
539
|
-
|
|
540
|
-
const { clock } = this._cesiumWidget;
|
|
426
|
+
const { clock } = cesiumWidget;
|
|
541
427
|
clock.shouldAnimate = true;
|
|
542
428
|
this._listeners.push(
|
|
543
429
|
clock.onTick.addEventListener(() => {
|
|
@@ -547,32 +433,18 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
547
433
|
}),
|
|
548
434
|
);
|
|
549
435
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
this._cesiumWidget.scene.highDynamicRange = false;
|
|
558
|
-
// this._cesiumWidget.scene.logarithmicDepthBuffer = false; // TODO observe this
|
|
559
|
-
this._cesiumWidget.scene.splitPosition = this.splitPosition;
|
|
560
|
-
this._cesiumWidget.scene.light.intensity = this._lightIntensity;
|
|
561
|
-
|
|
562
|
-
this._cesiumWidget.scene.globe.enableLighting = this.enableLightning;
|
|
436
|
+
cesiumWidget.scene.shadowMap.maximumDistance = 5000.0;
|
|
437
|
+
cesiumWidget.scene.shadowMap.darkness = 0.6;
|
|
438
|
+
cesiumWidget.scene.globe.depthTestAgainstTerrain = true;
|
|
439
|
+
cesiumWidget.scene.highDynamicRange = false;
|
|
440
|
+
// cesiumWidget.scene.logarithmicDepthBuffer = false; // TODO observe this
|
|
441
|
+
cesiumWidget.scene.splitPosition = this.splitPosition;
|
|
442
|
+
cesiumWidget.scene.light.intensity = this._lightIntensity;
|
|
563
443
|
|
|
564
|
-
|
|
444
|
+
cesiumWidget.scene.globe.enableLighting = this.enableLightning;
|
|
565
445
|
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
'cesium-widget-credits',
|
|
569
|
-
);
|
|
570
|
-
if (creditsContainer) {
|
|
571
|
-
for (let i = 0; i < creditsContainer.length; i++) {
|
|
572
|
-
const element = creditsContainer[i] as HTMLElement;
|
|
573
|
-
element.style.display = 'none';
|
|
574
|
-
}
|
|
575
|
-
}
|
|
446
|
+
this.initialized = true;
|
|
447
|
+
this._initializeCesiumWidget(cesiumWidget);
|
|
576
448
|
|
|
577
449
|
if (this._cameraLimiterOptions && !this._cameraLimiter) {
|
|
578
450
|
this._cameraLimiter = new CameraLimiter(this._cameraLimiterOptions);
|
|
@@ -581,36 +453,8 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
581
453
|
if (this._cameraLimiter) {
|
|
582
454
|
this._setupPreUpdateListener();
|
|
583
455
|
}
|
|
584
|
-
this.screenSpaceEventHandler = new ScreenSpaceEventHandler(
|
|
585
|
-
this._cesiumWidget.scene.canvas,
|
|
586
|
-
);
|
|
587
|
-
this._screenSpaceListener = setupCesiumInteractions(
|
|
588
|
-
this,
|
|
589
|
-
this._cesiumWidget.scene,
|
|
590
|
-
this.screenSpaceEventHandler,
|
|
591
|
-
);
|
|
592
|
-
this.initialized = true;
|
|
593
456
|
|
|
594
|
-
this.
|
|
595
|
-
this._terrainProvider = this.defaultTerrainProvider;
|
|
596
|
-
this._listeners.push(
|
|
597
|
-
this._cesiumWidget.scene.terrainProviderChanged.addEventListener(
|
|
598
|
-
this._terrainProviderChanged.bind(this),
|
|
599
|
-
),
|
|
600
|
-
);
|
|
601
|
-
|
|
602
|
-
this._listeners.push(
|
|
603
|
-
this._cesiumWidget.scene.postRender.addEventListener(
|
|
604
|
-
(eventScene: Scene, time: JulianDate) => {
|
|
605
|
-
this.postRender.raiseEvent({
|
|
606
|
-
map: this,
|
|
607
|
-
originalEvent: { scene: eventScene, time },
|
|
608
|
-
});
|
|
609
|
-
},
|
|
610
|
-
),
|
|
611
|
-
);
|
|
612
|
-
|
|
613
|
-
this._defaultShadowMap = this._cesiumWidget.scene.shadowMap;
|
|
457
|
+
this._defaultShadowMap = cesiumWidget.scene.shadowMap;
|
|
614
458
|
|
|
615
459
|
if (this._initialShadowMap) {
|
|
616
460
|
this.setShadowMap(this._initialShadowMap);
|
|
@@ -620,21 +464,6 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
620
464
|
return Promise.resolve();
|
|
621
465
|
}
|
|
622
466
|
|
|
623
|
-
async activate(): Promise<void> {
|
|
624
|
-
await super.activate();
|
|
625
|
-
if (this.active && this._cesiumWidget) {
|
|
626
|
-
this._cesiumWidget.useDefaultRenderLoop = true;
|
|
627
|
-
this._cesiumWidget.resize();
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
deactivate(): void {
|
|
632
|
-
super.deactivate();
|
|
633
|
-
if (this._cesiumWidget) {
|
|
634
|
-
this._cesiumWidget.useDefaultRenderLoop = false;
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
|
|
638
467
|
/**
|
|
639
468
|
* getHeight for coordinates
|
|
640
469
|
* @param positions - in web mercator
|
|
@@ -656,17 +485,6 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
656
485
|
return Promise.resolve(positions);
|
|
657
486
|
}
|
|
658
487
|
|
|
659
|
-
getViewpoint(): Promise<null | Viewpoint> {
|
|
660
|
-
return Promise.resolve(this.getViewpointSync());
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
getViewpointSync(): Viewpoint | null {
|
|
664
|
-
if (!this._cesiumWidget || !this._cesiumWidget.scene || !this.target) {
|
|
665
|
-
return null;
|
|
666
|
-
}
|
|
667
|
-
return getViewpointFromScene(this._cesiumWidget.scene);
|
|
668
|
-
}
|
|
669
|
-
|
|
670
488
|
async gotoViewpoint(
|
|
671
489
|
viewpoint: Viewpoint,
|
|
672
490
|
optMaximumHeight?: number,
|
|
@@ -763,39 +581,6 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
763
581
|
}
|
|
764
582
|
}
|
|
765
583
|
|
|
766
|
-
private _getCurrentResolutionFromCartesianLatitude(
|
|
767
|
-
cartesian: Cartesian3,
|
|
768
|
-
latitude?: number,
|
|
769
|
-
): number {
|
|
770
|
-
if (!this._cesiumWidget) {
|
|
771
|
-
return 1;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
return getResolution(
|
|
775
|
-
cartesian,
|
|
776
|
-
this._cesiumWidget.camera,
|
|
777
|
-
this.mapElement,
|
|
778
|
-
latitude,
|
|
779
|
-
);
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
getCurrentResolution(coordinate: Coordinate): number {
|
|
783
|
-
const wgs84Coordinate = Projection.mercatorToWgs84(coordinate);
|
|
784
|
-
const cartesian = Cartesian3.fromDegrees(
|
|
785
|
-
wgs84Coordinate[0],
|
|
786
|
-
wgs84Coordinate[1],
|
|
787
|
-
wgs84Coordinate[2],
|
|
788
|
-
);
|
|
789
|
-
return this._getCurrentResolutionFromCartesianLatitude(
|
|
790
|
-
cartesian,
|
|
791
|
-
CesiumMath.toRadians(wgs84Coordinate[1]),
|
|
792
|
-
);
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
getCurrentResolutionFromCartesian(cartesian: Cartesian3): number {
|
|
796
|
-
return this._getCurrentResolutionFromCartesianLatitude(cartesian);
|
|
797
|
-
}
|
|
798
|
-
|
|
799
584
|
disableMovement(prevent: boolean | DisableMapControlOptions): void {
|
|
800
585
|
super.disableMovement(prevent);
|
|
801
586
|
|
|
@@ -902,13 +687,6 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
902
687
|
this.setShadowMap(this._defaultShadowMap);
|
|
903
688
|
}
|
|
904
689
|
|
|
905
|
-
/**
|
|
906
|
-
* returns the cesium Widget Object
|
|
907
|
-
*/
|
|
908
|
-
getCesiumWidget(): CesiumWidget | null {
|
|
909
|
-
return this._cesiumWidget;
|
|
910
|
-
}
|
|
911
|
-
|
|
912
690
|
/**
|
|
913
691
|
* returns the Entities Collection
|
|
914
692
|
*/
|
|
@@ -967,91 +745,20 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
967
745
|
return dataSourceCollection;
|
|
968
746
|
}
|
|
969
747
|
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
if (viz) {
|
|
973
|
-
viz.forEach((item) => {
|
|
974
|
-
if (item instanceof PrimitiveCollection) {
|
|
975
|
-
indexChangedOnPrimitive(
|
|
976
|
-
(this.getScene() as Scene).primitives,
|
|
977
|
-
item,
|
|
978
|
-
this.layerCollection,
|
|
979
|
-
);
|
|
980
|
-
} else if (item instanceof ImageryLayer) {
|
|
981
|
-
indexChangedOnImageryLayer(
|
|
982
|
-
(this.getScene() as Scene).imageryLayers,
|
|
983
|
-
item,
|
|
984
|
-
this.layerCollection,
|
|
985
|
-
);
|
|
986
|
-
} else if (item instanceof CustomDataSource) {
|
|
987
|
-
indexChangedOnDataSource(
|
|
988
|
-
(this.dataSourceDisplay as DataSourceDisplay).dataSources,
|
|
989
|
-
item,
|
|
990
|
-
this.layerCollection,
|
|
991
|
-
);
|
|
992
|
-
}
|
|
993
|
-
});
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
/**
|
|
998
|
-
* Internal API used to register visualizations from layer implementations
|
|
999
|
-
* @param primitiveCollection
|
|
1000
|
-
*/
|
|
1001
|
-
addPrimitiveCollection(
|
|
1002
|
-
primitiveCollection: PrimitiveCollection | Cesium3DTileset,
|
|
748
|
+
protected override _indexChangedOnVisualization(
|
|
749
|
+
vis: CesiumVisualisationType,
|
|
1003
750
|
): void {
|
|
1004
|
-
if (
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
this.addVisualization(primitiveCollection);
|
|
1009
|
-
ensureInCollection(
|
|
1010
|
-
this._cesiumWidget.scene.primitives,
|
|
1011
|
-
primitiveCollection,
|
|
751
|
+
if (vis instanceof CustomDataSource) {
|
|
752
|
+
indexChangedOnDataSource(
|
|
753
|
+
(this.dataSourceDisplay as DataSourceDisplay).dataSources,
|
|
754
|
+
vis,
|
|
1012
755
|
this.layerCollection,
|
|
1013
756
|
);
|
|
757
|
+
} else {
|
|
758
|
+
super._indexChangedOnVisualization(vis);
|
|
1014
759
|
}
|
|
1015
760
|
}
|
|
1016
761
|
|
|
1017
|
-
/**
|
|
1018
|
-
* Internal API to unregister the visualization for a layers implementation
|
|
1019
|
-
* @param primitiveCollection
|
|
1020
|
-
*/
|
|
1021
|
-
removePrimitiveCollection(
|
|
1022
|
-
primitiveCollection: PrimitiveCollection | Cesium3DTileset,
|
|
1023
|
-
): void {
|
|
1024
|
-
// XXX add destroy as boolean?
|
|
1025
|
-
this.removeVisualization(primitiveCollection);
|
|
1026
|
-
this.getScene()?.primitives.remove(primitiveCollection);
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
/**
|
|
1030
|
-
* Internal API used to register visualizations from layer implementations
|
|
1031
|
-
* @param imageryLayer
|
|
1032
|
-
*/
|
|
1033
|
-
addImageryLayer(imageryLayer: ImageryLayer): void {
|
|
1034
|
-
if (!this._cesiumWidget) {
|
|
1035
|
-
throw new Error('Cannot add primitive to uninitialized map');
|
|
1036
|
-
}
|
|
1037
|
-
if (this.validateVisualization(imageryLayer)) {
|
|
1038
|
-
this.addVisualization(imageryLayer);
|
|
1039
|
-
ensureInCollection(
|
|
1040
|
-
this._cesiumWidget.scene.imageryLayers,
|
|
1041
|
-
imageryLayer,
|
|
1042
|
-
this.layerCollection,
|
|
1043
|
-
);
|
|
1044
|
-
}
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
/**
|
|
1048
|
-
* Internal API used to unregister visualizations from layer implementations
|
|
1049
|
-
*/
|
|
1050
|
-
removeImageryLayer(imageryLayer: ImageryLayer): void {
|
|
1051
|
-
this.removeVisualization(imageryLayer);
|
|
1052
|
-
this.getScene()?.imageryLayers.remove(imageryLayer);
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
762
|
/**
|
|
1056
763
|
* Internal API used to register visualizations from layer implementations
|
|
1057
764
|
*/
|
|
@@ -1109,27 +816,6 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
1109
816
|
}
|
|
1110
817
|
}
|
|
1111
818
|
|
|
1112
|
-
/**
|
|
1113
|
-
* set the cesium TerrainProvider
|
|
1114
|
-
*/
|
|
1115
|
-
setTerrainProvider(terrainProvider: TerrainProvider): void {
|
|
1116
|
-
if (this.terrainProvider !== terrainProvider && this._cesiumWidget) {
|
|
1117
|
-
this._cesiumWidget.scene.terrainProvider = terrainProvider;
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
/**
|
|
1122
|
-
* unsets the TerrainProvider (changes to the default TerrainProvider if the given terranProvider is currently active)
|
|
1123
|
-
*/
|
|
1124
|
-
unsetTerrainProvider(terrainProvider: TerrainProvider): void {
|
|
1125
|
-
if (this.terrainProvider === terrainProvider) {
|
|
1126
|
-
this._terrainProvider = this.defaultTerrainProvider;
|
|
1127
|
-
if (this._cesiumWidget && this.defaultTerrainProvider) {
|
|
1128
|
-
this._cesiumWidget.scene.terrainProvider = this.defaultTerrainProvider;
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
819
|
/**
|
|
1134
820
|
* returns the cesium DataSourceDisplay Object
|
|
1135
821
|
*/
|
|
@@ -1137,13 +823,6 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
1137
823
|
return this.dataSourceDisplay;
|
|
1138
824
|
}
|
|
1139
825
|
|
|
1140
|
-
/**
|
|
1141
|
-
* returns the cesium Scene Object, returns null on non initialized or destroyed maps
|
|
1142
|
-
*/
|
|
1143
|
-
getScene(): Scene | undefined {
|
|
1144
|
-
return this._cesiumWidget?.scene;
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
826
|
pointIsVisible(coords: Coordinate): boolean {
|
|
1148
827
|
if (!this._cesiumWidget) {
|
|
1149
828
|
return false;
|
|
@@ -1165,22 +844,6 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
1165
844
|
return false;
|
|
1166
845
|
}
|
|
1167
846
|
|
|
1168
|
-
/**
|
|
1169
|
-
* is called when the cesium Terrainprovider changes. Sets the .terrainProvider and deactivates currently
|
|
1170
|
-
* active TerrainLayer layer if necessary
|
|
1171
|
-
*/
|
|
1172
|
-
private _terrainProviderChanged(terrainProvider: TerrainProvider): void {
|
|
1173
|
-
if (this.terrainProvider !== terrainProvider) {
|
|
1174
|
-
const layer = this.layerCollection.getByKey(
|
|
1175
|
-
this?.terrainProvider?.[vcsLayerName],
|
|
1176
|
-
);
|
|
1177
|
-
this._terrainProvider = terrainProvider;
|
|
1178
|
-
if (layer) {
|
|
1179
|
-
layer.deactivate();
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
847
|
/**
|
|
1185
848
|
* returns true if the WEBGL Extension WEBGL_depth_texture is supported. (Is used for picking)
|
|
1186
849
|
*/
|
|
@@ -1201,9 +864,8 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
1201
864
|
return this._cesiumWidget?.scene.context.fragmentDepth ?? false;
|
|
1202
865
|
}
|
|
1203
866
|
|
|
1204
|
-
toJSON(): CesiumMapOptions {
|
|
1205
|
-
const config: CesiumMapOptions = super.toJSON();
|
|
1206
|
-
const defaultOptions = CesiumMap.getDefaultOptions();
|
|
867
|
+
toJSON(defaultOptions = CesiumMap.getDefaultOptions()): CesiumMapOptions {
|
|
868
|
+
const config: CesiumMapOptions = super.toJSON(defaultOptions);
|
|
1207
869
|
|
|
1208
870
|
if (this.enableLightning !== defaultOptions.enableLightning) {
|
|
1209
871
|
config.enableLightning = this.enableLightning;
|
|
@@ -1248,18 +910,6 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
1248
910
|
if (this.dataSourceDisplay && !this.dataSourceDisplay.isDestroyed()) {
|
|
1249
911
|
this.dataSourceDisplay.destroy();
|
|
1250
912
|
}
|
|
1251
|
-
this._screenSpaceListener?.();
|
|
1252
|
-
if (this.screenSpaceEventHandler) {
|
|
1253
|
-
this.screenSpaceEventHandler.destroy();
|
|
1254
|
-
this.screenSpaceEventHandler = null;
|
|
1255
|
-
}
|
|
1256
|
-
this._listeners.forEach((cb) => {
|
|
1257
|
-
cb();
|
|
1258
|
-
});
|
|
1259
|
-
this._listeners = [];
|
|
1260
|
-
|
|
1261
|
-
this._terrainProvider = null;
|
|
1262
|
-
this.defaultTerrainProvider = null;
|
|
1263
913
|
|
|
1264
914
|
if (this._clockSyncListener) {
|
|
1265
915
|
this._clockSyncListener();
|
|
@@ -1275,17 +925,9 @@ class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
1275
925
|
this._cameraLimiter = null;
|
|
1276
926
|
}
|
|
1277
927
|
|
|
1278
|
-
[...this.layerCollection].forEach((l) => {
|
|
1279
|
-
l.removedFromMap(this);
|
|
1280
|
-
});
|
|
1281
|
-
|
|
1282
928
|
if (this._clusterDataSourceDisplay) {
|
|
1283
929
|
this._clusterDataSourceDisplay.destroy();
|
|
1284
930
|
}
|
|
1285
|
-
if (this._cesiumWidget) {
|
|
1286
|
-
this._cesiumWidget.destroy();
|
|
1287
|
-
this._cesiumWidget = null;
|
|
1288
|
-
}
|
|
1289
931
|
|
|
1290
932
|
this._initialShadowMap = undefined;
|
|
1291
933
|
this._defaultShadowMap = null;
|