@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
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Clock, Color, type ContextOptions, CustomDataSource, DataSourceClock, DataSourceCollection, DataSourceDisplay, type EntityCollection, type Event as CesiumEvent, JulianDate, type Scene, type ShadowMap } from '@vcmap-cesium/engine';
|
|
2
2
|
import type { Coordinate } from 'ol/coordinate.js';
|
|
3
|
-
import
|
|
3
|
+
import { type VcsMapOptions } from './vcsMap.js';
|
|
4
4
|
import type Viewpoint from '../util/viewpoint.js';
|
|
5
5
|
import type { CameraLimiterOptions } from './cameraLimiter.js';
|
|
6
6
|
import CameraLimiter from './cameraLimiter.js';
|
|
7
|
-
import type LayerCollection from '../util/layerCollection.js';
|
|
8
|
-
import type Layer from '../layer/layer.js';
|
|
9
7
|
import VcsEvent from '../vcsEvent.js';
|
|
10
8
|
import type { DisableMapControlOptions } from '../util/mapCollection.js';
|
|
9
|
+
import BaseCesiumMap, { type CesiumVisualisationType } from './baseCesiumMap.js';
|
|
11
10
|
export type CesiumMapOptions = VcsMapOptions & {
|
|
12
11
|
/**
|
|
13
12
|
* if true, lighting will be activated.
|
|
@@ -46,57 +45,19 @@ export type CesiumMapEvent = {
|
|
|
46
45
|
scene: Scene;
|
|
47
46
|
time: JulianDate;
|
|
48
47
|
};
|
|
49
|
-
/**
|
|
50
|
-
* Ensures, a primitive/imageryLayer/entity is part of a collection and placed at the correct location
|
|
51
|
-
* @param cesiumCollection
|
|
52
|
-
* @param item
|
|
53
|
-
* @param layerCollection
|
|
54
|
-
* @private
|
|
55
|
-
*/
|
|
56
|
-
export declare function ensureInCollection<T extends PrimitiveCollection | ImageryLayerCollection>(cesiumCollection: T, item: T extends PrimitiveCollection ? PrimitiveCollection | Cesium3DTileset : ImageryLayer, layerCollection: LayerCollection): void;
|
|
57
|
-
/**
|
|
58
|
-
* @param dataSourceCollection
|
|
59
|
-
* @param dataSource
|
|
60
|
-
* @param layerCollection
|
|
61
|
-
* @private
|
|
62
|
-
*/
|
|
63
|
-
export declare function ensureInDataSourceCollection(dataSourceCollection: DataSourceCollection, dataSource: CustomDataSource, layerCollection: LayerCollection): Promise<void>;
|
|
64
|
-
/**
|
|
65
|
-
* @param primitiveCollection
|
|
66
|
-
* @param item
|
|
67
|
-
* @param layerCollection
|
|
68
|
-
* @private
|
|
69
|
-
*/
|
|
70
|
-
export declare function indexChangedOnPrimitive(primitiveCollection: PrimitiveCollection, item: PrimitiveCollection, layerCollection: LayerCollection): void;
|
|
71
|
-
/**
|
|
72
|
-
* @param imageryLayerCollection
|
|
73
|
-
* @param item
|
|
74
|
-
* @param layerCollection
|
|
75
|
-
* @private
|
|
76
|
-
*/
|
|
77
|
-
export declare function indexChangedOnImageryLayer(imageryLayerCollection: ImageryLayerCollection, item: ImageryLayer, layerCollection: LayerCollection): void;
|
|
78
|
-
/**
|
|
79
|
-
* @param dataSourceCollection
|
|
80
|
-
* @param item
|
|
81
|
-
* @param layerCollection
|
|
82
|
-
* @private
|
|
83
|
-
*/
|
|
84
|
-
export declare function indexChangedOnDataSource(dataSourceCollection: DataSourceCollection, item: CustomDataSource, layerCollection: LayerCollection): void;
|
|
85
48
|
/**
|
|
86
49
|
* @param source
|
|
87
50
|
* @param target
|
|
88
51
|
* @private
|
|
89
52
|
*/
|
|
90
53
|
export declare function synchronizeClock(source: DataSourceClock, target: Clock): CesiumEvent.RemoveCallback;
|
|
91
|
-
export type CesiumVisualisationType = CustomDataSource | CzmlDataSource | PrimitiveCollection | Cesium3DTileset | ImageryLayer;
|
|
92
54
|
/**
|
|
93
55
|
* Cesium Globe Map Class (3D map)
|
|
94
56
|
* @group Map
|
|
95
57
|
*/
|
|
96
|
-
declare class CesiumMap extends
|
|
58
|
+
declare class CesiumMap extends BaseCesiumMap {
|
|
97
59
|
static get className(): string;
|
|
98
60
|
static getDefaultOptions(): CesiumMapOptions;
|
|
99
|
-
private _cesiumWidget;
|
|
100
61
|
dataSourceDisplay: DataSourceDisplay | null;
|
|
101
62
|
/**
|
|
102
63
|
* clock for animated data
|
|
@@ -113,8 +74,6 @@ declare class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
113
74
|
private _dataSourceClocks;
|
|
114
75
|
enableLightning: boolean;
|
|
115
76
|
tileCacheSize: number;
|
|
116
|
-
screenSpaceEventHandler: ScreenSpaceEventHandler | null;
|
|
117
|
-
private _screenSpaceListener;
|
|
118
77
|
defaultJDate: JulianDate;
|
|
119
78
|
/**
|
|
120
79
|
* The defaultShadowMap which is created when calling the constructor of the CesiumWidet in {@link initialize}. This is a reference, not a clone.
|
|
@@ -128,14 +87,11 @@ declare class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
128
87
|
webGLaa: boolean;
|
|
129
88
|
globeColor: Color;
|
|
130
89
|
private _clusterDataSourceDisplay;
|
|
131
|
-
private _terrainProvider;
|
|
132
|
-
defaultTerrainProvider: TerrainProvider | null;
|
|
133
90
|
useOriginalCesiumShader: boolean;
|
|
134
91
|
private _cameraLimiter;
|
|
135
92
|
private _cameraLimiterOptions;
|
|
136
93
|
private _preUpdateListener;
|
|
137
94
|
private _clockSyncListener;
|
|
138
|
-
private _listeners;
|
|
139
95
|
private _lightIntensity;
|
|
140
96
|
private _contextOptions;
|
|
141
97
|
constructor(options: CesiumMapOptions);
|
|
@@ -150,7 +106,6 @@ declare class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
150
106
|
get splitPosition(): number;
|
|
151
107
|
set splitPosition(position: number);
|
|
152
108
|
get defaultShadowMap(): ShadowMap | null;
|
|
153
|
-
get terrainProvider(): TerrainProvider | null;
|
|
154
109
|
/**
|
|
155
110
|
* A camera limit to not allow the camera to get too close to the globe.
|
|
156
111
|
*/
|
|
@@ -158,20 +113,13 @@ declare class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
158
113
|
set cameraLimiter(limiter: CameraLimiter | null);
|
|
159
114
|
private _setupPreUpdateListener;
|
|
160
115
|
initialize(): Promise<void>;
|
|
161
|
-
activate(): Promise<void>;
|
|
162
|
-
deactivate(): void;
|
|
163
116
|
/**
|
|
164
117
|
* getHeight for coordinates
|
|
165
118
|
* @param positions - in web mercator
|
|
166
119
|
* @returns the array of coordinates with heights updated in place
|
|
167
120
|
*/
|
|
168
121
|
getHeightFromTerrain(positions: Coordinate[]): Promise<Coordinate[]>;
|
|
169
|
-
getViewpoint(): Promise<null | Viewpoint>;
|
|
170
|
-
getViewpointSync(): Viewpoint | null;
|
|
171
122
|
gotoViewpoint(viewpoint: Viewpoint, optMaximumHeight?: number): Promise<void>;
|
|
172
|
-
private _getCurrentResolutionFromCartesianLatitude;
|
|
173
|
-
getCurrentResolution(coordinate: Coordinate): number;
|
|
174
|
-
getCurrentResolutionFromCartesian(cartesian: Cartesian3): number;
|
|
175
123
|
disableMovement(prevent: boolean | DisableMapControlOptions): void;
|
|
176
124
|
/**
|
|
177
125
|
* set dataSource clock as display clock to visualize time dependent animation
|
|
@@ -199,10 +147,6 @@ declare class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
199
147
|
* Sets the default shadow map.
|
|
200
148
|
*/
|
|
201
149
|
setDefaultShadowMap(): void;
|
|
202
|
-
/**
|
|
203
|
-
* returns the cesium Widget Object
|
|
204
|
-
*/
|
|
205
|
-
getCesiumWidget(): CesiumWidget | null;
|
|
206
150
|
/**
|
|
207
151
|
* returns the Entities Collection
|
|
208
152
|
*/
|
|
@@ -216,26 +160,7 @@ declare class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
216
160
|
* This datasource can only handle Entities with Billboards, Labels or Points.
|
|
217
161
|
*/
|
|
218
162
|
getClusterDatasources(): DataSourceCollection;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Internal API used to register visualizations from layer implementations
|
|
222
|
-
* @param primitiveCollection
|
|
223
|
-
*/
|
|
224
|
-
addPrimitiveCollection(primitiveCollection: PrimitiveCollection | Cesium3DTileset): void;
|
|
225
|
-
/**
|
|
226
|
-
* Internal API to unregister the visualization for a layers implementation
|
|
227
|
-
* @param primitiveCollection
|
|
228
|
-
*/
|
|
229
|
-
removePrimitiveCollection(primitiveCollection: PrimitiveCollection | Cesium3DTileset): void;
|
|
230
|
-
/**
|
|
231
|
-
* Internal API used to register visualizations from layer implementations
|
|
232
|
-
* @param imageryLayer
|
|
233
|
-
*/
|
|
234
|
-
addImageryLayer(imageryLayer: ImageryLayer): void;
|
|
235
|
-
/**
|
|
236
|
-
* Internal API used to unregister visualizations from layer implementations
|
|
237
|
-
*/
|
|
238
|
-
removeImageryLayer(imageryLayer: ImageryLayer): void;
|
|
163
|
+
protected _indexChangedOnVisualization(vis: CesiumVisualisationType): void;
|
|
239
164
|
/**
|
|
240
165
|
* Internal API used to register visualizations from layer implementations
|
|
241
166
|
*/
|
|
@@ -246,28 +171,11 @@ declare class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
246
171
|
removeDataSource(dataSource: CustomDataSource): void;
|
|
247
172
|
addClusterDataSource(dataSource: CustomDataSource): Promise<void>;
|
|
248
173
|
removeClusterDataSource(dataSource: CustomDataSource): void;
|
|
249
|
-
/**
|
|
250
|
-
* set the cesium TerrainProvider
|
|
251
|
-
*/
|
|
252
|
-
setTerrainProvider(terrainProvider: TerrainProvider): void;
|
|
253
|
-
/**
|
|
254
|
-
* unsets the TerrainProvider (changes to the default TerrainProvider if the given terranProvider is currently active)
|
|
255
|
-
*/
|
|
256
|
-
unsetTerrainProvider(terrainProvider: TerrainProvider): void;
|
|
257
174
|
/**
|
|
258
175
|
* returns the cesium DataSourceDisplay Object
|
|
259
176
|
*/
|
|
260
177
|
getDataSourceDisplay(): DataSourceDisplay | null;
|
|
261
|
-
/**
|
|
262
|
-
* returns the cesium Scene Object, returns null on non initialized or destroyed maps
|
|
263
|
-
*/
|
|
264
|
-
getScene(): Scene | undefined;
|
|
265
178
|
pointIsVisible(coords: Coordinate): boolean;
|
|
266
|
-
/**
|
|
267
|
-
* is called when the cesium Terrainprovider changes. Sets the .terrainProvider and deactivates currently
|
|
268
|
-
* active TerrainLayer layer if necessary
|
|
269
|
-
*/
|
|
270
|
-
private _terrainProviderChanged;
|
|
271
179
|
/**
|
|
272
180
|
* returns true if the WEBGL Extension WEBGL_depth_texture is supported. (Is used for picking)
|
|
273
181
|
*/
|
|
@@ -276,7 +184,7 @@ declare class CesiumMap extends VcsMap<CesiumVisualisationType> {
|
|
|
276
184
|
* returns true if the WEBGL Extension EXT_frag_depth is supported. (Is used for GroundPoloygons)
|
|
277
185
|
*/
|
|
278
186
|
isGroundPrimitiveSupported(): boolean;
|
|
279
|
-
toJSON(): CesiumMapOptions;
|
|
187
|
+
toJSON(defaultOptions?: CesiumMapOptions): CesiumMapOptions;
|
|
280
188
|
destroy(): void;
|
|
281
189
|
}
|
|
282
190
|
export default CesiumMap;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BillboardVisualizer, BoundingSphere, Camera, Cartesian3, CesiumWidget, Clock, Color, CustomDataSource, DataSourceClock, DataSourceCollection, DataSourceDisplay, Intersect, JulianDate, LabelVisualizer, Math as CesiumMath, PointVisualizer, ShadowMode, } from '@vcmap-cesium/engine';
|
|
2
2
|
import { check, maybe } from '@vcsuite/check';
|
|
3
3
|
import { parseBoolean, parseInteger, parseNumber } from '@vcsuite/parsers';
|
|
4
4
|
import VcsMap from './vcsMap.js';
|
|
@@ -9,43 +9,14 @@ import CameraLimiter from './cameraLimiter.js';
|
|
|
9
9
|
import { mapClassRegistry } from '../classRegistry.js';
|
|
10
10
|
import VcsEvent from '../vcsEvent.js';
|
|
11
11
|
import { vectorClusterGroupName } from '../vectorCluster/vectorClusterSymbols.js';
|
|
12
|
-
import
|
|
13
|
-
/**
|
|
14
|
-
* Ensures, a primitive/imageryLayer/entity is part of a collection and placed at the correct location
|
|
15
|
-
* @param cesiumCollection
|
|
16
|
-
* @param item
|
|
17
|
-
* @param layerCollection
|
|
18
|
-
* @private
|
|
19
|
-
*/
|
|
20
|
-
export function ensureInCollection(cesiumCollection, item, layerCollection) {
|
|
21
|
-
const targetIndex = layerCollection.indexOfKey(item[vcsLayerName]);
|
|
22
|
-
if (targetIndex > -1) {
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
24
|
-
// @ts-ignore
|
|
25
|
-
if (!cesiumCollection.contains(item)) {
|
|
26
|
-
const primitivesLength = cesiumCollection.length;
|
|
27
|
-
let index = primitivesLength;
|
|
28
|
-
for (let i = 0; i < primitivesLength; i++) {
|
|
29
|
-
const collectionItem = cesiumCollection.get(i);
|
|
30
|
-
if (layerCollection.indexOfKey(collectionItem[vcsLayerName]) >
|
|
31
|
-
targetIndex) {
|
|
32
|
-
index = i;
|
|
33
|
-
break;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
37
|
-
// @ts-ignore
|
|
38
|
-
cesiumCollection.add(item, index);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
12
|
+
import BaseCesiumMap from './baseCesiumMap.js';
|
|
42
13
|
/**
|
|
43
14
|
* @param dataSourceCollection
|
|
44
15
|
* @param dataSource
|
|
45
16
|
* @param layerCollection
|
|
46
17
|
* @private
|
|
47
18
|
*/
|
|
48
|
-
|
|
19
|
+
async function ensureInDataSourceCollection(dataSourceCollection, dataSource, layerCollection) {
|
|
49
20
|
let targetIndex = -1;
|
|
50
21
|
if (dataSource[vectorClusterGroupName]) {
|
|
51
22
|
targetIndex = layerCollection.size;
|
|
@@ -85,36 +56,13 @@ export async function ensureInDataSourceCollection(dataSourceCollection, dataSou
|
|
|
85
56
|
}
|
|
86
57
|
}
|
|
87
58
|
}
|
|
88
|
-
/**
|
|
89
|
-
* @param primitiveCollection
|
|
90
|
-
* @param item
|
|
91
|
-
* @param layerCollection
|
|
92
|
-
* @private
|
|
93
|
-
*/
|
|
94
|
-
export function indexChangedOnPrimitive(primitiveCollection, item, layerCollection) {
|
|
95
|
-
const { destroyPrimitives } = primitiveCollection;
|
|
96
|
-
primitiveCollection.destroyPrimitives = false;
|
|
97
|
-
primitiveCollection.remove(item);
|
|
98
|
-
ensureInCollection(primitiveCollection, item, layerCollection);
|
|
99
|
-
primitiveCollection.destroyPrimitives = destroyPrimitives;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* @param imageryLayerCollection
|
|
103
|
-
* @param item
|
|
104
|
-
* @param layerCollection
|
|
105
|
-
* @private
|
|
106
|
-
*/
|
|
107
|
-
export function indexChangedOnImageryLayer(imageryLayerCollection, item, layerCollection) {
|
|
108
|
-
imageryLayerCollection.remove(item, false);
|
|
109
|
-
ensureInCollection(imageryLayerCollection, item, layerCollection);
|
|
110
|
-
}
|
|
111
59
|
/**
|
|
112
60
|
* @param dataSourceCollection
|
|
113
61
|
* @param item
|
|
114
62
|
* @param layerCollection
|
|
115
63
|
* @private
|
|
116
64
|
*/
|
|
117
|
-
|
|
65
|
+
function indexChangedOnDataSource(dataSourceCollection, item, layerCollection) {
|
|
118
66
|
// eslint-disable-next-line no-void
|
|
119
67
|
void ensureInDataSourceCollection(dataSourceCollection, item, layerCollection);
|
|
120
68
|
}
|
|
@@ -143,7 +91,7 @@ export function synchronizeClock(source, target) {
|
|
|
143
91
|
* Cesium Globe Map Class (3D map)
|
|
144
92
|
* @group Map
|
|
145
93
|
*/
|
|
146
|
-
class CesiumMap extends
|
|
94
|
+
class CesiumMap extends BaseCesiumMap {
|
|
147
95
|
static get className() {
|
|
148
96
|
return 'CesiumMap';
|
|
149
97
|
}
|
|
@@ -160,7 +108,6 @@ class CesiumMap extends VcsMap {
|
|
|
160
108
|
contextOptions: undefined,
|
|
161
109
|
};
|
|
162
110
|
}
|
|
163
|
-
_cesiumWidget = null;
|
|
164
111
|
dataSourceDisplay = null;
|
|
165
112
|
/**
|
|
166
113
|
* clock for animated data
|
|
@@ -177,8 +124,6 @@ class CesiumMap extends VcsMap {
|
|
|
177
124
|
_dataSourceClocks = [];
|
|
178
125
|
enableLightning;
|
|
179
126
|
tileCacheSize;
|
|
180
|
-
screenSpaceEventHandler = null;
|
|
181
|
-
_screenSpaceListener;
|
|
182
127
|
defaultJDate;
|
|
183
128
|
/**
|
|
184
129
|
* The defaultShadowMap which is created when calling the constructor of the CesiumWidet in {@link initialize}. This is a reference, not a clone.
|
|
@@ -192,19 +137,16 @@ class CesiumMap extends VcsMap {
|
|
|
192
137
|
webGLaa;
|
|
193
138
|
globeColor;
|
|
194
139
|
_clusterDataSourceDisplay;
|
|
195
|
-
_terrainProvider = null;
|
|
196
|
-
defaultTerrainProvider = null;
|
|
197
140
|
useOriginalCesiumShader;
|
|
198
141
|
_cameraLimiter = null;
|
|
199
142
|
_cameraLimiterOptions;
|
|
200
143
|
_preUpdateListener;
|
|
201
144
|
_clockSyncListener;
|
|
202
|
-
_listeners = [];
|
|
203
145
|
_lightIntensity;
|
|
204
146
|
_contextOptions;
|
|
205
147
|
constructor(options) {
|
|
206
|
-
super(options);
|
|
207
148
|
const defaultOptions = CesiumMap.getDefaultOptions();
|
|
149
|
+
super({ ...defaultOptions, ...options });
|
|
208
150
|
this.dataSourceDisplayClock = new Clock({ shouldAnimate: true });
|
|
209
151
|
const defaultClock = new DataSourceClock();
|
|
210
152
|
defaultClock.currentTime = this.dataSourceDisplayClock.currentTime;
|
|
@@ -247,9 +189,6 @@ class CesiumMap extends VcsMap {
|
|
|
247
189
|
get defaultShadowMap() {
|
|
248
190
|
return this._defaultShadowMap;
|
|
249
191
|
}
|
|
250
|
-
get terrainProvider() {
|
|
251
|
-
return this._terrainProvider;
|
|
252
|
-
}
|
|
253
192
|
/**
|
|
254
193
|
* A camera limit to not allow the camera to get too close to the globe.
|
|
255
194
|
*/
|
|
@@ -297,7 +236,7 @@ class CesiumMap extends VcsMap {
|
|
|
297
236
|
antialias: this.webGLaa,
|
|
298
237
|
},
|
|
299
238
|
};
|
|
300
|
-
|
|
239
|
+
const cesiumWidget = new CesiumWidget(this.mapElement, {
|
|
301
240
|
requestRenderMode: false,
|
|
302
241
|
scene3DOnly: true,
|
|
303
242
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -307,63 +246,36 @@ class CesiumMap extends VcsMap {
|
|
|
307
246
|
terrainShadows: ShadowMode.ENABLED,
|
|
308
247
|
contextOptions,
|
|
309
248
|
});
|
|
310
|
-
|
|
311
|
-
|
|
249
|
+
cesiumWidget.scene.globe.tileCacheSize = this.tileCacheSize;
|
|
250
|
+
cesiumWidget.scene.globe.baseColor = this.globeColor;
|
|
312
251
|
this.dataSourceDisplay = new DataSourceDisplay({
|
|
313
|
-
scene:
|
|
252
|
+
scene: cesiumWidget.scene,
|
|
314
253
|
dataSourceCollection: new DataSourceCollection(),
|
|
315
254
|
});
|
|
316
|
-
|
|
317
|
-
this._cesiumWidget.scene.frameState.creditDisplay.beginFrame =
|
|
318
|
-
() => { };
|
|
319
|
-
this._cesiumWidget.scene.frameState.creditDisplay.endFrame =
|
|
320
|
-
() => { };
|
|
321
|
-
const { clock } = this._cesiumWidget;
|
|
255
|
+
const { clock } = cesiumWidget;
|
|
322
256
|
clock.shouldAnimate = true;
|
|
323
257
|
this._listeners.push(clock.onTick.addEventListener(() => {
|
|
324
258
|
this.dataSourceDisplayClock.tick();
|
|
325
259
|
const time = this.dataSourceDisplayClock.currentTime;
|
|
326
260
|
this.dataSourceDisplay?.update?.(time);
|
|
327
261
|
}));
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
this.
|
|
337
|
-
this.
|
|
338
|
-
this._cesiumWidget.scene.globe.enableLighting = this.enableLightning;
|
|
339
|
-
this.setDay(this.defaultJDate);
|
|
340
|
-
// hide default cesium credits container
|
|
341
|
-
const creditsContainer = document.getElementsByClassName('cesium-widget-credits');
|
|
342
|
-
if (creditsContainer) {
|
|
343
|
-
for (let i = 0; i < creditsContainer.length; i++) {
|
|
344
|
-
const element = creditsContainer[i];
|
|
345
|
-
element.style.display = 'none';
|
|
346
|
-
}
|
|
347
|
-
}
|
|
262
|
+
cesiumWidget.scene.shadowMap.maximumDistance = 5000.0;
|
|
263
|
+
cesiumWidget.scene.shadowMap.darkness = 0.6;
|
|
264
|
+
cesiumWidget.scene.globe.depthTestAgainstTerrain = true;
|
|
265
|
+
cesiumWidget.scene.highDynamicRange = false;
|
|
266
|
+
// cesiumWidget.scene.logarithmicDepthBuffer = false; // TODO observe this
|
|
267
|
+
cesiumWidget.scene.splitPosition = this.splitPosition;
|
|
268
|
+
cesiumWidget.scene.light.intensity = this._lightIntensity;
|
|
269
|
+
cesiumWidget.scene.globe.enableLighting = this.enableLightning;
|
|
270
|
+
this.initialized = true;
|
|
271
|
+
this._initializeCesiumWidget(cesiumWidget);
|
|
348
272
|
if (this._cameraLimiterOptions && !this._cameraLimiter) {
|
|
349
273
|
this._cameraLimiter = new CameraLimiter(this._cameraLimiterOptions);
|
|
350
274
|
}
|
|
351
275
|
if (this._cameraLimiter) {
|
|
352
276
|
this._setupPreUpdateListener();
|
|
353
277
|
}
|
|
354
|
-
this.
|
|
355
|
-
this._screenSpaceListener = setupCesiumInteractions(this, this._cesiumWidget.scene, this.screenSpaceEventHandler);
|
|
356
|
-
this.initialized = true;
|
|
357
|
-
this.defaultTerrainProvider = this._cesiumWidget.scene.terrainProvider;
|
|
358
|
-
this._terrainProvider = this.defaultTerrainProvider;
|
|
359
|
-
this._listeners.push(this._cesiumWidget.scene.terrainProviderChanged.addEventListener(this._terrainProviderChanged.bind(this)));
|
|
360
|
-
this._listeners.push(this._cesiumWidget.scene.postRender.addEventListener((eventScene, time) => {
|
|
361
|
-
this.postRender.raiseEvent({
|
|
362
|
-
map: this,
|
|
363
|
-
originalEvent: { scene: eventScene, time },
|
|
364
|
-
});
|
|
365
|
-
}));
|
|
366
|
-
this._defaultShadowMap = this._cesiumWidget.scene.shadowMap;
|
|
278
|
+
this._defaultShadowMap = cesiumWidget.scene.shadowMap;
|
|
367
279
|
if (this._initialShadowMap) {
|
|
368
280
|
this.setShadowMap(this._initialShadowMap);
|
|
369
281
|
this._initialShadowMap = undefined;
|
|
@@ -371,19 +283,6 @@ class CesiumMap extends VcsMap {
|
|
|
371
283
|
}
|
|
372
284
|
return Promise.resolve();
|
|
373
285
|
}
|
|
374
|
-
async activate() {
|
|
375
|
-
await super.activate();
|
|
376
|
-
if (this.active && this._cesiumWidget) {
|
|
377
|
-
this._cesiumWidget.useDefaultRenderLoop = true;
|
|
378
|
-
this._cesiumWidget.resize();
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
deactivate() {
|
|
382
|
-
super.deactivate();
|
|
383
|
-
if (this._cesiumWidget) {
|
|
384
|
-
this._cesiumWidget.useDefaultRenderLoop = false;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
286
|
/**
|
|
388
287
|
* getHeight for coordinates
|
|
389
288
|
* @param positions - in web mercator
|
|
@@ -399,15 +298,6 @@ class CesiumMap extends VcsMap {
|
|
|
399
298
|
}
|
|
400
299
|
return Promise.resolve(positions);
|
|
401
300
|
}
|
|
402
|
-
getViewpoint() {
|
|
403
|
-
return Promise.resolve(this.getViewpointSync());
|
|
404
|
-
}
|
|
405
|
-
getViewpointSync() {
|
|
406
|
-
if (!this._cesiumWidget || !this._cesiumWidget.scene || !this.target) {
|
|
407
|
-
return null;
|
|
408
|
-
}
|
|
409
|
-
return getViewpointFromScene(this._cesiumWidget.scene);
|
|
410
|
-
}
|
|
411
301
|
async gotoViewpoint(viewpoint, optMaximumHeight) {
|
|
412
302
|
if (this.movementApiCallsDisabled ||
|
|
413
303
|
!viewpoint.isValid() ||
|
|
@@ -487,20 +377,6 @@ class CesiumMap extends VcsMap {
|
|
|
487
377
|
});
|
|
488
378
|
}
|
|
489
379
|
}
|
|
490
|
-
_getCurrentResolutionFromCartesianLatitude(cartesian, latitude) {
|
|
491
|
-
if (!this._cesiumWidget) {
|
|
492
|
-
return 1;
|
|
493
|
-
}
|
|
494
|
-
return getResolution(cartesian, this._cesiumWidget.camera, this.mapElement, latitude);
|
|
495
|
-
}
|
|
496
|
-
getCurrentResolution(coordinate) {
|
|
497
|
-
const wgs84Coordinate = Projection.mercatorToWgs84(coordinate);
|
|
498
|
-
const cartesian = Cartesian3.fromDegrees(wgs84Coordinate[0], wgs84Coordinate[1], wgs84Coordinate[2]);
|
|
499
|
-
return this._getCurrentResolutionFromCartesianLatitude(cartesian, CesiumMath.toRadians(wgs84Coordinate[1]));
|
|
500
|
-
}
|
|
501
|
-
getCurrentResolutionFromCartesian(cartesian) {
|
|
502
|
-
return this._getCurrentResolutionFromCartesianLatitude(cartesian);
|
|
503
|
-
}
|
|
504
380
|
disableMovement(prevent) {
|
|
505
381
|
super.disableMovement(prevent);
|
|
506
382
|
if (this._cesiumWidget) {
|
|
@@ -587,12 +463,6 @@ class CesiumMap extends VcsMap {
|
|
|
587
463
|
}
|
|
588
464
|
this.setShadowMap(this._defaultShadowMap);
|
|
589
465
|
}
|
|
590
|
-
/**
|
|
591
|
-
* returns the cesium Widget Object
|
|
592
|
-
*/
|
|
593
|
-
getCesiumWidget() {
|
|
594
|
-
return this._cesiumWidget;
|
|
595
|
-
}
|
|
596
466
|
/**
|
|
597
467
|
* returns the Entities Collection
|
|
598
468
|
*/
|
|
@@ -635,64 +505,14 @@ class CesiumMap extends VcsMap {
|
|
|
635
505
|
}));
|
|
636
506
|
return dataSourceCollection;
|
|
637
507
|
}
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
viz.forEach((item) => {
|
|
642
|
-
if (item instanceof PrimitiveCollection) {
|
|
643
|
-
indexChangedOnPrimitive(this.getScene().primitives, item, this.layerCollection);
|
|
644
|
-
}
|
|
645
|
-
else if (item instanceof ImageryLayer) {
|
|
646
|
-
indexChangedOnImageryLayer(this.getScene().imageryLayers, item, this.layerCollection);
|
|
647
|
-
}
|
|
648
|
-
else if (item instanceof CustomDataSource) {
|
|
649
|
-
indexChangedOnDataSource(this.dataSourceDisplay.dataSources, item, this.layerCollection);
|
|
650
|
-
}
|
|
651
|
-
});
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
/**
|
|
655
|
-
* Internal API used to register visualizations from layer implementations
|
|
656
|
-
* @param primitiveCollection
|
|
657
|
-
*/
|
|
658
|
-
addPrimitiveCollection(primitiveCollection) {
|
|
659
|
-
if (!this._cesiumWidget) {
|
|
660
|
-
throw new Error('Cannot add primitive to uninitialized map');
|
|
661
|
-
}
|
|
662
|
-
if (this.validateVisualization(primitiveCollection)) {
|
|
663
|
-
this.addVisualization(primitiveCollection);
|
|
664
|
-
ensureInCollection(this._cesiumWidget.scene.primitives, primitiveCollection, this.layerCollection);
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
/**
|
|
668
|
-
* Internal API to unregister the visualization for a layers implementation
|
|
669
|
-
* @param primitiveCollection
|
|
670
|
-
*/
|
|
671
|
-
removePrimitiveCollection(primitiveCollection) {
|
|
672
|
-
// XXX add destroy as boolean?
|
|
673
|
-
this.removeVisualization(primitiveCollection);
|
|
674
|
-
this.getScene()?.primitives.remove(primitiveCollection);
|
|
675
|
-
}
|
|
676
|
-
/**
|
|
677
|
-
* Internal API used to register visualizations from layer implementations
|
|
678
|
-
* @param imageryLayer
|
|
679
|
-
*/
|
|
680
|
-
addImageryLayer(imageryLayer) {
|
|
681
|
-
if (!this._cesiumWidget) {
|
|
682
|
-
throw new Error('Cannot add primitive to uninitialized map');
|
|
508
|
+
_indexChangedOnVisualization(vis) {
|
|
509
|
+
if (vis instanceof CustomDataSource) {
|
|
510
|
+
indexChangedOnDataSource(this.dataSourceDisplay.dataSources, vis, this.layerCollection);
|
|
683
511
|
}
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
ensureInCollection(this._cesiumWidget.scene.imageryLayers, imageryLayer, this.layerCollection);
|
|
512
|
+
else {
|
|
513
|
+
super._indexChangedOnVisualization(vis);
|
|
687
514
|
}
|
|
688
515
|
}
|
|
689
|
-
/**
|
|
690
|
-
* Internal API used to unregister visualizations from layer implementations
|
|
691
|
-
*/
|
|
692
|
-
removeImageryLayer(imageryLayer) {
|
|
693
|
-
this.removeVisualization(imageryLayer);
|
|
694
|
-
this.getScene()?.imageryLayers.remove(imageryLayer);
|
|
695
|
-
}
|
|
696
516
|
/**
|
|
697
517
|
* Internal API used to register visualizations from layer implementations
|
|
698
518
|
*/
|
|
@@ -734,37 +554,12 @@ class CesiumMap extends VcsMap {
|
|
|
734
554
|
this._clusterDataSourceDisplay.dataSources.remove(dataSource);
|
|
735
555
|
}
|
|
736
556
|
}
|
|
737
|
-
/**
|
|
738
|
-
* set the cesium TerrainProvider
|
|
739
|
-
*/
|
|
740
|
-
setTerrainProvider(terrainProvider) {
|
|
741
|
-
if (this.terrainProvider !== terrainProvider && this._cesiumWidget) {
|
|
742
|
-
this._cesiumWidget.scene.terrainProvider = terrainProvider;
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
/**
|
|
746
|
-
* unsets the TerrainProvider (changes to the default TerrainProvider if the given terranProvider is currently active)
|
|
747
|
-
*/
|
|
748
|
-
unsetTerrainProvider(terrainProvider) {
|
|
749
|
-
if (this.terrainProvider === terrainProvider) {
|
|
750
|
-
this._terrainProvider = this.defaultTerrainProvider;
|
|
751
|
-
if (this._cesiumWidget && this.defaultTerrainProvider) {
|
|
752
|
-
this._cesiumWidget.scene.terrainProvider = this.defaultTerrainProvider;
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
557
|
/**
|
|
757
558
|
* returns the cesium DataSourceDisplay Object
|
|
758
559
|
*/
|
|
759
560
|
getDataSourceDisplay() {
|
|
760
561
|
return this.dataSourceDisplay;
|
|
761
562
|
}
|
|
762
|
-
/**
|
|
763
|
-
* returns the cesium Scene Object, returns null on non initialized or destroyed maps
|
|
764
|
-
*/
|
|
765
|
-
getScene() {
|
|
766
|
-
return this._cesiumWidget?.scene;
|
|
767
|
-
}
|
|
768
563
|
pointIsVisible(coords) {
|
|
769
564
|
if (!this._cesiumWidget) {
|
|
770
565
|
return false;
|
|
@@ -778,19 +573,6 @@ class CesiumMap extends VcsMap {
|
|
|
778
573
|
}
|
|
779
574
|
return false;
|
|
780
575
|
}
|
|
781
|
-
/**
|
|
782
|
-
* is called when the cesium Terrainprovider changes. Sets the .terrainProvider and deactivates currently
|
|
783
|
-
* active TerrainLayer layer if necessary
|
|
784
|
-
*/
|
|
785
|
-
_terrainProviderChanged(terrainProvider) {
|
|
786
|
-
if (this.terrainProvider !== terrainProvider) {
|
|
787
|
-
const layer = this.layerCollection.getByKey(this?.terrainProvider?.[vcsLayerName]);
|
|
788
|
-
this._terrainProvider = terrainProvider;
|
|
789
|
-
if (layer) {
|
|
790
|
-
layer.deactivate();
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
576
|
/**
|
|
795
577
|
* returns true if the WEBGL Extension WEBGL_depth_texture is supported. (Is used for picking)
|
|
796
578
|
*/
|
|
@@ -809,9 +591,8 @@ class CesiumMap extends VcsMap {
|
|
|
809
591
|
}
|
|
810
592
|
return this._cesiumWidget?.scene.context.fragmentDepth ?? false;
|
|
811
593
|
}
|
|
812
|
-
toJSON() {
|
|
813
|
-
const config = super.toJSON();
|
|
814
|
-
const defaultOptions = CesiumMap.getDefaultOptions();
|
|
594
|
+
toJSON(defaultOptions = CesiumMap.getDefaultOptions()) {
|
|
595
|
+
const config = super.toJSON(defaultOptions);
|
|
815
596
|
if (this.enableLightning !== defaultOptions.enableLightning) {
|
|
816
597
|
config.enableLightning = this.enableLightning;
|
|
817
598
|
}
|
|
@@ -845,17 +626,6 @@ class CesiumMap extends VcsMap {
|
|
|
845
626
|
if (this.dataSourceDisplay && !this.dataSourceDisplay.isDestroyed()) {
|
|
846
627
|
this.dataSourceDisplay.destroy();
|
|
847
628
|
}
|
|
848
|
-
this._screenSpaceListener?.();
|
|
849
|
-
if (this.screenSpaceEventHandler) {
|
|
850
|
-
this.screenSpaceEventHandler.destroy();
|
|
851
|
-
this.screenSpaceEventHandler = null;
|
|
852
|
-
}
|
|
853
|
-
this._listeners.forEach((cb) => {
|
|
854
|
-
cb();
|
|
855
|
-
});
|
|
856
|
-
this._listeners = [];
|
|
857
|
-
this._terrainProvider = null;
|
|
858
|
-
this.defaultTerrainProvider = null;
|
|
859
629
|
if (this._clockSyncListener) {
|
|
860
630
|
this._clockSyncListener();
|
|
861
631
|
this._clockSyncListener = undefined;
|
|
@@ -867,16 +637,9 @@ class CesiumMap extends VcsMap {
|
|
|
867
637
|
if (this._cameraLimiter) {
|
|
868
638
|
this._cameraLimiter = null;
|
|
869
639
|
}
|
|
870
|
-
[...this.layerCollection].forEach((l) => {
|
|
871
|
-
l.removedFromMap(this);
|
|
872
|
-
});
|
|
873
640
|
if (this._clusterDataSourceDisplay) {
|
|
874
641
|
this._clusterDataSourceDisplay.destroy();
|
|
875
642
|
}
|
|
876
|
-
if (this._cesiumWidget) {
|
|
877
|
-
this._cesiumWidget.destroy();
|
|
878
|
-
this._cesiumWidget = null;
|
|
879
|
-
}
|
|
880
643
|
this._initialShadowMap = undefined;
|
|
881
644
|
this._defaultShadowMap = null;
|
|
882
645
|
this.shadowMapChanged.destroy();
|