@itwin/core-frontend 5.12.0-dev.1 → 5.12.0-dev.5
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/CHANGELOG.md +20 -1
- package/lib/cjs/BingLocation.d.ts +1 -1
- package/lib/cjs/BingLocation.js +1 -1
- package/lib/cjs/BingLocation.js.map +1 -1
- package/lib/cjs/GraphicalEditingScope.d.ts +1 -1
- package/lib/cjs/GraphicalEditingScope.d.ts.map +1 -1
- package/lib/cjs/GraphicalEditingScope.js +1 -1
- package/lib/cjs/GraphicalEditingScope.js.map +1 -1
- package/lib/cjs/HitDetail.d.ts +1 -1
- package/lib/cjs/HitDetail.d.ts.map +1 -1
- package/lib/cjs/HitDetail.js.map +1 -1
- package/lib/cjs/IModelConnection.d.ts +6 -6
- package/lib/cjs/IModelConnection.js +6 -6
- package/lib/cjs/IModelConnection.js.map +1 -1
- package/lib/cjs/IpcApp.d.ts +1 -1
- package/lib/cjs/IpcApp.js +1 -1
- package/lib/cjs/IpcApp.js.map +1 -1
- package/lib/cjs/SelectionSet.d.ts +7 -7
- package/lib/cjs/SelectionSet.js +3 -3
- package/lib/cjs/SelectionSet.js.map +1 -1
- package/lib/cjs/ViewState.d.ts +1 -1
- package/lib/cjs/ViewState.d.ts.map +1 -1
- package/lib/cjs/ViewState.js +4 -5
- package/lib/cjs/ViewState.js.map +1 -1
- package/lib/cjs/Viewport.d.ts +4 -4
- package/lib/cjs/Viewport.d.ts.map +1 -1
- package/lib/cjs/Viewport.js +20 -20
- package/lib/cjs/Viewport.js.map +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.d.ts +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.js +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.js.map +1 -1
- package/lib/cjs/internal/render/webgl/AttributeBuffers.d.ts +2 -2
- package/lib/cjs/internal/render/webgl/AttributeBuffers.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/AttributeBuffers.js +2 -2
- package/lib/cjs/internal/render/webgl/AttributeBuffers.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.d.ts +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.js +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ShaderProgram.d.ts +2 -2
- package/lib/cjs/internal/render/webgl/ShaderProgram.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/ShaderProgram.js +2 -2
- package/lib/cjs/internal/render/webgl/ShaderProgram.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Technique.d.ts +3 -3
- package/lib/cjs/internal/render/webgl/Technique.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Technique.js +3 -3
- package/lib/cjs/internal/render/webgl/Technique.js.map +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.d.ts +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.js +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts +2 -2
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js +2 -2
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
- package/lib/cjs/properties/AngleDescription.d.ts +2 -2
- package/lib/cjs/properties/AngleDescription.js +2 -2
- package/lib/cjs/properties/AngleDescription.js.map +1 -1
- package/lib/cjs/properties/FormattedQuantityDescription.d.ts +2 -2
- package/lib/cjs/properties/FormattedQuantityDescription.js +1 -1
- package/lib/cjs/properties/FormattedQuantityDescription.js.map +1 -1
- package/lib/cjs/properties/LengthDescription.d.ts +6 -6
- package/lib/cjs/properties/LengthDescription.js +6 -6
- package/lib/cjs/properties/LengthDescription.js.map +1 -1
- package/lib/cjs/render/Decorations.d.ts +1 -1
- package/lib/cjs/render/Decorations.d.ts.map +1 -1
- package/lib/cjs/render/Decorations.js +1 -1
- package/lib/cjs/render/Decorations.js.map +1 -1
- package/lib/cjs/render/GraphicBranch.d.ts +1 -1
- package/lib/cjs/render/GraphicBranch.d.ts.map +1 -1
- package/lib/cjs/render/GraphicBranch.js +1 -1
- package/lib/cjs/render/GraphicBranch.js.map +1 -1
- package/lib/cjs/render/RenderSystem.d.ts +1 -1
- package/lib/cjs/render/RenderSystem.js.map +1 -1
- package/lib/cjs/render/ScreenSpaceEffectBuilder.d.ts +1 -1
- package/lib/cjs/render/ScreenSpaceEffectBuilder.js.map +1 -1
- package/lib/cjs/request/Request.d.ts +2 -2
- package/lib/cjs/request/Request.js.map +1 -1
- package/lib/cjs/tile/Tile.d.ts +1 -1
- package/lib/cjs/tile/Tile.d.ts.map +1 -1
- package/lib/cjs/tile/Tile.js +1 -1
- package/lib/cjs/tile/Tile.js.map +1 -1
- package/lib/cjs/tile/TileTree.d.ts +1 -1
- package/lib/cjs/tile/TileTree.d.ts.map +1 -1
- package/lib/cjs/tile/TileTree.js +1 -1
- package/lib/cjs/tile/TileTree.js.map +1 -1
- package/lib/cjs/tile/TileTreeReference.d.ts +1 -1
- package/lib/cjs/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/cjs/tile/TileTreeReference.js +1 -1
- package/lib/cjs/tile/TileTreeReference.js.map +1 -1
- package/lib/cjs/tile/map/BingElevation.d.ts +5 -5
- package/lib/cjs/tile/map/BingElevation.js +4 -4
- package/lib/cjs/tile/map/BingElevation.js.map +1 -1
- package/lib/cjs/tile/map/CesiumTerrainProvider.js +1 -1
- package/lib/cjs/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.d.ts +2 -2
- package/lib/cjs/tile/map/ImageryTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.js +2 -2
- package/lib/cjs/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryFormats.d.ts +1 -1
- package/lib/cjs/tile/map/MapLayerImageryFormats.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryFormats.js +1 -1
- package/lib/cjs/tile/map/MapLayerImageryFormats.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +1 -1
- 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/MapTileTree.d.ts +1 -1
- package/lib/cjs/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.js +1 -1
- package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.d.ts +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.js +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.js.map +1 -1
- package/lib/esm/BingLocation.d.ts +1 -1
- package/lib/esm/BingLocation.js +1 -1
- package/lib/esm/BingLocation.js.map +1 -1
- package/lib/esm/GraphicalEditingScope.d.ts +1 -1
- package/lib/esm/GraphicalEditingScope.d.ts.map +1 -1
- package/lib/esm/GraphicalEditingScope.js +1 -1
- package/lib/esm/GraphicalEditingScope.js.map +1 -1
- package/lib/esm/HitDetail.d.ts +1 -1
- package/lib/esm/HitDetail.d.ts.map +1 -1
- package/lib/esm/HitDetail.js.map +1 -1
- package/lib/esm/IModelConnection.d.ts +6 -6
- package/lib/esm/IModelConnection.js +6 -6
- package/lib/esm/IModelConnection.js.map +1 -1
- package/lib/esm/IpcApp.d.ts +1 -1
- package/lib/esm/IpcApp.js +1 -1
- package/lib/esm/IpcApp.js.map +1 -1
- package/lib/esm/SelectionSet.d.ts +7 -7
- package/lib/esm/SelectionSet.js +3 -3
- package/lib/esm/SelectionSet.js.map +1 -1
- package/lib/esm/ViewState.d.ts +1 -1
- package/lib/esm/ViewState.d.ts.map +1 -1
- package/lib/esm/ViewState.js +5 -6
- package/lib/esm/ViewState.js.map +1 -1
- package/lib/esm/Viewport.d.ts +4 -4
- package/lib/esm/Viewport.d.ts.map +1 -1
- package/lib/esm/Viewport.js +20 -20
- package/lib/esm/Viewport.js.map +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.d.ts +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.js +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/AttributeBuffers.d.ts +2 -2
- package/lib/esm/internal/render/webgl/AttributeBuffers.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/AttributeBuffers.js +2 -2
- package/lib/esm/internal/render/webgl/AttributeBuffers.js.map +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.d.ts +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.js +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.js.map +1 -1
- package/lib/esm/internal/render/webgl/ShaderProgram.d.ts +2 -2
- package/lib/esm/internal/render/webgl/ShaderProgram.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/ShaderProgram.js +2 -2
- package/lib/esm/internal/render/webgl/ShaderProgram.js.map +1 -1
- package/lib/esm/internal/render/webgl/Technique.d.ts +3 -3
- package/lib/esm/internal/render/webgl/Technique.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Technique.js +3 -3
- package/lib/esm/internal/render/webgl/Technique.js.map +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.d.ts +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.js +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts +2 -2
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js +2 -2
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
- package/lib/esm/properties/AngleDescription.d.ts +2 -2
- package/lib/esm/properties/AngleDescription.js +2 -2
- package/lib/esm/properties/AngleDescription.js.map +1 -1
- package/lib/esm/properties/FormattedQuantityDescription.d.ts +2 -2
- package/lib/esm/properties/FormattedQuantityDescription.js +1 -1
- package/lib/esm/properties/FormattedQuantityDescription.js.map +1 -1
- package/lib/esm/properties/LengthDescription.d.ts +6 -6
- package/lib/esm/properties/LengthDescription.js +6 -6
- package/lib/esm/properties/LengthDescription.js.map +1 -1
- package/lib/esm/render/Decorations.d.ts +1 -1
- package/lib/esm/render/Decorations.d.ts.map +1 -1
- package/lib/esm/render/Decorations.js +1 -1
- package/lib/esm/render/Decorations.js.map +1 -1
- package/lib/esm/render/GraphicBranch.d.ts +1 -1
- package/lib/esm/render/GraphicBranch.d.ts.map +1 -1
- package/lib/esm/render/GraphicBranch.js +1 -1
- package/lib/esm/render/GraphicBranch.js.map +1 -1
- package/lib/esm/render/RenderSystem.d.ts +1 -1
- package/lib/esm/render/RenderSystem.js.map +1 -1
- package/lib/esm/render/ScreenSpaceEffectBuilder.d.ts +1 -1
- package/lib/esm/render/ScreenSpaceEffectBuilder.js.map +1 -1
- package/lib/esm/request/Request.d.ts +2 -2
- package/lib/esm/request/Request.js.map +1 -1
- package/lib/esm/tile/Tile.d.ts +1 -1
- package/lib/esm/tile/Tile.d.ts.map +1 -1
- package/lib/esm/tile/Tile.js +1 -1
- package/lib/esm/tile/Tile.js.map +1 -1
- package/lib/esm/tile/TileTree.d.ts +1 -1
- package/lib/esm/tile/TileTree.d.ts.map +1 -1
- package/lib/esm/tile/TileTree.js +1 -1
- package/lib/esm/tile/TileTree.js.map +1 -1
- package/lib/esm/tile/TileTreeReference.d.ts +1 -1
- package/lib/esm/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/esm/tile/TileTreeReference.js +1 -1
- package/lib/esm/tile/TileTreeReference.js.map +1 -1
- package/lib/esm/tile/map/BingElevation.d.ts +5 -5
- package/lib/esm/tile/map/BingElevation.js +4 -4
- package/lib/esm/tile/map/BingElevation.js.map +1 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.js +1 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryTileTree.d.ts +2 -2
- package/lib/esm/tile/map/ImageryTileTree.d.ts.map +1 -1
- package/lib/esm/tile/map/ImageryTileTree.js +2 -2
- package/lib/esm/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts +1 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryFormats.d.ts +1 -1
- package/lib/esm/tile/map/MapLayerImageryFormats.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryFormats.js +1 -1
- package/lib/esm/tile/map/MapLayerImageryFormats.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +1 -1
- 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/MapTileTree.d.ts +1 -1
- package/lib/esm/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/esm/tile/map/MapTileTree.js +1 -1
- package/lib/esm/tile/map/MapTileTree.js.map +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.d.ts +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.js +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.js.map +1 -1
- package/package.json +20 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArcGISMapLayerImageryProvider.js","sourceRoot":"","sources":["../../../../../../src/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,oDAAmG;AACnG,qDAAkD;AAClD,wDAImC;AACnC,0DAA+E;AAC/E,wDAA+E;AAC/E,sDAA2D;AAK3D,MAAM,cAAc,GAAI,uDAAuD,CAAC;AA6DhF,gBAAgB;AAChB,MAAa,wBAAwB;IAC5B,MAAM,CAAC,QAAQ,CAAC,OAAmB,EAAE,IAAmC,EAAE,gBAAyB;QAExG,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;QAChC,MAAM,CAAC,QAAQ,GAAG,GAAG,MAAM,CAAC,QAAQ,WAAW,CAAC;QAEhD,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAC1C,CAAC;QAED,MAAM,MAAM,GAAG,uBAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/C,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,gBAAgB,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,gBAAgB,CAAC,EAAE,CAAC,CAAC;QAClI,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAE9D,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;YACZ,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAC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0C;IACnC,KAAK,CAAC,YAAY,CAAC,GAAW,EAAE,MAAc,EAAE,SAAiB;QACtE,IAAI,MAAM,CAAC;QACX,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,SAAS,SAAS,IAAI,GAAG,IAAI,MAAM,GAAG,CAAC;QACvE,CAAC;aAAM,CAAC;YACN,MAAM,UAAU,GAAG,GAAG,IAAI,CAAC,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,cAAc,CAAC;YACzF,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,gBAAgB,UAAU,SAAS,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,WAAW,IAAI,CAAC,cAAc,EAAE,2BAA2B,IAAI,CAAC,2BAA2B,+BAA+B,CAAC;QAC5N,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA9UD,sEA8UC","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\nimport { Cartographic, ImageMapLayerSettings, ImageSource, ServerError } from \"@itwin/core-common\";\r\nimport { IModelApp } from \"../../../../IModelApp\";\r\nimport {\r\n ArcGisErrorCode, ArcGisGeometryReaderJSON, ArcGISImageryProvider, ArcGISTileMap, ArcGisUtilities,\r\n FeatureGraphicsRenderer, ImageryMapTileTree, MapCartoRectangle, MapFeatureInfoOptions, MapLayerFeature,\r\n MapLayerFeatureInfo, MapLayerImageryProviderStatus, MapSubLayerFeatureInfo, QuadId,\r\n} from \"../../../../tile/internal\";\r\nimport { PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\r\nimport { Point2d, Range2d, Range2dProps, XYProps } from \"@itwin/core-geometry\";\r\nimport { IModelStatus, Logger } from \"@itwin/core-bentley\";\r\nimport { HitDetail } from \"../../../../HitDetail\";\r\nimport { ScreenViewport } from \"../../../../Viewport\";\r\n\r\n\r\nconst loggerCategory = \"MapLayerImageryProvider.ArcGISMapLayerImageryProvider\";\r\n\r\n/** @internal */\r\nexport interface ArcGISIdentifyImageDisplayProps {\r\n width: number;\r\n height: number;\r\n dpi: number;\r\n}\r\n\r\n/** @internal */\r\nexport interface ArcGISIdentifyLayersProps {\r\n prefix: \"top\"|\"visible\"|\"all\";\r\n layerIds?: string[];\r\n}\r\n\r\n/** @internal */\r\nexport interface ArcGISIdentifyRequestUrlProps {\r\n /** The geometry to identify on. Point only support */\r\n geometry: XYProps;\r\n\r\n /** The type of geometry specified by the geometry parameter. Point only support */\r\n geometryType: \"esriGeometryPoint\";\r\n\r\n /** The well-known ID of the spatial reference of the input and output geometries as well as the mapExtent. */\r\n sr?: number;\r\n\r\n /** The layers to perform the identify operation on. The default value is top.\r\n * Format: [top | visible | all]:layerId1,layerId2\r\n */\r\n layers?: ArcGISIdentifyLayersProps;\r\n\r\n /** The distance in screen pixels from the specified geometry within which the identify operation should be performed.\r\n * The value for the tolerance is an integer.\r\n */\r\n tolerance: number;\r\n\r\n /** The extent or bounding box of the map currently being viewed.\r\n * Format: <xmin>, <ymin>, <xmax>, <ymax>\r\n */\r\n mapExtent: Range2dProps;\r\n\r\n /** The screen image display parameters (width, height, and DPI) of the map being currently viewed. T\r\n * Format: <width>,<height>,<dpi>\r\n */\r\n imageDisplay: ArcGISIdentifyImageDisplayProps;\r\n\r\n /** If true, the result set will include the geometries associated with each result. The default is true.\r\n */\r\n returnGeometry?: boolean;\r\n\r\n /** This option can be used to specify the maximum allowable offset to be used for generalizing geometries returned by the identify operation.\r\n * The maxAllowableOffset is in the units of the sr.\r\n */\r\n maxAllowableOffset?: number;\r\n\r\n /** The response format. The default response format is html.\r\n */\r\n f?: \"json\"|\"html\";\r\n\r\n}\r\n\r\n/** @internal */\r\nexport class ArcGISIdentifyRequestUrl {\r\n public static fromJSON(baseUrl: URL|string, json: ArcGISIdentifyRequestUrlProps, srFractionDigits?: number): URL {\r\n\r\n const newUrl = new URL(baseUrl);\r\n newUrl.pathname = `${newUrl.pathname}/identify`;\r\n\r\n if (json.f) {\r\n newUrl.searchParams.append(\"f\", json.f);\r\n }\r\n\r\n const geomPt = Point2d.fromJSON(json.geometry);\r\n newUrl.searchParams.append(\"geometry\", `${this.toFixed(geomPt.x, srFractionDigits)},${this.toFixed(geomPt.y, srFractionDigits)}`);\r\n newUrl.searchParams.append(\"geometryType\", json.geometryType);\r\n\r\n if (json.sr) {\r\n newUrl.searchParams.append(\"sr\", `${json.sr}`);\r\n }\r\n\r\n if (json.layers) {\r\n newUrl.searchParams.append(\"layers\", `${json.layers.prefix}${json.layers.layerIds?.length ? `: ${json.layers.layerIds.join(\",\")}` : \"\"}`);\r\n }\r\n\r\n newUrl.searchParams.append(\"tolerance\", `${json.tolerance}`);\r\n\r\n newUrl.searchParams.append(\"mapExtent\", ArcGISIdentifyRequestUrl.getExtentString(json.mapExtent, srFractionDigits));\r\n\r\n newUrl.searchParams.append(\"imageDisplay\", `${json.imageDisplay.width},${json.imageDisplay.height},${json.imageDisplay.dpi}`);\r\n\r\n if (json.returnGeometry !== undefined) {\r\n newUrl.searchParams.append(\"returnGeometry\", json.returnGeometry ? \"true\" : \"false\");\r\n }\r\n\r\n if (json.maxAllowableOffset !== undefined) {\r\n newUrl.searchParams.append(\"maxAllowableOffset\", `${this.toFixed(json.maxAllowableOffset, srFractionDigits)}`);\r\n }\r\n\r\n return newUrl;\r\n }\r\n\r\n public static toFixed(value: number, srFractionDigits?: number) {\r\n return srFractionDigits === undefined ? value.toString() : value.toFixed(srFractionDigits);\r\n }\r\n\r\n public static getExtentString(range: Range2dProps, srFractionDigits?: number) {\r\n const extent = Range2d.fromJSON(range);\r\n const extentStringArray: string[] = [];\r\n extent.toFloat64Array().forEach((value) => extentStringArray.push(this.toFixed(value, srFractionDigits)));\r\n return extentStringArray.join(\",\");\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class ArcGISMapLayerImageryProvider extends ArcGISImageryProvider {\r\n private _maxDepthFromLod = 0;\r\n private _minDepthFromLod = 0;\r\n private _copyrightText = \"Copyright\";\r\n private _tileMapSupported = false;\r\n private _mapSupported = false;\r\n private _tilesOnly = false;\r\n private _tileMap: ArcGISTileMap|undefined;\r\n\r\n public serviceJson: any;\r\n constructor(settings: ImageMapLayerSettings) {\r\n super(settings, false);\r\n this._accessClient = IModelApp.mapLayerFormatRegistry.getAccessClient(settings.formatId);\r\n }\r\n\r\n protected override get _filterByCartoRange() { return false; } // Can't trust footprint ranges (USGS Hydro)\r\n\r\n public override get minimumZoomLevel() { return Math.max(super.minimumZoomLevel, this._minDepthFromLod); }\r\n public override get maximumZoomLevel() { return this._maxDepthFromLod > 0 ? this._maxDepthFromLod : super.maximumZoomLevel; }\r\n\r\n public uintToString(uintArray: any) {\r\n return Buffer.from(uintArray).toJSON();\r\n\r\n }\r\n\r\n private async fetchTile(row: number, column: number, zoomLevel: number) {\r\n const tileUrl: string = await this.constructUrl(row, column, zoomLevel);\r\n if (tileUrl.length === 0)\r\n return undefined;\r\n return this.fetch(new URL(tileUrl), { method: \"GET\" });\r\n }\r\n\r\n public override async loadTile(row: number, column: number, zoomLevel: number): Promise<ImageSource | undefined> {\r\n if ((this.status === MapLayerImageryProviderStatus.RequireAuth)) {\r\n return undefined;\r\n }\r\n\r\n try {\r\n const tileResponse = await this.fetchTile(row, column, zoomLevel);\r\n if (tileResponse === undefined)\r\n return undefined;\r\n\r\n if (!this._hasSuccessfullyFetchedTile) {\r\n this._hasSuccessfullyFetchedTile = true;\r\n }\r\n return await this.getImageFromTileResponse(tileResponse, zoomLevel);\r\n } catch (error) {\r\n Logger.logError(loggerCategory, `Error occurred when loading tile(${row},${column},${zoomLevel}) : ${String(error)}`);\r\n return undefined;\r\n }\r\n }\r\n\r\n protected override _generateChildIds(quadId: QuadId, resolveChildren: (childIds: QuadId[]) => void) {\r\n const childIds = this.getPotentialChildIds(quadId);\r\n if (quadId.level < Math.max(1, this.minimumZoomLevel-1)) {\r\n resolveChildren(childIds);\r\n return;\r\n }\r\n\r\n if (this._tileMap) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this._tileMap.getChildrenAvailability(childIds).then((availability) => {\r\n const availableChildIds = new Array<QuadId>();\r\n for (let i = 0; i < availability.length; i++)\r\n if (availability[i])\r\n availableChildIds.push(childIds[i]);\r\n\r\n resolveChildren (availableChildIds);\r\n });\r\n } else if (this._usesCachedTiles && this.cartoRange) {\r\n // Filter children by range\r\n const availableChildIds = new Array<QuadId>();\r\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\r\n for (let i = 0; i < childIds.length; i++) {\r\n const childExtent = this.getEPSG4326Extent(childIds[i].row, childIds[i].column, childIds[i].level);\r\n\r\n const childRange = MapCartoRectangle.fromDegrees(childExtent.longitudeLeft, childExtent.latitudeBottom, childExtent.longitudeRight, childExtent.latitudeTop);\r\n if (childRange.intersectsRange(this.cartoRange)) {\r\n availableChildIds.push(childIds[i]);\r\n }\r\n }\r\n resolveChildren (availableChildIds);\r\n } else {\r\n resolveChildren (childIds); // Resolve all children\r\n }\r\n }\r\n\r\n public override async initialize(): Promise<void> {\r\n\r\n const metadata = await this.getServiceJson();\r\n\r\n if (metadata?.content === undefined)\r\n throw new ServerError(IModelStatus.ValidationFailed, \"\");\r\n\r\n const json = metadata.content;\r\n if (json?.error?.code === ArcGisErrorCode.TokenRequired\r\n || json?.error?.code === ArcGisErrorCode.InvalidToken\r\n || json?.error?.code === ArcGisErrorCode.MissingPermissions\r\n ) {\r\n // Check again layer status, it might have change during await.\r\n if (this.status === MapLayerImageryProviderStatus.Valid) {\r\n this.setStatus(MapLayerImageryProviderStatus.RequireAuth);\r\n return; // By returning (i.e not throwing), we ensure the tileTree get created and current provider is preserved to report status.\r\n }\r\n }\r\n\r\n this.serviceJson = json;\r\n\r\n if (json.capabilities) {\r\n const capabilities = json.capabilities.split(\",\");\r\n\r\n this._querySupported = capabilities.includes(\"Query\");\r\n this._tileMapSupported = capabilities.includes(\"Tilemap\");\r\n this._mapSupported = capabilities.includes(\"Map\");\r\n this._tilesOnly = capabilities.includes(\"TilesOnly\");\r\n }\r\n\r\n if (json.copyrightText)\r\n this._copyrightText = json.copyrightText;\r\n\r\n this._usesCachedTiles = !!json.tileInfo;\r\n\r\n if (this._usesCachedTiles) {\r\n // Only EPSG:3857 is supported with pre-rendered tiles. Fall back to 'Export' queries if possible otherwise throw.\r\n if (!ArcGisUtilities.isEpsg3857Compatible(json.tileInfo)) {\r\n if (this._mapSupported && !this._tilesOnly) {\r\n this._usesCachedTiles = false;\r\n } else {\r\n throw new ServerError(IModelStatus.ValidationFailed, \"Invalid coordinate system\");\r\n }\r\n }\r\n }\r\n\r\n if (this._usesCachedTiles) {\r\n // Read max LOD\r\n if (json.maxScale !== undefined && json.maxScale !== 0 && Array.isArray(json.tileInfo.lods)) {\r\n for (; this._maxDepthFromLod < json.tileInfo.lods.length && json.tileInfo.lods[this._maxDepthFromLod].scale > json.maxScale; this._maxDepthFromLod++)\r\n ;\r\n }\r\n\r\n // Create tile map object only if we are going to request tiles from this server and it support tilemap requests.\r\n if (this._tileMapSupported) {\r\n const fetch = async (url: URL, options?: RequestInit): Promise<Response> => {\r\n return this.fetch(url, options);\r\n };\r\n this._tileMap = new ArcGISTileMap(this._settings.url, this._settings, fetch);\r\n }\r\n }\r\n\r\n // Read range using fullextent from service metadata\r\n if (json.fullExtent) {\r\n if (json.fullExtent.spatialReference.latestWkid === 3857 || json.fullExtent.spatialReference.wkid === 102100) {\r\n const range3857 = Range2d.createFrom({\r\n low: {x: json.fullExtent.xmin, y: json.fullExtent.ymin},\r\n high: {x: json.fullExtent.xmax, y: json.fullExtent.ymax} });\r\n\r\n const west = this.getEPSG4326Lon(range3857.xLow);\r\n const south = this.getEPSG4326Lat(range3857.yLow);\r\n const east = this.getEPSG4326Lon(range3857.xHigh);\r\n const north = this.getEPSG4326Lat(range3857.yHigh);\r\n this.cartoRange = MapCartoRectangle.fromDegrees(west, south, east, north);\r\n }\r\n }\r\n\r\n // Read minLOD if available\r\n if (json.minLOD !== undefined) {\r\n const minLod = parseInt(json.minLOD, 10);\r\n if (!Number.isNaN(minLod)) {\r\n this._minDepthFromLod = minLod;\r\n }\r\n } else if (json.minScale) {\r\n // Read min LOD using minScale\r\n const minScale = json.minScale;\r\n if (json.tileInfo?.lods !== undefined && Array.isArray(json.tileInfo.lods)) {\r\n for (const lod of json.tileInfo.lods) {\r\n if (lod.scale < minScale) {\r\n this._minDepthFromLod = lod.level;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [addAttributions] instead. */\r\n public override addLogoCards(cards: HTMLTableElement): void {\r\n if (!cards.dataset.arcGisLogoCard) {\r\n cards.dataset.arcGisLogoCard = \"true\";\r\n cards.appendChild(IModelApp.makeLogoCard({ heading: \"ArcGIS\", notice: this._copyrightText }));\r\n }\r\n }\r\n\r\n public override async addAttributions(cards: HTMLTableElement, _vp: ScreenViewport): Promise<void> {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return Promise.resolve(this.addLogoCards(cards));\r\n }\r\n\r\n // Translates the provided Cartographic into a EPSG:3857 point, and retrieve information.\r\n // tolerance is in pixels\r\n private async getIdentifyData(quadId: QuadId, carto: Cartographic, tolerance: number, returnGeometry?: boolean, maxAllowableOffset?: number): Promise<any> {\r\n\r\n const bbox = this.getEPSG3857Extent(quadId.row, quadId.column, quadId.level);\r\n const layerIds = new Array<string>();\r\n this._settings.subLayers.forEach((subLayer) => {\r\n if (this._settings.isSubLayerVisible(subLayer))\r\n layerIds.push(subLayer.idString);\r\n });\r\n const urlObj = ArcGISIdentifyRequestUrl.fromJSON(this._settings.url, {\r\n f: \"json\",\r\n geometry: {x: this.getEPSG3857X(carto.longitudeDegrees), y: this.getEPSG3857Y(carto.latitudeDegrees)},\r\n geometryType: \"esriGeometryPoint\",\r\n tolerance,\r\n mapExtent: {low: {x: bbox.left, y: bbox.bottom}, high: {x: bbox.right, y: bbox.top}},\r\n sr: 3857,\r\n imageDisplay: {width: this.tileSize, height: this.tileSize, dpi: 96},\r\n layers: {prefix: \"top\", layerIds},\r\n returnGeometry,\r\n maxAllowableOffset}, 3 /* 1mm accuracy*/);\r\n\r\n const response = await this.fetch(urlObj, { method: \"GET\" } );\r\n return response.json();\r\n }\r\n\r\n // Makes an identify request to ESRI MapService server, and return it as a list of formatted strings\r\n public override async getToolTip(strings: string[], quadId: QuadId, carto: Cartographic, tree: ImageryMapTileTree): Promise<void> {\r\n await super.getToolTip(strings, quadId, carto, tree);\r\n\r\n if (!this._querySupported)\r\n return;\r\n\r\n const stringSet = new Set<string>();\r\n const json = await this.getIdentifyData(quadId, carto, 1);\r\n\r\n if (json && Array.isArray(json.results)) {\r\n for (const result of json.results) {\r\n if (result.attributes !== undefined && result.attributes[result.displayFieldName] !== undefined) {\r\n const thisString = `${result.displayFieldName}: ${result.attributes[result.displayFieldName]}`;\r\n if (!stringSet.has(thisString)) {\r\n strings.push(thisString);\r\n stringSet.add(thisString);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Makes an identify request to ESRI MapService , and return it as a list MapLayerFeatureInfo object\r\n public override async getFeatureInfo(featureInfos: MapLayerFeatureInfo[], quadId: QuadId, carto: Cartographic, _tree: ImageryMapTileTree, hit: HitDetail, options?: MapFeatureInfoOptions): Promise<void> {\r\n if (!this._querySupported)\r\n return;\r\n\r\n const tileExtent = this.getEPSG3857Extent(quadId.row, quadId.column, quadId.level);\r\n const toleranceWorld = (tileExtent.top - tileExtent.bottom) / this.tileSize;\r\n const maxAllowableOffsetFactor = 2;\r\n const maxAllowableOffset = maxAllowableOffsetFactor*toleranceWorld;\r\n\r\n const tolerancePixel = options?.tolerance ?? 7;\r\n const json = await this.getIdentifyData(quadId, carto, tolerancePixel, true, maxAllowableOffset);\r\n if (json && Array.isArray(json.results)) {\r\n const renderer = new FeatureGraphicsRenderer({viewport: hit.viewport, crs: \"webMercator\"});\r\n\r\n const layerInfo: MapLayerFeatureInfo = { layerName: this._settings.name, subLayerInfos: [] };\r\n\r\n // The 'identify' service returns us a flat/unordered list of records..\r\n // results may represent features for the a common subLayer.\r\n // For simplicity, we group together features for a given sub-layer.\r\n const subLayers = new Map<string, MapSubLayerFeatureInfo> ();\r\n\r\n for (const result of json.results) {\r\n\r\n let subLayerInfo = subLayers.get(result.layerName);\r\n if (!subLayerInfo) {\r\n subLayerInfo = {\r\n subLayerName: result.layerName ?? \"\",\r\n displayFieldName: result.displayFieldName,\r\n features: [],\r\n };\r\n subLayers.set(result.layerName, subLayerInfo);\r\n }\r\n const feature: MapLayerFeature = {geometries: [], attributes: []};\r\n\r\n // Read all feature attributes\r\n for (const [key, value] of Object.entries(result.attributes)) {\r\n // Convert everything to string for now\r\n const strValue = String(value);\r\n feature.attributes.push({\r\n value: { valueFormat: PropertyValueFormat.Primitive, value: strValue, displayValue: strValue },\r\n property: { name: key, displayLabel: key, typename: StandardTypeNames.String },\r\n });\r\n }\r\n\r\n // Read feature geometries\r\n const geomReader = new ArcGisGeometryReaderJSON(result.geometryType, renderer);\r\n await geomReader.readGeometry(result.geometry);\r\n const graphics = renderer.moveGraphics();\r\n feature.geometries = graphics.map((graphic) => {\r\n return {graphic};\r\n });\r\n subLayerInfo.features.push(feature);\r\n\r\n }\r\n\r\n for ( const value of subLayers.values()) {\r\n // layerInfo.subLayerInfos is initalized above to an empty array.\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n layerInfo.subLayerInfos!.push(value);\r\n }\r\n\r\n featureInfos.push(layerInfo);\r\n }\r\n }\r\n\r\n protected getLayerString(prefix = \"show\"): string {\r\n const layers = new Array<string>();\r\n this._settings.subLayers.forEach((subLayer) => {\r\n if (this._settings.isSubLayerVisible(subLayer))\r\n layers.push(subLayer.idString);\r\n });\r\n\r\n return `${prefix}: ${layers.join(\",\")} `;\r\n }\r\n\r\n // construct the Url from the desired Tile\r\n public async constructUrl(row: number, column: number, zoomLevel: number): Promise<string> {\r\n let tmpUrl;\r\n if (this._usesCachedTiles) {\r\n tmpUrl = `${this._settings.url}/tile/${zoomLevel}/${row}/${column} `;\r\n } else {\r\n const bboxString = `${this.getEPSG3857ExtentString(row, column, zoomLevel)}&bboxSR=3857`;\r\n tmpUrl = `${this._settings.url}/export?bbox=${bboxString}&size=${this.tileSize},${this.tileSize}&layers=${this.getLayerString()}&format=png&transparent=${this.transparentBackgroundString}&f=image&sr=3857&imagesr=3857`;\r\n }\r\n return tmpUrl;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ArcGISMapLayerImageryProvider.js","sourceRoot":"","sources":["../../../../../../src/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,oDAAmG;AACnG,qDAAkD;AAClD,wDAImC;AACnC,0DAA+E;AAC/E,wDAA+E;AAC/E,sDAA2D;AAK3D,MAAM,cAAc,GAAI,uDAAuD,CAAC;AA6DhF,gBAAgB;AAChB,MAAa,wBAAwB;IAC5B,MAAM,CAAC,QAAQ,CAAC,OAAmB,EAAE,IAAmC,EAAE,gBAAyB;QAExG,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;QAChC,MAAM,CAAC,QAAQ,GAAG,GAAG,MAAM,CAAC,QAAQ,WAAW,CAAC;QAEhD,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAC1C,CAAC;QAED,MAAM,MAAM,GAAG,uBAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/C,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU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MAAM;QACtC,MAAM,MAAM,GAAG,IAAI,KAAK,EAAU,CAAC;QACnC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;YAC5C,IAAI,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,QAAQ,CAAC;gBAC5C,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,MAAM,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IAC3C,CAAC;IAED,0CAA0C;IACnC,KAAK,CAAC,YAAY,CAAC,GAAW,EAAE,MAAc,EAAE,SAAiB;QACtE,IAAI,MAAM,CAAC;QACX,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,SAAS,SAAS,IAAI,GAAG,IAAI,MAAM,GAAG,CAAC;QACvE,CAAC;aAAM,CAAC;YACN,MAAM,UAAU,GAAG,GAAG,IAAI,CAAC,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,cAAc,CAAC;YACzF,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,gBAAgB,UAAU,SAAS,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,WAAW,IAAI,CAAC,cAAc,EAAE,2BAA2B,IAAI,CAAC,2BAA2B,+BAA+B,CAAC;QAC5N,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA9UD,sEA8UC","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\nimport { Cartographic, ImageMapLayerSettings, ImageSource, ServerError } from \"@itwin/core-common\";\r\nimport { IModelApp } from \"../../../../IModelApp\";\r\nimport {\r\n ArcGisErrorCode, ArcGisGeometryReaderJSON, ArcGISImageryProvider, ArcGISTileMap, ArcGisUtilities,\r\n FeatureGraphicsRenderer, ImageryMapTileTree, MapCartoRectangle, MapFeatureInfoOptions, MapLayerFeature,\r\n MapLayerFeatureInfo, MapLayerImageryProviderStatus, MapSubLayerFeatureInfo, QuadId,\r\n} from \"../../../../tile/internal\";\r\nimport { PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\r\nimport { Point2d, Range2d, Range2dProps, XYProps } from \"@itwin/core-geometry\";\r\nimport { IModelStatus, Logger } from \"@itwin/core-bentley\";\r\nimport { HitDetail } from \"../../../../HitDetail\";\r\nimport { ScreenViewport } from \"../../../../Viewport\";\r\n\r\n\r\nconst loggerCategory = \"MapLayerImageryProvider.ArcGISMapLayerImageryProvider\";\r\n\r\n/** @internal */\r\nexport interface ArcGISIdentifyImageDisplayProps {\r\n width: number;\r\n height: number;\r\n dpi: number;\r\n}\r\n\r\n/** @internal */\r\nexport interface ArcGISIdentifyLayersProps {\r\n prefix: \"top\"|\"visible\"|\"all\";\r\n layerIds?: string[];\r\n}\r\n\r\n/** @internal */\r\nexport interface ArcGISIdentifyRequestUrlProps {\r\n /** The geometry to identify on. Point only support */\r\n geometry: XYProps;\r\n\r\n /** The type of geometry specified by the geometry parameter. Point only support */\r\n geometryType: \"esriGeometryPoint\";\r\n\r\n /** The well-known ID of the spatial reference of the input and output geometries as well as the mapExtent. */\r\n sr?: number;\r\n\r\n /** The layers to perform the identify operation on. The default value is top.\r\n * Format: [top | visible | all]:layerId1,layerId2\r\n */\r\n layers?: ArcGISIdentifyLayersProps;\r\n\r\n /** The distance in screen pixels from the specified geometry within which the identify operation should be performed.\r\n * The value for the tolerance is an integer.\r\n */\r\n tolerance: number;\r\n\r\n /** The extent or bounding box of the map currently being viewed.\r\n * Format: <xmin>, <ymin>, <xmax>, <ymax>\r\n */\r\n mapExtent: Range2dProps;\r\n\r\n /** The screen image display parameters (width, height, and DPI) of the map being currently viewed. T\r\n * Format: <width>,<height>,<dpi>\r\n */\r\n imageDisplay: ArcGISIdentifyImageDisplayProps;\r\n\r\n /** If true, the result set will include the geometries associated with each result. The default is true.\r\n */\r\n returnGeometry?: boolean;\r\n\r\n /** This option can be used to specify the maximum allowable offset to be used for generalizing geometries returned by the identify operation.\r\n * The maxAllowableOffset is in the units of the sr.\r\n */\r\n maxAllowableOffset?: number;\r\n\r\n /** The response format. The default response format is html.\r\n */\r\n f?: \"json\"|\"html\";\r\n\r\n}\r\n\r\n/** @internal */\r\nexport class ArcGISIdentifyRequestUrl {\r\n public static fromJSON(baseUrl: URL|string, json: ArcGISIdentifyRequestUrlProps, srFractionDigits?: number): URL {\r\n\r\n const newUrl = new URL(baseUrl);\r\n newUrl.pathname = `${newUrl.pathname}/identify`;\r\n\r\n if (json.f) {\r\n newUrl.searchParams.append(\"f\", json.f);\r\n }\r\n\r\n const geomPt = Point2d.fromJSON(json.geometry);\r\n newUrl.searchParams.append(\"geometry\", `${this.toFixed(geomPt.x, srFractionDigits)},${this.toFixed(geomPt.y, srFractionDigits)}`);\r\n newUrl.searchParams.append(\"geometryType\", json.geometryType);\r\n\r\n if (json.sr) {\r\n newUrl.searchParams.append(\"sr\", `${json.sr}`);\r\n }\r\n\r\n if (json.layers) {\r\n newUrl.searchParams.append(\"layers\", `${json.layers.prefix}${json.layers.layerIds?.length ? `: ${json.layers.layerIds.join(\",\")}` : \"\"}`);\r\n }\r\n\r\n newUrl.searchParams.append(\"tolerance\", `${json.tolerance}`);\r\n\r\n newUrl.searchParams.append(\"mapExtent\", ArcGISIdentifyRequestUrl.getExtentString(json.mapExtent, srFractionDigits));\r\n\r\n newUrl.searchParams.append(\"imageDisplay\", `${json.imageDisplay.width},${json.imageDisplay.height},${json.imageDisplay.dpi}`);\r\n\r\n if (json.returnGeometry !== undefined) {\r\n newUrl.searchParams.append(\"returnGeometry\", json.returnGeometry ? \"true\" : \"false\");\r\n }\r\n\r\n if (json.maxAllowableOffset !== undefined) {\r\n newUrl.searchParams.append(\"maxAllowableOffset\", `${this.toFixed(json.maxAllowableOffset, srFractionDigits)}`);\r\n }\r\n\r\n return newUrl;\r\n }\r\n\r\n public static toFixed(value: number, srFractionDigits?: number) {\r\n return srFractionDigits === undefined ? value.toString() : value.toFixed(srFractionDigits);\r\n }\r\n\r\n public static getExtentString(range: Range2dProps, srFractionDigits?: number) {\r\n const extent = Range2d.fromJSON(range);\r\n const extentStringArray: string[] = [];\r\n extent.toFloat64Array().forEach((value) => extentStringArray.push(this.toFixed(value, srFractionDigits)));\r\n return extentStringArray.join(\",\");\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class ArcGISMapLayerImageryProvider extends ArcGISImageryProvider {\r\n private _maxDepthFromLod = 0;\r\n private _minDepthFromLod = 0;\r\n private _copyrightText = \"Copyright\";\r\n private _tileMapSupported = false;\r\n private _mapSupported = false;\r\n private _tilesOnly = false;\r\n private _tileMap: ArcGISTileMap|undefined;\r\n\r\n public serviceJson: any;\r\n constructor(settings: ImageMapLayerSettings) {\r\n super(settings, false);\r\n this._accessClient = IModelApp.mapLayerFormatRegistry.getAccessClient(settings.formatId);\r\n }\r\n\r\n protected override get _filterByCartoRange() { return false; } // Can't trust footprint ranges (USGS Hydro)\r\n\r\n public override get minimumZoomLevel() { return Math.max(super.minimumZoomLevel, this._minDepthFromLod); }\r\n public override get maximumZoomLevel() { return this._maxDepthFromLod > 0 ? this._maxDepthFromLod : super.maximumZoomLevel; }\r\n\r\n public uintToString(uintArray: any) {\r\n return Buffer.from(uintArray).toJSON();\r\n\r\n }\r\n\r\n private async fetchTile(row: number, column: number, zoomLevel: number) {\r\n const tileUrl: string = await this.constructUrl(row, column, zoomLevel);\r\n if (tileUrl.length === 0)\r\n return undefined;\r\n return this.fetch(new URL(tileUrl), { method: \"GET\" });\r\n }\r\n\r\n public override async loadTile(row: number, column: number, zoomLevel: number): Promise<ImageSource | undefined> {\r\n if ((this.status === MapLayerImageryProviderStatus.RequireAuth)) {\r\n return undefined;\r\n }\r\n\r\n try {\r\n const tileResponse = await this.fetchTile(row, column, zoomLevel);\r\n if (tileResponse === undefined)\r\n return undefined;\r\n\r\n if (!this._hasSuccessfullyFetchedTile) {\r\n this._hasSuccessfullyFetchedTile = true;\r\n }\r\n return await this.getImageFromTileResponse(tileResponse, zoomLevel);\r\n } catch (error) {\r\n Logger.logError(loggerCategory, `Error occurred when loading tile(${row},${column},${zoomLevel}) : ${String(error)}`);\r\n return undefined;\r\n }\r\n }\r\n\r\n protected override _generateChildIds(quadId: QuadId, resolveChildren: (childIds: QuadId[]) => void) {\r\n const childIds = this.getPotentialChildIds(quadId);\r\n if (quadId.level < Math.max(1, this.minimumZoomLevel-1)) {\r\n resolveChildren(childIds);\r\n return;\r\n }\r\n\r\n if (this._tileMap) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this._tileMap.getChildrenAvailability(childIds).then((availability) => {\r\n const availableChildIds = new Array<QuadId>();\r\n for (let i = 0; i < availability.length; i++)\r\n if (availability[i])\r\n availableChildIds.push(childIds[i]);\r\n\r\n resolveChildren (availableChildIds);\r\n });\r\n } else if (this._usesCachedTiles && this.cartoRange) {\r\n // Filter children by range\r\n const availableChildIds = new Array<QuadId>();\r\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\r\n for (let i = 0; i < childIds.length; i++) {\r\n const childExtent = this.getEPSG4326Extent(childIds[i].row, childIds[i].column, childIds[i].level);\r\n\r\n const childRange = MapCartoRectangle.fromDegrees(childExtent.longitudeLeft, childExtent.latitudeBottom, childExtent.longitudeRight, childExtent.latitudeTop);\r\n if (childRange.intersectsRange(this.cartoRange)) {\r\n availableChildIds.push(childIds[i]);\r\n }\r\n }\r\n resolveChildren (availableChildIds);\r\n } else {\r\n resolveChildren (childIds); // Resolve all children\r\n }\r\n }\r\n\r\n public override async initialize(): Promise<void> {\r\n\r\n const metadata = await this.getServiceJson();\r\n\r\n if (metadata?.content === undefined)\r\n throw new ServerError(IModelStatus.ValidationFailed, \"\");\r\n\r\n const json = metadata.content;\r\n if (json?.error?.code === ArcGisErrorCode.TokenRequired\r\n || json?.error?.code === ArcGisErrorCode.InvalidToken\r\n || json?.error?.code === ArcGisErrorCode.MissingPermissions\r\n ) {\r\n // Check again layer status, it might have change during await.\r\n if (this.status === MapLayerImageryProviderStatus.Valid) {\r\n this.setStatus(MapLayerImageryProviderStatus.RequireAuth);\r\n return; // By returning (i.e not throwing), we ensure the tileTree get created and current provider is preserved to report status.\r\n }\r\n }\r\n\r\n this.serviceJson = json;\r\n\r\n if (json.capabilities) {\r\n const capabilities = json.capabilities.split(\",\");\r\n\r\n this._querySupported = capabilities.includes(\"Query\");\r\n this._tileMapSupported = capabilities.includes(\"Tilemap\");\r\n this._mapSupported = capabilities.includes(\"Map\");\r\n this._tilesOnly = capabilities.includes(\"TilesOnly\");\r\n }\r\n\r\n if (json.copyrightText)\r\n this._copyrightText = json.copyrightText;\r\n\r\n this._usesCachedTiles = !!json.tileInfo;\r\n\r\n if (this._usesCachedTiles) {\r\n // Only EPSG:3857 is supported with pre-rendered tiles. Fall back to 'Export' queries if possible otherwise throw.\r\n if (!ArcGisUtilities.isEpsg3857Compatible(json.tileInfo)) {\r\n if (this._mapSupported && !this._tilesOnly) {\r\n this._usesCachedTiles = false;\r\n } else {\r\n throw new ServerError(IModelStatus.ValidationFailed, \"Invalid coordinate system\");\r\n }\r\n }\r\n }\r\n\r\n if (this._usesCachedTiles) {\r\n // Read max LOD\r\n if (json.maxScale !== undefined && json.maxScale !== 0 && Array.isArray(json.tileInfo.lods)) {\r\n for (; this._maxDepthFromLod < json.tileInfo.lods.length && json.tileInfo.lods[this._maxDepthFromLod].scale > json.maxScale; this._maxDepthFromLod++)\r\n ;\r\n }\r\n\r\n // Create tile map object only if we are going to request tiles from this server and it support tilemap requests.\r\n if (this._tileMapSupported) {\r\n const fetch = async (url: URL, options?: RequestInit): Promise<Response> => {\r\n return this.fetch(url, options);\r\n };\r\n this._tileMap = new ArcGISTileMap(this._settings.url, this._settings, fetch);\r\n }\r\n }\r\n\r\n // Read range using fullextent from service metadata\r\n if (json.fullExtent) {\r\n if (json.fullExtent.spatialReference.latestWkid === 3857 || json.fullExtent.spatialReference.wkid === 102100) {\r\n const range3857 = Range2d.createFrom({\r\n low: {x: json.fullExtent.xmin, y: json.fullExtent.ymin},\r\n high: {x: json.fullExtent.xmax, y: json.fullExtent.ymax} });\r\n\r\n const west = this.getEPSG4326Lon(range3857.xLow);\r\n const south = this.getEPSG4326Lat(range3857.yLow);\r\n const east = this.getEPSG4326Lon(range3857.xHigh);\r\n const north = this.getEPSG4326Lat(range3857.yHigh);\r\n this.cartoRange = MapCartoRectangle.fromDegrees(west, south, east, north);\r\n }\r\n }\r\n\r\n // Read minLOD if available\r\n if (json.minLOD !== undefined) {\r\n const minLod = parseInt(json.minLOD, 10);\r\n if (!Number.isNaN(minLod)) {\r\n this._minDepthFromLod = minLod;\r\n }\r\n } else if (json.minScale) {\r\n // Read min LOD using minScale\r\n const minScale = json.minScale;\r\n if (json.tileInfo?.lods !== undefined && Array.isArray(json.tileInfo.lods)) {\r\n for (const lod of json.tileInfo.lods) {\r\n if (lod.scale < minScale) {\r\n this._minDepthFromLod = lod.level;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n /** @deprecated in 5.0 - might be removed in next major version. Use [addAttributions] instead. */\r\n public override addLogoCards(cards: HTMLTableElement): void {\r\n if (!cards.dataset.arcGisLogoCard) {\r\n cards.dataset.arcGisLogoCard = \"true\";\r\n cards.appendChild(IModelApp.makeLogoCard({ heading: \"ArcGIS\", notice: this._copyrightText }));\r\n }\r\n }\r\n\r\n public override async addAttributions(cards: HTMLTableElement, _vp: ScreenViewport): Promise<void> {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return Promise.resolve(this.addLogoCards(cards));\r\n }\r\n\r\n // Translates the provided Cartographic into a EPSG:3857 point, and retrieve information.\r\n // tolerance is in pixels\r\n private async getIdentifyData(quadId: QuadId, carto: Cartographic, tolerance: number, returnGeometry?: boolean, maxAllowableOffset?: number): Promise<any> {\r\n\r\n const bbox = this.getEPSG3857Extent(quadId.row, quadId.column, quadId.level);\r\n const layerIds = new Array<string>();\r\n this._settings.subLayers.forEach((subLayer) => {\r\n if (this._settings.isSubLayerVisible(subLayer))\r\n layerIds.push(subLayer.idString);\r\n });\r\n const urlObj = ArcGISIdentifyRequestUrl.fromJSON(this._settings.url, {\r\n f: \"json\",\r\n geometry: {x: this.getEPSG3857X(carto.longitudeDegrees), y: this.getEPSG3857Y(carto.latitudeDegrees)},\r\n geometryType: \"esriGeometryPoint\",\r\n tolerance,\r\n mapExtent: {low: {x: bbox.left, y: bbox.bottom}, high: {x: bbox.right, y: bbox.top}},\r\n sr: 3857,\r\n imageDisplay: {width: this.tileSize, height: this.tileSize, dpi: 96},\r\n layers: {prefix: \"top\", layerIds},\r\n returnGeometry,\r\n maxAllowableOffset}, 3 /* 1mm accuracy*/);\r\n\r\n const response = await this.fetch(urlObj, { method: \"GET\" } );\r\n return response.json();\r\n }\r\n\r\n // Makes an identify request to ESRI MapService server, and return it as a list of formatted strings\r\n public override async getToolTip(strings: string[], quadId: QuadId, carto: Cartographic, tree: ImageryMapTileTree): Promise<void> {\r\n await super.getToolTip(strings, quadId, carto, tree);\r\n\r\n if (!this._querySupported)\r\n return;\r\n\r\n const stringSet = new Set<string>();\r\n const json = await this.getIdentifyData(quadId, carto, 1);\r\n\r\n if (json && Array.isArray(json.results)) {\r\n for (const result of json.results) {\r\n if (result.attributes !== undefined && result.attributes[result.displayFieldName] !== undefined) {\r\n const thisString = `${result.displayFieldName}: ${result.attributes[result.displayFieldName]}`;\r\n if (!stringSet.has(thisString)) {\r\n strings.push(thisString);\r\n stringSet.add(thisString);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Makes an identify request to ESRI MapService , and return it as a list MapLayerFeatureInfo object\r\n public override async getFeatureInfo(featureInfos: MapLayerFeatureInfo[], quadId: QuadId, carto: Cartographic, _tree: ImageryMapTileTree, hit: HitDetail, options?: MapFeatureInfoOptions): Promise<void> {\r\n if (!this._querySupported)\r\n return;\r\n\r\n const tileExtent = this.getEPSG3857Extent(quadId.row, quadId.column, quadId.level);\r\n const toleranceWorld = (tileExtent.top - tileExtent.bottom) / this.tileSize;\r\n const maxAllowableOffsetFactor = 2;\r\n const maxAllowableOffset = maxAllowableOffsetFactor*toleranceWorld;\r\n\r\n const tolerancePixel = options?.tolerance ?? 7;\r\n const json = await this.getIdentifyData(quadId, carto, tolerancePixel, true, maxAllowableOffset);\r\n if (json && Array.isArray(json.results)) {\r\n const renderer = new FeatureGraphicsRenderer({viewport: hit.viewport, crs: \"webMercator\"});\r\n\r\n const layerInfo: MapLayerFeatureInfo = { layerName: this._settings.name, subLayerInfos: [] };\r\n\r\n // The 'identify' service returns us a flat/unordered list of records..\r\n // results may represent features for the a common subLayer.\r\n // For simplicity, we group together features for a given sub-layer.\r\n const subLayers = new Map<string, MapSubLayerFeatureInfo> ();\r\n\r\n for (const result of json.results) {\r\n\r\n let subLayerInfo = subLayers.get(result.layerName);\r\n if (!subLayerInfo) {\r\n subLayerInfo = {\r\n subLayerName: result.layerName ?? \"\",\r\n displayFieldName: result.displayFieldName,\r\n features: [],\r\n };\r\n subLayers.set(result.layerName, subLayerInfo);\r\n }\r\n const feature: MapLayerFeature = {geometries: [], attributes: []};\r\n\r\n // Read all feature attributes\r\n for (const [key, value] of Object.entries(result.attributes)) {\r\n // Convert everything to string for now\r\n const strValue = String(value);\r\n feature.attributes.push({\r\n value: { valueFormat: PropertyValueFormat.Primitive, value: strValue, displayValue: strValue },\r\n property: { name: key, displayLabel: key, typename: StandardTypeNames.String },\r\n });\r\n }\r\n\r\n // Read feature geometries\r\n const geomReader = new ArcGisGeometryReaderJSON(result.geometryType, renderer);\r\n await geomReader.readGeometry(result.geometry);\r\n const graphics = renderer.moveGraphics();\r\n feature.geometries = graphics.map((graphic) => {\r\n return {graphic};\r\n });\r\n subLayerInfo.features.push(feature);\r\n\r\n }\r\n\r\n for ( const value of subLayers.values()) {\r\n // layerInfo.subLayerInfos is initalized above to an empty array.\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n layerInfo.subLayerInfos!.push(value);\r\n }\r\n\r\n featureInfos.push(layerInfo);\r\n }\r\n }\r\n\r\n protected getLayerString(prefix = \"show\"): string {\r\n const layers = new Array<string>();\r\n this._settings.subLayers.forEach((subLayer) => {\r\n if (this._settings.isSubLayerVisible(subLayer))\r\n layers.push(subLayer.idString);\r\n });\r\n\r\n return `${prefix}: ${layers.join(\",\")} `;\r\n }\r\n\r\n // construct the Url from the desired Tile\r\n public async constructUrl(row: number, column: number, zoomLevel: number): Promise<string> {\r\n let tmpUrl;\r\n if (this._usesCachedTiles) {\r\n tmpUrl = `${this._settings.url}/tile/${zoomLevel}/${row}/${column} `;\r\n } else {\r\n const bboxString = `${this.getEPSG3857ExtentString(row, column, zoomLevel)}&bboxSR=3857`;\r\n tmpUrl = `${this._settings.url}/export?bbox=${bboxString}&size=${this.tileSize},${this.tileSize}&layers=${this.getLayerString()}&format=png&transparent=${this.transparentBackgroundString}&f=image&sr=3857&imagesr=3857`;\r\n }\r\n return tmpUrl;\r\n }\r\n}\r\n"]}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { ImageMapLayerSettings } from "@itwin/core-common";
|
|
5
5
|
import { ScreenViewport } from "../../../../Viewport";
|
|
6
6
|
import { MapLayerImageryProvider } from "../../../../tile/internal";
|
|
7
|
-
/** @deprecated in 5.11.0. Bing Maps imagery is deprecated. For basemap imagery providers, see `@itwin/map-layers-formats`. */
|
|
7
|
+
/** @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Bing Maps imagery is deprecated. For basemap imagery providers, see `@itwin/map-layers-formats`. */
|
|
8
8
|
export declare class BingMapsImageryLayerProvider extends MapLayerImageryProvider {
|
|
9
9
|
private _urlTemplate?;
|
|
10
10
|
private _urlSubdomains?;
|
|
@@ -20,7 +20,7 @@ export declare class BingMapsImageryLayerProvider extends MapLayerImageryProvide
|
|
|
20
20
|
private tileXYToQuadKey;
|
|
21
21
|
constructUrl(row: number, column: number, zoomLevel: number): Promise<string>;
|
|
22
22
|
private getMatchingAttributions;
|
|
23
|
-
/** @deprecated in 5.0 -
|
|
23
|
+
/** @deprecated in 5.0 - might be removed in next major version. Use [addAttributions] instead. */
|
|
24
24
|
addLogoCards(cards: HTMLTableElement, vp: ScreenViewport): void;
|
|
25
25
|
addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void>;
|
|
26
26
|
initialize(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BingImageryProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/tile/map/ImageryProviders/BingImageryProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,qBAAqB,EAAe,MAAM,oBAAoB,CAAC;AAGxE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,uBAAuB,EAExB,MAAM,2BAA2B,CAAC;AAoDnC,
|
|
1
|
+
{"version":3,"file":"BingImageryProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/tile/map/ImageryProviders/BingImageryProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,qBAAqB,EAAe,MAAM,oBAAoB,CAAC;AAGxE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,uBAAuB,EAExB,MAAM,2BAA2B,CAAC;AAoDnC,2KAA2K;AAC3K,qBAAa,4BAA6B,SAAQ,uBAAuB;IACvE,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,cAAc,CAAC,CAAW;IAClC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,aAAa,CAAC,CAAoB;IAC1C,OAAO,CAAC,gBAAgB,CAAkB;IAC1C,OAAO,CAAC,QAAQ,CAAS;gBAEb,QAAQ,EAAE,qBAAqB;IAQ3C,IAAW,SAAS,IAAI,MAAM,CAA4B;IAC1D,IAAW,UAAU,IAAI,MAAM,CAA6B;IAE5D,OAAO,CAAC,eAAe;IAuBV,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAa1F,OAAO,CAAC,uBAAuB;IAqB9B,kGAAkG;IACnF,YAAY,CAAC,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAAE,cAAc,GAAG,IAAI;IAiBzD,eAAe,CAAC,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAM3E,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IA+BjD,OAAO,CAAC,gBAAgB;CAezB"}
|
|
@@ -69,7 +69,7 @@ class BingAttribution {
|
|
|
69
69
|
function replaceHttpWithHttps(originalUrl) {
|
|
70
70
|
return originalUrl.startsWith("http:") ? "https:".concat(originalUrl.slice(5)) : originalUrl;
|
|
71
71
|
}
|
|
72
|
-
/** @deprecated in 5.11.0. Bing Maps imagery is deprecated. For basemap imagery providers, see `@itwin/map-layers-formats`. */
|
|
72
|
+
/** @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Bing Maps imagery is deprecated. For basemap imagery providers, see `@itwin/map-layers-formats`. */
|
|
73
73
|
class BingMapsImageryLayerProvider extends internal_1.MapLayerImageryProvider {
|
|
74
74
|
_urlTemplate;
|
|
75
75
|
_urlSubdomains;
|
|
@@ -138,7 +138,7 @@ class BingMapsImageryLayerProvider extends internal_1.MapLayerImageryProvider {
|
|
|
138
138
|
}
|
|
139
139
|
return matchingAttributions;
|
|
140
140
|
}
|
|
141
|
-
/** @deprecated in 5.0 -
|
|
141
|
+
/** @deprecated in 5.0 - might be removed in next major version. Use [addAttributions] instead. */
|
|
142
142
|
addLogoCards(cards, vp) {
|
|
143
143
|
const tiles = IModelApp_1.IModelApp.tileAdmin.getTilesForUser(vp)?.selected;
|
|
144
144
|
const matchingAttributions = this.getMatchingAttributions(tiles);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BingImageryProvider.js","sourceRoot":"","sources":["../../../../../../src/internal/tile/map/ImageryProviders/BingImageryProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAwF;AAGxF,yDAAsD;AACtD,qDAAkD;AAElD,wDAGmC;AAEnC;GACG;AACH,MAAM,QAAQ;IACQ;IACV;IACA;IACA;IACA;IACA;IALV,YAAoB,kBAA0B,EACpC,mBAA2B,EAC3B,mBAA2B,EAC3B,oBAA4B,EAC5B,iBAAyB,EACzB,iBAAyB;QALf,uBAAkB,GAAlB,kBAAkB,CAAQ;QACpC,wBAAmB,GAAnB,mBAAmB,CAAQ;QAC3B,wBAAmB,GAAnB,mBAAmB,CAAQ;QAC3B,yBAAoB,GAApB,oBAAoB,CAAQ;QAC5B,sBAAiB,GAAjB,iBAAiB,CAAQ;QACzB,sBAAiB,GAAjB,iBAAiB,CAAQ;IAAI,CAAC;IAEjC,QAAQ,CAAC,MAAc,EAAE,YAA6B;QAC3D,MAAM,KAAK,GAAY,MAAM,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAC;QACnE,IAAI,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,iBAAiB;YACvC,OAAO,KAAK,CAAC;QACf,IAAI,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,iBAAiB;YACvC,OAAO,KAAK,CAAC;QACf,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,oBAAoB;YACzC,OAAO,KAAK,CAAC;QACf,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,GAA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AAC;IACH,CAAC;IAED,4FAA4F;IACpF,gBAAgB,CAAC,gBAAqB;QAC5C,KAAK,MAAM,oBAAoB,IAAI,gBAAgB,EAAE,CAAC;YACpD,MAAM,gBAAgB,GAAW,oBAAoB,CAAC,WAAW,CAAC;YAClE,MAAM,SAAS,GAAe,IAAI,KAAK,EAAY,CAAC;YACpD,KAAK,MAAM,iBAAiB,IAAI,oBAAoB,CAAC,aAAa,EAAE,CAAC;gBACnE,MAAM,YAAY,GAAG,IAAI,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAC1I,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;gBACxD,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YAC/B,CAAC;YACD,MAAM,eAAe,GAAoB,IAAI,eAAe,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;YAC1F,IAAI,CAAC,IAAI,CAAC,aAAa;gBACrB,IAAI,CAAC,aAAa,GAAG,IAAI,KAAK,EAAmB,CAAC;YACpD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;CACF;AApJD,oEAoJC","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, BentleyError, expectDefined, IModelStatus } from \"@itwin/core-bentley\";\r\nimport { Range2d } from \"@itwin/core-geometry\";\r\nimport { ImageMapLayerSettings, ImageSource } from \"@itwin/core-common\";\r\nimport { request } from \"../../../../request/Request\";\r\nimport { IModelApp } from \"../../../../IModelApp\";\r\nimport { ScreenViewport } from \"../../../../Viewport\";\r\nimport {\r\n MapLayerImageryProvider, MapTile, MapTilingScheme, QuadId,\r\n Tile, WebMercatorTilingScheme,\r\n} from \"../../../../tile/internal\";\r\n\r\n/** Represents one range of geography and tile zoom levels for a bing data provider\r\n */\r\nclass Coverage {\r\n constructor(private _lowerLeftLatitude: number,\r\n private _lowerLeftLongitude: number,\r\n private _upperRightLatitude: number,\r\n private _upperRightLongitude: number,\r\n private _minimumZoomLevel: number,\r\n private _maximumZoomLevel: number) { }\r\n\r\n public overlaps(quadId: QuadId, tilingScheme: MapTilingScheme): boolean {\r\n const range: Range2d = quadId.getLatLongRangeDegrees(tilingScheme);\r\n if (quadId.level < this._minimumZoomLevel)\r\n return false;\r\n if (quadId.level > this._maximumZoomLevel)\r\n return false;\r\n if (range.low.x > this._upperRightLongitude)\r\n return false;\r\n if (range.low.y > this._upperRightLatitude)\r\n return false;\r\n if (range.high.x < this._lowerLeftLongitude)\r\n return false;\r\n if (range.high.y < this._lowerLeftLatitude)\r\n return false;\r\n\r\n return true;\r\n }\r\n}\r\n\r\n/** Represents the copyright message and an array of coverage data for one of bing's data providers (HERE for example).\r\n */\r\nclass BingAttribution {\r\n constructor(public copyrightMessage: string, private _coverages: Coverage[]) { }\r\n\r\n public matchesTile(tile: Tile, tilingScheme: MapTilingScheme): boolean {\r\n const quadId = QuadId.createFromContentId(tile.contentId);\r\n for (const coverage of this._coverages) {\r\n if (coverage.overlaps(quadId, tilingScheme))\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\n\r\n// in deployed applications, we can only make https requests, but the Bing Maps metadata request returns templates with \"http:\".\r\n// This function fixes those.\r\nfunction replaceHttpWithHttps(originalUrl: string) {\r\n return originalUrl.startsWith(\"http:\") ? \"https:\".concat(originalUrl.slice(5)) : originalUrl;\r\n}\r\n\r\n/** @deprecated in 5.11.0. Bing Maps imagery is deprecated. For basemap imagery providers, see `@itwin/map-layers-formats`. */\r\nexport class BingMapsImageryLayerProvider extends MapLayerImageryProvider {\r\n private _urlTemplate?: string;\r\n private _urlSubdomains?: string[];\r\n private _zoomMax: number;\r\n private _tileHeight: number;\r\n private _tileWidth: number;\r\n private _attributions?: BingAttribution[]; // array of Bing's data providers.\r\n private _mapTilingScheme: MapTilingScheme;\r\n private _urlBase: string;\r\n\r\n constructor(settings: ImageMapLayerSettings) {\r\n super(settings, true);\r\n this._urlBase = settings.url;\r\n this._zoomMax = 0;\r\n this._tileHeight = this._tileWidth = 0;\r\n this._mapTilingScheme = new WebMercatorTilingScheme();\r\n }\r\n\r\n public get tileWidth(): number { return this._tileWidth; }\r\n public get tileHeight(): number { return this._tileHeight; }\r\n\r\n private tileXYToQuadKey(tileX: number, tileY: number, zoomLevel: number) {\r\n // from C# example in bing documentation https://msdn.microsoft.com/en-us/library/bb259689.aspx\r\n let quadKey: string = \"\";\r\n\r\n // Root tile is not displayable. Returns 0 for _GetMaximumSize(). Should not end up here.\r\n assert(0 !== zoomLevel);\r\n\r\n for (let i: number = zoomLevel; i > 0; i--) {\r\n let digit: number = 0x30; // '0'\r\n const mask: number = 1 << (i - 1);\r\n if ((tileX & mask) !== 0) {\r\n digit++;\r\n }\r\n if ((tileY & mask) !== 0) {\r\n digit++;\r\n digit++;\r\n }\r\n quadKey = quadKey.concat(String.fromCharCode(digit));\r\n }\r\n return quadKey;\r\n }\r\n\r\n // construct the Url from the desired Tile\r\n public async constructUrl(row: number, column: number, zoomLevel: number): Promise<string> {\r\n // From the tile, get a \"quadKey\" the Microsoft way.\r\n const quadKey: string = this.tileXYToQuadKey(column, row, zoomLevel);\r\n const subdomain: string = expectDefined(this._urlSubdomains)[(row + column) % expectDefined(this._urlSubdomains).length];\r\n\r\n // from the template url, construct the tile url.\r\n let url: string = expectDefined(this._urlTemplate).replace(\"{subdomain}\", subdomain);\r\n url = url.replace(\"{quadkey}\", quadKey);\r\n\r\n return url;\r\n }\r\n\r\n // gets the attributions that match the tile set.\r\n private getMatchingAttributions(tiles: Set<Tile> | undefined): BingAttribution[] {\r\n const matchingAttributions: BingAttribution[] = new Array<BingAttribution>();\r\n if (!this._attributions || !tiles)\r\n return matchingAttributions;\r\n\r\n const unmatchedSet: BingAttribution[] = this._attributions.slice();\r\n for (const tile of tiles) {\r\n if (tile instanceof MapTile) {\r\n // compare to the set of Bing attributions that we have not yet matched.\r\n for (let iAttr = 0; iAttr < unmatchedSet.length; iAttr++) {\r\n const attribution = unmatchedSet[iAttr];\r\n if (attribution.matchesTile(tile, this._mapTilingScheme)) {\r\n matchingAttributions.push(attribution);\r\n unmatchedSet.splice(iAttr, 1);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return matchingAttributions;\r\n }\r\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [addAttributions] instead. */\r\n public override addLogoCards(cards: HTMLTableElement, vp: ScreenViewport): void {\r\n const tiles = IModelApp.tileAdmin.getTilesForUser(vp)?.selected;\r\n const matchingAttributions = this.getMatchingAttributions(tiles);\r\n const copyrights: string[] = [];\r\n for (const match of matchingAttributions)\r\n copyrights.push(match.copyrightMessage);\r\n\r\n let copyrightMsg = \"\";\r\n for (let i = 0; i < copyrights.length; ++i) {\r\n if (i > 0)\r\n copyrightMsg += \"<br>\";\r\n copyrightMsg += copyrights[i];\r\n }\r\n\r\n cards.appendChild(IModelApp.makeLogoCard({ iconSrc: `${IModelApp.publicPath}images/bing.svg`, heading: \"Microsoft Bing\", notice: copyrightMsg }));\r\n }\r\n\r\n public override async addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void> {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return Promise.resolve(this.addLogoCards(cards, vp));\r\n }\r\n\r\n // initializes the BingImageryProvider by reading the templateUrl, logo image, and attribution list.\r\n public override async initialize(): Promise<void> {\r\n // get the template url\r\n const bingRequestUrl = this._urlBase.replace(\"{bingKey}\", this._settings.accessKey ? this._settings.accessKey.value : \"\");\r\n\r\n try {\r\n const bingResponseProps = await request(bingRequestUrl, \"json\");\r\n\r\n const thisResourceSetProps = bingResponseProps.resourceSets[0];\r\n const thisResourceProps = thisResourceSetProps.resources[0];\r\n this._zoomMax = thisResourceProps.zoomMax;\r\n this._tileHeight = thisResourceProps.imageHeight;\r\n this._tileWidth = thisResourceProps.imageWidth;\r\n this._urlTemplate = replaceHttpWithHttps(thisResourceProps.imageUrl.replace(\"{culture}\", \"en-US\")); // NEEDSWORK - get locale from somewhere.\r\n this._urlSubdomains = thisResourceProps.imageUrlSubdomains;\r\n // read the list of Bing's data suppliers and the range of data they provide. Used in calculation of copyright message.\r\n this.readAttributions(thisResourceProps.imageryProviders);\r\n\r\n // Bing sometimes provides tiles that have nothing but a camera icon in the middle of them when you ask\r\n // for tiles at zoom levels where they don't have data. Their application stops you from zooming in when that's the\r\n // case, but we can't stop - the user might want to look at design data a closer zoom. So we intentionally load such\r\n // a tile, and then compare other tiles to it, rejecting them if they match.\r\n this.loadTile(0, 0, this._zoomMax - 1).then((tileData: ImageSource | undefined) => { // eslint-disable-line @typescript-eslint/no-floating-promises\r\n if (tileData !== undefined)\r\n this._missingTileData = tileData.data as Uint8Array;\r\n });\r\n } catch {\r\n throw new BentleyError(IModelStatus.BadModel, \"Error in Bing Server communications\");\r\n }\r\n }\r\n\r\n // reads the list of Bing data providers and the map range for which they each provide data.\r\n private readAttributions(attributionProps: any) {\r\n for (const thisAttributionProps of attributionProps) {\r\n const copyrightMessage: string = thisAttributionProps.attribution;\r\n const coverages: Coverage[] = new Array<Coverage>();\r\n for (const thisCoverageProps of thisAttributionProps.coverageAreas) {\r\n const thisCoverage = new Coverage(thisCoverageProps.bbox[0], thisCoverageProps.bbox[1], thisCoverageProps.bbox[2], thisCoverageProps.bbox[3],\r\n thisCoverageProps.zoomMin, thisCoverageProps.zoomMax);\r\n coverages.push(thisCoverage);\r\n }\r\n const thisAttribution: BingAttribution = new BingAttribution(copyrightMessage, coverages);\r\n if (!this._attributions)\r\n this._attributions = new Array<BingAttribution>();\r\n this._attributions.push(thisAttribution);\r\n }\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"BingImageryProvider.js","sourceRoot":"","sources":["../../../../../../src/internal/tile/map/ImageryProviders/BingImageryProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAwF;AAGxF,yDAAsD;AACtD,qDAAkD;AAElD,wDAGmC;AAEnC;GACG;AACH,MAAM,QAAQ;IACQ;IACV;IACA;IACA;IACA;IACA;IALV,YAAoB,kBAA0B,EACpC,mBAA2B,EAC3B,mBAA2B,EAC3B,oBAA4B,EAC5B,iBAAyB,EACzB,iBAAyB;QALf,uBAAkB,GAAlB,kBAAkB,CAAQ;QACpC,wBAAmB,GAAnB,mBAAmB,CAAQ;QAC3B,wBAAmB,GAAnB,mBAAmB,CAAQ;QAC3B,yBAAoB,GAApB,oBAAoB,CAAQ;QAC5B,sBAAiB,GAAjB,iBAAiB,CAAQ;QACzB,sBAAiB,GAAjB,iBAAiB,CAAQ;IAAI,CAAC;IAEjC,QAAQ,CAAC,MAAc,EAAE,YAA6B;QAC3D,MAAM,KAAK,GAAY,MAAM,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAC;QACnE,IAAI,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,iBAAiB;YACvC,OAAO,KAAK,CAAC;QACf,IAAI,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,iBAAiB;YACvC,OAAO,KAAK,CAAC;QACf,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,oBAAoB;YACzC,OAAO,KAAK,CAAC;QACf,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,mBAAmB;YACxC,OAAO,KAAK,CAAC;QACf,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,mBAAmB;YACzC,OAAO,KAAK,CAAC;QACf,IAAI,KAAK,CAAC,IAAI,CAAC,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AM,SAAS,GAAe,IAAI,KAAK,EAAY,CAAC;YACpD,KAAK,MAAM,iBAAiB,IAAI,oBAAoB,CAAC,aAAa,EAAE,CAAC;gBACnE,MAAM,YAAY,GAAG,IAAI,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAC1I,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;gBACxD,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YAC/B,CAAC;YACD,MAAM,eAAe,GAAoB,IAAI,eAAe,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;YAC1F,IAAI,CAAC,IAAI,CAAC,aAAa;gBACrB,IAAI,CAAC,aAAa,GAAG,IAAI,KAAK,EAAmB,CAAC;YACpD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;CACF;AApJD,oEAoJC","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, BentleyError, expectDefined, IModelStatus } from \"@itwin/core-bentley\";\r\nimport { Range2d } from \"@itwin/core-geometry\";\r\nimport { ImageMapLayerSettings, ImageSource } from \"@itwin/core-common\";\r\nimport { request } from \"../../../../request/Request\";\r\nimport { IModelApp } from \"../../../../IModelApp\";\r\nimport { ScreenViewport } from \"../../../../Viewport\";\r\nimport {\r\n MapLayerImageryProvider, MapTile, MapTilingScheme, QuadId,\r\n Tile, WebMercatorTilingScheme,\r\n} from \"../../../../tile/internal\";\r\n\r\n/** Represents one range of geography and tile zoom levels for a bing data provider\r\n */\r\nclass Coverage {\r\n constructor(private _lowerLeftLatitude: number,\r\n private _lowerLeftLongitude: number,\r\n private _upperRightLatitude: number,\r\n private _upperRightLongitude: number,\r\n private _minimumZoomLevel: number,\r\n private _maximumZoomLevel: number) { }\r\n\r\n public overlaps(quadId: QuadId, tilingScheme: MapTilingScheme): boolean {\r\n const range: Range2d = quadId.getLatLongRangeDegrees(tilingScheme);\r\n if (quadId.level < this._minimumZoomLevel)\r\n return false;\r\n if (quadId.level > this._maximumZoomLevel)\r\n return false;\r\n if (range.low.x > this._upperRightLongitude)\r\n return false;\r\n if (range.low.y > this._upperRightLatitude)\r\n return false;\r\n if (range.high.x < this._lowerLeftLongitude)\r\n return false;\r\n if (range.high.y < this._lowerLeftLatitude)\r\n return false;\r\n\r\n return true;\r\n }\r\n}\r\n\r\n/** Represents the copyright message and an array of coverage data for one of bing's data providers (HERE for example).\r\n */\r\nclass BingAttribution {\r\n constructor(public copyrightMessage: string, private _coverages: Coverage[]) { }\r\n\r\n public matchesTile(tile: Tile, tilingScheme: MapTilingScheme): boolean {\r\n const quadId = QuadId.createFromContentId(tile.contentId);\r\n for (const coverage of this._coverages) {\r\n if (coverage.overlaps(quadId, tilingScheme))\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\n\r\n// in deployed applications, we can only make https requests, but the Bing Maps metadata request returns templates with \"http:\".\r\n// This function fixes those.\r\nfunction replaceHttpWithHttps(originalUrl: string) {\r\n return originalUrl.startsWith(\"http:\") ? \"https:\".concat(originalUrl.slice(5)) : originalUrl;\r\n}\r\n\r\n/** @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Bing Maps imagery is deprecated. For basemap imagery providers, see `@itwin/map-layers-formats`. */\r\nexport class BingMapsImageryLayerProvider extends MapLayerImageryProvider {\r\n private _urlTemplate?: string;\r\n private _urlSubdomains?: string[];\r\n private _zoomMax: number;\r\n private _tileHeight: number;\r\n private _tileWidth: number;\r\n private _attributions?: BingAttribution[]; // array of Bing's data providers.\r\n private _mapTilingScheme: MapTilingScheme;\r\n private _urlBase: string;\r\n\r\n constructor(settings: ImageMapLayerSettings) {\r\n super(settings, true);\r\n this._urlBase = settings.url;\r\n this._zoomMax = 0;\r\n this._tileHeight = this._tileWidth = 0;\r\n this._mapTilingScheme = new WebMercatorTilingScheme();\r\n }\r\n\r\n public get tileWidth(): number { return this._tileWidth; }\r\n public get tileHeight(): number { return this._tileHeight; }\r\n\r\n private tileXYToQuadKey(tileX: number, tileY: number, zoomLevel: number) {\r\n // from C# example in bing documentation https://msdn.microsoft.com/en-us/library/bb259689.aspx\r\n let quadKey: string = \"\";\r\n\r\n // Root tile is not displayable. Returns 0 for _GetMaximumSize(). Should not end up here.\r\n assert(0 !== zoomLevel);\r\n\r\n for (let i: number = zoomLevel; i > 0; i--) {\r\n let digit: number = 0x30; // '0'\r\n const mask: number = 1 << (i - 1);\r\n if ((tileX & mask) !== 0) {\r\n digit++;\r\n }\r\n if ((tileY & mask) !== 0) {\r\n digit++;\r\n digit++;\r\n }\r\n quadKey = quadKey.concat(String.fromCharCode(digit));\r\n }\r\n return quadKey;\r\n }\r\n\r\n // construct the Url from the desired Tile\r\n public async constructUrl(row: number, column: number, zoomLevel: number): Promise<string> {\r\n // From the tile, get a \"quadKey\" the Microsoft way.\r\n const quadKey: string = this.tileXYToQuadKey(column, row, zoomLevel);\r\n const subdomain: string = expectDefined(this._urlSubdomains)[(row + column) % expectDefined(this._urlSubdomains).length];\r\n\r\n // from the template url, construct the tile url.\r\n let url: string = expectDefined(this._urlTemplate).replace(\"{subdomain}\", subdomain);\r\n url = url.replace(\"{quadkey}\", quadKey);\r\n\r\n return url;\r\n }\r\n\r\n // gets the attributions that match the tile set.\r\n private getMatchingAttributions(tiles: Set<Tile> | undefined): BingAttribution[] {\r\n const matchingAttributions: BingAttribution[] = new Array<BingAttribution>();\r\n if (!this._attributions || !tiles)\r\n return matchingAttributions;\r\n\r\n const unmatchedSet: BingAttribution[] = this._attributions.slice();\r\n for (const tile of tiles) {\r\n if (tile instanceof MapTile) {\r\n // compare to the set of Bing attributions that we have not yet matched.\r\n for (let iAttr = 0; iAttr < unmatchedSet.length; iAttr++) {\r\n const attribution = unmatchedSet[iAttr];\r\n if (attribution.matchesTile(tile, this._mapTilingScheme)) {\r\n matchingAttributions.push(attribution);\r\n unmatchedSet.splice(iAttr, 1);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return matchingAttributions;\r\n }\r\n /** @deprecated in 5.0 - might be removed in next major version. Use [addAttributions] instead. */\r\n public override addLogoCards(cards: HTMLTableElement, vp: ScreenViewport): void {\r\n const tiles = IModelApp.tileAdmin.getTilesForUser(vp)?.selected;\r\n const matchingAttributions = this.getMatchingAttributions(tiles);\r\n const copyrights: string[] = [];\r\n for (const match of matchingAttributions)\r\n copyrights.push(match.copyrightMessage);\r\n\r\n let copyrightMsg = \"\";\r\n for (let i = 0; i < copyrights.length; ++i) {\r\n if (i > 0)\r\n copyrightMsg += \"<br>\";\r\n copyrightMsg += copyrights[i];\r\n }\r\n\r\n cards.appendChild(IModelApp.makeLogoCard({ iconSrc: `${IModelApp.publicPath}images/bing.svg`, heading: \"Microsoft Bing\", notice: copyrightMsg }));\r\n }\r\n\r\n public override async addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void> {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return Promise.resolve(this.addLogoCards(cards, vp));\r\n }\r\n\r\n // initializes the BingImageryProvider by reading the templateUrl, logo image, and attribution list.\r\n public override async initialize(): Promise<void> {\r\n // get the template url\r\n const bingRequestUrl = this._urlBase.replace(\"{bingKey}\", this._settings.accessKey ? this._settings.accessKey.value : \"\");\r\n\r\n try {\r\n const bingResponseProps = await request(bingRequestUrl, \"json\");\r\n\r\n const thisResourceSetProps = bingResponseProps.resourceSets[0];\r\n const thisResourceProps = thisResourceSetProps.resources[0];\r\n this._zoomMax = thisResourceProps.zoomMax;\r\n this._tileHeight = thisResourceProps.imageHeight;\r\n this._tileWidth = thisResourceProps.imageWidth;\r\n this._urlTemplate = replaceHttpWithHttps(thisResourceProps.imageUrl.replace(\"{culture}\", \"en-US\")); // NEEDSWORK - get locale from somewhere.\r\n this._urlSubdomains = thisResourceProps.imageUrlSubdomains;\r\n // read the list of Bing's data suppliers and the range of data they provide. Used in calculation of copyright message.\r\n this.readAttributions(thisResourceProps.imageryProviders);\r\n\r\n // Bing sometimes provides tiles that have nothing but a camera icon in the middle of them when you ask\r\n // for tiles at zoom levels where they don't have data. Their application stops you from zooming in when that's the\r\n // case, but we can't stop - the user might want to look at design data a closer zoom. So we intentionally load such\r\n // a tile, and then compare other tiles to it, rejecting them if they match.\r\n this.loadTile(0, 0, this._zoomMax - 1).then((tileData: ImageSource | undefined) => { // eslint-disable-line @typescript-eslint/no-floating-promises\r\n if (tileData !== undefined)\r\n this._missingTileData = tileData.data as Uint8Array;\r\n });\r\n } catch {\r\n throw new BentleyError(IModelStatus.BadModel, \"Error in Bing Server communications\");\r\n }\r\n }\r\n\r\n // reads the list of Bing data providers and the map range for which they each provide data.\r\n private readAttributions(attributionProps: any) {\r\n for (const thisAttributionProps of attributionProps) {\r\n const copyrightMessage: string = thisAttributionProps.attribution;\r\n const coverages: Coverage[] = new Array<Coverage>();\r\n for (const thisCoverageProps of thisAttributionProps.coverageAreas) {\r\n const thisCoverage = new Coverage(thisCoverageProps.bbox[0], thisCoverageProps.bbox[1], thisCoverageProps.bbox[2], thisCoverageProps.bbox[3],\r\n thisCoverageProps.zoomMin, thisCoverageProps.zoomMax);\r\n coverages.push(thisCoverage);\r\n }\r\n const thisAttribution: BingAttribution = new BingAttribution(copyrightMessage, coverages);\r\n if (!this._attributions)\r\n this._attributions = new Array<BingAttribution>();\r\n this._attributions.push(thisAttribution);\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -16,7 +16,7 @@ export declare class MapBoxLayerImageryProvider extends MapLayerImageryProvider
|
|
|
16
16
|
get minimumZoomLevel(): number;
|
|
17
17
|
get maximumZoomLevel(): number;
|
|
18
18
|
constructUrl(row: number, column: number, zoomLevel: number): Promise<string>;
|
|
19
|
-
/** @deprecated in 5.0 -
|
|
19
|
+
/** @deprecated in 5.0 - might be removed in next major version. Use [addAttributions] instead. */
|
|
20
20
|
addLogoCards(cards: HTMLTableElement): void;
|
|
21
21
|
addAttributions(cards: HTMLTableElement, _vp: ScreenViewport): Promise<void>;
|
|
22
22
|
initialize(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapBoxLayerImageryProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD;GACG;AACH,qBAAa,0BAA2B,SAAQ,uBAAuB;IACrE,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAS;gBAEb,QAAQ,EAAE,qBAAqB;IAO3C,IAAW,SAAS,IAAI,MAAM,CAAgB;IAC9C,IAAW,UAAU,IAAI,MAAM,CAAgB;IAC/C,IAAoB,gBAAgB,IAAI,MAAM,CAA0B;IACxE,IAAoB,gBAAgB,IAAI,MAAM,CAA0B;IAG3D,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAczF,
|
|
1
|
+
{"version":3,"file":"MapBoxLayerImageryProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD;GACG;AACH,qBAAa,0BAA2B,SAAQ,uBAAuB;IACrE,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAS;gBAEb,QAAQ,EAAE,qBAAqB;IAO3C,IAAW,SAAS,IAAI,MAAM,CAAgB;IAC9C,IAAW,UAAU,IAAI,MAAM,CAAgB;IAC/C,IAAoB,gBAAgB,IAAI,MAAM,CAA0B;IACxE,IAAoB,gBAAgB,IAAI,MAAM,CAA0B;IAG3D,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAczF,kGAAkG;IACnF,YAAY,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;IAOrC,eAAe,CAAE,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAM7E,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAClD"}
|
|
@@ -38,7 +38,7 @@ class MapBoxLayerImageryProvider extends internal_1.MapLayerImageryProvider {
|
|
|
38
38
|
url = url.concat(`?${this._settings.accessKey.key}=${this._settings.accessKey.value}`);
|
|
39
39
|
return url;
|
|
40
40
|
}
|
|
41
|
-
/** @deprecated in 5.0 -
|
|
41
|
+
/** @deprecated in 5.0 - might be removed in next major version. Use [addAttributions] instead. */
|
|
42
42
|
addLogoCards(cards) {
|
|
43
43
|
if (!cards.dataset.mapboxLogoCard) {
|
|
44
44
|
cards.dataset.mapboxLogoCard = "true";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapBoxLayerImageryProvider.js","sourceRoot":"","sources":["../../../../../../src/internal/tile/map/Image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,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC;QAEvF,OAAO,GAAG,CAAC;IACb,CAAC;IAEA,
|
|
1
|
+
{"version":3,"file":"MapBoxLayerImageryProvider.js","sourceRoot":"","sources":["../../../../../../src/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,qDAAkD;AAClD,wDAAoE;AAIpE;GACG;AACH,MAAa,0BAA2B,SAAQ,kCAAuB;IAC7D,QAAQ,CAAS;IACjB,QAAQ,CAAS;IACjB,QAAQ,CAAS;IAEzB,YAAY,QAA+B;QACzC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;QAClB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACrB,CAAC;IAED,IAAW,SAAS,KAAa,OAAO,GAAG,CAAC,CAAC,CAAC;IAC9C,IAAW,UAAU,KAAa,OAAO,GAAG,CAAC,CAAC,CAAC;IAC/C,IAAoB,gBAAgB,KAAa,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IACxE,IAAoB,gBAAgB,KAAa,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAExE,0CAA0C;IACnC,KAAK,CAAC,YAAY,CAAC,GAAW,EAAE,MAAc,EAAE,SAAiB;QACtE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;YAC9B,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,iDAAiD;QACjD,2EAA2E;QAC3E,IAAI,GAAG,GAAW,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;QAClE,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,QAAQ,EAAE,IAAI,MAAM,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QACpF,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC;QAEvF,OAAO,GAAG,CAAC;IACb,CAAC;IAEA,kGAAkG;IACnF,YAAY,CAAC,KAAuB;QAClD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;YAClC,KAAK,CAAC,OAAO,CAAC,cAAc,GAAG,MAAM,CAAC;YACtC,KAAK,CAAC,WAAW,CAAC,qBAAS,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,qBAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,wCAAwC,CAAC,EAAE,CAAC,CAAC,CAAC;QAChK,CAAC;IACH,CAAC;IAEe,KAAK,CAAC,eAAe,CAAE,KAAuB,EAAE,GAAmB;QACjF,4DAA4D;QAC5D,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IACnD,CAAC;IAED,sDAAsD;IACtC,KAAK,CAAC,UAAU,KAAoB,CAAC;CACtD;AA/CD,gEA+CC","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 { ImageMapLayerSettings } from \"@itwin/core-common\";\r\nimport { IModelApp } from \"../../../../IModelApp\";\r\nimport { MapLayerImageryProvider } from \"../../../../tile/internal\";\r\nimport { ScreenViewport } from \"../../../../Viewport\";\r\n\r\n\r\n/** Base class imagery map layer formats. Subclasses should override formatId and [[MapLayerFormat.createImageryProvider]].\r\n */\r\nexport class MapBoxLayerImageryProvider extends MapLayerImageryProvider {\r\n private _zoomMin: number;\r\n private _zoomMax: number;\r\n private _baseUrl: string;\r\n\r\n constructor(settings: ImageMapLayerSettings) {\r\n super(settings, true);\r\n this._baseUrl = settings.url;\r\n this._zoomMin = 1;\r\n this._zoomMax = 20;\r\n }\r\n\r\n public get tileWidth(): number { return 256; }\r\n public get tileHeight(): number { return 256; }\r\n public override get minimumZoomLevel(): number { return this._zoomMin; }\r\n public override get maximumZoomLevel(): number { return this._zoomMax; }\r\n\r\n // construct the Url from the desired Tile\r\n public async constructUrl(row: number, column: number, zoomLevel: number): Promise<string> {\r\n if (!this._settings.accessKey) {\r\n return \"\";\r\n }\r\n\r\n // from the template url, construct the tile url.\r\n // format: {baseUrl}/{tileSize}/{level}/{column}/{row}?access_token={token}\r\n let url: string = this._baseUrl.concat(this.tileWidth.toString());\r\n url = url.concat(`/${zoomLevel.toString()}/${column.toString()}/${row.toString()}`);\r\n url = url.concat(`?${this._settings.accessKey.key}=${this._settings.accessKey.value}`);\r\n\r\n return url;\r\n }\r\n\r\n /** @deprecated in 5.0 - might be removed in next major version. Use [addAttributions] instead. */\r\n public override addLogoCards(cards: HTMLTableElement): void {\r\n if (!cards.dataset.mapboxLogoCard) {\r\n cards.dataset.mapboxLogoCard = \"true\";\r\n cards.appendChild(IModelApp.makeLogoCard({ heading: \"Mapbox\", notice: IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.MapBoxCopyright\") }));\r\n }\r\n }\r\n\r\n public override async addAttributions (cards: HTMLTableElement, _vp: ScreenViewport): Promise<void> {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return Promise.resolve(this.addLogoCards(cards));\r\n }\r\n\r\n // no initialization needed for MapBoxImageryProvider.\r\n public override async initialize(): Promise<void> { }\r\n}\r\n"]}
|
|
@@ -5,14 +5,14 @@ import { QuantityType } from "../quantity-formatting/QuantityFormatter";
|
|
|
5
5
|
import { FormattedQuantityDescription } from "./FormattedQuantityDescription";
|
|
6
6
|
/**
|
|
7
7
|
* Angle Property Description
|
|
8
|
-
* @deprecated in 5.11.0. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).
|
|
8
|
+
* @deprecated in 5.11.0 - will not be removed until after 2027-07-03. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).
|
|
9
9
|
* @beta
|
|
10
10
|
*/
|
|
11
11
|
export declare class AngleDescription extends FormattedQuantityDescription {
|
|
12
12
|
constructor(name?: string, displayLabel?: string, iconSpec?: string, kindOfQuantityName?: string);
|
|
13
13
|
get formatterQuantityType(): QuantityType;
|
|
14
14
|
/**
|
|
15
|
-
* @deprecated in 5.0 -
|
|
15
|
+
* @deprecated in 5.0 - might be removed in next major version. Use the `kindOfQuantityName` property instead.
|
|
16
16
|
*/
|
|
17
17
|
get quantityType(): string;
|
|
18
18
|
get parseError(): string;
|
|
@@ -13,7 +13,7 @@ const QuantityFormatter_1 = require("../quantity-formatting/QuantityFormatter");
|
|
|
13
13
|
const FormattedQuantityDescription_1 = require("./FormattedQuantityDescription");
|
|
14
14
|
/**
|
|
15
15
|
* Angle Property Description
|
|
16
|
-
* @deprecated in 5.11.0. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).
|
|
16
|
+
* @deprecated in 5.11.0 - will not be removed until after 2027-07-03. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).
|
|
17
17
|
* @beta
|
|
18
18
|
*/
|
|
19
19
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
@@ -30,7 +30,7 @@ class AngleDescription extends FormattedQuantityDescription_1.FormattedQuantityD
|
|
|
30
30
|
}
|
|
31
31
|
get formatterQuantityType() { return QuantityFormatter_1.QuantityType.Angle; }
|
|
32
32
|
/**
|
|
33
|
-
* @deprecated in 5.0 -
|
|
33
|
+
* @deprecated in 5.0 - might be removed in next major version. Use the `kindOfQuantityName` property instead.
|
|
34
34
|
*/
|
|
35
35
|
get quantityType() { return "Angle"; }
|
|
36
36
|
get parseError() { return IModelApp_1.IModelApp.localization.getLocalizedString("iModelJs:Properties.UnableToParseAngle"); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AngleDescription.js","sourceRoot":"","sources":["../../../src/properties/AngleDescription.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,4CAAyC;AACzC,gFAAwE;AACxE,iFAA8E;AAE9E;;;;GAIG;AACH,4DAA4D;AAC5D,MAAa,gBAAiB,SAAQ,2DAA4B;IAChE,YAAY,IAAa,EAAE,YAAqB,EAAE,QAAiB,EAAE,kBAA2B;QAC9F,MAAM,WAAW,GAAG,OAAO,CAAC;QAC5B,4DAA4D;QAC5D,KAAK,CAAC;YACJ,IAAI,EAAE,IAAI,IAAI,WAAW;YACzB,YAAY,EAAE,YAAY,IAAI,qBAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,2BAA2B,CAAC;YACpG,kBAAkB,EAAE,kBAAkB,IAAI,yBAAyB;YACnE,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;IAED,IAAW,qBAAqB,KAAmB,OAAO,gCAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/E;;OAEG;IACH,IAAW,YAAY,KAAa,OAAO,OAAO,CAAC,CAAC,CAAC;IAErD,IAAW,UAAU,KAAa,OAAO,qBAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,wCAAwC,CAAC,CAAC,CAAC,CAAC;CAChI;AAnBD,4CAmBC","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 Properties\r\n */\r\n\r\nimport { IModelApp } from \"../IModelApp\";\r\nimport { QuantityType } from \"../quantity-formatting/QuantityFormatter\";\r\nimport { FormattedQuantityDescription } from \"./FormattedQuantityDescription\";\r\n\r\n/**\r\n * Angle Property Description\r\n * @deprecated in 5.11.0. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).\r\n * @beta\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport class AngleDescription extends FormattedQuantityDescription {\r\n constructor(name?: string, displayLabel?: string, iconSpec?: string, kindOfQuantityName?: string) {\r\n const defaultName = \"angle\";\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n super({\r\n name: name ?? defaultName,\r\n displayLabel: displayLabel ?? IModelApp.localization.getLocalizedString(\"iModelJs:Properties.Angle\"),\r\n kindOfQuantityName: kindOfQuantityName ?? \"DefaultToolsUnits.ANGLE\",\r\n iconSpec,\r\n });\r\n }\r\n\r\n public get formatterQuantityType(): QuantityType { return QuantityType.Angle; }\r\n /**\r\n * @deprecated in 5.0 -
|
|
1
|
+
{"version":3,"file":"AngleDescription.js","sourceRoot":"","sources":["../../../src/properties/AngleDescription.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,4CAAyC;AACzC,gFAAwE;AACxE,iFAA8E;AAE9E;;;;GAIG;AACH,4DAA4D;AAC5D,MAAa,gBAAiB,SAAQ,2DAA4B;IAChE,YAAY,IAAa,EAAE,YAAqB,EAAE,QAAiB,EAAE,kBAA2B;QAC9F,MAAM,WAAW,GAAG,OAAO,CAAC;QAC5B,4DAA4D;QAC5D,KAAK,CAAC;YACJ,IAAI,EAAE,IAAI,IAAI,WAAW;YACzB,YAAY,EAAE,YAAY,IAAI,qBAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,2BAA2B,CAAC;YACpG,kBAAkB,EAAE,kBAAkB,IAAI,yBAAyB;YACnE,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;IAED,IAAW,qBAAqB,KAAmB,OAAO,gCAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/E;;OAEG;IACH,IAAW,YAAY,KAAa,OAAO,OAAO,CAAC,CAAC,CAAC;IAErD,IAAW,UAAU,KAAa,OAAO,qBAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,wCAAwC,CAAC,CAAC,CAAC,CAAC;CAChI;AAnBD,4CAmBC","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 Properties\r\n */\r\n\r\nimport { IModelApp } from \"../IModelApp\";\r\nimport { QuantityType } from \"../quantity-formatting/QuantityFormatter\";\r\nimport { FormattedQuantityDescription } from \"./FormattedQuantityDescription\";\r\n\r\n/**\r\n * Angle Property Description\r\n * @deprecated in 5.11.0 - will not be removed until after 2027-07-03. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).\r\n * @beta\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport class AngleDescription extends FormattedQuantityDescription {\r\n constructor(name?: string, displayLabel?: string, iconSpec?: string, kindOfQuantityName?: string) {\r\n const defaultName = \"angle\";\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n super({\r\n name: name ?? defaultName,\r\n displayLabel: displayLabel ?? IModelApp.localization.getLocalizedString(\"iModelJs:Properties.Angle\"),\r\n kindOfQuantityName: kindOfQuantityName ?? \"DefaultToolsUnits.ANGLE\",\r\n iconSpec,\r\n });\r\n }\r\n\r\n public get formatterQuantityType(): QuantityType { return QuantityType.Angle; }\r\n /**\r\n * @deprecated in 5.0 - might be removed in next major version. Use the `kindOfQuantityName` property instead.\r\n */\r\n public get quantityType(): string { return \"Angle\"; }\r\n\r\n public get parseError(): string { return IModelApp.localization.getLocalizedString(\"iModelJs:Properties.UnableToParseAngle\"); }\r\n}\r\n"]}
|
|
@@ -31,7 +31,7 @@ export interface CreateQuantityDescriptionProps {
|
|
|
31
31
|
*/
|
|
32
32
|
export declare function createQuantityDescription(props: CreateQuantityDescriptionProps): PropertyDescription;
|
|
33
33
|
/**
|
|
34
|
-
* @deprecated in 5.11.0. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).
|
|
34
|
+
* @deprecated in 5.11.0 - will not be removed until after 2027-07-03. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).
|
|
35
35
|
* @beta
|
|
36
36
|
*/
|
|
37
37
|
export interface FormattedQuantityDescriptionArgs {
|
|
@@ -42,7 +42,7 @@ export interface FormattedQuantityDescriptionArgs {
|
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Base Quantity Property Description
|
|
45
|
-
* @deprecated in 5.11.0. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).
|
|
45
|
+
* @deprecated in 5.11.0 - will not be removed until after 2027-07-03. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).
|
|
46
46
|
* @beta
|
|
47
47
|
*/
|
|
48
48
|
export declare abstract class FormattedQuantityDescription extends BaseQuantityDescription {
|
|
@@ -47,7 +47,7 @@ function createQuantityDescription(props) {
|
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Base Quantity Property Description
|
|
50
|
-
* @deprecated in 5.11.0. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).
|
|
50
|
+
* @deprecated in 5.11.0 - will not be removed until after 2027-07-03. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).
|
|
51
51
|
* @beta
|
|
52
52
|
*/
|
|
53
53
|
class FormattedQuantityDescription extends appui_abstract_1.BaseQuantityDescription {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormattedQuantityDescription.js","sourceRoot":"","sources":["../../../src/properties/FormattedQuantityDescription.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAmCH,8DA0BC;AA3DD,wDAAyE;AACzE,0DAE+B;AAC/B,4CAAyC;AAsBzC;;;;;;GAMG;AACH,SAAgB,yBAAyB,CAAC,KAAqC;IAC7E,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,GAAG,KAAK,CAAC;IAC9E,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,qBAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,wCAAwC,CAAC,CAAC;IAC3H,MAAM,gBAAgB,GAAG,qBAAS,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;IAClH,MAAM,YAAY,GAAkC,CAAC;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CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACxG,IAAI,UAAU,EAAE,CAAC;YACf,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;YAC9B,OAAO,UAAU,CAAC;QACpB,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CAKF;AA/DD,oEA+DC","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 Properties\r\n */\r\n\r\nimport { FormatterSpec, Parser, ParserSpec } from \"@itwin/core-quantity\";\r\nimport {\r\n BaseQuantityDescription, type CustomFormattedNumberParams, ParseResults, type PropertyDescription, PropertyEditorParamTypes, StandardEditorNames, StandardTypeNames,\r\n} from \"@itwin/appui-abstract\";\r\nimport { IModelApp } from \"../IModelApp\";\r\nimport { QuantityType } from \"../quantity-formatting/QuantityFormatter\";\r\n\r\n/** Properties for [createQuantityDescription]($frontend).\r\n * @beta\r\n */\r\nexport interface CreateQuantityDescriptionProps {\r\n /** Programmatic property name. */\r\n name: string;\r\n /** User-facing property label. */\r\n displayLabel: string;\r\n /** KindOfQuantity name used to resolve formatting and parsing behavior. */\r\n kindOfQuantityName: string;\r\n /** Persistence unit name for values stored in the property. */\r\n persistenceUnitName: string;\r\n /** Optional parse failure message override shown when the input cannot be converted.\r\n *\r\n * If omitted, [createQuantityDescription]($frontend) falls back to a generic parse error message.\r\n */\r\n parseError?: string;\r\n}\r\n\r\n/** Creates a quantity-aware [PropertyDescription]($appui-abstract) for tool settings and other UI property flows.\r\n *\r\n * The returned description uses a `NumberCustom` editor with synchronous formatting and parsing callbacks backed by the\r\n * active [IModelApp.quantityFormatter]($frontend). Formatting falls back to `numberValue.toFixed(2)` until specs are available.\r\n *\r\n * @beta\r\n */\r\nexport function createQuantityDescription(props: CreateQuantityDescriptionProps): PropertyDescription {\r\n const { name, displayLabel, kindOfQuantityName, persistenceUnitName } = props;\r\n const parseError = props.parseError ?? IModelApp.localization.getLocalizedString(\"iModelJs:Properties.UnableToParseValue\");\r\n const formatSpecHandle = IModelApp.quantityFormatter.getFormatSpecHandle(kindOfQuantityName, persistenceUnitName);\r\n const editorParams: CustomFormattedNumberParams[] = [{\r\n type: PropertyEditorParamTypes.CustomFormattedNumber,\r\n formatFunction: (numberValue: number): string => {\r\n const formatterSpec = formatSpecHandle.formatterSpec;\r\n return formatterSpec ? IModelApp.quantityFormatter.formatQuantity(numberValue, formatterSpec) : numberValue.toFixed(2);\r\n },\r\n parseFunction: (userInput: string) => {\r\n const parseResult = formatSpecHandle.parserSpec?.parseToQuantityValue(userInput);\r\n return parseResult && parseResult.ok ? { value: parseResult.value } : { parseError };\r\n },\r\n }];\r\n\r\n return {\r\n name,\r\n displayLabel,\r\n kindOfQuantityName,\r\n typename: StandardTypeNames.Number,\r\n editor: {\r\n name: StandardEditorNames.NumberCustom,\r\n params: editorParams,\r\n },\r\n };\r\n}\r\n\r\n/**\r\n * @deprecated in 5.11.0. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).\r\n * @beta\r\n */\r\nexport interface FormattedQuantityDescriptionArgs {\r\n name: string;\r\n displayLabel: string;\r\n iconSpec?: string;\r\n kindOfQuantityName?: string;\r\n}\r\n\r\n/**\r\n * Base Quantity Property Description\r\n * @deprecated in 5.11.0. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).\r\n * @beta\r\n */\r\nexport abstract class FormattedQuantityDescription extends BaseQuantityDescription {\r\n private _formatterSpec?: FormatterSpec;\r\n private _parserSpec?: ParserSpec;\r\n\r\n constructor(args: FormattedQuantityDescriptionArgs); // eslint-disable-line @typescript-eslint/no-deprecated\r\n constructor(name: string, displayLabel: string, iconSpec?: string, kindOfQuantityName?: string);\r\n constructor(argsOrName: FormattedQuantityDescriptionArgs | string, displayLabel?: string, iconSpec?: string, kindOfQuantityName?: string) { // eslint-disable-line @typescript-eslint/no-deprecated\r\n if (typeof argsOrName === \"string\") {\r\n // if argsOrName is a string, displayLabel must be defined.\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n super(argsOrName, displayLabel!, iconSpec, kindOfQuantityName);\r\n } else {\r\n super(argsOrName.name, argsOrName.displayLabel, argsOrName.iconSpec, argsOrName.kindOfQuantityName);\r\n }\r\n }\r\n protected formatValue(numberValue: number): string {\r\n if (this.formatterSpec) {\r\n return IModelApp.quantityFormatter.formatQuantity(numberValue, this.formatterSpec);\r\n }\r\n return numberValue.toFixed(2);\r\n }\r\n\r\n protected parseString(userInput: string): ParseResults {\r\n if (this.parserSpec) {\r\n const parseResult = IModelApp.quantityFormatter.parseToQuantityValue(userInput, this.parserSpec);\r\n if (Parser.isParsedQuantity(parseResult)) {\r\n return { value: parseResult.value };\r\n } else {\r\n return { parseError: this.parseError };\r\n }\r\n }\r\n return { parseError: \"no parser defined\" };\r\n }\r\n\r\n public get formatterSpec(): FormatterSpec | undefined {\r\n if (this._formatterSpec)\r\n return this._formatterSpec;\r\n\r\n const formatterSpec = IModelApp.quantityFormatter.findFormatterSpecByQuantityType(this.formatterQuantityType);\r\n if (formatterSpec) {\r\n this._formatterSpec = formatterSpec;\r\n return formatterSpec;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n public get parserSpec(): ParserSpec | undefined {\r\n if (this._parserSpec)\r\n return this._parserSpec;\r\n\r\n const parserSpec = IModelApp.quantityFormatter.findParserSpecByQuantityType(this.formatterQuantityType);\r\n if (parserSpec) {\r\n this._parserSpec = parserSpec;\r\n return parserSpec;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n public abstract get formatterQuantityType(): QuantityType;\r\n\r\n public abstract override get parseError(): string;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"FormattedQuantityDescription.js","sourceRoot":"","sources":["../../../src/properties/FormattedQuantityDescription.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAmCH,8DA0BC;AA3DD,wDAAyE;AACzE,0DAE+B;AAC/B,4CAAyC;AAsBzC;;;;;;GAMG;AACH,SAAgB,yBAAyB,CAAC,KAAqC;IAC7E,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,GAAG,KAAK,CAAC;IAC9E,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,qBAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,wCAAwC,CAAC,CAAC;IAC3H,MAAM,gBAAgB,GAAG,qBAAS,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;IAClH,MAAM,YAAY,GAAkC,CAAC;YACnD,IAAI,EAAE,yCAAwB,CAAC,qBAAqB;YACpD,cAAc,EAAE,CAAC,WAAmB,EAAU,EAAE;gBAC9C,MAAM,aAAa,GAAG,gBAAgB,CAAC,aAAa,CAAC;gBACrD,OAAO,aAAa,CAAC,CAAC,CAAC,qBAAS,CAAC,iBAAiB,CAAC,cAAc,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACzH,CAAC;YACD,aAAa,EAAE,CAAC,SAAiB,EAAE,EAAE;gBACnC,MAAM,WAAW,GAAG,gBAAgB,CAAC,UAAU,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;gBACjF,OAAO,WAAW,IAAI,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC;YACvF,CAAC;SACF,CAAC,CAAC;IAEH,OAAO;QACL,IAAI;QACJ,YAAY;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AAI,CAAC,UAAU,EAAE,CAAC;YACzC,CAAC;QACH,CAAC;QACD,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAC7C,CAAC;IAED,IAAW,aAAa;QACtB,IAAI,IAAI,CAAC,cAAc;YACrB,OAAO,IAAI,CAAC,cAAc,CAAC;QAE7B,MAAM,aAAa,GAAG,qBAAS,CAAC,iBAAiB,CAAC,+BAA+B,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAC9G,IAAI,aAAa,EAAE,CAAC;YAClB,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;YACpC,OAAO,aAAa,CAAC;QACvB,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAW,UAAU;QACnB,IAAI,IAAI,CAAC,WAAW;YAClB,OAAO,IAAI,CAAC,WAAW,CAAC;QAE1B,MAAM,UAAU,GAAG,qBAAS,CAAC,iBAAiB,CAAC,4BAA4B,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACxG,IAAI,UAAU,EAAE,CAAC;YACf,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;YAC9B,OAAO,UAAU,CAAC;QACpB,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CAKF;AA/DD,oEA+DC","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 Properties\r\n */\r\n\r\nimport { FormatterSpec, Parser, ParserSpec } from \"@itwin/core-quantity\";\r\nimport {\r\n BaseQuantityDescription, type CustomFormattedNumberParams, ParseResults, type PropertyDescription, PropertyEditorParamTypes, StandardEditorNames, StandardTypeNames,\r\n} from \"@itwin/appui-abstract\";\r\nimport { IModelApp } from \"../IModelApp\";\r\nimport { QuantityType } from \"../quantity-formatting/QuantityFormatter\";\r\n\r\n/** Properties for [createQuantityDescription]($frontend).\r\n * @beta\r\n */\r\nexport interface CreateQuantityDescriptionProps {\r\n /** Programmatic property name. */\r\n name: string;\r\n /** User-facing property label. */\r\n displayLabel: string;\r\n /** KindOfQuantity name used to resolve formatting and parsing behavior. */\r\n kindOfQuantityName: string;\r\n /** Persistence unit name for values stored in the property. */\r\n persistenceUnitName: string;\r\n /** Optional parse failure message override shown when the input cannot be converted.\r\n *\r\n * If omitted, [createQuantityDescription]($frontend) falls back to a generic parse error message.\r\n */\r\n parseError?: string;\r\n}\r\n\r\n/** Creates a quantity-aware [PropertyDescription]($appui-abstract) for tool settings and other UI property flows.\r\n *\r\n * The returned description uses a `NumberCustom` editor with synchronous formatting and parsing callbacks backed by the\r\n * active [IModelApp.quantityFormatter]($frontend). Formatting falls back to `numberValue.toFixed(2)` until specs are available.\r\n *\r\n * @beta\r\n */\r\nexport function createQuantityDescription(props: CreateQuantityDescriptionProps): PropertyDescription {\r\n const { name, displayLabel, kindOfQuantityName, persistenceUnitName } = props;\r\n const parseError = props.parseError ?? IModelApp.localization.getLocalizedString(\"iModelJs:Properties.UnableToParseValue\");\r\n const formatSpecHandle = IModelApp.quantityFormatter.getFormatSpecHandle(kindOfQuantityName, persistenceUnitName);\r\n const editorParams: CustomFormattedNumberParams[] = [{\r\n type: PropertyEditorParamTypes.CustomFormattedNumber,\r\n formatFunction: (numberValue: number): string => {\r\n const formatterSpec = formatSpecHandle.formatterSpec;\r\n return formatterSpec ? IModelApp.quantityFormatter.formatQuantity(numberValue, formatterSpec) : numberValue.toFixed(2);\r\n },\r\n parseFunction: (userInput: string) => {\r\n const parseResult = formatSpecHandle.parserSpec?.parseToQuantityValue(userInput);\r\n return parseResult && parseResult.ok ? { value: parseResult.value } : { parseError };\r\n },\r\n }];\r\n\r\n return {\r\n name,\r\n displayLabel,\r\n kindOfQuantityName,\r\n typename: StandardTypeNames.Number,\r\n editor: {\r\n name: StandardEditorNames.NumberCustom,\r\n params: editorParams,\r\n },\r\n };\r\n}\r\n\r\n/**\r\n * @deprecated in 5.11.0 - will not be removed until after 2027-07-03. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).\r\n * @beta\r\n */\r\nexport interface FormattedQuantityDescriptionArgs {\r\n name: string;\r\n displayLabel: string;\r\n iconSpec?: string;\r\n kindOfQuantityName?: string;\r\n}\r\n\r\n/**\r\n * Base Quantity Property Description\r\n * @deprecated in 5.11.0 - will not be removed until after 2027-07-03. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).\r\n * @beta\r\n */\r\nexport abstract class FormattedQuantityDescription extends BaseQuantityDescription {\r\n private _formatterSpec?: FormatterSpec;\r\n private _parserSpec?: ParserSpec;\r\n\r\n constructor(args: FormattedQuantityDescriptionArgs); // eslint-disable-line @typescript-eslint/no-deprecated\r\n constructor(name: string, displayLabel: string, iconSpec?: string, kindOfQuantityName?: string);\r\n constructor(argsOrName: FormattedQuantityDescriptionArgs | string, displayLabel?: string, iconSpec?: string, kindOfQuantityName?: string) { // eslint-disable-line @typescript-eslint/no-deprecated\r\n if (typeof argsOrName === \"string\") {\r\n // if argsOrName is a string, displayLabel must be defined.\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n super(argsOrName, displayLabel!, iconSpec, kindOfQuantityName);\r\n } else {\r\n super(argsOrName.name, argsOrName.displayLabel, argsOrName.iconSpec, argsOrName.kindOfQuantityName);\r\n }\r\n }\r\n protected formatValue(numberValue: number): string {\r\n if (this.formatterSpec) {\r\n return IModelApp.quantityFormatter.formatQuantity(numberValue, this.formatterSpec);\r\n }\r\n return numberValue.toFixed(2);\r\n }\r\n\r\n protected parseString(userInput: string): ParseResults {\r\n if (this.parserSpec) {\r\n const parseResult = IModelApp.quantityFormatter.parseToQuantityValue(userInput, this.parserSpec);\r\n if (Parser.isParsedQuantity(parseResult)) {\r\n return { value: parseResult.value };\r\n } else {\r\n return { parseError: this.parseError };\r\n }\r\n }\r\n return { parseError: \"no parser defined\" };\r\n }\r\n\r\n public get formatterSpec(): FormatterSpec | undefined {\r\n if (this._formatterSpec)\r\n return this._formatterSpec;\r\n\r\n const formatterSpec = IModelApp.quantityFormatter.findFormatterSpecByQuantityType(this.formatterQuantityType);\r\n if (formatterSpec) {\r\n this._formatterSpec = formatterSpec;\r\n return formatterSpec;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n public get parserSpec(): ParserSpec | undefined {\r\n if (this._parserSpec)\r\n return this._parserSpec;\r\n\r\n const parserSpec = IModelApp.quantityFormatter.findParserSpecByQuantityType(this.formatterQuantityType);\r\n if (parserSpec) {\r\n this._parserSpec = parserSpec;\r\n return parserSpec;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n public abstract get formatterQuantityType(): QuantityType;\r\n\r\n public abstract override get parseError(): string;\r\n}\r\n"]}
|
|
@@ -5,42 +5,42 @@ import { QuantityType } from "../quantity-formatting/QuantityFormatter";
|
|
|
5
5
|
import { FormattedQuantityDescription } from "./FormattedQuantityDescription";
|
|
6
6
|
/**
|
|
7
7
|
* Length Property Description
|
|
8
|
-
* @deprecated in 5.11.0. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).
|
|
8
|
+
* @deprecated in 5.11.0 - will not be removed until after 2027-07-03. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).
|
|
9
9
|
* @beta
|
|
10
10
|
*/
|
|
11
11
|
export declare class LengthDescription extends FormattedQuantityDescription {
|
|
12
12
|
constructor(name?: string, displayLabel?: string, iconSpec?: string, kindOfQuantityName?: string);
|
|
13
13
|
get formatterQuantityType(): QuantityType;
|
|
14
14
|
/**
|
|
15
|
-
* @deprecated in 5.0 -
|
|
15
|
+
* @deprecated in 5.0 - might be removed in next major version. Use the `kindOfQuantityName` property instead.
|
|
16
16
|
*/
|
|
17
17
|
get quantityType(): string;
|
|
18
18
|
get parseError(): string;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Survey Length Property Description
|
|
22
|
-
* @deprecated in 5.11.0. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) in new code. To preserve survey-length behavior, configure a dedicated [FormatsProvider]($quantity) such as [FormatSetFormatsProvider]($ecschema-metadata).
|
|
22
|
+
* @deprecated in 5.11.0 - will not be removed until after 2027-07-03. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) in new code. To preserve survey-length behavior, configure a dedicated [FormatsProvider]($quantity) such as [FormatSetFormatsProvider]($ecschema-metadata).
|
|
23
23
|
* @beta
|
|
24
24
|
*/
|
|
25
25
|
export declare class SurveyLengthDescription extends FormattedQuantityDescription {
|
|
26
26
|
constructor(name?: string, displayLabel?: string, iconSpec?: string, kindOfQuantityName?: string);
|
|
27
27
|
get formatterQuantityType(): QuantityType;
|
|
28
28
|
/**
|
|
29
|
-
* @deprecated in 5.0 -
|
|
29
|
+
* @deprecated in 5.0 - might be removed in next major version. Use the `kindOfQuantityName` property instead.
|
|
30
30
|
*/
|
|
31
31
|
get quantityType(): string;
|
|
32
32
|
get parseError(): string;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* Engineering Length Property Description
|
|
36
|
-
* @deprecated in 5.11.0. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).
|
|
36
|
+
* @deprecated in 5.11.0 - will not be removed until after 2027-07-03. This appui-based quantity description API is deprecated. Use [createQuantityDescription]($frontend) to build a plain [PropertyDescription]($appui-abstract) with synchronous quantity formatting callbacks backed by [IModelApp.quantityFormatter]($frontend).
|
|
37
37
|
* @beta
|
|
38
38
|
*/
|
|
39
39
|
export declare class EngineeringLengthDescription extends FormattedQuantityDescription {
|
|
40
40
|
constructor(name?: string, displayLabel?: string, iconSpec?: string, kindOfQuantityName?: string);
|
|
41
41
|
get formatterQuantityType(): QuantityType;
|
|
42
42
|
/**
|
|
43
|
-
* @deprecated in 5.0 -
|
|
43
|
+
* @deprecated in 5.0 - might be removed in next major version. Use the `kindOfQuantityName` property instead.
|
|
44
44
|
*/
|
|
45
45
|
get quantityType(): string;
|
|
46
46
|
get parseError(): string;
|