@itwin/core-frontend 5.0.0-dev.67 → 5.0.0-dev.69

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.
Files changed (115) hide show
  1. package/lib/cjs/AccuDraw.d.ts.map +1 -1
  2. package/lib/cjs/AccuDraw.js +11 -2
  3. package/lib/cjs/AccuDraw.js.map +1 -1
  4. package/lib/cjs/BriefcaseConnection.d.ts +2 -0
  5. package/lib/cjs/BriefcaseConnection.d.ts.map +1 -1
  6. package/lib/cjs/BriefcaseConnection.js +4 -0
  7. package/lib/cjs/BriefcaseConnection.js.map +1 -1
  8. package/lib/cjs/Viewport.d.ts.map +1 -1
  9. package/lib/cjs/Viewport.js +5 -3
  10. package/lib/cjs/Viewport.js.map +1 -1
  11. package/lib/cjs/internal/tile/RealityModelTileTree.d.ts +2 -0
  12. package/lib/cjs/internal/tile/RealityModelTileTree.d.ts.map +1 -1
  13. package/lib/cjs/internal/tile/RealityModelTileTree.js +5 -0
  14. package/lib/cjs/internal/tile/RealityModelTileTree.js.map +1 -1
  15. package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +3 -0
  16. package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
  17. package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +5 -0
  18. package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
  19. package/lib/cjs/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts +3 -0
  20. package/lib/cjs/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts.map +1 -1
  21. package/lib/cjs/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js +5 -0
  22. package/lib/cjs/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js.map +1 -1
  23. package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts +2 -0
  24. package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
  25. package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js +5 -0
  26. package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
  27. package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +3 -0
  28. package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
  29. package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js +5 -0
  30. package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
  31. package/lib/cjs/tile/TileTreeReference.d.ts +5 -1
  32. package/lib/cjs/tile/TileTreeReference.d.ts.map +1 -1
  33. package/lib/cjs/tile/TileTreeReference.js +8 -1
  34. package/lib/cjs/tile/TileTreeReference.js.map +1 -1
  35. package/lib/cjs/tile/map/CesiumTerrainProvider.d.ts.map +1 -1
  36. package/lib/cjs/tile/map/CesiumTerrainProvider.js +5 -0
  37. package/lib/cjs/tile/map/CesiumTerrainProvider.js.map +1 -1
  38. package/lib/cjs/tile/map/ImageryTileTree.d.ts +4 -0
  39. package/lib/cjs/tile/map/ImageryTileTree.d.ts.map +1 -1
  40. package/lib/cjs/tile/map/ImageryTileTree.js +51 -5
  41. package/lib/cjs/tile/map/ImageryTileTree.js.map +1 -1
  42. package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +6 -1
  43. package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
  44. package/lib/cjs/tile/map/MapLayerImageryProvider.js +9 -1
  45. package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
  46. package/lib/cjs/tile/map/MapLayerTileTreeReference.d.ts +2 -0
  47. package/lib/cjs/tile/map/MapLayerTileTreeReference.d.ts.map +1 -1
  48. package/lib/cjs/tile/map/MapLayerTileTreeReference.js +3 -0
  49. package/lib/cjs/tile/map/MapLayerTileTreeReference.js.map +1 -1
  50. package/lib/cjs/tile/map/MapTileTree.d.ts +5 -2
  51. package/lib/cjs/tile/map/MapTileTree.d.ts.map +1 -1
  52. package/lib/cjs/tile/map/MapTileTree.js +24 -1
  53. package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
  54. package/lib/cjs/tile/map/TerrainMeshProvider.d.ts +6 -4
  55. package/lib/cjs/tile/map/TerrainMeshProvider.d.ts.map +1 -1
  56. package/lib/cjs/tile/map/TerrainMeshProvider.js +9 -4
  57. package/lib/cjs/tile/map/TerrainMeshProvider.js.map +1 -1
  58. package/lib/esm/AccuDraw.d.ts.map +1 -1
  59. package/lib/esm/AccuDraw.js +11 -2
  60. package/lib/esm/AccuDraw.js.map +1 -1
  61. package/lib/esm/BriefcaseConnection.d.ts +2 -0
  62. package/lib/esm/BriefcaseConnection.d.ts.map +1 -1
  63. package/lib/esm/BriefcaseConnection.js +4 -0
  64. package/lib/esm/BriefcaseConnection.js.map +1 -1
  65. package/lib/esm/Viewport.d.ts.map +1 -1
  66. package/lib/esm/Viewport.js +5 -3
  67. package/lib/esm/Viewport.js.map +1 -1
  68. package/lib/esm/internal/tile/RealityModelTileTree.d.ts +2 -0
  69. package/lib/esm/internal/tile/RealityModelTileTree.d.ts.map +1 -1
  70. package/lib/esm/internal/tile/RealityModelTileTree.js +5 -0
  71. package/lib/esm/internal/tile/RealityModelTileTree.js.map +1 -1
  72. package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +3 -0
  73. package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
  74. package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +5 -0
  75. package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
  76. package/lib/esm/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts +3 -0
  77. package/lib/esm/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts.map +1 -1
  78. package/lib/esm/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js +5 -0
  79. package/lib/esm/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js.map +1 -1
  80. package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts +2 -0
  81. package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
  82. package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js +5 -0
  83. package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
  84. package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +3 -0
  85. package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
  86. package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js +5 -0
  87. package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
  88. package/lib/esm/tile/TileTreeReference.d.ts +5 -1
  89. package/lib/esm/tile/TileTreeReference.d.ts.map +1 -1
  90. package/lib/esm/tile/TileTreeReference.js +8 -1
  91. package/lib/esm/tile/TileTreeReference.js.map +1 -1
  92. package/lib/esm/tile/map/CesiumTerrainProvider.d.ts.map +1 -1
  93. package/lib/esm/tile/map/CesiumTerrainProvider.js +5 -0
  94. package/lib/esm/tile/map/CesiumTerrainProvider.js.map +1 -1
  95. package/lib/esm/tile/map/ImageryTileTree.d.ts +4 -0
  96. package/lib/esm/tile/map/ImageryTileTree.d.ts.map +1 -1
  97. package/lib/esm/tile/map/ImageryTileTree.js +52 -6
  98. package/lib/esm/tile/map/ImageryTileTree.js.map +1 -1
  99. package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +6 -1
  100. package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
  101. package/lib/esm/tile/map/MapLayerImageryProvider.js +9 -1
  102. package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
  103. package/lib/esm/tile/map/MapLayerTileTreeReference.d.ts +2 -0
  104. package/lib/esm/tile/map/MapLayerTileTreeReference.d.ts.map +1 -1
  105. package/lib/esm/tile/map/MapLayerTileTreeReference.js +3 -0
  106. package/lib/esm/tile/map/MapLayerTileTreeReference.js.map +1 -1
  107. package/lib/esm/tile/map/MapTileTree.d.ts +5 -2
  108. package/lib/esm/tile/map/MapTileTree.d.ts.map +1 -1
  109. package/lib/esm/tile/map/MapTileTree.js +24 -1
  110. package/lib/esm/tile/map/MapTileTree.js.map +1 -1
  111. package/lib/esm/tile/map/TerrainMeshProvider.d.ts +6 -4
  112. package/lib/esm/tile/map/TerrainMeshProvider.d.ts.map +1 -1
  113. package/lib/esm/tile/map/TerrainMeshProvider.js +9 -4
  114. package/lib/esm/tile/map/TerrainMeshProvider.js.map +1 -1
  115. package/package.json +19 -19
