@itwin/core-frontend 4.2.0-dev.3 → 4.2.0-dev.30

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 (124) hide show
  1. package/CHANGELOG.md +85 -1
  2. package/lib/cjs/BriefcaseConnection.d.ts.map +1 -1
  3. package/lib/cjs/BriefcaseConnection.js +1 -0
  4. package/lib/cjs/BriefcaseConnection.js.map +1 -1
  5. package/lib/cjs/BriefcaseTxns.d.ts +12 -0
  6. package/lib/cjs/BriefcaseTxns.d.ts.map +1 -1
  7. package/lib/cjs/BriefcaseTxns.js +16 -0
  8. package/lib/cjs/BriefcaseTxns.js.map +1 -1
  9. package/lib/cjs/IModelApp.d.ts.map +1 -1
  10. package/lib/cjs/IModelApp.js +4 -1
  11. package/lib/cjs/IModelApp.js.map +1 -1
  12. package/lib/cjs/IModelConnection.d.ts +6 -3
  13. package/lib/cjs/IModelConnection.d.ts.map +1 -1
  14. package/lib/cjs/IModelConnection.js +7 -3
  15. package/lib/cjs/IModelConnection.js.map +1 -1
  16. package/lib/cjs/ViewCreator3d.d.ts.map +1 -1
  17. package/lib/cjs/ViewCreator3d.js +1 -0
  18. package/lib/cjs/ViewCreator3d.js.map +1 -1
  19. package/lib/cjs/ViewState.d.ts +14 -6
  20. package/lib/cjs/ViewState.d.ts.map +1 -1
  21. package/lib/cjs/ViewState.js +5 -4
  22. package/lib/cjs/ViewState.js.map +1 -1
  23. package/lib/cjs/Viewport.d.ts +10 -4
  24. package/lib/cjs/Viewport.d.ts.map +1 -1
  25. package/lib/cjs/Viewport.js +10 -4
  26. package/lib/cjs/Viewport.js.map +1 -1
  27. package/lib/cjs/common/WorkerProxy.d.ts.map +1 -1
  28. package/lib/cjs/common/WorkerProxy.js +10 -1
  29. package/lib/cjs/common/WorkerProxy.js.map +1 -1
  30. package/lib/cjs/common/render/primitives/VertexTableSplitter.js +1 -1
  31. package/lib/cjs/common/render/primitives/VertexTableSplitter.js.map +1 -1
  32. package/lib/cjs/render/webgl/glsl/Surface.js +1 -1
  33. package/lib/cjs/render/webgl/glsl/Surface.js.map +1 -1
  34. package/lib/cjs/tile/PrimaryTileTree.d.ts.map +1 -1
  35. package/lib/cjs/tile/PrimaryTileTree.js +3 -1
  36. package/lib/cjs/tile/PrimaryTileTree.js.map +1 -1
  37. package/lib/cjs/tile/TileDrawArgs.js +1 -1
  38. package/lib/cjs/tile/TileDrawArgs.js.map +1 -1
  39. package/lib/cjs/tile/TileTreeReference.d.ts +2 -2
  40. package/lib/cjs/tile/TileTreeReference.d.ts.map +1 -1
  41. package/lib/cjs/tile/TileTreeReference.js +1 -1
  42. package/lib/cjs/tile/TileTreeReference.js.map +1 -1
  43. package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +2 -2
  44. package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
  45. package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +3 -2
  46. package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
  47. package/lib/cjs/tile/map/ImageryTileTree.d.ts +2 -2
  48. package/lib/cjs/tile/map/ImageryTileTree.d.ts.map +1 -1
  49. package/lib/cjs/tile/map/ImageryTileTree.js +2 -2
  50. package/lib/cjs/tile/map/ImageryTileTree.js.map +1 -1
  51. package/lib/cjs/tile/map/MapFeatureInfo.d.ts +7 -0
  52. package/lib/cjs/tile/map/MapFeatureInfo.d.ts.map +1 -1
  53. package/lib/cjs/tile/map/MapFeatureInfo.js.map +1 -1
  54. package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +2 -2
  55. package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
  56. package/lib/cjs/tile/map/MapLayerImageryProvider.js +1 -1
  57. package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
  58. package/lib/cjs/tile/map/MapTileTree.d.ts +9 -3
  59. package/lib/cjs/tile/map/MapTileTree.d.ts.map +1 -1
  60. package/lib/cjs/tile/map/MapTileTree.js +8 -3
  61. package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
  62. package/lib/esm/BriefcaseConnection.d.ts.map +1 -1
  63. package/lib/esm/BriefcaseConnection.js +1 -0
  64. package/lib/esm/BriefcaseConnection.js.map +1 -1
  65. package/lib/esm/BriefcaseTxns.d.ts +12 -0
  66. package/lib/esm/BriefcaseTxns.d.ts.map +1 -1
  67. package/lib/esm/BriefcaseTxns.js +16 -0
  68. package/lib/esm/BriefcaseTxns.js.map +1 -1
  69. package/lib/esm/IModelApp.d.ts.map +1 -1
  70. package/lib/esm/IModelApp.js +4 -1
  71. package/lib/esm/IModelApp.js.map +1 -1
  72. package/lib/esm/IModelConnection.d.ts +6 -3
  73. package/lib/esm/IModelConnection.d.ts.map +1 -1
  74. package/lib/esm/IModelConnection.js +7 -3
  75. package/lib/esm/IModelConnection.js.map +1 -1
  76. package/lib/esm/ViewCreator3d.d.ts.map +1 -1
  77. package/lib/esm/ViewCreator3d.js +1 -0
  78. package/lib/esm/ViewCreator3d.js.map +1 -1
  79. package/lib/esm/ViewState.d.ts +14 -6
  80. package/lib/esm/ViewState.d.ts.map +1 -1
  81. package/lib/esm/ViewState.js +5 -4
  82. package/lib/esm/ViewState.js.map +1 -1
  83. package/lib/esm/Viewport.d.ts +10 -4
  84. package/lib/esm/Viewport.d.ts.map +1 -1
  85. package/lib/esm/Viewport.js +10 -4
  86. package/lib/esm/Viewport.js.map +1 -1
  87. package/lib/esm/common/WorkerProxy.d.ts.map +1 -1
  88. package/lib/esm/common/WorkerProxy.js +10 -1
  89. package/lib/esm/common/WorkerProxy.js.map +1 -1
  90. package/lib/esm/common/render/primitives/VertexTableSplitter.js +1 -1
  91. package/lib/esm/common/render/primitives/VertexTableSplitter.js.map +1 -1
  92. package/lib/esm/render/webgl/glsl/Surface.js +1 -1
  93. package/lib/esm/render/webgl/glsl/Surface.js.map +1 -1
  94. package/lib/esm/tile/PrimaryTileTree.d.ts.map +1 -1
  95. package/lib/esm/tile/PrimaryTileTree.js +3 -1
  96. package/lib/esm/tile/PrimaryTileTree.js.map +1 -1
  97. package/lib/esm/tile/TileDrawArgs.js +1 -1
  98. package/lib/esm/tile/TileDrawArgs.js.map +1 -1
  99. package/lib/esm/tile/TileTreeReference.d.ts +2 -2
  100. package/lib/esm/tile/TileTreeReference.d.ts.map +1 -1
  101. package/lib/esm/tile/TileTreeReference.js +1 -1
  102. package/lib/esm/tile/TileTreeReference.js.map +1 -1
  103. package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +2 -2
  104. package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
  105. package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +3 -2
  106. package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
  107. package/lib/esm/tile/map/ImageryTileTree.d.ts +2 -2
  108. package/lib/esm/tile/map/ImageryTileTree.d.ts.map +1 -1
  109. package/lib/esm/tile/map/ImageryTileTree.js +2 -2
  110. package/lib/esm/tile/map/ImageryTileTree.js.map +1 -1
  111. package/lib/esm/tile/map/MapFeatureInfo.d.ts +7 -0
  112. package/lib/esm/tile/map/MapFeatureInfo.d.ts.map +1 -1
  113. package/lib/esm/tile/map/MapFeatureInfo.js.map +1 -1
  114. package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +2 -2
  115. package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
  116. package/lib/esm/tile/map/MapLayerImageryProvider.js +1 -1
  117. package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
  118. package/lib/esm/tile/map/MapTileTree.d.ts +9 -3
  119. package/lib/esm/tile/map/MapTileTree.d.ts.map +1 -1
  120. package/lib/esm/tile/map/MapTileTree.js +8 -3
  121. package/lib/esm/tile/map/MapTileTree.js.map +1 -1
  122. package/lib/public/scripts/parse-imdl-worker.js +1 -1
  123. package/lib/workers/webpack/parse-imdl-worker.js +1 -1
  124. package/package.json +20 -20
