@itwin/core-frontend 3.1.0-dev.28 → 3.1.0-dev.29
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/lib/cjs/AccuSnap.js +2 -2
- package/lib/cjs/AccuSnap.js.map +1 -1
- package/lib/cjs/DisplayStyleState.d.ts +3 -3
- package/lib/cjs/DisplayStyleState.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleState.js +32 -8
- package/lib/cjs/DisplayStyleState.js.map +1 -1
- package/lib/cjs/IModelApp.js +2 -2
- package/lib/cjs/IModelApp.js.map +1 -1
- package/lib/cjs/ViewState.js +1 -1
- package/lib/cjs/ViewState.js.map +1 -1
- package/lib/cjs/render/GraphicBranch.d.ts +2 -0
- package/lib/cjs/render/GraphicBranch.d.ts.map +1 -1
- package/lib/cjs/render/GraphicBranch.js.map +1 -1
- package/lib/cjs/render/RenderPlanarClassifier.d.ts +1 -1
- package/lib/cjs/render/RenderPlanarClassifier.d.ts.map +1 -1
- package/lib/cjs/render/RenderPlanarClassifier.js.map +1 -1
- package/lib/cjs/render/RenderSystem.d.ts +9 -5
- package/lib/cjs/render/RenderSystem.d.ts.map +1 -1
- package/lib/cjs/render/RenderSystem.js +5 -2
- package/lib/cjs/render/RenderSystem.js.map +1 -1
- package/lib/cjs/render/RenderTarget.d.ts +4 -4
- package/lib/cjs/render/RenderTarget.d.ts.map +1 -1
- package/lib/cjs/render/RenderTarget.js.map +1 -1
- package/lib/cjs/render/Scene.d.ts.map +1 -1
- package/lib/cjs/render/Scene.js.map +1 -1
- package/lib/cjs/render/primitives/mesh/RealityMeshPrimitive.d.ts +15 -2
- package/lib/cjs/render/primitives/mesh/RealityMeshPrimitive.d.ts.map +1 -1
- package/lib/cjs/render/primitives/mesh/RealityMeshPrimitive.js.map +1 -1
- package/lib/cjs/render/webgl/BackgroundMapDrape.js +1 -1
- package/lib/cjs/render/webgl/BackgroundMapDrape.js.map +1 -1
- package/lib/cjs/render/webgl/BranchState.d.ts +2 -0
- package/lib/cjs/render/webgl/BranchState.d.ts.map +1 -1
- package/lib/cjs/render/webgl/BranchState.js +5 -3
- package/lib/cjs/render/webgl/BranchState.js.map +1 -1
- package/lib/cjs/render/webgl/Graphic.d.ts +5 -3
- package/lib/cjs/render/webgl/Graphic.d.ts.map +1 -1
- package/lib/cjs/render/webgl/Graphic.js +7 -2
- package/lib/cjs/render/webgl/Graphic.js.map +1 -1
- package/lib/cjs/render/webgl/PlanarClassifier.d.ts +4 -1
- package/lib/cjs/render/webgl/PlanarClassifier.d.ts.map +1 -1
- package/lib/cjs/render/webgl/PlanarClassifier.js +22 -9
- package/lib/cjs/render/webgl/PlanarClassifier.js.map +1 -1
- package/lib/cjs/render/webgl/PlanarTextureProjection.d.ts +2 -2
- package/lib/cjs/render/webgl/PlanarTextureProjection.d.ts.map +1 -1
- package/lib/cjs/render/webgl/PlanarTextureProjection.js +5 -3
- package/lib/cjs/render/webgl/PlanarTextureProjection.js.map +1 -1
- package/lib/cjs/render/webgl/RealityMesh.d.ts +30 -11
- package/lib/cjs/render/webgl/RealityMesh.d.ts.map +1 -1
- package/lib/cjs/render/webgl/RealityMesh.js +154 -52
- package/lib/cjs/render/webgl/RealityMesh.js.map +1 -1
- package/lib/cjs/render/webgl/RenderCommands.d.ts.map +1 -1
- package/lib/cjs/render/webgl/RenderCommands.js +4 -0
- package/lib/cjs/render/webgl/RenderCommands.js.map +1 -1
- package/lib/cjs/render/webgl/System.d.ts +9 -9
- package/lib/cjs/render/webgl/System.d.ts.map +1 -1
- package/lib/cjs/render/webgl/System.js +5 -5
- package/lib/cjs/render/webgl/System.js.map +1 -1
- package/lib/cjs/render/webgl/Target.d.ts.map +1 -1
- package/lib/cjs/render/webgl/Target.js.map +1 -1
- package/lib/cjs/render/webgl/glsl/PlanarClassification.js +1 -1
- package/lib/cjs/render/webgl/glsl/PlanarClassification.js.map +1 -1
- package/lib/cjs/render/webgl/glsl/RealityMesh.d.ts.map +1 -1
- package/lib/cjs/render/webgl/glsl/RealityMesh.js +102 -27
- package/lib/cjs/render/webgl/glsl/RealityMesh.js.map +1 -1
- package/lib/cjs/tile/ClassifierTileTree.d.ts +4 -2
- package/lib/cjs/tile/ClassifierTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/ClassifierTileTree.js +31 -16
- package/lib/cjs/tile/ClassifierTileTree.js.map +1 -1
- package/lib/cjs/tile/PrimaryTileTree.d.ts +18 -2
- package/lib/cjs/tile/PrimaryTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/PrimaryTileTree.js +53 -2
- package/lib/cjs/tile/PrimaryTileTree.js.map +1 -1
- package/lib/cjs/tile/RealityModelTileTree.d.ts +0 -1
- package/lib/cjs/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/RealityModelTileTree.js +1 -1
- package/lib/cjs/tile/RealityModelTileTree.js.map +1 -1
- package/lib/cjs/tile/RealityTileDrawArgs.d.ts +4 -1
- package/lib/cjs/tile/RealityTileDrawArgs.d.ts.map +1 -1
- package/lib/cjs/tile/RealityTileDrawArgs.js +3 -1
- package/lib/cjs/tile/RealityTileDrawArgs.js.map +1 -1
- package/lib/cjs/tile/RealityTileTree.d.ts +1 -0
- package/lib/cjs/tile/RealityTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/RealityTileTree.js +7 -3
- package/lib/cjs/tile/RealityTileTree.js.map +1 -1
- package/lib/cjs/tile/TileDrawArgs.d.ts +2 -0
- package/lib/cjs/tile/TileDrawArgs.d.ts.map +1 -1
- package/lib/cjs/tile/TileDrawArgs.js +5 -0
- package/lib/cjs/tile/TileDrawArgs.js.map +1 -1
- package/lib/cjs/tile/map/CesiumTerrainProvider.js +2 -2
- package/lib/cjs/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +2 -2
- package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
- package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts +2 -2
- package/lib/cjs/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/BingImageryProvider.d.ts +2 -2
- package/lib/cjs/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +2 -2
- package/lib/cjs/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/TileUrlImageryProvider.d.ts +2 -2
- package/lib/cjs/tile/map/ImageryProviders/TileUrlImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/TileUrlImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/WmsMapLayerImageryProvider.d.ts +2 -2
- package/lib/cjs/tile/map/ImageryProviders/WmsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js +1 -1
- package/lib/cjs/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts +2 -2
- package/lib/cjs/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.d.ts +0 -2
- package/lib/cjs/tile/map/ImageryTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.js +1 -3
- package/lib/cjs/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts +3 -3
- package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryFormats.d.ts +3 -3
- package/lib/cjs/tile/map/MapLayerImageryFormats.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryFormats.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +3 -3
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerSources.d.ts +2 -2
- package/lib/cjs/tile/map/MapLayerSources.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerSources.js +6 -4
- package/lib/cjs/tile/map/MapLayerSources.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerTileTreeReference.d.ts +10 -2
- package/lib/cjs/tile/map/MapLayerTileTreeReference.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerTileTreeReference.js +26 -3
- package/lib/cjs/tile/map/MapLayerTileTreeReference.js.map +1 -1
- package/lib/cjs/tile/map/MapTile.d.ts +5 -4
- package/lib/cjs/tile/map/MapTile.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapTile.js +13 -5
- package/lib/cjs/tile/map/MapTile.js.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.d.ts +12 -7
- package/lib/cjs/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.js +60 -48
- package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
- package/lib/cjs/tile/map/MapTiledGraphicsProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapTiledGraphicsProvider.js +1 -1
- package/lib/cjs/tile/map/MapTiledGraphicsProvider.js.map +1 -1
- package/lib/cjs/tools/ViewTool.js +1 -1
- package/lib/cjs/tools/ViewTool.js.map +1 -1
- package/lib/esm/AccuSnap.js +2 -2
- package/lib/esm/AccuSnap.js.map +1 -1
- package/lib/esm/DisplayStyleState.d.ts +3 -3
- package/lib/esm/DisplayStyleState.d.ts.map +1 -1
- package/lib/esm/DisplayStyleState.js +34 -10
- package/lib/esm/DisplayStyleState.js.map +1 -1
- package/lib/esm/IModelApp.js +2 -2
- package/lib/esm/IModelApp.js.map +1 -1
- package/lib/esm/ViewState.js +1 -1
- package/lib/esm/ViewState.js.map +1 -1
- package/lib/esm/render/GraphicBranch.d.ts +2 -0
- package/lib/esm/render/GraphicBranch.d.ts.map +1 -1
- package/lib/esm/render/GraphicBranch.js.map +1 -1
- package/lib/esm/render/RenderPlanarClassifier.d.ts +1 -1
- package/lib/esm/render/RenderPlanarClassifier.d.ts.map +1 -1
- package/lib/esm/render/RenderPlanarClassifier.js.map +1 -1
- package/lib/esm/render/RenderSystem.d.ts +9 -5
- package/lib/esm/render/RenderSystem.d.ts.map +1 -1
- package/lib/esm/render/RenderSystem.js +5 -2
- package/lib/esm/render/RenderSystem.js.map +1 -1
- package/lib/esm/render/RenderTarget.d.ts +4 -4
- package/lib/esm/render/RenderTarget.d.ts.map +1 -1
- package/lib/esm/render/RenderTarget.js.map +1 -1
- package/lib/esm/render/Scene.d.ts.map +1 -1
- package/lib/esm/render/Scene.js.map +1 -1
- package/lib/esm/render/primitives/mesh/RealityMeshPrimitive.d.ts +15 -2
- package/lib/esm/render/primitives/mesh/RealityMeshPrimitive.d.ts.map +1 -1
- package/lib/esm/render/primitives/mesh/RealityMeshPrimitive.js.map +1 -1
- package/lib/esm/render/webgl/BackgroundMapDrape.js +1 -1
- package/lib/esm/render/webgl/BackgroundMapDrape.js.map +1 -1
- package/lib/esm/render/webgl/BranchState.d.ts +2 -0
- package/lib/esm/render/webgl/BranchState.d.ts.map +1 -1
- package/lib/esm/render/webgl/BranchState.js +5 -3
- package/lib/esm/render/webgl/BranchState.js.map +1 -1
- package/lib/esm/render/webgl/Graphic.d.ts +5 -3
- package/lib/esm/render/webgl/Graphic.d.ts.map +1 -1
- package/lib/esm/render/webgl/Graphic.js +7 -2
- package/lib/esm/render/webgl/Graphic.js.map +1 -1
- package/lib/esm/render/webgl/PlanarClassifier.d.ts +4 -1
- package/lib/esm/render/webgl/PlanarClassifier.d.ts.map +1 -1
- package/lib/esm/render/webgl/PlanarClassifier.js +22 -9
- package/lib/esm/render/webgl/PlanarClassifier.js.map +1 -1
- package/lib/esm/render/webgl/PlanarTextureProjection.d.ts +2 -2
- package/lib/esm/render/webgl/PlanarTextureProjection.d.ts.map +1 -1
- package/lib/esm/render/webgl/PlanarTextureProjection.js +5 -3
- package/lib/esm/render/webgl/PlanarTextureProjection.js.map +1 -1
- package/lib/esm/render/webgl/RealityMesh.d.ts +30 -11
- package/lib/esm/render/webgl/RealityMesh.d.ts.map +1 -1
- package/lib/esm/render/webgl/RealityMesh.js +154 -52
- package/lib/esm/render/webgl/RealityMesh.js.map +1 -1
- package/lib/esm/render/webgl/RenderCommands.d.ts.map +1 -1
- package/lib/esm/render/webgl/RenderCommands.js +4 -0
- package/lib/esm/render/webgl/RenderCommands.js.map +1 -1
- package/lib/esm/render/webgl/System.d.ts +9 -9
- package/lib/esm/render/webgl/System.d.ts.map +1 -1
- package/lib/esm/render/webgl/System.js +6 -6
- package/lib/esm/render/webgl/System.js.map +1 -1
- package/lib/esm/render/webgl/Target.d.ts.map +1 -1
- package/lib/esm/render/webgl/Target.js.map +1 -1
- package/lib/esm/render/webgl/glsl/PlanarClassification.js +1 -1
- package/lib/esm/render/webgl/glsl/PlanarClassification.js.map +1 -1
- package/lib/esm/render/webgl/glsl/RealityMesh.d.ts.map +1 -1
- package/lib/esm/render/webgl/glsl/RealityMesh.js +103 -28
- package/lib/esm/render/webgl/glsl/RealityMesh.js.map +1 -1
- package/lib/esm/tile/ClassifierTileTree.d.ts +4 -2
- package/lib/esm/tile/ClassifierTileTree.d.ts.map +1 -1
- package/lib/esm/tile/ClassifierTileTree.js +32 -17
- package/lib/esm/tile/ClassifierTileTree.js.map +1 -1
- package/lib/esm/tile/PrimaryTileTree.d.ts +18 -2
- package/lib/esm/tile/PrimaryTileTree.d.ts.map +1 -1
- package/lib/esm/tile/PrimaryTileTree.js +51 -2
- package/lib/esm/tile/PrimaryTileTree.js.map +1 -1
- package/lib/esm/tile/RealityModelTileTree.d.ts +0 -1
- package/lib/esm/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/esm/tile/RealityModelTileTree.js +1 -1
- package/lib/esm/tile/RealityModelTileTree.js.map +1 -1
- package/lib/esm/tile/RealityTileDrawArgs.d.ts +4 -1
- package/lib/esm/tile/RealityTileDrawArgs.d.ts.map +1 -1
- package/lib/esm/tile/RealityTileDrawArgs.js +3 -1
- package/lib/esm/tile/RealityTileDrawArgs.js.map +1 -1
- package/lib/esm/tile/RealityTileTree.d.ts +1 -0
- package/lib/esm/tile/RealityTileTree.d.ts.map +1 -1
- package/lib/esm/tile/RealityTileTree.js +7 -3
- package/lib/esm/tile/RealityTileTree.js.map +1 -1
- package/lib/esm/tile/TileDrawArgs.d.ts +2 -0
- package/lib/esm/tile/TileDrawArgs.d.ts.map +1 -1
- package/lib/esm/tile/TileDrawArgs.js +5 -0
- package/lib/esm/tile/TileDrawArgs.js.map +1 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.js +2 -2
- package/lib/esm/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +2 -2
- package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
- package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts +2 -2
- package/lib/esm/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/BingImageryProvider.d.ts +2 -2
- package/lib/esm/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +2 -2
- package/lib/esm/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/TileUrlImageryProvider.d.ts +2 -2
- package/lib/esm/tile/map/ImageryProviders/TileUrlImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/TileUrlImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/WmsMapLayerImageryProvider.d.ts +2 -2
- package/lib/esm/tile/map/ImageryProviders/WmsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js +1 -1
- package/lib/esm/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts +2 -2
- package/lib/esm/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryTileTree.d.ts +0 -2
- package/lib/esm/tile/map/ImageryTileTree.d.ts.map +1 -1
- package/lib/esm/tile/map/ImageryTileTree.js +1 -3
- package/lib/esm/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts +3 -3
- package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryFormats.d.ts +3 -3
- package/lib/esm/tile/map/MapLayerImageryFormats.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryFormats.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +3 -3
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/MapLayerSources.d.ts +2 -2
- package/lib/esm/tile/map/MapLayerSources.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerSources.js +6 -4
- package/lib/esm/tile/map/MapLayerSources.js.map +1 -1
- package/lib/esm/tile/map/MapLayerTileTreeReference.d.ts +10 -2
- package/lib/esm/tile/map/MapLayerTileTreeReference.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerTileTreeReference.js +25 -3
- package/lib/esm/tile/map/MapLayerTileTreeReference.js.map +1 -1
- package/lib/esm/tile/map/MapTile.d.ts +5 -4
- package/lib/esm/tile/map/MapTile.d.ts.map +1 -1
- package/lib/esm/tile/map/MapTile.js +13 -5
- package/lib/esm/tile/map/MapTile.js.map +1 -1
- package/lib/esm/tile/map/MapTileTree.d.ts +12 -7
- package/lib/esm/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/esm/tile/map/MapTileTree.js +61 -49
- package/lib/esm/tile/map/MapTileTree.js.map +1 -1
- package/lib/esm/tile/map/MapTiledGraphicsProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/MapTiledGraphicsProvider.js +2 -2
- package/lib/esm/tile/map/MapTiledGraphicsProvider.js.map +1 -1
- package/lib/esm/tools/ViewTool.js +1 -1
- package/lib/esm/tools/ViewTool.js.map +1 -1
- package/package.json +20 -20
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module MapLayers
|
|
3
3
|
*/
|
|
4
|
-
import { DeprecatedBackgroundMapProps,
|
|
4
|
+
import { DeprecatedBackgroundMapProps, ImageMapLayerSettings, MapSubLayerProps } from "@itwin/core-common";
|
|
5
5
|
import { IModelConnection } from "../../IModelConnection";
|
|
6
6
|
import { MapLayerSourceValidation } from "../internal";
|
|
7
7
|
/** @internal */
|
|
@@ -55,7 +55,7 @@ export declare class MapLayerSource {
|
|
|
55
55
|
formatId: string;
|
|
56
56
|
transparentBackground: boolean | undefined;
|
|
57
57
|
};
|
|
58
|
-
toLayerSettings(subLayers?: MapSubLayerProps[]):
|
|
58
|
+
toLayerSettings(subLayers?: MapSubLayerProps[]): ImageMapLayerSettings | undefined;
|
|
59
59
|
private getCredentials;
|
|
60
60
|
}
|
|
61
61
|
/** A collection of [[MapLayerSource]] objects.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLayerSources.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerSources.ts"],"names":[],"mappings":"AAIA;;GAEG;
|
|
1
|
+
{"version":3,"file":"MapLayerSources.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerSources.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAC2D,4BAA4B,EAAE,qBAAqB,EAAE,gBAAgB,EACtI,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAsC,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE3F,gBAAgB;AAChB,oBAAY,oBAAoB;IAC9B,KAAK,IAAA;IACL,kBAAkB,IAAA;IAClB,aAAa,IAAA;IACb,eAAe,IAAA;IACf,UAAU,IAAA;IACV,WAAW,IAAA;CACZ;AAED;;GAEG;AACH,UAAU,mBAAmB;IAC3B,2D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,qBAA4B;IAChD,IAAW,KAAK,IAAI,cAAc,EAAE,CAInC;IAED,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAQpC,OAAO,CAAC,MAAM,CAAC,oBAAoB;WAQf,MAAM,CAAC,MAAM,CAAC,EAAE,gBAAgB,EAAE,qBAAqB,UAAQ,EAAE,gBAAgB,UAAQ,GAAG,OAAO,CAAC,eAAe,CAAC;WAsDpH,0BAA0B,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;WAavG,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAYvD"}
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* @module MapLayers
|
|
7
7
|
*/
|
|
8
8
|
import { compareStrings } from "@itwin/core-bentley";
|
|
9
|
+
import { BackgroundMapProvider, BackgroundMapType, BaseMapLayerSettings, ImageMapLayerSettings, } from "@itwin/core-common";
|
|
9
10
|
import { Point2d } from "@itwin/core-geometry";
|
|
10
|
-
import { BackgroundMapProvider, BackgroundMapType, BaseMapLayerSettings, MapLayerSettings, } from "@itwin/core-common";
|
|
11
|
-
import { getJson } from "../../request/Request";
|
|
12
11
|
import { IModelApp } from "../../IModelApp";
|
|
12
|
+
import { getJson } from "../../request/Request";
|
|
13
13
|
import { ArcGisUtilities, MapCartoRectangle } from "../internal";
|
|
14
14
|
/** @internal */
|
|
15
15
|
export var MapLayerSourceStatus;
|
|
@@ -60,8 +60,10 @@ export class MapLayerSource {
|
|
|
60
60
|
}
|
|
61
61
|
toLayerSettings(subLayers) {
|
|
62
62
|
// When MapLayerSetting is created from a MapLayerSource, sub-layers and credentials need to be set separately.
|
|
63
|
-
const layerSettings =
|
|
64
|
-
|
|
63
|
+
const layerSettings = ImageMapLayerSettings.fromJSON({ ...this, subLayers });
|
|
64
|
+
if (this.userName !== undefined || this.password !== undefined) {
|
|
65
|
+
layerSettings === null || layerSettings === void 0 ? void 0 : layerSettings.setCredentials(this.userName, this.password);
|
|
66
|
+
}
|
|
65
67
|
return layerSettings;
|
|
66
68
|
}
|
|
67
69
|
getCredentials() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLayerSources.js","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerSources.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EACL,qBAAqB,EAAE,iBAAiB,EAAE,oBAAoB,EAAgC,gBAAgB,GAC/G,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAA2B,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAA4B,MAAM,aAAa,CAAC;AAE3F,gBAAgB;AAChB,MAAM,CAAN,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC9B,iEAAK,CAAA;IACL,2FAAkB,CAAA;IAClB,iFAAa,CAAA;IACb,qFAAe,CAAA;IACf,2EAAU,CAAA;IACV,6EAAW,CAAA;AACb,CAAC,EAPW,oBAAoB,KAApB,oBAAoB,QAO/B;AAwBD;;GAEG;AACH,MAAM,OAAO,cAAc;IASzB,YAAoB,QAAQ,GAAG,KAAK,EAAE,IAAY,EAAE,GAAW,EAAE,OAAO,GAAG,KAAK,EAAE,qBAAqB,GAAG,IAAI,EAAE,QAAiB,EAAE,QAAiB;QAL7I,YAAO,GAAG,KAAK,CAAC;QAMrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CA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CAAC,SAAS,EAAE;YAC9B,OAAO,KAAK,CAAC;SACd;QAED,mCAAmC;QACnC,MAAM,kBAAkB,GAAG,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC;QACrE,eAAe,CAAC,SAAS,CAAC,QAAQ,GAAG,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE;YACxF,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,kBAAkB,KAAK,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC5E,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module MapLayers\r\n */\r\n\r\nimport { compareStrings } from \"@itwin/core-bentley\";\r\nimport { Point2d } from \"@itwin/core-geometry\";\r\nimport {\r\n BackgroundMapProvider, BackgroundMapType, BaseMapLayerSettings, DeprecatedBackgroundMapProps, MapLayerSettings, MapSubLayerProps,\r\n} from \"@itwin/core-common\";\r\nimport { getJson, RequestBasicCredentials } from \"../../request/Request\";\r\nimport { IModelApp } from \"../../IModelApp\";\r\nimport { IModelConnection } from \"../../IModelConnection\";\r\n\r\nimport { ArcGisUtilities, MapCartoRectangle, MapLayerSourceValidation } from \"../internal\";\r\n\r\n/** @internal */\r\nexport enum MapLayerSourceStatus {\r\n Valid,\r\n InvalidCredentials,\r\n InvalidFormat,\r\n InvalidTileTree,\r\n InvalidUrl,\r\n RequireAuth,\r\n}\r\n\r\n/** JSON representation of a map layer source.\r\n * @internal\r\n */\r\ninterface MapLayerSourceProps {\r\n /** Identifies the map layers source. Defaults to 'WMS'. */\r\n formatId?: string;\r\n /** Name */\r\n name: string;\r\n /** URL */\r\n url: string;\r\n /** True to indicate background is transparent. Defaults to 'true'. */\r\n transparentBackground?: boolean;\r\n /** Is a base layer. Defaults to 'false'. */\r\n isBase?: boolean;\r\n /** Indicate if this source definition should be used as a base map. Defaults to false. */\r\n baseMap?: boolean;\r\n /** UserName */\r\n userName?: string;\r\n /** Password */\r\n password?: string;\r\n}\r\n\r\n/** A source for map layers. These may be catalogued for convenient use by users or applications.\r\n * @internal\r\n */\r\nexport class MapLayerSource {\r\n public formatId: string;\r\n public name: string;\r\n public url: string;\r\n public baseMap = false;\r\n public transparentBackground?: boolean;\r\n public userName?: string;\r\n public password?: string;\r\n\r\n private constructor(formatId = \"WMS\", name: string, url: string, baseMap = false, transparentBackground = true, userName?: string, password?: string) {\r\n this.formatId = formatId;\r\n this.name = name;\r\n this.url = url;\r\n this.baseMap = baseMap;\r\n this.transparentBackground = transparentBackground;\r\n this.userName = userName;\r\n this.password = password;\r\n }\r\n\r\n public static fromJSON(json: MapLayerSourceProps): MapLayerSource | undefined {\r\n if (json === undefined)\r\n return undefined;\r\n\r\n return new MapLayerSource(json.formatId, json.name, json.url, json.baseMap, json.transparentBackground, json.userName, json.password);\r\n }\r\n\r\n public async validateSource(ignoreCache?: boolean): Promise<MapLayerSourceValidation> {\r\n return IModelApp.mapLayerFormatRegistry.validateSource(this.formatId, this.url, this.getCredentials(), ignoreCache);\r\n }\r\n public static fromBackgroundMapProps(props: DeprecatedBackgroundMapProps) {\r\n const provider = BackgroundMapProvider.fromBackgroundMapProps(props);\r\n const layerSettings = BaseMapLayerSettings.fromProvider(provider);\r\n if (undefined !== layerSettings) {\r\n const source = MapLayerSource.fromJSON(layerSettings);\r\n if (source) {\r\n source.baseMap = true;\r\n return source;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n public toJSON() {\r\n return { url: this.url, name: this.name, formatId: this.formatId, transparentBackground: this.transparentBackground };\r\n }\r\n\r\n public toLayerSettings(subLayers?: MapSubLayerProps[]): MapLayerSettings | undefined {\r\n // When MapLayerSetting is created from a MapLayerSource, sub-layers and credentials need to be set separately.\r\n const layerSettings = MapLayerSettings.fromJSON({ ...this, subLayers });\r\n layerSettings?.setCredentials(this.userName, this.password);\r\n return layerSettings;\r\n }\r\n\r\n private getCredentials(): RequestBasicCredentials | undefined {\r\n return this.userName && this.password ? { user: this.userName, password: this.password } : undefined;\r\n }\r\n}\r\n\r\n/** A collection of [[MapLayerSource]] objects.\r\n * @internal\r\n */\r\nexport class MapLayerSources {\r\n private static _instance?: MapLayerSources;\r\n private constructor(private _sources: MapLayerSource[]) { }\r\n\r\n public static getInstance() { return MapLayerSources._instance; }\r\n\r\n public findByName(name: string, baseMap: boolean = false): MapLayerSource | undefined {\r\n const nameTest = name.toLowerCase();\r\n for (const source of this._sources)\r\n if (source.baseMap === baseMap && source.name.toLowerCase().indexOf(nameTest) !== -1)\r\n return source;\r\n\r\n return undefined;\r\n }\r\n public get layers(): MapLayerSource[] {\r\n const layers = new Array<MapLayerSource>();\r\n this._sources.forEach((source) => { if (!source.baseMap) layers.push(source); });\r\n return layers;\r\n }\r\n public get allSource() { return this._sources; }\r\n public get bases(): MapLayerSource[] {\r\n const layers = new Array<MapLayerSource>();\r\n this._sources.forEach((source) => { if (source.baseMap) layers.push(source); });\r\n return layers;\r\n }\r\n\r\n private static getBingMapLayerSource(): MapLayerSource[] {\r\n const mapLayerSources: MapLayerSource[] = [];\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"BingProvider\", providerData: { mapType: BackgroundMapType.Street } })!);\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"BingProvider\", providerData: { mapType: BackgroundMapType.Aerial } })!);\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"BingProvider\", providerData: { mapType: BackgroundMapType.Hybrid } })!);\r\n return mapLayerSources;\r\n }\r\n\r\n private static getMapBoxLayerSource(): MapLayerSource[] {\r\n const mapLayerSources: MapLayerSource[] = [];\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"MapBoxProvider\", providerData: { mapType: BackgroundMapType.Street } })!);\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"MapBoxProvider\", providerData: { mapType: BackgroundMapType.Aerial } })!);\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"MapBoxProvider\", providerData: { mapType: BackgroundMapType.Hybrid } })!);\r\n return mapLayerSources;\r\n }\r\n\r\n public static async create(iModel?: IModelConnection, queryForPublicSources = false, addMapBoxSources = false): Promise<MapLayerSources> {\r\n if (!queryForPublicSources && MapLayerSources._instance)\r\n return MapLayerSources._instance;\r\n\r\n if (!iModel)\r\n iModel = IModelApp.viewManager.selectedView ? IModelApp.viewManager.selectedView.iModel : undefined;\r\n\r\n let sourceRange = MapCartoRectangle.create();\r\n if (iModel) {\r\n const projectCenter = iModel.projectExtents.localXYZToWorld(.5, .5, .5)!;\r\n const cartoCenter = iModel.spatialToCartographicFromEcef(projectCenter);\r\n const globeRange = MapCartoRectangle.create();\r\n const nearDelta = Point2d.create(globeRange.xLength() / 100, globeRange.yLength() / 100);\r\n sourceRange = MapCartoRectangle.create(cartoCenter.longitude - nearDelta.x, cartoCenter.latitude - nearDelta.y, cartoCenter.longitude + nearDelta.x, cartoCenter.latitude + nearDelta.y);\r\n }\r\n\r\n const sources = new Array<MapLayerSource>();\r\n const urlSet = new Set<string>();\r\n const addSource = ((source: MapLayerSource) => {\r\n if (!urlSet.has(source.url)) {\r\n sources.push(source);\r\n urlSet.add(source.url);\r\n }\r\n });\r\n\r\n this.getBingMapLayerSource().forEach((source) => {\r\n addSource(source);\r\n });\r\n\r\n if (addMapBoxSources) {\r\n this.getMapBoxLayerSource().forEach((source) => {\r\n addSource(source);\r\n });\r\n }\r\n\r\n if (queryForPublicSources) {\r\n const sourcesJson = await getJson(`${IModelApp.publicPath}assets/MapLayerSources.json`);\r\n\r\n for (const sourceJson of sourcesJson) {\r\n const source = MapLayerSource.fromJSON(sourceJson);\r\n if (source)\r\n addSource(source);\r\n }\r\n\r\n (await ArcGisUtilities.getSourcesFromQuery(sourceRange)).forEach((queriedSource) => addSource(queriedSource));\r\n }\r\n\r\n sources.sort((a: MapLayerSource, b: MapLayerSource) => compareStrings(a.name.toLowerCase(), b.name.toLowerCase()));\r\n\r\n const mapLayerSources = new MapLayerSources(sources);\r\n MapLayerSources._instance = mapLayerSources;\r\n\r\n return mapLayerSources;\r\n }\r\n public static async addSourceToMapLayerSources(mapLayerSource?: MapLayerSource): Promise<MapLayerSources | undefined> {\r\n if (!MapLayerSources._instance || !mapLayerSource) {\r\n return undefined;\r\n }\r\n MapLayerSources._instance._sources = MapLayerSources._instance._sources.filter((source) => {\r\n return !(source.name === mapLayerSource.name || source.url === mapLayerSource.url);\r\n });\r\n\r\n MapLayerSources._instance._sources.push(mapLayerSource);\r\n MapLayerSources._instance._sources.sort((a: MapLayerSource, b: MapLayerSource) => compareStrings(a.name.toLowerCase(), b.name.toLowerCase()));\r\n return MapLayerSources._instance;\r\n }\r\n\r\n public static removeLayerByName(name: string): boolean {\r\n if (!MapLayerSources._instance) {\r\n return false;\r\n }\r\n\r\n // For now we only rely on the name\r\n const lengthBeforeRemove = MapLayerSources._instance._sources.length;\r\n MapLayerSources._instance._sources = MapLayerSources._instance._sources.filter((source) => {\r\n return (source.name !== name);\r\n });\r\n return (lengthBeforeRemove !== MapLayerSources._instance._sources.length);\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"MapLayerSources.js","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerSources.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACL,qBAAqB,EAAE,iBAAiB,EAAE,oBAAoB,EAAgC,qBAAqB,GACpH,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/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,CAAC;QACH,OAAO,CAAC,kBAAkB,KAAK,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC5E,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module MapLayers\r\n */\r\n\r\nimport { compareStrings } from \"@itwin/core-bentley\";\r\nimport {\r\n BackgroundMapProvider, BackgroundMapType, BaseMapLayerSettings, DeprecatedBackgroundMapProps, ImageMapLayerSettings, MapSubLayerProps,\r\n} from \"@itwin/core-common\";\r\nimport { Point2d } from \"@itwin/core-geometry\";\r\nimport { IModelApp } from \"../../IModelApp\";\r\nimport { IModelConnection } from \"../../IModelConnection\";\r\nimport { getJson, RequestBasicCredentials } from \"../../request/Request\";\r\nimport { ArcGisUtilities, MapCartoRectangle, MapLayerSourceValidation } from \"../internal\";\r\n\r\n/** @internal */\r\nexport enum MapLayerSourceStatus {\r\n Valid,\r\n InvalidCredentials,\r\n InvalidFormat,\r\n InvalidTileTree,\r\n InvalidUrl,\r\n RequireAuth,\r\n}\r\n\r\n/** JSON representation of a map layer source.\r\n * @internal\r\n */\r\ninterface MapLayerSourceProps {\r\n /** Identifies the map layers source. Defaults to 'WMS'. */\r\n formatId?: string;\r\n /** Name */\r\n name: string;\r\n /** URL */\r\n url: string;\r\n /** True to indicate background is transparent. Defaults to 'true'. */\r\n transparentBackground?: boolean;\r\n /** Is a base layer. Defaults to 'false'. */\r\n isBase?: boolean;\r\n /** Indicate if this source definition should be used as a base map. Defaults to false. */\r\n baseMap?: boolean;\r\n /** UserName */\r\n userName?: string;\r\n /** Password */\r\n password?: string;\r\n}\r\n\r\n/** A source for map layers. These may be catalogued for convenient use by users or applications.\r\n * @internal\r\n */\r\nexport class MapLayerSource {\r\n public formatId: string;\r\n public name: string;\r\n public url: string;\r\n public baseMap = false;\r\n public transparentBackground?: boolean;\r\n public userName?: string;\r\n public password?: string;\r\n\r\n private constructor(formatId = \"WMS\", name: string, url: string, baseMap = false, transparentBackground = true, userName?: string, password?: string) {\r\n this.formatId = formatId;\r\n this.name = name;\r\n this.url = url;\r\n this.baseMap = baseMap;\r\n this.transparentBackground = transparentBackground;\r\n this.userName = userName;\r\n this.password = password;\r\n }\r\n\r\n public static fromJSON(json: MapLayerSourceProps): MapLayerSource | undefined {\r\n if (json === undefined)\r\n return undefined;\r\n\r\n return new MapLayerSource(json.formatId, json.name, json.url, json.baseMap, json.transparentBackground, json.userName, json.password);\r\n }\r\n\r\n public async validateSource(ignoreCache?: boolean): Promise<MapLayerSourceValidation> {\r\n return IModelApp.mapLayerFormatRegistry.validateSource(this.formatId, this.url, this.getCredentials(), ignoreCache);\r\n }\r\n public static fromBackgroundMapProps(props: DeprecatedBackgroundMapProps) {\r\n const provider = BackgroundMapProvider.fromBackgroundMapProps(props);\r\n const layerSettings = BaseMapLayerSettings.fromProvider(provider);\r\n if (undefined !== layerSettings) {\r\n const source = MapLayerSource.fromJSON(layerSettings);\r\n if (source) {\r\n source.baseMap = true;\r\n return source;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n public toJSON() {\r\n return { url: this.url, name: this.name, formatId: this.formatId, transparentBackground: this.transparentBackground };\r\n }\r\n\r\n public toLayerSettings(subLayers?: MapSubLayerProps[]): ImageMapLayerSettings | undefined {\r\n // When MapLayerSetting is created from a MapLayerSource, sub-layers and credentials need to be set separately.\r\n const layerSettings = ImageMapLayerSettings.fromJSON({ ...this, subLayers });\r\n if (this.userName !== undefined || this.password !== undefined) {\r\n layerSettings?.setCredentials(this.userName, this.password);\r\n }\r\n\r\n return layerSettings;\r\n }\r\n\r\n private getCredentials(): RequestBasicCredentials | undefined {\r\n return this.userName && this.password ? { user: this.userName, password: this.password } : undefined;\r\n }\r\n}\r\n\r\n/** A collection of [[MapLayerSource]] objects.\r\n * @internal\r\n */\r\nexport class MapLayerSources {\r\n private static _instance?: MapLayerSources;\r\n private constructor(private _sources: MapLayerSource[]) { }\r\n\r\n public static getInstance() { return MapLayerSources._instance; }\r\n\r\n public findByName(name: string, baseMap: boolean = false): MapLayerSource | undefined {\r\n const nameTest = name.toLowerCase();\r\n for (const source of this._sources)\r\n if (source.baseMap === baseMap && source.name.toLowerCase().indexOf(nameTest) !== -1)\r\n return source;\r\n\r\n return undefined;\r\n }\r\n public get layers(): MapLayerSource[] {\r\n const layers = new Array<MapLayerSource>();\r\n this._sources.forEach((source) => { if (!source.baseMap) layers.push(source); });\r\n return layers;\r\n }\r\n public get allSource() { return this._sources; }\r\n public get bases(): MapLayerSource[] {\r\n const layers = new Array<MapLayerSource>();\r\n this._sources.forEach((source) => { if (source.baseMap) layers.push(source); });\r\n return layers;\r\n }\r\n\r\n private static getBingMapLayerSource(): MapLayerSource[] {\r\n const mapLayerSources: MapLayerSource[] = [];\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"BingProvider\", providerData: { mapType: BackgroundMapType.Street } })!);\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"BingProvider\", providerData: { mapType: BackgroundMapType.Aerial } })!);\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"BingProvider\", providerData: { mapType: BackgroundMapType.Hybrid } })!);\r\n return mapLayerSources;\r\n }\r\n\r\n private static getMapBoxLayerSource(): MapLayerSource[] {\r\n const mapLayerSources: MapLayerSource[] = [];\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"MapBoxProvider\", providerData: { mapType: BackgroundMapType.Street } })!);\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"MapBoxProvider\", providerData: { mapType: BackgroundMapType.Aerial } })!);\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"MapBoxProvider\", providerData: { mapType: BackgroundMapType.Hybrid } })!);\r\n return mapLayerSources;\r\n }\r\n\r\n public static async create(iModel?: IModelConnection, queryForPublicSources = false, addMapBoxSources = false): Promise<MapLayerSources> {\r\n if (!queryForPublicSources && MapLayerSources._instance)\r\n return MapLayerSources._instance;\r\n\r\n if (!iModel)\r\n iModel = IModelApp.viewManager.selectedView ? IModelApp.viewManager.selectedView.iModel : undefined;\r\n\r\n let sourceRange = MapCartoRectangle.create();\r\n if (iModel) {\r\n const projectCenter = iModel.projectExtents.localXYZToWorld(.5, .5, .5)!;\r\n const cartoCenter = iModel.spatialToCartographicFromEcef(projectCenter);\r\n const globeRange = MapCartoRectangle.create();\r\n const nearDelta = Point2d.create(globeRange.xLength() / 100, globeRange.yLength() / 100);\r\n sourceRange = MapCartoRectangle.create(cartoCenter.longitude - nearDelta.x, cartoCenter.latitude - nearDelta.y, cartoCenter.longitude + nearDelta.x, cartoCenter.latitude + nearDelta.y);\r\n }\r\n\r\n const sources = new Array<MapLayerSource>();\r\n const urlSet = new Set<string>();\r\n const addSource = ((source: MapLayerSource) => {\r\n if (!urlSet.has(source.url)) {\r\n sources.push(source);\r\n urlSet.add(source.url);\r\n }\r\n });\r\n\r\n this.getBingMapLayerSource().forEach((source) => {\r\n addSource(source);\r\n });\r\n\r\n if (addMapBoxSources) {\r\n this.getMapBoxLayerSource().forEach((source) => {\r\n addSource(source);\r\n });\r\n }\r\n\r\n if (queryForPublicSources) {\r\n const sourcesJson = await getJson(`${IModelApp.publicPath}assets/MapLayerSources.json`);\r\n\r\n for (const sourceJson of sourcesJson) {\r\n const source = MapLayerSource.fromJSON(sourceJson);\r\n if (source)\r\n addSource(source);\r\n }\r\n\r\n (await ArcGisUtilities.getSourcesFromQuery(sourceRange)).forEach((queriedSource) => addSource(queriedSource));\r\n }\r\n\r\n sources.sort((a: MapLayerSource, b: MapLayerSource) => compareStrings(a.name.toLowerCase(), b.name.toLowerCase()));\r\n\r\n const mapLayerSources = new MapLayerSources(sources);\r\n MapLayerSources._instance = mapLayerSources;\r\n\r\n return mapLayerSources;\r\n }\r\n public static async addSourceToMapLayerSources(mapLayerSource?: MapLayerSource): Promise<MapLayerSources | undefined> {\r\n if (!MapLayerSources._instance || !mapLayerSource) {\r\n return undefined;\r\n }\r\n MapLayerSources._instance._sources = MapLayerSources._instance._sources.filter((source) => {\r\n return !(source.name === mapLayerSource.name || source.url === mapLayerSource.url);\r\n });\r\n\r\n MapLayerSources._instance._sources.push(mapLayerSource);\r\n MapLayerSources._instance._sources.sort((a: MapLayerSource, b: MapLayerSource) => compareStrings(a.name.toLowerCase(), b.name.toLowerCase()));\r\n return MapLayerSources._instance;\r\n }\r\n\r\n public static removeLayerByName(name: string): boolean {\r\n if (!MapLayerSources._instance) {\r\n return false;\r\n }\r\n\r\n // For now we only rely on the name\r\n const lengthBeforeRemove = MapLayerSources._instance._sources.length;\r\n MapLayerSources._instance._sources = MapLayerSources._instance._sources.filter((source) => {\r\n return (source.name !== name);\r\n });\r\n return (lengthBeforeRemove !== MapLayerSources._instance._sources.length);\r\n }\r\n}\r\n"]}
|
|
@@ -3,16 +3,24 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { MapLayerSettings } from "@itwin/core-common";
|
|
5
5
|
import { HitDetail } from "../../HitDetail";
|
|
6
|
+
import { IModelConnection } from "../../IModelConnection";
|
|
6
7
|
import { MapLayerImageryProvider, TileTreeReference } from "../internal";
|
|
7
8
|
/** @internal */
|
|
8
9
|
export declare abstract class MapLayerTileTreeReference extends TileTreeReference {
|
|
9
10
|
protected _layerSettings: MapLayerSettings;
|
|
10
11
|
protected _layerIndex: number;
|
|
11
|
-
|
|
12
|
+
iModel: IModelConnection;
|
|
13
|
+
constructor(_layerSettings: MapLayerSettings, _layerIndex: number, iModel: IModelConnection);
|
|
12
14
|
protected get _transparency(): number | undefined;
|
|
13
|
-
|
|
15
|
+
get isOpaque(): boolean;
|
|
16
|
+
get layerName(): string;
|
|
17
|
+
get imageryProvider(): MapLayerImageryProvider | undefined;
|
|
14
18
|
set layerSettings(layerSettings: MapLayerSettings);
|
|
15
19
|
get layerSettings(): MapLayerSettings;
|
|
20
|
+
get layerIndex(): number;
|
|
21
|
+
get transparency(): number | undefined;
|
|
16
22
|
getToolTip(hit: HitDetail): Promise<HTMLElement | string | undefined>;
|
|
17
23
|
}
|
|
24
|
+
/** @internal */
|
|
25
|
+
export declare function createMapLayerTreeReference(layerSettings: MapLayerSettings, layerIndex: number, iModel: IModelConnection): MapLayerTileTreeReference | undefined;
|
|
18
26
|
//# sourceMappingURL=MapLayerTileTreeReference.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLayerTileTreeReference.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerTileTreeReference.ts"],"names":[],"mappings":"AAIA;;GAEG;
|
|
1
|
+
{"version":3,"file":"MapLayerTileTreeReference.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerTileTreeReference.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAyB,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAwC,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE/G,iBAAiB;AACjB,8BAAsB,yBAA0B,SAAQ,iBAAiB;IAC3D,SAAS,CAAC,cAAc,EAAE,gBAAgB;IAAE,SAAS,CAAC,WAAW,EAAE,MAAM;IAAS,MAAM,EAAE,gBAAgB;gBAAhG,cAAc,EAAE,gBAAgB,EAAY,WAAW,EAAE,MAAM,EAAS,MAAM,EAAE,gBAAgB;IAGtH,SAAS,KAAK,aAAa,uBAA8F;IAEzH,IAAW,QAAQ,YAElB;IACD,IAAW,SAAS,WAAuC;IAC3D,IAAW,eAAe,IAAI,uBAAuB,GAAG,SAAS,CAAsB;IACvF,IAAW,aAAa,CAAC,aAAa,EAAE,gBAAgB,EAA0C;IAClG,IAAW,aAAa,IAAI,gBAAgB,CAAgC;IAC5E,IAAW,UAAU,IAAI,MAAM,CAA6B;IAC5D,IAAW,YAAY,uBAAiC;IAClC,UAAU,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;CAW5F;AAED,iBAAiB;AACjB,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,GAAG,yBAAyB,GAAG,SAAS,CAShK"}
|
|
@@ -5,18 +5,28 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Tiles
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { assert } from "@itwin/core-bentley";
|
|
9
|
+
import { ImageMapLayerSettings, ModelMapLayerSettings } from "@itwin/core-common";
|
|
10
|
+
import { IModelApp } from "../../IModelApp";
|
|
11
|
+
import { createModelMapLayerTileTreeReference, TileTreeReference } from "../internal";
|
|
9
12
|
/** @internal */
|
|
10
13
|
export class MapLayerTileTreeReference extends TileTreeReference {
|
|
11
|
-
constructor(_layerSettings, _layerIndex) {
|
|
14
|
+
constructor(_layerSettings, _layerIndex, iModel) {
|
|
12
15
|
super();
|
|
13
16
|
this._layerSettings = _layerSettings;
|
|
14
17
|
this._layerIndex = _layerIndex;
|
|
18
|
+
this.iModel = iModel;
|
|
15
19
|
}
|
|
16
20
|
get _transparency() { return this._layerSettings.transparency ? this._layerSettings.transparency : undefined; }
|
|
17
|
-
get
|
|
21
|
+
get isOpaque() {
|
|
22
|
+
return this._layerSettings.visible && (!this._layerSettings.allSubLayersInvisible) && !this._layerSettings.transparentBackground && 0 === this._layerSettings.transparency;
|
|
23
|
+
}
|
|
24
|
+
get layerName() { return this._layerSettings.name; }
|
|
25
|
+
get imageryProvider() { return undefined; }
|
|
18
26
|
set layerSettings(layerSettings) { this._layerSettings = layerSettings; }
|
|
19
27
|
get layerSettings() { return this._layerSettings; }
|
|
28
|
+
get layerIndex() { return this._layerIndex; }
|
|
29
|
+
get transparency() { return this._transparency; }
|
|
20
30
|
async getToolTip(hit) {
|
|
21
31
|
const tree = this.treeOwner.tileTree;
|
|
22
32
|
if (undefined === tree || hit.iModel !== tree.iModel || tree.modelId !== hit.sourceId)
|
|
@@ -28,4 +38,16 @@ export class MapLayerTileTreeReference extends TileTreeReference {
|
|
|
28
38
|
return div;
|
|
29
39
|
}
|
|
30
40
|
}
|
|
41
|
+
/** @internal */
|
|
42
|
+
export function createMapLayerTreeReference(layerSettings, layerIndex, iModel) {
|
|
43
|
+
if (layerSettings instanceof ModelMapLayerSettings) {
|
|
44
|
+
return createModelMapLayerTileTreeReference(layerSettings, layerIndex, iModel);
|
|
45
|
+
}
|
|
46
|
+
else if (layerSettings instanceof ImageMapLayerSettings)
|
|
47
|
+
return IModelApp.mapLayerFormatRegistry.createImageryMapLayerTree(layerSettings, layerIndex, iModel);
|
|
48
|
+
else {
|
|
49
|
+
assert(false);
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
31
53
|
//# sourceMappingURL=MapLayerTileTreeReference.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLayerTileTreeReference.js","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerTileTreeReference.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;
|
|
1
|
+
{"version":3,"file":"MapLayerTileTreeReference.js","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerTileTreeReference.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAoB,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEpG,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,oCAAoC,EAA2B,iBAA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CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,KAAK,GAAG,CAAC,QAAQ;YACnF,OAAO,SAAS,CAAC;QAEnB,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC;QACvD,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC1C,GAAG,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrC,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AAED,iBAAiB;AACjB,MAAM,UAAU,2BAA2B,CAAC,aAA+B,EAAE,UAAkB,EAAE,MAAwB;IACvH,IAAI,aAAa,YAAY,qBAAqB,EAAE;QAClD,OAAO,oCAAoC,CAAC,aAAa,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;KAChF;SAAM,IAAI,aAAa,YAAY,qBAAqB;QACvD,OAAO,SAAS,CAAC,sBAAsB,CAAC,yBAAyB,CAAC,aAAa,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;SAClG;QACH,MAAM,CAAE,KAAK,CAAC,CAAC;QACf,OAAO,SAAS,CAAC;KAClB;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { ImageMapLayerSettings, MapLayerSettings, ModelMapLayerSettings } from \"@itwin/core-common\";\r\nimport { HitDetail } from \"../../HitDetail\";\r\nimport { IModelApp } from \"../../IModelApp\";\r\nimport { IModelConnection } from \"../../IModelConnection\";\r\nimport { createModelMapLayerTileTreeReference, MapLayerImageryProvider, TileTreeReference } from \"../internal\";\r\n\r\n/** @internal */\r\nexport abstract class MapLayerTileTreeReference extends TileTreeReference {\r\n constructor(protected _layerSettings: MapLayerSettings, protected _layerIndex: number, public iModel: IModelConnection) {\r\n super();\r\n }\r\n protected get _transparency() { return this._layerSettings.transparency ? this._layerSettings.transparency : undefined; }\r\n\r\n public get isOpaque() {\r\n return this._layerSettings.visible && (!this._layerSettings.allSubLayersInvisible) && !this._layerSettings.transparentBackground && 0 === this._layerSettings.transparency;\r\n }\r\n public get layerName() { return this._layerSettings.name; }\r\n public get imageryProvider(): MapLayerImageryProvider | undefined { return undefined; }\r\n public set layerSettings(layerSettings: MapLayerSettings) { this._layerSettings = layerSettings; }\r\n public get layerSettings(): MapLayerSettings { return this._layerSettings; }\r\n public get layerIndex(): number { return this._layerIndex; }\r\n public get transparency() { return this._transparency; }\r\n public override async getToolTip(hit: HitDetail): Promise<HTMLElement | string | undefined> {\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined === tree || hit.iModel !== tree.iModel || tree.modelId !== hit.sourceId)\r\n return undefined;\r\n\r\n const strings = [];\r\n strings.push(`Map Layer: ${this._layerSettings.name}`);\r\n const div = document.createElement(\"div\");\r\n div.innerHTML = strings.join(\"<br>\");\r\n return div;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function createMapLayerTreeReference(layerSettings: MapLayerSettings, layerIndex: number, iModel: IModelConnection): MapLayerTileTreeReference | undefined {\r\n if (layerSettings instanceof ModelMapLayerSettings) {\r\n return createModelMapLayerTileTreeReference(layerSettings, layerIndex, iModel);\r\n } else if (layerSettings instanceof ImageMapLayerSettings)\r\n return IModelApp.mapLayerFormatRegistry.createImageryMapLayerTree(layerSettings, layerIndex, iModel);\r\n else {\r\n assert (false);\r\n return undefined;\r\n }\r\n}\r\n"]}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Tiles
|
|
3
3
|
*/
|
|
4
|
-
import { ClipVector, EllipsoidPatch, Point3d, Range1d, Range3d, Ray3d, Transform, Vector3d } from "@itwin/core-geometry";
|
|
5
4
|
import { ColorDef, RenderTexture } from "@itwin/core-common";
|
|
5
|
+
import { ClipVector, EllipsoidPatch, Point3d, Range1d, Range3d, Ray3d, Transform, Vector3d } from "@itwin/core-geometry";
|
|
6
6
|
import { GraphicBuilder } from "../../render/GraphicBuilder";
|
|
7
7
|
import { TerrainMeshPrimitive } from "../../render/primitives/mesh/TerrainMeshPrimitive";
|
|
8
8
|
import { RenderGraphic } from "../../render/RenderGraphic";
|
|
9
9
|
import { RenderMemory } from "../../render/RenderMemory";
|
|
10
10
|
import { RenderSystem, RenderTerrainGeometry, TerrainTexture } from "../../render/RenderSystem";
|
|
11
11
|
import { ViewingSpace } from "../../ViewingSpace";
|
|
12
|
-
import { ImageryMapTile, MapCartoRectangle, MapTileLoader, MapTileTree, QuadId, RealityTile, Tile, TileContent, TileDrawArgs, TileGraphicType,
|
|
12
|
+
import { ImageryMapTile, MapCartoRectangle, MapTileLoader, MapTileTree, QuadId, RealityTile, RealityTileParams, Tile, TileContent, TileDrawArgs, TileGraphicType, TraversalSelectionContext } from "../internal";
|
|
13
13
|
/** @internal */
|
|
14
14
|
export declare class PlanarTilePatch {
|
|
15
15
|
corners: Point3d[];
|
|
@@ -27,6 +27,7 @@ export declare abstract class MapTileProjection {
|
|
|
27
27
|
abstract get transformFromLocal(): Transform;
|
|
28
28
|
abstract getPoint(u: number, v: number, height: number, result?: Point3d): Point3d;
|
|
29
29
|
get ellipsoidPatch(): EllipsoidPatch | undefined;
|
|
30
|
+
getGlobalPoint(u: number, v: number, z: number, result?: Point3d): Point3d;
|
|
30
31
|
}
|
|
31
32
|
/** @internal */
|
|
32
33
|
export interface TerrainTileContent extends TileContent {
|
|
@@ -61,7 +62,7 @@ export declare class MapTile extends RealityTile {
|
|
|
61
62
|
get isPlanar(): boolean;
|
|
62
63
|
get imageryTiles(): ImageryMapTile[] | undefined;
|
|
63
64
|
getRangeCorners(result: Point3d[]): Point3d[];
|
|
64
|
-
constructor(params:
|
|
65
|
+
constructor(params: RealityTileParams, mapTree: MapTileTree, quadId: QuadId, _patch: TilePatch, rectangle: MapCartoRectangle, heightRange: Range1d | undefined, _cornerRays: Ray3d[] | undefined);
|
|
65
66
|
getSizeProjectionCorners(): Point3d[] | undefined;
|
|
66
67
|
markUsed(args: TileDrawArgs): void;
|
|
67
68
|
get graphicType(): TileGraphicType;
|
|
@@ -80,7 +81,7 @@ export declare class MapTile extends RealityTile {
|
|
|
80
81
|
isOccluded(viewingSpace: ViewingSpace): boolean;
|
|
81
82
|
protected _loadChildren(resolve: (children: Tile[] | undefined) => void, _reject: (error: Error) => void): void;
|
|
82
83
|
private createGlobeChildren;
|
|
83
|
-
static computeRangeCorners(corners: Point3d[], normal: Vector3d, chordHeight: number, result
|
|
84
|
+
static computeRangeCorners(corners: Point3d[], normal: Vector3d, chordHeight: number, result?: Point3d[], heightRange?: Range1d): Point3d[];
|
|
84
85
|
isRegionCulled(args: TileDrawArgs): boolean;
|
|
85
86
|
isContentCulled(args: TileDrawArgs): boolean;
|
|
86
87
|
clearLayers(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapTile.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/MapTile.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAiE,UAAU,EAAgC,cAAc,EAAqC,OAAO,EAAc,OAAO,EAAW,OAAO,EAAE,KAAK,EAAE,SAAS,EAAY,QAAQ,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"MapTile.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/MapTile.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAe,QAAQ,EAAgD,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxH,OAAO,EAAiE,UAAU,EAAgC,cAAc,EAAqC,OAAO,EAAc,OAAO,EAAW,OAAO,EAAE,KAAK,EAAE,SAAS,EAAY,QAAQ,EAAE,MAAM,sBAAsB,CAA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;CAInD"}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* @module Tiles
|
|
7
7
|
*/
|
|
8
8
|
import { assert, dispose } from "@itwin/core-bentley";
|
|
9
|
-
import { AxisOrder, BilinearPatch, ClipPlane, ClipPrimitive, ClipShape, ClipVector, Constant, ConvexClipPlaneSet, EllipsoidPatch, LongitudeLatitudeNumber, Matrix3d, Point3d, PolygonOps, Range1d, Range2d, Range3d, Ray3d, Transform, Vector2d, Vector3d } from "@itwin/core-geometry";
|
|
10
9
|
import { ColorByName, ColorDef, FrustumPlanes, GlobeMode, PackedFeatureTable } from "@itwin/core-common";
|
|
10
|
+
import { AxisOrder, BilinearPatch, ClipPlane, ClipPrimitive, ClipShape, ClipVector, Constant, ConvexClipPlaneSet, EllipsoidPatch, LongitudeLatitudeNumber, Matrix3d, Point3d, PolygonOps, Range1d, Range2d, Range3d, Ray3d, Transform, Vector2d, Vector3d } from "@itwin/core-geometry";
|
|
11
11
|
import { IModelApp } from "../../IModelApp";
|
|
12
12
|
import { TerrainTexture } from "../../render/RenderSystem";
|
|
13
13
|
import { MapCartoRectangle, MapTileTree, QuadId, RealityTile, TileGraphicType, TileLoadStatus, TileTreeLoadStatus, } from "../internal";
|
|
@@ -33,6 +33,10 @@ export class PlanarTilePatch {
|
|
|
33
33
|
/** @internal */
|
|
34
34
|
export class MapTileProjection {
|
|
35
35
|
get ellipsoidPatch() { return undefined; }
|
|
36
|
+
getGlobalPoint(u, v, z, result) {
|
|
37
|
+
const point = this.getPoint(u, v, z, result);
|
|
38
|
+
return this.transformFromLocal.multiplyPoint3d(point, point);
|
|
39
|
+
}
|
|
36
40
|
}
|
|
37
41
|
/** @internal */
|
|
38
42
|
class EllipsoidProjection extends MapTileProjection {
|
|
@@ -276,7 +280,8 @@ export class MapTile extends RealityTile {
|
|
|
276
280
|
const heightRange = this.mapTree.getChildHeightRange(quadId, rectangle, this);
|
|
277
281
|
const diagonal = Math.max(corners[0].distance(corners[3]), corners[1].distance(corners[2])) / 2.0;
|
|
278
282
|
const chordHeight = globeMode === GlobeMode.Ellipsoid ? Math.sqrt(diagonal * diagonal + Constant.earthRadiusWGS84.equator * Constant.earthRadiusWGS84.equator) - Constant.earthRadiusWGS84.equator : 0.0;
|
|
279
|
-
const
|
|
283
|
+
const rangeCorners = MapTile.computeRangeCorners(corners, normal, chordHeight, undefined, heightRange);
|
|
284
|
+
const range = Range3d.createArray(rangeCorners);
|
|
280
285
|
const child = this.mapTree.createPlanarChild({ contentId: quadId.contentId, maximumSize: 512, range, parent: this, isLeaf: childrenAreLeaves }, quadId, corners, normal, rectangle, chordHeight, heightRange);
|
|
281
286
|
if (child)
|
|
282
287
|
children.push(child);
|
|
@@ -351,9 +356,10 @@ export class MapTile extends RealityTile {
|
|
|
351
356
|
if (undefined === geometry)
|
|
352
357
|
return undefined;
|
|
353
358
|
const textures = this.getDrapeTextures();
|
|
354
|
-
const
|
|
355
|
-
|
|
356
|
-
|
|
359
|
+
const { baseColor, baseTransparent, layerClassifiers } = this.mapTree;
|
|
360
|
+
const graphic = IModelApp.renderSystem.createRealityMeshGraphic({ realityMesh: geometry, projection: this.getProjection(), tileRectangle: this.rectangle, featureTable: PackedFeatureTable.pack(this.mapLoader.featureTable), tileId: this.contentId, baseColor, baseTransparent, textures, layerClassifiers });
|
|
361
|
+
// If there are no layer classifiers then we can save this graphic for re-use. If layer classifiers exist they are regenerated based on view and we must collate them with the imagery.
|
|
362
|
+
if (this.imageryIsReady && 0 === this.mapTree.layerClassifiers.size)
|
|
357
363
|
this._graphic = graphic;
|
|
358
364
|
return graphic;
|
|
359
365
|
}
|
|
@@ -392,6 +398,8 @@ export class MapTile extends RealityTile {
|
|
|
392
398
|
this._heightRange.low = Math.max(this.heightRange.low, minHeight);
|
|
393
399
|
this._heightRange.high = Math.min(this.heightRange.high, maxHeight);
|
|
394
400
|
}
|
|
401
|
+
if (this.rangeCorners && this._patch instanceof PlanarTilePatch)
|
|
402
|
+
this._patch.getRangeCorners(this.heightRange, this.rangeCorners);
|
|
395
403
|
}
|
|
396
404
|
getProjection(heightRange) {
|
|
397
405
|
return this._patch instanceof PlanarTilePatch ? new PlanarProjection(this._patch, heightRange) : new EllipsoidProjection(this._patch, heightRange);
|