@@ -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,OAAO,EAAoD,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EACL,eAAe,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,aAAa,EAAE,eAAe,EAChG,uBAAuB,EAAsB,iBAAiB,EACzC,6BAA6B,GACnD,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAyB,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG3D,MAAM,cAAc,GAAI,uDAAuD,CAAC;AA6Dh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AChB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\nimport { Cartographic, ImageMapLayerSettings, ImageSource, ServerError } from \"@itwin/core-common\";\nimport { IModelApp } from \"../../../../IModelApp\";\nimport {\n ArcGisErrorCode, ArcGisGeometryReaderJSON, ArcGISImageryProvider, ArcGISTileMap, ArcGisUtilities,\n FeatureGraphicsRenderer, ImageryMapTileTree, MapCartoRectangle, MapFeatureInfoOptions, MapLayerFeature,\n MapLayerFeatureInfo, MapLayerImageryProviderStatus, MapSubLayerFeatureInfo, QuadId,\n} from \"../../../../tile/internal\";\nimport { PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\nimport { Point2d, Range2d, Range2dProps, XYProps } from \"@itwin/core-geometry\";\nimport { IModelStatus, Logger } from \"@itwin/core-bentley\";\nimport { HitDetail } from \"../../../../HitDetail\";\n\nconst loggerCategory = \"MapLayerImageryProvider.ArcGISMapLayerImageryProvider\";\n\n/** @internal */\nexport interface ArcGISIdentifyImageDisplayProps {\n width: number;\n height: number;\n dpi: number;\n}\n\n/** @internal */\nexport interface ArcGISIdentifyLayersProps {\n prefix: \"top\"|\"visible\"|\"all\";\n layerIds?: string[];\n}\n\n/** @internal */\nexport interface ArcGISIdentifyRequestUrlProps {\n /** The geometry to identify on. Point only support */\n geometry: XYProps;\n\n /** The type of geometry specified by the geometry parameter. Point only support */\n geometryType: \"esriGeometryPoint\";\n\n /** The well-known ID of the spatial reference of the input and output geometries as well as the mapExtent. */\n sr?: number;\n\n /** The layers to perform the identify operation on. The default value is top.\n * Format: [top | visible | all]:layerId1,layerId2\n */\n layers?: ArcGISIdentifyLayersProps;\n\n /** The distance in screen pixels from the specified geometry within which the identify operation should be performed.\n * The value for the tolerance is an integer.\n */\n tolerance: number;\n\n /** The extent or bounding box of the map currently being viewed.\n * Format: <xmin>, <ymin>, <xmax>, <ymax>\n */\n mapExtent: Range2dProps;\n\n /** The screen image display parameters (width, height, and DPI) of the map being currently viewed. T\n * Format: <width>,<height>,<dpi>\n */\n imageDisplay: ArcGISIdentifyImageDisplayProps;\n\n /** If true, the result set will include the geometries associated with each result. The default is true.\n */\n returnGeometry?: boolean;\n\n /** This option can be used to specify the maximum allowable offset to be used for generalizing geometries returned by the identify operation.\n * The maxAllowableOffset is in the units of the sr.\n */\n maxAllowableOffset?: number;\n\n /** The response format. The default response format is html.\n */\n f?: \"json\"|\"html\";\n\n}\n\n/** @internal */\nexport class ArcGISIdentifyRequestUrl {\n public static fromJSON(baseUrl: URL|string, json: ArcGISIdentifyRequestUrlProps, srFractionDigits?: number): URL {\n\n const newUrl = new URL(baseUrl);\n newUrl.pathname = `${newUrl.pathname}/identify`;\n\n if (json.f) {\n newUrl.searchParams.append(\"f\", json.f);\n }\n\n const geomPt = Point2d.fromJSON(json.geometry);\n newUrl.searchParams.append(\"geometry\", `${this.toFixed(geomPt.x, srFractionDigits)},${this.toFixed(geomPt.y, srFractionDigits)}`);\n newUrl.searchParams.append(\"geometryType\", json.geometryType);\n\n if (json.sr) {\n newUrl.searchParams.append(\"sr\", `${json.sr}`);\n }\n\n if (json.layers) {\n newUrl.searchParams.append(\"layers\", `${json.layers.prefix}${json.layers.layerIds?.length ? `: ${json.layers.layerIds.join(\",\")}` : \"\"}`);\n }\n\n newUrl.searchParams.append(\"tolerance\", `${json.tolerance}`);\n\n newUrl.searchParams.append(\"mapExtent\", ArcGISIdentifyRequestUrl.getExtentString(json.mapExtent, srFractionDigits));\n\n newUrl.searchParams.append(\"imageDisplay\", `${json.imageDisplay.width},${json.imageDisplay.height},${json.imageDisplay.dpi}`);\n\n if (json.returnGeometry !== undefined) {\n newUrl.searchParams.append(\"returnGeometry\", json.returnGeometry ? \"true\" : \"false\");\n }\n\n if (json.maxAllowableOffset !== undefined) {\n newUrl.searchParams.append(\"maxAllowableOffset\", `${this.toFixed(json.maxAllowableOffset, srFractionDigits)}`);\n }\n\n return newUrl;\n }\n\n public static toFixed(value: number, srFractionDigits?: number) {\n return srFractionDigits === undefined ? value.toString() : value.toFixed(srFractionDigits);\n }\n\n public static getExtentString(range: Range2dProps, srFractionDigits?: number) {\n const extent = Range2d.fromJSON(range);\n const extentStringArray: string[] = [];\n extent.toFloat64Array().forEach((value) => extentStringArray.push(this.toFixed(value, srFractionDigits)));\n return extentStringArray.join(\",\");\n }\n}\n\n/** @internal */\nexport class ArcGISMapLayerImageryProvider extends ArcGISImageryProvider {\n private _maxDepthFromLod = 0;\n private _minDepthFromLod = 0;\n private _copyrightText = \"Copyright\";\n private _tileMapSupported = false;\n private _mapSupported = false;\n private _tilesOnly = false;\n private _tileMap: ArcGISTileMap|undefined;\n\n public serviceJson: any;\n constructor(settings: ImageMapLayerSettings) {\n super(settings, false);\n this._accessClient = IModelApp.mapLayerFormatRegistry.getAccessClient(settings.formatId);\n }\n\n protected override get _filterByCartoRange() { return false; } // Can't trust footprint ranges (USGS Hydro)\n\n public override get minimumZoomLevel() { return Math.max(super.minimumZoomLevel, this._minDepthFromLod); }\n public override get maximumZoomLevel() { return this._maxDepthFromLod > 0 ? this._maxDepthFromLod : super.maximumZoomLevel; }\n\n public uintToString(uintArray: any) {\n return Buffer.from(uintArray).toJSON();\n\n }\n\n private async fetchTile(row: number, column: number, zoomLevel: number) {\n const tileUrl: string = await this.constructUrl(row, column, zoomLevel);\n if (tileUrl.length === 0)\n return undefined;\n return this.fetch(new URL(tileUrl), { method: \"GET\" });\n }\n\n public override async loadTile(row: number, column: number, zoomLevel: number): Promise<ImageSource | undefined> {\n if ((this.status === MapLayerImageryProviderStatus.RequireAuth)) {\n return undefined;\n }\n\n try {\n const tileResponse = await this.fetchTile(row, column, zoomLevel);\n if (tileResponse === undefined)\n return undefined;\n\n if (!this._hasSuccessfullyFetchedTile) {\n this._hasSuccessfullyFetchedTile = true;\n }\n return await this.getImageFromTileResponse(tileResponse, zoomLevel);\n } catch (error) {\n Logger.logError(loggerCategory, `Error occurred when loading tile(${row},${column},${zoomLevel}) : ${error}`);\n return undefined;\n }\n }\n\n protected override _generateChildIds(quadId: QuadId, resolveChildren: (childIds: QuadId[]) => void) {\n const childIds = this.getPotentialChildIds(quadId);\n if (quadId.level < Math.max(1, this.minimumZoomLevel-1)) {\n resolveChildren(childIds);\n return;\n }\n\n if (this._tileMap) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this._tileMap.getChildrenAvailability(childIds).then((availability) => {\n const availableChildIds = new Array<QuadId>();\n for (let i = 0; i < availability.length; i++)\n if (availability[i])\n availableChildIds.push(childIds[i]);\n\n resolveChildren (availableChildIds);\n });\n } else if (this._usesCachedTiles && this.cartoRange) {\n // Filter children by range\n const availableChildIds = new Array<QuadId>();\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < childIds.length; i++) {\n const childExtent = this.getEPSG4326Extent(childIds[i].row, childIds[i].column, childIds[i].level);\n\n const childRange = MapCartoRectangle.fromDegrees(childExtent.longitudeLeft, childExtent.latitudeBottom, childExtent.longitudeRight, childExtent.latitudeTop);\n if (childRange.intersectsRange(this.cartoRange)) {\n availableChildIds.push(childIds[i]);\n }\n }\n resolveChildren (availableChildIds);\n } else {\n resolveChildren (childIds); // Resolve all children\n }\n }\n\n public override async initialize(): Promise<void> {\n\n const metadata = await this.getServiceJson();\n\n if (metadata?.content === undefined)\n throw new ServerError(IModelStatus.ValidationFailed, \"\");\n\n const json = metadata.content;\n if (json?.error?.code === ArcGisErrorCode.TokenRequired\n || json?.error?.code === ArcGisErrorCode.InvalidToken\n || json?.error?.code === ArcGisErrorCode.MissingPermissions\n ) {\n // Check again layer status, it might have change during await.\n if (this.status === MapLayerImageryProviderStatus.Valid) {\n this.setStatus(MapLayerImageryProviderStatus.RequireAuth);\n return; // By returning (i.e not throwing), we ensure the tileTree get created and current provider is preserved to report status.\n }\n }\n\n this.serviceJson = json;\n\n if (json.capabilities) {\n const capabilities = json.capabilities.split(\",\");\n\n this._querySupported = capabilities.includes(\"Query\");\n this._tileMapSupported = capabilities.includes(\"Tilemap\");\n this._mapSupported = capabilities.includes(\"Map\");\n this._tilesOnly = capabilities.includes(\"TilesOnly\");\n }\n\n if (json.copyrightText)\n this._copyrightText = json.copyrightText;\n\n this._usesCachedTiles = !!json.tileInfo;\n\n if (this._usesCachedTiles) {\n // Only EPSG:3857 is supported with pre-rendered tiles. Fall back to 'Export' queries if possible otherwise throw.\n if (!ArcGisUtilities.isEpsg3857Compatible(json.tileInfo)) {\n if (this._mapSupported && !this._tilesOnly) {\n this._usesCachedTiles = false;\n } else {\n throw new ServerError(IModelStatus.ValidationFailed, \"Invalid coordinate system\");\n }\n }\n }\n\n if (this._usesCachedTiles) {\n // Read max LOD\n if (json.maxScale !== undefined && json.maxScale !== 0 && Array.isArray(json.tileInfo.lods)) {\n for (; this._maxDepthFromLod < json.tileInfo.lods.length && json.tileInfo.lods[this._maxDepthFromLod].scale > json.maxScale; this._maxDepthFromLod++)\n ;\n }\n\n // Create tile map object only if we are going to request tiles from this server and it support tilemap requests.\n if (this._tileMapSupported) {\n const fetch = async (url: URL, options?: RequestInit): Promise<Response> => {\n return this.fetch(url, options);\n };\n this._tileMap = new ArcGISTileMap(this._settings.url, this._settings, fetch);\n }\n }\n\n // Read range using fullextent from service metadata\n if (json.fullExtent) {\n if (json.fullExtent.spatialReference.latestWkid === 3857 || json.fullExtent.spatialReference.wkid === 102100) {\n const range3857 = Range2d.createFrom({\n low: {x: json.fullExtent.xmin, y: json.fullExtent.ymin},\n high: {x: json.fullExtent.xmax, y: json.fullExtent.ymax} });\n\n const west = this.getEPSG4326Lon(range3857.xLow);\n const south = this.getEPSG4326Lat(range3857.yLow);\n const east = this.getEPSG4326Lon(range3857.xHigh);\n const north = this.getEPSG4326Lat(range3857.yHigh);\n this.cartoRange = MapCartoRectangle.fromDegrees(west, south, east, north);\n }\n }\n\n // Read minLOD if available\n if (json.minLOD !== undefined) {\n const minLod = parseInt(json.minLOD, 10);\n if (!Number.isNaN(minLod)) {\n this._minDepthFromLod = minLod;\n }\n } else if (json.minScale) {\n // Read min LOD using minScale\n const minScale = json.minScale;\n if (json.tileInfo?.lods !== undefined && Array.isArray(json.tileInfo.lods)) {\n for (const lod of json.tileInfo.lods) {\n if (lod.scale < minScale) {\n this._minDepthFromLod = lod.level;\n break;\n }\n }\n }\n }\n\n }\n\n public override addLogoCards(cards: HTMLTableElement): void {\n if (!cards.dataset.arcGisLogoCard) {\n cards.dataset.arcGisLogoCard = \"true\";\n cards.appendChild(IModelApp.makeLogoCard({ heading: \"ArcGIS\", notice: this._copyrightText }));\n }\n }\n\n // Translates the provided Cartographic into a EPSG:3857 point, and retrieve information.\n // tolerance is in pixels\n private async getIdentifyData(quadId: QuadId, carto: Cartographic, tolerance: number, returnGeometry?: boolean, maxAllowableOffset?: number): Promise<any> {\n\n const bbox = this.getEPSG3857Extent(quadId.row, quadId.column, quadId.level);\n const layerIds = new Array<string>();\n this._settings.subLayers.forEach((subLayer) => {\n if (this._settings.isSubLayerVisible(subLayer))\n layerIds.push(subLayer.idString);\n });\n const urlObj = ArcGISIdentifyRequestUrl.fromJSON(this._settings.url, {\n f: \"json\",\n geometry: {x: this.getEPSG3857X(carto.longitudeDegrees), y: this.getEPSG3857Y(carto.latitudeDegrees)},\n geometryType: \"esriGeometryPoint\",\n tolerance,\n mapExtent: {low: {x: bbox.left, y: bbox.bottom}, high: {x: bbox.right, y: bbox.top}},\n sr: 3857,\n imageDisplay: {width: this.tileSize, height: this.tileSize, dpi: 96},\n layers: {prefix: \"top\", layerIds},\n returnGeometry,\n maxAllowableOffset}, 3 /* 1mm accuracy*/);\n\n const response = await this.fetch(urlObj, { method: \"GET\" } );\n return response.json();\n }\n\n // Makes an identify request to ESRI MapService server, and return it as a list of formatted strings\n public override async getToolTip(strings: string[], quadId: QuadId, carto: Cartographic, tree: ImageryMapTileTree): Promise<void> {\n await super.getToolTip(strings, quadId, carto, tree);\n\n if (!this._querySupported)\n return;\n\n const stringSet = new Set<string>();\n const json = await this.getIdentifyData(quadId, carto, 1);\n\n if (json && Array.isArray(json.results)) {\n for (const result of json.results) {\n if (result.attributes !== undefined && result.attributes[result.displayFieldName] !== undefined) {\n const thisString = `${result.displayFieldName}: ${result.attributes[result.displayFieldName]}`;\n if (!stringSet.has(thisString)) {\n strings.push(thisString);\n stringSet.add(thisString);\n }\n }\n }\n }\n }\n\n // Makes an identify request to ESRI MapService , and return it as a list MapLayerFeatureInfo object\n public override async getFeatureInfo(featureInfos: MapLayerFeatureInfo[], quadId: QuadId, carto: Cartographic, _tree: ImageryMapTileTree, hit: HitDetail, options?: MapFeatureInfoOptions): Promise<void> {\n if (!this._querySupported)\n return;\n\n const tileExtent = this.getEPSG3857Extent(quadId.row, quadId.column, quadId.level);\n const toleranceWorld = (tileExtent.top - tileExtent.bottom) / this.tileSize;\n const maxAllowableOffsetFactor = 2;\n const maxAllowableOffset = maxAllowableOffsetFactor*toleranceWorld;\n\n const tolerancePixel = options?.tolerance ?? 7;\n const json = await this.getIdentifyData(quadId, carto, tolerancePixel, true, maxAllowableOffset);\n if (json && Array.isArray(json.results)) {\n const renderer = new FeatureGraphicsRenderer({viewport: hit.viewport, crs: \"webMercator\"});\n\n const layerInfo: MapLayerFeatureInfo = { layerName: this._settings.name, subLayerInfos: [] };\n\n // The 'identify' service returns us a flat/unordered list of records..\n // results may represent features for the a common subLayer.\n // For simplicity, we group together features for a given sub-layer.\n const subLayers = new Map<string, MapSubLayerFeatureInfo> ();\n\n for (const result of json.results) {\n\n let subLayerInfo = subLayers.get(result.layerName);\n if (!subLayerInfo) {\n subLayerInfo = {\n subLayerName: result.layerName ?? \"\",\n displayFieldName: result.displayFieldName,\n features: [],\n };\n subLayers.set(result.layerName, subLayerInfo);\n }\n const feature: MapLayerFeature = {geometries: [], attributes: []};\n\n // Read all feature attributes\n for (const [key, value] of Object.entries(result.attributes)) {\n // Convert everything to string for now\n const strValue = String(value);\n feature.attributes.push({\n value: { valueFormat: PropertyValueFormat.Primitive, value: strValue, displayValue: strValue },\n property: { name: key, displayLabel: key, typename: StandardTypeNames.String },\n });\n }\n\n // Read feature geometries\n const geomReader = new ArcGisGeometryReaderJSON(result.geometryType, renderer);\n await geomReader.readGeometry(result.geometry);\n const graphics = renderer.moveGraphics();\n feature.geometries = graphics.map((graphic) => {\n return {graphic};\n });\n subLayerInfo.features.push(feature);\n\n }\n\n for ( const value of subLayers.values()) {\n layerInfo.subLayerInfos!.push(value);\n }\n\n featureInfos.push(layerInfo);\n }\n }\n\n protected getLayerString(prefix = \"show\"): string {\n const layers = new Array<string>();\n this._settings.subLayers.forEach((subLayer) => {\n if (this._settings.isSubLayerVisible(subLayer))\n layers.push(subLayer.idString);\n });\n\n return `${prefix}: ${layers.join(\",\")} `;\n }\n\n // construct the Url from the desired Tile\n public async constructUrl(row: number, column: number, zoomLevel: number): Promise<string> {\n let tmpUrl;\n if (this._usesCachedTiles) {\n tmpUrl = `${this._settings.url}/tile/${zoomLevel}/${row}/${column} `;\n } else {\n const bboxString = `${this.getEPSG3857ExtentString(row, column, zoomLevel)}&bboxSR=3857`;\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`;\n }\n return tmpUrl;\n }\n}\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,OAAO,EAAoD,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EACL,eAAe,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,aAAa,EAAE,eAAe,EAChG,uBAAuB,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,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","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\nimport { Cartographic, ImageMapLayerSettings, ImageSource, ServerError } from \"@itwin/core-common\";\nimport { IModelApp } from \"../../../../IModelApp\";\nimport {\n ArcGisErrorCode, ArcGisGeometryReaderJSON, ArcGISImageryProvider, ArcGISTileMap, ArcGisUtilities,\n FeatureGraphicsRenderer, ImageryMapTileTree, MapCartoRectangle, MapFeatureInfoOptions, MapLayerFeature,\n MapLayerFeatureInfo, MapLayerImageryProviderStatus, MapSubLayerFeatureInfo, QuadId,\n} from \"../../../../tile/internal\";\nimport { PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\nimport { Point2d, Range2d, Range2dProps, XYProps } from \"@itwin/core-geometry\";\nimport { IModelStatus, Logger } from \"@itwin/core-bentley\";\nimport { HitDetail } from \"../../../../HitDetail\";\nimport { ScreenViewport } from \"../../../../Viewport\";\n\n\nconst loggerCategory = \"MapLayerImageryProvider.ArcGISMapLayerImageryProvider\";\n\n/** @internal */\nexport interface ArcGISIdentifyImageDisplayProps {\n width: number;\n height: number;\n dpi: number;\n}\n\n/** @internal */\nexport interface ArcGISIdentifyLayersProps {\n prefix: \"top\"|\"visible\"|\"all\";\n layerIds?: string[];\n}\n\n/** @internal */\nexport interface ArcGISIdentifyRequestUrlProps {\n /** The geometry to identify on. Point only support */\n geometry: XYProps;\n\n /** The type of geometry specified by the geometry parameter. Point only support */\n geometryType: \"esriGeometryPoint\";\n\n /** The well-known ID of the spatial reference of the input and output geometries as well as the mapExtent. */\n sr?: number;\n\n /** The layers to perform the identify operation on. The default value is top.\n * Format: [top | visible | all]:layerId1,layerId2\n */\n layers?: ArcGISIdentifyLayersProps;\n\n /** The distance in screen pixels from the specified geometry within which the identify operation should be performed.\n * The value for the tolerance is an integer.\n */\n tolerance: number;\n\n /** The extent or bounding box of the map currently being viewed.\n * Format: <xmin>, <ymin>, <xmax>, <ymax>\n */\n mapExtent: Range2dProps;\n\n /** The screen image display parameters (width, height, and DPI) of the map being currently viewed. T\n * Format: <width>,<height>,<dpi>\n */\n imageDisplay: ArcGISIdentifyImageDisplayProps;\n\n /** If true, the result set will include the geometries associated with each result. The default is true.\n */\n returnGeometry?: boolean;\n\n /** This option can be used to specify the maximum allowable offset to be used for generalizing geometries returned by the identify operation.\n * The maxAllowableOffset is in the units of the sr.\n */\n maxAllowableOffset?: number;\n\n /** The response format. The default response format is html.\n */\n f?: \"json\"|\"html\";\n\n}\n\n/** @internal */\nexport class ArcGISIdentifyRequestUrl {\n public static fromJSON(baseUrl: URL|string, json: ArcGISIdentifyRequestUrlProps, srFractionDigits?: number): URL {\n\n const newUrl = new URL(baseUrl);\n newUrl.pathname = `${newUrl.pathname}/identify`;\n\n if (json.f) {\n newUrl.searchParams.append(\"f\", json.f);\n }\n\n const geomPt = Point2d.fromJSON(json.geometry);\n newUrl.searchParams.append(\"geometry\", `${this.toFixed(geomPt.x, srFractionDigits)},${this.toFixed(geomPt.y, srFractionDigits)}`);\n newUrl.searchParams.append(\"geometryType\", json.geometryType);\n\n if (json.sr) {\n newUrl.searchParams.append(\"sr\", `${json.sr}`);\n }\n\n if (json.layers) {\n newUrl.searchParams.append(\"layers\", `${json.layers.prefix}${json.layers.layerIds?.length ? `: ${json.layers.layerIds.join(\",\")}` : \"\"}`);\n }\n\n newUrl.searchParams.append(\"tolerance\", `${json.tolerance}`);\n\n newUrl.searchParams.append(\"mapExtent\", ArcGISIdentifyRequestUrl.getExtentString(json.mapExtent, srFractionDigits));\n\n newUrl.searchParams.append(\"imageDisplay\", `${json.imageDisplay.width},${json.imageDisplay.height},${json.imageDisplay.dpi}`);\n\n if (json.returnGeometry !== undefined) {\n newUrl.searchParams.append(\"returnGeometry\", json.returnGeometry ? \"true\" : \"false\");\n }\n\n if (json.maxAllowableOffset !== undefined) {\n newUrl.searchParams.append(\"maxAllowableOffset\", `${this.toFixed(json.maxAllowableOffset, srFractionDigits)}`);\n }\n\n return newUrl;\n }\n\n public static toFixed(value: number, srFractionDigits?: number) {\n return srFractionDigits === undefined ? value.toString() : value.toFixed(srFractionDigits);\n }\n\n public static getExtentString(range: Range2dProps, srFractionDigits?: number) {\n const extent = Range2d.fromJSON(range);\n const extentStringArray: string[] = [];\n extent.toFloat64Array().forEach((value) => extentStringArray.push(this.toFixed(value, srFractionDigits)));\n return extentStringArray.join(\",\");\n }\n}\n\n/** @internal */\nexport class ArcGISMapLayerImageryProvider extends ArcGISImageryProvider {\n private _maxDepthFromLod = 0;\n private _minDepthFromLod = 0;\n private _copyrightText = \"Copyright\";\n private _tileMapSupported = false;\n private _mapSupported = false;\n private _tilesOnly = false;\n private _tileMap: ArcGISTileMap|undefined;\n\n public serviceJson: any;\n constructor(settings: ImageMapLayerSettings) {\n super(settings, false);\n this._accessClient = IModelApp.mapLayerFormatRegistry.getAccessClient(settings.formatId);\n }\n\n protected override get _filterByCartoRange() { return false; } // Can't trust footprint ranges (USGS Hydro)\n\n public override get minimumZoomLevel() { return Math.max(super.minimumZoomLevel, this._minDepthFromLod); }\n public override get maximumZoomLevel() { return this._maxDepthFromLod > 0 ? this._maxDepthFromLod : super.maximumZoomLevel; }\n\n public uintToString(uintArray: any) {\n return Buffer.from(uintArray).toJSON();\n\n }\n\n private async fetchTile(row: number, column: number, zoomLevel: number) {\n const tileUrl: string = await this.constructUrl(row, column, zoomLevel);\n if (tileUrl.length === 0)\n return undefined;\n return this.fetch(new URL(tileUrl), { method: \"GET\" });\n }\n\n public override async loadTile(row: number, column: number, zoomLevel: number): Promise<ImageSource | undefined> {\n if ((this.status === MapLayerImageryProviderStatus.RequireAuth)) {\n return undefined;\n }\n\n try {\n const tileResponse = await this.fetchTile(row, column, zoomLevel);\n if (tileResponse === undefined)\n return undefined;\n\n if (!this._hasSuccessfullyFetchedTile) {\n this._hasSuccessfullyFetchedTile = true;\n }\n return await this.getImageFromTileResponse(tileResponse, zoomLevel);\n } catch (error) {\n Logger.logError(loggerCategory, `Error occurred when loading tile(${row},${column},${zoomLevel}) : ${error}`);\n return undefined;\n }\n }\n\n protected override _generateChildIds(quadId: QuadId, resolveChildren: (childIds: QuadId[]) => void) {\n const childIds = this.getPotentialChildIds(quadId);\n if (quadId.level < Math.max(1, this.minimumZoomLevel-1)) {\n resolveChildren(childIds);\n return;\n }\n\n if (this._tileMap) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this._tileMap.getChildrenAvailability(childIds).then((availability) => {\n const availableChildIds = new Array<QuadId>();\n for (let i = 0; i < availability.length; i++)\n if (availability[i])\n availableChildIds.push(childIds[i]);\n\n resolveChildren (availableChildIds);\n });\n } else if (this._usesCachedTiles && this.cartoRange) {\n // Filter children by range\n const availableChildIds = new Array<QuadId>();\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < childIds.length; i++) {\n const childExtent = this.getEPSG4326Extent(childIds[i].row, childIds[i].column, childIds[i].level);\n\n const childRange = MapCartoRectangle.fromDegrees(childExtent.longitudeLeft, childExtent.latitudeBottom, childExtent.longitudeRight, childExtent.latitudeTop);\n if (childRange.intersectsRange(this.cartoRange)) {\n availableChildIds.push(childIds[i]);\n }\n }\n resolveChildren (availableChildIds);\n } else {\n resolveChildren (childIds); // Resolve all children\n }\n }\n\n public override async initialize(): Promise<void> {\n\n const metadata = await this.getServiceJson();\n\n if (metadata?.content === undefined)\n throw new ServerError(IModelStatus.ValidationFailed, \"\");\n\n const json = metadata.content;\n if (json?.error?.code === ArcGisErrorCode.TokenRequired\n || json?.error?.code === ArcGisErrorCode.InvalidToken\n || json?.error?.code === ArcGisErrorCode.MissingPermissions\n ) {\n // Check again layer status, it might have change during await.\n if (this.status === MapLayerImageryProviderStatus.Valid) {\n this.setStatus(MapLayerImageryProviderStatus.RequireAuth);\n return; // By returning (i.e not throwing), we ensure the tileTree get created and current provider is preserved to report status.\n }\n }\n\n this.serviceJson = json;\n\n if (json.capabilities) {\n const capabilities = json.capabilities.split(\",\");\n\n this._querySupported = capabilities.includes(\"Query\");\n this._tileMapSupported = capabilities.includes(\"Tilemap\");\n this._mapSupported = capabilities.includes(\"Map\");\n this._tilesOnly = capabilities.includes(\"TilesOnly\");\n }\n\n if (json.copyrightText)\n this._copyrightText = json.copyrightText;\n\n this._usesCachedTiles = !!json.tileInfo;\n\n if (this._usesCachedTiles) {\n // Only EPSG:3857 is supported with pre-rendered tiles. Fall back to 'Export' queries if possible otherwise throw.\n if (!ArcGisUtilities.isEpsg3857Compatible(json.tileInfo)) {\n if (this._mapSupported && !this._tilesOnly) {\n this._usesCachedTiles = false;\n } else {\n throw new ServerError(IModelStatus.ValidationFailed, \"Invalid coordinate system\");\n }\n }\n }\n\n if (this._usesCachedTiles) {\n // Read max LOD\n if (json.maxScale !== undefined && json.maxScale !== 0 && Array.isArray(json.tileInfo.lods)) {\n for (; this._maxDepthFromLod < json.tileInfo.lods.length && json.tileInfo.lods[this._maxDepthFromLod].scale > json.maxScale; this._maxDepthFromLod++)\n ;\n }\n\n // Create tile map object only if we are going to request tiles from this server and it support tilemap requests.\n if (this._tileMapSupported) {\n const fetch = async (url: URL, options?: RequestInit): Promise<Response> => {\n return this.fetch(url, options);\n };\n this._tileMap = new ArcGISTileMap(this._settings.url, this._settings, fetch);\n }\n }\n\n // Read range using fullextent from service metadata\n if (json.fullExtent) {\n if (json.fullExtent.spatialReference.latestWkid === 3857 || json.fullExtent.spatialReference.wkid === 102100) {\n const range3857 = Range2d.createFrom({\n low: {x: json.fullExtent.xmin, y: json.fullExtent.ymin},\n high: {x: json.fullExtent.xmax, y: json.fullExtent.ymax} });\n\n const west = this.getEPSG4326Lon(range3857.xLow);\n const south = this.getEPSG4326Lat(range3857.yLow);\n const east = this.getEPSG4326Lon(range3857.xHigh);\n const north = this.getEPSG4326Lat(range3857.yHigh);\n this.cartoRange = MapCartoRectangle.fromDegrees(west, south, east, north);\n }\n }\n\n // Read minLOD if available\n if (json.minLOD !== undefined) {\n const minLod = parseInt(json.minLOD, 10);\n if (!Number.isNaN(minLod)) {\n this._minDepthFromLod = minLod;\n }\n } else if (json.minScale) {\n // Read min LOD using minScale\n const minScale = json.minScale;\n if (json.tileInfo?.lods !== undefined && Array.isArray(json.tileInfo.lods)) {\n for (const lod of json.tileInfo.lods) {\n if (lod.scale < minScale) {\n this._minDepthFromLod = lod.level;\n break;\n }\n }\n }\n }\n\n }\n\n /** @deprecated in 5.0 Use [addAttributions] instead. */\n public override addLogoCards(cards: HTMLTableElement): void {\n if (!cards.dataset.arcGisLogoCard) {\n cards.dataset.arcGisLogoCard = \"true\";\n cards.appendChild(IModelApp.makeLogoCard({ heading: \"ArcGIS\", notice: this._copyrightText }));\n }\n }\n\n public override async addAttributions(cards: HTMLTableElement, _vp: ScreenViewport): Promise<void> {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return Promise.resolve(this.addLogoCards(cards));\n }\n\n // Translates the provided Cartographic into a EPSG:3857 point, and retrieve information.\n // tolerance is in pixels\n private async getIdentifyData(quadId: QuadId, carto: Cartographic, tolerance: number, returnGeometry?: boolean, maxAllowableOffset?: number): Promise<any> {\n\n const bbox = this.getEPSG3857Extent(quadId.row, quadId.column, quadId.level);\n const layerIds = new Array<string>();\n this._settings.subLayers.forEach((subLayer) => {\n if (this._settings.isSubLayerVisible(subLayer))\n layerIds.push(subLayer.idString);\n });\n const urlObj = ArcGISIdentifyRequestUrl.fromJSON(this._settings.url, {\n f: \"json\",\n geometry: {x: this.getEPSG3857X(carto.longitudeDegrees), y: this.getEPSG3857Y(carto.latitudeDegrees)},\n geometryType: \"esriGeometryPoint\",\n tolerance,\n mapExtent: {low: {x: bbox.left, y: bbox.bottom}, high: {x: bbox.right, y: bbox.top}},\n sr: 3857,\n imageDisplay: {width: this.tileSize, height: this.tileSize, dpi: 96},\n layers: {prefix: \"top\", layerIds},\n returnGeometry,\n maxAllowableOffset}, 3 /* 1mm accuracy*/);\n\n const response = await this.fetch(urlObj, { method: \"GET\" } );\n return response.json();\n }\n\n // Makes an identify request to ESRI MapService server, and return it as a list of formatted strings\n public override async getToolTip(strings: string[], quadId: QuadId, carto: Cartographic, tree: ImageryMapTileTree): Promise<void> {\n await super.getToolTip(strings, quadId, carto, tree);\n\n if (!this._querySupported)\n return;\n\n const stringSet = new Set<string>();\n const json = await this.getIdentifyData(quadId, carto, 1);\n\n if (json && Array.isArray(json.results)) {\n for (const result of json.results) {\n if (result.attributes !== undefined && result.attributes[result.displayFieldName] !== undefined) {\n const thisString = `${result.displayFieldName}: ${result.attributes[result.displayFieldName]}`;\n if (!stringSet.has(thisString)) {\n strings.push(thisString);\n stringSet.add(thisString);\n }\n }\n }\n }\n }\n\n // Makes an identify request to ESRI MapService , and return it as a list MapLayerFeatureInfo object\n public override async getFeatureInfo(featureInfos: MapLayerFeatureInfo[], quadId: QuadId, carto: Cartographic, _tree: ImageryMapTileTree, hit: HitDetail, options?: MapFeatureInfoOptions): Promise<void> {\n if (!this._querySupported)\n return;\n\n const tileExtent = this.getEPSG3857Extent(quadId.row, quadId.column, quadId.level);\n const toleranceWorld = (tileExtent.top - tileExtent.bottom) / this.tileSize;\n const maxAllowableOffsetFactor = 2;\n const maxAllowableOffset = maxAllowableOffsetFactor*toleranceWorld;\n\n const tolerancePixel = options?.tolerance ?? 7;\n const json = await this.getIdentifyData(quadId, carto, tolerancePixel, true, maxAllowableOffset);\n if (json && Array.isArray(json.results)) {\n const renderer = new FeatureGraphicsRenderer({viewport: hit.viewport, crs: \"webMercator\"});\n\n const layerInfo: MapLayerFeatureInfo = { layerName: this._settings.name, subLayerInfos: [] };\n\n // The 'identify' service returns us a flat/unordered list of records..\n // results may represent features for the a common subLayer.\n // For simplicity, we group together features for a given sub-layer.\n const subLayers = new Map<string, MapSubLayerFeatureInfo> ();\n\n for (const result of json.results) {\n\n let subLayerInfo = subLayers.get(result.layerName);\n if (!subLayerInfo) {\n subLayerInfo = {\n subLayerName: result.layerName ?? \"\",\n displayFieldName: result.displayFieldName,\n features: [],\n };\n subLayers.set(result.layerName, subLayerInfo);\n }\n const feature: MapLayerFeature = {geometries: [], attributes: []};\n\n // Read all feature attributes\n for (const [key, value] of Object.entries(result.attributes)) {\n // Convert everything to string for now\n const strValue = String(value);\n feature.attributes.push({\n value: { valueFormat: PropertyValueFormat.Primitive, value: strValue, displayValue: strValue },\n property: { name: key, displayLabel: key, typename: StandardTypeNames.String },\n });\n }\n\n // Read feature geometries\n const geomReader = new ArcGisGeometryReaderJSON(result.geometryType, renderer);\n await geomReader.readGeometry(result.geometry);\n const graphics = renderer.moveGraphics();\n feature.geometries = graphics.map((graphic) => {\n return {graphic};\n });\n subLayerInfo.features.push(feature);\n\n }\n\n for ( const value of subLayers.values()) {\n layerInfo.subLayerInfos!.push(value);\n }\n\n featureInfos.push(layerInfo);\n }\n }\n\n protected getLayerString(prefix = \"show\"): string {\n const layers = new Array<string>();\n this._settings.subLayers.forEach((subLayer) => {\n if (this._settings.isSubLayerVisible(subLayer))\n layers.push(subLayer.idString);\n });\n\n return `${prefix}: ${layers.join(\",\")} `;\n }\n\n // construct the Url from the desired Tile\n public async constructUrl(row: number, column: number, zoomLevel: number): Promise<string> {\n let tmpUrl;\n if (this._usesCachedTiles) {\n tmpUrl = `${this._settings.url}/tile/${zoomLevel}/${row}/${column} `;\n } else {\n const bboxString = `${this.getEPSG3857ExtentString(row, column, zoomLevel)}&bboxSR=3857`;\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`;\n }\n return tmpUrl;\n }\n}\n"]}
@@ -3,9 +3,12 @@
3
3
  */