@@ -1 +1 @@
1
- {"version":3,"file":"TileDrawArgs.js","sourceRoot":"","sources":["../../../src/tile/TileDrawArgs.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAc,QAAQ,EAAS,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAa,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACtI,OAAO,EAAE,yBAAyB,EAAE,aAAa,EAAiC,MAAM,oBAAoB,CAAC;AAE7G,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAOxD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,MAAM,YAAY,GAAG,IAAI,OAAO,EAAE,CAAC;AACnC,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;AACtC,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;AACxC,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;AAC3C,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;AAC3C,MAAM,eAAe,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;AAwClD;;;;;;GAMG;AACH,MAAM,OAAO,YAAY;IAqCvB,mFAAmF;IACnF,IAAW,iBAAiB,KAAwB,OAAO,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC7F,sFAAsF;IACtF,IAAW,kBAAkB,KAA6C,OAAO,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAYpH,kHAAkH;IAC3G,YAAY,CAAC,IAAU;QAC5B,MAAM,kBAAkB,GAAG,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC;QACjE,IAAI,SAAS,KAAK,kBAAkB;YAClC,OAAO,kBAAkB,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C;IACzD,CAAC;IAED;;OAEG;IACI,SAAS,CAAC,IAAU;QACzB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACI,oBAAoB,CAAC,MAAc,IAAU,CAAC;IAErD,eAAe;IACf,IAAW,4BAA4B,KAAyB,OAAO,SAAS,CAAC,CAAC,CAAC;CACpF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { BeTimePoint } from \"@itwin/core-bentley\";\r\nimport { ClipVector, Geometry, Map4d, Matrix4d, Point3d, Point4d, Range1d, Range3d, Transform, Vector3d } from \"@itwin/core-geometry\";\r\nimport { FeatureAppearanceProvider, FrustumPlanes, HiddenLine, ViewFlagOverrides } from \"@itwin/core-common\";\r\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\r\nimport { GraphicBranch } from \"../render/GraphicBranch\";\r\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\r\nimport { RenderGraphic } from \"../render/RenderGraphic\";\r\nimport { RenderPlanarClassifier } from \"../render/RenderPlanarClassifier\";\r\nimport { RenderTextureDrape } from \"../render/RenderSystem\";\r\nimport { SceneContext } from \"../ViewContext\";\r\nimport { ViewingSpace } from \"../ViewingSpace\";\r\nimport { CoordSystem } from \"../CoordSystem\";\r\nimport { Tile, TileGraphicType, TileTree } from \"./internal\";\r\n\r\nconst scratchRange = new Range3d();\r\nconst scratchPoint = Point3d.create();\r\nconst scratchPoint4d = Point4d.create();\r\nconst scratchXRange = Range1d.createNull();\r\nconst scratchYRange = Range1d.createNull();\r\nconst scratchMatrix4d = Matrix4d.createIdentity();\r\n\r\n/** Parameters used to construct [[TileDrawArgs]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TileDrawArgParams {\r\n /** Context for the scene into which the tiles are to be rendered. */\r\n context: SceneContext;\r\n /** Transform to be applied when drawing the tiles. */\r\n location: Transform;\r\n /** The tile tree from which to obtain tiles. */\r\n tree: TileTree;\r\n /** The time at which these args were created. */\r\n now: BeTimePoint;\r\n /** Overrides to apply to the view's [ViewFlags]($common) when drawing the tiles. */\r\n viewFlagOverrides: ViewFlagOverrides;\r\n /** Clip volume used to clip the tiles. */\r\n clipVolume?: RenderClipVolume;\r\n /** True if a tile and its child tiles should not be drawn simultaneously. */\r\n parentsAndChildrenExclusive: boolean;\r\n /** Symbology overrides to apply to the tiles. */\r\n symbologyOverrides: FeatureSymbology.Overrides | undefined;\r\n /** Optionally customizes the view's symbology overrides for the tiles. */\r\n appearanceProvider?: FeatureAppearanceProvider;\r\n /** Optionally overrides the view's hidden line settings. */\r\n hiddenLineSettings?: HiddenLine.Settings;\r\n /** If defined, tiles should be culled if they do not intersect this clip. */\r\n intersectionClip?: ClipVector;\r\n /** If defined, the Id of a node in the scene's [RenderSchedule.Script]($common) that applies a transform to the graphics;\r\n * or \"0xffffffff\" for any node that does *not* apply a transform.\r\n * @internal\r\n */\r\n animationTransformNodeId?: number;\r\n /** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */\r\n boundingRange?: Range3d;\r\n /** @alpha */\r\n maximumScreenSpaceError?: number;\r\n}\r\n\r\n/**\r\n * Provides context used when selecting and drawing [[Tile]]s.\r\n * @see [[TileTree.selectTiles]]\r\n * @see [[TileTree.draw]]\r\n * @public\r\n * @extensions\r\n */\r\nexport class TileDrawArgs {\r\n /** Transform to the location in iModel coordinates at which the tiles are to be drawn. */\r\n public readonly location: Transform;\r\n /** The tile tree being drawn. */\r\n public readonly tree: TileTree;\r\n /** Optional clip volume applied to the tiles. */\r\n public clipVolume: RenderClipVolume | undefined;\r\n /** The context in which the tiles will be drawn, exposing, e.g., the [[Viewport]] and accepting [[RenderGraphic]]s to be drawn. */\r\n public readonly context: SceneContext;\r\n /** Describes the viewed volume. */\r\n public viewingSpace: ViewingSpace;\r\n /** Holds the tile graphics to be drawn. */\r\n public readonly graphics: GraphicBranch = new GraphicBranch();\r\n /** @internal */\r\n public readonly now: BeTimePoint;\r\n /** The planes of the viewing frustum, used for frustum culling. */\r\n protected _frustumPlanes?: FrustumPlanes;\r\n /** @internal */\r\n public planarClassifier?: RenderPlanarClassifier;\r\n /** @internal */\r\n public drape?: RenderTextureDrape;\r\n /** Optional clip volume applied to all tiles in the view. */\r\n public readonly viewClip?: ClipVector;\r\n /** True if a tile and its child tiles should not be drawn simultaneously. */\r\n public parentsAndChildrenExclusive: boolean;\r\n /** @internal */\r\n private _appearanceProvider?: FeatureAppearanceProvider;\r\n /** Optional overrides for the view's hidden line settings. */\r\n public hiddenLineSettings?: HiddenLine.Settings;\r\n /** Tiles that we want to draw and that are ready to draw. May not actually be selected, e.g. if sibling tiles are not yet ready. */\r\n public readonly readyTiles = new Set<Tile>();\r\n /** Tiles whose contents should be kept in memory regardless of whether or not they are selected for display.\r\n * @internal\r\n */\r\n public readonly touchedTiles = new Set<Tile>();\r\n /** For perspective views, the view-Z of the near plane. */\r\n private readonly _nearFrontCenter?: Point3d;\r\n /** Overrides applied to the view's [ViewFlags]($common) when drawing the tiles. */\r\n public get viewFlagOverrides(): ViewFlagOverrides { return this.graphics.viewFlagOverrides; }\r\n /** If defined, replaces the view's own symbology overrides when drawing the tiles. */\r\n public get symbologyOverrides(): FeatureSymbology.Overrides | undefined { return this.graphics.symbologyOverrides; }\r\n /** If defined, tiles will be culled if they do not intersect this clip. */\r\n public intersectionClip?: ClipVector;\r\n /** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */\r\n public boundingRange?: Range3d;\r\n /** @internal */\r\n public readonly pixelSizeScaleFactor;\r\n /** @internal */\r\n public readonly animationTransformNodeId?: number;\r\n /** @alpha */\r\n public maximumScreenSpaceError;\r\n\r\n /** Compute the size in pixels of the specified tile at the point on its bounding sphere closest to the camera. */\r\n public getPixelSize(tile: Tile): number {\r\n const sizeFromProjection = this.getPixelSizeFromProjection(tile);\r\n if (undefined !== sizeFromProjection)\r\n return sizeFromProjection;\r\n\r\n const radius = this.getTileRadius(tile); // use a sphere to test pixel size. We don't know the orientation of the image within the bounding box.\r\n const center = this.getTileCenter(tile);\r\n\r\n const pixelSizeAtPt = this.computePixelSizeInMetersAtClosestPoint(center, radius);\r\n return 0 !== pixelSizeAtPt ? this.context.adjustPixelSizeForLOD(radius / pixelSizeAtPt) : 1.0e-3;\r\n }\r\n\r\n /** If the tile provides corners (from an OBB) then this produces most accurate representation of the tile size */\r\n private getPixelSizeFromProjection(tile: Tile): number | undefined {\r\n const sizeProjectionCorners = tile.getSizeProjectionCorners();\r\n if (!sizeProjectionCorners)\r\n return undefined;\r\n\r\n /* For maps or global reality models we use the projected screen rectangle rather than sphere to calculate pixel size to avoid excessive tiles at horizon. */\r\n const tileToView = this.worldToViewMap.transform0.multiplyMatrixMatrix(Matrix4d.createTransform(this.location, scratchMatrix4d), scratchMatrix4d);\r\n scratchXRange.setNull();\r\n scratchYRange.setNull();\r\n\r\n let behindEye = false;\r\n for (const corner of sizeProjectionCorners) {\r\n const viewCorner = tileToView.multiplyPoint3d(corner, 1, scratchPoint4d);\r\n if (viewCorner.w < 0.0) {\r\n behindEye = true;\r\n break;\r\n }\r\n\r\n scratchXRange.extendX(viewCorner.x / viewCorner.w);\r\n scratchYRange.extendX(viewCorner.y / viewCorner.w);\r\n }\r\n if (behindEye)\r\n return undefined;\r\n\r\n return scratchXRange.isNull ? 1.0E-3 : this.context.adjustPixelSizeForLOD(Math.sqrt(scratchXRange.length() * scratchYRange.length()));\r\n }\r\n\r\n /** Compute the size in meters of one pixel at the point on the tile's bounding sphere closest to the camera. */\r\n public getPixelSizeInMetersAtClosestPoint(tile: Tile): number {\r\n const radius = this.getTileRadius(tile); // use a sphere to test pixel size. We don't know the orientation of the image within the bounding box.\r\n const center = this.getTileCenter(tile);\r\n\r\n const pixelSizeAtPt = this.computePixelSizeInMetersAtClosestPoint(center, radius);\r\n return 0 !== pixelSizeAtPt ? this.context.adjustPixelSizeForLOD(pixelSizeAtPt) : 1.0e-3;\r\n }\r\n\r\n /** Compute the size in meters of one pixel at the point on a sphere closest to the camera.\r\n * Device scaling is not applied.\r\n */\r\n public computePixelSizeInMetersAtClosestPoint(center: Point3d, radius: number): number {\r\n if (this.context.viewport.view.is3d() && this.context.viewport.isCameraOn && this._nearFrontCenter) {\r\n const toFront = Vector3d.createStartEnd(center, this._nearFrontCenter);\r\n const viewZ = this.context.viewport.rotation.rowZ();\r\n // If the sphere overlaps the near front plane just use near front point. This also handles behind eye conditions.\r\n if (viewZ.dotProduct(toFront) < radius) {\r\n center = this._nearFrontCenter;\r\n } else {\r\n // Find point on sphere closest to eye.\r\n const toEye = center.unitVectorTo(this.context.viewport.view.camera.eye);\r\n\r\n if (toEye) { // Only if tile is not already behind the eye.\r\n toEye.scaleInPlace(radius);\r\n center.addInPlace(toEye);\r\n }\r\n }\r\n }\r\n\r\n const viewPt = this.worldToViewMap.transform0.multiplyPoint3dQuietNormalize(center);\r\n const viewPt2 = new Point3d(viewPt.x + 1.0, viewPt.y, viewPt.z);\r\n return this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt).distance(this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt2));\r\n }\r\n\r\n /** Compute this size of a sphere on screen in pixels */\r\n public getRangePixelSize(range: Range3d): number {\r\n const transformedRange = this.location.multiplyRange(range, scratchRange);\r\n const center = transformedRange.localXYZToWorld(.5, .5, .5, scratchPoint)!;\r\n const radius = transformedRange.diagonal().magnitude();\r\n\r\n const viewPt = this.worldToViewMap.transform0.multiplyPoint3dQuietNormalize(center);\r\n const viewPt2 = new Point3d(viewPt.x + 1.0, viewPt.y, viewPt.z);\r\n const pixelSizeAtPt = this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt).distance(this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt2));\r\n return 0 !== pixelSizeAtPt ? radius / pixelSizeAtPt : 1.0e-3;\r\n }\r\n\r\n /** @internal */\r\n public getTileGraphics(tile: Tile) {\r\n return tile.produceGraphics();\r\n }\r\n\r\n /** The planes of the viewing frustum, used for frustum culling. */\r\n public get frustumPlanes(): FrustumPlanes {\r\n return this._frustumPlanes !== undefined ? this._frustumPlanes : this.context.frustumPlanes;\r\n }\r\n\r\n /** Provides conversions between [[CoordSystem.World]] and [[CoordSystem.View]]. */\r\n public get worldToViewMap(): Map4d {\r\n return this.viewingSpace.worldToViewMap;\r\n }\r\n\r\n private computePixelSizeScaleFactor(): number {\r\n // Check to see if a model display transform with non-uniform scaling is being used.\r\n const mat = this.context.viewport.view.modelDisplayTransformProvider?.getModelDisplayTransform(this.tree.modelId)?.matrix;\r\n if (!mat)\r\n return 1;\r\n\r\n const scale = [0, 1, 2].map((x) => mat.getColumn(x).magnitude());\r\n if (Math.abs(scale[0] - scale[1]) <= Geometry.smallMetricDistance && Math.abs(scale[0] - scale[2]) <= Geometry.smallMetricDistance)\r\n return 1;\r\n\r\n // If the component with the largest scale is not the same as the component with the largest tile range use it to adjust the pixel size.\r\n const rangeDiag = this.tree.range.diagonal();\r\n let maxS = 0;\r\n let maxR = 0;\r\n if (scale[0] > scale[1])\r\n maxS = (scale[0] > scale[2] ? 0 : 2);\r\n else\r\n maxS = (scale[1] > scale[2] ? 1 : 2);\r\n\r\n if (rangeDiag.x > rangeDiag.y)\r\n maxR = (rangeDiag.x > rangeDiag.z ? 0 : 2);\r\n else\r\n maxR = (rangeDiag.y > rangeDiag.z ? 1 : 2);\r\n\r\n return maxS !== maxR ? scale[maxS] : 1;\r\n }\r\n\r\n /** Constructor */\r\n public constructor(params: TileDrawArgParams) {\r\n const { location, tree, context, now, viewFlagOverrides, clipVolume, parentsAndChildrenExclusive, symbologyOverrides } = params;\r\n this.location = location;\r\n this.tree = tree;\r\n this.context = context;\r\n this.now = now;\r\n this._appearanceProvider = params.appearanceProvider;\r\n this.hiddenLineSettings = params.hiddenLineSettings;\r\n this.animationTransformNodeId = params.animationTransformNodeId;\r\n this.boundingRange = params.boundingRange;\r\n this.maximumScreenSpaceError = params.maximumScreenSpaceError ?? 16; // 16 is Cesium's default.\r\n\r\n // Do not cull tiles based on clip volume if tiles outside clip are supposed to be drawn but in a different color.\r\n if (undefined !== clipVolume && !context.viewport.view.displayStyle.settings.clipStyle.outsideColor)\r\n this.clipVolume = clipVolume;\r\n\r\n this.graphics.setViewFlagOverrides(viewFlagOverrides);\r\n this.graphics.symbologyOverrides = symbologyOverrides;\r\n this.graphics.animationId = tree.modelId;\r\n\r\n this.viewingSpace = context.viewingSpace;\r\n this._frustumPlanes = FrustumPlanes.fromFrustum(this.viewingSpace.getFrustum());\r\n\r\n this.planarClassifier = context.getPlanarClassifierForModel(tree.modelId);\r\n this.drape = context.getTextureDrapeForModel(tree.modelId);\r\n\r\n // NB: If the tile tree has its own clip, do not also apply the view's clip.\r\n if (context.viewFlags.clipVolume && false !== viewFlagOverrides.clipVolume && undefined === clipVolume) {\r\n const outsideClipColor = context.viewport.displayStyle.settings.clipStyle.outsideColor;\r\n this.viewClip = undefined === outsideClipColor ? context.viewport.view.getViewClip() : undefined;\r\n }\r\n\r\n this.parentsAndChildrenExclusive = parentsAndChildrenExclusive;\r\n if (context.viewport.isCameraOn)\r\n this._nearFrontCenter = context.viewport.getFrustum(CoordSystem.World).frontCenter;\r\n\r\n this.pixelSizeScaleFactor = this.computePixelSizeScaleFactor();\r\n }\r\n\r\n /** A multiplier applied to a [[Tile]]'s `maximumSize` property to adjust level of detail.\r\n * @see [[Viewport.tileSizeModifier]].\r\n * @public\r\n */\r\n public get tileSizeModifier(): number { return this.context.viewport.tileSizeModifier; }\r\n\r\n /** @internal */\r\n public getTileCenter(tile: Tile): Point3d { return this.location.multiplyPoint3d(tile.center); }\r\n\r\n /** @internal */\r\n public getTileRadius(tile: Tile): number {\r\n let range: Range3d = tile.range.clone(scratchRange);\r\n if (tile.tree.is2d) {\r\n // 2d tiles have a fixed Z range of [-1, 1]. Sometimes (e.g., hypermodeling) we draw them within a 3d view. Prevent Z from artificially expanding the radius.\r\n range.low.z = range.high.z = 0;\r\n }\r\n\r\n range = this.location.multiplyRange(range, range);\r\n return 0.5 * range.low.distance(range.high);\r\n }\r\n\r\n /** @internal */\r\n public get clip(): ClipVector | undefined {\r\n return undefined !== this.clipVolume ? this.clipVolume.clipVector : undefined;\r\n }\r\n\r\n /** Add a provider to supplement or override the symbology overrides for the view.\r\n * @note If a provider already exists, the new provider will be chained such that it sees the base overrides\r\n * after they have potentially been modified by the existing provider.\r\n * @public\r\n */\r\n public addAppearanceProvider(provider: FeatureAppearanceProvider): void {\r\n this._appearanceProvider = this._appearanceProvider ? FeatureAppearanceProvider.chain(this._appearanceProvider, provider) : provider;\r\n }\r\n\r\n /** Optionally customizes aspects of the view's [[FeatureSymbology.Overrides]]. */\r\n public get appearanceProvider(): FeatureAppearanceProvider | undefined {\r\n return this._appearanceProvider;\r\n }\r\n\r\n /** @internal */\r\n public produceGraphics(): RenderGraphic | undefined {\r\n return this._produceGraphicBranch(this.graphics);\r\n }\r\n /** @internal */\r\n public get secondaryClassifiers(): Map<number, RenderPlanarClassifier>| undefined {\r\n return undefined;\r\n }\r\n\r\n /** @internal */\r\n private _produceGraphicBranch(graphics: GraphicBranch): RenderGraphic | undefined {\r\n if (graphics.isEmpty)\r\n return undefined;\r\n\r\n const opts = {\r\n iModel: this.tree.iModel,\r\n clipVolume: this.clipVolume,\r\n classifierOrDrape: this.planarClassifier ?? this.drape,\r\n appearanceProvider: this.appearanceProvider,\r\n hline: this.hiddenLineSettings,\r\n secondaryClassifiers: this.secondaryClassifiers,\r\n };\r\n\r\n let graphic = this.context.createGraphicBranch(graphics, this.location, opts);\r\n if (undefined !== this.animationTransformNodeId)\r\n graphic = this.context.renderSystem.createAnimationTransformNode(graphic, this.animationTransformNodeId);\r\n\r\n return graphic;\r\n }\r\n\r\n /** Output graphics for all accumulated tiles. */\r\n public drawGraphics(): void {\r\n const graphics = this.produceGraphics();\r\n if (undefined !== graphics)\r\n this.context.outputGraphic(graphics);\r\n }\r\n\r\n /** Output graphics of the specified type for all accumulated tiles. */\r\n public drawGraphicsWithType(graphicType: TileGraphicType, graphics: GraphicBranch): void {\r\n const branch = this._produceGraphicBranch(graphics);\r\n if (undefined !== branch)\r\n this.context.withGraphicType(graphicType, () => this.context.outputGraphic(branch));\r\n }\r\n\r\n /** Indicate that graphics for the specified tile are desired but not yet available. Subsequently a request will be enqueued to load the tile's graphics. */\r\n public insertMissing(tile: Tile): void {\r\n this.context.insertMissingTile(tile);\r\n }\r\n\r\n /** Indicate that some requested child tiles are not yet loaded. */\r\n public markChildrenLoading(): void {\r\n this.context.markChildrenLoading();\r\n }\r\n\r\n /** Indicate that the specified tile is being used for some purpose by the [[SceneContext]]'s [[Viewport]]. Typically \"used\" means \"displayed\", but the exact meaning is up to the [[TileTree]] - for example, \"used\" might also mean that the tile's children are being used. A tile that is \"in use\" by any [[Viewport]] will not be discarded. */\r\n public markUsed(tile: Tile): void {\r\n tile.usageMarker.mark(this.context.viewport, this.now);\r\n }\r\n\r\n /** Indicate that the specified tile should be displayed and that its graphics are ready to be displayed. The number of \"ready\" tiles is used in conjunction with the number of \"missing\" tiles to convey to the user how complete the current view is.\r\n * @see [[insertMissing]]\r\n */\r\n public markReady(tile: Tile): void {\r\n this.readyTiles.add(tile);\r\n }\r\n\r\n /** Invoked by [[TileTree.selectTiles]]. This exists chiefly for [[SolarShadowMap]].\r\n * @internal\r\n */\r\n public processSelectedTiles(_tiles: Tile[]): void { }\r\n\r\n /* @internal */\r\n public get maxRealityTreeSelectionCount(): number | undefined { return undefined; }\r\n}\r\n"]}
1
+ {"version":3,"file":"TileDrawArgs.js","sourceRoot":"","sources":["../../../src/tile/TileDrawArgs.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAc,QAAQ,EAAS,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,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---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { BeTimePoint } from \"@itwin/core-bentley\";\r\nimport { ClipVector, Geometry, Map4d, Matrix4d, Point3d, Point4d, Range1d, Range3d, Transform, Vector3d } from \"@itwin/core-geometry\";\r\nimport { FeatureAppearanceProvider, FrustumPlanes, HiddenLine, ViewFlagOverrides } from \"@itwin/core-common\";\r\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\r\nimport { GraphicBranch } from \"../render/GraphicBranch\";\r\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\r\nimport { RenderGraphic } from \"../render/RenderGraphic\";\r\nimport { RenderPlanarClassifier } from \"../render/RenderPlanarClassifier\";\r\nimport { RenderTextureDrape } from \"../render/RenderSystem\";\r\nimport { SceneContext } from \"../ViewContext\";\r\nimport { ViewingSpace } from \"../ViewingSpace\";\r\nimport { CoordSystem } from \"../CoordSystem\";\r\nimport { Tile, TileGraphicType, TileTree } from \"./internal\";\r\n\r\nconst scratchRange = new Range3d();\r\nconst scratchPoint = Point3d.create();\r\nconst scratchPoint4d = Point4d.create();\r\nconst scratchXRange = Range1d.createNull();\r\nconst scratchYRange = Range1d.createNull();\r\nconst scratchMatrix4d = Matrix4d.createIdentity();\r\n\r\n/** Parameters used to construct [[TileDrawArgs]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TileDrawArgParams {\r\n /** Context for the scene into which the tiles are to be rendered. */\r\n context: SceneContext;\r\n /** Transform to be applied when drawing the tiles. */\r\n location: Transform;\r\n /** The tile tree from which to obtain tiles. */\r\n tree: TileTree;\r\n /** The time at which these args were created. */\r\n now: BeTimePoint;\r\n /** Overrides to apply to the view's [ViewFlags]($common) when drawing the tiles. */\r\n viewFlagOverrides: ViewFlagOverrides;\r\n /** Clip volume used to clip the tiles. */\r\n clipVolume?: RenderClipVolume;\r\n /** True if a tile and its child tiles should not be drawn simultaneously. */\r\n parentsAndChildrenExclusive: boolean;\r\n /** Symbology overrides to apply to the tiles. */\r\n symbologyOverrides: FeatureSymbology.Overrides | undefined;\r\n /** Optionally customizes the view's symbology overrides for the tiles. */\r\n appearanceProvider?: FeatureAppearanceProvider;\r\n /** Optionally overrides the view's hidden line settings. */\r\n hiddenLineSettings?: HiddenLine.Settings;\r\n /** If defined, tiles should be culled if they do not intersect this clip. */\r\n intersectionClip?: ClipVector;\r\n /** If defined, the Id of a node in the scene's [RenderSchedule.Script]($common) that applies a transform to the graphics;\r\n * or \"0xffffffff\" for any node that does *not* apply a transform.\r\n * @internal\r\n */\r\n animationTransformNodeId?: number;\r\n /** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */\r\n boundingRange?: Range3d;\r\n /** @alpha */\r\n maximumScreenSpaceError?: number;\r\n}\r\n\r\n/**\r\n * Provides context used when selecting and drawing [[Tile]]s.\r\n * @see [[TileTree.selectTiles]]\r\n * @see [[TileTree.draw]]\r\n * @public\r\n * @extensions\r\n */\r\nexport class TileDrawArgs {\r\n /** Transform to the location in iModel coordinates at which the tiles are to be drawn. */\r\n public readonly location: Transform;\r\n /** The tile tree being drawn. */\r\n public readonly tree: TileTree;\r\n /** Optional clip volume applied to the tiles. */\r\n public clipVolume: RenderClipVolume | undefined;\r\n /** The context in which the tiles will be drawn, exposing, e.g., the [[Viewport]] and accepting [[RenderGraphic]]s to be drawn. */\r\n public readonly context: SceneContext;\r\n /** Describes the viewed volume. */\r\n public viewingSpace: ViewingSpace;\r\n /** Holds the tile graphics to be drawn. */\r\n public readonly graphics: GraphicBranch = new GraphicBranch();\r\n /** @internal */\r\n public readonly now: BeTimePoint;\r\n /** The planes of the viewing frustum, used for frustum culling. */\r\n protected _frustumPlanes?: FrustumPlanes;\r\n /** @internal */\r\n public planarClassifier?: RenderPlanarClassifier;\r\n /** @internal */\r\n public drape?: RenderTextureDrape;\r\n /** Optional clip volume applied to all tiles in the view. */\r\n public readonly viewClip?: ClipVector;\r\n /** True if a tile and its child tiles should not be drawn simultaneously. */\r\n public parentsAndChildrenExclusive: boolean;\r\n /** @internal */\r\n private _appearanceProvider?: FeatureAppearanceProvider;\r\n /** Optional overrides for the view's hidden line settings. */\r\n public hiddenLineSettings?: HiddenLine.Settings;\r\n /** Tiles that we want to draw and that are ready to draw. May not actually be selected, e.g. if sibling tiles are not yet ready. */\r\n public readonly readyTiles = new Set<Tile>();\r\n /** Tiles whose contents should be kept in memory regardless of whether or not they are selected for display.\r\n * @internal\r\n */\r\n public readonly touchedTiles = new Set<Tile>();\r\n /** For perspective views, the view-Z of the near plane. */\r\n private readonly _nearFrontCenter?: Point3d;\r\n /** Overrides applied to the view's [ViewFlags]($common) when drawing the tiles. */\r\n public get viewFlagOverrides(): ViewFlagOverrides { return this.graphics.viewFlagOverrides; }\r\n /** If defined, replaces the view's own symbology overrides when drawing the tiles. */\r\n public get symbologyOverrides(): FeatureSymbology.Overrides | undefined { return this.graphics.symbologyOverrides; }\r\n /** If defined, tiles will be culled if they do not intersect this clip. */\r\n public intersectionClip?: ClipVector;\r\n /** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */\r\n public boundingRange?: Range3d;\r\n /** @internal */\r\n public readonly pixelSizeScaleFactor;\r\n /** @internal */\r\n public readonly animationTransformNodeId?: number;\r\n /** @alpha */\r\n public maximumScreenSpaceError;\r\n\r\n /** Compute the size in pixels of the specified tile at the point on its bounding sphere closest to the camera. */\r\n public getPixelSize(tile: Tile): number {\r\n const sizeFromProjection = this.getPixelSizeFromProjection(tile);\r\n if (undefined !== sizeFromProjection)\r\n return sizeFromProjection;\r\n\r\n const radius = this.getTileRadius(tile); // use a sphere to test pixel size. We don't know the orientation of the image within the bounding box.\r\n const center = this.getTileCenter(tile);\r\n\r\n const pixelSizeAtPt = this.computePixelSizeInMetersAtClosestPoint(center, radius);\r\n return 0 !== pixelSizeAtPt ? this.context.adjustPixelSizeForLOD(radius / pixelSizeAtPt) : 1.0e-3;\r\n }\r\n\r\n /** If the tile provides corners (from an OBB) then this produces most accurate representation of the tile size */\r\n private getPixelSizeFromProjection(tile: Tile): number | undefined {\r\n const sizeProjectionCorners = tile.getSizeProjectionCorners();\r\n if (!sizeProjectionCorners)\r\n return undefined;\r\n\r\n /* For maps or global reality models we use the projected screen rectangle rather than sphere to calculate pixel size to avoid excessive tiles at horizon. */\r\n const tileToView = this.worldToViewMap.transform0.multiplyMatrixMatrix(Matrix4d.createTransform(this.location, scratchMatrix4d), scratchMatrix4d);\r\n scratchXRange.setNull();\r\n scratchYRange.setNull();\r\n\r\n let behindEye = false;\r\n for (const corner of sizeProjectionCorners) {\r\n const viewCorner = tileToView.multiplyPoint3d(corner, 1, scratchPoint4d);\r\n if (viewCorner.w < 0.0) {\r\n behindEye = true;\r\n break;\r\n }\r\n\r\n scratchXRange.extendX(viewCorner.x / viewCorner.w);\r\n scratchYRange.extendX(viewCorner.y / viewCorner.w);\r\n }\r\n if (behindEye)\r\n return undefined;\r\n\r\n return scratchXRange.isNull ? 1.0E-3 : this.context.adjustPixelSizeForLOD(Math.sqrt(scratchXRange.length() * scratchYRange.length()));\r\n }\r\n\r\n /** Compute the size in meters of one pixel at the point on the tile's bounding sphere closest to the camera. */\r\n public getPixelSizeInMetersAtClosestPoint(tile: Tile): number {\r\n const radius = this.getTileRadius(tile); // use a sphere to test pixel size. We don't know the orientation of the image within the bounding box.\r\n const center = this.getTileCenter(tile);\r\n\r\n const pixelSizeAtPt = this.computePixelSizeInMetersAtClosestPoint(center, radius);\r\n return 0 !== pixelSizeAtPt ? this.context.adjustPixelSizeForLOD(pixelSizeAtPt) : 1.0e-3;\r\n }\r\n\r\n /** Compute the size in meters of one pixel at the point on a sphere closest to the camera.\r\n * Device scaling is not applied.\r\n */\r\n public computePixelSizeInMetersAtClosestPoint(center: Point3d, radius: number): number {\r\n if (this.context.viewport.view.is3d() && this.context.viewport.isCameraOn && this._nearFrontCenter) {\r\n const toFront = Vector3d.createStartEnd(center, this._nearFrontCenter);\r\n const viewZ = this.context.viewport.rotation.rowZ();\r\n // If the sphere overlaps the near front plane just use near front point. This also handles behind eye conditions.\r\n if (viewZ.dotProduct(toFront) < radius) {\r\n center = this._nearFrontCenter;\r\n } else {\r\n // Find point on sphere closest to eye.\r\n const toEye = center.unitVectorTo(this.context.viewport.view.camera.eye);\r\n\r\n if (toEye) { // Only if tile is not already behind the eye.\r\n toEye.scaleInPlace(radius);\r\n center.addInPlace(toEye);\r\n }\r\n }\r\n }\r\n\r\n const viewPt = this.worldToViewMap.transform0.multiplyPoint3dQuietNormalize(center);\r\n const viewPt2 = new Point3d(viewPt.x + 1.0, viewPt.y, viewPt.z);\r\n return this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt).distance(this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt2));\r\n }\r\n\r\n /** Compute this size of a sphere on screen in pixels */\r\n public getRangePixelSize(range: Range3d): number {\r\n const transformedRange = this.location.multiplyRange(range, scratchRange);\r\n const center = transformedRange.localXYZToWorld(.5, .5, .5, scratchPoint)!;\r\n const radius = transformedRange.diagonal().magnitude();\r\n\r\n const viewPt = this.worldToViewMap.transform0.multiplyPoint3dQuietNormalize(center);\r\n const viewPt2 = new Point3d(viewPt.x + 1.0, viewPt.y, viewPt.z);\r\n const pixelSizeAtPt = this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt).distance(this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt2));\r\n return 0 !== pixelSizeAtPt ? radius / pixelSizeAtPt : 1.0e-3;\r\n }\r\n\r\n /** @internal */\r\n public getTileGraphics(tile: Tile) {\r\n return tile.produceGraphics();\r\n }\r\n\r\n /** The planes of the viewing frustum, used for frustum culling. */\r\n public get frustumPlanes(): FrustumPlanes {\r\n return this._frustumPlanes !== undefined ? this._frustumPlanes : this.context.frustumPlanes;\r\n }\r\n\r\n /** Provides conversions between [[CoordSystem.World]] and [[CoordSystem.View]]. */\r\n public get worldToViewMap(): Map4d {\r\n return this.viewingSpace.worldToViewMap;\r\n }\r\n\r\n private computePixelSizeScaleFactor(): number {\r\n // Check to see if a model display transform with non-uniform scaling is being used.\r\n const mat = this.context.viewport.view.modelDisplayTransformProvider?.getModelDisplayTransform(this.tree.modelId)?.transform.matrix;\r\n if (!mat)\r\n return 1;\r\n\r\n const scale = [0, 1, 2].map((x) => mat.getColumn(x).magnitude());\r\n if (Math.abs(scale[0] - scale[1]) <= Geometry.smallMetricDistance && Math.abs(scale[0] - scale[2]) <= Geometry.smallMetricDistance)\r\n return 1;\r\n\r\n // If the component with the largest scale is not the same as the component with the largest tile range use it to adjust the pixel size.\r\n const rangeDiag = this.tree.range.diagonal();\r\n let maxS = 0;\r\n let maxR = 0;\r\n if (scale[0] > scale[1])\r\n maxS = (scale[0] > scale[2] ? 0 : 2);\r\n else\r\n maxS = (scale[1] > scale[2] ? 1 : 2);\r\n\r\n if (rangeDiag.x > rangeDiag.y)\r\n maxR = (rangeDiag.x > rangeDiag.z ? 0 : 2);\r\n else\r\n maxR = (rangeDiag.y > rangeDiag.z ? 1 : 2);\r\n\r\n return maxS !== maxR ? scale[maxS] : 1;\r\n }\r\n\r\n /** Constructor */\r\n public constructor(params: TileDrawArgParams) {\r\n const { location, tree, context, now, viewFlagOverrides, clipVolume, parentsAndChildrenExclusive, symbologyOverrides } = params;\r\n this.location = location;\r\n this.tree = tree;\r\n this.context = context;\r\n this.now = now;\r\n this._appearanceProvider = params.appearanceProvider;\r\n this.hiddenLineSettings = params.hiddenLineSettings;\r\n this.animationTransformNodeId = params.animationTransformNodeId;\r\n this.boundingRange = params.boundingRange;\r\n this.maximumScreenSpaceError = params.maximumScreenSpaceError ?? 16; // 16 is Cesium's default.\r\n\r\n // Do not cull tiles based on clip volume if tiles outside clip are supposed to be drawn but in a different color.\r\n if (undefined !== clipVolume && !context.viewport.view.displayStyle.settings.clipStyle.outsideColor)\r\n this.clipVolume = clipVolume;\r\n\r\n this.graphics.setViewFlagOverrides(viewFlagOverrides);\r\n this.graphics.symbologyOverrides = symbologyOverrides;\r\n this.graphics.animationId = tree.modelId;\r\n\r\n this.viewingSpace = context.viewingSpace;\r\n this._frustumPlanes = FrustumPlanes.fromFrustum(this.viewingSpace.getFrustum());\r\n\r\n this.planarClassifier = context.getPlanarClassifierForModel(tree.modelId);\r\n this.drape = context.getTextureDrapeForModel(tree.modelId);\r\n\r\n // NB: If the tile tree has its own clip, do not also apply the view's clip.\r\n if (context.viewFlags.clipVolume && false !== viewFlagOverrides.clipVolume && undefined === clipVolume) {\r\n const outsideClipColor = context.viewport.displayStyle.settings.clipStyle.outsideColor;\r\n this.viewClip = undefined === outsideClipColor ? context.viewport.view.getViewClip() : undefined;\r\n }\r\n\r\n this.parentsAndChildrenExclusive = parentsAndChildrenExclusive;\r\n if (context.viewport.isCameraOn)\r\n this._nearFrontCenter = context.viewport.getFrustum(CoordSystem.World).frontCenter;\r\n\r\n this.pixelSizeScaleFactor = this.computePixelSizeScaleFactor();\r\n }\r\n\r\n /** A multiplier applied to a [[Tile]]'s `maximumSize` property to adjust level of detail.\r\n * @see [[Viewport.tileSizeModifier]].\r\n * @public\r\n */\r\n public get tileSizeModifier(): number { return this.context.viewport.tileSizeModifier; }\r\n\r\n /** @internal */\r\n public getTileCenter(tile: Tile): Point3d { return this.location.multiplyPoint3d(tile.center); }\r\n\r\n /** @internal */\r\n public getTileRadius(tile: Tile): number {\r\n let range: Range3d = tile.range.clone(scratchRange);\r\n if (tile.tree.is2d) {\r\n // 2d tiles have a fixed Z range of [-1, 1]. Sometimes (e.g., hypermodeling) we draw them within a 3d view. Prevent Z from artificially expanding the radius.\r\n range.low.z = range.high.z = 0;\r\n }\r\n\r\n range = this.location.multiplyRange(range, range);\r\n return 0.5 * range.low.distance(range.high);\r\n }\r\n\r\n /** @internal */\r\n public get clip(): ClipVector | undefined {\r\n return undefined !== this.clipVolume ? this.clipVolume.clipVector : undefined;\r\n }\r\n\r\n /** Add a provider to supplement or override the symbology overrides for the view.\r\n * @note If a provider already exists, the new provider will be chained such that it sees the base overrides\r\n * after they have potentially been modified by the existing provider.\r\n * @public\r\n */\r\n public addAppearanceProvider(provider: FeatureAppearanceProvider): void {\r\n this._appearanceProvider = this._appearanceProvider ? FeatureAppearanceProvider.chain(this._appearanceProvider, provider) : provider;\r\n }\r\n\r\n /** Optionally customizes aspects of the view's [[FeatureSymbology.Overrides]]. */\r\n public get appearanceProvider(): FeatureAppearanceProvider | undefined {\r\n return this._appearanceProvider;\r\n }\r\n\r\n /** @internal */\r\n public produceGraphics(): RenderGraphic | undefined {\r\n return this._produceGraphicBranch(this.graphics);\r\n }\r\n /** @internal */\r\n public get secondaryClassifiers(): Map<number, RenderPlanarClassifier>| undefined {\r\n return undefined;\r\n }\r\n\r\n /** @internal */\r\n private _produceGraphicBranch(graphics: GraphicBranch): RenderGraphic | undefined {\r\n if (graphics.isEmpty)\r\n return undefined;\r\n\r\n const opts = {\r\n iModel: this.tree.iModel,\r\n clipVolume: this.clipVolume,\r\n classifierOrDrape: this.planarClassifier ?? this.drape,\r\n appearanceProvider: this.appearanceProvider,\r\n hline: this.hiddenLineSettings,\r\n secondaryClassifiers: this.secondaryClassifiers,\r\n };\r\n\r\n let graphic = this.context.createGraphicBranch(graphics, this.location, opts);\r\n if (undefined !== this.animationTransformNodeId)\r\n graphic = this.context.renderSystem.createAnimationTransformNode(graphic, this.animationTransformNodeId);\r\n\r\n return graphic;\r\n }\r\n\r\n /** Output graphics for all accumulated tiles. */\r\n public drawGraphics(): void {\r\n const graphics = this.produceGraphics();\r\n if (undefined !== graphics)\r\n this.context.outputGraphic(graphics);\r\n }\r\n\r\n /** Output graphics of the specified type for all accumulated tiles. */\r\n public drawGraphicsWithType(graphicType: TileGraphicType, graphics: GraphicBranch): void {\r\n const branch = this._produceGraphicBranch(graphics);\r\n if (undefined !== branch)\r\n this.context.withGraphicType(graphicType, () => this.context.outputGraphic(branch));\r\n }\r\n\r\n /** Indicate that graphics for the specified tile are desired but not yet available. Subsequently a request will be enqueued to load the tile's graphics. */\r\n public insertMissing(tile: Tile): void {\r\n this.context.insertMissingTile(tile);\r\n }\r\n\r\n /** Indicate that some requested child tiles are not yet loaded. */\r\n public markChildrenLoading(): void {\r\n this.context.markChildrenLoading();\r\n }\r\n\r\n /** Indicate that the specified tile is being used for some purpose by the [[SceneContext]]'s [[Viewport]]. Typically \"used\" means \"displayed\", but the exact meaning is up to the [[TileTree]] - for example, \"used\" might also mean that the tile's children are being used. A tile that is \"in use\" by any [[Viewport]] will not be discarded. */\r\n public markUsed(tile: Tile): void {\r\n tile.usageMarker.mark(this.context.viewport, this.now);\r\n }\r\n\r\n /** Indicate that the specified tile should be displayed and that its graphics are ready to be displayed. The number of \"ready\" tiles is used in conjunction with the number of \"missing\" tiles to convey to the user how complete the current view is.\r\n * @see [[insertMissing]]\r\n */\r\n public markReady(tile: Tile): void {\r\n this.readyTiles.add(tile);\r\n }\r\n\r\n /** Invoked by [[TileTree.selectTiles]]. This exists chiefly for [[SolarShadowMap]].\r\n * @internal\r\n */\r\n public processSelectedTiles(_tiles: Tile[]): void { }\r\n\r\n /* @internal */\r\n public get maxRealityTreeSelectionCount(): number | undefined { return undefined; }\r\n}\r\n"]}
@@ -9,7 +9,7 @@ import { RenderClipVolume } from "../render/RenderClipVolume";
9
9
  import { RenderMemory } from "../render/RenderMemory";
