@vcmap/core 5.0.0-rc.9 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/README.md +107 -33
- package/build/postinstall.js +65 -18
- package/dist/index.d.ts +176 -0
- package/dist/index.js +177 -0
- package/dist/index.js.map +1 -0
- package/dist/src/category/category.d.ts +85 -0
- package/dist/src/category/category.js +287 -0
- package/dist/src/category/category.js.map +1 -0
- package/dist/src/category/categoryCollection.d.ts +35 -0
- package/dist/src/category/categoryCollection.js +110 -0
- package/dist/src/category/categoryCollection.js.map +1 -0
- package/dist/src/cesium/cesium3DTileFeature.d.ts +1 -0
- package/dist/src/cesium/cesium3DTileFeature.js +6 -0
- package/dist/src/cesium/cesium3DTileFeature.js.map +1 -0
- package/dist/src/cesium/cesium3DTilePointFeature.d.ts +1 -0
- package/dist/src/cesium/cesium3DTilePointFeature.js +6 -0
- package/dist/src/cesium/cesium3DTilePointFeature.js.map +1 -0
- package/dist/src/cesium/cesiumVcsCameraPrimitive.d.ts +21 -0
- package/dist/src/cesium/cesiumVcsCameraPrimitive.js +128 -0
- package/dist/src/cesium/cesiumVcsCameraPrimitive.js.map +1 -0
- package/dist/src/cesium/entity.d.ts +1 -0
- package/dist/src/cesium/entity.js +18 -0
- package/dist/src/cesium/entity.js.map +1 -0
- package/dist/src/cesium/wallpaperMaterial.d.ts +1 -0
- package/dist/src/cesium/wallpaperMaterial.js +61 -0
- package/dist/src/cesium/wallpaperMaterial.js.map +1 -0
- package/dist/src/classRegistry.d.ts +40 -0
- package/dist/src/classRegistry.js +89 -0
- package/dist/src/classRegistry.js.map +1 -0
- package/dist/src/featureProvider/abstractFeatureProvider.d.ts +76 -0
- package/dist/src/featureProvider/abstractFeatureProvider.js +133 -0
- package/dist/src/featureProvider/abstractFeatureProvider.js.map +1 -0
- package/dist/src/featureProvider/featureProviderSymbols.d.ts +4 -0
- package/dist/src/featureProvider/featureProviderSymbols.js +6 -0
- package/dist/src/featureProvider/featureProviderSymbols.js.map +1 -0
- package/dist/src/featureProvider/tileProviderFeatureProvider.d.ts +19 -0
- package/dist/src/featureProvider/tileProviderFeatureProvider.js +30 -0
- package/dist/src/featureProvider/tileProviderFeatureProvider.js.map +1 -0
- package/dist/src/featureProvider/wmsFeatureProvider.d.ts +91 -0
- package/dist/src/featureProvider/wmsFeatureProvider.js +214 -0
- package/dist/src/featureProvider/wmsFeatureProvider.js.map +1 -0
- package/dist/src/interaction/abstractInteraction.d.ts +117 -0
- package/dist/src/interaction/abstractInteraction.js +102 -0
- package/dist/src/interaction/abstractInteraction.js.map +1 -0
- package/dist/src/interaction/coordinateAtPixel.d.ts +13 -0
- package/dist/src/interaction/coordinateAtPixel.js +75 -0
- package/dist/src/interaction/coordinateAtPixel.js.map +1 -0
- package/dist/src/interaction/eventHandler.d.ts +86 -0
- package/dist/src/interaction/eventHandler.js +325 -0
- package/dist/src/interaction/eventHandler.js.map +1 -0
- package/dist/src/interaction/featureAtPixelInteraction.d.ts +39 -0
- package/dist/src/interaction/featureAtPixelInteraction.js +203 -0
- package/dist/src/interaction/featureAtPixelInteraction.js.map +1 -0
- package/dist/src/interaction/featureProviderInteraction.d.ts +9 -0
- package/dist/src/interaction/featureProviderInteraction.js +34 -0
- package/dist/src/interaction/featureProviderInteraction.js.map +1 -0
- package/dist/src/interaction/interactionChain.d.ts +32 -0
- package/dist/src/interaction/interactionChain.js +83 -0
- package/dist/src/interaction/interactionChain.js.map +1 -0
- package/dist/src/interaction/interactionType.d.ts +42 -0
- package/dist/src/interaction/interactionType.js +47 -0
- package/dist/src/interaction/interactionType.js.map +1 -0
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.d.ts +45 -0
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js +295 -0
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesium/clusterContext.d.ts +24 -0
- package/dist/src/layer/cesium/clusterContext.js +61 -0
- package/dist/src/layer/cesium/clusterContext.js.map +1 -0
- package/dist/src/layer/cesium/dataSourceCesiumImpl.d.ts +18 -0
- package/dist/src/layer/cesium/dataSourceCesiumImpl.js +115 -0
- package/dist/src/layer/cesium/dataSourceCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesium/openStreetMapCesiumImpl.d.ts +10 -0
- package/dist/src/layer/cesium/openStreetMapCesiumImpl.js +18 -0
- package/dist/src/layer/cesium/openStreetMapCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesium/rasterLayerCesiumImpl.d.ts +24 -0
- package/dist/src/layer/cesium/rasterLayerCesiumImpl.js +73 -0
- package/dist/src/layer/cesium/rasterLayerCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesium/singleImageCesiumImpl.d.ts +14 -0
- package/dist/src/layer/cesium/singleImageCesiumImpl.js +35 -0
- package/dist/src/layer/cesium/singleImageCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesium/terrainCesiumImpl.d.ts +19 -0
- package/dist/src/layer/cesium/terrainCesiumImpl.js +47 -0
- package/dist/src/layer/cesium/terrainCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesium/tmsCesiumImpl.d.ts +14 -0
- package/dist/src/layer/cesium/tmsCesiumImpl.js +42 -0
- package/dist/src/layer/cesium/tmsCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesium/vectorCesiumImpl.d.ts +62 -0
- package/dist/src/layer/cesium/vectorCesiumImpl.js +190 -0
- package/dist/src/layer/cesium/vectorCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesium/vectorContext.d.ts +90 -0
- package/dist/src/layer/cesium/vectorContext.js +281 -0
- package/dist/src/layer/cesium/vectorContext.js.map +1 -0
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.d.ts +31 -0
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js +77 -0
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesium/vectorTileImageryProvider.d.ts +57 -0
- package/dist/src/layer/cesium/vectorTileImageryProvider.js +130 -0
- package/dist/src/layer/cesium/vectorTileImageryProvider.js.map +1 -0
- package/dist/src/layer/cesium/wmsCesiumImpl.d.ts +17 -0
- package/dist/src/layer/cesium/wmsCesiumImpl.js +53 -0
- package/dist/src/layer/cesium/wmsCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesium/wmtsCesiumImpl.d.ts +22 -0
- package/dist/src/layer/cesium/wmtsCesiumImpl.js +64 -0
- package/dist/src/layer/cesium/wmtsCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesiumTilesetLayer.d.ts +82 -0
- package/dist/src/layer/cesiumTilesetLayer.js +176 -0
- package/dist/src/layer/cesiumTilesetLayer.js.map +1 -0
- package/dist/src/layer/czmlLayer.d.ts +34 -0
- package/dist/src/layer/czmlLayer.js +115 -0
- package/dist/src/layer/czmlLayer.js.map +1 -0
- package/dist/src/layer/dataSourceLayer.d.ts +54 -0
- package/dist/src/layer/dataSourceLayer.js +132 -0
- package/dist/src/layer/dataSourceLayer.js.map +1 -0
- package/dist/src/layer/featureLayer.d.ts +85 -0
- package/dist/src/layer/featureLayer.js +155 -0
- package/dist/src/layer/featureLayer.js.map +1 -0
- package/dist/src/layer/featureStoreLayer.d.ts +123 -0
- package/dist/src/layer/featureStoreLayer.js +470 -0
- package/dist/src/layer/featureStoreLayer.js.map +1 -0
- package/dist/src/layer/featureStoreLayerChanges.d.ts +88 -0
- package/dist/src/layer/featureStoreLayerChanges.js +288 -0
- package/dist/src/layer/featureStoreLayerChanges.js.map +1 -0
- package/dist/src/layer/featureStoreLayerState.d.ts +9 -0
- package/dist/src/layer/featureStoreLayerState.js +11 -0
- package/dist/src/layer/featureStoreLayerState.js.map +1 -0
- package/dist/src/layer/featureVisibility.d.ts +108 -0
- package/dist/src/layer/featureVisibility.js +335 -0
- package/dist/src/layer/featureVisibility.js.map +1 -0
- package/dist/src/layer/geojsonHelpers.d.ts +72 -0
- package/dist/src/layer/geojsonHelpers.js +339 -0
- package/dist/src/layer/geojsonHelpers.js.map +1 -0
- package/dist/src/layer/geojsonLayer.d.ts +29 -0
- package/dist/src/layer/geojsonLayer.js +121 -0
- package/dist/src/layer/geojsonLayer.js.map +1 -0
- package/dist/src/layer/globalHider.d.ts +31 -0
- package/dist/src/layer/globalHider.js +93 -0
- package/dist/src/layer/globalHider.js.map +1 -0
- package/dist/src/layer/layer.d.ts +227 -0
- package/dist/src/layer/layer.js +494 -0
- package/dist/src/layer/layer.js.map +1 -0
- package/dist/src/layer/layerImplementation.d.ts +41 -0
- package/dist/src/layer/layerImplementation.js +75 -0
- package/dist/src/layer/layerImplementation.js.map +1 -0
- package/dist/src/layer/layerState.d.ts +10 -0
- package/dist/src/layer/layerState.js +12 -0
- package/dist/src/layer/layerState.js.map +1 -0
- package/dist/src/layer/layerSymbols.d.ts +4 -0
- package/dist/src/layer/layerSymbols.js +6 -0
- package/dist/src/layer/layerSymbols.js.map +1 -0
- package/dist/src/layer/oblique/layerObliqueImpl.d.ts +15 -0
- package/dist/src/layer/oblique/layerObliqueImpl.js +41 -0
- package/dist/src/layer/oblique/layerObliqueImpl.js.map +1 -0
- package/dist/src/layer/oblique/obliqueHelpers.d.ts +40 -0
- package/dist/src/layer/oblique/obliqueHelpers.js +140 -0
- package/dist/src/layer/oblique/obliqueHelpers.js.map +1 -0
- package/dist/src/layer/oblique/vectorObliqueImpl.d.ts +70 -0
- package/dist/src/layer/oblique/vectorObliqueImpl.js +344 -0
- package/dist/src/layer/oblique/vectorObliqueImpl.js.map +1 -0
- package/dist/src/layer/openStreetMapLayer.d.ts +54 -0
- package/dist/src/layer/openStreetMapLayer.js +126 -0
- package/dist/src/layer/openStreetMapLayer.js.map +1 -0
- package/dist/src/layer/openlayers/layerOpenlayersImpl.d.ts +31 -0
- package/dist/src/layer/openlayers/layerOpenlayersImpl.js +96 -0
- package/dist/src/layer/openlayers/layerOpenlayersImpl.js.map +1 -0
- package/dist/src/layer/openlayers/openStreetMapOpenlayersImpl.d.ts +11 -0
- package/dist/src/layer/openlayers/openStreetMapOpenlayersImpl.js +21 -0
- package/dist/src/layer/openlayers/openStreetMapOpenlayersImpl.js.map +1 -0
- package/dist/src/layer/openlayers/rasterLayerOpenlayersImpl.d.ts +15 -0
- package/dist/src/layer/openlayers/rasterLayerOpenlayersImpl.js +27 -0
- package/dist/src/layer/openlayers/rasterLayerOpenlayersImpl.js.map +1 -0
- package/dist/src/layer/openlayers/singleImageOpenlayersImpl.d.ts +18 -0
- package/dist/src/layer/openlayers/singleImageOpenlayersImpl.js +38 -0
- package/dist/src/layer/openlayers/singleImageOpenlayersImpl.js.map +1 -0
- package/dist/src/layer/openlayers/tileDebugOpenlayersImpl.d.ts +15 -0
- package/dist/src/layer/openlayers/tileDebugOpenlayersImpl.js +23 -0
- package/dist/src/layer/openlayers/tileDebugOpenlayersImpl.js.map +1 -0
- package/dist/src/layer/openlayers/tmsOpenlayersImpl.d.ts +21 -0
- package/dist/src/layer/openlayers/tmsOpenlayersImpl.js +55 -0
- package/dist/src/layer/openlayers/tmsOpenlayersImpl.js.map +1 -0
- package/dist/src/layer/openlayers/vectorOpenlayersImpl.d.ts +31 -0
- package/dist/src/layer/openlayers/vectorOpenlayersImpl.js +81 -0
- package/dist/src/layer/openlayers/vectorOpenlayersImpl.js.map +1 -0
- package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.d.ts +37 -0
- package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.js +131 -0
- package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.js.map +1 -0
- package/dist/src/layer/openlayers/wmsOpenlayersImpl.d.ts +18 -0
- package/dist/src/layer/openlayers/wmsOpenlayersImpl.js +38 -0
- package/dist/src/layer/openlayers/wmsOpenlayersImpl.js.map +1 -0
- package/dist/src/layer/openlayers/wmtsOpenlayersImpl.d.ts +24 -0
- package/dist/src/layer/openlayers/wmtsOpenlayersImpl.js +99 -0
- package/dist/src/layer/openlayers/wmtsOpenlayersImpl.js.map +1 -0
- package/dist/src/layer/pointCloudLayer.d.ts +46 -0
- package/dist/src/layer/pointCloudLayer.js +93 -0
- package/dist/src/layer/pointCloudLayer.js.map +1 -0
- package/dist/src/layer/rasterLayer.d.ts +95 -0
- package/dist/src/layer/rasterLayer.js +197 -0
- package/dist/src/layer/rasterLayer.js.map +1 -0
- package/dist/src/layer/singleImageLayer.d.ts +30 -0
- package/dist/src/layer/singleImageLayer.js +79 -0
- package/dist/src/layer/singleImageLayer.js.map +1 -0
- package/dist/src/layer/terrainHelpers.d.ts +27 -0
- package/dist/src/layer/terrainHelpers.js +59 -0
- package/dist/src/layer/terrainHelpers.js.map +1 -0
- package/dist/src/layer/terrainLayer.d.ts +32 -0
- package/dist/src/layer/terrainLayer.js +68 -0
- package/dist/src/layer/terrainLayer.js.map +1 -0
- package/dist/src/layer/tileLoadedHelper.d.ts +5 -0
- package/dist/src/layer/tileLoadedHelper.js +52 -0
- package/dist/src/layer/tileLoadedHelper.js.map +1 -0
- package/dist/src/layer/tileProvider/mvtTileProvider.d.ts +31 -0
- package/dist/src/layer/tileProvider/mvtTileProvider.js +91 -0
- package/dist/src/layer/tileProvider/mvtTileProvider.js.map +1 -0
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.d.ts +17 -0
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js +43 -0
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js.map +1 -0
- package/dist/src/layer/tileProvider/tileProvider.d.ts +174 -0
- package/dist/src/layer/tileProvider/tileProvider.js +444 -0
- package/dist/src/layer/tileProvider/tileProvider.js.map +1 -0
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.d.ts +37 -0
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.js +89 -0
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.js.map +1 -0
- package/dist/src/layer/tmsLayer.d.ts +27 -0
- package/dist/src/layer/tmsLayer.js +71 -0
- package/dist/src/layer/tmsLayer.js.map +1 -0
- package/dist/src/layer/vectorHelpers.d.ts +14 -0
- package/dist/src/layer/vectorHelpers.js +100 -0
- package/dist/src/layer/vectorHelpers.js.map +1 -0
- package/dist/src/layer/vectorLayer.d.ts +176 -0
- package/dist/src/layer/vectorLayer.js +384 -0
- package/dist/src/layer/vectorLayer.js.map +1 -0
- package/dist/src/layer/vectorProperties.d.ts +310 -0
- package/dist/src/layer/vectorProperties.js +999 -0
- package/dist/src/layer/vectorProperties.js.map +1 -0
- package/dist/src/layer/vectorSymbols.d.ts +31 -0
- package/{src → dist/src}/layer/vectorSymbols.js +7 -15
- package/dist/src/layer/vectorSymbols.js.map +1 -0
- package/dist/src/layer/vectorTileLayer.d.ts +93 -0
- package/dist/src/layer/vectorTileLayer.js +346 -0
- package/dist/src/layer/vectorTileLayer.js.map +1 -0
- package/dist/src/layer/wfsLayer.d.ts +45 -0
- package/dist/src/layer/wfsLayer.js +124 -0
- package/dist/src/layer/wfsLayer.js.map +1 -0
- package/dist/src/layer/wmsHelpers.d.ts +15 -0
- package/dist/src/layer/wmsHelpers.js +54 -0
- package/dist/src/layer/wmsHelpers.js.map +1 -0
- package/dist/src/layer/wmsLayer.d.ts +75 -0
- package/dist/src/layer/wmsLayer.js +206 -0
- package/dist/src/layer/wmsLayer.js.map +1 -0
- package/dist/src/layer/wmtsLayer.d.ts +51 -0
- package/dist/src/layer/wmtsLayer.js +144 -0
- package/dist/src/layer/wmtsLayer.js.map +1 -0
- package/dist/src/map/baseOLMap.d.ts +34 -0
- package/dist/src/map/baseOLMap.js +174 -0
- package/dist/src/map/baseOLMap.js.map +1 -0
- package/dist/src/map/cameraLimiter.d.ts +71 -0
- package/dist/src/map/cameraLimiter.js +136 -0
- package/dist/src/map/cameraLimiter.js.map +1 -0
- package/dist/src/map/cesiumMap.d.ts +255 -0
- package/dist/src/map/cesiumMap.js +959 -0
- package/dist/src/map/cesiumMap.js.map +1 -0
- package/dist/src/map/mapState.d.ts +10 -0
- package/dist/src/map/mapState.js +12 -0
- package/dist/src/map/mapState.js.map +1 -0
- package/dist/src/map/obliqueMap.d.ts +89 -0
- package/dist/src/map/obliqueMap.js +364 -0
- package/dist/src/map/obliqueMap.js.map +1 -0
- package/dist/src/map/openlayersMap.d.ts +26 -0
- package/dist/src/map/openlayersMap.js +169 -0
- package/dist/src/map/openlayersMap.js.map +1 -0
- package/dist/src/map/vcsMap.d.ts +203 -0
- package/dist/src/map/vcsMap.js +389 -0
- package/dist/src/map/vcsMap.js.map +1 -0
- package/dist/src/moduleIdSymbol.d.ts +1 -0
- package/dist/src/moduleIdSymbol.js +3 -0
- package/dist/src/moduleIdSymbol.js.map +1 -0
- package/dist/src/oblique/defaultObliqueCollection.d.ts +13 -0
- package/dist/src/oblique/defaultObliqueCollection.js +43 -0
- package/dist/src/oblique/defaultObliqueCollection.js.map +1 -0
- package/dist/src/oblique/helpers.d.ts +77 -0
- package/dist/src/oblique/helpers.js +404 -0
- package/dist/src/oblique/helpers.js.map +1 -0
- package/dist/src/oblique/obliqueCollection.d.ts +196 -0
- package/dist/src/oblique/obliqueCollection.js +446 -0
- package/dist/src/oblique/obliqueCollection.js.map +1 -0
- package/dist/src/oblique/obliqueDataSet.d.ts +91 -0
- package/dist/src/oblique/obliqueDataSet.js +270 -0
- package/dist/src/oblique/obliqueDataSet.js.map +1 -0
- package/dist/src/oblique/obliqueImage.d.ts +80 -0
- package/dist/src/oblique/obliqueImage.js +164 -0
- package/dist/src/oblique/obliqueImage.js.map +1 -0
- package/dist/src/oblique/obliqueImageMeta.d.ts +59 -0
- package/dist/src/oblique/obliqueImageMeta.js +81 -0
- package/dist/src/oblique/obliqueImageMeta.js.map +1 -0
- package/dist/src/oblique/obliqueProvider.d.ts +91 -0
- package/dist/src/oblique/obliqueProvider.js +337 -0
- package/dist/src/oblique/obliqueProvider.js.map +1 -0
- package/dist/src/oblique/obliqueView.d.ts +46 -0
- package/dist/src/oblique/obliqueView.js +139 -0
- package/dist/src/oblique/obliqueView.js.map +1 -0
- package/dist/src/oblique/obliqueViewDirection.d.ts +15 -0
- package/dist/src/oblique/obliqueViewDirection.js +20 -0
- package/dist/src/oblique/obliqueViewDirection.js.map +1 -0
- package/dist/src/oblique/parseImageJson.d.ts +17 -0
- package/dist/src/oblique/parseImageJson.js +227 -0
- package/dist/src/oblique/parseImageJson.js.map +1 -0
- package/dist/src/ol/feature.d.ts +1 -0
- package/dist/src/ol/feature.js +78 -0
- package/dist/src/ol/feature.js.map +1 -0
- package/dist/src/ol/geom/circle.d.ts +1 -0
- package/{src → dist/src}/ol/geom/circle.js +13 -10
- package/dist/src/ol/geom/circle.js.map +1 -0
- package/dist/src/ol/geom/geometryCollection.d.ts +1 -0
- package/dist/src/ol/geom/geometryCollection.js +31 -0
- package/dist/src/ol/geom/geometryCollection.js.map +1 -0
- package/dist/src/ol/render/canvas/canvasTileRenderer.d.ts +54 -0
- package/dist/src/ol/render/canvas/canvasTileRenderer.js +131 -0
- package/dist/src/ol/render/canvas/canvasTileRenderer.js.map +1 -0
- package/dist/src/ol/source/ClusterEnhancedVectorSource.d.ts +18 -0
- package/dist/src/ol/source/ClusterEnhancedVectorSource.js +38 -0
- package/dist/src/ol/source/ClusterEnhancedVectorSource.js.map +1 -0
- package/dist/src/ol/source/VcsCluster.d.ts +17 -0
- package/dist/src/ol/source/VcsCluster.js +32 -0
- package/dist/src/ol/source/VcsCluster.js.map +1 -0
- package/dist/src/overrideClassRegistry.d.ts +54 -0
- package/dist/src/overrideClassRegistry.js +151 -0
- package/dist/src/overrideClassRegistry.js.map +1 -0
- package/dist/src/style/arcStyle.d.ts +75 -0
- package/dist/src/style/arcStyle.js +256 -0
- package/dist/src/style/arcStyle.js.map +1 -0
- package/dist/src/style/arrowStyle.d.ts +67 -0
- package/dist/src/style/arrowStyle.js +188 -0
- package/dist/src/style/arrowStyle.js.map +1 -0
- package/dist/src/style/declarativeStyleItem.d.ts +75 -0
- package/dist/src/style/declarativeStyleItem.js +419 -0
- package/dist/src/style/declarativeStyleItem.js.map +1 -0
- package/dist/src/style/shapesCategory.d.ts +13 -0
- package/dist/src/style/shapesCategory.js +46 -0
- package/dist/src/style/shapesCategory.js.map +1 -0
- package/dist/src/style/styleFactory.d.ts +4 -0
- package/dist/src/style/styleFactory.js +25 -0
- package/dist/src/style/styleFactory.js.map +1 -0
- package/dist/src/style/styleHelpers.d.ts +132 -0
- package/dist/src/style/styleHelpers.js +552 -0
- package/dist/src/style/styleHelpers.js.map +1 -0
- package/dist/src/style/styleItem.d.ts +59 -0
- package/dist/src/style/styleItem.js +98 -0
- package/dist/src/style/styleItem.js.map +1 -0
- package/dist/src/style/vectorStyleItem.d.ts +126 -0
- package/dist/src/style/vectorStyleItem.js +703 -0
- package/dist/src/style/vectorStyleItem.js.map +1 -0
- package/dist/src/style/writeStyle.d.ts +6 -0
- package/dist/src/style/writeStyle.js +34 -0
- package/dist/src/style/writeStyle.js.map +1 -0
- package/dist/src/util/clipping/clippingObject.d.ts +100 -0
- package/dist/src/util/clipping/clippingObject.js +274 -0
- package/dist/src/util/clipping/clippingObject.js.map +1 -0
- package/dist/src/util/clipping/clippingObjectManager.d.ts +69 -0
- package/dist/src/util/clipping/clippingObjectManager.js +221 -0
- package/dist/src/util/clipping/clippingObjectManager.js.map +1 -0
- package/dist/src/util/clipping/clippingPlaneHelper.d.ts +66 -0
- package/dist/src/util/clipping/clippingPlaneHelper.js +316 -0
- package/dist/src/util/clipping/clippingPlaneHelper.js.map +1 -0
- package/dist/src/util/collection.d.ts +76 -0
- package/dist/src/util/collection.js +159 -0
- package/dist/src/util/collection.js.map +1 -0
- package/dist/src/util/editor/createFeatureSession.d.ts +39 -0
- package/dist/src/util/editor/createFeatureSession.js +171 -0
- package/dist/src/util/editor/createFeatureSession.js.map +1 -0
- package/dist/src/util/editor/editFeaturesSession.d.ts +30 -0
- package/dist/src/util/editor/editFeaturesSession.js +264 -0
- package/dist/src/util/editor/editFeaturesSession.js.map +1 -0
- package/dist/src/util/editor/editGeometrySession.d.ts +16 -0
- package/dist/src/util/editor/editGeometrySession.js +346 -0
- package/dist/src/util/editor/editGeometrySession.js.map +1 -0
- package/dist/src/util/editor/editorHelpers.d.ts +55 -0
- package/dist/src/util/editor/editorHelpers.js +160 -0
- package/dist/src/util/editor/editorHelpers.js.map +1 -0
- package/dist/src/util/editor/editorSessionHelpers.d.ts +49 -0
- package/dist/src/util/editor/editorSessionHelpers.js +92 -0
- package/dist/src/util/editor/editorSessionHelpers.js.map +1 -0
- package/dist/src/util/editor/editorSymbols.d.ts +17 -0
- package/dist/src/util/editor/editorSymbols.js +18 -0
- package/dist/src/util/editor/editorSymbols.js.map +1 -0
- package/dist/src/util/editor/interactions/createBBoxInteraction.d.ts +27 -0
- package/dist/src/util/editor/interactions/createBBoxInteraction.js +107 -0
- package/dist/src/util/editor/interactions/createBBoxInteraction.js.map +1 -0
- package/dist/src/util/editor/interactions/createCircleInteraction.d.ts +28 -0
- package/dist/src/util/editor/interactions/createCircleInteraction.js +77 -0
- package/dist/src/util/editor/interactions/createCircleInteraction.js.map +1 -0
- package/dist/src/util/editor/interactions/createLineStringInteraction.d.ts +28 -0
- package/dist/src/util/editor/interactions/createLineStringInteraction.js +79 -0
- package/dist/src/util/editor/interactions/createLineStringInteraction.js.map +1 -0
- package/dist/src/util/editor/interactions/createPointInteraction.d.ts +21 -0
- package/dist/src/util/editor/interactions/createPointInteraction.js +47 -0
- package/dist/src/util/editor/interactions/createPointInteraction.js.map +1 -0
- package/dist/src/util/editor/interactions/createPolygonInteraction.d.ts +30 -0
- package/dist/src/util/editor/interactions/createPolygonInteraction.js +91 -0
- package/dist/src/util/editor/interactions/createPolygonInteraction.js.map +1 -0
- package/dist/src/util/editor/interactions/editFeaturesMouseOverInteraction.d.ts +19 -0
- package/dist/src/util/editor/interactions/editFeaturesMouseOverInteraction.js +61 -0
- package/dist/src/util/editor/interactions/editFeaturesMouseOverInteraction.js.map +1 -0
- package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.d.ts +35 -0
- package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.js +89 -0
- package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.js.map +1 -0
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.d.ts +16 -0
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js +37 -0
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js.map +1 -0
- package/dist/src/util/editor/interactions/insertVertexInteraction.d.ts +23 -0
- package/dist/src/util/editor/interactions/insertVertexInteraction.js +61 -0
- package/dist/src/util/editor/interactions/insertVertexInteraction.js.map +1 -0
- package/dist/src/util/editor/interactions/mapInteractionController.d.ts +12 -0
- package/dist/src/util/editor/interactions/mapInteractionController.js +84 -0
- package/dist/src/util/editor/interactions/mapInteractionController.js.map +1 -0
- package/dist/src/util/editor/interactions/removeVertexInteraction.d.ts +14 -0
- package/dist/src/util/editor/interactions/removeVertexInteraction.js +27 -0
- package/dist/src/util/editor/interactions/removeVertexInteraction.js.map +1 -0
- package/dist/src/util/editor/interactions/selectFeatureMouseOverInteraction.d.ts +35 -0
- package/dist/src/util/editor/interactions/selectFeatureMouseOverInteraction.js +105 -0
- package/dist/src/util/editor/interactions/selectFeatureMouseOverInteraction.js.map +1 -0
- package/dist/src/util/editor/interactions/selectMultiFeatureInteraction.d.ts +36 -0
- package/dist/src/util/editor/interactions/selectMultiFeatureInteraction.js +96 -0
- package/dist/src/util/editor/interactions/selectMultiFeatureInteraction.js.map +1 -0
- package/dist/src/util/editor/interactions/selectSingleFeatureInteraction.d.ts +35 -0
- package/dist/src/util/editor/interactions/selectSingleFeatureInteraction.js +72 -0
- package/dist/src/util/editor/interactions/selectSingleFeatureInteraction.js.map +1 -0
- package/dist/src/util/editor/interactions/translateVertexInteraction.d.ts +15 -0
- package/dist/src/util/editor/interactions/translateVertexInteraction.js +41 -0
- package/dist/src/util/editor/interactions/translateVertexInteraction.js.map +1 -0
- package/dist/src/util/editor/selectFeaturesSession.d.ts +31 -0
- package/dist/src/util/editor/selectFeaturesSession.js +228 -0
- package/dist/src/util/editor/selectFeaturesSession.js.map +1 -0
- package/dist/src/util/editor/transformation/create2DHandlers.d.ts +12 -0
- package/dist/src/util/editor/transformation/create2DHandlers.js +295 -0
- package/dist/src/util/editor/transformation/create2DHandlers.js.map +1 -0
- package/dist/src/util/editor/transformation/create3DHandlers.d.ts +10 -0
- package/dist/src/util/editor/transformation/create3DHandlers.js +488 -0
- package/dist/src/util/editor/transformation/create3DHandlers.js.map +1 -0
- package/dist/src/util/editor/transformation/extrudeInteraction.d.ts +20 -0
- package/dist/src/util/editor/transformation/extrudeInteraction.js +55 -0
- package/dist/src/util/editor/transformation/extrudeInteraction.js.map +1 -0
- package/dist/src/util/editor/transformation/rotateInteraction.d.ts +25 -0
- package/dist/src/util/editor/transformation/rotateInteraction.js +106 -0
- package/dist/src/util/editor/transformation/rotateInteraction.js.map +1 -0
- package/dist/src/util/editor/transformation/scaleInteraction.d.ts +26 -0
- package/dist/src/util/editor/transformation/scaleInteraction.js +118 -0
- package/dist/src/util/editor/transformation/scaleInteraction.js.map +1 -0
- package/dist/src/util/editor/transformation/transformationHandler.d.ts +18 -0
- package/dist/src/util/editor/transformation/transformationHandler.js +133 -0
- package/dist/src/util/editor/transformation/transformationHandler.js.map +1 -0
- package/dist/src/util/editor/transformation/transformationTypes.d.ts +53 -0
- package/dist/src/util/editor/transformation/transformationTypes.js +30 -0
- package/dist/src/util/editor/transformation/transformationTypes.js.map +1 -0
- package/dist/src/util/editor/transformation/translateInteraction.d.ts +29 -0
- package/dist/src/util/editor/transformation/translateInteraction.js +151 -0
- package/dist/src/util/editor/transformation/translateInteraction.js.map +1 -0
- package/dist/src/util/editor/validateGeoemetry.d.ts +2 -0
- package/dist/src/util/editor/validateGeoemetry.js +24 -0
- package/dist/src/util/editor/validateGeoemetry.js.map +1 -0
- package/dist/src/util/exclusiveManager.d.ts +39 -0
- package/dist/src/util/exclusiveManager.js +103 -0
- package/dist/src/util/exclusiveManager.js.map +1 -0
- package/dist/src/util/extent.d.ts +33 -0
- package/dist/src/util/extent.js +84 -0
- package/dist/src/util/extent.js.map +1 -0
- package/dist/src/util/featureconverter/arcToCesium.d.ts +22 -0
- package/dist/src/util/featureconverter/arcToCesium.js +57 -0
- package/dist/src/util/featureconverter/arcToCesium.js.map +1 -0
- package/dist/src/util/featureconverter/circleToCesium.d.ts +30 -0
- package/dist/src/util/featureconverter/circleToCesium.js +128 -0
- package/dist/src/util/featureconverter/circleToCesium.js.map +1 -0
- package/dist/src/util/featureconverter/convert.d.ts +16 -0
- package/dist/src/util/featureconverter/convert.js +76 -0
- package/dist/src/util/featureconverter/convert.js.map +1 -0
- package/dist/src/util/featureconverter/extent3D.d.ts +33 -0
- package/dist/src/util/featureconverter/extent3D.js +150 -0
- package/dist/src/util/featureconverter/extent3D.js.map +1 -0
- package/dist/src/util/featureconverter/featureconverterHelper.d.ts +35 -0
- package/dist/src/util/featureconverter/featureconverterHelper.js +403 -0
- package/dist/src/util/featureconverter/featureconverterHelper.js.map +1 -0
- package/dist/src/util/featureconverter/lineStringToCesium.d.ts +41 -0
- package/dist/src/util/featureconverter/lineStringToCesium.js +172 -0
- package/dist/src/util/featureconverter/lineStringToCesium.js.map +1 -0
- package/dist/src/util/featureconverter/pointHelpers.d.ts +13 -0
- package/dist/src/util/featureconverter/pointHelpers.js +254 -0
- package/dist/src/util/featureconverter/pointHelpers.js.map +1 -0
- package/dist/src/util/featureconverter/pointToCesium.d.ts +36 -0
- package/dist/src/util/featureconverter/pointToCesium.js +258 -0
- package/dist/src/util/featureconverter/pointToCesium.js.map +1 -0
- package/dist/src/util/featureconverter/polygonToCesium.d.ts +33 -0
- package/dist/src/util/featureconverter/polygonToCesium.js +161 -0
- package/dist/src/util/featureconverter/polygonToCesium.js.map +1 -0
- package/dist/src/util/fetch.d.ts +3 -0
- package/dist/src/util/fetch.js +16 -0
- package/dist/src/util/fetch.js.map +1 -0
- package/dist/src/util/geometryHelpers.d.ts +14 -0
- package/dist/src/util/geometryHelpers.js +132 -0
- package/dist/src/util/geometryHelpers.js.map +1 -0
- package/dist/src/util/indexedCollection.d.ts +63 -0
- package/dist/src/util/indexedCollection.js +137 -0
- package/dist/src/util/indexedCollection.js.map +1 -0
- package/dist/src/util/isMobile.d.ts +4 -0
- package/dist/src/util/isMobile.js +12 -0
- package/dist/src/util/isMobile.js.map +1 -0
- package/dist/src/util/layerCollection.d.ts +92 -0
- package/dist/src/util/layerCollection.js +247 -0
- package/dist/src/util/layerCollection.js.map +1 -0
- package/dist/src/util/locale.d.ts +4 -0
- package/dist/src/util/locale.js +12 -0
- package/dist/src/util/locale.js.map +1 -0
- package/dist/src/util/mapCollection.d.ts +112 -0
- package/dist/src/util/mapCollection.js +312 -0
- package/dist/src/util/mapCollection.js.map +1 -0
- package/dist/src/util/math.d.ts +45 -0
- package/dist/src/util/math.js +136 -0
- package/dist/src/util/math.js.map +1 -0
- package/dist/src/util/overrideCollection.d.ts +58 -0
- package/dist/src/util/overrideCollection.js +176 -0
- package/dist/src/util/overrideCollection.js.map +1 -0
- package/dist/src/util/projection.d.ts +98 -0
- package/dist/src/util/projection.js +207 -0
- package/dist/src/util/projection.js.map +1 -0
- package/dist/src/util/urlHelpers.d.ts +1 -0
- package/dist/src/util/urlHelpers.js +12 -0
- package/dist/src/util/urlHelpers.js.map +1 -0
- package/dist/src/util/viewpoint.d.ts +155 -0
- package/dist/src/util/viewpoint.js +263 -0
- package/dist/src/util/viewpoint.js.map +1 -0
- package/dist/src/vcsApp.d.ts +113 -0
- package/dist/src/vcsApp.js +344 -0
- package/dist/src/vcsApp.js.map +1 -0
- package/dist/src/vcsEvent.d.ts +32 -0
- package/dist/src/vcsEvent.js +60 -0
- package/dist/src/vcsEvent.js.map +1 -0
- package/dist/src/vcsModule.d.ts +67 -0
- package/dist/src/vcsModule.js +86 -0
- package/dist/src/vcsModule.js.map +1 -0
- package/dist/src/vcsModuleHelpers.d.ts +23 -0
- package/dist/src/vcsModuleHelpers.js +72 -0
- package/dist/src/vcsModuleHelpers.js.map +1 -0
- package/dist/src/vcsObject.d.ts +35 -0
- package/dist/src/vcsObject.js +45 -0
- package/dist/src/vcsObject.js.map +1 -0
- package/dist/tests/data/dynamicPointCzml.json +53 -0
- package/dist/tests/data/oblique/imageData/imagev34.json +136 -0
- package/dist/tests/data/oblique/imageData/imagev35.json +307 -0
- package/dist/tests/data/oblique/imageData/imagev35PerImageSize.json +333 -0
- package/dist/tests/data/oblique/tiledImageData/12/2199/1342.json +11056 -0
- package/dist/tests/data/oblique/tiledImageData/12/2199/1343.json +11236 -0
- package/dist/tests/data/oblique/tiledImageData/12/2199/1344.json +11077 -0
- package/dist/tests/data/oblique/tiledImageData/12/2200/1342.json +11036 -0
- package/dist/tests/data/oblique/tiledImageData/12/2200/1343.json +11277 -0
- package/dist/tests/data/oblique/tiledImageData/12/2200/1344.json +11131 -0
- package/dist/tests/data/oblique/tiledImageData/12/2201/1342.json +10870 -0
- package/dist/tests/data/oblique/tiledImageData/12/2201/1343.json +11492 -0
- package/dist/tests/data/oblique/tiledImageData/12/2201/1344.json +10909 -0
- package/dist/tests/data/oblique/tiledImageData/image.json +70 -0
- package/dist/tests/data/terrain/13/8800/6485.terrain +0 -0
- package/dist/tests/data/terrain/13/8800/6486.terrain +0 -0
- package/dist/tests/data/terrain/13/8801/6485.terrain +0 -0
- package/dist/tests/data/terrain/13/8801/6486.terrain +0 -0
- package/dist/tests/data/terrain/layer.json +127 -0
- package/dist/tests/data/testGeoJSON.json +149 -0
- package/dist/tests/data/tile.pbf +0 -0
- package/dist/tests/unit/helpers/cesiumHelpers.d.ts +108 -0
- package/dist/tests/unit/helpers/cesiumHelpers.js +277 -0
- package/dist/tests/unit/helpers/cesiumHelpers.js.map +1 -0
- package/dist/tests/unit/helpers/getFileNameFromUrl.d.ts +6 -0
- package/dist/tests/unit/helpers/getFileNameFromUrl.js +12 -0
- package/dist/tests/unit/helpers/getFileNameFromUrl.js.map +1 -0
- package/dist/tests/unit/helpers/helpers.d.ts +12 -0
- package/dist/tests/unit/helpers/helpers.js +23 -0
- package/dist/tests/unit/helpers/helpers.js.map +1 -0
- package/dist/tests/unit/helpers/imageHelpers.d.ts +20 -0
- package/dist/tests/unit/helpers/imageHelpers.js +21 -0
- package/dist/tests/unit/helpers/imageHelpers.js.map +1 -0
- package/dist/tests/unit/helpers/importJSON.d.ts +5 -0
- package/dist/tests/unit/helpers/importJSON.js +15 -0
- package/dist/tests/unit/helpers/importJSON.js.map +1 -0
- package/dist/tests/unit/helpers/obliqueData.d.ts +21 -0
- package/dist/tests/unit/helpers/obliqueData.js +76 -0
- package/dist/tests/unit/helpers/obliqueData.js.map +1 -0
- package/dist/tests/unit/helpers/obliqueHelpers.d.ts +33 -0
- package/dist/tests/unit/helpers/obliqueHelpers.js +97 -0
- package/dist/tests/unit/helpers/obliqueHelpers.js.map +1 -0
- package/dist/tests/unit/helpers/openlayersHelpers.d.ts +11 -0
- package/dist/tests/unit/helpers/openlayersHelpers.js +24 -0
- package/dist/tests/unit/helpers/openlayersHelpers.js.map +1 -0
- package/dist/tests/unit/helpers/terrain/terrainData.d.ts +10 -0
- package/dist/tests/unit/helpers/terrain/terrainData.js +40 -0
- package/dist/tests/unit/helpers/terrain/terrainData.js.map +1 -0
- package/index.ts +724 -0
- package/package.json +69 -35
- package/src/category/category.ts +414 -0
- package/src/category/categoryCollection.ts +142 -0
- package/src/cesium/cesium.d.ts +257 -0
- package/src/cesium/cesium3DTileFeature.ts +10 -0
- package/src/cesium/cesium3DTilePointFeature.ts +10 -0
- package/src/cesium/{cesiumVcsCameraPrimitive.js → cesiumVcsCameraPrimitive.ts} +58 -29
- package/src/cesium/entity.ts +26 -0
- package/src/cesium/wallpaperMaterial.js +5 -4
- package/src/classRegistry.ts +147 -0
- package/src/featureProvider/abstractFeatureProvider.ts +191 -0
- package/src/featureProvider/featureProviderSymbols.ts +5 -0
- package/src/featureProvider/tileProviderFeatureProvider.ts +55 -0
- package/src/featureProvider/wmsFeatureProvider.ts +330 -0
- package/src/global.d.ts +12 -0
- package/src/interaction/abstractInteraction.ts +192 -0
- package/src/interaction/coordinateAtPixel.ts +105 -0
- package/src/interaction/eventHandler.ts +434 -0
- package/src/interaction/featureAtPixelInteraction.ts +306 -0
- package/src/interaction/featureProviderInteraction.ts +61 -0
- package/src/interaction/{interactionChain.js → interactionChain.ts} +40 -42
- package/src/interaction/interactionType.ts +45 -0
- package/src/layer/cesium/cesiumTilesetCesiumImpl.ts +395 -0
- package/src/layer/cesium/clusterContext.ts +136 -0
- package/src/layer/cesium/{dataSourceCesiumImpl.js → dataSourceCesiumImpl.ts} +49 -67
- package/src/layer/cesium/openStreetMapCesiumImpl.ts +28 -0
- package/src/layer/cesium/rasterLayerCesiumImpl.ts +100 -0
- package/src/layer/cesium/singleImageCesiumImpl.ts +55 -0
- package/src/layer/cesium/terrainCesiumImpl.ts +63 -0
- package/src/layer/cesium/{tmsCesiumImpl.js → tmsCesiumImpl.ts} +28 -19
- package/src/layer/cesium/vectorCesiumImpl.ts +261 -0
- package/src/layer/cesium/vectorContext.ts +528 -0
- package/src/layer/cesium/{vectorRasterTileCesiumImpl.js → vectorRasterTileCesiumImpl.ts} +48 -55
- package/src/layer/cesium/vectorTileImageryProvider.ts +222 -0
- package/src/layer/cesium/{wmsCesiumImpl.js → wmsCesiumImpl.ts} +33 -27
- package/src/layer/cesium/{wmtsCesiumImpl.js → wmtsCesiumImpl.ts} +45 -52
- package/src/layer/cesiumTilesetLayer.ts +267 -0
- package/src/layer/czmlLayer.ts +144 -0
- package/src/layer/dataSourceLayer.ts +167 -0
- package/src/layer/featureLayer.ts +225 -0
- package/src/layer/featureStoreLayer.ts +628 -0
- package/src/layer/featureStoreLayerChanges.ts +392 -0
- package/src/layer/featureStoreLayerState.ts +10 -0
- package/src/layer/featureVisibility.ts +417 -0
- package/src/layer/{geojsonHelpers.js → geojsonHelpers.ts} +229 -168
- package/src/layer/{geojsonLayer.js → geojsonLayer.ts} +39 -71
- package/src/layer/globalHider.ts +114 -0
- package/src/layer/layer.ts +688 -0
- package/src/layer/{layerImplementation.js → layerImplementation.ts} +38 -49
- package/src/layer/layerState.ts +11 -0
- package/src/layer/layerSymbols.ts +5 -0
- package/src/layer/oblique/layerObliqueImpl.ts +49 -0
- package/src/layer/oblique/obliqueHelpers.ts +216 -0
- package/src/layer/oblique/vectorObliqueImpl.ts +497 -0
- package/src/layer/openStreetMapLayer.ts +185 -0
- package/src/layer/openlayers/layerOpenlayersImpl.ts +133 -0
- package/src/layer/openlayers/{openStreetMapOpenlayersImpl.js → openStreetMapOpenlayersImpl.ts} +4 -8
- package/src/layer/openlayers/rasterLayerOpenlayersImpl.ts +45 -0
- package/src/layer/openlayers/{singleImageOpenlayersImpl.js → singleImageOpenlayersImpl.ts} +15 -17
- package/src/layer/openlayers/{tileDebugOpenlayersImpl.js → tileDebugOpenlayersImpl.ts} +12 -19
- package/src/layer/openlayers/{tmsOpenlayersImpl.js → tmsOpenlayersImpl.ts} +24 -21
- package/src/layer/openlayers/vectorOpenlayersImpl.ts +112 -0
- package/src/layer/openlayers/vectorTileOpenlayersImpl.ts +164 -0
- package/src/layer/openlayers/{wmsOpenlayersImpl.js → wmsOpenlayersImpl.ts} +16 -23
- package/src/layer/openlayers/{wmtsOpenlayersImpl.js → wmtsOpenlayersImpl.ts} +44 -60
- package/src/layer/pointCloudLayer.ts +137 -0
- package/src/layer/rasterLayer.ts +324 -0
- package/src/layer/{singleImageLayer.js → singleImageLayer.ts} +40 -50
- package/src/layer/terrainHelpers.ts +95 -0
- package/src/layer/terrainLayer.ts +108 -0
- package/src/layer/tileLoadedHelper.ts +70 -0
- package/src/layer/tileProvider/{mvtTileProvider.js → mvtTileProvider.ts} +56 -57
- package/src/layer/tileProvider/staticGeojsonTileProvider.ts +60 -0
- package/src/layer/tileProvider/tileProvider.ts +625 -0
- package/src/layer/tileProvider/urlTemplateTileProvider.ts +120 -0
- package/src/layer/{tmsLayer.js → tmsLayer.ts} +39 -55
- package/src/layer/vectorHelpers.ts +127 -0
- package/src/layer/vectorLayer.ts +595 -0
- package/src/layer/vectorProperties.ts +1592 -0
- package/src/layer/vectorSymbols.ts +41 -0
- package/src/layer/vectorTileLayer.ts +479 -0
- package/src/layer/wfsLayer.ts +169 -0
- package/src/layer/{wmsHelpers.js → wmsHelpers.ts} +33 -26
- package/src/layer/{wmsLayer.js → wmsLayer.ts} +117 -91
- package/src/layer/wmtsLayer.ts +240 -0
- package/src/map/baseOLMap.ts +241 -0
- package/src/map/cameraLimiter.ts +229 -0
- package/src/map/cesiumMap.ts +1388 -0
- package/src/map/mapState.ts +11 -0
- package/src/map/{obliqueMap.js → obliqueMap.ts} +186 -221
- package/src/map/{openlayersMap.js → openlayersMap.ts} +91 -93
- package/src/map/vcsMap.ts +504 -0
- package/src/moduleIdSymbol.ts +2 -0
- package/src/oblique/{defaultObliqueCollection.js → defaultObliqueCollection.ts} +6 -16
- package/src/oblique/{helpers.js → helpers.ts} +322 -148
- package/src/oblique/obliqueCollection.ts +634 -0
- package/src/oblique/obliqueDataSet.ts +373 -0
- package/src/oblique/obliqueImage.ts +259 -0
- package/src/oblique/obliqueImageMeta.ts +125 -0
- package/src/oblique/{obliqueProvider.js → obliqueProvider.ts} +182 -170
- package/src/oblique/{obliqueView.js → obliqueView.ts} +94 -74
- package/src/oblique/obliqueViewDirection.ts +25 -0
- package/src/oblique/parseImageJson.ts +337 -0
- package/src/ol/feature.ts +93 -0
- package/src/ol/geojson.d.ts +28 -0
- package/src/ol/geom/circle.ts +41 -0
- package/src/ol/geom/geometryCollection.js +14 -8
- package/src/ol/ol.d.ts +138 -0
- package/src/ol/render/canvas/canvasTileRenderer.js +11 -13
- package/src/{overrideClassRegistry.js → overrideClassRegistry.ts} +72 -83
- package/src/style/arcStyle.ts +434 -0
- package/src/style/arrowStyle.ts +303 -0
- package/src/style/declarativeStyleItem.ts +562 -0
- package/src/style/{shapesCategory.js → shapesCategory.ts} +17 -28
- package/src/style/styleFactory.ts +38 -0
- package/src/style/styleHelpers.ts +671 -0
- package/src/style/styleItem.ts +134 -0
- package/src/style/{vectorStyleItem.js → vectorStyleItem.ts} +311 -374
- package/src/style/writeStyle.ts +41 -0
- package/src/util/clipping/{clippingObject.js → clippingObject.ts} +149 -178
- package/src/util/clipping/{clippingObjectManager.js → clippingObjectManager.ts} +108 -136
- package/src/util/clipping/{clippingPlaneHelper.js → clippingPlaneHelper.ts} +199 -134
- package/src/util/{collection.js → collection.ts} +66 -78
- package/src/util/editor/createFeatureSession.ts +241 -0
- package/src/util/editor/editFeaturesSession.ts +360 -0
- package/src/util/editor/editGeometrySession.ts +469 -0
- package/src/util/editor/editorHelpers.ts +328 -0
- package/src/util/editor/editorSessionHelpers.ts +137 -0
- package/src/util/editor/editorSymbols.ts +17 -0
- package/src/util/editor/interactions/createBBoxInteraction.ts +135 -0
- package/src/util/editor/interactions/createCircleInteraction.ts +102 -0
- package/src/util/editor/interactions/createLineStringInteraction.ts +103 -0
- package/src/util/editor/interactions/createPointInteraction.ts +62 -0
- package/src/util/editor/interactions/createPolygonInteraction.ts +115 -0
- package/src/util/editor/interactions/editFeaturesMouseOverInteraction.ts +74 -0
- package/src/util/editor/interactions/editGeometryMouseOverInteraction.ts +106 -0
- package/src/util/editor/interactions/ensureHandlerSelectionInteraction.ts +52 -0
- package/src/util/editor/interactions/insertVertexInteraction.ts +91 -0
- package/src/util/editor/interactions/mapInteractionController.ts +119 -0
- package/src/util/editor/interactions/removeVertexInteraction.ts +37 -0
- package/src/util/editor/interactions/selectFeatureMouseOverInteraction.ts +132 -0
- package/src/util/editor/interactions/selectMultiFeatureInteraction.ts +135 -0
- package/src/util/editor/interactions/selectSingleFeatureInteraction.ts +108 -0
- package/src/util/editor/interactions/translateVertexInteraction.ts +51 -0
- package/src/util/editor/selectFeaturesSession.ts +314 -0
- package/src/util/editor/transformation/create2DHandlers.ts +368 -0
- package/src/util/editor/transformation/create3DHandlers.ts +664 -0
- package/src/util/editor/transformation/extrudeInteraction.ts +87 -0
- package/src/util/editor/transformation/rotateInteraction.ts +177 -0
- package/src/util/editor/transformation/scaleInteraction.ts +185 -0
- package/src/util/editor/transformation/transformationHandler.ts +174 -0
- package/src/util/editor/transformation/transformationTypes.ts +71 -0
- package/src/util/editor/transformation/translateInteraction.ts +248 -0
- package/src/util/editor/validateGeoemetry.ts +22 -0
- package/src/util/{exclusiveManager.js → exclusiveManager.ts} +26 -42
- package/src/util/extent.ts +114 -0
- package/src/util/featureconverter/arcToCesium.ts +126 -0
- package/src/util/featureconverter/circleToCesium.ts +211 -0
- package/src/util/featureconverter/convert.ts +178 -0
- package/src/util/featureconverter/extent3D.ts +217 -0
- package/src/util/featureconverter/featureconverterHelper.ts +670 -0
- package/src/util/featureconverter/lineStringToCesium.ts +306 -0
- package/src/util/featureconverter/pointHelpers.ts +429 -0
- package/src/util/featureconverter/pointToCesium.ts +403 -0
- package/src/util/featureconverter/polygonToCesium.ts +249 -0
- package/src/util/fetch.ts +28 -0
- package/src/util/geometryHelpers.ts +170 -0
- package/src/util/indexedCollection.ts +157 -0
- package/src/util/{isMobile.js → isMobile.ts} +12 -6
- package/src/util/layerCollection.ts +293 -0
- package/src/util/locale.ts +11 -0
- package/src/util/mapCollection.ts +393 -0
- package/src/util/math.ts +180 -0
- package/src/util/overrideCollection.ts +286 -0
- package/src/util/projection.ts +288 -0
- package/src/util/{urlHelpers.js → urlHelpers.ts} +6 -8
- package/src/util/viewpoint.ts +394 -0
- package/src/vcsApp.ts +518 -0
- package/src/{vcsEvent.js → vcsEvent.ts} +17 -37
- package/src/vcsModule.ts +127 -0
- package/src/vcsModuleHelpers.ts +128 -0
- package/src/vcsObject.ts +72 -0
- package/index.d.ts +0 -7599
- package/index.js +0 -146
- package/src/category/appBackedCategory.js +0 -76
- package/src/category/category.js +0 -401
- package/src/category/categoryCollection.js +0 -145
- package/src/cesium/cesium3DTileFeature.js +0 -9
- package/src/cesium/cesium3DTilePointFeature.js +0 -9
- package/src/classRegistry.js +0 -168
- package/src/context.js +0 -73
- package/src/featureProvider/abstractFeatureProvider.js +0 -196
- package/src/featureProvider/featureProviderHelpers.js +0 -50
- package/src/featureProvider/featureProviderSymbols.js +0 -11
- package/src/featureProvider/tileProviderFeatureProvider.js +0 -64
- package/src/featureProvider/wmsFeatureProvider.js +0 -288
- package/src/interaction/abstractInteraction.js +0 -151
- package/src/interaction/coordinateAtPixel.js +0 -99
- package/src/interaction/eventHandler.js +0 -425
- package/src/interaction/featureAtPixelInteraction.js +0 -273
- package/src/interaction/featureProviderInteraction.js +0 -43
- package/src/interaction/interactionType.js +0 -114
- package/src/layer/cesium/cesiumTilesetCesiumImpl.js +0 -359
- package/src/layer/cesium/clusterContext.js +0 -95
- package/src/layer/cesium/openStreetMapCesiumImpl.js +0 -29
- package/src/layer/cesium/pointCloudCesiumImpl.js +0 -58
- package/src/layer/cesium/rasterLayerCesiumImpl.js +0 -110
- package/src/layer/cesium/singleImageCesiumImpl.js +0 -49
- package/src/layer/cesium/terrainCesiumImpl.js +0 -80
- package/src/layer/cesium/vectorCesiumImpl.js +0 -255
- package/src/layer/cesium/vectorContext.js +0 -167
- package/src/layer/cesium/vectorTileImageryProvider.js +0 -246
- package/src/layer/cesium/x3dmHelper.js +0 -22
- package/src/layer/cesiumTilesetLayer.js +0 -373
- package/src/layer/czmlLayer.js +0 -141
- package/src/layer/dataSourceLayer.js +0 -259
- package/src/layer/featureLayer.js +0 -248
- package/src/layer/featureStoreLayer.js +0 -647
- package/src/layer/featureStoreLayerChanges.js +0 -376
- package/src/layer/featureStoreLayerState.js +0 -19
- package/src/layer/featureVisibility.js +0 -436
- package/src/layer/globalHider.js +0 -147
- package/src/layer/layer.js +0 -752
- package/src/layer/layerState.js +0 -17
- package/src/layer/layerSymbols.js +0 -6
- package/src/layer/oblique/layerObliqueImpl.js +0 -76
- package/src/layer/oblique/obliqueHelpers.js +0 -175
- package/src/layer/oblique/vectorObliqueImpl.js +0 -469
- package/src/layer/openStreetMapLayer.js +0 -194
- package/src/layer/openlayers/layerOpenlayersImpl.js +0 -79
- package/src/layer/openlayers/rasterLayerOpenlayersImpl.js +0 -122
- package/src/layer/openlayers/vectorOpenlayersImpl.js +0 -118
- package/src/layer/openlayers/vectorTileOpenlayersImpl.js +0 -177
- package/src/layer/pointCloudLayer.js +0 -162
- package/src/layer/rasterLayer.js +0 -294
- package/src/layer/terrainHelpers.js +0 -119
- package/src/layer/terrainLayer.js +0 -122
- package/src/layer/tileLoadedHelper.js +0 -72
- package/src/layer/tileProvider/staticGeojsonTileProvider.js +0 -82
- package/src/layer/tileProvider/tileProvider.js +0 -593
- package/src/layer/tileProvider/urlTemplateTileProvider.js +0 -121
- package/src/layer/vectorHelpers.js +0 -206
- package/src/layer/vectorLayer.js +0 -623
- package/src/layer/vectorProperties.js +0 -1391
- package/src/layer/vectorTileLayer.js +0 -471
- package/src/layer/wfsLayer.js +0 -165
- package/src/layer/wmtsLayer.js +0 -235
- package/src/map/baseOLMap.js +0 -257
- package/src/map/cameraLimiter.js +0 -219
- package/src/map/cesiumMap.js +0 -1177
- package/src/map/mapState.js +0 -17
- package/src/map/vcsMap.js +0 -526
- package/src/oblique/obliqueCollection.js +0 -653
- package/src/oblique/obliqueDataSet.js +0 -400
- package/src/oblique/obliqueImage.js +0 -247
- package/src/oblique/obliqueImageMeta.js +0 -126
- package/src/oblique/obliqueViewDirection.js +0 -40
- package/src/oblique/parseImageJson.js +0 -256
- package/src/ol/feature.js +0 -47
- package/src/style/declarativeStyleItem.js +0 -632
- package/src/style/styleFactory.js +0 -29
- package/src/style/styleHelpers.js +0 -555
- package/src/style/styleItem.js +0 -164
- package/src/style/writeStyle.js +0 -45
- package/src/util/dateTime.js +0 -60
- package/src/util/extent.js +0 -131
- package/src/util/featureconverter/circleToCesium.js +0 -215
- package/src/util/featureconverter/convert.js +0 -83
- package/src/util/featureconverter/extent3D.js +0 -181
- package/src/util/featureconverter/featureconverterHelper.js +0 -591
- package/src/util/featureconverter/lineStringToCesium.js +0 -171
- package/src/util/featureconverter/pointToCesium.js +0 -359
- package/src/util/featureconverter/polygonToCesium.js +0 -229
- package/src/util/fetch.js +0 -32
- package/src/util/geometryHelpers.js +0 -172
- package/src/util/indexedCollection.js +0 -181
- package/src/util/layerCollection.js +0 -221
- package/src/util/locale.js +0 -53
- package/src/util/mapCollection.js +0 -405
- package/src/util/math.js +0 -71
- package/src/util/overrideCollection.js +0 -224
- package/src/util/projection.js +0 -363
- package/src/util/splitScreen.js +0 -233
- package/src/util/viewpoint.js +0 -333
- package/src/vcsApp.js +0 -471
- package/src/vcsAppContextHelpers.js +0 -121
- package/src/vcsObject.js +0 -84
|
@@ -0,0 +1,959 @@
|
|
|
1
|
+
import { JulianDate, Clock, DataSourceClock, Color, CesiumWidget, ShadowMode, DataSourceDisplay, DataSourceCollection, RequestScheduler, Ellipsoid, ScreenSpaceEventHandler, Cartesian3, Ray, Math as CesiumMath, Camera, BillboardVisualizer, LabelVisualizer, PointVisualizer, CustomDataSource, BoundingSphere, Intersect, ImageryLayer, PrimitiveCollection, KeyboardEventModifier, ScreenSpaceEventType, Cartographic, } from '@vcmap-cesium/engine';
|
|
2
|
+
import { checkMaybe } from '@vcsuite/check';
|
|
3
|
+
import { parseBoolean, parseInteger, parseNumber } from '@vcsuite/parsers';
|
|
4
|
+
import VcsMap from './vcsMap.js';
|
|
5
|
+
import Viewpoint from '../util/viewpoint.js';
|
|
6
|
+
import Projection, { mercatorProjection } from '../util/projection.js';
|
|
7
|
+
import { getHeightFromTerrainProvider } from '../layer/terrainHelpers.js';
|
|
8
|
+
import { vcsLayerName } from '../layer/layerSymbols.js';
|
|
9
|
+
import { ModificationKeyType, PointerEventType, PointerKeyType, } from '../interaction/interactionType.js';
|
|
10
|
+
import CameraLimiter from './cameraLimiter.js';
|
|
11
|
+
import { mapClassRegistry } from '../classRegistry.js';
|
|
12
|
+
/**
|
|
13
|
+
* Ensures, a primitive/imageryLayer/entity is part of a collection and placed at the correct location
|
|
14
|
+
* @param cesiumCollection
|
|
15
|
+
* @param item
|
|
16
|
+
* @param layerCollection
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
export function ensureInCollection(cesiumCollection, item, layerCollection) {
|
|
20
|
+
const targetIndex = layerCollection.indexOfKey(item[vcsLayerName]);
|
|
21
|
+
if (targetIndex > -1) {
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
if (!cesiumCollection.contains(item)) {
|
|
25
|
+
const primitivesLength = cesiumCollection.length;
|
|
26
|
+
let index = primitivesLength;
|
|
27
|
+
for (let i = 0; i < primitivesLength; i++) {
|
|
28
|
+
const collectionItem = cesiumCollection.get(i);
|
|
29
|
+
if (layerCollection.indexOfKey(collectionItem[vcsLayerName]) >
|
|
30
|
+
targetIndex) {
|
|
31
|
+
index = i;
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
cesiumCollection.add(item, index);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @param dataSourceCollection
|
|
43
|
+
* @param dataSource
|
|
44
|
+
* @param layerCollection
|
|
45
|
+
* @private
|
|
46
|
+
*/
|
|
47
|
+
export async function ensureInDataSourceCollection(dataSourceCollection, dataSource, layerCollection) {
|
|
48
|
+
const targetIndex = layerCollection.indexOfKey(dataSource[vcsLayerName]);
|
|
49
|
+
if (targetIndex > -1) {
|
|
50
|
+
if (!dataSourceCollection.contains(dataSource)) {
|
|
51
|
+
await dataSourceCollection.add(dataSource);
|
|
52
|
+
}
|
|
53
|
+
const dataSourceLength = dataSourceCollection.length;
|
|
54
|
+
let index = dataSourceLength;
|
|
55
|
+
for (let i = 0; i < dataSourceLength; i++) {
|
|
56
|
+
const collectionItem = dataSourceCollection.get(i);
|
|
57
|
+
if (layerCollection.indexOfKey(collectionItem[vcsLayerName]) >
|
|
58
|
+
targetIndex) {
|
|
59
|
+
index = i;
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
let actualIndex = dataSourceCollection.indexOf(dataSource);
|
|
64
|
+
if (index > actualIndex) {
|
|
65
|
+
index -= 1;
|
|
66
|
+
}
|
|
67
|
+
if (actualIndex < index) {
|
|
68
|
+
while (actualIndex < index) {
|
|
69
|
+
dataSourceCollection.raise(dataSource);
|
|
70
|
+
actualIndex = dataSourceCollection.indexOf(dataSource);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
else if (actualIndex > index) {
|
|
74
|
+
while (actualIndex > index) {
|
|
75
|
+
dataSourceCollection.lower(dataSource);
|
|
76
|
+
actualIndex = dataSourceCollection.indexOf(dataSource);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* @param primitiveCollection
|
|
83
|
+
* @param item
|
|
84
|
+
* @param layerCollection
|
|
85
|
+
* @private
|
|
86
|
+
*/
|
|
87
|
+
export function indexChangedOnPrimitive(primitiveCollection, item, layerCollection) {
|
|
88
|
+
const { destroyPrimitives } = primitiveCollection;
|
|
89
|
+
primitiveCollection.destroyPrimitives = false;
|
|
90
|
+
primitiveCollection.remove(item);
|
|
91
|
+
ensureInCollection(primitiveCollection, item, layerCollection);
|
|
92
|
+
primitiveCollection.destroyPrimitives = destroyPrimitives;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* @param imageryLayerCollection
|
|
96
|
+
* @param item
|
|
97
|
+
* @param layerCollection
|
|
98
|
+
* @private
|
|
99
|
+
*/
|
|
100
|
+
export function indexChangedOnImageryLayer(imageryLayerCollection, item, layerCollection) {
|
|
101
|
+
imageryLayerCollection.remove(item, false);
|
|
102
|
+
ensureInCollection(imageryLayerCollection, item, layerCollection);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @param dataSourceCollection
|
|
106
|
+
* @param item
|
|
107
|
+
* @param layerCollection
|
|
108
|
+
* @private
|
|
109
|
+
*/
|
|
110
|
+
export function indexChangedOnDataSource(dataSourceCollection, item, layerCollection) {
|
|
111
|
+
// eslint-disable-next-line no-void
|
|
112
|
+
void ensureInDataSourceCollection(dataSourceCollection, item, layerCollection);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @param source
|
|
116
|
+
* @param target
|
|
117
|
+
* @private
|
|
118
|
+
*/
|
|
119
|
+
export function synchronizeClock(source, target) {
|
|
120
|
+
target.clockRange = source.clockRange;
|
|
121
|
+
target.clockStep = source.clockStep;
|
|
122
|
+
target.multiplier = source.multiplier;
|
|
123
|
+
if (!target.startTime ||
|
|
124
|
+
!target.startTime.equals(source.startTime) ||
|
|
125
|
+
!target.stopTime ||
|
|
126
|
+
!target.stopTime.equals(source.stopTime)) {
|
|
127
|
+
target.startTime = source.startTime;
|
|
128
|
+
target.stopTime = source.stopTime;
|
|
129
|
+
target.currentTime = source.currentTime;
|
|
130
|
+
}
|
|
131
|
+
return source.definitionChanged.addEventListener((_e, prop, value) => {
|
|
132
|
+
target[prop] = value;
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Cesium Globe Map Class (3D map)
|
|
137
|
+
* @group Map
|
|
138
|
+
*/
|
|
139
|
+
class CesiumMap extends VcsMap {
|
|
140
|
+
static get className() {
|
|
141
|
+
return 'CesiumMap';
|
|
142
|
+
}
|
|
143
|
+
static getDefaultOptions() {
|
|
144
|
+
return {
|
|
145
|
+
...VcsMap.getDefaultOptions(),
|
|
146
|
+
enableLightning: true,
|
|
147
|
+
tileCacheSize: 1,
|
|
148
|
+
webGLaa: false,
|
|
149
|
+
cameraLimiter: undefined,
|
|
150
|
+
globeColor: '#3f47cc',
|
|
151
|
+
useOriginalCesiumShader: false,
|
|
152
|
+
lightIntensity: 3.0,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
_cesiumWidget;
|
|
156
|
+
dataSourceDisplay;
|
|
157
|
+
/**
|
|
158
|
+
* clock for animated data
|
|
159
|
+
*/
|
|
160
|
+
dataSourceDisplayClock;
|
|
161
|
+
/**
|
|
162
|
+
* default clock is set, when no datasource clock is active
|
|
163
|
+
*/
|
|
164
|
+
_defaultClock;
|
|
165
|
+
/**
|
|
166
|
+
* clocks of active data sources
|
|
167
|
+
* the last clock of the array corresponds to the active dataSourceDisplayClock
|
|
168
|
+
*/
|
|
169
|
+
_dataSourceClocks;
|
|
170
|
+
enableLightning;
|
|
171
|
+
tileCacheSize;
|
|
172
|
+
screenSpaceEventHandler;
|
|
173
|
+
_screenSpaceListeners;
|
|
174
|
+
defaultJDate;
|
|
175
|
+
webGLaa;
|
|
176
|
+
globeColor;
|
|
177
|
+
_clusterDataSourceDisplay;
|
|
178
|
+
_terrainProvider;
|
|
179
|
+
defaultTerrainProvider;
|
|
180
|
+
useOriginalCesiumShader;
|
|
181
|
+
_cameraLimiter;
|
|
182
|
+
_cameraLimiterOptions;
|
|
183
|
+
_preUpdateListener;
|
|
184
|
+
_clockSyncListener;
|
|
185
|
+
_listeners;
|
|
186
|
+
_lastEventFrameNumber;
|
|
187
|
+
_lightIntensity;
|
|
188
|
+
constructor(options) {
|
|
189
|
+
super(options);
|
|
190
|
+
const defaultOptions = CesiumMap.getDefaultOptions();
|
|
191
|
+
this._cesiumWidget = null;
|
|
192
|
+
this.dataSourceDisplay = null;
|
|
193
|
+
this.dataSourceDisplayClock = new Clock({ shouldAnimate: true });
|
|
194
|
+
const defaultClock = new DataSourceClock();
|
|
195
|
+
defaultClock.currentTime = this.dataSourceDisplayClock.currentTime;
|
|
196
|
+
this._defaultClock = defaultClock;
|
|
197
|
+
this._dataSourceClocks = [];
|
|
198
|
+
this.enableLightning = parseBoolean(options.enableLightning, defaultOptions.enableLightning);
|
|
199
|
+
this.tileCacheSize = parseInteger(options.tileCacheSize, defaultOptions.tileCacheSize);
|
|
200
|
+
this.screenSpaceEventHandler = null;
|
|
201
|
+
this._screenSpaceListeners = [];
|
|
202
|
+
this.defaultJDate = JulianDate.fromDate(new Date(2014, 6, 20, 13, 0, 0, 0));
|
|
203
|
+
this.webGLaa = parseBoolean(options.webGLaa, defaultOptions.webGLaa);
|
|
204
|
+
this.useOriginalCesiumShader = parseBoolean(options.useOriginalCesiumShader, defaultOptions.useOriginalCesiumShader);
|
|
205
|
+
this.globeColor = Color.fromCssColorString(options.globeColor || defaultOptions.globeColor);
|
|
206
|
+
this._clusterDataSourceDisplay = null;
|
|
207
|
+
this._terrainProvider = null;
|
|
208
|
+
this.defaultTerrainProvider = null;
|
|
209
|
+
this._cameraLimiter = null;
|
|
210
|
+
this._cameraLimiterOptions =
|
|
211
|
+
options.cameraLimiter || defaultOptions.cameraLimiter;
|
|
212
|
+
this._preUpdateListener = null;
|
|
213
|
+
this._clockSyncListener = null;
|
|
214
|
+
this._listeners = [];
|
|
215
|
+
this._lastEventFrameNumber = null;
|
|
216
|
+
this._lightIntensity = parseNumber(options.lightIntensity, defaultOptions.lightIntensity);
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* returns the light Intensity, see Cesium https://cesium.com/learn/cesiumjs/ref-doc/SunLight.html?classFilter=sunlight#intensity
|
|
220
|
+
*/
|
|
221
|
+
get lightIntensity() {
|
|
222
|
+
return this._lightIntensity;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* sets the light Intensity, see Cesium https://cesium.com/learn/cesiumjs/ref-doc/SunLight.html?classFilter=sunlight#intensity
|
|
226
|
+
*/
|
|
227
|
+
set lightIntensity(intensity) {
|
|
228
|
+
this._lightIntensity = intensity;
|
|
229
|
+
if (this.initialized && this._cesiumWidget) {
|
|
230
|
+
this._cesiumWidget.scene.light.intensity = intensity;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
get splitPosition() {
|
|
234
|
+
return super.splitPosition;
|
|
235
|
+
}
|
|
236
|
+
set splitPosition(position) {
|
|
237
|
+
super.splitPosition = position;
|
|
238
|
+
if (this._cesiumWidget) {
|
|
239
|
+
this._cesiumWidget.scene.splitPosition = position;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
get terrainProvider() {
|
|
243
|
+
return this._terrainProvider;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* A camera limit to not allow the camera to get too close to the globe.
|
|
247
|
+
*/
|
|
248
|
+
get cameraLimiter() {
|
|
249
|
+
return this._cameraLimiter;
|
|
250
|
+
}
|
|
251
|
+
set cameraLimiter(limiter) {
|
|
252
|
+
checkMaybe(limiter, CameraLimiter);
|
|
253
|
+
if (this._cameraLimiter !== limiter) {
|
|
254
|
+
this._cameraLimiter = limiter;
|
|
255
|
+
if (this._cameraLimiter &&
|
|
256
|
+
!this._preUpdateListener &&
|
|
257
|
+
this._cesiumWidget) {
|
|
258
|
+
this._setupPreUpdateListener();
|
|
259
|
+
}
|
|
260
|
+
else if (!this._cameraLimiter && this._preUpdateListener) {
|
|
261
|
+
this._preUpdateListener();
|
|
262
|
+
this._preUpdateListener = null;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
_setupPreUpdateListener() {
|
|
267
|
+
if (this._cesiumWidget) {
|
|
268
|
+
this._preUpdateListener =
|
|
269
|
+
this._cesiumWidget.scene.preUpdate.addEventListener(() => {
|
|
270
|
+
if (this._cameraLimiter && this._cesiumWidget) {
|
|
271
|
+
// eslint-disable-next-line no-void
|
|
272
|
+
void this._cameraLimiter.limitCamera(this._cesiumWidget.scene.camera);
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
_raisePointerInteraction(key, pointer, pointerEvent, csEvent) {
|
|
278
|
+
const multipleTouch =
|
|
279
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
280
|
+
(this.screenSpaceEventHandler?._positions?.length ?? 0) > 1;
|
|
281
|
+
const windowPosition = csEvent
|
|
282
|
+
.position
|
|
283
|
+
? csEvent.position
|
|
284
|
+
: csEvent.endPosition;
|
|
285
|
+
this.pointerInteractionEvent.raiseEvent({
|
|
286
|
+
map: this,
|
|
287
|
+
windowPosition,
|
|
288
|
+
key,
|
|
289
|
+
pointer,
|
|
290
|
+
multipleTouch,
|
|
291
|
+
pointerEvent,
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
_setupInteractions() {
|
|
295
|
+
if (!(this._cesiumWidget && this.screenSpaceEventHandler)) {
|
|
296
|
+
throw new Error('Cannot setup interactions on uninitailized map');
|
|
297
|
+
}
|
|
298
|
+
const mods = [
|
|
299
|
+
{
|
|
300
|
+
csModifier: KeyboardEventModifier.ALT,
|
|
301
|
+
vcsModifier: ModificationKeyType.ALT,
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
csModifier: KeyboardEventModifier.CTRL,
|
|
305
|
+
vcsModifier: ModificationKeyType.CTRL,
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
csModifier: KeyboardEventModifier.SHIFT,
|
|
309
|
+
vcsModifier: ModificationKeyType.SHIFT,
|
|
310
|
+
},
|
|
311
|
+
{ csModifier: undefined, vcsModifier: ModificationKeyType.NONE },
|
|
312
|
+
];
|
|
313
|
+
const types = [
|
|
314
|
+
{
|
|
315
|
+
type: ScreenSpaceEventType.LEFT_DOWN,
|
|
316
|
+
pointerEvent: PointerEventType.DOWN,
|
|
317
|
+
pointer: PointerKeyType.LEFT,
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
type: ScreenSpaceEventType.LEFT_UP,
|
|
321
|
+
pointerEvent: PointerEventType.UP,
|
|
322
|
+
pointer: PointerKeyType.LEFT,
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
type: ScreenSpaceEventType.RIGHT_DOWN,
|
|
326
|
+
pointerEvent: PointerEventType.DOWN,
|
|
327
|
+
pointer: PointerKeyType.RIGHT,
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
type: ScreenSpaceEventType.RIGHT_UP,
|
|
331
|
+
pointerEvent: PointerEventType.UP,
|
|
332
|
+
pointer: PointerKeyType.RIGHT,
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
type: ScreenSpaceEventType.MIDDLE_DOWN,
|
|
336
|
+
pointerEvent: PointerEventType.DOWN,
|
|
337
|
+
pointer: PointerKeyType.MIDDLE,
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
type: ScreenSpaceEventType.MIDDLE_UP,
|
|
341
|
+
pointerEvent: PointerEventType.UP,
|
|
342
|
+
pointer: PointerKeyType.MIDDLE,
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
type: ScreenSpaceEventType.MOUSE_MOVE,
|
|
346
|
+
pointerEvent: PointerEventType.MOVE,
|
|
347
|
+
pointer: PointerKeyType.ALL,
|
|
348
|
+
},
|
|
349
|
+
];
|
|
350
|
+
this._screenSpaceListeners = types
|
|
351
|
+
.map(({ pointerEvent, pointer, type }) => {
|
|
352
|
+
return mods.map(({ csModifier, vcsModifier }) => {
|
|
353
|
+
const handler = type === ScreenSpaceEventType.MOUSE_MOVE
|
|
354
|
+
? (csEvent) => {
|
|
355
|
+
const widget = this._cesiumWidget;
|
|
356
|
+
if (widget.scene.frameState.frameNumber !==
|
|
357
|
+
this._lastEventFrameNumber) {
|
|
358
|
+
this._lastEventFrameNumber =
|
|
359
|
+
widget.scene.frameState.frameNumber;
|
|
360
|
+
this._raisePointerInteraction(vcsModifier, pointer, pointerEvent, csEvent);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
: (csEvent) => {
|
|
364
|
+
this._raisePointerInteraction(vcsModifier, pointer, pointerEvent, csEvent);
|
|
365
|
+
};
|
|
366
|
+
this.screenSpaceEventHandler?.setInputAction?.(handler, type, csModifier);
|
|
367
|
+
return () => {
|
|
368
|
+
this?.screenSpaceEventHandler?.removeInputAction?.(type, csModifier);
|
|
369
|
+
};
|
|
370
|
+
});
|
|
371
|
+
})
|
|
372
|
+
.flat();
|
|
373
|
+
}
|
|
374
|
+
initialize() {
|
|
375
|
+
if (!this.initialized) {
|
|
376
|
+
if (!this.useOriginalCesiumShader) {
|
|
377
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
378
|
+
// @ts-ignore
|
|
379
|
+
globalThis.useVcsCustomShading = true;
|
|
380
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
381
|
+
// @ts-ignore
|
|
382
|
+
}
|
|
383
|
+
else if (globalThis.useVcsCustomShading) {
|
|
384
|
+
console.error('Cannot activate Original Cesium Shader, flag to use VCS Shader is already set by another Cesium Map or VCMap Instance');
|
|
385
|
+
}
|
|
386
|
+
this._cesiumWidget = new CesiumWidget(this.mapElement, {
|
|
387
|
+
requestRenderMode: false,
|
|
388
|
+
scene3DOnly: true,
|
|
389
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
390
|
+
// @ts-ignore // error in Cesium, recheck on next cesium update
|
|
391
|
+
baseLayer: false,
|
|
392
|
+
shadows: false,
|
|
393
|
+
terrainShadows: ShadowMode.ENABLED,
|
|
394
|
+
contextOptions: {
|
|
395
|
+
webgl: {
|
|
396
|
+
failIfMajorPerformanceCaveat: false,
|
|
397
|
+
antialias: this.webGLaa,
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
});
|
|
401
|
+
this._cesiumWidget.scene.globe.tileCacheSize = this.tileCacheSize;
|
|
402
|
+
this._cesiumWidget.scene.globe.baseColor = this.globeColor;
|
|
403
|
+
this.dataSourceDisplay = new DataSourceDisplay({
|
|
404
|
+
scene: this._cesiumWidget.scene,
|
|
405
|
+
dataSourceCollection: new DataSourceCollection(),
|
|
406
|
+
});
|
|
407
|
+
this._cesiumWidget.scene.frameState.creditDisplay.update = () => { };
|
|
408
|
+
this._cesiumWidget.scene.frameState.creditDisplay.beginFrame =
|
|
409
|
+
() => { };
|
|
410
|
+
this._cesiumWidget.scene.frameState.creditDisplay.endFrame =
|
|
411
|
+
() => { };
|
|
412
|
+
const { clock } = this._cesiumWidget;
|
|
413
|
+
clock.shouldAnimate = true;
|
|
414
|
+
this._listeners.push(clock.onTick.addEventListener(() => {
|
|
415
|
+
this.dataSourceDisplayClock.tick();
|
|
416
|
+
const time = this.dataSourceDisplayClock.currentTime;
|
|
417
|
+
this.dataSourceDisplay?.update?.(time);
|
|
418
|
+
}));
|
|
419
|
+
// deactivate cesium Requestthrottling let the browser manage that
|
|
420
|
+
// RequestScheduler.throttleRequests = false;
|
|
421
|
+
RequestScheduler.maximumRequestsPerServer = 12;
|
|
422
|
+
this._cesiumWidget.scene.shadowMap.maximumDistance = 5000.0;
|
|
423
|
+
this._cesiumWidget.scene.shadowMap.darkness = 0.6;
|
|
424
|
+
this._cesiumWidget.scene.globe.depthTestAgainstTerrain = true;
|
|
425
|
+
this._cesiumWidget.scene.highDynamicRange = false;
|
|
426
|
+
// this._cesiumWidget.scene.logarithmicDepthBuffer = false; // TODO observe this
|
|
427
|
+
this._cesiumWidget.scene.splitPosition = this.splitPosition;
|
|
428
|
+
this._cesiumWidget.scene.light.intensity = this._lightIntensity;
|
|
429
|
+
this._cesiumWidget.scene.globe.enableLighting = this.enableLightning;
|
|
430
|
+
this.setDay(this.defaultJDate);
|
|
431
|
+
// hide default cesium credits container
|
|
432
|
+
const creditsContainer = document.getElementsByClassName('cesium-widget-credits');
|
|
433
|
+
if (creditsContainer) {
|
|
434
|
+
for (let i = 0; i < creditsContainer.length; i++) {
|
|
435
|
+
const element = creditsContainer[i];
|
|
436
|
+
element.style.display = 'none';
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
if (this._cameraLimiterOptions && !this._cameraLimiter) {
|
|
440
|
+
this._cameraLimiter = new CameraLimiter(this._cameraLimiterOptions);
|
|
441
|
+
}
|
|
442
|
+
if (this._cameraLimiter) {
|
|
443
|
+
this._setupPreUpdateListener();
|
|
444
|
+
}
|
|
445
|
+
this.screenSpaceEventHandler = new ScreenSpaceEventHandler(this._cesiumWidget.scene.canvas);
|
|
446
|
+
this._setupInteractions();
|
|
447
|
+
this.initialized = true;
|
|
448
|
+
this.defaultTerrainProvider = this._cesiumWidget.scene.terrainProvider;
|
|
449
|
+
this._terrainProvider = this.defaultTerrainProvider;
|
|
450
|
+
this._listeners.push(this._cesiumWidget.scene.terrainProviderChanged.addEventListener(this._terrainProviderChanged.bind(this)));
|
|
451
|
+
this._listeners.push(this._cesiumWidget.scene.postRender.addEventListener((eventScene, time) => {
|
|
452
|
+
this.postRender.raiseEvent({
|
|
453
|
+
map: this,
|
|
454
|
+
originalEvent: { scene: eventScene, time },
|
|
455
|
+
});
|
|
456
|
+
}));
|
|
457
|
+
}
|
|
458
|
+
return Promise.resolve();
|
|
459
|
+
}
|
|
460
|
+
async activate() {
|
|
461
|
+
await super.activate();
|
|
462
|
+
if (this.active && this._cesiumWidget) {
|
|
463
|
+
this._cesiumWidget.useDefaultRenderLoop = true;
|
|
464
|
+
this._cesiumWidget.resize();
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
deactivate() {
|
|
468
|
+
super.deactivate();
|
|
469
|
+
if (this._cesiumWidget) {
|
|
470
|
+
this._cesiumWidget.useDefaultRenderLoop = false;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* getHeight for coordinates
|
|
475
|
+
* @param positions - in web mercator
|
|
476
|
+
* @returns the array of coordinates with heights updated in place
|
|
477
|
+
*/
|
|
478
|
+
getHeightFromTerrain(positions) {
|
|
479
|
+
if (!this._cesiumWidget) {
|
|
480
|
+
return Promise.resolve(positions);
|
|
481
|
+
}
|
|
482
|
+
const { terrainProvider } = this._cesiumWidget.scene;
|
|
483
|
+
if (terrainProvider.availability) {
|
|
484
|
+
return getHeightFromTerrainProvider(terrainProvider, positions, mercatorProjection, positions);
|
|
485
|
+
}
|
|
486
|
+
return Promise.resolve(positions);
|
|
487
|
+
}
|
|
488
|
+
getViewpoint() {
|
|
489
|
+
return Promise.resolve(this.getViewpointSync());
|
|
490
|
+
}
|
|
491
|
+
getViewpointSync() {
|
|
492
|
+
if (!this._cesiumWidget || !this._cesiumWidget.scene || !this.target) {
|
|
493
|
+
return null;
|
|
494
|
+
}
|
|
495
|
+
const cam = this._cesiumWidget.scene.camera;
|
|
496
|
+
const cameraPositionCartesian = cam.position;
|
|
497
|
+
let groundPosition;
|
|
498
|
+
let distance;
|
|
499
|
+
const ray = new Ray(cam.position, cam.direction);
|
|
500
|
+
const groundPositionCartesian = this._cesiumWidget.scene.globe.pick(ray, this._cesiumWidget.scene);
|
|
501
|
+
if (groundPositionCartesian) {
|
|
502
|
+
distance = Cartesian3.distance(groundPositionCartesian, cameraPositionCartesian);
|
|
503
|
+
const groundPositionCartographic = Ellipsoid.WGS84.cartesianToCartographic(groundPositionCartesian);
|
|
504
|
+
groundPosition = [
|
|
505
|
+
CesiumMath.toDegrees(groundPositionCartographic.longitude),
|
|
506
|
+
CesiumMath.toDegrees(groundPositionCartographic.latitude),
|
|
507
|
+
groundPositionCartographic.height,
|
|
508
|
+
];
|
|
509
|
+
}
|
|
510
|
+
const cameraPositionCartographic = cam.positionCartographic;
|
|
511
|
+
const cameraPosition = [
|
|
512
|
+
CesiumMath.toDegrees(cameraPositionCartographic.longitude),
|
|
513
|
+
CesiumMath.toDegrees(cameraPositionCartographic.latitude),
|
|
514
|
+
cameraPositionCartographic.height,
|
|
515
|
+
];
|
|
516
|
+
return new Viewpoint({
|
|
517
|
+
groundPosition,
|
|
518
|
+
cameraPosition,
|
|
519
|
+
distance,
|
|
520
|
+
heading: CesiumMath.toDegrees(cam.heading),
|
|
521
|
+
pitch: CesiumMath.toDegrees(cam.pitch),
|
|
522
|
+
roll: CesiumMath.toDegrees(cam.roll),
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
async gotoViewpoint(viewpoint, optMaximumHeight) {
|
|
526
|
+
if (this.movementDisabled || !viewpoint.isValid() || !this._cesiumWidget) {
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
let cameraPosition;
|
|
530
|
+
const { distance } = viewpoint;
|
|
531
|
+
const heading = CesiumMath.toRadians(viewpoint.heading);
|
|
532
|
+
const pitch = CesiumMath.toRadians(viewpoint.pitch);
|
|
533
|
+
const roll = CesiumMath.toRadians(viewpoint.roll);
|
|
534
|
+
if (viewpoint.cameraPosition) {
|
|
535
|
+
const cameraCoords = viewpoint.cameraPosition;
|
|
536
|
+
cameraPosition = Cartesian3.fromDegrees(cameraCoords[0], cameraCoords[1], cameraCoords[2]);
|
|
537
|
+
}
|
|
538
|
+
else {
|
|
539
|
+
if (!viewpoint.groundPosition) {
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
const groundPositionCoords = viewpoint.groundPosition;
|
|
543
|
+
if (!groundPositionCoords[2]) {
|
|
544
|
+
const positions = await this.getHeightFromTerrain([
|
|
545
|
+
Projection.wgs84ToMercator(groundPositionCoords),
|
|
546
|
+
]);
|
|
547
|
+
groundPositionCoords[2] = positions[0][2];
|
|
548
|
+
}
|
|
549
|
+
const groundPosition = Cartesian3.fromDegrees(groundPositionCoords[0], groundPositionCoords[1], groundPositionCoords[2]);
|
|
550
|
+
const clonedCamera = new Camera(this._cesiumWidget.scene);
|
|
551
|
+
const options = {
|
|
552
|
+
destination: groundPosition,
|
|
553
|
+
orientation: {
|
|
554
|
+
heading,
|
|
555
|
+
pitch,
|
|
556
|
+
roll,
|
|
557
|
+
},
|
|
558
|
+
};
|
|
559
|
+
clonedCamera.setView(options);
|
|
560
|
+
clonedCamera.moveBackward(distance);
|
|
561
|
+
cameraPosition = clonedCamera.position;
|
|
562
|
+
}
|
|
563
|
+
const cam = this._cesiumWidget.scene.camera;
|
|
564
|
+
const cameraOptions = {
|
|
565
|
+
heading,
|
|
566
|
+
pitch,
|
|
567
|
+
roll,
|
|
568
|
+
};
|
|
569
|
+
cameraPosition = cameraPosition || null;
|
|
570
|
+
cam.cancelFlight();
|
|
571
|
+
if (viewpoint.animate) {
|
|
572
|
+
await new Promise((resolve) => {
|
|
573
|
+
const flightOptions = {
|
|
574
|
+
destination: cameraPosition,
|
|
575
|
+
orientation: cameraOptions,
|
|
576
|
+
complete: () => {
|
|
577
|
+
resolve();
|
|
578
|
+
},
|
|
579
|
+
cancel: () => {
|
|
580
|
+
resolve();
|
|
581
|
+
},
|
|
582
|
+
};
|
|
583
|
+
if (viewpoint.duration) {
|
|
584
|
+
flightOptions.duration = viewpoint.duration;
|
|
585
|
+
}
|
|
586
|
+
if (viewpoint.easingFunction) {
|
|
587
|
+
flightOptions.easingFunction = viewpoint.easingFunction;
|
|
588
|
+
}
|
|
589
|
+
if (optMaximumHeight) {
|
|
590
|
+
flightOptions.maximumHeight = optMaximumHeight;
|
|
591
|
+
}
|
|
592
|
+
cam.flyTo(flightOptions);
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
else {
|
|
596
|
+
cam.setView({
|
|
597
|
+
destination: cameraPosition,
|
|
598
|
+
orientation: cameraOptions,
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
_getCurrentResolutionFromCartesianLatitude(cartesian, latitude) {
|
|
603
|
+
if (!this._cesiumWidget) {
|
|
604
|
+
return 1;
|
|
605
|
+
}
|
|
606
|
+
const cam = this._cesiumWidget.scene.camera;
|
|
607
|
+
const distance = Cartesian3.distance(cartesian, cam.position);
|
|
608
|
+
const fov = Math.PI / 3.0;
|
|
609
|
+
const width = this.mapElement.offsetWidth;
|
|
610
|
+
const height = this.mapElement.offsetHeight;
|
|
611
|
+
const aspectRatio = width / height;
|
|
612
|
+
const fovy = Math.atan(Math.tan(fov * 0.5) / aspectRatio) * 2.0;
|
|
613
|
+
const visibleMeters = 2 * distance * Math.tan(fovy / 2);
|
|
614
|
+
const relativeCircumference = Math.cos(Math.abs(latitude));
|
|
615
|
+
const visibleMapUnits = visibleMeters / relativeCircumference;
|
|
616
|
+
return visibleMapUnits / height;
|
|
617
|
+
}
|
|
618
|
+
getCurrentResolution(coordinate) {
|
|
619
|
+
const wgs84Coordinate = Projection.mercatorToWgs84(coordinate);
|
|
620
|
+
const cartesian = Cartesian3.fromDegrees(wgs84Coordinate[0], wgs84Coordinate[1], wgs84Coordinate[2]);
|
|
621
|
+
return this._getCurrentResolutionFromCartesianLatitude(cartesian, CesiumMath.toRadians(wgs84Coordinate[1]));
|
|
622
|
+
}
|
|
623
|
+
getCurrentResolutionFromCartesian(cartesian) {
|
|
624
|
+
return this._getCurrentResolutionFromCartesianLatitude(cartesian, Cartographic.fromCartesian(cartesian).latitude);
|
|
625
|
+
}
|
|
626
|
+
disableMovement(bool) {
|
|
627
|
+
super.disableMovement(bool);
|
|
628
|
+
if (this._cesiumWidget) {
|
|
629
|
+
this._cesiumWidget.scene.screenSpaceCameraController.enableInputs = !bool;
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* set dataSource clock as display clock to visualize time dependent animation
|
|
634
|
+
*/
|
|
635
|
+
setDataSourceDisplayClock(clock) {
|
|
636
|
+
const activeClock = this._dataSourceClocks[this._dataSourceClocks.length - 1];
|
|
637
|
+
if (clock !== activeClock) {
|
|
638
|
+
if (this._clockSyncListener) {
|
|
639
|
+
this._clockSyncListener();
|
|
640
|
+
this._clockSyncListener = null;
|
|
641
|
+
}
|
|
642
|
+
this._clockSyncListener = synchronizeClock(clock, this.dataSourceDisplayClock);
|
|
643
|
+
}
|
|
644
|
+
this._dataSourceClocks.push(clock);
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* unset dataSource clock
|
|
648
|
+
*/
|
|
649
|
+
unsetDataSourceDisplayClock(clock) {
|
|
650
|
+
const idx = this._dataSourceClocks.lastIndexOf(clock);
|
|
651
|
+
if (idx > -1) {
|
|
652
|
+
this._dataSourceClocks.splice(idx, 1);
|
|
653
|
+
if (idx === this._dataSourceClocks.length) {
|
|
654
|
+
const activeClock = this._dataSourceClocks[this._dataSourceClocks.length - 1] ||
|
|
655
|
+
this._defaultClock;
|
|
656
|
+
if (this._clockSyncListener) {
|
|
657
|
+
this._clockSyncListener();
|
|
658
|
+
this._clockSyncListener = null;
|
|
659
|
+
}
|
|
660
|
+
this._clockSyncListener = synchronizeClock(activeClock, this.dataSourceDisplayClock);
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* sets the position of the sun according to the day
|
|
666
|
+
* @param julianDate See the Cesium API
|
|
667
|
+
*/
|
|
668
|
+
setDay(julianDate) {
|
|
669
|
+
if (this._cesiumWidget) {
|
|
670
|
+
this._cesiumWidget.clock.currentTime = julianDate;
|
|
671
|
+
this._cesiumWidget.clock.multiplier = 1;
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* sets the lighting of the globe with the sun as a light source
|
|
676
|
+
*/
|
|
677
|
+
setLightning(value) {
|
|
678
|
+
this.enableLightning = value;
|
|
679
|
+
if (this._cesiumWidget) {
|
|
680
|
+
this._cesiumWidget.scene.globe.enableLighting = value;
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* returns the cesium Widget Object
|
|
685
|
+
*/
|
|
686
|
+
getCesiumWidget() {
|
|
687
|
+
return this._cesiumWidget;
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* returns the Entities Collection
|
|
691
|
+
*/
|
|
692
|
+
getEntities() {
|
|
693
|
+
return this.dataSourceDisplay?.defaultDataSource?.entities;
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* returns the dataSourceCollection associated with the scene
|
|
697
|
+
*/
|
|
698
|
+
getDatasources() {
|
|
699
|
+
return this.dataSourceDisplay?.dataSources;
|
|
700
|
+
}
|
|
701
|
+
/**
|
|
702
|
+
* Returns the cluster dataSourceDisplays dataSources.
|
|
703
|
+
* This datasource can only handle Entities with Billboards, Labels or Points.
|
|
704
|
+
*/
|
|
705
|
+
getClusterDatasources() {
|
|
706
|
+
if (this._clusterDataSourceDisplay) {
|
|
707
|
+
return this._clusterDataSourceDisplay.dataSources;
|
|
708
|
+
}
|
|
709
|
+
if (!this._cesiumWidget) {
|
|
710
|
+
throw new Error('Cannot get Datasource collection from uninitialized map');
|
|
711
|
+
}
|
|
712
|
+
const dataSourceCollection = new DataSourceCollection();
|
|
713
|
+
const visualizersCallback = (_scene, entityCluster, dataSource) => {
|
|
714
|
+
const { entities } = dataSource;
|
|
715
|
+
return [
|
|
716
|
+
new BillboardVisualizer(entityCluster, entities),
|
|
717
|
+
new LabelVisualizer(entityCluster, entities),
|
|
718
|
+
new PointVisualizer(entityCluster, entities),
|
|
719
|
+
];
|
|
720
|
+
};
|
|
721
|
+
this._clusterDataSourceDisplay = new DataSourceDisplay({
|
|
722
|
+
scene: this._cesiumWidget.scene,
|
|
723
|
+
dataSourceCollection,
|
|
724
|
+
visualizersCallback: visualizersCallback, // XXX remove after type fix in cesium,
|
|
725
|
+
});
|
|
726
|
+
this._listeners.push(this._cesiumWidget.clock.onTick.addEventListener((clock) => {
|
|
727
|
+
this._clusterDataSourceDisplay?.update?.(clock.currentTime);
|
|
728
|
+
}));
|
|
729
|
+
return dataSourceCollection;
|
|
730
|
+
}
|
|
731
|
+
indexChanged(layer) {
|
|
732
|
+
const viz = this.getVisualizationsForLayer(layer);
|
|
733
|
+
if (viz) {
|
|
734
|
+
viz.forEach((item) => {
|
|
735
|
+
if (item instanceof PrimitiveCollection) {
|
|
736
|
+
indexChangedOnPrimitive(this.getScene().primitives, item, this.layerCollection);
|
|
737
|
+
}
|
|
738
|
+
else if (item instanceof ImageryLayer) {
|
|
739
|
+
indexChangedOnImageryLayer(this.getScene().imageryLayers, item, this.layerCollection);
|
|
740
|
+
}
|
|
741
|
+
else if (item instanceof CustomDataSource) {
|
|
742
|
+
indexChangedOnDataSource(this.dataSourceDisplay.dataSources, item, this.layerCollection);
|
|
743
|
+
}
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* Internal API used to register visualizations from layer implementations
|
|
749
|
+
* @param primitiveCollection
|
|
750
|
+
*/
|
|
751
|
+
addPrimitiveCollection(primitiveCollection) {
|
|
752
|
+
if (!this._cesiumWidget) {
|
|
753
|
+
throw new Error('Cannot add primitive to uninitialized map');
|
|
754
|
+
}
|
|
755
|
+
if (this.validateVisualization(primitiveCollection)) {
|
|
756
|
+
this.addVisualization(primitiveCollection);
|
|
757
|
+
ensureInCollection(this._cesiumWidget.scene.primitives, primitiveCollection, this.layerCollection);
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
/**
|
|
761
|
+
* Internal API to unregister the visualization for a layers implementation
|
|
762
|
+
* @param primitiveCollection
|
|
763
|
+
*/
|
|
764
|
+
removePrimitiveCollection(primitiveCollection) {
|
|
765
|
+
// XXX add destroy as boolean?
|
|
766
|
+
this.removeVisualization(primitiveCollection);
|
|
767
|
+
this.getScene()?.primitives.remove(primitiveCollection);
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Internal API used to register visualizations from layer implementations
|
|
771
|
+
* @param imageryLayer
|
|
772
|
+
*/
|
|
773
|
+
addImageryLayer(imageryLayer) {
|
|
774
|
+
if (!this._cesiumWidget) {
|
|
775
|
+
throw new Error('Cannot add primitive to uninitialized map');
|
|
776
|
+
}
|
|
777
|
+
if (this.validateVisualization(imageryLayer)) {
|
|
778
|
+
this.addVisualization(imageryLayer);
|
|
779
|
+
ensureInCollection(this._cesiumWidget.scene.imageryLayers, imageryLayer, this.layerCollection);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* Internal API used to unregister visualizations from layer implementations
|
|
784
|
+
*/
|
|
785
|
+
removeImageryLayer(imageryLayer) {
|
|
786
|
+
this.removeVisualization(imageryLayer);
|
|
787
|
+
this.getScene()?.imageryLayers.remove(imageryLayer);
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* Internal API used to register visualizations from layer implementations
|
|
791
|
+
*/
|
|
792
|
+
async addDataSource(dataSource) {
|
|
793
|
+
if (!this.dataSourceDisplay) {
|
|
794
|
+
throw new Error('Cannot add data source to uninitialized map');
|
|
795
|
+
}
|
|
796
|
+
if (this.validateVisualization(dataSource)) {
|
|
797
|
+
this.addVisualization(dataSource);
|
|
798
|
+
await ensureInDataSourceCollection(this.dataSourceDisplay.dataSources, dataSource, this.layerCollection);
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* Internal API used to unregister visualizations from layer implementations
|
|
803
|
+
*/
|
|
804
|
+
removeDataSource(dataSource) {
|
|
805
|
+
this.removeVisualization(dataSource);
|
|
806
|
+
if (this.dataSourceDisplay &&
|
|
807
|
+
!this.dataSourceDisplay.isDestroyed() &&
|
|
808
|
+
!this.dataSourceDisplay.dataSources.isDestroyed()) {
|
|
809
|
+
this.dataSourceDisplay.dataSources.remove(dataSource);
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* set the cesium TerrainProvider
|
|
814
|
+
*/
|
|
815
|
+
setTerrainProvider(terrainProvider) {
|
|
816
|
+
if (this.terrainProvider !== terrainProvider && this._cesiumWidget) {
|
|
817
|
+
this._cesiumWidget.scene.terrainProvider = terrainProvider;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
/**
|
|
821
|
+
* unsets the TerrainProvider (changes to the default TerrainProvider if the given terranProvider is currently active)
|
|
822
|
+
*/
|
|
823
|
+
unsetTerrainProvider(terrainProvider) {
|
|
824
|
+
if (this.terrainProvider === terrainProvider) {
|
|
825
|
+
this._terrainProvider = this.defaultTerrainProvider;
|
|
826
|
+
if (this._cesiumWidget && this.defaultTerrainProvider) {
|
|
827
|
+
this._cesiumWidget.scene.terrainProvider = this.defaultTerrainProvider;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* returns the cesium DataSourceDisplay Object
|
|
833
|
+
*/
|
|
834
|
+
getDataSourceDisplay() {
|
|
835
|
+
return this.dataSourceDisplay;
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* returns the cesium Scene Object, returns null on non initialized or destroyed maps
|
|
839
|
+
*/
|
|
840
|
+
getScene() {
|
|
841
|
+
return this._cesiumWidget?.scene;
|
|
842
|
+
}
|
|
843
|
+
pointIsVisible(coords) {
|
|
844
|
+
if (!this._cesiumWidget) {
|
|
845
|
+
return false;
|
|
846
|
+
}
|
|
847
|
+
const { camera } = this._cesiumWidget.scene;
|
|
848
|
+
const target = Cartesian3.fromDegrees(coords[0], coords[1], 0.0);
|
|
849
|
+
const cullingVolume = camera.frustum.computeCullingVolume(camera.positionWC, camera.directionWC, camera.upWC);
|
|
850
|
+
if (cullingVolume.computeVisibility(new BoundingSphere(target)) ===
|
|
851
|
+
Intersect.INSIDE) {
|
|
852
|
+
return true;
|
|
853
|
+
}
|
|
854
|
+
return false;
|
|
855
|
+
}
|
|
856
|
+
/**
|
|
857
|
+
* is called when the cesium Terrainprovider changes. Sets the .terrainProvider and deactivates currently
|
|
858
|
+
* active TerrainLayer layer if necessary
|
|
859
|
+
*/
|
|
860
|
+
_terrainProviderChanged(terrainProvider) {
|
|
861
|
+
if (this.terrainProvider !== terrainProvider) {
|
|
862
|
+
const layer = this.layerCollection.getByKey(this?.terrainProvider?.[vcsLayerName]);
|
|
863
|
+
this._terrainProvider = terrainProvider;
|
|
864
|
+
if (layer) {
|
|
865
|
+
layer.deactivate();
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
/**
|
|
870
|
+
* returns true if the WEBGL Extension WEBGL_depth_texture is supported. (Is used for picking)
|
|
871
|
+
*/
|
|
872
|
+
pickPositionSupported() {
|
|
873
|
+
if (!this.initialized) {
|
|
874
|
+
return false;
|
|
875
|
+
}
|
|
876
|
+
return this._cesiumWidget?.scene.pickPositionSupported ?? false;
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* returns true if the WEBGL Extension EXT_frag_depth is supported. (Is used for GroundPoloygons)
|
|
880
|
+
*/
|
|
881
|
+
isGroundPrimitiveSupported() {
|
|
882
|
+
if (!this.initialized) {
|
|
883
|
+
return false;
|
|
884
|
+
}
|
|
885
|
+
return this._cesiumWidget?.scene.context.fragmentDepth ?? false;
|
|
886
|
+
}
|
|
887
|
+
toJSON() {
|
|
888
|
+
const config = super.toJSON();
|
|
889
|
+
const defaultOptions = CesiumMap.getDefaultOptions();
|
|
890
|
+
if (this.enableLightning !== defaultOptions.enableLightning) {
|
|
891
|
+
config.enableLightning = this.enableLightning;
|
|
892
|
+
}
|
|
893
|
+
if (this.tileCacheSize !== defaultOptions.tileCacheSize) {
|
|
894
|
+
config.tileCacheSize = this.tileCacheSize;
|
|
895
|
+
}
|
|
896
|
+
if (this.webGLaa !== defaultOptions.webGLaa) {
|
|
897
|
+
config.webGLaa = this.webGLaa;
|
|
898
|
+
}
|
|
899
|
+
if (this.globeColor.toCssHexString() !== defaultOptions.globeColor) {
|
|
900
|
+
config.globeColor = this.globeColor.toCssHexString();
|
|
901
|
+
}
|
|
902
|
+
if (this._cameraLimiter) {
|
|
903
|
+
config.cameraLimiter = this._cameraLimiter.toJSON();
|
|
904
|
+
}
|
|
905
|
+
else if (this._cameraLimiterOptions && !this.initialized) {
|
|
906
|
+
config.cameraLimiter = this._cameraLimiterOptions;
|
|
907
|
+
}
|
|
908
|
+
if (this._lightIntensity !== defaultOptions.lightIntensity) {
|
|
909
|
+
config.lightIntensity = this._lightIntensity;
|
|
910
|
+
}
|
|
911
|
+
if (this.useOriginalCesiumShader !== defaultOptions.useOriginalCesiumShader) {
|
|
912
|
+
config.useOriginalCesiumShader = this.useOriginalCesiumShader;
|
|
913
|
+
}
|
|
914
|
+
return config;
|
|
915
|
+
}
|
|
916
|
+
destroy() {
|
|
917
|
+
if (this.dataSourceDisplay && !this.dataSourceDisplay.isDestroyed()) {
|
|
918
|
+
this.dataSourceDisplay.destroy();
|
|
919
|
+
}
|
|
920
|
+
this._screenSpaceListeners.forEach((cb) => {
|
|
921
|
+
cb();
|
|
922
|
+
});
|
|
923
|
+
if (this.screenSpaceEventHandler) {
|
|
924
|
+
this.screenSpaceEventHandler.destroy();
|
|
925
|
+
this.screenSpaceEventHandler = null;
|
|
926
|
+
}
|
|
927
|
+
this._listeners.forEach((cb) => {
|
|
928
|
+
cb();
|
|
929
|
+
});
|
|
930
|
+
this._listeners = [];
|
|
931
|
+
this._terrainProvider = null;
|
|
932
|
+
this.defaultTerrainProvider = null;
|
|
933
|
+
if (this._clockSyncListener) {
|
|
934
|
+
this._clockSyncListener();
|
|
935
|
+
this._clockSyncListener = null;
|
|
936
|
+
}
|
|
937
|
+
if (this._preUpdateListener) {
|
|
938
|
+
this._preUpdateListener();
|
|
939
|
+
this._preUpdateListener = null;
|
|
940
|
+
}
|
|
941
|
+
if (this._cameraLimiter) {
|
|
942
|
+
this._cameraLimiter = null;
|
|
943
|
+
}
|
|
944
|
+
[...this.layerCollection].forEach((l) => {
|
|
945
|
+
l.removedFromMap(this);
|
|
946
|
+
});
|
|
947
|
+
if (this._clusterDataSourceDisplay) {
|
|
948
|
+
this._clusterDataSourceDisplay.destroy();
|
|
949
|
+
}
|
|
950
|
+
if (this._cesiumWidget) {
|
|
951
|
+
this._cesiumWidget.destroy();
|
|
952
|
+
this._cesiumWidget = null;
|
|
953
|
+
}
|
|
954
|
+
super.destroy();
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
mapClassRegistry.registerClass(CesiumMap.className, CesiumMap);
|
|
958
|
+
export default CesiumMap;
|
|
959
|
+
//# sourceMappingURL=cesiumMap.js.map
|