4
4
  import { ImageMapLayerSettings } from "@itwin/core-common";
5
5
  import { MapLayerImageryProvider } from "../../../../tile/internal";
6
+ import { ScreenViewport } from "../../../../Viewport";
6
7
  export declare class AzureMapsLayerImageryProvider extends MapLayerImageryProvider {
7
8
  constructor(settings: ImageMapLayerSettings);
8
9
  constructUrl(y: number, x: number, zoom: number): Promise<string>;
10
+ /** @deprecated in 5.0 Use [addAttributions] instead. */
9
11
  addLogoCards(cards: HTMLTableElement): void;
12
+ addAttributions(cards: HTMLTableElement, _vp: ScreenViewport): Promise<void>;
10
13
  }
11
14
  //# sourceMappingURL=AzureMapsLayerImageryProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AzureMapsLayerImageryProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,qBAAa,6BAA8B,SAAQ,uBAAuB;gBAC5D,QAAQ,EAAE,qBAAqB;IAG9B,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAM9D,YAAY,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;CAM5D"}
1
+ {"version":3,"file":"AzureMapsLayerImageryProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.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,qBAAa,6BAA8B,SAAQ,uBAAuB;gBAC5D,QAAQ,EAAE,qBAAqB;IAG9B,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAM9E,wDAAwD;IACxC,YAAY,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;IAOrC,eAAe,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAInG"}
@@ -15,11 +15,16 @@ export class AzureMapsLayerImageryProvider extends MapLayerImageryProvider {
15
15
  return "";
16
16
  return `${this._settings.url}&${this._settings.accessKey.key}=${this._settings.accessKey.value}&api-version=2.0&zoom=${zoom}&x=${x}&y=${y}`;
17
17
  }