10
10
  import { DecorateContext, SceneContext } from "../ViewContext";
11
11
  import { ScreenViewport } from "../Viewport";
12
- import { DisclosedTileTreeSet, GeometryTileTreeReference, MapLayerFeatureInfo, TileDrawArgs, TileGeometryCollector, TileTree, TileTreeOwner } from "./internal";
12
+ import { DisclosedTileTreeSet, GeometryTileTreeReference, MapFeatureInfoOptions, MapLayerFeatureInfo, TileDrawArgs, TileGeometryCollector, TileTree, TileTreeOwner } from "./internal";
13
13
  /** Describes the type of graphics produced by a [[TileTreeReference]].
14
14
  * @public
15
15
  * @extensions
@@ -53,7 +53,7 @@ export declare abstract class TileTreeReference {
53
53
  /** Optionally return a MapLayerFeatureInfo object describing the hit.].
54
54
  * @alpha
55
55
  */
56
- getMapFeatureInfo(_hit: HitDetail): Promise<MapLayerFeatureInfo[] | undefined>;
56
+ getMapFeatureInfo(_hit: HitDetail, _options?: MapFeatureInfoOptions): Promise<MapLayerFeatureInfo[] | undefined>;
57
57
  /** Optionally add any decorations specific to this reference. For example, map tile trees may add a logo image and/or copyright attributions.
58
58
  * @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.
59
59
  */
