@vcmap/core 6.2.4 → 6.3.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cesium.d.ts +12 -0
- package/dist/index.d.ts +13 -3
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/ol.d.ts +13 -2
- package/dist/src/category/category.d.ts +1 -1
- package/dist/src/category/category.js +3 -4
- package/dist/src/category/category.js.map +1 -1
- package/dist/src/cesium/cesium3DTileFeature.d.ts +1 -0
- package/dist/src/cesium/cesium3DTileFeature.js +14 -3
- package/dist/src/cesium/cesium3DTileFeature.js.map +1 -1
- package/dist/src/cesium/cesium3DTilePointFeature.js +2 -1
- package/dist/src/cesium/cesium3DTilePointFeature.js.map +1 -1
- package/dist/src/classRegistry.d.ts +7 -1
- package/dist/src/classRegistry.js.map +1 -1
- package/dist/src/featureProvider/abstractAttributeProvider.d.ts +62 -0
- package/dist/src/featureProvider/abstractAttributeProvider.js +129 -0
- package/dist/src/featureProvider/abstractAttributeProvider.js.map +1 -0
- package/dist/src/featureProvider/abstractFeatureProvider.d.ts +10 -19
- package/dist/src/featureProvider/abstractFeatureProvider.js +10 -42
- package/dist/src/featureProvider/abstractFeatureProvider.js.map +1 -1
- package/dist/src/featureProvider/compositeFeatureProvider.d.ts +27 -0
- package/dist/src/featureProvider/compositeFeatureProvider.js +53 -0
- package/dist/src/featureProvider/compositeFeatureProvider.js.map +1 -0
- package/dist/src/featureProvider/csvAttributeProvider.d.ts +41 -0
- package/dist/src/featureProvider/csvAttributeProvider.js +126 -0
- package/dist/src/featureProvider/csvAttributeProvider.js.map +1 -0
- package/dist/src/featureProvider/featureProviderFactory.d.ts +3 -0
- package/dist/src/featureProvider/featureProviderFactory.js +17 -0
- package/dist/src/featureProvider/featureProviderFactory.js.map +1 -0
- package/dist/src/featureProvider/i3sAttributeProvider.d.ts +7 -0
- package/dist/src/featureProvider/i3sAttributeProvider.js +43 -0
- package/dist/src/featureProvider/i3sAttributeProvider.js.map +1 -0
- package/dist/src/featureProvider/jsonAttributeProvider.d.ts +26 -0
- package/dist/src/featureProvider/jsonAttributeProvider.js +73 -0
- package/dist/src/featureProvider/jsonAttributeProvider.js.map +1 -0
- package/dist/src/featureProvider/tileProviderFeatureProvider.d.ts +4 -6
- package/dist/src/featureProvider/tileProviderFeatureProvider.js +9 -11
- package/dist/src/featureProvider/tileProviderFeatureProvider.js.map +1 -1
- package/dist/src/featureProvider/urlIdAttributeProvider.d.ts +28 -0
- package/dist/src/featureProvider/urlIdAttributeProvider.js +50 -0
- package/dist/src/featureProvider/urlIdAttributeProvider.js.map +1 -0
- package/dist/src/featureProvider/wmsFeatureProvider.d.ts +13 -4
- package/dist/src/featureProvider/wmsFeatureProvider.js +19 -9
- package/dist/src/featureProvider/wmsFeatureProvider.js.map +1 -1
- package/dist/src/interaction/coordinateAtPixel.js +4 -6
- package/dist/src/interaction/coordinateAtPixel.js.map +1 -1
- package/dist/src/interaction/ensurePositionInteraction.d.ts +14 -0
- package/dist/src/interaction/ensurePositionInteraction.js +42 -0
- package/dist/src/interaction/ensurePositionInteraction.js.map +1 -0
- package/dist/src/interaction/eventHandler.d.ts +3 -0
- package/dist/src/interaction/eventHandler.js +10 -1
- package/dist/src/interaction/eventHandler.js.map +1 -1
- package/dist/src/interaction/featureAtPixelInteraction.d.ts +15 -3
- package/dist/src/interaction/featureAtPixelInteraction.js +70 -18
- package/dist/src/interaction/featureAtPixelInteraction.js.map +1 -1
- package/dist/src/interaction/featureProviderInteraction.js +42 -26
- package/dist/src/interaction/featureProviderInteraction.js.map +1 -1
- package/dist/src/interaction/panoramaImageSelection.js +2 -2
- package/dist/src/interaction/panoramaImageSelection.js.map +1 -1
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.d.ts +17 -9
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js +244 -165
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/i3sCesiumImpl.d.ts +33 -0
- package/dist/src/layer/cesium/i3sCesiumImpl.js +107 -0
- package/dist/src/layer/cesium/i3sCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesium/rasterLayerCesiumImpl.d.ts +3 -3
- package/dist/src/layer/cesium/rasterLayerCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/terrainCesiumImpl.d.ts +3 -3
- package/dist/src/layer/cesium/terrainCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.js +2 -1
- package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.js.map +1 -1
- package/dist/src/layer/cesium/vectorContext.js +1 -1
- package/dist/src/layer/cesium/vectorContext.js.map +1 -1
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js +7 -6
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorTileImageryProvider.js +2 -2
- package/dist/src/layer/cesium/vectorTileImageryProvider.js.map +1 -1
- package/dist/src/layer/cesiumTilesetLayer.d.ts +10 -1
- package/dist/src/layer/cesiumTilesetLayer.js +33 -8
- package/dist/src/layer/cesiumTilesetLayer.js.map +1 -1
- package/dist/src/layer/cogLayer.d.ts +1 -1
- package/dist/src/layer/cogLayer.js +3 -4
- package/dist/src/layer/cogLayer.js.map +1 -1
- package/dist/src/layer/czmlLayer.d.ts +1 -1
- package/dist/src/layer/czmlLayer.js +4 -4
- package/dist/src/layer/czmlLayer.js.map +1 -1
- package/dist/src/layer/featureLayer.d.ts +1 -6
- package/dist/src/layer/featureLayer.js +3 -10
- package/dist/src/layer/featureLayer.js.map +1 -1
- package/dist/src/layer/featureStoreLayer.d.ts +3 -2
- package/dist/src/layer/featureStoreLayer.js +5 -5
- package/dist/src/layer/featureStoreLayer.js.map +1 -1
- package/dist/src/layer/flatGeobufLayer.d.ts +2 -0
- package/dist/src/layer/flatGeobufLayer.js +8 -0
- package/dist/src/layer/flatGeobufLayer.js.map +1 -1
- package/dist/src/layer/geojsonLayer.d.ts +1 -1
- package/dist/src/layer/geojsonLayer.js +5 -12
- package/dist/src/layer/geojsonLayer.js.map +1 -1
- package/dist/src/layer/i3sLayer.d.ts +80 -0
- package/dist/src/layer/i3sLayer.js +242 -0
- package/dist/src/layer/i3sLayer.js.map +1 -0
- package/dist/src/layer/layer.d.ts +29 -10
- package/dist/src/layer/layer.js +114 -34
- package/dist/src/layer/layer.js.map +1 -1
- package/dist/src/layer/layerSymbols.d.ts +4 -0
- package/dist/src/layer/layerSymbols.js +4 -0
- package/dist/src/layer/layerSymbols.js.map +1 -1
- package/dist/src/layer/openStreetMapLayer.d.ts +1 -1
- package/dist/src/layer/openStreetMapLayer.js +11 -6
- package/dist/src/layer/openStreetMapLayer.js.map +1 -1
- package/dist/src/layer/panorama/vectorPanoramaImpl.d.ts +38 -0
- package/dist/src/layer/panorama/vectorPanoramaImpl.js +164 -0
- package/dist/src/layer/panorama/vectorPanoramaImpl.js.map +1 -0
- package/dist/src/layer/panoramaDatasetLayer.d.ts +7 -3
- package/dist/src/layer/panoramaDatasetLayer.js +46 -20
- package/dist/src/layer/panoramaDatasetLayer.js.map +1 -1
- package/dist/src/layer/pointCloudLayer.d.ts +1 -5
- package/dist/src/layer/pointCloudLayer.js +3 -15
- package/dist/src/layer/pointCloudLayer.js.map +1 -1
- package/dist/src/layer/rasterLayer.d.ts +1 -1
- package/dist/src/layer/rasterLayer.js +4 -4
- package/dist/src/layer/rasterLayer.js.map +1 -1
- package/dist/src/layer/singleImageLayer.d.ts +1 -1
- package/dist/src/layer/singleImageLayer.js +3 -3
- package/dist/src/layer/singleImageLayer.js.map +1 -1
- package/dist/src/layer/terrainLayer.d.ts +1 -1
- package/dist/src/layer/terrainLayer.js +8 -6
- package/dist/src/layer/terrainLayer.js.map +1 -1
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.js +7 -5
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/mvtTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/mvtTileProvider.js +6 -5
- package/dist/src/layer/tileProvider/mvtTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.js +3 -3
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js +7 -4
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/tileProvider.d.ts +7 -1
- package/dist/src/layer/tileProvider/tileProvider.js +15 -5
- package/dist/src/layer/tileProvider/tileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.js +3 -3
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.js.map +1 -1
- package/dist/src/layer/tmsLayer.d.ts +1 -1
- package/dist/src/layer/tmsLayer.js +3 -10
- package/dist/src/layer/tmsLayer.js.map +1 -1
- package/dist/src/layer/vectorLayer.d.ts +11 -5
- package/dist/src/layer/vectorLayer.js +21 -10
- package/dist/src/layer/vectorLayer.js.map +1 -1
- package/dist/src/layer/vectorProperties.js +10 -1
- package/dist/src/layer/vectorProperties.js.map +1 -1
- package/dist/src/layer/vectorTileLayer.d.ts +14 -5
- package/dist/src/layer/vectorTileLayer.js +82 -31
- package/dist/src/layer/vectorTileLayer.js.map +1 -1
- package/dist/src/layer/wfsLayer.d.ts +1 -1
- package/dist/src/layer/wfsLayer.js +5 -4
- package/dist/src/layer/wfsLayer.js.map +1 -1
- package/dist/src/layer/wmsLayer.d.ts +4 -1
- package/dist/src/layer/wmsLayer.js +65 -36
- package/dist/src/layer/wmsLayer.js.map +1 -1
- package/dist/src/layer/wmtsLayer.d.ts +1 -1
- package/dist/src/layer/wmtsLayer.js +3 -10
- package/dist/src/layer/wmtsLayer.js.map +1 -1
- package/dist/src/map/baseCesiumMap.d.ts +69 -0
- package/dist/src/map/baseCesiumMap.js +393 -0
- package/dist/src/map/baseCesiumMap.js.map +1 -0
- package/dist/src/map/cesiumMap.d.ts +6 -98
- package/dist/src/map/cesiumMap.js +29 -266
- package/dist/src/map/cesiumMap.js.map +1 -1
- package/dist/src/map/obliqueMap.d.ts +1 -1
- package/dist/src/map/obliqueMap.js +14 -8
- package/dist/src/map/obliqueMap.js.map +1 -1
- package/dist/src/map/openlayersMap.d.ts +1 -1
- package/dist/src/map/openlayersMap.js +3 -4
- package/dist/src/map/openlayersMap.js.map +1 -1
- package/dist/src/map/panoramaMap.d.ts +17 -29
- package/dist/src/map/panoramaMap.js +56 -100
- package/dist/src/map/panoramaMap.js.map +1 -1
- package/dist/src/map/vcsMap.d.ts +15 -2
- package/dist/src/map/vcsMap.js +26 -3
- package/dist/src/map/vcsMap.js.map +1 -1
- package/dist/src/oblique/obliqueCollection.d.ts +1 -1
- package/dist/src/oblique/obliqueCollection.js +3 -4
- package/dist/src/oblique/obliqueCollection.js.map +1 -1
- package/dist/src/panorama/panoramaCameraController.d.ts +4 -0
- package/dist/src/panorama/panoramaCameraController.js +8 -0
- package/dist/src/panorama/panoramaCameraController.js.map +1 -1
- package/dist/src/panorama/panoramaImage.d.ts +10 -1
- package/dist/src/panorama/panoramaImage.js +15 -9
- package/dist/src/panorama/panoramaImage.js.map +1 -1
- package/dist/src/panorama/panoramaImageView.d.ts +6 -1
- package/dist/src/panorama/panoramaImageView.js +11 -2
- package/dist/src/panorama/panoramaImageView.js.map +1 -1
- package/dist/src/panorama/panoramaTileMaterial.d.ts +6 -0
- package/dist/src/panorama/panoramaTileMaterial.js +14 -0
- package/dist/src/panorama/panoramaTileMaterial.js.map +1 -1
- package/dist/src/panorama/panoramaTileMaterialFS.shader.d.ts +1 -1
- package/dist/src/panorama/panoramaTileMaterialFS.shader.js +16 -1
- package/dist/src/panorama/panoramaTileMaterialFS.shader.js.map +1 -1
- package/dist/src/panorama/panoramaTilePrimitiveCollection.d.ts +6 -0
- package/dist/src/panorama/panoramaTilePrimitiveCollection.js +28 -0
- package/dist/src/panorama/panoramaTilePrimitiveCollection.js.map +1 -1
- package/dist/src/style/declarativeStyleItem.js +7 -8
- package/dist/src/style/declarativeStyleItem.js.map +1 -1
- package/dist/src/util/clipping/clippingPolygonObject.d.ts +1 -1
- package/dist/src/util/clipping/clippingPolygonObject.js +3 -4
- package/dist/src/util/clipping/clippingPolygonObject.js.map +1 -1
- package/dist/src/util/displayQuality/displayQuality.js +4 -4
- package/dist/src/util/displayQuality/displayQuality.js.map +1 -1
- package/dist/src/util/editor/createFeatureSession.js +3 -1
- package/dist/src/util/editor/createFeatureSession.js.map +1 -1
- package/dist/src/util/editor/editFeaturesSession.js +9 -2
- package/dist/src/util/editor/editFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/editGeometrySession.js +3 -1
- package/dist/src/util/editor/editGeometrySession.js.map +1 -1
- package/dist/src/util/editor/editorSessionHelpers.d.ts +3 -3
- package/dist/src/util/editor/editorSessionHelpers.js +4 -2
- package/dist/src/util/editor/editorSessionHelpers.js.map +1 -1
- package/dist/src/util/editor/interactions/creationSnapping.js +4 -1
- package/dist/src/util/editor/interactions/creationSnapping.js.map +1 -1
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js +2 -2
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/layerSnapping.js +4 -1
- package/dist/src/util/editor/interactions/layerSnapping.js.map +1 -1
- package/dist/src/util/editor/interactions/mapInteractionController.js +12 -1
- package/dist/src/util/editor/interactions/mapInteractionController.js.map +1 -1
- package/dist/src/util/editor/interactions/translationSnapping.js +4 -2
- package/dist/src/util/editor/interactions/translationSnapping.js.map +1 -1
- package/dist/src/util/editor/selectFeaturesSession.js +1 -1
- package/dist/src/util/editor/selectFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/transformation/create3DHandlers.d.ts +2 -2
- package/dist/src/util/editor/transformation/create3DHandlers.js.map +1 -1
- package/dist/src/util/editor/transformation/transformationHandler.js +5 -2
- package/dist/src/util/editor/transformation/transformationHandler.js.map +1 -1
- package/dist/src/util/editor/transformation/translateInteraction.js +2 -2
- package/dist/src/util/editor/transformation/translateInteraction.js.map +1 -1
- package/dist/src/util/fetch.d.ts +7 -0
- package/dist/src/util/fetch.js +7 -0
- package/dist/src/util/fetch.js.map +1 -1
- package/dist/src/util/flight/flightInstance.d.ts +1 -1
- package/dist/src/util/flight/flightInstance.js +3 -4
- package/dist/src/util/flight/flightInstance.js.map +1 -1
- package/dist/src/util/mapCollection.d.ts +5 -0
- package/dist/src/util/mapCollection.js +14 -0
- package/dist/src/util/mapCollection.js.map +1 -1
- package/dist/src/util/renderScreenshot.js +2 -3
- package/dist/src/util/renderScreenshot.js.map +1 -1
- package/dist/src/util/viewpoint.js +1 -1
- package/dist/src/util/viewpoint.js.map +1 -1
- package/dist/src/vcsApp.d.ts +2 -3
- package/dist/src/vcsApp.js.map +1 -1
- package/dist/src/vcsModuleHelpers.d.ts +5 -2
- package/dist/src/vcsModuleHelpers.js +27 -1
- package/dist/src/vcsModuleHelpers.js.map +1 -1
- package/dist/src/vcsObject.d.ts +2 -1
- package/dist/src/vcsObject.js +9 -1
- package/dist/src/vcsObject.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterGroup.d.ts +1 -1
- package/dist/src/vectorCluster/vectorClusterGroup.js +3 -4
- package/dist/src/vectorCluster/vectorClusterGroup.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterStyleItem.d.ts +1 -1
- package/dist/src/vectorCluster/vectorClusterStyleItem.js +3 -4
- package/dist/src/vectorCluster/vectorClusterStyleItem.js.map +1 -1
- package/dist/tests/unit/helpers/cesiumHelpers.d.ts +11 -1
- package/dist/tests/unit/helpers/cesiumHelpers.js +26 -3
- package/dist/tests/unit/helpers/cesiumHelpers.js.map +1 -1
- package/dist/tests/unit/helpers/panoramaHelpers.js +1 -1
- package/dist/tests/unit/helpers/panoramaHelpers.js.map +1 -1
- package/index.ts +30 -5
- package/package.json +3 -3
- package/src/category/category.ts +3 -4
- package/src/cesium/cesium.d.ts +12 -0
- package/src/cesium/cesium3DTileFeature.ts +23 -3
- package/src/cesium/cesium3DTilePointFeature.ts +3 -1
- package/src/classRegistry.ts +8 -3
- package/src/featureProvider/abstractAttributeProvider.ts +201 -0
- package/src/featureProvider/abstractFeatureProvider.ts +32 -51
- package/src/featureProvider/compositeFeatureProvider.ts +103 -0
- package/src/featureProvider/csvAttributeProvider.ts +186 -0
- package/src/featureProvider/featureProviderFactory.ts +31 -0
- package/src/featureProvider/i3sAttributeProvider.ts +60 -0
- package/src/featureProvider/jsonAttributeProvider.ts +109 -0
- package/src/featureProvider/tileProviderFeatureProvider.ts +13 -14
- package/src/featureProvider/urlIdAttributeProvider.ts +82 -0
- package/src/featureProvider/wmsFeatureProvider.ts +31 -10
- package/src/global.d.ts +2 -0
- package/src/interaction/coordinateAtPixel.ts +4 -6
- package/src/interaction/ensurePositionInteraction.ts +50 -0
- package/src/interaction/eventHandler.ts +12 -1
- package/src/interaction/featureAtPixelInteraction.ts +92 -32
- package/src/interaction/featureProviderInteraction.ts +59 -38
- package/src/interaction/panoramaImageSelection.ts +4 -2
- package/src/layer/cesium/cesiumTilesetCesiumImpl.ts +297 -197
- package/src/layer/cesium/i3sCesiumImpl.ts +141 -0
- package/src/layer/cesium/rasterLayerCesiumImpl.ts +3 -3
- package/src/layer/cesium/terrainCesiumImpl.ts +3 -3
- package/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.ts +4 -3
- package/src/layer/cesium/vectorContext.ts +1 -1
- package/src/layer/cesium/vectorRasterTileCesiumImpl.ts +7 -6
- package/src/layer/cesium/vectorTileImageryProvider.ts +2 -2
- package/src/layer/cesiumTilesetLayer.ts +60 -8
- package/src/layer/cogLayer.ts +5 -5
- package/src/layer/czmlLayer.ts +4 -4
- package/src/layer/featureLayer.ts +5 -16
- package/src/layer/featureStoreLayer.ts +11 -5
- package/src/layer/flatGeobufLayer.ts +12 -0
- package/src/layer/geojsonLayer.ts +5 -12
- package/src/layer/i3sLayer.ts +343 -0
- package/src/layer/layer.ts +178 -39
- package/src/layer/layerSymbols.ts +5 -0
- package/src/layer/openStreetMapLayer.ts +13 -6
- package/src/layer/panorama/vectorPanoramaImpl.ts +238 -0
- package/src/layer/panoramaDatasetLayer.ts +69 -23
- package/src/layer/pointCloudLayer.ts +5 -20
- package/src/layer/rasterLayer.ts +4 -4
- package/src/layer/singleImageLayer.ts +5 -3
- package/src/layer/terrainLayer.ts +9 -6
- package/src/layer/tileProvider/flatGeobufTileProvider.ts +9 -5
- package/src/layer/tileProvider/mvtTileProvider.ts +10 -5
- package/src/layer/tileProvider/staticFeatureTileProvider.ts +5 -3
- package/src/layer/tileProvider/staticGeojsonTileProvider.ts +11 -4
- package/src/layer/tileProvider/tileProvider.ts +18 -5
- package/src/layer/tileProvider/urlTemplateTileProvider.ts +7 -3
- package/src/layer/tmsLayer.ts +3 -10
- package/src/layer/vectorLayer.ts +29 -11
- package/src/layer/vectorProperties.ts +10 -1
- package/src/layer/vectorTileLayer.ts +141 -53
- package/src/layer/wfsLayer.ts +7 -4
- package/src/layer/wmsLayer.ts +80 -48
- package/src/layer/wmtsLayer.ts +3 -10
- package/src/map/baseCesiumMap.ts +600 -0
- package/src/map/cesiumMap.ts +99 -457
- package/src/map/obliqueMap.ts +16 -10
- package/src/map/openlayersMap.ts +5 -5
- package/src/map/panoramaMap.ts +74 -139
- package/src/map/vcsMap.ts +44 -4
- package/src/oblique/obliqueCollection.ts +5 -4
- package/src/ol/ol.d.ts +13 -2
- package/src/panorama/panoramaCameraController.ts +13 -1
- package/src/panorama/panoramaImage.ts +25 -8
- package/src/panorama/panoramaImageView.ts +29 -3
- package/src/panorama/panoramaTileMaterial.ts +20 -0
- package/src/panorama/panoramaTileMaterialFS.glsl +16 -1
- package/src/panorama/panoramaTilePrimitiveCollection.ts +34 -0
- package/src/style/declarativeStyleItem.ts +7 -9
- package/src/util/clipping/clippingPolygonObject.ts +5 -4
- package/src/util/displayQuality/displayQuality.ts +4 -4
- package/src/util/editor/createFeatureSession.ts +4 -1
- package/src/util/editor/editFeaturesSession.ts +14 -4
- package/src/util/editor/editGeometrySession.ts +3 -1
- package/src/util/editor/editorSessionHelpers.ts +5 -3
- package/src/util/editor/interactions/creationSnapping.ts +7 -1
- package/src/util/editor/interactions/ensureHandlerSelectionInteraction.ts +2 -2
- package/src/util/editor/interactions/layerSnapping.ts +7 -1
- package/src/util/editor/interactions/mapInteractionController.ts +12 -2
- package/src/util/editor/interactions/translationSnapping.ts +6 -4
- package/src/util/editor/selectFeaturesSession.ts +1 -1
- package/src/util/editor/transformation/create3DHandlers.ts +2 -2
- package/src/util/editor/transformation/transformationHandler.ts +5 -3
- package/src/util/editor/transformation/translateInteraction.ts +4 -4
- package/src/util/fetch.ts +7 -0
- package/src/util/flight/flightInstance.ts +6 -5
- package/src/util/mapCollection.ts +18 -0
- package/src/util/renderScreenshot.ts +4 -8
- package/src/util/viewpoint.ts +2 -2
- package/src/vcsApp.ts +7 -8
- package/src/vcsModuleHelpers.ts +62 -4
- package/src/vcsObject.ts +10 -1
- package/src/vectorCluster/vectorClusterGroup.ts +7 -4
- package/src/vectorCluster/vectorClusterStyleItem.ts +8 -4
- package/dist/src/map/cesiumMapHelpers.d.ts +0 -7
- package/dist/src/map/cesiumMapHelpers.js +0 -144
- package/dist/src/map/cesiumMapHelpers.js.map +0 -1
- package/src/map/cesiumMapHelpers.ts +0 -219
package/src/layer/vectorLayer.ts
CHANGED
|
@@ -45,6 +45,8 @@ import type { GeoJSONwriteOptions } from './geojsonHelpers.js';
|
|
|
45
45
|
import { vcsLayerName } from './layerSymbols.js';
|
|
46
46
|
import type CesiumTilesetCesiumImpl from './cesium/cesiumTilesetCesiumImpl.js';
|
|
47
47
|
import VcsEvent from '../vcsEvent.js';
|
|
48
|
+
import PanoramaMap from '../map/panoramaMap.js';
|
|
49
|
+
import VectorPanoramaImpl from './panorama/vectorPanoramaImpl.js';
|
|
48
50
|
|
|
49
51
|
export type VectorOptions = FeatureLayerOptions & {
|
|
50
52
|
/**
|
|
@@ -72,8 +74,13 @@ export type VectorImplementationOptions = FeatureLayerImplementationOptions & {
|
|
|
72
74
|
};
|
|
73
75
|
|
|
74
76
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
+
* the vector layer is the standard layer to display vector features on the map. mostly, a specialization
|
|
78
|
+
* is used to load data from a certain source, e.g. GeoJSONLayer, FlatGeobufLayer, etc. But it can also
|
|
79
|
+
* be used as a generic layer to add features to, mostly at runtime.
|
|
80
|
+
*
|
|
81
|
+
* This layer ignores the mapLayerTypes configuration by default, as it is mostly used to display user data.
|
|
82
|
+
* Be sure to configure this otherwise if needed and reset the default when extending this class to implement
|
|
83
|
+
* a layer for a specific data source.
|
|
77
84
|
*/
|
|
78
85
|
class VectorLayer
|
|
79
86
|
extends FeatureLayer<
|
|
@@ -81,6 +88,7 @@ class VectorLayer
|
|
|
81
88
|
| VectorOpenlayersImpl
|
|
82
89
|
| VectorCesiumImpl
|
|
83
90
|
| CesiumTilesetCesiumImpl
|
|
91
|
+
| VectorPanoramaImpl
|
|
84
92
|
>
|
|
85
93
|
implements SplitLayer
|
|
86
94
|
{
|
|
@@ -95,11 +103,11 @@ class VectorLayer
|
|
|
95
103
|
maxResolution: undefined,
|
|
96
104
|
minResolution: undefined,
|
|
97
105
|
dontUseTerrainForOblique: false,
|
|
98
|
-
zIndex: 50,
|
|
99
106
|
highlightStyle: undefined,
|
|
100
107
|
isDynamic: false,
|
|
101
|
-
vectorProperties:
|
|
108
|
+
vectorProperties: undefined, // XXX or should we return VectorProperties default options?
|
|
102
109
|
vectorClusterGroup: undefined,
|
|
110
|
+
ignoreMapLayerTypes: true,
|
|
103
111
|
};
|
|
104
112
|
}
|
|
105
113
|
|
|
@@ -107,6 +115,7 @@ class VectorLayer
|
|
|
107
115
|
CesiumMap.className,
|
|
108
116
|
ObliqueMap.className,
|
|
109
117
|
OpenlayersMap.className,
|
|
118
|
+
PanoramaMap.className,
|
|
110
119
|
];
|
|
111
120
|
|
|
112
121
|
source: VectorSource = new VectorSource({});
|
|
@@ -148,9 +157,9 @@ class VectorLayer
|
|
|
148
157
|
}>();
|
|
149
158
|
|
|
150
159
|
constructor(options: VectorOptions) {
|
|
151
|
-
super(options);
|
|
152
|
-
|
|
153
160
|
const defaultOptions = VectorLayer.getDefaultOptions();
|
|
161
|
+
super({ ...defaultOptions, ...options });
|
|
162
|
+
|
|
154
163
|
this.projection = new Projection(options.projection);
|
|
155
164
|
this.maxResolution =
|
|
156
165
|
options.maxResolution != null
|
|
@@ -291,6 +300,7 @@ class VectorLayer
|
|
|
291
300
|
| VectorOpenlayersImpl
|
|
292
301
|
| VectorCesiumImpl
|
|
293
302
|
| CesiumTilesetCesiumImpl
|
|
303
|
+
| VectorPanoramaImpl
|
|
294
304
|
)[] {
|
|
295
305
|
if (!this.visibility || !!this.vectorClusterGroup) {
|
|
296
306
|
return [];
|
|
@@ -308,6 +318,10 @@ class VectorLayer
|
|
|
308
318
|
return [new VectorObliqueImpl(map, this.getImplementationOptions())];
|
|
309
319
|
}
|
|
310
320
|
|
|
321
|
+
if (map instanceof PanoramaMap) {
|
|
322
|
+
return [new VectorPanoramaImpl(map, this.getImplementationOptions())];
|
|
323
|
+
}
|
|
324
|
+
|
|
311
325
|
return [];
|
|
312
326
|
}
|
|
313
327
|
|
|
@@ -499,11 +513,13 @@ class VectorLayer
|
|
|
499
513
|
return null;
|
|
500
514
|
}
|
|
501
515
|
|
|
502
|
-
toJSON(): VectorOptions {
|
|
503
|
-
const config: VectorOptions = super.toJSON();
|
|
504
|
-
|
|
516
|
+
toJSON(defaultOptions = VectorLayer.getDefaultOptions()): VectorOptions {
|
|
517
|
+
const config: VectorOptions = super.toJSON(defaultOptions);
|
|
518
|
+
|
|
519
|
+
const defaultProjection =
|
|
520
|
+
defaultOptions.projection ?? getDefaultProjection();
|
|
505
521
|
|
|
506
|
-
if (this.projection.epsg !==
|
|
522
|
+
if (this.projection.epsg !== defaultProjection.epsg) {
|
|
507
523
|
config.projection = this.projection.toJSON();
|
|
508
524
|
}
|
|
509
525
|
|
|
@@ -529,7 +545,9 @@ class VectorLayer
|
|
|
529
545
|
config.isDynamic = this.isDynamic;
|
|
530
546
|
}
|
|
531
547
|
|
|
532
|
-
const vectorPropertiesConfig = this.vectorProperties.getVcsMeta(
|
|
548
|
+
const vectorPropertiesConfig = this.vectorProperties.getVcsMeta(
|
|
549
|
+
defaultOptions.vectorProperties,
|
|
550
|
+
);
|
|
533
551
|
if (Object.keys(vectorPropertiesConfig).length > 0) {
|
|
534
552
|
config.vectorProperties = vectorPropertiesConfig;
|
|
535
553
|
}
|
|
@@ -347,8 +347,8 @@ class VectorProperties {
|
|
|
347
347
|
modelRoll: 0,
|
|
348
348
|
modelOptions: undefined,
|
|
349
349
|
modelAutoScale: false,
|
|
350
|
-
baseUrl: undefined,
|
|
351
350
|
primitiveOptions: undefined,
|
|
351
|
+
baseUrl: undefined,
|
|
352
352
|
};
|
|
353
353
|
}
|
|
354
354
|
|
|
@@ -1683,6 +1683,15 @@ class VectorProperties {
|
|
|
1683
1683
|
if (this.baseUrl !== defaultValues.baseUrl) {
|
|
1684
1684
|
vcsMeta.baseUrl = this.baseUrl;
|
|
1685
1685
|
}
|
|
1686
|
+
if (!deepEqual(this.modelOptions, defaultOptions?.modelOptions)) {
|
|
1687
|
+
vcsMeta.modelOptions = this.modelOptions;
|
|
1688
|
+
}
|
|
1689
|
+
if (this.modelAutoScale !== defaultValues.modelAutoScale) {
|
|
1690
|
+
vcsMeta.modelAutoScale = this.modelAutoScale;
|
|
1691
|
+
}
|
|
1692
|
+
if (!deepEqual(this.primitiveOptions, defaultOptions?.primitiveOptions)) {
|
|
1693
|
+
vcsMeta.primitiveOptions = this.primitiveOptions;
|
|
1694
|
+
}
|
|
1686
1695
|
return vcsMeta;
|
|
1687
1696
|
}
|
|
1688
1697
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { check, is, maybe, oneOf } from '@vcsuite/check';
|
|
1
2
|
import Style, { type StyleFunction } from 'ol/style/Style.js';
|
|
2
3
|
import type { Feature } from 'ol/index.js';
|
|
3
4
|
import type { Size } from 'ol/size.js';
|
|
@@ -53,6 +54,14 @@ import VectorTileCesiumImpl from './cesium/vectorTileCesiumImpl.js';
|
|
|
53
54
|
import VectorTilePanoramaImpl from './panorama/vectorTilePanoramaImpl.js';
|
|
54
55
|
import PanoramaMap from '../map/panoramaMap.js';
|
|
55
56
|
import type LayerImplementation from './layerImplementation.js';
|
|
57
|
+
import AbstractFeatureProvider from '../featureProvider/abstractFeatureProvider.js';
|
|
58
|
+
import AbstractAttributeProvider, {
|
|
59
|
+
type AbstractAttributeProviderOptions,
|
|
60
|
+
type AttributeProvider,
|
|
61
|
+
} from '../featureProvider/abstractAttributeProvider.js';
|
|
62
|
+
import CompositeFeatureProvider from '../featureProvider/compositeFeatureProvider.js';
|
|
63
|
+
import { rectangleToMercatorExtent } from '../util/math.js';
|
|
64
|
+
import { getProviderForOption } from '../featureProvider/featureProviderFactory.js';
|
|
56
65
|
|
|
57
66
|
/**
|
|
58
67
|
* synchronizes featureVisibility Symbols on the feature;
|
|
@@ -113,14 +122,18 @@ export type VectorTileOptions = FeatureLayerOptions & {
|
|
|
113
122
|
declutter?: boolean;
|
|
114
123
|
debug?: boolean;
|
|
115
124
|
renderer?: VectorTileRenderer;
|
|
125
|
+
/**
|
|
126
|
+
* an optional attribute provider to provide custom attributes for the tileset features on load
|
|
127
|
+
*/
|
|
128
|
+
attributeProvider?: AttributeProvider | AbstractAttributeProviderOptions;
|
|
116
129
|
};
|
|
117
130
|
|
|
118
131
|
export type VectorTileImplementationOptions =
|
|
119
132
|
FeatureLayerImplementationOptions & {
|
|
120
133
|
tileProvider: TileProvider;
|
|
121
134
|
tileSize: Size;
|
|
122
|
-
minLevel
|
|
123
|
-
maxLevel
|
|
135
|
+
minLevel?: number;
|
|
136
|
+
maxLevel?: number;
|
|
124
137
|
extent?: Extent;
|
|
125
138
|
declutter: boolean;
|
|
126
139
|
vectorProperties: VectorProperties;
|
|
@@ -163,6 +176,7 @@ class VectorTileLayer<
|
|
|
163
176
|
declutter: true,
|
|
164
177
|
debug: false,
|
|
165
178
|
renderer: 'image',
|
|
179
|
+
attributeProvider: undefined,
|
|
166
180
|
};
|
|
167
181
|
}
|
|
168
182
|
|
|
@@ -177,9 +191,11 @@ class VectorTileLayer<
|
|
|
177
191
|
|
|
178
192
|
tileProvider: TileProvider;
|
|
179
193
|
|
|
180
|
-
private
|
|
194
|
+
private _attributeProvider?: AttributeProvider;
|
|
195
|
+
|
|
196
|
+
private _maxLevel?: number;
|
|
181
197
|
|
|
182
|
-
private _minLevel
|
|
198
|
+
private _minLevel?: number;
|
|
183
199
|
|
|
184
200
|
private _declutter: boolean;
|
|
185
201
|
|
|
@@ -200,16 +216,19 @@ class VectorTileLayer<
|
|
|
200
216
|
|
|
201
217
|
private _renderer: VectorTileRenderer;
|
|
202
218
|
|
|
219
|
+
private _defaultFeatureProvider?:
|
|
220
|
+
| TileProviderFeatureProvider
|
|
221
|
+
| CompositeFeatureProvider;
|
|
222
|
+
|
|
203
223
|
/**
|
|
204
224
|
* @param options
|
|
205
225
|
*/
|
|
206
226
|
constructor(options: VectorTileOptions) {
|
|
207
|
-
|
|
227
|
+
const defaultOptions = VectorTileLayer.getDefaultOptions();
|
|
228
|
+
super({ ...defaultOptions, ...options });
|
|
208
229
|
|
|
209
230
|
this._supportedMaps = [CesiumMap.className, OpenlayersMap.className];
|
|
210
231
|
|
|
211
|
-
const defaultOptions = VectorTileLayer.getDefaultOptions();
|
|
212
|
-
|
|
213
232
|
this.highlightStyle = undefined;
|
|
214
233
|
if (options.highlightStyle) {
|
|
215
234
|
this.highlightStyle =
|
|
@@ -230,6 +249,7 @@ class VectorTileLayer<
|
|
|
230
249
|
tileProviderClassRegistry,
|
|
231
250
|
options.tileProvider ?? { type: TileProvider.className },
|
|
232
251
|
) as TileProvider);
|
|
252
|
+
|
|
233
253
|
if (this.tileProvider) {
|
|
234
254
|
this.tileProvider.locale = this.locale;
|
|
235
255
|
}
|
|
@@ -243,6 +263,17 @@ class VectorTileLayer<
|
|
|
243
263
|
vectorTileRenderers,
|
|
244
264
|
defaultOptions.renderer,
|
|
245
265
|
);
|
|
266
|
+
|
|
267
|
+
const attributeProvider = getProviderForOption(options.attributeProvider);
|
|
268
|
+
|
|
269
|
+
if (
|
|
270
|
+
is(
|
|
271
|
+
attributeProvider,
|
|
272
|
+
oneOf(CompositeFeatureProvider, AbstractAttributeProvider),
|
|
273
|
+
)
|
|
274
|
+
) {
|
|
275
|
+
this._attributeProvider = attributeProvider;
|
|
276
|
+
}
|
|
246
277
|
}
|
|
247
278
|
|
|
248
279
|
/**
|
|
@@ -268,6 +299,26 @@ class VectorTileLayer<
|
|
|
268
299
|
this.vectorProperties.allowPicking = allowPicking;
|
|
269
300
|
}
|
|
270
301
|
|
|
302
|
+
get attributeProvider(): AttributeProvider | undefined {
|
|
303
|
+
return this._attributeProvider;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
set attributeProvider(provider: AttributeProvider | undefined) {
|
|
307
|
+
check(
|
|
308
|
+
provider,
|
|
309
|
+
maybe(oneOf(AbstractAttributeProvider, CompositeFeatureProvider)),
|
|
310
|
+
);
|
|
311
|
+
|
|
312
|
+
if (this._attributeProvider !== provider) {
|
|
313
|
+
this._attributeProvider = provider;
|
|
314
|
+
this.forceRedraw().catch((e: unknown) => {
|
|
315
|
+
this.getLogger().error(
|
|
316
|
+
`Error forcing redraw after setting attribute provider: ${String(e)}`,
|
|
317
|
+
);
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
271
322
|
async initialize(): Promise<void> {
|
|
272
323
|
if (!this.initialized) {
|
|
273
324
|
this._tileLoadEventListener =
|
|
@@ -280,14 +331,26 @@ class VectorTileLayer<
|
|
|
280
331
|
void this.reload();
|
|
281
332
|
});
|
|
282
333
|
|
|
283
|
-
if (
|
|
284
|
-
|
|
285
|
-
this.featureProvider
|
|
286
|
-
|
|
334
|
+
if (
|
|
335
|
+
this._renderer === 'image' &&
|
|
336
|
+
!(this.featureProvider instanceof AbstractFeatureProvider)
|
|
337
|
+
) {
|
|
338
|
+
const defaultFeatureProvider = new TileProviderFeatureProvider({
|
|
287
339
|
style: this.style,
|
|
288
340
|
tileProvider: this.tileProvider,
|
|
289
341
|
vectorProperties: this.vectorProperties,
|
|
290
342
|
});
|
|
343
|
+
|
|
344
|
+
if (this.featureProvider instanceof AbstractAttributeProvider) {
|
|
345
|
+
const attributeProvider = this.featureProvider;
|
|
346
|
+
this._defaultFeatureProvider = new CompositeFeatureProvider({
|
|
347
|
+
featureProviders: [defaultFeatureProvider],
|
|
348
|
+
attributeProviders: [attributeProvider],
|
|
349
|
+
});
|
|
350
|
+
} else {
|
|
351
|
+
this._defaultFeatureProvider = defaultFeatureProvider;
|
|
352
|
+
}
|
|
353
|
+
this.featureProvider = this._defaultFeatureProvider;
|
|
291
354
|
}
|
|
292
355
|
}
|
|
293
356
|
await super.initialize();
|
|
@@ -298,27 +361,40 @@ class VectorTileLayer<
|
|
|
298
361
|
return this._styleZIndex;
|
|
299
362
|
}
|
|
300
363
|
|
|
301
|
-
private _handleTileLoaded({ rtree }: TileLoadedEvent): void {
|
|
302
|
-
rtree
|
|
303
|
-
.
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
364
|
+
private _handleTileLoaded({ rtree, tileId }: TileLoadedEvent): void {
|
|
365
|
+
const features = rtree.all().map((item) => {
|
|
366
|
+
const feature = item.value;
|
|
367
|
+
const featureStyle = feature.getStyle();
|
|
368
|
+
if (featureStyle && featureStyle instanceof Style) {
|
|
369
|
+
featureStyle.setZIndex(this._getNextStyleZIndex());
|
|
370
|
+
}
|
|
371
|
+
feature[vcsLayerName] = this.name;
|
|
372
|
+
feature.getStyleFunction = (): StyleFunction => {
|
|
373
|
+
return this._featureStyle.bind(this) as StyleFunction;
|
|
374
|
+
};
|
|
375
|
+
if (this.tileProvider.trackFeaturesToTiles && this.globalHider) {
|
|
376
|
+
synchronizeFeatureVisibility(
|
|
377
|
+
this.featureVisibility,
|
|
378
|
+
this.globalHider,
|
|
379
|
+
feature,
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
return feature;
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
if (this._attributeProvider) {
|
|
386
|
+
const { x, y, level } = this.tileProvider.parseCacheKey(tileId);
|
|
387
|
+
const rectangle = this.tileProvider.tilingScheme.tileXYToRectangle(
|
|
388
|
+
x,
|
|
389
|
+
y,
|
|
390
|
+
level,
|
|
391
|
+
);
|
|
392
|
+
this._attributeProvider
|
|
393
|
+
.augmentFeatures(features, rectangleToMercatorExtent(rectangle))
|
|
394
|
+
.catch((error: unknown) => {
|
|
395
|
+
this.getLogger().error(`Error augmenting features: ${String(error)}`);
|
|
396
|
+
});
|
|
397
|
+
}
|
|
322
398
|
}
|
|
323
399
|
|
|
324
400
|
setGlobalHider(globalHider: GlobalHider): void {
|
|
@@ -517,27 +593,10 @@ class VectorTileLayer<
|
|
|
517
593
|
});
|
|
518
594
|
}
|
|
519
595
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
super.destroy();
|
|
525
|
-
this._tileLoadEventListener();
|
|
526
|
-
if (this.featureProvider) {
|
|
527
|
-
this.featureProvider.destroy();
|
|
528
|
-
}
|
|
529
|
-
if (this.tileProvider) {
|
|
530
|
-
this.tileProvider.destroy();
|
|
531
|
-
}
|
|
532
|
-
this._vectorPropertiesChangedListener();
|
|
533
|
-
if (this.vectorProperties) {
|
|
534
|
-
this.vectorProperties.destroy();
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
toJSON(): VectorTileOptions {
|
|
539
|
-
const config: VectorTileOptions = super.toJSON();
|
|
540
|
-
const defaultOptions = VectorTileLayer.getDefaultOptions();
|
|
596
|
+
toJSON(
|
|
597
|
+
defaultOptions = VectorTileLayer.getDefaultOptions(),
|
|
598
|
+
): VectorTileOptions {
|
|
599
|
+
const config: VectorTileOptions = super.toJSON(defaultOptions);
|
|
541
600
|
|
|
542
601
|
if (this._maxLevel !== defaultOptions.maxLevel) {
|
|
543
602
|
config.maxLevel = this._maxLevel;
|
|
@@ -572,8 +631,37 @@ class VectorTileLayer<
|
|
|
572
631
|
config.debug = this._debug;
|
|
573
632
|
}
|
|
574
633
|
|
|
634
|
+
if (this.featureProvider === this._defaultFeatureProvider) {
|
|
635
|
+
delete config.featureProvider;
|
|
636
|
+
if (this.featureProvider instanceof CompositeFeatureProvider) {
|
|
637
|
+
const { attributeProviders } = this.featureProvider.toJSON();
|
|
638
|
+
config.featureProvider = attributeProviders[0];
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
if (this._attributeProvider) {
|
|
643
|
+
config.attributeProvider = this._attributeProvider.toJSON();
|
|
644
|
+
}
|
|
645
|
+
|
|
575
646
|
return config;
|
|
576
647
|
}
|
|
648
|
+
|
|
649
|
+
destroy(): void {
|
|
650
|
+
this._featureVisibilityListeners.forEach((cb) => {
|
|
651
|
+
cb();
|
|
652
|
+
});
|
|
653
|
+
this.attributeProvider?.destroy();
|
|
654
|
+
this._defaultFeatureProvider?.destroy();
|
|
655
|
+
super.destroy();
|
|
656
|
+
this._tileLoadEventListener();
|
|
657
|
+
if (this.tileProvider) {
|
|
658
|
+
this.tileProvider.destroy();
|
|
659
|
+
}
|
|
660
|
+
this._vectorPropertiesChangedListener();
|
|
661
|
+
if (this.vectorProperties) {
|
|
662
|
+
this.vectorProperties.destroy();
|
|
663
|
+
}
|
|
664
|
+
}
|
|
577
665
|
}
|
|
578
666
|
|
|
579
667
|
layerClassRegistry.registerClass(VectorTileLayer.className, VectorTileLayer);
|
package/src/layer/wfsLayer.ts
CHANGED
|
@@ -56,6 +56,7 @@ class WFSLayer extends VectorLayer {
|
|
|
56
56
|
featurePrefix: '',
|
|
57
57
|
getFeatureOptions: {},
|
|
58
58
|
version: undefined,
|
|
59
|
+
ignoreMapLayerTypes: false,
|
|
59
60
|
};
|
|
60
61
|
}
|
|
61
62
|
|
|
@@ -66,7 +67,8 @@ class WFSLayer extends VectorLayer {
|
|
|
66
67
|
(proj.epsg as string).match(/\d+/)?.[0] as string
|
|
67
68
|
}`,
|
|
68
69
|
];
|
|
69
|
-
|
|
70
|
+
const defaultOptions = WFSLayer.getDefaultOptions();
|
|
71
|
+
super({ ...defaultOptions, ...options, projection: proj });
|
|
70
72
|
|
|
71
73
|
this.featureType = Array.isArray(options.featureType)
|
|
72
74
|
? options.featureType
|
|
@@ -157,15 +159,16 @@ class WFSLayer extends VectorLayer {
|
|
|
157
159
|
this.addFeatures(features);
|
|
158
160
|
}
|
|
159
161
|
|
|
160
|
-
toJSON(): WFSOptions {
|
|
161
|
-
const config: Partial<WFSOptions> = super.toJSON();
|
|
162
|
-
const defaultOptions = WFSLayer.getDefaultOptions();
|
|
162
|
+
toJSON(defaultOptions = WFSLayer.getDefaultOptions()): WFSOptions {
|
|
163
|
+
const config: Partial<WFSOptions> = super.toJSON(defaultOptions);
|
|
163
164
|
config.featureType = this.featureType.slice();
|
|
164
165
|
config.featureNS = this.featureNS;
|
|
165
166
|
config.featurePrefix = this.featurePrefix;
|
|
167
|
+
|
|
166
168
|
if (Object.keys(this.getFeaturesOptions).length > 0) {
|
|
167
169
|
config.getFeatureOptions = this.getFeaturesOptions;
|
|
168
170
|
}
|
|
171
|
+
|
|
169
172
|
if (this.version !== defaultOptions.version) {
|
|
170
173
|
config.version = this.version;
|
|
171
174
|
}
|
package/src/layer/wmsLayer.ts
CHANGED
|
@@ -16,6 +16,10 @@ import WmsOpenlayersImpl from './openlayers/wmsOpenlayersImpl.js';
|
|
|
16
16
|
import Extent from '../util/extent.js';
|
|
17
17
|
import { layerClassRegistry } from '../classRegistry.js';
|
|
18
18
|
import type VcsMap from '../map/vcsMap.js';
|
|
19
|
+
import AbstractAttributeProvider from '../featureProvider/abstractAttributeProvider.js';
|
|
20
|
+
import CompositeFeatureProvider, {
|
|
21
|
+
type CompositeFeatureProviderOptions,
|
|
22
|
+
} from '../featureProvider/compositeFeatureProvider.js';
|
|
19
23
|
|
|
20
24
|
export type WMSImplementationOptions = RasterLayerImplementationOptions & {
|
|
21
25
|
parameters: Record<string, string>;
|
|
@@ -39,9 +43,10 @@ export type WMSOptions = RasterLayerOptions & {
|
|
|
39
43
|
* key value pair of additional WMS parameters, url query notation possible
|
|
40
44
|
*/
|
|
41
45
|
parameters?: Record<string, string> | string;
|
|
42
|
-
|
|
43
46
|
/**
|
|
44
47
|
* whether this layer should send getFeatureInfo requests to the service when objects are clicked.
|
|
48
|
+
* do not provide this option AND a feature provider. this option will configure a
|
|
49
|
+
* layer specific WMSFeatureProvider. providing an attribute provider will create a composite feature provider.
|
|
45
50
|
*/
|
|
46
51
|
featureInfo?: Partial<WMSFeatureProviderOptions>;
|
|
47
52
|
/**
|
|
@@ -92,12 +97,14 @@ class WMSLayer extends RasterLayer<WmsCesiumImpl | WmsOpenlayersImpl> {
|
|
|
92
97
|
|
|
93
98
|
private _featureInfoOptions: Partial<WMSFeatureProviderOptions> | undefined;
|
|
94
99
|
|
|
100
|
+
private _attributeProvider?: AbstractAttributeProvider;
|
|
101
|
+
|
|
95
102
|
/**
|
|
96
103
|
* @param options
|
|
97
104
|
*/
|
|
98
105
|
constructor(options: WMSOptions) {
|
|
99
|
-
super(options);
|
|
100
106
|
const defaultOptions = WMSLayer.getDefaultOptions();
|
|
107
|
+
super({ ...defaultOptions, ...options });
|
|
101
108
|
|
|
102
109
|
this.version = options.version || (defaultOptions.version as string);
|
|
103
110
|
|
|
@@ -140,6 +147,10 @@ class WMSLayer extends RasterLayer<WmsCesiumImpl | WmsOpenlayersImpl> {
|
|
|
140
147
|
options.singleImage2d,
|
|
141
148
|
defaultOptions.singleImage2d,
|
|
142
149
|
);
|
|
150
|
+
|
|
151
|
+
if (this.featureProvider instanceof AbstractAttributeProvider) {
|
|
152
|
+
this._attributeProvider = this.featureProvider;
|
|
153
|
+
}
|
|
143
154
|
}
|
|
144
155
|
|
|
145
156
|
initialize(): Promise<void> {
|
|
@@ -163,9 +174,19 @@ class WMSLayer extends RasterLayer<WmsCesiumImpl | WmsOpenlayersImpl> {
|
|
|
163
174
|
extent: this.extent,
|
|
164
175
|
parameters: this.parameters,
|
|
165
176
|
version: this.version,
|
|
177
|
+
headers: this.headers,
|
|
166
178
|
...this._featureInfoOptions,
|
|
167
179
|
};
|
|
168
|
-
|
|
180
|
+
|
|
181
|
+
const wmsFeatureProvider = new WMSFeatureProvider(options);
|
|
182
|
+
if (this._attributeProvider) {
|
|
183
|
+
this.featureProvider = new CompositeFeatureProvider({
|
|
184
|
+
featureProviders: [wmsFeatureProvider],
|
|
185
|
+
attributeProviders: [this._attributeProvider],
|
|
186
|
+
});
|
|
187
|
+
} else {
|
|
188
|
+
this.featureProvider = wmsFeatureProvider;
|
|
189
|
+
}
|
|
169
190
|
}
|
|
170
191
|
}
|
|
171
192
|
|
|
@@ -217,9 +238,8 @@ class WMSLayer extends RasterLayer<WmsCesiumImpl | WmsOpenlayersImpl> {
|
|
|
217
238
|
return this.parameters.LAYERS ? this.parameters.LAYERS.split(',') : [];
|
|
218
239
|
}
|
|
219
240
|
|
|
220
|
-
toJSON(): WMSOptions {
|
|
221
|
-
const config: WMSOptions = super.toJSON();
|
|
222
|
-
const defaultOptions = WMSLayer.getDefaultOptions();
|
|
241
|
+
toJSON(defaultOptions = WMSLayer.getDefaultOptions()): WMSOptions {
|
|
242
|
+
const config: WMSOptions = super.toJSON(defaultOptions);
|
|
223
243
|
|
|
224
244
|
if (this.parameters.LAYERS) {
|
|
225
245
|
config.layers = this.parameters.LAYERS;
|
|
@@ -261,49 +281,61 @@ class WMSLayer extends RasterLayer<WmsCesiumImpl | WmsOpenlayersImpl> {
|
|
|
261
281
|
config.singleImage2d = this.singleImage2d;
|
|
262
282
|
}
|
|
263
283
|
|
|
264
|
-
if (
|
|
265
|
-
|
|
266
|
-
this.featureProvider
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
)
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
284
|
+
if (this._featureInfoOptions) {
|
|
285
|
+
delete config.featureProvider;
|
|
286
|
+
if (this.featureProvider) {
|
|
287
|
+
let featureInfoConfig: Partial<WMSFeatureProviderOptions>;
|
|
288
|
+
if (this._attributeProvider) {
|
|
289
|
+
const compositeInfo =
|
|
290
|
+
this.featureProvider.toJSON() as CompositeFeatureProviderOptions;
|
|
291
|
+
featureInfoConfig = compositeInfo.featureProviders[0];
|
|
292
|
+
config.featureProvider = this._attributeProvider.toJSON();
|
|
293
|
+
} else {
|
|
294
|
+
featureInfoConfig = this.featureProvider.toJSON();
|
|
295
|
+
}
|
|
296
|
+
if (
|
|
297
|
+
this.tileSize[0] === featureInfoConfig?.tileSize?.[0] ||
|
|
298
|
+
this.tileSize[1] === featureInfoConfig?.tileSize?.[1]
|
|
299
|
+
) {
|
|
300
|
+
delete featureInfoConfig.tileSize;
|
|
301
|
+
}
|
|
302
|
+
if (
|
|
303
|
+
Object.entries(this.parameters).every(
|
|
304
|
+
([key, value]) => featureInfoConfig?.parameters?.[key] === value,
|
|
305
|
+
)
|
|
306
|
+
) {
|
|
307
|
+
delete featureInfoConfig.parameters;
|
|
308
|
+
}
|
|
309
|
+
if (
|
|
310
|
+
featureInfoConfig.extent &&
|
|
311
|
+
new Extent(featureInfoConfig.extent).equals(this.extent)
|
|
312
|
+
) {
|
|
313
|
+
delete featureInfoConfig.extent;
|
|
314
|
+
}
|
|
315
|
+
if (this.url === featureInfoConfig.url) {
|
|
316
|
+
delete featureInfoConfig.url;
|
|
317
|
+
}
|
|
318
|
+
if (this.tilingSchema === featureInfoConfig.tilingSchema) {
|
|
319
|
+
delete featureInfoConfig.tilingSchema;
|
|
320
|
+
}
|
|
321
|
+
if (this.version === featureInfoConfig.version) {
|
|
322
|
+
delete featureInfoConfig.version;
|
|
323
|
+
}
|
|
324
|
+
if (this.minLevel === featureInfoConfig.minLevel) {
|
|
325
|
+
delete featureInfoConfig.minLevel;
|
|
326
|
+
}
|
|
327
|
+
if (this.maxLevel === featureInfoConfig.maxLevel) {
|
|
328
|
+
delete featureInfoConfig.maxLevel;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if (this._featureInfoOptions) {
|
|
332
|
+
delete featureInfoConfig.name;
|
|
333
|
+
delete featureInfoConfig.type;
|
|
334
|
+
}
|
|
335
|
+
config.featureInfo = featureInfoConfig;
|
|
336
|
+
} else {
|
|
337
|
+
config.featureInfo = this._featureInfoOptions;
|
|
303
338
|
}
|
|
304
|
-
config.featureInfo = featureInfoConfig;
|
|
305
|
-
} else if (this._featureInfoOptions) {
|
|
306
|
-
config.featureInfo = this._featureInfoOptions;
|
|
307
339
|
}
|
|
308
340
|
|
|
309
341
|
return config;
|
package/src/layer/wmtsLayer.ts
CHANGED
|
@@ -106,7 +106,7 @@ class WMTSLayer extends RasterLayer<WmtsCesiumImpl | WmtsOpenlayersImpl> {
|
|
|
106
106
|
|
|
107
107
|
constructor(options: WMTSOptions) {
|
|
108
108
|
const defaultOptions = WMTSLayer.getDefaultOptions();
|
|
109
|
-
super({
|
|
109
|
+
super({ ...defaultOptions, ...options });
|
|
110
110
|
|
|
111
111
|
this._supportedMaps = [OpenlayersMap.className, CesiumMap.className];
|
|
112
112
|
|
|
@@ -174,15 +174,8 @@ class WMTSLayer extends RasterLayer<WmtsCesiumImpl | WmtsOpenlayersImpl> {
|
|
|
174
174
|
return [];
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
toJSON(): WMTSOptions {
|
|
178
|
-
const config: Partial<WMTSOptions> = super.toJSON();
|
|
179
|
-
const defaultOptions = WMTSLayer.getDefaultOptions();
|
|
180
|
-
|
|
181
|
-
if (this.tilingSchema !== defaultOptions.tilingSchema) {
|
|
182
|
-
config.tilingSchema = this.tilingSchema;
|
|
183
|
-
} else {
|
|
184
|
-
delete config.tilingSchema;
|
|
185
|
-
}
|
|
177
|
+
toJSON(defaultOptions = WMTSLayer.getDefaultOptions()): WMTSOptions {
|
|
178
|
+
const config: Partial<WMTSOptions> = super.toJSON(defaultOptions);
|
|
186
179
|
|
|
187
180
|
if (
|
|
188
181
|
this.numberOfLevelZeroTilesX !== defaultOptions.numberOfLevelZeroTilesX
|