18
+ /** @deprecated in 5.0 Use [addAttributions] instead. */
18
19
  addLogoCards(cards) {
19
20
  if (!cards.dataset.azureMapsLogoCard) {
20
21
  cards.dataset.azureMapsLogoCard = "true";
21
22
  cards.appendChild(IModelApp.makeLogoCard({ heading: "Azure Maps", notice: IModelApp.localization.getLocalizedString("iModelJs:BackgroundMap.AzureMapsCopyright") }));
22
23
  }
23
24
  }
25
+ async addAttributions(cards, _vp) {
26
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
27
+ return Promise.resolve(this.addLogoCards(cards));
28
+ }
24
29
  }
25
30
  //# sourceMappingURL=AzureMapsLayerImageryProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AzureMapsLayerImageryProvider.js","sourceRoot":"","sources":["../../../../../../src/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,OAAO,6BAA8B,SAAQ,uBAAuB;IACxE,YAAY,QAA+B,IAAI,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAEvE,0CAA0C;IACnC,KAAK,CAAC,YAAY,CAAC,CAAS,EAAE,CAAS,EAAE,IAAY;QAC1D,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS;YAC3B,OAAO,EAAE,CAAC;QACZ,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,yBAAyB,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IAC9I,CAAC;IAEe,YAAY,CAAC,KAAuB;QAClD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC;YACrC,KAAK,CAAC,OAAO,CAAC,iBAAiB,GAAG,MAAM,CAAC;YACzC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,2CAA2C,CAAC,EAAE,CAAC,CAAC,CAAC;QACvK,CAAC;IACH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { ImageMapLayerSettings } from \"@itwin/core-common\";\nimport { IModelApp } from \"../../../../IModelApp\";\nimport { MapLayerImageryProvider } from \"../../../../tile/internal\";\n\nexport class AzureMapsLayerImageryProvider extends MapLayerImageryProvider {\n constructor(settings: ImageMapLayerSettings) { super(settings, true); }\n\n // construct the Url from the desired Tile\n public async constructUrl(y: number, x: number, zoom: number): Promise<string> {\n if (!this._settings.accessKey)\n return \"\";\n return `${this._settings.url}&${this._settings.accessKey.key}=${this._settings.accessKey.value}&api-version=2.0&zoom=${zoom}&x=${x}&y=${y}`;\n }\n\n public override addLogoCards(cards: HTMLTableElement): void {\n if (!cards.dataset.azureMapsLogoCard) {\n cards.dataset.azureMapsLogoCard = \"true\";\n cards.appendChild(IModelApp.makeLogoCard({ heading: \"Azure Maps\", notice: IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.AzureMapsCopyright\") }));\n }\n }\n}\n"]}
1
+ {"version":3,"file":"AzureMapsLayerImageryProvider.js","sourceRoot":"","sources":["../../../../../../src/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAIpE,MAAM,OAAO,6BAA8B,SAAQ,uBAAuB;IACxE,YAAY,QAA+B,IAAI,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAEvE,0CAA0C;IACnC,KAAK,CAAC,YAAY,CAAC,CAAS,EAAE,CAAS,EAAE,IAAY;QAC1D,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS;YAC3B,OAAO,EAAE,CAAC;QACZ,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,yBAAyB,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IAC9I,CAAC;IAED,wDAAwD;IACxC,YAAY,CAAC,KAAuB;QAClD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC;YACrC,KAAK,CAAC,OAAO,CAAC,iBAAiB,GAAG,MAAM,CAAC;YACzC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,2CAA2C,CAAC,EAAE,CAAC,CAAC,CAAC;QACvK,CAAC;IACH,CAAC;IAEe,KAAK,CAAC,eAAe,CAAC,KAAuB,EAAE,GAAmB;QAChF,4DAA4D;QAC5D,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IACnD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { ImageMapLayerSettings } from \"@itwin/core-common\";\nimport { IModelApp } from \"../../../../IModelApp\";\nimport { MapLayerImageryProvider } from \"../../../../tile/internal\";\nimport { ScreenViewport } from \"../../../../Viewport\";\n\n\nexport class AzureMapsLayerImageryProvider extends MapLayerImageryProvider {\n constructor(settings: ImageMapLayerSettings) { super(settings, true); }\n\n // construct the Url from the desired Tile\n public async constructUrl(y: number, x: number, zoom: number): Promise<string> {\n if (!this._settings.accessKey)\n return \"\";\n return `${this._settings.url}&${this._settings.accessKey.key}=${this._settings.accessKey.value}&api-version=2.0&zoom=${zoom}&x=${x}&y=${y}`;\n }\n\n /** @deprecated in 5.0 Use [addAttributions] instead. */\n public override addLogoCards(cards: HTMLTableElement): void {\n if (!cards.dataset.azureMapsLogoCard) {\n cards.dataset.azureMapsLogoCard = \"true\";\n cards.appendChild(IModelApp.makeLogoCard({ heading: \"Azure Maps\", notice: IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.AzureMapsCopyright\") }));\n }\n }\n\n public override async addAttributions(cards: HTMLTableElement, _vp: ScreenViewport): Promise<void> {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return Promise.resolve(this.addLogoCards(cards));\n }\n}\n"]}
@@ -19,7 +19,9 @@ export declare class BingMapsImageryLayerProvider extends MapLayerImageryProvide
19
19
  private tileXYToQuadKey;
20
20
  constructUrl(row: number, column: number, zoomLevel: number): Promise<string>;
21
21
  private getMatchingAttributions;
22
+ /** @deprecated in 5.0 Use [addAttributions] instead. */
22
23
  addLogoCards(cards: HTMLTableElement, vp: ScreenViewport): void;
24
+ addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void>;
23
25
  initialize(): Promise<void>;
24
26
  private readAttributions;
25
27
  }
@@ -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,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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,OAAO,CAAC,MAAM,CAAC;IAa1F,OAAO,CAAC,uBAAuB;IAqB9B,wDAAwD;IACzC,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"}
@@ -134,6 +134,7 @@ export class BingMapsImageryLayerProvider extends MapLayerImageryProvider {
134
134
  }
135
135
  return matchingAttributions;
136
136
  }
137
+ /** @deprecated in 5.0 Use [addAttributions] instead. */
137
138
  addLogoCards(cards, vp) {
138
139
  const tiles = IModelApp.tileAdmin.getTilesForUser(vp)?.selected;
139
140
  const matchingAttributions = this.getMatchingAttributions(tiles);
@@ -148,6 +149,10 @@ export class BingMapsImageryLayerProvider extends MapLayerImageryProvider {
148
149
  }
149
150
  cards.appendChild(IModelApp.makeLogoCard({ iconSrc: `${IModelApp.publicPath}images/bing.svg`, heading: "Microsoft Bing", notice: copyrightMsg }));
150
151
  }
152
+ async addAttributions(cards, vp) {
153
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
154
+ return Promise.resolve(this.addLogoCards(cards, vp));
155
+ }
151
156
  // initializes the BingImageryProvider by reading the templateUrl, logo image, and attribution list.