@@ -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,mBAAmB,EAAE,YAAY,EAAE,qBAAqB,EAAE,QAAQ,EAAsB,aAAa,EACvJ,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,oBAAY,eAAe;IACzB,wDAAwD;IACxD,aAAa,IAAI;IACjB,2CAA2C;IAC3C,KAAK,IAAI;IACT,+CAA+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AK,EAAE,QAAQ,GAAG,UAAU,CAAC,QAAQ,GAAG,SAAS;IAO1E,0BAA0B,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,EAAE,aAAa;IASjG,gBAAgB;IACT,gBAAgB,CAAC,eAAe,EAAE,OAAO,GAAG,IAAI;IAEvD,6GAA6G;IAC7G,IAAW,YAAY,IAAI,OAAO,CAEjC;IAED,iKAAiK;IACjK,IAAW,QAAQ,IAAI,OAAO,CAAkB;IAEhD;;;OAGG;IACH,IAAW,sBAAsB,IAAI,MAAM,CAA+C;IAE1F,iGAAiG;IAC1F,YAAY,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI;IAExE;;;;OAIG;IACH,SAAS,CAAC,4BAA4B,IAAI,yBAAyB,GAAG,SAAS;IAI/E;;OAEG;IACI,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAExE;;OAEG;IACH,SAAS,CAAC,oBAAoB,CAAC,SAAS,EAAE,qBAAqB,GAAG,IAAI;IAatE;;;;;OAKG;IACI,2BAA2B,IAAI,yBAAyB,GAAG,SAAS;CAQ5E"}
@@ -61,7 +61,7 @@ export class TileTreeReference /* implements RenderMemory.Consumer */ {
61
61
  /** Optionally return a MapLayerFeatureInfo object describing the hit.].
62
62
  * @alpha
63
63
  */
64
- async getMapFeatureInfo(_hit) { return undefined; }
64
+ async getMapFeatureInfo(_hit, _options) { return undefined; }
65
65
  /** Optionally add any decorations specific to this reference. For example, map tile trees may add a logo image and/or copyright attributions.
66
66
  * @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.
67
67
  */
@@ -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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K,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;SACT;IACH,CAAC;IAED;;;;;OAKG;IACI,2BAA2B;QAChC,IAAI,IAAI,CAAC,mBAAmB,EAAE;YAC5B,0KAA0K;YAC1K,OAAO,IAAiC,CAAC;SAC1C;QAED,OAAO,IAAI,CAAC,4BAA4B,EAAE,CAAC;IAC7C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { assert, BeTimePoint } from \"@itwin/core-bentley\";\r\nimport { Matrix4d, Range1d, Range3d, Transform } from \"@itwin/core-geometry\";\r\nimport { ElementAlignedBox3d, FeatureAppearanceProvider, FrustumPlanes, HiddenLine, PlanarClipMaskPriority, ViewFlagOverrides } from \"@itwin/core-common\";\r\nimport { HitDetail } from \"../HitDetail\";\r\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\r\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\r\nimport { RenderMemory } from \"../render/RenderMemory\";\r\nimport { DecorateContext, SceneContext } from \"../ViewContext\";\r\nimport { ScreenViewport } from \"../Viewport\";\r\nimport {\r\n DisclosedTileTreeSet, GeometryTileTreeReference, MapLayerFeatureInfo, TileDrawArgs, TileGeometryCollector, TileTree, TileTreeLoadStatus, TileTreeOwner,\r\n} from \"./internal\";\r\n\r\n/** Describes the type of graphics produced by a [[TileTreeReference]].\r\n * @public\r\n * @extensions\r\n */\r\nexport enum TileGraphicType {\r\n /** Rendered behind all other geometry without depth. */\r\n BackgroundMap = 0,\r\n /** Rendered with normal scene graphics. */\r\n Scene = 1,\r\n /** Rendered in front of all other geometry. */\r\n Overlay = 2,\r\n}\r\n\r\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\r\n * way of the tree's [[TileTreeOwner]].\r\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,\r\n * as a result of changing the RenderMode, or animation settings, or classification settings, etc.\r\n * A reference to a TileTree is typically associated with a [[ViewState]], a [[DisplayStyleState]], or a [[Viewport]].\r\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\r\n * differing levels of transparency.\r\n * @see [[TiledGraphicsProvider]] to supply custom [[TileTreeReference]]s to be drawn within a [[Viewport]].\r\n * @public\r\n * @extensions\r\n */\r\nexport abstract class TileTreeReference /* implements RenderMemory.Consumer */ {\r\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. */\r\n public abstract get treeOwner(): TileTreeOwner;\r\n\r\n /** Force a new tree owner / tile tree to be created for the current tile tree reference\r\n /* @internal */\r\n public resetTreeOwner() {}\r\n\r\n /** Disclose *all* TileTrees use by this reference. This may include things like map tiles used for draping on terrain.\r\n * Override this and call super if you have such auxiliary trees.\r\n * @note Any tree *NOT* disclosed becomes a candidate for *purging* (being unloaded from memory along with all of its tiles and graphics).\r\n */\r\n public discloseTileTrees(trees: DisclosedTileTreeSet): void {\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined !== tree)\r\n trees.add(tree);\r\n }\r\n\r\n /** Adds this reference's graphics to the scene. By default this invokes [[draw]]. */\r\n public addToScene(context: SceneContext): void {\r\n const args = this.createDrawArgs(context);\r\n if (undefined !== args)\r\n this.draw(args);\r\n }\r\n\r\n /** Adds this reference's graphics to the scene. By default this invokes [[TileTree.draw]] on the referenced TileTree, if it is loaded. */\r\n public draw(args: TileDrawArgs): void {\r\n args.tree.draw(args);\r\n }\r\n\r\n /** Optionally return a tooltip describing the hit. */\r\n public async getToolTip(_hit: HitDetail): Promise<HTMLElement | string | undefined> { return undefined; }\r\n\r\n /** Optionally return a MapLayerFeatureInfo object describing the hit.].\r\n * @alpha\r\n */\r\n public async getMapFeatureInfo(_hit: HitDetail): Promise<MapLayerFeatureInfo[] | undefined> { return undefined; }\r\n\r\n /** Optionally add any decorations specific to this reference. For example, map tile trees may add a logo image and/or copyright attributions.\r\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.\r\n */\r\n public decorate(_context: DecorateContext): void { }\r\n\r\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.\r\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.\r\n */\r\n public unionFitRange(union: Range3d): void {\r\n const contentRange = this.computeWorldContentRange();\r\n if (!contentRange.isNull)\r\n union.extendRange(contentRange);\r\n }\r\n\r\n /** Record graphics memory consumed by this tile tree reference. */\r\n public collectStatistics(stats: RenderMemory.Statistics): void {\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined !== tree)\r\n tree.collectStatistics(stats);\r\n }\r\n\r\n /** Return true if the tile tree is fully loaded and ready to draw.\r\n * The default implementation returns true if the tile tree loading process completed (whether it resulted in success or failure).\r\n * @note Do *not* override this property - override [[_isLoadingComplete]] instead..\r\n * @public\r\n */\r\n public get isLoadingComplete(): boolean {\r\n switch (this.treeOwner.loadStatus) {\r\n case TileTreeLoadStatus.NotLoaded:\r\n case TileTreeLoadStatus.Loading:\r\n return false;\r\n case TileTreeLoadStatus.NotFound:\r\n return true; // we tried, and failed, to load.\r\n case TileTreeLoadStatus.Loaded:\r\n return this._isLoadingComplete;\r\n }\r\n }\r\n\r\n /** Override if additional asynchronous loading is required after the tile tree is successfully loaded, to indicate when that loading has completed.\r\n * @public\r\n */\r\n protected get _isLoadingComplete(): boolean {\r\n return true;\r\n }\r\n\r\n /** Create context for drawing the tile tree, if it is ready for drawing.\r\n * TileTreeReferences can override individual portions of the context, e.g. apply their own transform.\r\n * Returns undefined if, e.g., the tile tree is not yet loaded.\r\n */\r\n public createDrawArgs(context: SceneContext): TileDrawArgs | undefined {\r\n const tree = this.treeOwner.load();\r\n if (undefined === tree)\r\n return undefined;\r\n\r\n return new TileDrawArgs({\r\n context,\r\n tree,\r\n now: BeTimePoint.now(),\r\n location: this.computeTransform(tree),\r\n viewFlagOverrides: this.getViewFlagOverrides(tree),\r\n clipVolume: this.getClipVolume(tree),\r\n parentsAndChildrenExclusive: tree.parentsAndChildrenExclusive,\r\n symbologyOverrides: this.getSymbologyOverrides(tree),\r\n appearanceProvider: this.getAppearanceProvider(tree),\r\n hiddenLineSettings: this.getHiddenLineSettings(tree),\r\n animationTransformNodeId: this.getAnimationTransformNodeId(tree),\r\n });\r\n }\r\n\r\n /** @internal */\r\n protected getAnimationTransformNodeId(_tree: TileTree): number | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Supply transform from this tile tree reference's location to iModel coordinate space.\r\n * @returns undefined if the TileTree is not yet loaded.\r\n */\r\n public getLocation(): Transform | undefined {\r\n const tree = this.treeOwner.load();\r\n return undefined !== tree ? this.computeTransform(tree) : undefined;\r\n }\r\n\r\n /** Compute a transform from this tile tree reference's coordinate space to the [[IModelConnection]]'s coordinate space. */\r\n protected computeTransform(tree: TileTree): Transform {\r\n return tree.iModelTransform.clone();\r\n }\r\n\r\n /** Compute the range of this tile tree's contents in world coordinates.\r\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.\r\n */\r\n public computeWorldContentRange(): ElementAlignedBox3d {\r\n const range = new Range3d();\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined !== tree && !tree.rootTile.contentRange.isNull)\r\n this.computeTransform(tree).multiplyRange(tree.rootTile.contentRange, range);\r\n\r\n return range;\r\n }\r\n\r\n /** Return the clip volume applied to this reference's tile tree, if any. */\r\n protected getClipVolume(tree: TileTree): RenderClipVolume | undefined {\r\n return tree.clipVolume;\r\n }\r\n\r\n /** Supply overrides that should be applied to the [[ViewState]]'s [ViewFlags]($common) when drawing this tile tree reference. */\r\n protected getViewFlagOverrides(tree: TileTree): ViewFlagOverrides {\r\n return tree.viewFlagOverrides;\r\n }\r\n\r\n /** Return overrides that *replace* any defined for the view. */\r\n protected getSymbologyOverrides(_tree: TileTree): FeatureSymbology.Overrides | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Return a provider that can supplement the view's symbology overrides. */\r\n protected getAppearanceProvider(_tree: TileTree): FeatureAppearanceProvider | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Return hidden line settings to replace those defined for the view. */\r\n protected getHiddenLineSettings(_tree: TileTree): HiddenLine.Settings | undefined {\r\n return undefined;\r\n }\r\n\r\n /* Extend range to include transformed range of this tile tree.\r\n * @internal\r\n */\r\n public accumulateTransformedRange(range: Range3d, matrix: Matrix4d, frustumPlanes?: FrustumPlanes) {\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined === tree)\r\n return;\r\n\r\n const location = this.computeTransform(tree);\r\n tree.accumulateTransformedRange(range, matrix, location, frustumPlanes);\r\n }\r\n\r\n /** @internal */\r\n public getTerrainHeight(_terrainHeights: Range1d): void { }\r\n\r\n /** Return whether the geometry exposed by this tile tree reference should cast shadows on other geometry. */\r\n public get castsShadows(): boolean {\r\n return true;\r\n }\r\n\r\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 */\r\n public get isGlobal(): boolean { return false; }\r\n\r\n /** Return the clip mask priority for this model - models will be clipped by any other viewed model with a higher proirity.\r\n * BIM models have highest prioirty and are never clipped.\r\n * @alpha\r\n */\r\n public get planarclipMaskPriority(): number { return PlanarClipMaskPriority.DesignModel; }\r\n\r\n /** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div. */\r\n public addLogoCards(_cards: HTMLTableElement, _vp: ScreenViewport): void { }\r\n\r\n /** Create a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]].\r\n * Return `undefined` if geometry collection is not supported.\r\n * @see [[createGeometryTreeReference]].\r\n * @beta\r\n */\r\n protected _createGeometryTreeReference(): GeometryTileTreeReference | undefined {\r\n return undefined;\r\n }\r\n\r\n /** If defined, supplies the implementation of [[GeometryTileTreeReference.collectTileGeometry]].\r\n * @beta\r\n */\r\n public collectTileGeometry?: (collector: TileGeometryCollector) => void;\r\n\r\n /** A function that can be assigned to [[collectTileGeometry]] to enable geometry collection for references to tile trees that support geometry collection.\r\n * @beta\r\n */\r\n protected _collectTileGeometry(collector: TileGeometryCollector): void {\r\n const tree = this.treeOwner.load();\r\n switch (this.treeOwner.loadStatus) {\r\n case TileTreeLoadStatus.Loaded:\r\n assert(undefined !== tree);\r\n tree.collectTileGeometry(collector);\r\n break;\r\n case TileTreeLoadStatus.Loading:\r\n collector.markLoading();\r\n break;\r\n }\r\n }\r\n\r\n /** Obtain a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]], or\r\n * undefined if geometry collection is not supported.\r\n * Currently, only terrain and reality model tiles support geometry collection.\r\n * @note Do not override this method - override [[_createGeometryTreeReference]] instead.\r\n * @beta\r\n */\r\n public createGeometryTreeReference(): GeometryTileTreeReference | undefined {\r\n if (this.collectTileGeometry) {\r\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.\r\n return this as GeometryTileTreeReference;\r\n }\r\n\r\n return this._createGeometryTreeReference();\r\n }\r\n}\r\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,EACwF,YAAY,EAAmC,kBAAkB,GAC/J,MA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H,CAAC;IAED;;;;;OAKG;IACI,2BAA2B;QAChC,IAAI,IAAI,CAAC,mBAAmB,EAAE;YAC5B,0KAA0K;YAC1K,OAAO,IAAiC,CAAC;SAC1C;QAED,OAAO,IAAI,CAAC,4BAA4B,EAAE,CAAC;IAC7C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { assert, BeTimePoint } from \"@itwin/core-bentley\";\r\nimport { Matrix4d, Range1d, Range3d, Transform } from \"@itwin/core-geometry\";\r\nimport { ElementAlignedBox3d, FeatureAppearanceProvider, FrustumPlanes, HiddenLine, PlanarClipMaskPriority, ViewFlagOverrides } from \"@itwin/core-common\";\r\nimport { HitDetail } from \"../HitDetail\";\r\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\r\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\r\nimport { RenderMemory } from \"../render/RenderMemory\";\r\nimport { DecorateContext, SceneContext } from \"../ViewContext\";\r\nimport { ScreenViewport } from \"../Viewport\";\r\nimport {\r\n DisclosedTileTreeSet, GeometryTileTreeReference, MapFeatureInfoOptions, MapLayerFeatureInfo, TileDrawArgs, TileGeometryCollector, TileTree, TileTreeLoadStatus, TileTreeOwner,\r\n} from \"./internal\";\r\n\r\n/** Describes the type of graphics produced by a [[TileTreeReference]].\r\n * @public\r\n * @extensions\r\n */\r\nexport enum TileGraphicType {\r\n /** Rendered behind all other geometry without depth. */\r\n BackgroundMap = 0,\r\n /** Rendered with normal scene graphics. */\r\n Scene = 1,\r\n /** Rendered in front of all other geometry. */\r\n Overlay = 2,\r\n}\r\n\r\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\r\n * way of the tree's [[TileTreeOwner]].\r\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,\r\n * as a result of changing the RenderMode, or animation settings, or classification settings, etc.\r\n * A reference to a TileTree is typically associated with a [[ViewState]], a [[DisplayStyleState]], or a [[Viewport]].\r\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\r\n * differing levels of transparency.\r\n * @see [[TiledGraphicsProvider]] to supply custom [[TileTreeReference]]s to be drawn within a [[Viewport]].\r\n * @public\r\n * @extensions\r\n */\r\nexport abstract class TileTreeReference /* implements RenderMemory.Consumer */ {\r\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. */\r\n public abstract get treeOwner(): TileTreeOwner;\r\n\r\n /** Force a new tree owner / tile tree to be created for the current tile tree reference\r\n /* @internal */\r\n public resetTreeOwner() {}\r\n\r\n /** Disclose *all* TileTrees use by this reference. This may include things like map tiles used for draping on terrain.\r\n * Override this and call super if you have such auxiliary trees.\r\n * @note Any tree *NOT* disclosed becomes a candidate for *purging* (being unloaded from memory along with all of its tiles and graphics).\r\n */\r\n public discloseTileTrees(trees: DisclosedTileTreeSet): void {\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined !== tree)\r\n trees.add(tree);\r\n }\r\n\r\n /** Adds this reference's graphics to the scene. By default this invokes [[draw]]. */\r\n public addToScene(context: SceneContext): void {\r\n const args = this.createDrawArgs(context);\r\n if (undefined !== args)\r\n this.draw(args);\r\n }\r\n\r\n /** Adds this reference's graphics to the scene. By default this invokes [[TileTree.draw]] on the referenced TileTree, if it is loaded. */\r\n public draw(args: TileDrawArgs): void {\r\n args.tree.draw(args);\r\n }\r\n\r\n /** Optionally return a tooltip describing the hit. */\r\n public async getToolTip(_hit: HitDetail): Promise<HTMLElement | string | undefined> { return undefined; }\r\n\r\n /** Optionally return a MapLayerFeatureInfo object describing the hit.].\r\n * @alpha\r\n */\r\n public async getMapFeatureInfo(_hit: HitDetail, _options?: MapFeatureInfoOptions): Promise<MapLayerFeatureInfo[] | undefined> { return undefined; }\r\n\r\n /** Optionally add any decorations specific to this reference. For example, map tile trees may add a logo image and/or copyright attributions.\r\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.\r\n */\r\n public decorate(_context: DecorateContext): void { }\r\n\r\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.\r\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.\r\n */\r\n public unionFitRange(union: Range3d): void {\r\n const contentRange = this.computeWorldContentRange();\r\n if (!contentRange.isNull)\r\n union.extendRange(contentRange);\r\n }\r\n\r\n /** Record graphics memory consumed by this tile tree reference. */\r\n public collectStatistics(stats: RenderMemory.Statistics): void {\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined !== tree)\r\n tree.collectStatistics(stats);\r\n }\r\n\r\n /** Return true if the tile tree is fully loaded and ready to draw.\r\n * The default implementation returns true if the tile tree loading process completed (whether it resulted in success or failure).\r\n * @note Do *not* override this property - override [[_isLoadingComplete]] instead..\r\n * @public\r\n */\r\n public get isLoadingComplete(): boolean {\r\n switch (this.treeOwner.loadStatus) {\r\n case TileTreeLoadStatus.NotLoaded:\r\n case TileTreeLoadStatus.Loading:\r\n return false;\r\n case TileTreeLoadStatus.NotFound:\r\n return true; // we tried, and failed, to load.\r\n case TileTreeLoadStatus.Loaded:\r\n return this._isLoadingComplete;\r\n }\r\n }\r\n\r\n /** Override if additional asynchronous loading is required after the tile tree is successfully loaded, to indicate when that loading has completed.\r\n * @public\r\n */\r\n protected get _isLoadingComplete(): boolean {\r\n return true;\r\n }\r\n\r\n /** Create context for drawing the tile tree, if it is ready for drawing.\r\n * TileTreeReferences can override individual portions of the context, e.g. apply their own transform.\r\n * Returns undefined if, e.g., the tile tree is not yet loaded.\r\n */\r\n public createDrawArgs(context: SceneContext): TileDrawArgs | undefined {\r\n const tree = this.treeOwner.load();\r\n if (undefined === tree)\r\n return undefined;\r\n\r\n return new TileDrawArgs({\r\n context,\r\n tree,\r\n now: BeTimePoint.now(),\r\n location: this.computeTransform(tree),\r\n viewFlagOverrides: this.getViewFlagOverrides(tree),\r\n clipVolume: this.getClipVolume(tree),\r\n parentsAndChildrenExclusive: tree.parentsAndChildrenExclusive,\r\n symbologyOverrides: this.getSymbologyOverrides(tree),\r\n appearanceProvider: this.getAppearanceProvider(tree),\r\n hiddenLineSettings: this.getHiddenLineSettings(tree),\r\n animationTransformNodeId: this.getAnimationTransformNodeId(tree),\r\n });\r\n }\r\n\r\n /** @internal */\r\n protected getAnimationTransformNodeId(_tree: TileTree): number | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Supply transform from this tile tree reference's location to iModel coordinate space.\r\n * @returns undefined if the TileTree is not yet loaded.\r\n */\r\n public getLocation(): Transform | undefined {\r\n const tree = this.treeOwner.load();\r\n return undefined !== tree ? this.computeTransform(tree) : undefined;\r\n }\r\n\r\n /** Compute a transform from this tile tree reference's coordinate space to the [[IModelConnection]]'s coordinate space. */\r\n protected computeTransform(tree: TileTree): Transform {\r\n return tree.iModelTransform.clone();\r\n }\r\n\r\n /** Compute the range of this tile tree's contents in world coordinates.\r\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.\r\n */\r\n public computeWorldContentRange(): ElementAlignedBox3d {\r\n const range = new Range3d();\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined !== tree && !tree.rootTile.contentRange.isNull)\r\n this.computeTransform(tree).multiplyRange(tree.rootTile.contentRange, range);\r\n\r\n return range;\r\n }\r\n\r\n /** Return the clip volume applied to this reference's tile tree, if any. */\r\n protected getClipVolume(tree: TileTree): RenderClipVolume | undefined {\r\n return tree.clipVolume;\r\n }\r\n\r\n /** Supply overrides that should be applied to the [[ViewState]]'s [ViewFlags]($common) when drawing this tile tree reference. */\r\n protected getViewFlagOverrides(tree: TileTree): ViewFlagOverrides {\r\n return tree.viewFlagOverrides;\r\n }\r\n\r\n /** Return overrides that *replace* any defined for the view. */\r\n protected getSymbologyOverrides(_tree: TileTree): FeatureSymbology.Overrides | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Return a provider that can supplement the view's symbology overrides. */\r\n protected getAppearanceProvider(_tree: TileTree): FeatureAppearanceProvider | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Return hidden line settings to replace those defined for the view. */\r\n protected getHiddenLineSettings(_tree: TileTree): HiddenLine.Settings | undefined {\r\n return undefined;\r\n }\r\n\r\n /* Extend range to include transformed range of this tile tree.\r\n * @internal\r\n */\r\n public accumulateTransformedRange(range: Range3d, matrix: Matrix4d, frustumPlanes?: FrustumPlanes) {\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined === tree)\r\n return;\r\n\r\n const location = this.computeTransform(tree);\r\n tree.accumulateTransformedRange(range, matrix, location, frustumPlanes);\r\n }\r\n\r\n /** @internal */\r\n public getTerrainHeight(_terrainHeights: Range1d): void { }\r\n\r\n /** Return whether the geometry exposed by this tile tree reference should cast shadows on other geometry. */\r\n public get castsShadows(): boolean {\r\n return true;\r\n }\r\n\r\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 */\r\n public get isGlobal(): boolean { return false; }\r\n\r\n /** Return the clip mask priority for this model - models will be clipped by any other viewed model with a higher proirity.\r\n * BIM models have highest prioirty and are never clipped.\r\n * @alpha\r\n */\r\n public get planarclipMaskPriority(): number { return PlanarClipMaskPriority.DesignModel; }\r\n\r\n /** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div. */\r\n public addLogoCards(_cards: HTMLTableElement, _vp: ScreenViewport): void { }\r\n\r\n /** Create a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]].\r\n * Return `undefined` if geometry collection is not supported.\r\n * @see [[createGeometryTreeReference]].\r\n * @beta\r\n */\r\n protected _createGeometryTreeReference(): GeometryTileTreeReference | undefined {\r\n return undefined;\r\n }\r\n\r\n /** If defined, supplies the implementation of [[GeometryTileTreeReference.collectTileGeometry]].\r\n * @beta\r\n */\r\n public collectTileGeometry?: (collector: TileGeometryCollector) => void;\r\n\r\n /** A function that can be assigned to [[collectTileGeometry]] to enable geometry collection for references to tile trees that support geometry collection.\r\n * @beta\r\n */\r\n protected _collectTileGeometry(collector: TileGeometryCollector): void {\r\n const tree = this.treeOwner.load();\r\n switch (this.treeOwner.loadStatus) {\r\n case TileTreeLoadStatus.Loaded:\r\n assert(undefined !== tree);\r\n tree.collectTileGeometry(collector);\r\n break;\r\n case TileTreeLoadStatus.Loading:\r\n collector.markLoading();\r\n break;\r\n }\r\n }\r\n\r\n /** Obtain a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]], or\r\n * undefined if geometry collection is not supported.\r\n * Currently, only terrain and reality model tiles support geometry collection.\r\n * @note Do not override this method - override [[_createGeometryTreeReference]] instead.\r\n * @beta\r\n */\r\n public createGeometryTreeReference(): GeometryTileTreeReference | undefined {\r\n if (this.collectTileGeometry) {\r\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.\r\n return this as GeometryTileTreeReference;\r\n }\r\n\r\n return this._createGeometryTreeReference();\r\n }\r\n}\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module Tiles
3
3
  */
4
4
  import { Cartographic, ImageMapLayerSettings, ImageSource } from "@itwin/core-common";
5
- import { ArcGISImageryProvider, ImageryMapTile, ImageryMapTileTree, MapLayerFeatureInfo, QuadId } from "../../internal";
5
+ import { ArcGISImageryProvider, ImageryMapTile, ImageryMapTileTree, MapFeatureInfoOptions, MapLayerFeatureInfo, QuadId } from "../../internal";
6
6
  import { Range2dProps, XYProps } from "@itwin/core-geometry";
7
7
  import { HitDetail } from "../../../HitDetail";
8
8
  /** @internal */
@@ -82,7 +82,7 @@ export declare class ArcGISMapLayerImageryProvider extends ArcGISImageryProvider
82
82
  addLogoCards(cards: HTMLTableElement): void;
83
83
  private getIdentifyData;
84
84
  getToolTip(strings: string[], quadId: QuadId, carto: Cartographic, tree: ImageryMapTileTree): Promise<void>;
85
- getFeatureInfo(featureInfos: MapLayerFeatureInfo[], quadId: QuadId, carto: Cartographic, _tree: ImageryMapTileTree, hit: HitDetail): Promise<void>;
85
+ getFeatureInfo(featureInfos: MapLayerFeatureInfo[], quadId: QuadId, carto: Cartographic, _tree: ImageryMapTileTree, hit: HitDetail, options?: MapFeatureInfoOptions): Promise<void>;
86
86
  protected getLayerString(prefix?: string): string;
87
87
  constructUrl(row: number, column: number, zoomLevel: number): Promise<string>;
88
88
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ArcGISMapLayerImageryProvider.d.ts","sourceRoot":"","sources":["../../../../../src/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,WAAW,EAA6B,MAAM,oBAAoB,CAAC;AAEjH,OAAO,EAC8D,qBAAqB,EAExF,cAAc,EAAE,kBAAkB,EAAsC,mBAAmB,EACpC,MAAM,EAC9D,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAoB,YAAY,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAI/C,gBAAgB;AAChB,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb;AAED,gBAAgB;AAChB,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,KAAK,GAAC,SAAS,GAAC,KAAK,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,gBAAgB;AAChB,MAAM,WAAW,6BAA6B;IAC5C,uDAAuD;IACvD,QAAQ,EAAE,OAAO,CAAC;IAElB,mFAAmF;IACnF,YAAY,EAAE,mBAAmB,CAAC;IAElC,8GAA8G;IAC9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"}
@@ -253,14 +253,15 @@ export class ArcGISMapLayerImageryProvider extends ArcGISImageryProvider {
253
253
  }
254
254
  }