152
157
  async initialize() {
153
158
  // get the template url
@@ -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,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGzE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;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e,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","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { assert, BentleyError, IModelStatus } from \"@itwin/core-bentley\";\nimport { Range2d } from \"@itwin/core-geometry\";\nimport { ImageMapLayerSettings, ImageSource } from \"@itwin/core-common\";\nimport { request } from \"../../../../request/Request\";\nimport { IModelApp } from \"../../../../IModelApp\";\nimport { ScreenViewport } from \"../../../../Viewport\";\nimport {\n MapLayerImageryProvider, MapTile, MapTilingScheme, QuadId,\n Tile, WebMercatorTilingScheme,\n} from \"../../../../tile/internal\";\n\n/** Represents one range of geography and tile zoom levels for a bing data provider\n */\nclass Coverage {\n constructor(private _lowerLeftLatitude: number,\n private _lowerLeftLongitude: number,\n private _upperRightLatitude: number,\n private _upperRightLongitude: number,\n private _minimumZoomLevel: number,\n private _maximumZoomLevel: number) { }\n\n public overlaps(quadId: QuadId, tilingScheme: MapTilingScheme): boolean {\n const range: Range2d = quadId.getLatLongRangeDegrees(tilingScheme);\n if (quadId.level < this._minimumZoomLevel)\n return false;\n if (quadId.level > this._maximumZoomLevel)\n return false;\n if (range.low.x > this._upperRightLongitude)\n return false;\n if (range.low.y > this._upperRightLatitude)\n return false;\n if (range.high.x < this._lowerLeftLongitude)\n return false;\n if (range.high.y < this._lowerLeftLatitude)\n return false;\n\n return true;\n }\n}\n\n/** Represents the copyright message and an array of coverage data for one of bing's data providers (HERE for example).\n */\nclass BingAttribution {\n constructor(public copyrightMessage: string, private _coverages: Coverage[]) { }\n\n public matchesTile(tile: Tile, tilingScheme: MapTilingScheme): boolean {\n const quadId = QuadId.createFromContentId(tile.contentId);\n for (const coverage of this._coverages) {\n if (coverage.overlaps(quadId, tilingScheme))\n return true;\n }\n return false;\n }\n}\n\n// in deployed applications, we can only make https requests, but the Bing Maps metadata request returns templates with \"http:\".\n// This function fixes those.\nfunction replaceHttpWithHttps(originalUrl: string) {\n return originalUrl.startsWith(\"http:\") ? \"https:\".concat(originalUrl.slice(5)) : originalUrl;\n}\n\nexport class BingMapsImageryLayerProvider extends MapLayerImageryProvider {\n private _urlTemplate?: string;\n private _urlSubdomains?: string[];\n private _zoomMax: number;\n private _tileHeight: number;\n private _tileWidth: number;\n private _attributions?: BingAttribution[]; // array of Bing's data providers.\n private _mapTilingScheme: MapTilingScheme;\n private _urlBase: string;\n\n constructor(settings: ImageMapLayerSettings) {\n super(settings, true);\n this._urlBase = settings.url;\n this._zoomMax = 0;\n this._tileHeight = this._tileWidth = 0;\n this._mapTilingScheme = new WebMercatorTilingScheme();\n }\n\n public get tileWidth(): number { return this._tileWidth; }\n public get tileHeight(): number { return this._tileHeight; }\n\n private tileXYToQuadKey(tileX: number, tileY: number, zoomLevel: number) {\n // from C# example in bing documentation https://msdn.microsoft.com/en-us/library/bb259689.aspx\n let quadKey: string = \"\";\n\n // Root tile is not displayable. Returns 0 for _GetMaximumSize(). Should not end up here.\n assert(0 !== zoomLevel);\n\n for (let i: number = zoomLevel; i > 0; i--) {\n let digit: number = 0x30; // '0'\n const mask: number = 1 << (i - 1);\n if ((tileX & mask) !== 0) {\n digit++;\n }\n if ((tileY & mask) !== 0) {\n digit++;\n digit++;\n }\n quadKey = quadKey.concat(String.fromCharCode(digit));\n }\n return quadKey;\n }\n\n // construct the Url from the desired Tile\n public async constructUrl(row: number, column: number, zoomLevel: number): Promise<string> {\n // From the tile, get a \"quadKey\" the Microsoft way.\n const quadKey: string = this.tileXYToQuadKey(column, row, zoomLevel);\n const subdomain: string = this._urlSubdomains![(row + column) % this._urlSubdomains!.length];\n\n // from the template url, construct the tile url.\n let url: string = this._urlTemplate!.replace(\"{subdomain}\", subdomain);\n url = url.replace(\"{quadkey}\", quadKey);\n\n return url;\n }\n\n // gets the attributions that match the tile set.\n private getMatchingAttributions(tiles: Set<Tile> | undefined): BingAttribution[] {\n const matchingAttributions: BingAttribution[] = new Array<BingAttribution>();\n if (!this._attributions || !tiles)\n return matchingAttributions;\n\n const unmatchedSet: BingAttribution[] = this._attributions.slice();\n for (const tile of tiles) {\n if (tile instanceof MapTile) {\n // compare to the set of Bing attributions that we have not yet matched.\n for (let iAttr = 0; iAttr < unmatchedSet.length; iAttr++) {\n const attribution = unmatchedSet[iAttr];\n if (attribution.matchesTile(tile, this._mapTilingScheme)) {\n matchingAttributions.push(attribution);\n unmatchedSet.splice(iAttr, 1);\n break;\n }\n }\n }\n }\n return matchingAttributions;\n }\n\n public override addLogoCards(cards: HTMLTableElement, vp: ScreenViewport): void {\n const tiles = IModelApp.tileAdmin.getTilesForUser(vp)?.selected;\n const matchingAttributions = this.getMatchingAttributions(tiles);\n const copyrights: string[] = [];\n for (const match of matchingAttributions)\n copyrights.push(match.copyrightMessage);\n\n let copyrightMsg = \"\";\n for (let i = 0; i < copyrights.length; ++i) {\n if (i > 0)\n copyrightMsg += \"<br>\";\n copyrightMsg += copyrights[i];\n }\n\n cards.appendChild(IModelApp.makeLogoCard({ iconSrc: `${IModelApp.publicPath}images/bing.svg`, heading: \"Microsoft Bing\", notice: copyrightMsg }));\n }\n\n // initializes the BingImageryProvider by reading the templateUrl, logo image, and attribution list.\n public override async initialize(): Promise<void> {\n // get the template url\n const bingRequestUrl = this._urlBase.replace(\"{bingKey}\", this._settings.accessKey ? this._settings.accessKey.value : \"\");\n\n try {\n const bingResponseProps = await request(bingRequestUrl, \"json\");\n\n const thisResourceSetProps = bingResponseProps.resourceSets[0];\n const thisResourceProps = thisResourceSetProps.resources[0];\n this._zoomMax = thisResourceProps.zoomMax;\n this._tileHeight = thisResourceProps.imageHeight;\n this._tileWidth = thisResourceProps.imageWidth;\n this._urlTemplate = replaceHttpWithHttps(thisResourceProps.imageUrl.replace(\"{culture}\", \"en-US\")); // NEEDSWORK - get locale from somewhere.\n this._urlSubdomains = thisResourceProps.imageUrlSubdomains;\n // read the list of Bing's data suppliers and the range of data they provide. Used in calculation of copyright message.\n this.readAttributions(thisResourceProps.imageryProviders);\n\n // Bing sometimes provides tiles that have nothing but a camera icon in the middle of them when you ask\n // for tiles at zoom levels where they don't have data. Their application stops you from zooming in when that's the\n // case, but we can't stop - the user might want to look at design data a closer zoom. So we intentionally load such\n // a tile, and then compare other tiles to it, rejecting them if they match.\n this.loadTile(0, 0, this._zoomMax - 1).then((tileData: ImageSource | undefined) => { // eslint-disable-line @typescript-eslint/no-floating-promises\n if (tileData !== undefined)\n this._missingTileData = tileData.data as Uint8Array;\n });\n } catch {\n throw new BentleyError(IModelStatus.BadModel, \"Error in Bing Server communications\");\n }\n }\n\n // reads the list of Bing data providers and the map range for which they each provide data.\n private readAttributions(attributionProps: any) {\n for (const thisAttributionProps of attributionProps) {\n const copyrightMessage: string = thisAttributionProps.attribution;\n const coverages: Coverage[] = new Array<Coverage>();\n for (const thisCoverageProps of thisAttributionProps.coverageAreas) {\n const thisCoverage = new Coverage(thisCoverageProps.bbox[0], thisCoverageProps.bbox[1], thisCoverageProps.bbox[2], thisCoverageProps.bbox[3],\n thisCoverageProps.zoomMin, thisCoverageProps.zoomMax);\n coverages.push(thisCoverage);\n }\n const thisAttribution: BingAttribution = new BingAttribution(copyrightMessage, coverages);\n if (!this._attributions)\n this._attributions = new Array<BingAttribution>();\n this._attributions.push(thisAttribution);\n }\n }\n}\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,OAAO,EAAE,MAAM,E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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","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { assert, BentleyError, IModelStatus } from \"@itwin/core-bentley\";\nimport { Range2d } from \"@itwin/core-geometry\";\nimport { ImageMapLayerSettings, ImageSource } from \"@itwin/core-common\";\nimport { request } from \"../../../../request/Request\";\nimport { IModelApp } from \"../../../../IModelApp\";\nimport { ScreenViewport } from \"../../../../Viewport\";\nimport {\n MapLayerImageryProvider, MapTile, MapTilingScheme, QuadId,\n Tile, WebMercatorTilingScheme,\n} from \"../../../../tile/internal\";\n\n/** Represents one range of geography and tile zoom levels for a bing data provider\n */\nclass Coverage {\n constructor(private _lowerLeftLatitude: number,\n private _lowerLeftLongitude: number,\n private _upperRightLatitude: number,\n private _upperRightLongitude: number,\n private _minimumZoomLevel: number,\n private _maximumZoomLevel: number) { }\n\n public overlaps(quadId: QuadId, tilingScheme: MapTilingScheme): boolean {\n const range: Range2d = quadId.getLatLongRangeDegrees(tilingScheme);\n if (quadId.level < this._minimumZoomLevel)\n return false;\n if (quadId.level > this._maximumZoomLevel)\n return false;\n if (range.low.x > this._upperRightLongitude)\n return false;\n if (range.low.y > this._upperRightLatitude)\n return false;\n if (range.high.x < this._lowerLeftLongitude)\n return false;\n if (range.high.y < this._lowerLeftLatitude)\n return false;\n\n return true;\n }\n}\n\n/** Represents the copyright message and an array of coverage data for one of bing's data providers (HERE for example).\n */\nclass BingAttribution {\n constructor(public copyrightMessage: string, private _coverages: Coverage[]) { }\n\n public matchesTile(tile: Tile, tilingScheme: MapTilingScheme): boolean {\n const quadId = QuadId.createFromContentId(tile.contentId);\n for (const coverage of this._coverages) {\n if (coverage.overlaps(quadId, tilingScheme))\n return true;\n }\n return false;\n }\n}\n\n// in deployed applications, we can only make https requests, but the Bing Maps metadata request returns templates with \"http:\".\n// This function fixes those.\nfunction replaceHttpWithHttps(originalUrl: string) {\n return originalUrl.startsWith(\"http:\") ? \"https:\".concat(originalUrl.slice(5)) : originalUrl;\n}\n\nexport class BingMapsImageryLayerProvider extends MapLayerImageryProvider {\n private _urlTemplate?: string;\n private _urlSubdomains?: string[];\n private _zoomMax: number;\n private _tileHeight: number;\n private _tileWidth: number;\n private _attributions?: BingAttribution[]; // array of Bing's data providers.\n private _mapTilingScheme: MapTilingScheme;\n private _urlBase: string;\n\n constructor(settings: ImageMapLayerSettings) {\n super(settings, true);\n this._urlBase = settings.url;\n this._zoomMax = 0;\n this._tileHeight = this._tileWidth = 0;\n this._mapTilingScheme = new WebMercatorTilingScheme();\n }\n\n public get tileWidth(): number { return this._tileWidth; }\n public get tileHeight(): number { return this._tileHeight; }\n\n private tileXYToQuadKey(tileX: number, tileY: number, zoomLevel: number) {\n // from C# example in bing documentation https://msdn.microsoft.com/en-us/library/bb259689.aspx\n let quadKey: string = \"\";\n\n // Root tile is not displayable. Returns 0 for _GetMaximumSize(). Should not end up here.\n assert(0 !== zoomLevel);\n\n for (let i: number = zoomLevel; i > 0; i--) {\n let digit: number = 0x30; // '0'\n const mask: number = 1 << (i - 1);\n if ((tileX & mask) !== 0) {\n digit++;\n }\n if ((tileY & mask) !== 0) {\n digit++;\n digit++;\n }\n quadKey = quadKey.concat(String.fromCharCode(digit));\n }\n return quadKey;\n }\n\n // construct the Url from the desired Tile\n public async constructUrl(row: number, column: number, zoomLevel: number): Promise<string> {\n // From the tile, get a \"quadKey\" the Microsoft way.\n const quadKey: string = this.tileXYToQuadKey(column, row, zoomLevel);\n const subdomain: string = this._urlSubdomains![(row + column) % this._urlSubdomains!.length];\n\n // from the template url, construct the tile url.\n let url: string = this._urlTemplate!.replace(\"{subdomain}\", subdomain);\n url = url.replace(\"{quadkey}\", quadKey);\n\n return url;\n }\n\n // gets the attributions that match the tile set.\n private getMatchingAttributions(tiles: Set<Tile> | undefined): BingAttribution[] {\n const matchingAttributions: BingAttribution[] = new Array<BingAttribution>();\n if (!this._attributions || !tiles)\n return matchingAttributions;\n\n const unmatchedSet: BingAttribution[] = this._attributions.slice();\n for (const tile of tiles) {\n if (tile instanceof MapTile) {\n // compare to the set of Bing attributions that we have not yet matched.\n for (let iAttr = 0; iAttr < unmatchedSet.length; iAttr++) {\n const attribution = unmatchedSet[iAttr];\n if (attribution.matchesTile(tile, this._mapTilingScheme)) {\n matchingAttributions.push(attribution);\n unmatchedSet.splice(iAttr, 1);\n break;\n }\n }\n }\n }\n return matchingAttributions;\n }\n /** @deprecated in 5.0 Use [addAttributions] instead. */\n public override addLogoCards(cards: HTMLTableElement, vp: ScreenViewport): void {\n const tiles = IModelApp.tileAdmin.getTilesForUser(vp)?.selected;\n const matchingAttributions = this.getMatchingAttributions(tiles);\n const copyrights: string[] = [];\n for (const match of matchingAttributions)\n copyrights.push(match.copyrightMessage);\n\n let copyrightMsg = \"\";\n for (let i = 0; i < copyrights.length; ++i) {\n if (i > 0)\n copyrightMsg += \"<br>\";\n copyrightMsg += copyrights[i];\n }\n\n cards.appendChild(IModelApp.makeLogoCard({ iconSrc: `${IModelApp.publicPath}images/bing.svg`, heading: \"Microsoft Bing\", notice: copyrightMsg }));\n }\n\n public override async addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void> {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return Promise.resolve(this.addLogoCards(cards, vp));\n }\n\n // initializes the BingImageryProvider by reading the templateUrl, logo image, and attribution list.\n public override async initialize(): Promise<void> {\n // get the template url\n const bingRequestUrl = this._urlBase.replace(\"{bingKey}\", this._settings.accessKey ? this._settings.accessKey.value : \"\");\n\n try {\n const bingResponseProps = await request(bingRequestUrl, \"json\");\n\n const thisResourceSetProps = bingResponseProps.resourceSets[0];\n const thisResourceProps = thisResourceSetProps.resources[0];\n this._zoomMax = thisResourceProps.zoomMax;\n this._tileHeight = thisResourceProps.imageHeight;\n this._tileWidth = thisResourceProps.imageWidth;\n this._urlTemplate = replaceHttpWithHttps(thisResourceProps.imageUrl.replace(\"{culture}\", \"en-US\")); // NEEDSWORK - get locale from somewhere.\n this._urlSubdomains = thisResourceProps.imageUrlSubdomains;\n // read the list of Bing's data suppliers and the range of data they provide. Used in calculation of copyright message.\n this.readAttributions(thisResourceProps.imageryProviders);\n\n // Bing sometimes provides tiles that have nothing but a camera icon in the middle of them when you ask\n // for tiles at zoom levels where they don't have data. Their application stops you from zooming in when that's the\n // case, but we can't stop - the user might want to look at design data a closer zoom. So we intentionally load such\n // a tile, and then compare other tiles to it, rejecting them if they match.\n this.loadTile(0, 0, this._zoomMax - 1).then((tileData: ImageSource | undefined) => { // eslint-disable-line @typescript-eslint/no-floating-promises\n if (tileData !== undefined)\n this._missingTileData = tileData.data as Uint8Array;\n });\n } catch {\n throw new BentleyError(IModelStatus.BadModel, \"Error in Bing Server communications\");\n }\n }\n\n // reads the list of Bing data providers and the map range for which they each provide data.\n private readAttributions(attributionProps: any) {\n for (const thisAttributionProps of attributionProps) {\n const copyrightMessage: string = thisAttributionProps.attribution;\n const coverages: Coverage[] = new Array<Coverage>();\n for (const thisCoverageProps of thisAttributionProps.coverageAreas) {\n const thisCoverage = new Coverage(thisCoverageProps.bbox[0], thisCoverageProps.bbox[1], thisCoverageProps.bbox[2], thisCoverageProps.bbox[3],\n thisCoverageProps.zoomMin, thisCoverageProps.zoomMax);\n coverages.push(thisCoverage);\n }\n const thisAttribution: BingAttribution = new BingAttribution(copyrightMessage, coverages);\n if (!this._attributions)\n this._attributions = new Array<BingAttribution>();\n this._attributions.push(thisAttribution);\n }\n }\n}\n"]}
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { ImageMapLayerSettings } from "@itwin/core-common";
5
5
  import { MapLayerImageryProvider } from "../../../../tile/internal";
6
+ import { ScreenViewport } from "../../../../Viewport";
6
7
  /** Base class imagery map layer formats. Subclasses should override formatId and [[MapLayerFormat.createImageryProvider]].
7
8
  */
8
9
  export declare class MapBoxLayerImageryProvider extends MapLayerImageryProvider {
@@ -15,7 +16,9 @@ export declare class MapBoxLayerImageryProvider extends MapLayerImageryProvider
15
16
  get minimumZoomLevel(): number;
16
17
  get maximumZoomLevel(): number;
17
18
  constructUrl(row: number, column: number, zoomLevel: number): Promise<string>;
19
+ /** @deprecated in 5.0 Use [addAttributions] instead. */
18
20
  addLogoCards(cards: HTMLTableElement): void;
21
+ addAttributions(cards: HTMLTableElement, _vp: ScreenViewport): Promise<void>;
19
22
  initialize(): Promise<void>;
20
23
  }
21
24
  //# sourceMappingURL=MapBoxLayerImageryProvider.d.ts.map
@@ -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;AAEpE;GACG;AACH,qBAAa,0BAA2B,SAAQ,uBAAuB;I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,CAAC;IAczF,wDAAwD;IACzC,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"}
@@ -35,12 +35,17 @@ export class MapBoxLayerImageryProvider extends MapLayerImageryProvider {
35
35
  url = url.concat(`?${this._settings.accessKey.key}=${this._settings.accessKey.value}`);
36
36
  return url;
37
37
  }
38
+ /** @deprecated in 5.0 Use [addAttributions] instead. */
38
39
  addLogoCards(cards) {
39
40
  if (!cards.dataset.mapboxLogoCard) {
40
41
  cards.dataset.mapboxLogoCard = "true";
41
42
  cards.appendChild(IModelApp.makeLogoCard({ heading: "Mapbox", notice: IModelApp.localization.getLocalizedString("iModelJs:BackgroundMap.MapBoxCopyright") }));
42
43
  }
43
44
  }
45
+ async addAttributions(cards, _vp) {
46
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
47
+ return Promise.resolve(this.addLogoCards(cards));
48
+ }
44
49
  // no initialization needed for MapBoxImageryProvider.
45
50
  async initialize() { }