255
255
  // Makes an identify request to ESRI MapService , and return it as a list MapLayerFeatureInfo object
256
- async getFeatureInfo(featureInfos, quadId, carto, _tree, hit) {
256
+ async getFeatureInfo(featureInfos, quadId, carto, _tree, hit, options) {
257
257
  if (!this._querySupported)
258
258
  return;
259
259
  const tileExtent = this.getEPSG3857Extent(quadId.row, quadId.column, quadId.level);
260
260
  const toleranceWorld = (tileExtent.top - tileExtent.bottom) / this.tileSize;
261
261
  const maxAllowableOffsetFactor = 2;
262
262
  const maxAllowableOffset = maxAllowableOffsetFactor * toleranceWorld;
263
- const json = await this.getIdentifyData(quadId, carto, 5, true, maxAllowableOffset);
263
+ const tolerancePixel = options?.tolerance ?? 7;
264
+ const json = await this.getIdentifyData(quadId, carto, tolerancePixel, true, maxAllowableOffset);
264
265
  if (json && Array.isArray(json.results)) {
265
266
  const renderer = new ArcGisGraphicsRenderer(hit.iModel);
266
267
  const layerInfo = { layerName: this._settings.name, subLayerInfos: [] };
@@ -1 +1 @@
1
- {"version":3,"file":"ArcGISMapLayerImageryProvider.js","sourceRoot":"","sources":["../../../../../src/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAoD,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EACL,eAAe,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,aAAa,EACvG,eAAe,EACqB,iBAAiB,EACrD,6BAA6B,GAC9B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAyB,MAAM,sBAAsB,CAAC;AA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AAC,gBAAgB,EAAE;YACzB,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,SAAS,SAAS,IAAI,GAAG,IAAI,MAAM,GAAG,CAAC;SACtE;aAAM;YACL,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;SAC3N;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\nimport { Cartographic, ImageMapLayerSettings, ImageSource, IModelStatus, ServerError } from \"@itwin/core-common\";\r\nimport { IModelApp } from \"../../../IModelApp\";\r\nimport {\r\n ArcGisErrorCode, ArcGisGeometryReaderJSON, ArcGisGraphicsRenderer, ArcGISImageryProvider, ArcGISTileMap,\r\n ArcGisUtilities,\r\n ImageryMapTile, ImageryMapTileTree, MapCartoRectangle, MapLayerFeature, MapLayerFeatureInfo,\r\n MapLayerImageryProviderStatus, MapSubLayerFeatureInfo, QuadId,\r\n} from \"../../internal\";\r\nimport { PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\r\nimport { Point2d, Range2d, Range2dProps, XYProps } from \"@itwin/core-geometry\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { HitDetail } from \"../../../HitDetail\";\r\n\r\nconst loggerCategory = \"MapLayerImageryProvider.ArcGISMapLayerImageryProvider\";\r\n\r\n/** @internal */\r\nexport interface ArcGISIdentifyImageDisplayProps {\r\n width: number;\r\n height: number;\r\n dpi: number;\r\n}\r\n\r\n/** @internal */\r\nexport interface ArcGISIdentifyLayersProps {\r\n prefix: \"top\"|\"visible\"|\"all\";\r\n layerIds?: string[];\r\n}\r\n\r\n/** @internal */\r\nexport interface ArcGISIdentifyRequestUrlProps {\r\n /** The geometry to identify on. Point only support */\r\n geometry: XYProps;\r\n\r\n /** The type of geometry specified by the geometry parameter. Point only support */\r\n geometryType: \"esriGeometryPoint\";\r\n\r\n /** The well-known ID of the spatial reference of the input and output geometries as well as the mapExtent. */\r\n sr?: number;\r\n\r\n /** The layers to perform the identify operation on. The default value is top.\r\n * Format: [top | visible | all]:layerId1,layerId2\r\n */\r\n layers?: ArcGISIdentifyLayersProps;\r\n\r\n /** The distance in screen pixels from the specified geometry within which the identify operation should be performed.\r\n * The value for the tolerance is an integer.\r\n */\r\n tolerance: number;\r\n\r\n /** The extent or bounding box of the map currently being viewed.\r\n * Format: <xmin>, <ymin>, <xmax>, <ymax>\r\n */\r\n mapExtent: Range2dProps;\r\n\r\n /** The screen image display parameters (width, height, and DPI) of the map being currently viewed. T\r\n * Format: <width>,<height>,<dpi>\r\n */\r\n imageDisplay: ArcGISIdentifyImageDisplayProps;\r\n\r\n /** If true, the result set will include the geometries associated with each result. The default is true.\r\n */\r\n returnGeometry?: boolean;\r\n\r\n /** This option can be used to specify the maximum allowable offset to be used for generalizing geometries returned by the identify operation.\r\n * The maxAllowableOffset is in the units of the sr.\r\n */\r\n maxAllowableOffset?: number;\r\n\r\n /** The response format. The default response format is html.\r\n */\r\n f?: \"json\"|\"html\";\r\n\r\n}\r\n\r\n/** @internal */\r\nexport class ArcGISIdentifyRequestUrl {\r\n public static fromJSON(baseUrl: URL|string, json: ArcGISIdentifyRequestUrlProps, srFractionDigits?: number): URL {\r\n\r\n const newUrl = new URL(baseUrl);\r\n newUrl.pathname = `${newUrl.pathname}/identify`;\r\n\r\n if (json.f) {\r\n newUrl.searchParams.append(\"f\", json.f);\r\n }\r\n\r\n const geomPt = Point2d.fromJSON(json.geometry);\r\n newUrl.searchParams.append(\"geometry\", `${this.toFixed(geomPt.x, srFractionDigits)},${this.toFixed(geomPt.y, srFractionDigits)}`);\r\n newUrl.searchParams.append(\"geometryType\", json.geometryType);\r\n\r\n if (json.sr) {\r\n newUrl.searchParams.append(\"sr\", `${json.geometryType}`);\r\n }\r\n\r\n if (json.layers) {\r\n newUrl.searchParams.append(\"layers\", `${json.layers.prefix}${json.layers.layerIds?.length ? `: ${json.layers.layerIds.join(\",\")}` : \"\"}`);\r\n }\r\n\r\n newUrl.searchParams.append(\"tolerance\", `${json.tolerance}`);\r\n\r\n newUrl.searchParams.append(\"mapExtent\", ArcGISIdentifyRequestUrl.getExtentString(json.mapExtent, srFractionDigits));\r\n\r\n newUrl.searchParams.append(\"imageDisplay\", `${json.imageDisplay.width},${json.imageDisplay.height},${json.imageDisplay.dpi}`);\r\n\r\n if (json.returnGeometry !== undefined) {\r\n newUrl.searchParams.append(\"returnGeometry\", json.returnGeometry ? \"true\" : \"false\");\r\n }\r\n\r\n if (json.maxAllowableOffset !== undefined) {\r\n newUrl.searchParams.append(\"maxAllowableOffset\", `${this.toFixed(json.maxAllowableOffset, srFractionDigits)}`);\r\n }\r\n\r\n return newUrl;\r\n }\r\n\r\n public static toFixed(value: number, srFractionDigits?: number) {\r\n return srFractionDigits === undefined ? value.toString() : value.toFixed(srFractionDigits);\r\n }\r\n\r\n public static getExtentString(range: Range2dProps, srFractionDigits?: number) {\r\n const extent = Range2d.fromJSON(range);\r\n const extentStringArray: string[] = [];\r\n extent.toFloat64Array().forEach((value) => extentStringArray.push(this.toFixed(value, srFractionDigits)));\r\n return extentStringArray.join(\",\");\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class ArcGISMapLayerImageryProvider extends ArcGISImageryProvider {\r\n private _maxDepthFromLod = 0;\r\n private _minDepthFromLod = 0;\r\n private _copyrightText = \"Copyright\";\r\n private _tileMapSupported = false;\r\n private _mapSupported = false;\r\n private _tilesOnly = false;\r\n private _tileMap: ArcGISTileMap|undefined;\r\n\r\n public serviceJson: any;\r\n constructor(settings: ImageMapLayerSettings) {\r\n super(settings, false);\r\n this._accessClient = IModelApp.mapLayerFormatRegistry.getAccessClient(settings.formatId);\r\n }\r\n\r\n protected override get _filterByCartoRange() { return false; } // Can't trust footprint ranges (USGS Hydro)\r\n\r\n public override get minimumZoomLevel() { return Math.max(super.minimumZoomLevel, this._minDepthFromLod); }\r\n public override get maximumZoomLevel() { return this._maxDepthFromLod > 0 ? this._maxDepthFromLod : super.maximumZoomLevel; }\r\n\r\n public uintToString(uintArray: any) {\r\n return Buffer.from(uintArray).toJSON();\r\n\r\n }\r\n\r\n private async fetchTile(row: number, column: number, zoomLevel: number) {\r\n const tileUrl: string = await this.constructUrl(row, column, zoomLevel);\r\n if (tileUrl.length === 0)\r\n return undefined;\r\n return this.fetch(new URL(tileUrl), { method: \"GET\" });\r\n }\r\n\r\n public override async loadTile(row: number, column: number, zoomLevel: number): Promise<ImageSource | undefined> {\r\n if ((this.status === MapLayerImageryProviderStatus.RequireAuth)) {\r\n return undefined;\r\n }\r\n\r\n try {\r\n const tileResponse = await this.fetchTile(row, column, zoomLevel);\r\n if (tileResponse === undefined)\r\n return undefined;\r\n\r\n if (!this._hasSuccessfullyFetchedTile) {\r\n this._hasSuccessfullyFetchedTile = true;\r\n }\r\n return await this.getImageFromTileResponse(tileResponse, zoomLevel);\r\n } catch (error) {\r\n Logger.logError(loggerCategory, `Error occurred when loading tile(${row},${column},${zoomLevel}) : ${error}`);\r\n return undefined;\r\n }\r\n }\r\n\r\n protected override _generateChildIds(tile: ImageryMapTile, resolveChildren: (childIds: QuadId[]) => void) {\r\n const childIds = this.getPotentialChildIds(tile);\r\n if (tile.quadId.level < Math.max(1, this.minimumZoomLevel-1)) {\r\n resolveChildren(childIds);\r\n return;\r\n }\r\n\r\n if (this._tileMap) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this._tileMap.getChildrenAvailability(childIds).then((availability) => {\r\n const availableChildIds = new Array<QuadId>();\r\n for (let i = 0; i < availability.length; i++)\r\n if (availability[i])\r\n availableChildIds.push(childIds[i]);\r\n\r\n resolveChildren (availableChildIds);\r\n });\r\n } else if (this._usesCachedTiles && this.cartoRange) {\r\n // Filter children by range\r\n const availableChildIds = new Array<QuadId>();\r\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\r\n for (let i = 0; i < childIds.length; i++) {\r\n const childExtent = this.getEPSG4326Extent(childIds[i].row, childIds[i].column, childIds[i].level);\r\n\r\n const childRange = MapCartoRectangle.fromDegrees(childExtent.longitudeLeft, childExtent.latitudeBottom, childExtent.longitudeRight, childExtent.latitudeTop);\r\n if (childRange.intersectsRange(this.cartoRange)) {\r\n availableChildIds.push(childIds[i]);\r\n }\r\n }\r\n resolveChildren (availableChildIds);\r\n } else {\r\n resolveChildren (childIds); // Resolve all children\r\n }\r\n }\r\n\r\n public override async initialize(): Promise<void> {\r\n\r\n const metadata = await this.getServiceJson();\r\n\r\n if (metadata?.content === undefined)\r\n throw new ServerError(IModelStatus.ValidationFailed, \"\");\r\n\r\n const json = metadata.content;\r\n if (json?.error?.code === ArcGisErrorCode.TokenRequired || json?.error?.code === ArcGisErrorCode.InvalidToken) {\r\n // Check again layer status, it might have change during await.\r\n if (this.status === MapLayerImageryProviderStatus.Valid) {\r\n this.setStatus(MapLayerImageryProviderStatus.RequireAuth);\r\n return; // By returning (i.e not throwing), we ensure the tileTree get created and current provider is preserved to report status.\r\n }\r\n }\r\n\r\n this.serviceJson = json;\r\n\r\n if (json.capabilities) {\r\n const capabilities = json.capabilities.split(\",\");\r\n\r\n this._querySupported = capabilities.includes(\"Query\");\r\n this._tileMapSupported = capabilities.includes(\"Tilemap\");\r\n this._mapSupported = capabilities.includes(\"Map\");\r\n this._tilesOnly = capabilities.includes(\"TilesOnly\");\r\n }\r\n\r\n if (json.copyrightText)\r\n this._copyrightText = json.copyrightText;\r\n\r\n this._usesCachedTiles = !!json.tileInfo;\r\n\r\n if (this._usesCachedTiles) {\r\n // Only EPSG:3857 is supported with pre-rendered tiles. Fall back to 'Export' queries if possible otherwise throw.\r\n if (!ArcGisUtilities.isEpsg3857Compatible(json.tileInfo)) {\r\n if (this._mapSupported && !this._tilesOnly) {\r\n this._usesCachedTiles = false;\r\n } else {\r\n throw new ServerError(IModelStatus.ValidationFailed, \"Invalid coordinate system\");\r\n }\r\n }\r\n }\r\n\r\n if (this._usesCachedTiles) {\r\n // Read max LOD\r\n if (json.maxScale !== undefined && json.maxScale !== 0 && Array.isArray(json.tileInfo.lods)) {\r\n for (; this._maxDepthFromLod < json.tileInfo.lods.length && json.tileInfo.lods[this._maxDepthFromLod].scale > json.maxScale; this._maxDepthFromLod++)\r\n ;\r\n }\r\n\r\n // Create tile map object only if we are going to request tiles from this server and it support tilemap requests.\r\n if (this._tileMapSupported) {\r\n this._tileMap = new ArcGISTileMap(this._settings.url, this._settings, json.tileInfo?.lods?.length, this._accessClient);\r\n }\r\n }\r\n\r\n // Read range using fullextent from service metadata\r\n if (json.fullExtent) {\r\n if (json.fullExtent.spatialReference.latestWkid === 3857 || json.fullExtent.spatialReference.wkid === 102100) {\r\n const range3857 = Range2d.createFrom({\r\n low: {x: json.fullExtent.xmin, y: json.fullExtent.ymin},\r\n high: {x: json.fullExtent.xmax, y: json.fullExtent.ymax} });\r\n\r\n const west = this.getEPSG4326Lon(range3857.xLow);\r\n const south = this.getEPSG4326Lat(range3857.yLow);\r\n const east = this.getEPSG4326Lon(range3857.xHigh);\r\n const north = this.getEPSG4326Lat(range3857.yHigh);\r\n this.cartoRange = MapCartoRectangle.fromDegrees(west, south, east, north);\r\n }\r\n }\r\n\r\n // Read minLOD if available\r\n if (json.minLOD !== undefined) {\r\n const minLod = parseInt(json.minLOD, 10);\r\n if (!Number.isNaN(minLod)) {\r\n this._minDepthFromLod = minLod;\r\n }\r\n } else if (json.minScale) {\r\n // Read min LOD using minScale\r\n const minScale = json.minScale;\r\n if (json.tileInfo?.lods !== undefined && Array.isArray(json.tileInfo.lods)) {\r\n for (const lod of json.tileInfo.lods) {\r\n if (lod.scale < minScale) {\r\n this._minDepthFromLod = lod.level;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n public override addLogoCards(cards: HTMLTableElement): void {\r\n if (!cards.dataset.arcGisLogoCard) {\r\n cards.dataset.arcGisLogoCard = \"true\";\r\n cards.appendChild(IModelApp.makeLogoCard({ heading: \"ArcGIS\", notice: this._copyrightText }));\r\n }\r\n }\r\n\r\n // Translates the provided Cartographic into a EPSG:3857 point, and retrieve information.\r\n // tolerance is in pixels\r\n private async getIdentifyData(quadId: QuadId, carto: Cartographic, tolerance: number, returnGeometry?: boolean, maxAllowableOffset?: number): Promise<any> {\r\n\r\n const bbox = this.getEPSG3857Extent(quadId.row, quadId.column, quadId.level);\r\n const layerIds = new Array<string>();\r\n this._settings.subLayers.forEach((subLayer) => {\r\n if (this._settings.isSubLayerVisible(subLayer))\r\n layerIds.push(subLayer.idString);\r\n });\r\n const urlObj = ArcGISIdentifyRequestUrl.fromJSON(this._settings.url, {\r\n f: \"json\",\r\n geometry: {x: this.getEPSG3857X(carto.longitudeDegrees), y: this.getEPSG3857Y(carto.latitudeDegrees)},\r\n geometryType: \"esriGeometryPoint\",\r\n tolerance,\r\n mapExtent: {low: {x: bbox.left, y: bbox.bottom}, high: {x: bbox.right, y: bbox.top}},\r\n imageDisplay: {width: this.tileSize, height: this.tileSize, dpi: 96},\r\n layers: {prefix: \"visible\", layerIds},\r\n returnGeometry,\r\n maxAllowableOffset}, 3 /* 1mm accuracy*/);\r\n\r\n const response = await this.fetch(urlObj, { method: \"GET\" } );\r\n return response.json();\r\n }\r\n\r\n // Makes an identify request to ESRI MapService server, and return it as a list of formatted strings\r\n public override async getToolTip(strings: string[], quadId: QuadId, carto: Cartographic, tree: ImageryMapTileTree): Promise<void> {\r\n await super.getToolTip(strings, quadId, carto, tree);\r\n\r\n if (!this._querySupported)\r\n return;\r\n\r\n const stringSet = new Set<string>();\r\n const json = await this.getIdentifyData(quadId, carto, 1);\r\n\r\n if (json && Array.isArray(json.results)) {\r\n for (const result of json.results) {\r\n if (result.attributes !== undefined && result.attributes[result.displayFieldName] !== undefined) {\r\n const thisString = `${result.displayFieldName}: ${result.attributes[result.displayFieldName]}`;\r\n if (!stringSet.has(thisString)) {\r\n strings.push(thisString);\r\n stringSet.add(thisString);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Makes an identify request to ESRI MapService , and return it as a list MapLayerFeatureInfo object\r\n public override async getFeatureInfo(featureInfos: MapLayerFeatureInfo[], quadId: QuadId, carto: Cartographic, _tree: ImageryMapTileTree, hit: HitDetail): Promise<void> {\r\n if (!this._querySupported)\r\n return;\r\n\r\n const tileExtent = this.getEPSG3857Extent(quadId.row, quadId.column, quadId.level);\r\n const toleranceWorld = (tileExtent.top - tileExtent.bottom) / this.tileSize;\r\n const maxAllowableOffsetFactor = 2;\r\n const maxAllowableOffset = maxAllowableOffsetFactor*toleranceWorld;\r\n\r\n const json = await this.getIdentifyData(quadId, carto, 5, true, maxAllowableOffset);\r\n if (json && Array.isArray(json.results)) {\r\n const renderer = new ArcGisGraphicsRenderer(hit.iModel);\r\n\r\n const layerInfo: MapLayerFeatureInfo = { layerName: this._settings.name, subLayerInfos: [] };\r\n\r\n // The 'identify' service returns us a flat/unordered list of records..\r\n // results may represent features for the a common subLayer.\r\n // For simplicity, we group together features for a given sub-layer.\r\n const subLayers = new Map<string, MapSubLayerFeatureInfo> ();\r\n\r\n for (const result of json.results) {\r\n\r\n let subLayerInfo = subLayers.get(result.layerName);\r\n if (!subLayerInfo) {\r\n subLayerInfo = {\r\n subLayerName: result.layerName ?? \"\",\r\n displayFieldName: result.displayFieldName,\r\n features: [],\r\n };\r\n subLayers.set(result.layerName, subLayerInfo);\r\n }\r\n const feature: MapLayerFeature = {geometries: [], attributes: []};\r\n\r\n // Read all feature attributes\r\n for (const [key, value] of Object.entries(result.attributes)) {\r\n // Convert everything to string for now\r\n const strValue = String(value);\r\n feature.attributes.push({\r\n value: { valueFormat: PropertyValueFormat.Primitive, value: strValue, displayValue: strValue },\r\n property: { name: key, displayLabel: key, typename: StandardTypeNames.String },\r\n });\r\n }\r\n\r\n // Read feature geometries\r\n const geomReader = new ArcGisGeometryReaderJSON(result.geometryType, renderer);\r\n await geomReader.readGeometry(result.geometry);\r\n const graphics = renderer.moveGraphics();\r\n feature.geometries = graphics.map((graphic) => {\r\n return {graphic};\r\n });\r\n subLayerInfo.features.push(feature);\r\n\r\n }\r\n\r\n for ( const value of subLayers.values()) {\r\n layerInfo.subLayerInfos!.push(value);\r\n }\r\n\r\n featureInfos.push(layerInfo);\r\n }\r\n }\r\n\r\n protected getLayerString(prefix = \"show\"): string {\r\n const layers = new Array<string>();\r\n this._settings.subLayers.forEach((subLayer) => {\r\n if (this._settings.isSubLayerVisible(subLayer))\r\n layers.push(subLayer.idString);\r\n });\r\n\r\n return `${prefix}: ${layers.join(\",\")} `;\r\n }\r\n\r\n // construct the Url from the desired Tile\r\n public async constructUrl(row: number, column: number, zoomLevel: number): Promise<string> {\r\n let tmpUrl;\r\n if (this._usesCachedTiles) {\r\n tmpUrl = `${this._settings.url}/tile/${zoomLevel}/${row}/${column} `;\r\n } else {\r\n const bboxString = `${this.getEPSG3857ExtentString(row, column, zoomLevel)}&bboxSR=3857`;\r\n tmpUrl = `${this._settings.url}/export?bbox=${bboxString}&size=${this.tileSize},${this.tileSize}&layers=${this.getLayerString()}&format=png&transparent=${this.transparentBackgroundString}&f=image&sr=3857&imagesr=3857`;\r\n }\r\n return tmpUrl;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ArcGISMapLayerImageryProvider.js","sourceRoot":"","sources":["../../../../../src/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAoD,YAAY,EAAE,WAAW,E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I,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;YAC5C,IAAI,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,QAAQ,CAAC;gBAC5C,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,MAAM,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IAC3C,CAAC;IAED,0CAA0C;IACnC,KAAK,CAAC,YAAY,CAAC,GAAW,EAAE,MAAc,EAAE,SAAiB;QACtE,IAAI,MAAM,CAAC;QACX,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACzB,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,SAAS,SAAS,IAAI,GAAG,IAAI,MAAM,GAAG,CAAC;SACtE;aAAM;YACL,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;SAC3N;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\nimport { Cartographic, ImageMapLayerSettings, ImageSource, IModelStatus, ServerError } from \"@itwin/core-common\";\r\nimport { IModelApp } from \"../../../IModelApp\";\r\nimport {\r\n ArcGisErrorCode, ArcGisGeometryReaderJSON, ArcGisGraphicsRenderer, ArcGISImageryProvider, ArcGISTileMap,\r\n ArcGisUtilities,\r\n ImageryMapTile, ImageryMapTileTree, MapCartoRectangle, MapFeatureInfoOptions, MapLayerFeature, MapLayerFeatureInfo,\r\n MapLayerImageryProviderStatus, MapSubLayerFeatureInfo, QuadId,\r\n} from \"../../internal\";\r\nimport { PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\r\nimport { Point2d, Range2d, Range2dProps, XYProps } from \"@itwin/core-geometry\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { HitDetail } from \"../../../HitDetail\";\r\n\r\nconst loggerCategory = \"MapLayerImageryProvider.ArcGISMapLayerImageryProvider\";\r\n\r\n/** @internal */\r\nexport interface ArcGISIdentifyImageDisplayProps {\r\n width: number;\r\n height: number;\r\n dpi: number;\r\n}\r\n\r\n/** @internal */\r\nexport interface ArcGISIdentifyLayersProps {\r\n prefix: \"top\"|\"visible\"|\"all\";\r\n layerIds?: string[];\r\n}\r\n\r\n/** @internal */\r\nexport interface ArcGISIdentifyRequestUrlProps {\r\n /** The geometry to identify on. Point only support */\r\n geometry: XYProps;\r\n\r\n /** The type of geometry specified by the geometry parameter. Point only support */\r\n geometryType: \"esriGeometryPoint\";\r\n\r\n /** The well-known ID of the spatial reference of the input and output geometries as well as the mapExtent. */\r\n sr?: number;\r\n\r\n /** The layers to perform the identify operation on. The default value is top.\r\n * Format: [top | visible | all]:layerId1,layerId2\r\n */\r\n layers?: ArcGISIdentifyLayersProps;\r\n\r\n /** The distance in screen pixels from the specified geometry within which the identify operation should be performed.\r\n * The value for the tolerance is an integer.\r\n */\r\n tolerance: number;\r\n\r\n /** The extent or bounding box of the map currently being viewed.\r\n * Format: <xmin>, <ymin>, <xmax>, <ymax>\r\n */\r\n mapExtent: Range2dProps;\r\n\r\n /** The screen image display parameters (width, height, and DPI) of the map being currently viewed. T\r\n * Format: <width>,<height>,<dpi>\r\n */\r\n imageDisplay: ArcGISIdentifyImageDisplayProps;\r\n\r\n /** If true, the result set will include the geometries associated with each result. The default is true.\r\n */\r\n returnGeometry?: boolean;\r\n\r\n /** This option can be used to specify the maximum allowable offset to be used for generalizing geometries returned by the identify operation.\r\n * The maxAllowableOffset is in the units of the sr.\r\n */\r\n maxAllowableOffset?: number;\r\n\r\n /** The response format. The default response format is html.\r\n */\r\n f?: \"json\"|\"html\";\r\n\r\n}\r\n\r\n/** @internal */\r\nexport class ArcGISIdentifyRequestUrl {\r\n public static fromJSON(baseUrl: URL|string, json: ArcGISIdentifyRequestUrlProps, srFractionDigits?: number): URL {\r\n\r\n const newUrl = new URL(baseUrl);\r\n newUrl.pathname = `${newUrl.pathname}/identify`;\r\n\r\n if (json.f) {\r\n newUrl.searchParams.append(\"f\", json.f);\r\n }\r\n\r\n const geomPt = Point2d.fromJSON(json.geometry);\r\n newUrl.searchParams.append(\"geometry\", `${this.toFixed(geomPt.x, srFractionDigits)},${this.toFixed(geomPt.y, srFractionDigits)}`);\r\n newUrl.searchParams.append(\"geometryType\", json.geometryType);\r\n\r\n if (json.sr) {\r\n newUrl.searchParams.append(\"sr\", `${json.geometryType}`);\r\n }\r\n\r\n if (json.layers) {\r\n newUrl.searchParams.append(\"layers\", `${json.layers.prefix}${json.layers.layerIds?.length ? `: ${json.layers.layerIds.join(\",\")}` : \"\"}`);\r\n }\r\n\r\n newUrl.searchParams.append(\"tolerance\", `${json.tolerance}`);\r\n\r\n newUrl.searchParams.append(\"mapExtent\", ArcGISIdentifyRequestUrl.getExtentString(json.mapExtent, srFractionDigits));\r\n\r\n newUrl.searchParams.append(\"imageDisplay\", `${json.imageDisplay.width},${json.imageDisplay.height},${json.imageDisplay.dpi}`);\r\n\r\n if (json.returnGeometry !== undefined) {\r\n newUrl.searchParams.append(\"returnGeometry\", json.returnGeometry ? \"true\" : \"false\");\r\n }\r\n\r\n if (json.maxAllowableOffset !== undefined) {\r\n newUrl.searchParams.append(\"maxAllowableOffset\", `${this.toFixed(json.maxAllowableOffset, srFractionDigits)}`);\r\n }\r\n\r\n return newUrl;\r\n }\r\n\r\n public static toFixed(value: number, srFractionDigits?: number) {\r\n return srFractionDigits === undefined ? value.toString() : value.toFixed(srFractionDigits);\r\n }\r\n\r\n public static getExtentString(range: Range2dProps, srFractionDigits?: number) {\r\n const extent = Range2d.fromJSON(range);\r\n const extentStringArray: string[] = [];\r\n extent.toFloat64Array().forEach((value) => extentStringArray.push(this.toFixed(value, srFractionDigits)));\r\n return extentStringArray.join(\",\");\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class ArcGISMapLayerImageryProvider extends ArcGISImageryProvider {\r\n private _maxDepthFromLod = 0;\r\n private _minDepthFromLod = 0;\r\n private _copyrightText = \"Copyright\";\r\n private _tileMapSupported = false;\r\n private _mapSupported = false;\r\n private _tilesOnly = false;\r\n private _tileMap: ArcGISTileMap|undefined;\r\n\r\n public serviceJson: any;\r\n constructor(settings: ImageMapLayerSettings) {\r\n super(settings, false);\r\n this._accessClient = IModelApp.mapLayerFormatRegistry.getAccessClient(settings.formatId);\r\n }\r\n\r\n protected override get _filterByCartoRange() { return false; } // Can't trust footprint ranges (USGS Hydro)\r\n\r\n public override get minimumZoomLevel() { return Math.max(super.minimumZoomLevel, this._minDepthFromLod); }\r\n public override get maximumZoomLevel() { return this._maxDepthFromLod > 0 ? this._maxDepthFromLod : super.maximumZoomLevel; }\r\n\r\n public uintToString(uintArray: any) {\r\n return Buffer.from(uintArray).toJSON();\r\n\r\n }\r\n\r\n private async fetchTile(row: number, column: number, zoomLevel: number) {\r\n const tileUrl: string = await this.constructUrl(row, column, zoomLevel);\r\n if (tileUrl.length === 0)\r\n return undefined;\r\n return this.fetch(new URL(tileUrl), { method: \"GET\" });\r\n }\r\n\r\n public override async loadTile(row: number, column: number, zoomLevel: number): Promise<ImageSource | undefined> {\r\n if ((this.status === MapLayerImageryProviderStatus.RequireAuth)) {\r\n return undefined;\r\n }\r\n\r\n try {\r\n const tileResponse = await this.fetchTile(row, column, zoomLevel);\r\n if (tileResponse === undefined)\r\n return undefined;\r\n\r\n if (!this._hasSuccessfullyFetchedTile) {\r\n this._hasSuccessfullyFetchedTile = true;\r\n }\r\n return await this.getImageFromTileResponse(tileResponse, zoomLevel);\r\n } catch (error) {\r\n Logger.logError(loggerCategory, `Error occurred when loading tile(${row},${column},${zoomLevel}) : ${error}`);\r\n return undefined;\r\n }\r\n }\r\n\r\n protected override _generateChildIds(tile: ImageryMapTile, resolveChildren: (childIds: QuadId[]) => void) {\r\n const childIds = this.getPotentialChildIds(tile);\r\n if (tile.quadId.level < Math.max(1, this.minimumZoomLevel-1)) {\r\n resolveChildren(childIds);\r\n return;\r\n }\r\n\r\n if (this._tileMap) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this._tileMap.getChildrenAvailability(childIds).then((availability) => {\r\n const availableChildIds = new Array<QuadId>();\r\n for (let i = 0; i < availability.length; i++)\r\n if (availability[i])\r\n availableChildIds.push(childIds[i]);\r\n\r\n resolveChildren (availableChildIds);\r\n });\r\n } else if (this._usesCachedTiles && this.cartoRange) {\r\n // Filter children by range\r\n const availableChildIds = new Array<QuadId>();\r\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\r\n for (let i = 0; i < childIds.length; i++) {\r\n const childExtent = this.getEPSG4326Extent(childIds[i].row, childIds[i].column, childIds[i].level);\r\n\r\n const childRange = MapCartoRectangle.fromDegrees(childExtent.longitudeLeft, childExtent.latitudeBottom, childExtent.longitudeRight, childExtent.latitudeTop);\r\n if (childRange.intersectsRange(this.cartoRange)) {\r\n availableChildIds.push(childIds[i]);\r\n }\r\n }\r\n resolveChildren (availableChildIds);\r\n } else {\r\n resolveChildren (childIds); // Resolve all children\r\n }\r\n }\r\n\r\n public override async initialize(): Promise<void> {\r\n\r\n const metadata = await this.getServiceJson();\r\n\r\n if (metadata?.content === undefined)\r\n throw new ServerError(IModelStatus.ValidationFailed, \"\");\r\n\r\n const json = metadata.content;\r\n if (json?.error?.code === ArcGisErrorCode.TokenRequired || json?.error?.code === ArcGisErrorCode.InvalidToken) {\r\n // Check again layer status, it might have change during await.\r\n if (this.status === MapLayerImageryProviderStatus.Valid) {\r\n this.setStatus(MapLayerImageryProviderStatus.RequireAuth);\r\n return; // By returning (i.e not throwing), we ensure the tileTree get created and current provider is preserved to report status.\r\n }\r\n }\r\n\r\n this.serviceJson = json;\r\n\r\n if (json.capabilities) {\r\n const capabilities = json.capabilities.split(\",\");\r\n\r\n this._querySupported = capabilities.includes(\"Query\");\r\n this._tileMapSupported = capabilities.includes(\"Tilemap\");\r\n this._mapSupported = capabilities.includes(\"Map\");\r\n this._tilesOnly = capabilities.includes(\"TilesOnly\");\r\n }\r\n\r\n if (json.copyrightText)\r\n this._copyrightText = json.copyrightText;\r\n\r\n this._usesCachedTiles = !!json.tileInfo;\r\n\r\n if (this._usesCachedTiles) {\r\n // Only EPSG:3857 is supported with pre-rendered tiles. Fall back to 'Export' queries if possible otherwise throw.\r\n if (!ArcGisUtilities.isEpsg3857Compatible(json.tileInfo)) {\r\n if (this._mapSupported && !this._tilesOnly) {\r\n this._usesCachedTiles = false;\r\n } else {\r\n throw new ServerError(IModelStatus.ValidationFailed, \"Invalid coordinate system\");\r\n }\r\n }\r\n }\r\n\r\n if (this._usesCachedTiles) {\r\n // Read max LOD\r\n if (json.maxScale !== undefined && json.maxScale !== 0 && Array.isArray(json.tileInfo.lods)) {\r\n for (; this._maxDepthFromLod < json.tileInfo.lods.length && json.tileInfo.lods[this._maxDepthFromLod].scale > json.maxScale; this._maxDepthFromLod++)\r\n ;\r\n }\r\n\r\n // Create tile map object only if we are going to request tiles from this server and it support tilemap requests.\r\n if (this._tileMapSupported) {\r\n this._tileMap = new ArcGISTileMap(this._settings.url, this._settings, json.tileInfo?.lods?.length, this._accessClient);\r\n }\r\n }\r\n\r\n // Read range using fullextent from service metadata\r\n if (json.fullExtent) {\r\n if (json.fullExtent.spatialReference.latestWkid === 3857 || json.fullExtent.spatialReference.wkid === 102100) {\r\n const range3857 = Range2d.createFrom({\r\n low: {x: json.fullExtent.xmin, y: json.fullExtent.ymin},\r\n high: {x: json.fullExtent.xmax, y: json.fullExtent.ymax} });\r\n\r\n const west = this.getEPSG4326Lon(range3857.xLow);\r\n const south = this.getEPSG4326Lat(range3857.yLow);\r\n const east = this.getEPSG4326Lon(range3857.xHigh);\r\n const north = this.getEPSG4326Lat(range3857.yHigh);\r\n this.cartoRange = MapCartoRectangle.fromDegrees(west, south, east, north);\r\n }\r\n }\r\n\r\n // Read minLOD if available\r\n if (json.minLOD !== undefined) {\r\n const minLod = parseInt(json.minLOD, 10);\r\n if (!Number.isNaN(minLod)) {\r\n this._minDepthFromLod = minLod;\r\n }\r\n } else if (json.minScale) {\r\n // Read min LOD using minScale\r\n const minScale = json.minScale;\r\n if (json.tileInfo?.lods !== undefined && Array.isArray(json.tileInfo.lods)) {\r\n for (const lod of json.tileInfo.lods) {\r\n if (lod.scale < minScale) {\r\n this._minDepthFromLod = lod.level;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n public override addLogoCards(cards: HTMLTableElement): void {\r\n if (!cards.dataset.arcGisLogoCard) {\r\n cards.dataset.arcGisLogoCard = \"true\";\r\n cards.appendChild(IModelApp.makeLogoCard({ heading: \"ArcGIS\", notice: this._copyrightText }));\r\n }\r\n }\r\n\r\n // Translates the provided Cartographic into a EPSG:3857 point, and retrieve information.\r\n // tolerance is in pixels\r\n private async getIdentifyData(quadId: QuadId, carto: Cartographic, tolerance: number, returnGeometry?: boolean, maxAllowableOffset?: number): Promise<any> {\r\n\r\n const bbox = this.getEPSG3857Extent(quadId.row, quadId.column, quadId.level);\r\n const layerIds = new Array<string>();\r\n this._settings.subLayers.forEach((subLayer) => {\r\n if (this._settings.isSubLayerVisible(subLayer))\r\n layerIds.push(subLayer.idString);\r\n });\r\n const urlObj = ArcGISIdentifyRequestUrl.fromJSON(this._settings.url, {\r\n f: \"json\",\r\n geometry: {x: this.getEPSG3857X(carto.longitudeDegrees), y: this.getEPSG3857Y(carto.latitudeDegrees)},\r\n geometryType: \"esriGeometryPoint\",\r\n tolerance,\r\n mapExtent: {low: {x: bbox.left, y: bbox.bottom}, high: {x: bbox.right, y: bbox.top}},\r\n imageDisplay: {width: this.tileSize, height: this.tileSize, dpi: 96},\r\n layers: {prefix: \"visible\", layerIds},\r\n returnGeometry,\r\n maxAllowableOffset}, 3 /* 1mm accuracy*/);\r\n\r\n const response = await this.fetch(urlObj, { method: \"GET\" } );\r\n return response.json();\r\n }\r\n\r\n // Makes an identify request to ESRI MapService server, and return it as a list of formatted strings\r\n public override async getToolTip(strings: string[], quadId: QuadId, carto: Cartographic, tree: ImageryMapTileTree): Promise<void> {\r\n await super.getToolTip(strings, quadId, carto, tree);\r\n\r\n if (!this._querySupported)\r\n return;\r\n\r\n const stringSet = new Set<string>();\r\n const json = await this.getIdentifyData(quadId, carto, 1);\r\n\r\n if (json && Array.isArray(json.results)) {\r\n for (const result of json.results) {\r\n if (result.attributes !== undefined && result.attributes[result.displayFieldName] !== undefined) {\r\n const thisString = `${result.displayFieldName}: ${result.attributes[result.displayFieldName]}`;\r\n if (!stringSet.has(thisString)) {\r\n strings.push(thisString);\r\n stringSet.add(thisString);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Makes an identify request to ESRI MapService , and return it as a list MapLayerFeatureInfo object\r\n public override async getFeatureInfo(featureInfos: MapLayerFeatureInfo[], quadId: QuadId, carto: Cartographic, _tree: ImageryMapTileTree, hit: HitDetail, options?: MapFeatureInfoOptions): Promise<void> {\r\n if (!this._querySupported)\r\n return;\r\n\r\n const tileExtent = this.getEPSG3857Extent(quadId.row, quadId.column, quadId.level);\r\n const toleranceWorld = (tileExtent.top - tileExtent.bottom) / this.tileSize;\r\n const maxAllowableOffsetFactor = 2;\r\n const maxAllowableOffset = maxAllowableOffsetFactor*toleranceWorld;\r\n\r\n const tolerancePixel = options?.tolerance ?? 7;\r\n const json = await this.getIdentifyData(quadId, carto, tolerancePixel, true, maxAllowableOffset);\r\n if (json && Array.isArray(json.results)) {\r\n const renderer = new ArcGisGraphicsRenderer(hit.iModel);\r\n\r\n const layerInfo: MapLayerFeatureInfo = { layerName: this._settings.name, subLayerInfos: [] };\r\n\r\n // The 'identify' service returns us a flat/unordered list of records..\r\n // results may represent features for the a common subLayer.\r\n // For simplicity, we group together features for a given sub-layer.\r\n const subLayers = new Map<string, MapSubLayerFeatureInfo> ();\r\n\r\n for (const result of json.results) {\r\n\r\n let subLayerInfo = subLayers.get(result.layerName);\r\n if (!subLayerInfo) {\r\n subLayerInfo = {\r\n subLayerName: result.layerName ?? \"\",\r\n displayFieldName: result.displayFieldName,\r\n features: [],\r\n };\r\n subLayers.set(result.layerName, subLayerInfo);\r\n }\r\n const feature: MapLayerFeature = {geometries: [], attributes: []};\r\n\r\n // Read all feature attributes\r\n for (const [key, value] of Object.entries(result.attributes)) {\r\n // Convert everything to string for now\r\n const strValue = String(value);\r\n feature.attributes.push({\r\n value: { valueFormat: PropertyValueFormat.Primitive, value: strValue, displayValue: strValue },\r\n property: { name: key, displayLabel: key, typename: StandardTypeNames.String },\r\n });\r\n }\r\n\r\n // Read feature geometries\r\n const geomReader = new ArcGisGeometryReaderJSON(result.geometryType, renderer);\r\n await geomReader.readGeometry(result.geometry);\r\n const graphics = renderer.moveGraphics();\r\n feature.geometries = graphics.map((graphic) => {\r\n return {graphic};\r\n });\r\n subLayerInfo.features.push(feature);\r\n\r\n }\r\n\r\n for ( const value of subLayers.values()) {\r\n layerInfo.subLayerInfos!.push(value);\r\n }\r\n\r\n featureInfos.push(layerInfo);\r\n }\r\n }\r\n\r\n protected getLayerString(prefix = \"show\"): string {\r\n const layers = new Array<string>();\r\n this._settings.subLayers.forEach((subLayer) => {\r\n if (this._settings.isSubLayerVisible(subLayer))\r\n layers.push(subLayer.idString);\r\n });\r\n\r\n return `${prefix}: ${layers.join(\",\")} `;\r\n }\r\n\r\n // construct the Url from the desired Tile\r\n public async constructUrl(row: number, column: number, zoomLevel: number): Promise<string> {\r\n let tmpUrl;\r\n if (this._usesCachedTiles) {\r\n tmpUrl = `${this._settings.url}/tile/${zoomLevel}/${row}/${column} `;\r\n } else {\r\n const bboxString = `${this.getEPSG3857ExtentString(row, column, zoomLevel)}&bboxSR=3857`;\r\n tmpUrl = `${this._settings.url}/export?bbox=${bboxString}&size=${this.tileSize},${this.tileSize}&layers=${this.getLayerString()}&format=png&transparent=${this.transparentBackgroundString}&f=image&sr=3857&imagesr=3857`;\r\n }\r\n return tmpUrl;\r\n }\r\n}\r\n"]}
@@ -6,7 +6,7 @@ import { IModelConnection } from "../../IModelConnection";
6
6
  import { RenderMemory } from "../../render/RenderMemory";
7
7
  import { RenderSystem } from "../../render/RenderSystem";
8
8
  import { ScreenViewport } from "../../Viewport";
9
- import { MapCartoRectangle, MapLayerFeatureInfo, MapLayerImageryProvider, MapLayerTileTreeReference, MapTile, MapTileTreeScaleRangeVisibility, MapTilingScheme, QuadId, RealityTile, RealityTileLoader, RealityTileTree, RealityTileTreeParams, Tile, TileContent, TileDrawArgs, TileLoadPriority, TileParams, TileRequest, TileTreeLoadStatus, TileTreeOwner } from "../internal";
9
+ import { MapCartoRectangle, MapFeatureInfoOptions, MapLayerFeatureInfo, MapLayerImageryProvider, MapLayerTileTreeReference, MapTile, MapTileTreeScaleRangeVisibility, MapTilingScheme, QuadId, RealityTile, RealityTileLoader, RealityTileTree, RealityTileTreeParams, Tile, TileContent, TileDrawArgs, TileLoadPriority, TileParams, TileRequest, TileTreeLoadStatus, TileTreeOwner } from "../internal";
10
10
  import { HitDetail } from "../../HitDetail";
11
11
  /** @internal */
12
12
  export interface ImageryTileContent extends TileContent {
@@ -92,7 +92,7 @@ declare class ImageryTileLoader extends RealityTileLoader {
92
92
  get maximumScreenSize(): number;
93
93
  get imageryProvider(): MapLayerImageryProvider;
94
94
  getToolTip(strings: string[], quadId: QuadId, carto: Cartographic, tree: ImageryMapTileTree): Promise<void>;
95
- getMapFeatureInfo(featureInfos: MapLayerFeatureInfo[], quadId: QuadId, carto: Cartographic, tree: ImageryMapTileTree, hit: HitDetail): Promise<void>;
95
+ getMapFeatureInfo(featureInfos: MapLayerFeatureInfo[], quadId: QuadId, carto: Cartographic, tree: ImageryMapTileTree, hit: HitDetail, options?: MapFeatureInfoOptions): Promise<void>;
96
96
  generateChildIds(tile: ImageryMapTile, resolveChildren: (childIds: QuadId[]) => void): void;
97
97
  /** Load this tile's children, possibly asynchronously. Pass them to `resolve`, or an error to `reject`. */
98
98
  loadChildren(_tile: RealityTile): Promise<Tile[] | undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"ImageryTileTree.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/ImageryTileTree.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,YAAY,EAAsC,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE1I,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EACL,iBAAiB,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,OAAO,EAAE,+BAA+B,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,eAAe,EAC9M,qBAAqB,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAY,kBAAkB,EAAE,aAAa,EAE/I,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,gBAAgB;AAChB,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,cAAc,CAAC,EAAE,aAAa,CAAC;CAChC;AAED,gBAAgB;AAChB,qBAAa,cAAe,SAAQ,WA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,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3L,gBAAgB,CAAC,IAAI,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI;IAE3F,2GAA2G;IAC9F,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,EAAE,GAAG,SAAS,CAAC;IAI7D,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC;IAK/F,iBAAiB,CAAC,KAAK,EAAE,IAAI;IAKd,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,kBAAkB,CAAC;YAYtH,gBAAgB;CAU/B;AAuED;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,yBAAyB;gBACtD,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB;IAIhG,IAAoB,YAAY,YAAoB;IAEpD,gDAAgD;IAChD,IAAW,SAAS,IAAI,aAAa,CAEpC;IAEe,cAAc;IAI9B,IAAoB,eAAe,IAAI,uBAAuB,GAAG,SAAS,CAMzE;CACF"}
@@ -225,8 +225,8 @@ class ImageryTileLoader extends RealityTileLoader {
225
225
  get maximumScreenSize() { return this._imageryProvider.maximumScreenSize; }
226
226
  get imageryProvider() { return this._imageryProvider; }
227
227
  async getToolTip(strings, quadId, carto, tree) { await this._imageryProvider.getToolTip(strings, quadId, carto, tree); }
228
- async getMapFeatureInfo(featureInfos, quadId, carto, tree, hit) {
229
- await this._imageryProvider.getFeatureInfo(featureInfos, quadId, carto, tree, hit);
228
+ async getMapFeatureInfo(featureInfos, quadId, carto, tree, hit, options) {
229
+ await this._imageryProvider.getFeatureInfo(featureInfos, quadId, carto, tree, hit, options);
230
230
  }
231
231
  generateChildIds(tile, resolveChildren) { return this._imageryProvider.generateChildIds(tile, resolveChildren); }
232
232
  /** Load this tile's children, possibly asynchronously. Pass them to `resolve`, or an error to `reject`. */