46
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MapBoxLayerImageryProvider.js","sourceRoot":"","sources":["../../../../../../src/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;GACG;AACH,MAAM,OAAO,0BAA2B,SAAQ,uBAAuB;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,CAA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AAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,wCAAwC,CAAC,EAAE,CAAC,CAAC,CAAC;QAChK,CAAC;IACH,CAAC;IAED,sDAAsD;IACtC,KAAK,CAAC,UAAU,KAAoB,CAAC;CACtD","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { ImageMapLayerSettings } from \"@itwin/core-common\";\nimport { IModelApp } from \"../../../../IModelApp\";\nimport { MapLayerImageryProvider } from \"../../../../tile/internal\";\n\n/** Base class imagery map layer formats. Subclasses should override formatId and [[MapLayerFormat.createImageryProvider]].\n */\nexport class MapBoxLayerImageryProvider extends MapLayerImageryProvider {\n private _zoomMin: number;\n private _zoomMax: number;\n private _baseUrl: string;\n\n constructor(settings: ImageMapLayerSettings) {\n super(settings, true);\n this._baseUrl = settings.url;\n this._zoomMin = 1;\n this._zoomMax = 20;\n }\n\n public get tileWidth(): number { return 256; }\n public get tileHeight(): number { return 256; }\n public override get minimumZoomLevel(): number { return this._zoomMin; }\n public override get maximumZoomLevel(): number { return this._zoomMax; }\n\n // construct the Url from the desired Tile\n public async constructUrl(row: number, column: number, zoomLevel: number): Promise<string> {\n if (!this._settings.accessKey) {\n return \"\";\n }\n\n // from the template url, construct the tile url.\n // format: {baseUrl}/{tileSize}/{level}/{column}/{row}?access_token={token}\n let url: string = this._baseUrl.concat(this.tileWidth.toString());\n url = url.concat(`/${zoomLevel.toString()}/${column.toString()}/${row.toString()}`);\n url = url.concat(`?${this._settings.accessKey.key}=${this._settings.accessKey.value}`);\n\n return url;\n }\n\n public override addLogoCards(cards: HTMLTableElement): void {\n if (!cards.dataset.mapboxLogoCard) {\n cards.dataset.mapboxLogoCard = \"true\";\n cards.appendChild(IModelApp.makeLogoCard({ heading: \"Mapbox\", notice: IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.MapBoxCopyright\") }));\n }\n }\n\n // no initialization needed for MapBoxImageryProvider.\n public override async initialize(): Promise<void> { }\n}\n"]}
1
+ {"version":3,"file":"MapBoxLayerImageryProvider.js","sourceRoot":"","sources":["../../../../../../src/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAIpE;GACG;AACH,MAAM,OAAO,0BAA2B,SAAQ,uBAAuB;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,wDAAwD;IACzC,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,SAAS,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,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","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { ImageMapLayerSettings } from \"@itwin/core-common\";\nimport { IModelApp } from \"../../../../IModelApp\";\nimport { MapLayerImageryProvider } from \"../../../../tile/internal\";\nimport { ScreenViewport } from \"../../../../Viewport\";\n\n\n/** Base class imagery map layer formats. Subclasses should override formatId and [[MapLayerFormat.createImageryProvider]].\n */\nexport class MapBoxLayerImageryProvider extends MapLayerImageryProvider {\n private _zoomMin: number;\n private _zoomMax: number;\n private _baseUrl: string;\n\n constructor(settings: ImageMapLayerSettings) {\n super(settings, true);\n this._baseUrl = settings.url;\n this._zoomMin = 1;\n this._zoomMax = 20;\n }\n\n public get tileWidth(): number { return 256; }\n public get tileHeight(): number { return 256; }\n public override get minimumZoomLevel(): number { return this._zoomMin; }\n public override get maximumZoomLevel(): number { return this._zoomMax; }\n\n // construct the Url from the desired Tile\n public async constructUrl(row: number, column: number, zoomLevel: number): Promise<string> {\n if (!this._settings.accessKey) {\n return \"\";\n }\n\n // from the template url, construct the tile url.\n // format: {baseUrl}/{tileSize}/{level}/{column}/{row}?access_token={token}\n let url: string = this._baseUrl.concat(this.tileWidth.toString());\n url = url.concat(`/${zoomLevel.toString()}/${column.toString()}/${row.toString()}`);\n url = url.concat(`?${this._settings.accessKey.key}=${this._settings.accessKey.value}`);\n\n return url;\n }\n\n /** @deprecated in 5.0 Use [addAttributions] instead. */\n public override addLogoCards(cards: HTMLTableElement): void {\n if (!cards.dataset.mapboxLogoCard) {\n cards.dataset.mapboxLogoCard = \"true\";\n cards.appendChild(IModelApp.makeLogoCard({ heading: \"Mapbox\", notice: IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.MapBoxCopyright\") }));\n }\n }\n\n public override async addAttributions (cards: HTMLTableElement, _vp: ScreenViewport): Promise<void> {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return Promise.resolve(this.addLogoCards(cards));\n }\n\n // no initialization needed for MapBoxImageryProvider.\n public override async initialize(): Promise<void> { }\n}\n"]}
@@ -129,8 +129,12 @@ export declare abstract class TileTreeReference {
129
129
  * @beta
130
130
  */
131
131
  get planarClipMaskPriority(): number;
132
- /** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div. */
132
+ /** @deprecated in 5.0 Use [addAttributions] instead. */
133
133
  addLogoCards(_cards: HTMLTableElement, _vp: ScreenViewport): void;
134
+ /** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div.
135
+ * @beta
136
+ */
137
+ addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void>;
134
138
  /** Create a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]].
135
139
  * Return `undefined` if geometry collection is not supported.
136
140
  * @see [[createGeometryTreeReference]].
@@ -1 +1 @@
1
- {"version":3,"file":"TileTreeReference.d.ts","sourceRoot":"","sources":["../../../src/tile/TileTreeReference.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,aAAa,EAAE,UAAU,EAA0B,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1J,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EACL,oBAAoB,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,YAAY,EAAE,qBAAqB,EAAE,QAAQ,EAAsB,aAAa,EACzM,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,oBAAY,eAAe;IACzB,wDAAwD;IACxD,aAAa,IAAI;IACjB,2CAA2C;IAC3C,KAAK,IAAI;IACT,+CAA+C;IAC/C,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;;MAEE;IACW,eAAe,CAAC,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxF;;;OAGG;IACH,SAAS,CAAC,4BAA4B,IAAI,yBAAyB,GAAG,SAAS;IAI/E;OACG;IACI,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAExE;OACG;IACH,SAAS,CAAC,oBAAoB,CAAC,SAAS,EAAE,qBAAqB,GAAG,IAAI;IAatE;;;;OAIG;IACI,2BAA2B,IAAI,yBAAyB,GAAG,SAAS;IAS3E;;;;;;;;;;;;;;OAcG;WACW,uBAAuB,CAAC,IAAI,EAAE,yBAAyB,GAAG,iBAAiB;CAG1F"}
@@ -216,8 +216,15 @@ export class TileTreeReference /* implements RenderMemory.Consumer */ {
216
216
  * @beta
217
217
  */
218
218
  get planarClipMaskPriority() { return PlanarClipMaskPriority.DesignModel; }
219
- /** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div. */
219
+ /** @deprecated in 5.0 Use [addAttributions] instead. */
220
220
  addLogoCards(_cards, _vp) { }
221
+ /** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div.
222
+ * @beta
223
+ */
224
+ async addAttributions(cards, vp) {
225
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
226
+ return Promise.resolve(this.addLogoCards(cards, vp));
227
+ }
221
228
  /** Create a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]].
222
229
  * Return `undefined` if geometry collection is not supported.
223
230
  * @see [[createGeometryTreeReference]].
@@ -1 +1 @@
1
- {"version":3,"file":"TileTreeReference.js","sourceRoot":"","sources":["../../../src/tile/TileTreeReference.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAqB,OAAO,EAAa,MAAM,sBAAsB,C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C;IAED,iKAAiK;IACjK,IAAW,QAAQ,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAEhD;;;OAGG;IACH,IAAW,sBAAsB,KAAa,OAAO,sBAAsB,CAAC,WAAW,CAAC,CAAC,CAAC;IAE1F,iGAAiG;IAC1F,YAAY,CAAC,MAAwB,EAAE,GAAmB,IAAU,CAAC;IAE5E;;;OAGG;IACO,4BAA4B;QACpC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;OACG;IACI,mBAAmB,CAA8C;IAExE;OACG;IACO,oBAAoB,CAAC,SAAgC;QAC7D,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACnC,QAAQ,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;YAClC,KAAK,kBAAkB,CAAC,MAAM;gBAC5B,MAAM,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC;gBAC3B,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;gBACpC,MAAM;YACR,KAAK,kBAAkB,CAAC,OAAO;gBAC7B,SAAS,CAAC,WAAW,EAAE,CAAC;gBACxB,MAAM;QACV,CAAC;IACH,CAAC;IAED;;;;OAIG;IACI,2BAA2B;QAChC,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC7B,0KAA0K;YAC1K,OAAO,IAAiC,CAAC;QAC3C,CAAC;QAED,OAAO,IAAI,CAAC,4BAA4B,EAAE,CAAC;IAC7C,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACI,MAAM,CAAC,uBAAuB,CAAC,IAA+B;QACnE,OAAO,kCAAkC,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { assert, BeTimePoint } from \"@itwin/core-bentley\";\nimport { Matrix4d, Range1d, Range3d, Transform } from \"@itwin/core-geometry\";\nimport { ElementAlignedBox3d, FeatureAppearanceProvider, FrustumPlanes, HiddenLine, PlanarClipMaskPriority, ViewFlagOverrides } from \"@itwin/core-common\";\nimport { HitDetail } from \"../HitDetail\";\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\nimport { RenderMemory } from \"../render/RenderMemory\";\nimport { DecorateContext, SceneContext } from \"../ViewContext\";\nimport { ScreenViewport } from \"../Viewport\";\nimport {\n DisclosedTileTreeSet, GeometryTileTreeReference, MapFeatureInfoOptions, MapLayerFeatureInfo, RenderGraphicTileTreeArgs, TileDrawArgs, TileGeometryCollector, TileTree, TileTreeLoadStatus, TileTreeOwner, tileTreeReferenceFromRenderGraphic,\n} from \"./internal\";\n\n/** Describes the type of graphics produced by a [[TileTreeReference]].\n * @public\n * @extensions\n */\nexport enum TileGraphicType {\n /** Rendered behind all other geometry without depth. */\n BackgroundMap = 0,\n /** Rendered with normal scene graphics. */\n Scene = 1,\n /** Rendered in front of all other geometry. */\n Overlay = 2,\n}\n\n/** A reference to a [[TileTree]] suitable for drawing within a [[Viewport]]. The reference does not *own* its tile tree - it merely refers to it by\n * way of the tree's [[TileTreeOwner]].\n * The specific [[TileTree]] referenced by this object may change based on the current state of the Viewport in which it is drawn - for example,\n * as a result of changing the RenderMode, or animation settings, or classification settings, etc.\n * A reference to a TileTree is typically associated with a [[ViewState]], a [[DisplayStyleState]], or a [[Viewport]].\n * Multiple TileTreeReferences can refer to the same TileTree with different parameters and logic - for example, the same background map tiles can be displayed in two viewports with\n * differing levels of transparency.\n * @see [[TiledGraphicsProvider]] to supply custom [[TileTreeReference]]s to be drawn within a [[Viewport]].\n * @public\n * @extensions\n */\nexport abstract class TileTreeReference /* implements RenderMemory.Consumer */ {\n /** The owner of the currently-referenced [[TileTree]]. Do not store a direct reference to it, because it may change or become disposed at any time. */\n public abstract get treeOwner(): TileTreeOwner;\n\n /** Force a new tree owner / tile tree to be created for the current tile tree reference\n * @internal\n */\n public resetTreeOwner() {}\n\n /** Disclose *all* TileTrees use by this reference. This may include things like map tiles used for draping on terrain.\n * Override this and call super if you have such auxiliary trees.\n * @note Any tree *NOT* disclosed becomes a candidate for *purging* (being unloaded from memory along with all of its tiles and graphics).\n */\n public discloseTileTrees(trees: DisclosedTileTreeSet): void {\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree)\n trees.add(tree);\n }\n\n /** Adds this reference's graphics to the scene. By default this invokes [[draw]]. */\n public addToScene(context: SceneContext): void {\n const args = this.createDrawArgs(context);\n if (undefined !== args)\n this.draw(args);\n }\n\n /** Adds this reference's graphics to the scene. By default this invokes [[TileTree.draw]] on the referenced TileTree, if it is loaded. */\n public draw(args: TileDrawArgs): void {\n args.tree.draw(args);\n }\n\n /** Return a tooltip describing the hit, or `undefined` if no tooltip can be supplied.\n * If you override this method, make sure to check that `hit` represents an entity belonging to your tile tree, e.g., by checking `hit.modelId` and `hit.sourceId`.\n * If you *don't* override this method, override [[canSupplyToolTip]] to return false.\n * Callers who want to obtain a tooltip should prefer [[getToolTipPromise]].\n */\n public async getToolTip(_hit: HitDetail): Promise<HTMLElement | string | undefined> { return undefined; }\n\n /** Return whether this TileTreeReference can supply a tooltip describing the entity represented by the specified hit.\n * [[getToolTipPromise]] calls [[getToolTip]] if and only if `canSupplyToolTip` returns `true`.\n * If your tile tree never supplies tooltips, override this to return `false`.\n */\n public canSupplyToolTip(_hit: HitDetail): boolean {\n return true;\n }\n\n /** Obtain a tooltip describing the specified `hit`, or `undefined` if this tile tree reference cannot supply a tooltip for the hit. */\n public getToolTipPromise(hit: HitDetail): Promise<HTMLElement | string | undefined> | undefined {\n return this.canSupplyToolTip(hit) ? this.getToolTip(hit).catch(() => undefined) : undefined;\n }\n\n /** Optionally return a MapLayerFeatureInfo object describing the hit.].\n * @alpha\n */\n public async getMapFeatureInfo(_hit: HitDetail, _options?: MapFeatureInfoOptions): Promise<MapLayerFeatureInfo[] | undefined> { return undefined; }\n\n /** Optionally add any decorations specific to this reference. For example, map tile trees may add a logo image and/or copyright attributions.\n * @note This is currently only invoked for background maps and TiledGraphicsProviders - others have no decorations, but if they did implement this it would not be called.\n */\n public decorate(_context: DecorateContext): void { }\n\n /** Unions this reference's range with the supplied range to help compute a volume in world space for fitting a viewport to its contents.\n * Override this function if a reference's range should not be included in the fit range, or a range different from its tile tree's range should be used.\n */\n public unionFitRange(union: Range3d): void {\n const contentRange = this.computeWorldContentRange();\n if (!contentRange.isNull)\n union.extendRange(contentRange);\n }\n\n /** Record graphics memory consumed by this tile tree reference. */\n public collectStatistics(stats: RenderMemory.Statistics): void {\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree)\n tree.collectStatistics(stats);\n }\n\n /** Return true if the tile tree is fully loaded and ready to draw.\n * The default implementation returns true if the tile tree loading process completed (whether it resulted in success or failure).\n * @note Do *not* override this property - override [[_isLoadingComplete]] instead..\n * @public\n */\n public get isLoadingComplete(): boolean {\n switch (this.treeOwner.loadStatus) {\n case TileTreeLoadStatus.NotLoaded:\n case TileTreeLoadStatus.Loading:\n return false;\n case TileTreeLoadStatus.NotFound:\n return true; // we tried, and failed, to load.\n case TileTreeLoadStatus.Loaded:\n return this._isLoadingComplete;\n }\n }\n\n /** Override if additional asynchronous loading is required after the tile tree is successfully loaded, to indicate when that loading has completed.\n * @public\n */\n protected get _isLoadingComplete(): boolean {\n return true;\n }\n\n /** Create context for drawing the tile tree, if it is ready for drawing.\n * TileTreeReferences can override individual portions of the context, e.g. apply their own transform.\n * Returns undefined if, e.g., the tile tree is not yet loaded.\n */\n public createDrawArgs(context: SceneContext): TileDrawArgs | undefined {\n const tree = this.treeOwner.load();\n if (undefined === tree)\n return undefined;\n\n return new TileDrawArgs({\n context,\n tree,\n now: BeTimePoint.now(),\n location: this.computeTransform(tree),\n viewFlagOverrides: this.getViewFlagOverrides(tree),\n clipVolume: this.getClipVolume(tree),\n parentsAndChildrenExclusive: tree.parentsAndChildrenExclusive,\n symbologyOverrides: this.getSymbologyOverrides(tree),\n appearanceProvider: this.getAppearanceProvider(tree),\n hiddenLineSettings: this.getHiddenLineSettings(tree),\n animationTransformNodeId: this.getAnimationTransformNodeId(tree),\n groupNodeId: this.getGroupNodeId(tree),\n transformFromIModel: this.getTransformFromIModel(),\n });\n }\n\n /** @beta */\n public getTransformFromIModel(): Transform | undefined { return undefined; }\n\n /** @internal */\n protected getAnimationTransformNodeId(_tree: TileTree): number | undefined {\n return undefined;\n }\n /** @internal */\n protected getGroupNodeId(_tree: TileTree): number | undefined {\n return undefined;\n }\n\n /** Supply transform from this tile tree reference's location to iModel coordinate space.\n * @returns undefined if the TileTree is not yet loaded.\n */\n public getLocation(): Transform | undefined {\n const tree = this.treeOwner.load();\n return undefined !== tree ? this.computeTransform(tree) : undefined;\n }\n\n /** Compute a transform from this tile tree reference's coordinate space to the [[IModelConnection]]'s coordinate space. */\n protected computeTransform(tree: TileTree): Transform {\n return tree.iModelTransform.clone();\n }\n\n /** Compute the range of this tile tree's contents in world coordinates.\n * @returns The content range in world coodinates, or a null range if the tile tree is not loaded or has a null content range.\n */\n public computeWorldContentRange(): ElementAlignedBox3d {\n const range = new Range3d();\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree && !tree.rootTile.contentRange.isNull)\n this.computeTransform(tree).multiplyRange(tree.rootTile.contentRange, range);\n\n return range;\n }\n\n /** Return the clip volume applied to this reference's tile tree, if any. */\n protected getClipVolume(tree: TileTree): RenderClipVolume | undefined {\n return tree.clipVolume;\n }\n\n /** Supply overrides that should be applied to the [[ViewState]]'s [ViewFlags]($common) when drawing this tile tree reference. */\n protected getViewFlagOverrides(tree: TileTree): ViewFlagOverrides {\n return tree.viewFlagOverrides;\n }\n\n /** Return overrides that *replace* any defined for the view. */\n protected getSymbologyOverrides(_tree: TileTree): FeatureSymbology.Overrides | undefined {\n return undefined;\n }\n\n /** Return a provider that can supplement the view's symbology overrides. */\n protected getAppearanceProvider(_tree: TileTree): FeatureAppearanceProvider | undefined {\n return undefined;\n }\n\n /** Return hidden line settings to replace those defined for the view. */\n protected getHiddenLineSettings(_tree: TileTree): HiddenLine.Settings | undefined {\n return undefined;\n }\n\n /* Extend range to include transformed range of this tile tree.\n * @internal\n */\n public accumulateTransformedRange(range: Range3d, matrix: Matrix4d, frustumPlanes?: FrustumPlanes) {\n const tree = this.treeOwner.tileTree;\n if (undefined === tree)\n return;\n\n const location = this.computeTransform(tree);\n tree.accumulateTransformedRange(range, matrix, location, frustumPlanes);\n }\n\n /** @internal */\n public getTerrainHeight(_terrainHeights: Range1d): void { }\n\n /** Return whether the geometry exposed by this tile tree reference should cast shadows on other geometry. */\n public get castsShadows(): boolean {\n return true;\n }\n\n /** Return whether this reference has global coverage. Mapping data is global and some non-primary models such as the OSM building layer have global coverage */\n public get isGlobal(): boolean { return false; }\n\n /** The [PlanarClipMaskPriority]($common) of this tile tree used to determine which tile trees contribute to a clip mask when\n * using [PlanarClipMaskMode.Priority]($common).\n * @beta\n */\n public get planarClipMaskPriority(): number { return PlanarClipMaskPriority.DesignModel; }\n\n /** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div. */\n public addLogoCards(_cards: HTMLTableElement, _vp: ScreenViewport): void { }\n\n /** Create a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]].\n * Return `undefined` if geometry collection is not supported.\n * @see [[createGeometryTreeReference]].\n */\n protected _createGeometryTreeReference(): GeometryTileTreeReference | undefined {\n return undefined;\n }\n\n /** If defined, supplies the implementation of [[GeometryTileTreeReference.collectTileGeometry]].\n */\n public collectTileGeometry?: (collector: TileGeometryCollector) => void;\n\n /** A function that can be assigned to [[collectTileGeometry]] to enable geometry collection for references to tile trees that support geometry collection.\n */\n protected _collectTileGeometry(collector: TileGeometryCollector): void {\n const tree = this.treeOwner.load();\n switch (this.treeOwner.loadStatus) {\n case TileTreeLoadStatus.Loaded:\n assert(undefined !== tree);\n tree.collectTileGeometry(collector);\n break;\n case TileTreeLoadStatus.Loading:\n collector.markLoading();\n break;\n }\n }\n\n /** Obtain a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]], or\n * undefined if geometry collection is not supported.\n * Currently, only terrain and reality model tiles support geometry collection.\n * @note Do not override this method - override [[_createGeometryTreeReference]] instead.\n */\n public createGeometryTreeReference(): GeometryTileTreeReference | undefined {\n if (this.collectTileGeometry) {\n // Unclear why compiler doesn't detect that `this` satisfies the GeometryTileTreeReference interface...it must be looking only at the types, not this particular instance.\n return this as GeometryTileTreeReference;\n }\n\n return this._createGeometryTreeReference();\n }\n\n /** Create a [[TileTreeReference]] that displays a pre-defined [[RenderGraphic]].\n * The reference can be used to add dynamic content to a [[Viewport]]'s scene as a [[TiledGraphicsProvider]], as in the following example:\n * ```ts\n * [[include:TileTreeReference_createFromRenderGraphic]]\n *```\n * Or, it can be used as a [[DynamicSpatialClassifier]] to contextualize a reality model, like so:\n * ```ts\n * [[include:TileTreeReference_DynamicClassifier]]\n * ```\n * It can also be used to mask out portions of the background map or terrain via [PlanarClipMaskSettings]($common), as shown below:\n * ```ts\n * [[include:TileTreeReference_DynamicClipMask]]\n * ```\n * @beta\n */\n public static createFromRenderGraphic(args: RenderGraphicTileTreeArgs): TileTreeReference {\n return tileTreeReferenceFromRenderGraphic(args);\n }\n}\n"]}
1
+ {"version":3,"file":"TileTreeReference.js","sourceRoot":"","sources":["../../../src/tile/TileTreeReference.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAqB,OAAO,EAAa,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAA6E,sBAAsB,EAAqB,MAAM,oBAAoB,CAAC;AAO1J,OAAO,EACmH,YAAY,EAAmC,kBAAkB,EAAiB,kCAAkC,GAC7O,MAAM,YAAY,CAAC;AAEpB;;;GAGG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AE1F,wDAAwD;IACjD,YAAY,CAAC,MAAwB,EAAE,GAAmB,IAAU,CAAC;IAE5E;;MAEE;IACK,KAAK,CAAC,eAAe,CAAC,KAAuB,EAAE,EAAkB;QACtE,4DAA4D;QAC5D,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;IACvD,CAAC;IAED;;;OAGG;IACO,4BAA4B;QACpC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;OACG;IACI,mBAAmB,CAA8C;IAExE;OACG;IACO,oBAAoB,CAAC,SAAgC;QAC7D,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACnC,QAAQ,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;YAClC,KAAK,kBAAkB,CAAC,MAAM;gBAC5B,MAAM,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC;gBAC3B,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;gBACpC,MAAM;YACR,KAAK,kBAAkB,CAAC,OAAO;gBAC7B,SAAS,CAAC,WAAW,EAAE,CAAC;gBACxB,MAAM;QACV,CAAC;IACH,CAAC;IAED;;;;OAIG;IACI,2BAA2B;QAChC,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC7B,0KAA0K;YAC1K,OAAO,IAAiC,CAAC;QAC3C,CAAC;QAED,OAAO,IAAI,CAAC,4BAA4B,EAAE,CAAC;IAC7C,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACI,MAAM,CAAC,uBAAuB,CAAC,IAA+B;QACnE,OAAO,kCAAkC,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { assert, BeTimePoint } from \"@itwin/core-bentley\";\nimport { Matrix4d, Range1d, Range3d, Transform } from \"@itwin/core-geometry\";\nimport { ElementAlignedBox3d, FeatureAppearanceProvider, FrustumPlanes, HiddenLine, PlanarClipMaskPriority, ViewFlagOverrides } from \"@itwin/core-common\";\nimport { HitDetail } from \"../HitDetail\";\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\nimport { RenderMemory } from \"../render/RenderMemory\";\nimport { DecorateContext, SceneContext } from \"../ViewContext\";\nimport { ScreenViewport } from \"../Viewport\";\nimport {\n DisclosedTileTreeSet, GeometryTileTreeReference, MapFeatureInfoOptions, MapLayerFeatureInfo, RenderGraphicTileTreeArgs, TileDrawArgs, TileGeometryCollector, TileTree, TileTreeLoadStatus, TileTreeOwner, tileTreeReferenceFromRenderGraphic,\n} from \"./internal\";\n\n/** Describes the type of graphics produced by a [[TileTreeReference]].\n * @public\n * @extensions\n */\nexport enum TileGraphicType {\n /** Rendered behind all other geometry without depth. */\n BackgroundMap = 0,\n /** Rendered with normal scene graphics. */\n Scene = 1,\n /** Rendered in front of all other geometry. */\n Overlay = 2,\n}\n\n/** A reference to a [[TileTree]] suitable for drawing within a [[Viewport]]. The reference does not *own* its tile tree - it merely refers to it by\n * way of the tree's [[TileTreeOwner]].\n * The specific [[TileTree]] referenced by this object may change based on the current state of the Viewport in which it is drawn - for example,\n * as a result of changing the RenderMode, or animation settings, or classification settings, etc.\n * A reference to a TileTree is typically associated with a [[ViewState]], a [[DisplayStyleState]], or a [[Viewport]].\n * Multiple TileTreeReferences can refer to the same TileTree with different parameters and logic - for example, the same background map tiles can be displayed in two viewports with\n * differing levels of transparency.\n * @see [[TiledGraphicsProvider]] to supply custom [[TileTreeReference]]s to be drawn within a [[Viewport]].\n * @public\n * @extensions\n */\nexport abstract class TileTreeReference /* implements RenderMemory.Consumer */ {\n /** The owner of the currently-referenced [[TileTree]]. Do not store a direct reference to it, because it may change or become disposed at any time. */\n public abstract get treeOwner(): TileTreeOwner;\n\n /** Force a new tree owner / tile tree to be created for the current tile tree reference\n * @internal\n */\n public resetTreeOwner() {}\n\n /** Disclose *all* TileTrees use by this reference. This may include things like map tiles used for draping on terrain.\n * Override this and call super if you have such auxiliary trees.\n * @note Any tree *NOT* disclosed becomes a candidate for *purging* (being unloaded from memory along with all of its tiles and graphics).\n */\n public discloseTileTrees(trees: DisclosedTileTreeSet): void {\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree)\n trees.add(tree);\n }\n\n /** Adds this reference's graphics to the scene. By default this invokes [[draw]]. */\n public addToScene(context: SceneContext): void {\n const args = this.createDrawArgs(context);\n if (undefined !== args)\n this.draw(args);\n }\n\n /** Adds this reference's graphics to the scene. By default this invokes [[TileTree.draw]] on the referenced TileTree, if it is loaded. */\n public draw(args: TileDrawArgs): void {\n args.tree.draw(args);\n }\n\n /** Return a tooltip describing the hit, or `undefined` if no tooltip can be supplied.\n * If you override this method, make sure to check that `hit` represents an entity belonging to your tile tree, e.g., by checking `hit.modelId` and `hit.sourceId`.\n * If you *don't* override this method, override [[canSupplyToolTip]] to return false.\n * Callers who want to obtain a tooltip should prefer [[getToolTipPromise]].\n */\n public async getToolTip(_hit: HitDetail): Promise<HTMLElement | string | undefined> { return undefined; }\n\n /** Return whether this TileTreeReference can supply a tooltip describing the entity represented by the specified hit.\n * [[getToolTipPromise]] calls [[getToolTip]] if and only if `canSupplyToolTip` returns `true`.\n * If your tile tree never supplies tooltips, override this to return `false`.\n */\n public canSupplyToolTip(_hit: HitDetail): boolean {\n return true;\n }\n\n /** Obtain a tooltip describing the specified `hit`, or `undefined` if this tile tree reference cannot supply a tooltip for the hit. */\n public getToolTipPromise(hit: HitDetail): Promise<HTMLElement | string | undefined> | undefined {\n return this.canSupplyToolTip(hit) ? this.getToolTip(hit).catch(() => undefined) : undefined;\n }\n\n /** Optionally return a MapLayerFeatureInfo object describing the hit.].\n * @alpha\n */\n public async getMapFeatureInfo(_hit: HitDetail, _options?: MapFeatureInfoOptions): Promise<MapLayerFeatureInfo[] | undefined> { return undefined; }\n\n /** Optionally add any decorations specific to this reference. For example, map tile trees may add a logo image and/or copyright attributions.\n * @note This is currently only invoked for background maps and TiledGraphicsProviders - others have no decorations, but if they did implement this it would not be called.\n */\n public decorate(_context: DecorateContext): void { }\n\n /** Unions this reference's range with the supplied range to help compute a volume in world space for fitting a viewport to its contents.\n * Override this function if a reference's range should not be included in the fit range, or a range different from its tile tree's range should be used.\n */\n public unionFitRange(union: Range3d): void {\n const contentRange = this.computeWorldContentRange();\n if (!contentRange.isNull)\n union.extendRange(contentRange);\n }\n\n /** Record graphics memory consumed by this tile tree reference. */\n public collectStatistics(stats: RenderMemory.Statistics): void {\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree)\n tree.collectStatistics(stats);\n }\n\n /** Return true if the tile tree is fully loaded and ready to draw.\n * The default implementation returns true if the tile tree loading process completed (whether it resulted in success or failure).\n * @note Do *not* override this property - override [[_isLoadingComplete]] instead..\n * @public\n */\n public get isLoadingComplete(): boolean {\n switch (this.treeOwner.loadStatus) {\n case TileTreeLoadStatus.NotLoaded:\n case TileTreeLoadStatus.Loading:\n return false;\n case TileTreeLoadStatus.NotFound:\n return true; // we tried, and failed, to load.\n case TileTreeLoadStatus.Loaded:\n return this._isLoadingComplete;\n }\n }\n\n /** Override if additional asynchronous loading is required after the tile tree is successfully loaded, to indicate when that loading has completed.\n * @public\n */\n protected get _isLoadingComplete(): boolean {\n return true;\n }\n\n /** Create context for drawing the tile tree, if it is ready for drawing.\n * TileTreeReferences can override individual portions of the context, e.g. apply their own transform.\n * Returns undefined if, e.g., the tile tree is not yet loaded.\n */\n public createDrawArgs(context: SceneContext): TileDrawArgs | undefined {\n const tree = this.treeOwner.load();\n if (undefined === tree)\n return undefined;\n\n return new TileDrawArgs({\n context,\n tree,\n now: BeTimePoint.now(),\n location: this.computeTransform(tree),\n viewFlagOverrides: this.getViewFlagOverrides(tree),\n clipVolume: this.getClipVolume(tree),\n parentsAndChildrenExclusive: tree.parentsAndChildrenExclusive,\n symbologyOverrides: this.getSymbologyOverrides(tree),\n appearanceProvider: this.getAppearanceProvider(tree),\n hiddenLineSettings: this.getHiddenLineSettings(tree),\n animationTransformNodeId: this.getAnimationTransformNodeId(tree),\n groupNodeId: this.getGroupNodeId(tree),\n transformFromIModel: this.getTransformFromIModel(),\n });\n }\n\n /** @beta */\n public getTransformFromIModel(): Transform | undefined { return undefined; }\n\n /** @internal */\n protected getAnimationTransformNodeId(_tree: TileTree): number | undefined {\n return undefined;\n }\n /** @internal */\n protected getGroupNodeId(_tree: TileTree): number | undefined {\n return undefined;\n }\n\n /** Supply transform from this tile tree reference's location to iModel coordinate space.\n * @returns undefined if the TileTree is not yet loaded.\n */\n public getLocation(): Transform | undefined {\n const tree = this.treeOwner.load();\n return undefined !== tree ? this.computeTransform(tree) : undefined;\n }\n\n /** Compute a transform from this tile tree reference's coordinate space to the [[IModelConnection]]'s coordinate space. */\n protected computeTransform(tree: TileTree): Transform {\n return tree.iModelTransform.clone();\n }\n\n /** Compute the range of this tile tree's contents in world coordinates.\n * @returns The content range in world coodinates, or a null range if the tile tree is not loaded or has a null content range.\n */\n public computeWorldContentRange(): ElementAlignedBox3d {\n const range = new Range3d();\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree && !tree.rootTile.contentRange.isNull)\n this.computeTransform(tree).multiplyRange(tree.rootTile.contentRange, range);\n\n return range;\n }\n\n /** Return the clip volume applied to this reference's tile tree, if any. */\n protected getClipVolume(tree: TileTree): RenderClipVolume | undefined {\n return tree.clipVolume;\n }\n\n /** Supply overrides that should be applied to the [[ViewState]]'s [ViewFlags]($common) when drawing this tile tree reference. */\n protected getViewFlagOverrides(tree: TileTree): ViewFlagOverrides {\n return tree.viewFlagOverrides;\n }\n\n /** Return overrides that *replace* any defined for the view. */\n protected getSymbologyOverrides(_tree: TileTree): FeatureSymbology.Overrides | undefined {\n return undefined;\n }\n\n /** Return a provider that can supplement the view's symbology overrides. */\n protected getAppearanceProvider(_tree: TileTree): FeatureAppearanceProvider | undefined {\n return undefined;\n }\n\n /** Return hidden line settings to replace those defined for the view. */\n protected getHiddenLineSettings(_tree: TileTree): HiddenLine.Settings | undefined {\n return undefined;\n }\n\n /* Extend range to include transformed range of this tile tree.\n * @internal\n */\n public accumulateTransformedRange(range: Range3d, matrix: Matrix4d, frustumPlanes?: FrustumPlanes) {\n const tree = this.treeOwner.tileTree;\n if (undefined === tree)\n return;\n\n const location = this.computeTransform(tree);\n tree.accumulateTransformedRange(range, matrix, location, frustumPlanes);\n }\n\n /** @internal */\n public getTerrainHeight(_terrainHeights: Range1d): void { }\n\n /** Return whether the geometry exposed by this tile tree reference should cast shadows on other geometry. */\n public get castsShadows(): boolean {\n return true;\n }\n\n /** Return whether this reference has global coverage. Mapping data is global and some non-primary models such as the OSM building layer have global coverage */\n public get isGlobal(): boolean { return false; }\n\n /** The [PlanarClipMaskPriority]($common) of this tile tree used to determine which tile trees contribute to a clip mask when\n * using [PlanarClipMaskMode.Priority]($common).\n * @beta\n */\n public get planarClipMaskPriority(): number { return PlanarClipMaskPriority.DesignModel; }\n\n /** @deprecated in 5.0 Use [addAttributions] instead. */\n public addLogoCards(_cards: HTMLTableElement, _vp: ScreenViewport): void { }\n\n /** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div.\n * @beta\n */\n public async addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void> {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return Promise.resolve(this.addLogoCards(cards, vp));\n }\n\n /** Create a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]].\n * Return `undefined` if geometry collection is not supported.\n * @see [[createGeometryTreeReference]].\n */\n protected _createGeometryTreeReference(): GeometryTileTreeReference | undefined {\n return undefined;\n }\n\n /** If defined, supplies the implementation of [[GeometryTileTreeReference.collectTileGeometry]].\n */\n public collectTileGeometry?: (collector: TileGeometryCollector) => void;\n\n /** A function that can be assigned to [[collectTileGeometry]] to enable geometry collection for references to tile trees that support geometry collection.\n */\n protected _collectTileGeometry(collector: TileGeometryCollector): void {\n const tree = this.treeOwner.load();\n switch (this.treeOwner.loadStatus) {\n case TileTreeLoadStatus.Loaded:\n assert(undefined !== tree);\n tree.collectTileGeometry(collector);\n break;\n case TileTreeLoadStatus.Loading:\n collector.markLoading();\n break;\n }\n }\n\n /** Obtain a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]], or\n * undefined if geometry collection is not supported.\n * Currently, only terrain and reality model tiles support geometry collection.\n * @note Do not override this method - override [[_createGeometryTreeReference]] instead.\n */\n public createGeometryTreeReference(): GeometryTileTreeReference | undefined {\n if (this.collectTileGeometry) {\n // Unclear why compiler doesn't detect that `this` satisfies the GeometryTileTreeReference interface...it must be looking only at the types, not this particular instance.\n return this as GeometryTileTreeReference;\n }\n\n return this._createGeometryTreeReference();\n }\n\n /** Create a [[TileTreeReference]] that displays a pre-defined [[RenderGraphic]].\n * The reference can be used to add dynamic content to a [[Viewport]]'s scene as a [[TiledGraphicsProvider]], as in the following example:\n * ```ts\n * [[include:TileTreeReference_createFromRenderGraphic]]\n *```\n * Or, it can be used as a [[DynamicSpatialClassifier]] to contextualize a reality model, like so:\n * ```ts\n * [[include:TileTreeReference_DynamicClassifier]]\n * ```\n * It can also be used to mask out portions of the background map or terrain via [PlanarClipMaskSettings]($common), as shown below:\n * ```ts\n * [[include:TileTreeReference_DynamicClipMask]]\n * ```\n * @beta\n */\n public static createFromRenderGraphic(args: RenderGraphicTileTreeArgs): TileTreeReference {\n return tileTreeReferenceFromRenderGraphic(args);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CesiumTerrainProvider.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/CesiumTerrainProvider.ts"],"names":[],"mappings":"AAgBA,OAAO,EACwF,mBAAmB,EAChH,0BAA0B,EAC3B,MAAM,aAAa,CAAC;AASrB;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEhF;AACD,gBAAgB;AAChB,wBAAgB,wBAAwB,IAAI,MAAM,GAAG,SAAS,CAO7D;AAED,gBAAgB;AAChB,wBAAsB,kCAAkC,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAqBxI;AAaD,gBAAgB;AAChB,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAiDzH"}
1
+ {"version":3,"file":"CesiumTerrainProvider.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/CesiumTerrainProvider.ts"],"names":[],"mappings":"AAgBA,OAAO,EACwF,mBAAmB,EAChH,0BAA0B,EAC3B,MAAM,aAAa,CAAC;AAUrB;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEhF;AACD,gBAAgB;AAChB,wBAAgB,wBAAwB,IAAI,MAAM,GAAG,SAAS,CAO7D;AAED,gBAAgB;AAChB,wBAAsB,kCAAkC,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAqBxI;AAaD,gBAAgB;AAChB,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAiDzH"}