@itwin/core-frontend 5.15.1 → 5.16.0-dev.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/lib/cjs/RealityDataSourceTilesetUrlImpl.d.ts +5 -2
- package/lib/cjs/RealityDataSourceTilesetUrlImpl.d.ts.map +1 -1
- package/lib/cjs/RealityDataSourceTilesetUrlImpl.js +6 -0
- package/lib/cjs/RealityDataSourceTilesetUrlImpl.js.map +1 -1
- package/lib/cjs/core-frontend.d.ts +1 -1
- package/lib/cjs/core-frontend.d.ts.map +1 -1
- package/lib/cjs/core-frontend.js +3 -2
- package/lib/cjs/core-frontend.js.map +1 -1
- package/lib/cjs/internal/RealityDataSourceGoogle3dTilesImpl.d.ts +2 -0
- package/lib/cjs/internal/RealityDataSourceGoogle3dTilesImpl.d.ts.map +1 -1
- package/lib/cjs/internal/RealityDataSourceGoogle3dTilesImpl.js +13 -4
- package/lib/cjs/internal/RealityDataSourceGoogle3dTilesImpl.js.map +1 -1
- package/lib/cjs/internal/cross-package.d.ts +1 -1
- package/lib/cjs/internal/cross-package.d.ts.map +1 -1
- package/lib/cjs/internal/cross-package.js +4 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/internal/tile/RealityTileLoader.d.ts +1 -1
- package/lib/cjs/internal/tile/RealityTileLoader.d.ts.map +1 -1
- package/lib/cjs/internal/tile/RealityTileLoader.js +5 -3
- package/lib/cjs/internal/tile/RealityTileLoader.js.map +1 -1
- package/lib/cjs/internal/tile/map/ArcGisUtilities.d.ts +15 -2
- package/lib/cjs/internal/tile/map/ArcGisUtilities.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ArcGisUtilities.js +54 -29
- package/lib/cjs/internal/tile/map/ArcGisUtilities.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISImageryProvider.d.ts +14 -0
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISImageryProvider.js +91 -45
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +5 -4
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js +8 -2
- package/lib/cjs/internal/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js +8 -2
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/MapLayerFetch.d.ts +57 -0
- package/lib/cjs/internal/tile/map/MapLayerFetch.d.ts.map +1 -0
- package/lib/cjs/internal/tile/map/MapLayerFetch.js +95 -0
- package/lib/cjs/internal/tile/map/MapLayerFetch.js.map +1 -0
- package/lib/cjs/internal/tile/map/UrlUtils.js +1 -1
- package/lib/cjs/internal/tile/map/UrlUtils.js.map +1 -1
- package/lib/cjs/internal/tile/map/WmsCapabilities.d.ts +2 -5
- package/lib/cjs/internal/tile/map/WmsCapabilities.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/WmsCapabilities.js +16 -9
- package/lib/cjs/internal/tile/map/WmsCapabilities.js.map +1 -1
- package/lib/cjs/internal/tile/map/WmsUtilities.d.ts +29 -1
- package/lib/cjs/internal/tile/map/WmsUtilities.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/WmsUtilities.js +43 -11
- package/lib/cjs/internal/tile/map/WmsUtilities.js.map +1 -1
- package/lib/cjs/internal/tile/map/WmtsCapabilities.d.ts +2 -5
- package/lib/cjs/internal/tile/map/WmtsCapabilities.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/WmtsCapabilities.js +16 -9
- package/lib/cjs/internal/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/cjs/tile/GltfReader.d.ts.map +1 -1
- package/lib/cjs/tile/GltfReader.js +3 -1
- package/lib/cjs/tile/GltfReader.js.map +1 -1
- package/lib/cjs/tile/internal.d.ts +2 -0
- package/lib/cjs/tile/internal.d.ts.map +1 -1
- package/lib/cjs/tile/internal.js +2 -0
- package/lib/cjs/tile/internal.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerFetchHandler.d.ts +94 -0
- package/lib/cjs/tile/map/MapLayerFetchHandler.d.ts.map +1 -0
- package/lib/cjs/tile/map/MapLayerFetchHandler.js +10 -0
- package/lib/cjs/tile/map/MapLayerFetchHandler.js.map +1 -0
- package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts +27 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.js +42 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryFormats.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryFormats.js +20 -4
- package/lib/cjs/tile/map/MapLayerImageryFormats.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +28 -16
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js +134 -66
- package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerSources.d.ts +19 -4
- package/lib/cjs/tile/map/MapLayerSources.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerSources.js +28 -11
- package/lib/cjs/tile/map/MapLayerSources.js.map +1 -1
- package/lib/cjs/tools/ToolAdmin.d.ts +11 -4
- package/lib/cjs/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/cjs/tools/ToolAdmin.js +28 -3
- package/lib/cjs/tools/ToolAdmin.js.map +1 -1
- package/lib/esm/RealityDataSourceTilesetUrlImpl.d.ts +5 -2
- package/lib/esm/RealityDataSourceTilesetUrlImpl.d.ts.map +1 -1
- package/lib/esm/RealityDataSourceTilesetUrlImpl.js +6 -0
- package/lib/esm/RealityDataSourceTilesetUrlImpl.js.map +1 -1
- package/lib/esm/core-frontend.d.ts +1 -1
- package/lib/esm/core-frontend.d.ts.map +1 -1
- package/lib/esm/core-frontend.js +1 -1
- package/lib/esm/core-frontend.js.map +1 -1
- package/lib/esm/internal/RealityDataSourceGoogle3dTilesImpl.d.ts +2 -0
- package/lib/esm/internal/RealityDataSourceGoogle3dTilesImpl.d.ts.map +1 -1
- package/lib/esm/internal/RealityDataSourceGoogle3dTilesImpl.js +13 -4
- package/lib/esm/internal/RealityDataSourceGoogle3dTilesImpl.js.map +1 -1
- package/lib/esm/internal/cross-package.d.ts +1 -1
- package/lib/esm/internal/cross-package.d.ts.map +1 -1
- package/lib/esm/internal/cross-package.js +1 -1
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/internal/tile/RealityTileLoader.d.ts +1 -1
- package/lib/esm/internal/tile/RealityTileLoader.d.ts.map +1 -1
- package/lib/esm/internal/tile/RealityTileLoader.js +5 -3
- package/lib/esm/internal/tile/RealityTileLoader.js.map +1 -1
- package/lib/esm/internal/tile/map/ArcGisUtilities.d.ts +15 -2
- package/lib/esm/internal/tile/map/ArcGisUtilities.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ArcGisUtilities.js +55 -30
- package/lib/esm/internal/tile/map/ArcGisUtilities.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISImageryProvider.d.ts +14 -0
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISImageryProvider.js +92 -46
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +5 -4
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/WmsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js +9 -3
- package/lib/esm/internal/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js +9 -3
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/MapLayerFetch.d.ts +57 -0
- package/lib/esm/internal/tile/map/MapLayerFetch.d.ts.map +1 -0
- package/lib/esm/internal/tile/map/MapLayerFetch.js +91 -0
- package/lib/esm/internal/tile/map/MapLayerFetch.js.map +1 -0
- package/lib/esm/internal/tile/map/UrlUtils.js +1 -1
- package/lib/esm/internal/tile/map/UrlUtils.js.map +1 -1
- package/lib/esm/internal/tile/map/WmsCapabilities.d.ts +2 -5
- package/lib/esm/internal/tile/map/WmsCapabilities.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/WmsCapabilities.js +16 -9
- package/lib/esm/internal/tile/map/WmsCapabilities.js.map +1 -1
- package/lib/esm/internal/tile/map/WmsUtilities.d.ts +29 -1
- package/lib/esm/internal/tile/map/WmsUtilities.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/WmsUtilities.js +44 -12
- package/lib/esm/internal/tile/map/WmsUtilities.js.map +1 -1
- package/lib/esm/internal/tile/map/WmtsCapabilities.d.ts +2 -5
- package/lib/esm/internal/tile/map/WmtsCapabilities.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/WmtsCapabilities.js +16 -9
- package/lib/esm/internal/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/esm/tile/GltfReader.d.ts.map +1 -1
- package/lib/esm/tile/GltfReader.js +3 -1
- package/lib/esm/tile/GltfReader.js.map +1 -1
- package/lib/esm/tile/internal.d.ts +2 -0
- package/lib/esm/tile/internal.d.ts.map +1 -1
- package/lib/esm/tile/internal.js +2 -0
- package/lib/esm/tile/internal.js.map +1 -1
- package/lib/esm/tile/map/MapLayerFetchHandler.d.ts +94 -0
- package/lib/esm/tile/map/MapLayerFetchHandler.d.ts.map +1 -0
- package/lib/esm/tile/map/MapLayerFetchHandler.js +9 -0
- package/lib/esm/tile/map/MapLayerFetchHandler.js.map +1 -0
- package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts +27 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.js +40 -0
- package/lib/esm/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryFormats.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryFormats.js +21 -5
- package/lib/esm/tile/map/MapLayerImageryFormats.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +28 -16
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js +136 -68
- package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/MapLayerSources.d.ts +19 -4
- package/lib/esm/tile/map/MapLayerSources.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerSources.js +28 -11
- package/lib/esm/tile/map/MapLayerSources.js.map +1 -1
- package/lib/esm/tools/ToolAdmin.d.ts +11 -4
- package/lib/esm/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/esm/tools/ToolAdmin.js +30 -5
- package/lib/esm/tools/ToolAdmin.js.map +1 -1
- package/package.json +21 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log - @itwin/core-frontend
|
|
2
2
|
|
|
3
|
-
This log was last generated on Mon, 09 Nov 2026 16:
|
|
3
|
+
This log was last generated on Mon, 09 Nov 2026 16:53:07 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
## 5.15.1
|
|
6
6
|
Mon, 09 Nov 2026 16:52:11 GMT
|
|
@@ -19,6 +19,8 @@ export declare class RealityDataSourceTilesetUrlImpl implements RealityDataSourc
|
|
|
19
19
|
private _baseUrl;
|
|
20
20
|
/** Need to be passed down to child tile requests when requesting from blob storage, e.g. a Cesium export from the Mesh Export Service*/
|
|
21
21
|
private _searchParams;
|
|
22
|
+
/** Origin of the root tileset URL. `_searchParams` are only forwarded to this origin. */
|
|
23
|
+
private _origin?;
|
|
22
24
|
/** Construct a new reality data source.
|
|
23
25
|
* @param props JSON representation of the reality data source
|
|
24
26
|
*/
|
|
@@ -38,7 +40,7 @@ export declare class RealityDataSourceTilesetUrlImpl implements RealityDataSourc
|
|
|
38
40
|
*/
|
|
39
41
|
get realityDataType(): string | undefined;
|
|
40
42
|
getTilesetUrl(): string | undefined;
|
|
41
|
-
|
|
43
|
+
protected setBaseUrl(url: string): void;
|
|
42
44
|
/**
|
|
43
45
|
* This method returns the URL to access the actual 3d tiles from the service provider.
|
|
44
46
|
* @returns string containing the URL to reality data.
|
|
@@ -49,8 +51,9 @@ export declare class RealityDataSourceTilesetUrlImpl implements RealityDataSourc
|
|
|
49
51
|
/** Returns the tile URL.
|
|
50
52
|
* If the tile path is a relative URL, the base URL is prepended to it.
|
|
51
53
|
* For both absolute and relative tile path URLs, the search parameters are checked. If the search params are empty, the base URL's search params are appended to the tile path.
|
|
54
|
+
* The base URL's search params (which may contain credentials such as a SAS token) are never appended to an absolute URL on a different origin.
|
|
52
55
|
*/
|
|
53
|
-
|
|
56
|
+
getTileUrl(tilePath: string): string;
|
|
54
57
|
/**
|
|
55
58
|
* Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.
|
|
56
59
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RealityDataSourceTilesetUrlImpl.d.ts","sourceRoot":"","sources":["../../src/RealityDataSourceTilesetUrlImpl.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAyB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAe,WAAW,EAA0C,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGpJ,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAGzG;;;;;;EAME;AACF,qBAAa,+BAAgC,YAAW,iBAAiB;IACvE,SAAgB,GAAG,EAAE,oBAAoB,CAAC;IAC1C,2EAA2E;IAC3E,OAAO,CAAC,WAAW,CAAqB;IACxC,sIAAsI;IACtI,OAAO,CAAC,QAAQ,CAAc;IAC9B,wIAAwI;IACxI,OAAO,CAAC,aAAa,CAAc;
|
|
1
|
+
{"version":3,"file":"RealityDataSourceTilesetUrlImpl.d.ts","sourceRoot":"","sources":["../../src/RealityDataSourceTilesetUrlImpl.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAyB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAe,WAAW,EAA0C,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGpJ,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAGzG;;;;;;EAME;AACF,qBAAa,+BAAgC,YAAW,iBAAiB;IACvE,SAAgB,G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,CAAC,yBAAyB,GAAG,SAAS,CAAC;IAQ3F;;;;;OAKG;IACU,uBAAuB,IAAI,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC;CAIlF"}
|
|
@@ -27,6 +27,8 @@ class RealityDataSourceTilesetUrlImpl {
|
|
|
27
27
|
_baseUrl = "";
|
|
28
28
|
/** Need to be passed down to child tile requests when requesting from blob storage, e.g. a Cesium export from the Mesh Export Service*/
|
|
29
29
|
_searchParams = "";
|
|
30
|
+
/** Origin of the root tileset URL. `_searchParams` are only forwarded to this origin. */
|
|
31
|
+
_origin;
|
|
30
32
|
/** Construct a new reality data source.
|
|
31
33
|
* @param props JSON representation of the reality data source
|
|
32
34
|
*/
|
|
@@ -75,6 +77,7 @@ class RealityDataSourceTilesetUrlImpl {
|
|
|
75
77
|
const urlParts = url.split("/");
|
|
76
78
|
const newUrl = new URL(url);
|
|
77
79
|
this._searchParams = newUrl.search;
|
|
80
|
+
this._origin = newUrl.origin;
|
|
78
81
|
urlParts.pop();
|
|
79
82
|
if (urlParts.length === 0)
|
|
80
83
|
this._baseUrl = "";
|
|
@@ -108,10 +111,13 @@ class RealityDataSourceTilesetUrlImpl {
|
|
|
108
111
|
/** Returns the tile URL.
|
|
109
112
|
* If the tile path is a relative URL, the base URL is prepended to it.
|
|
110
113
|
* For both absolute and relative tile path URLs, the search parameters are checked. If the search params are empty, the base URL's search params are appended to the tile path.
|
|
114
|
+
* The base URL's search params (which may contain credentials such as a SAS token) are never appended to an absolute URL on a different origin.
|
|
111
115
|
*/
|
|
112
116
|
getTileUrl(tilePath) {
|
|
113
117
|
if (this.isValidURL(tilePath)) {
|
|
114
118
|
const url = new URL(tilePath);
|
|
119
|
+
if (url.origin !== this._origin)
|
|
120
|
+
return tilePath;
|
|
115
121
|
return url.search === "" ? `${tilePath}${this._searchParams}` : tilePath;
|
|
116
122
|
}
|
|
117
123
|
return tilePath.includes("?") ? `${this._baseUrl}${tilePath}` : `${this._baseUrl}${tilePath}${this._searchParams}`;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AS,CAAC,CAAC;YAC3D,eAAe,GAAG,sCAA2B,CAAC,4BAA4B,CAAC,YAAY,CAAC,CAAC;QAC3F,CAAC;QACD,OAAO,eAAe,CAAC;IACzB,CAAC;IACD;;;;;OAKG;IACI,KAAK,CAAC,uBAAuB;QAClC,IAAI,aAA+C,CAAC;QACpD,OAAO,aAAa,CAAC;IACvB,CAAC;CACF;AAnJD,0EAmJC","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 { assert, BentleyStatus, GuidString } from \"@itwin/core-bentley\";\r\nimport { IModelError, RealityData, RealityDataFormat, RealityDataProvider, RealityDataSourceKey, RealityDataSourceProps } from \"@itwin/core-common\";\r\n\r\nimport { request } from \"./request/Request\";\r\nimport { PublisherProductInfo, RealityDataSource, SpatialLocationAndExtents } from \"./RealityDataSource\";\r\nimport { ThreeDTileFormatInterpreter } from \"./tile/internal\";\r\n\r\n/** This class provides access to the reality data provider services.\r\n * It encapsulates access to a reality data weiter it be from local access, http or ProjectWise Context Share.\r\n * The key provided at the creation determines if this is ProjectWise Context Share reference.\r\n * If not then it is considered local (ex: C:\\temp\\TileRoot.json) or plain http access (http://someserver.com/data/TileRoot.json)\r\n * There is a one to one relationship between a reality data and the instances of present class.\r\n* @internal\r\n*/\r\nexport class RealityDataSourceTilesetUrlImpl implements RealityDataSource {\r\n public readonly key: RealityDataSourceKey;\r\n /** The URL that supplies the 3d tiles for displaying the reality model. */\r\n private _tilesetUrl: string | undefined;\r\n /** For use by all Reality Data. For RD stored on PW Context Share, represents the portion from the root of the Azure Blob Container*/\r\n private _baseUrl: string = \"\";\r\n /** Need to be passed down to child tile requests when requesting from blob storage, e.g. a Cesium export from the Mesh Export Service*/\r\n private _searchParams: string = \"\";\r\n\r\n /** Construct a new reality data source.\r\n * @param props JSON representation of the reality data source\r\n */\r\n protected constructor(props: RealityDataSourceProps) {\r\n assert(props.sourceKey.provider === RealityDataProvider.TilesetUrl || props.sourceKey.provider === RealityDataProvider.OrbitGtBlob);\r\n this.key = props.sourceKey;\r\n this._tilesetUrl = this.key.id;\r\n }\r\n\r\n /**\r\n * Create an instance of this class from a source key and iTwin context/\r\n */\r\n public static async createFromKey(sourceKey: RealityDataSourceKey, _iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined> {\r\n if (sourceKey.provider !== RealityDataProvider.TilesetUrl)\r\n return undefined;\r\n const rdSource = new RealityDataSourceTilesetUrlImpl({ sourceKey });\r\n return rdSource;\r\n }\r\n\r\n public get isContextShare(): boolean {\r\n return false;\r\n }\r\n /**\r\n * Returns Reality Data if available\r\n */\r\n public get realityData(): RealityData | undefined {\r\n return undefined;\r\n }\r\n public get realityDataId(): string | undefined {\r\n return undefined;\r\n }\r\n /**\r\n * Returns Reality Data type if available\r\n */\r\n public get realityDataType(): string | undefined {\r\n return undefined;\r\n }\r\n\r\n public getTilesetUrl(): string | undefined {\r\n return this._tilesetUrl;\r\n }\r\n // This is to set the root url from the provided root document path.\r\n // If the root document is stored on PW Context Share then the root document property of the Reality Data is provided,\r\n // otherwise the full path to root document is given.\r\n // The base URL contains the base URL from which tile relative path are constructed.\r\n // The tile's path root will need to be reinserted for child tiles to return a 200\r\n // If the original root tileset url includes search paramaters, they are stored in _searchParams to be reinserted into child tile requests.\r\n private setBaseUrl(url: string): void {\r\n const urlParts = url.split(\"/\");\r\n const newUrl = new URL(url);\r\n this._searchParams = newUrl.search;\r\n urlParts.pop();\r\n if (urlParts.length === 0)\r\n this._baseUrl = \"\";\r\n else\r\n this._baseUrl = `${urlParts.join(\"/\")}/`;\r\n }\r\n\r\n /**\r\n * This method returns the URL to access the actual 3d tiles from the service provider.\r\n * @returns string containing the URL to reality data.\r\n */\r\n public async getServiceUrl(_iTwinId: GuidString | undefined): Promise<string | undefined> {\r\n return this._tilesetUrl;\r\n }\r\n\r\n public async getRootDocument(iTwinId: GuidString | undefined): Promise<any> {\r\n const url = await this.getServiceUrl(iTwinId);\r\n if (!url)\r\n throw new IModelError(BentleyStatus.ERROR, \"Unable to get service url\");\r\n\r\n // The following is only if the reality data is not stored on PW Context Share.\r\n this.setBaseUrl(url);\r\n return request(url, \"json\");\r\n }\r\n\r\n private isValidURL(url: string){\r\n try {\r\n new URL(url);\r\n } catch {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n /** Returns the tile URL.\r\n * If the tile path is a relative URL, the base URL is prepended to it.\r\n * For both absolute and relative tile path URLs, the search parameters are checked. If the search params are empty, the base URL's search params are appended to the tile path.\r\n */\r\n private getTileUrl(tilePath: string){\r\n if (this.isValidURL(tilePath)) {\r\n const url = new URL(tilePath);\r\n return url.search === \"\" ? `${tilePath}${this._searchParams}` : tilePath;\r\n }\r\n return tilePath.includes(\"?\") ? `${this._baseUrl}${tilePath}` : `${this._baseUrl}${tilePath}${this._searchParams}`;\r\n }\r\n\r\n /**\r\n * Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileContent(name: string): Promise<ArrayBuffer> {\r\n return request(this.getTileUrl(name), \"arraybuffer\");\r\n }\r\n\r\n /**\r\n * Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileJson(name: string): Promise<any> {\r\n return request(this.getTileUrl(name), \"json\");\r\n }\r\n\r\n public getTileContentType(url: string): \"tile\" | \"tileset\" {\r\n return new URL(url, \"https://localhost/\").pathname.toLowerCase().endsWith(\"json\") ? \"tileset\" : \"tile\";\r\n }\r\n\r\n /**\r\n * Gets spatial location and extents of this reality data source\r\n * @returns spatial location and extents\r\n * @internal\r\n */\r\n public async getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined> {\r\n let spatialLocation: SpatialLocationAndExtents | undefined;\r\n if (this.key.format === RealityDataFormat.ThreeDTile) {\r\n const rootDocument = await this.getRootDocument(undefined);\r\n spatialLocation = ThreeDTileFormatInterpreter.getSpatialLocationAndExtents(rootDocument);\r\n }\r\n return spatialLocation;\r\n }\r\n /**\r\n * Gets information to identify the product and engine that create this reality data\r\n * Will return undefined if cannot be resolved\r\n * @returns information to identify the product and engine that create this reality data\r\n * @alpha\r\n */\r\n public async getPublisherProductInfo(): Promise<PublisherProductInfo | undefined> {\r\n let publisherInfo: PublisherProductInfo | undefined;\r\n return publisherInfo;\r\n }\r\n}\r\n\r\n"]}
|
|
1
|
+
{"version":3,"file":"RealityDataSourceTilesetUrlImpl.js","sourceRoot":"","sources":["../../src/RealityDataSourceTilesetUrlImpl.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAAwE;AACxE,oDAAoJ;AAEpJ,+CAA4C;AAE5C,8CAA8D;AAE9D;;;;;;EAME;AACF,MAAa,+BAA+B;IAC1B,GAAG,CAAuB;IAC1C,2EAA2E;IACnE,WAAW,CAAqB;IACxC,sIAAsI;IAC9H,QAAQ,GAAW,EAAE,CAAC;IAC9B,wIAAwI;IAChI,aAAa,GAAW,EAAE,CAAC;IACnC,yFAAyF;IACjF,OAAO,CAAU;IAEzB;;OAEG;IACH,YAAsB,KAA6B;QACjD,IAAA,qBAAM,EAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,KAAK,iCAAmB,CAAC,UAAU,IAAI,KAAK,CAAC,SAAS,CAAC,QAAQ,KAAK,iCAAmB,CAAC,WAAW,CAAC,CAAC;QACpI,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,SAA+B,EAAE,QAAgC;QACjG,IAAI,SAAS,CAAC,QAAQ,KAAK,iCAAmB,CAAC,UAAU;YACvD,OAAO,SAAS,CAAC;QACnB,MAAM,QAAQ,GAAG,I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AE,MAAM,CAAC,CAAC;IAChD,CAAC;IAEM,kBAAkB,CAAC,GAAW;QACnC,OAAO,IAAI,GAAG,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IACzG,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,4BAA4B;QACvC,IAAI,eAAsD,CAAC;QAC3D,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,+BAAiB,CAAC,UAAU,EAAE,CAAC;YACrD,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;YAC3D,eAAe,GAAG,sCAA2B,CAAC,4BAA4B,CAAC,YAAY,CAAC,CAAC;QAC3F,CAAC;QACD,OAAO,eAAe,CAAC;IACzB,CAAC;IACD;;;;;OAKG;IACI,KAAK,CAAC,uBAAuB;QAClC,IAAI,aAA+C,CAAC;QACpD,OAAO,aAAa,CAAC;IACvB,CAAC;CACF;AA1JD,0EA0JC","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 { assert, BentleyStatus, GuidString } from \"@itwin/core-bentley\";\r\nimport { IModelError, RealityData, RealityDataFormat, RealityDataProvider, RealityDataSourceKey, RealityDataSourceProps } from \"@itwin/core-common\";\r\n\r\nimport { request } from \"./request/Request\";\r\nimport { PublisherProductInfo, RealityDataSource, SpatialLocationAndExtents } from \"./RealityDataSource\";\r\nimport { ThreeDTileFormatInterpreter } from \"./tile/internal\";\r\n\r\n/** This class provides access to the reality data provider services.\r\n * It encapsulates access to a reality data weiter it be from local access, http or ProjectWise Context Share.\r\n * The key provided at the creation determines if this is ProjectWise Context Share reference.\r\n * If not then it is considered local (ex: C:\\temp\\TileRoot.json) or plain http access (http://someserver.com/data/TileRoot.json)\r\n * There is a one to one relationship between a reality data and the instances of present class.\r\n* @internal\r\n*/\r\nexport class RealityDataSourceTilesetUrlImpl implements RealityDataSource {\r\n public readonly key: RealityDataSourceKey;\r\n /** The URL that supplies the 3d tiles for displaying the reality model. */\r\n private _tilesetUrl: string | undefined;\r\n /** For use by all Reality Data. For RD stored on PW Context Share, represents the portion from the root of the Azure Blob Container*/\r\n private _baseUrl: string = \"\";\r\n /** Need to be passed down to child tile requests when requesting from blob storage, e.g. a Cesium export from the Mesh Export Service*/\r\n private _searchParams: string = \"\";\r\n /** Origin of the root tileset URL. `_searchParams` are only forwarded to this origin. */\r\n private _origin?: string;\r\n\r\n /** Construct a new reality data source.\r\n * @param props JSON representation of the reality data source\r\n */\r\n protected constructor(props: RealityDataSourceProps) {\r\n assert(props.sourceKey.provider === RealityDataProvider.TilesetUrl || props.sourceKey.provider === RealityDataProvider.OrbitGtBlob);\r\n this.key = props.sourceKey;\r\n this._tilesetUrl = this.key.id;\r\n }\r\n\r\n /**\r\n * Create an instance of this class from a source key and iTwin context/\r\n */\r\n public static async createFromKey(sourceKey: RealityDataSourceKey, _iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined> {\r\n if (sourceKey.provider !== RealityDataProvider.TilesetUrl)\r\n return undefined;\r\n const rdSource = new RealityDataSourceTilesetUrlImpl({ sourceKey });\r\n return rdSource;\r\n }\r\n\r\n public get isContextShare(): boolean {\r\n return false;\r\n }\r\n /**\r\n * Returns Reality Data if available\r\n */\r\n public get realityData(): RealityData | undefined {\r\n return undefined;\r\n }\r\n public get realityDataId(): string | undefined {\r\n return undefined;\r\n }\r\n /**\r\n * Returns Reality Data type if available\r\n */\r\n public get realityDataType(): string | undefined {\r\n return undefined;\r\n }\r\n\r\n public getTilesetUrl(): string | undefined {\r\n return this._tilesetUrl;\r\n }\r\n // This is to set the root url from the provided root document path.\r\n // If the root document is stored on PW Context Share then the root document property of the Reality Data is provided,\r\n // otherwise the full path to root document is given.\r\n // The base URL contains the base URL from which tile relative path are constructed.\r\n // The tile's path root will need to be reinserted for child tiles to return a 200\r\n // If the original root tileset url includes search paramaters, they are stored in _searchParams to be reinserted into child tile requests.\r\n protected setBaseUrl(url: string): void {\r\n const urlParts = url.split(\"/\");\r\n const newUrl = new URL(url);\r\n this._searchParams = newUrl.search;\r\n this._origin = newUrl.origin;\r\n urlParts.pop();\r\n if (urlParts.length === 0)\r\n this._baseUrl = \"\";\r\n else\r\n this._baseUrl = `${urlParts.join(\"/\")}/`;\r\n }\r\n\r\n /**\r\n * This method returns the URL to access the actual 3d tiles from the service provider.\r\n * @returns string containing the URL to reality data.\r\n */\r\n public async getServiceUrl(_iTwinId: GuidString | undefined): Promise<string | undefined> {\r\n return this._tilesetUrl;\r\n }\r\n\r\n public async getRootDocument(iTwinId: GuidString | undefined): Promise<any> {\r\n const url = await this.getServiceUrl(iTwinId);\r\n if (!url)\r\n throw new IModelError(BentleyStatus.ERROR, \"Unable to get service url\");\r\n\r\n // The following is only if the reality data is not stored on PW Context Share.\r\n this.setBaseUrl(url);\r\n return request(url, \"json\");\r\n }\r\n\r\n private isValidURL(url: string){\r\n try {\r\n new URL(url);\r\n } catch {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n /** Returns the tile URL.\r\n * If the tile path is a relative URL, the base URL is prepended to it.\r\n * For both absolute and relative tile path URLs, the search parameters are checked. If the search params are empty, the base URL's search params are appended to the tile path.\r\n * The base URL's search params (which may contain credentials such as a SAS token) are never appended to an absolute URL on a different origin.\r\n */\r\n public getTileUrl(tilePath: string){\r\n if (this.isValidURL(tilePath)) {\r\n const url = new URL(tilePath);\r\n if (url.origin !== this._origin)\r\n return tilePath;\r\n\r\n return url.search === \"\" ? `${tilePath}${this._searchParams}` : tilePath;\r\n }\r\n return tilePath.includes(\"?\") ? `${this._baseUrl}${tilePath}` : `${this._baseUrl}${tilePath}${this._searchParams}`;\r\n }\r\n\r\n /**\r\n * Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileContent(name: string): Promise<ArrayBuffer> {\r\n return request(this.getTileUrl(name), \"arraybuffer\");\r\n }\r\n\r\n /**\r\n * Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileJson(name: string): Promise<any> {\r\n return request(this.getTileUrl(name), \"json\");\r\n }\r\n\r\n public getTileContentType(url: string): \"tile\" | \"tileset\" {\r\n return new URL(url, \"https://localhost/\").pathname.toLowerCase().endsWith(\"json\") ? \"tileset\" : \"tile\";\r\n }\r\n\r\n /**\r\n * Gets spatial location and extents of this reality data source\r\n * @returns spatial location and extents\r\n * @internal\r\n */\r\n public async getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined> {\r\n let spatialLocation: SpatialLocationAndExtents | undefined;\r\n if (this.key.format === RealityDataFormat.ThreeDTile) {\r\n const rootDocument = await this.getRootDocument(undefined);\r\n spatialLocation = ThreeDTileFormatInterpreter.getSpatialLocationAndExtents(rootDocument);\r\n }\r\n return spatialLocation;\r\n }\r\n /**\r\n * Gets information to identify the product and engine that create this reality data\r\n * Will return undefined if cannot be resolved\r\n * @returns information to identify the product and engine that create this reality data\r\n * @alpha\r\n */\r\n public async getPublisherProductInfo(): Promise<PublisherProductInfo | undefined> {\r\n let publisherInfo: PublisherProductInfo | undefined;\r\n return publisherInfo;\r\n }\r\n}\r\n\r\n"]}
|
|
@@ -106,7 +106,7 @@ export type { TxnEntityChange, TxnEntityChangeIterable, TxnEntityChangeType, Txn
|
|
|
106
106
|
* @deprecated in 5.13.0 - will not be removed until after 2027-09-03. Use [TxnEntityMetadata]($common) from @itwin/core-common instead.
|
|
107
107
|
*/
|
|
108
108
|
export type TxnEntityMetadata = _TxnEntityMetadata;
|
|
109
|
-
export { type TileTreeDiscloser, DisclosedTileTreeSet, type ReadGltfGraphicsArgs, type GltfGraphic, type GltfTemplate, readGltfGraphics, readGltfTemplate, readGltf, readElementGraphics, type BatchTableProperties, RealityTileTree, type RealityTileGeometry, RealityTile, type RenderGraphicTileTreeArgs, type GpuMemoryLimit, type GpuMemoryLimits, TileAdmin, type TileContent, type TiledGraphicsProvider, type TileDrawArgParams, TileDrawArgs, type CollectTileStatus, type TileGeometryCollectorOptions, TileGeometryCollector, type GeometryTileTreeReference, type GeometryTileTreeReferenceOptions, type TileParams, TileRequestChannels, type TileContentDecodingStatistics, TileRequestChannelStatistics, TileRequestChannel, TileRequest, type TileTreeOwner, type TileTreeParams, TileGraphicType, TileTreeReference, type TileTreeSupplier, TileTreeLoadStatus, TileTree, Tile, TileLoadStatus, TileVisibility, TileLoadPriority, TileBoundingBoxes, TileUsageMarker, TileUser, BingElevationProvider, QuadId, type QuadIdProps, MapTilingScheme, GeographicTilingScheme, WebMercatorProjection, WebMercatorTilingScheme, type MapLayerIndex, MapTileProjection, MapTile, MapLayerTileTreeReference, MapLayerSourceStatus, type MapLayerSourceProps, MapLayerSource, MapLayerSources, MapLayerImageryProviderStatus, MapLayerImageryProvider, ImageryMapLayerFormat, MapLayerFormat, type ValidateSourceArgs, type MapLayerFormatType, type MapLayerSourceValidation, type MapLayerOptions, MapLayerFormatRegistry, type MapLayerTokenEndpoint, type MapLayerAuthenticationInfo, type MapLayerAccessToken, type MapLayerAccessTokenParams, type MapLayerAccessClient, type MapFeatureInfoOptions, MapFeatureInfoRecord, type MapFeatureInfo, type MapLayerFeatureInfo, type MapSubLayerFeatureInfo, type MapLayerFeature, type MapLayerFeatureGeometry, type MapLayerFeatureAttribute, MapLayerFeatureRecord, MapCartoRectangle, ImageryMapLayerTreeReference, EllipsoidTerrainProvider, getCesiumAssetUrl, MapTileTreeScaleRangeVisibility, MapTileTree, type TerrainMeshProviderOptions, type RequestMeshDataArgs, type ReadMeshArgs, TerrainMeshProvider, type TerrainProvider, TerrainProviderRegistry, } from "./tile/internal";
|
|
109
|
+
export { type TileTreeDiscloser, DisclosedTileTreeSet, type ReadGltfGraphicsArgs, type GltfGraphic, type GltfTemplate, readGltfGraphics, readGltfTemplate, readGltf, readElementGraphics, type BatchTableProperties, RealityTileTree, type RealityTileGeometry, RealityTile, type RenderGraphicTileTreeArgs, type GpuMemoryLimit, type GpuMemoryLimits, TileAdmin, type TileContent, type TiledGraphicsProvider, type TileDrawArgParams, TileDrawArgs, type CollectTileStatus, type TileGeometryCollectorOptions, TileGeometryCollector, type GeometryTileTreeReference, type GeometryTileTreeReferenceOptions, type TileParams, TileRequestChannels, type TileContentDecodingStatistics, TileRequestChannelStatistics, TileRequestChannel, TileRequest, type TileTreeOwner, type TileTreeParams, TileGraphicType, TileTreeReference, type TileTreeSupplier, TileTreeLoadStatus, TileTree, Tile, TileLoadStatus, TileVisibility, TileLoadPriority, TileBoundingBoxes, TileUsageMarker, TileUser, BingElevationProvider, QuadId, type QuadIdProps, MapTilingScheme, GeographicTilingScheme, WebMercatorProjection, WebMercatorTilingScheme, type MapLayerIndex, MapTileProjection, MapTile, MapLayerTileTreeReference, MapLayerSourceStatus, type MapLayerSourceProps, MapLayerSource, MapLayerSources, MapLayerImageryProviderStatus, MapLayerImageryProvider, ImageryMapLayerFormat, MapLayerFormat, type ValidateSourceArgs, type MapLayerFormatType, type MapLayerSourceValidation, type MapLayerOptions, MapLayerFormatRegistry, MapLayerAuthenticationFailedError, type MapLayerTokenEndpoint, type MapLayerAuthenticationInfo, type MapLayerAccessToken, type MapLayerAccessTokenParams, type MapLayerAccessClient, type MapLayerRequest, type MapLayerFetchRequest, type MapLayerFetchHandler, type MapFeatureInfoOptions, MapFeatureInfoRecord, type MapFeatureInfo, type MapLayerFeatureInfo, type MapSubLayerFeatureInfo, type MapLayerFeature, type MapLayerFeatureGeometry, type MapLayerFeatureAttribute, MapLayerFeatureRecord, MapCartoRectangle, ImageryMapLayerTreeReference, EllipsoidTerrainProvider, getCesiumAssetUrl, MapTileTreeScaleRangeVisibility, MapTileTree, type TerrainMeshProviderOptions, type RequestMeshDataArgs, type ReadMeshArgs, TerrainMeshProvider, type TerrainProvider, TerrainProviderRegistry, } from "./tile/internal";
|
|
110
110
|
export * from "./tools/AccuDrawTool";
|
|
111
111
|
export * from "./tools/AccuDrawViewportUI";
|
|
112
112
|
export * from "./tools/ClipViewTool";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-frontend.d.ts","sourceRoot":"","sources":["../../src/core-frontend.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,IAAI,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAElF,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;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AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;EAGE"}
|
package/lib/cjs/core-frontend.js
CHANGED
|
@@ -18,8 +18,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
18
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.
|
|
22
|
-
exports.TerrainProviderRegistry = exports.TerrainMeshProvider = void 0;
|
|
21
|
+
exports.MapTileTreeScaleRangeVisibility = exports.getCesiumAssetUrl = exports.EllipsoidTerrainProvider = exports.ImageryMapLayerTreeReference = exports.MapCartoRectangle = exports.MapLayerFeatureRecord = exports.MapFeatureInfoRecord = exports.MapLayerAuthenticationFailedError = exports.MapLayerFormatRegistry = exports.MapLayerFormat = exports.ImageryMapLayerFormat = exports.MapLayerImageryProvider = exports.MapLayerImageryProviderStatus = exports.MapLayerSources = exports.MapLayerSource = exports.MapLayerSourceStatus = exports.MapLayerTileTreeReference = exports.MapTile = exports.MapTileProjection = exports.WebMercatorTilingScheme = exports.WebMercatorProjection = exports.GeographicTilingScheme = exports.MapTilingScheme = exports.QuadId = exports.BingElevationProvider = exports.TileUser = exports.TileUsageMarker = exports.TileBoundingBoxes = exports.TileLoadPriority = exports.TileVisibility = exports.TileLoadStatus = exports.Tile = exports.TileTree = exports.TileTreeLoadStatus = exports.TileTreeReference = exports.TileGraphicType = exports.TileRequest = exports.TileRequestChannel = exports.TileRequestChannelStatistics = exports.TileRequestChannels = exports.TileGeometryCollector = exports.TileDrawArgs = exports.TileAdmin = exports.RealityTile = exports.RealityTileTree = exports.readElementGraphics = exports.readGltf = exports.readGltfTemplate = exports.readGltfGraphics = exports.DisclosedTileTreeSet = void 0;
|
|
22
|
+
exports.TerrainProviderRegistry = exports.TerrainMeshProvider = exports.MapTileTree = void 0;
|
|
23
23
|
__exportStar(require("./AccuDraw"), exports);
|
|
24
24
|
__exportStar(require("./AccuSnap"), exports);
|
|
25
25
|
__exportStar(require("./AuxCoordSys"), exports);
|
|
@@ -165,6 +165,7 @@ Object.defineProperty(exports, "MapLayerImageryProvider", { enumerable: true, ge
|
|
|
165
165
|
Object.defineProperty(exports, "ImageryMapLayerFormat", { enumerable: true, get: function () { return internal_1.ImageryMapLayerFormat; } });
|
|
166
166
|
Object.defineProperty(exports, "MapLayerFormat", { enumerable: true, get: function () { return internal_1.MapLayerFormat; } });
|
|
167
167
|
Object.defineProperty(exports, "MapLayerFormatRegistry", { enumerable: true, get: function () { return internal_1.MapLayerFormatRegistry; } });
|
|
168
|
+
Object.defineProperty(exports, "MapLayerAuthenticationFailedError", { enumerable: true, get: function () { return internal_1.MapLayerAuthenticationFailedError; } });
|
|
168
169
|
Object.defineProperty(exports, "MapFeatureInfoRecord", { enumerable: true, get: function () { return internal_1.MapFeatureInfoRecord; } });
|
|
169
170
|
Object.defineProperty(exports, "MapLayerFeatureRecord", { enumerable: true, get: function () { return internal_1.MapLayerFeatureRecord; } });
|
|
170
171
|
Object.defineProperty(exports, "MapCartoRectangle", { enumerable: true, get: function () { return internal_1.MapCartoRectangle; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-frontend.js","sourceRoot":"","sources":["../../src/core-frontend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;;AAI/F,6CAA2B;AAC3B,6CAA2B;AAC3B,gDAA8B;AAC9B,iDAA+B;AAC/B,wDAAsC;AACtC,iDAA+B;AAC/B,kDAAgC;AAChC,sDAAoC;AACpC,0DAAwC;AACxC,uDAAqC;AACrC,gDAA8B;AAC9B,yDAAuC;AACvC,2CAAyB;AACzB,6DAA2C;AAC3C,gDAA8B;AAC9B,qDAAmC;A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AiK,iHAAA,qBAAqB,OAAA;AACtO,6GAAA,iBAAiB,OAAA;AACjB,wHAAA,4BAA4B,OAAA;AAC5B,oHAAA,wBAAwB,OAAA;AACxB,6GAAA,iBAAiB,OAAA;AACjB,2HAAA,+BAA+B,OAAA;AAAE,uGAAA,WAAW,OAAA;AACkC,+GAAA,mBAAmB,OAAA;AAC3E,mHAAA,uBAAuB,OAAA;AAE/C,uDAAqC;AACrC,6DAA2C;AAC3C,uDAAqC;AACrC,0DAAwC;AACxC,yDAAuC;AACvC,0DAAwC;AACxC,mDAAiC;AACjC,sDAAoC;AACpC,wDAAsC;AACtC,qDAAmC;AACnC,2DAAyC;AACzC,+CAA6B;AAC7B,uDAAqC;AACrC,oDAAkC;AAClC,yDAAuC;AACvC,mDAAiC;AACjC,2DAAyC;AACzC,0DAAwC;AACxC,kDAAgC;AAChC,kDAAgC;AAChC,oDAAkC;AAClC,kDAAgC;AAChC,sDAAoC;AAEpC,2DAAyC;AAEzC,sGAAsG;AACtG,wCAAsC;AAEtC;;GAEG;AAEH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;EAGE","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\r\nimport type { TxnEntityMetadata as _TxnEntityMetadata } from \"@itwin/core-common\";\r\n\r\nexport * from \"./AccuDraw\";\r\nexport * from \"./AccuSnap\";\r\nexport * from \"./AuxCoordSys\";\r\nexport * from \"./BingLocation\";\r\nexport * from \"./BriefcaseConnection\";\r\nexport * from \"./GeoProviders\";\r\nexport * from \"./BriefcaseTxns\";\r\nexport * from \"./CatalogConnection\";\r\nexport * from \"./CategorySelectorState\";\r\nexport * from \"./CesiumAccessClient\";\r\nexport * from \"./ChangeFlags\";\r\nexport * from \"./CheckpointConnection\";\r\nexport * from \"./common\";\r\nexport * from \"./ContextRealityModelState\";\r\nexport * from \"./CoordSystem\";\r\nexport * from \"./DecorationsCache\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./DisplayStyleState\";\r\nexport * from \"./DrawingViewState\";\r\nexport * from \"./ElementLocateManager\";\r\nexport * from \"./EmphasizeElements\";\r\nexport * from \"./EntityState\";\r\nexport * from \"./EnvironmentDecorations\";\r\nexport * from \"./FeatureOverrideProvider\";\r\nexport * from \"./FlashSettings\";\r\nexport * from \"./FrontendHubAccess\";\r\nexport * from \"./Frustum2d\";\r\nexport * from \"./FrustumAnimator\";\r\nexport * from \"./FuzzySearch\";\r\nexport * from \"./GeoServices\";\r\nexport * from \"./GlobeAnimator\";\r\nexport * from \"./GraphicalEditingScope\";\r\nexport * from \"./HitDetail\";\r\nexport * from \"./IModelApp\";\r\nexport * from \"./IModelConnection\";\r\nexport * from \"./IModelRoutingContext\";\r\nexport * from \"./IpcApp\";\r\nexport * from \"./LinePlaneIntersect\";\r\nexport * from \"./MarginPercent\";\r\nexport * from \"./Marker\";\r\nexport * from \"./ModelSelectorState\";\r\nexport * from \"./ModelState\";\r\nexport * from \"./NativeApp\";\r\nexport * from \"./NativeAppLogger\";\r\nexport * from \"./NoRenderApp\";\r\nexport * from \"./NotificationManager\";\r\nexport * from \"./PerModelCategoryVisibility\";\r\nexport * from \"./PlanarClipMaskState\";\r\nexport * from \"./SelectionSet\";\r\nexport * from \"./SheetViewState\";\r\nexport * from \"./SpatialClassifiersState\";\r\nexport * from \"./SpatialViewState\";\r\nexport * from \"./Sprites\";\r\nexport * from \"./StandardView\";\r\nexport * from \"./SubCategoriesCache\";\r\nexport * from \"./TentativePoint\";\r\nexport * from \"./Tiles\";\r\nexport * from \"./UserPreferences\";\r\nexport * from \"./ViewAnimation\";\r\nexport * from \"./ViewContext\";\r\nexport * from \"./ViewGlobalLocation\";\r\nexport * from \"./ViewingSpace\";\r\nexport * from \"./ViewManager\";\r\nexport * from \"./Viewport\";\r\nexport * from \"./ViewportSync\";\r\nexport * from \"./ViewPose\";\r\nexport * from \"./ViewState\";\r\nexport * from \"./ViewStatus\";\r\nexport * from \"./extension/Extension\";\r\nexport * from \"./extension/providers/LocalExtensionProvider\";\r\nexport * from \"./extension/providers/RemoteExtensionProvider\";\r\nexport * from \"./properties/AngleDescription\";\r\nexport * from \"./properties/FormattedQuantityDescription\";\r\nexport * from \"./properties/LengthDescription\";\r\nexport * from \"./quantity-formatting/QuantityFormatter\";\r\nexport * from \"./quantity-formatting/BaseUnitFormattingSettingsProvider\";\r\nexport * from \"./quantity-formatting/LocalUnitFormatProvider\";\r\nexport * from \"./quantity-formatting/QuantityTypesEditorSpecs\";\r\nexport * from \"./render/CanvasDecoration\";\r\nexport * from \"./render/CreateRenderMaterialArgs\";\r\nexport * from \"./render/CreateTextureArgs\";\r\nexport * from \"./render/Decorations\";\r\nexport * from \"./render/FeatureSymbology\";\r\nexport * from \"./render/FrameStats\";\r\nexport * from \"./render/GraphicBranch\";\r\nexport * from \"./render/GraphicBuilder\";\r\nexport * from \"./render/GraphicTemplate\";\r\nexport * from \"./render/MeshArgs\";\r\nexport * from \"./render/ParticleCollectionBuilder\";\r\nexport * from \"./render/Pixel\";\r\nexport * from \"./render/PolylineArgs\";\r\nexport * from \"./render/RealityMeshParams\";\r\nexport * from \"./render/RenderClipVolume\";\r\nexport * from \"./render/RenderGraphic\";\r\nexport * from \"./render/RenderMemory\";\r\nexport * from \"./render/RenderSystem\";\r\nexport * from \"./render/RenderTarget\";\r\nexport * from \"./render/Scene\";\r\nexport * from \"./render/ScreenSpaceEffectBuilder\";\r\nexport * from \"./render/VisibleFeature\";\r\nexport * from \"./internal/render/webgl/IModelFrameLifecycle\";\r\nexport type {\r\n TxnEntityChange,\r\n TxnEntityChangeIterable,\r\n TxnEntityChangeType,\r\n TxnEntityChanges,\r\n TxnEntityChangesFilterOptions,\r\n TxnEntityMetadataCriterion,\r\n} from \"./TxnEntityChanges\";\r\n/** Deprecated frontend alias for the common TxnEntityMetadata interface.\r\n * @public\r\n * @deprecated in 5.13.0 - will not be removed until after 2027-09-03. Use [TxnEntityMetadata]($common) from @itwin/core-common instead.\r\n */\r\nexport type TxnEntityMetadata = _TxnEntityMetadata;\r\nexport {\r\n type TileTreeDiscloser, DisclosedTileTreeSet,\r\n type ReadGltfGraphicsArgs, type GltfGraphic, type GltfTemplate, readGltfGraphics, readGltfTemplate, readGltf,\r\n readElementGraphics,\r\n type BatchTableProperties, RealityTileTree,\r\n type RealityTileGeometry, RealityTile,\r\n type RenderGraphicTileTreeArgs,\r\n type GpuMemoryLimit, type GpuMemoryLimits, TileAdmin,\r\n type TileContent,\r\n type TiledGraphicsProvider,\r\n type TileDrawArgParams, TileDrawArgs,\r\n type CollectTileStatus, type TileGeometryCollectorOptions, TileGeometryCollector, type GeometryTileTreeReference,\r\n type GeometryTileTreeReferenceOptions,\r\n type TileParams,\r\n TileRequestChannels,\r\n type TileContentDecodingStatistics, TileRequestChannelStatistics, TileRequestChannel,\r\n TileRequest,\r\n type TileTreeOwner,\r\n type TileTreeParams,\r\n TileGraphicType, TileTreeReference,\r\n type TileTreeSupplier,\r\n TileTreeLoadStatus, TileTree,\r\n Tile, TileLoadStatus, TileVisibility, TileLoadPriority, TileBoundingBoxes,\r\n TileUsageMarker,\r\n TileUser,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n BingElevationProvider,\r\n QuadId, type QuadIdProps,\r\n MapTilingScheme, GeographicTilingScheme, WebMercatorProjection, WebMercatorTilingScheme,\r\n type MapLayerIndex,\r\n MapTileProjection, MapTile,\r\n MapLayerTileTreeReference,\r\n MapLayerSourceStatus, type MapLayerSourceProps, MapLayerSource, MapLayerSources,\r\n MapLayerImageryProviderStatus, MapLayerImageryProvider,\r\n ImageryMapLayerFormat,\r\n MapLayerFormat, type ValidateSourceArgs, type MapLayerFormatType, type MapLayerSourceValidation, type MapLayerOptions, MapLayerFormatRegistry,\r\n type MapLayerTokenEndpoint, type MapLayerAuthenticationInfo, type MapLayerAccessToken, type MapLayerAccessTokenParams, type MapLayerAccessClient,\r\n type MapFeatureInfoOptions, MapFeatureInfoRecord, type MapFeatureInfo, type MapLayerFeatureInfo, type MapSubLayerFeatureInfo, type MapLayerFeature, type MapLayerFeatureGeometry, type MapLayerFeatureAttribute, MapLayerFeatureRecord,\r\n MapCartoRectangle,\r\n ImageryMapLayerTreeReference,\r\n EllipsoidTerrainProvider,\r\n getCesiumAssetUrl,\r\n MapTileTreeScaleRangeVisibility, MapTileTree,\r\n type TerrainMeshProviderOptions, type RequestMeshDataArgs, type ReadMeshArgs, TerrainMeshProvider,\r\n type TerrainProvider, TerrainProviderRegistry,\r\n} from \"./tile/internal\";\r\nexport * from \"./tools/AccuDrawTool\";\r\nexport * from \"./tools/AccuDrawViewportUI\";\r\nexport * from \"./tools/ClipViewTool\";\r\nexport * from \"./tools/EditManipulator\";\r\nexport * from \"./tools/ElementSetTool\";\r\nexport * from \"./tools/EventController\";\r\nexport * from \"./tools/IdleTool\";\r\nexport * from \"./tools/MeasureTool\";\r\nexport * from \"./tools/PrimitiveTool\";\r\nexport * from \"./tools/SelectTool\";\r\nexport * from \"./tools/SetupCameraTools\";\r\nexport * from \"./tools/Tool\";\r\nexport * from \"./tools/ToolSettings\";\r\nexport * from \"./tools/ToolAdmin\";\r\nexport * from \"./tools/ToolAssistance\";\r\nexport * from \"./tools/ViewTool\";\r\nexport * from \"./workers/RegisterWorker\";\r\nexport * from \"./BackgroundMapGeometry\";\r\nexport * from \"./ViewCreator2d\";\r\nexport * from \"./ViewCreator3d\";\r\nexport * from \"./LocalhostIpcApp\";\r\nexport * from \"./request/utils\";\r\nexport * from \"./RealityDataSource\";\r\n\r\nexport * from \"./internal/cross-package\";\r\n\r\n// TODO/FIX: \"./extension/ExtensionRuntime\" import has to be last to avoid circular dependency errors.\r\nimport \"./extension/ExtensionRuntime\";\r\n\r\n/** @docs-package-description\r\n * The core-frontend package always runs in a web browser. It contains classes for [querying iModels and showing views]($docs/learning/frontend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description IModelApp\r\n * Classes for configuring and administering an iTwin.js application.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description IModelConnection\r\n * Classes for working with a connection to an [iModel briefcase]($docs/learning/IModels.md)\r\n */\r\n/**\r\n * @docs-group-description ElementState\r\n * Classes for working with the *state* of Elements in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ModelState\r\n * Classes for working with the *state* of Models in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Tools\r\n * Classes for [working with Tools]($docs/learning/frontend/Tools.md)\r\n */\r\n/**\r\n * @docs-group-description Measure\r\n * Classes for reporting point to point distances and mass properties of elements.\r\n */\r\n/**\r\n * @docs-group-description Views\r\n * Classes for [working with Views]($docs/learning/frontend/Views.md)\r\n */\r\n/**\r\n * @docs-group-description LocatingElements\r\n * Classes for locating and snapping to elements in views.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description AccuDraw\r\n * AccuDraw provides helpful assistance for creating and modifying elements in a view.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Notifications\r\n * Notifications provide feedback to the user of something of interest.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Extensions\r\n * Classes for creating and managing Extensions.\r\n */\r\n/**\r\n * @docs-group-description Properties\r\n * Classes for working with property records and descriptions.\r\n */\r\n/**\r\n * @docs-group-description Rendering\r\n * Classes for rendering the contents of views.\r\n */\r\n/**\r\n * @docs-group-description SelectionSet\r\n * Classes for working with the set of selected elements.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Native Applications\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package\r\n */\r\n/**\r\n * @docs-group-description QuantityFormatting\r\n * Classes for formatting and parsing quantity values.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * Classes representing graphics as [hierarchical 3d tiles](https://github.com/CesiumGS/3d-tiles).\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description UserPreferences\r\n * APIs for working with user preferences in an iModelApp.\r\n * See [the learning articles]($docs/learning/frontend/preferences.md).\r\n */\r\n/**\r\n * @docs-group-description MapLayers\r\n * Classes supporting map layers display.\r\n */\r\n/**\r\n * @docs-group-description TileStorage\r\n * Class for working with cloud storage using iTwin/object-storage cloud providers\r\n*/"]}
|
|
1
|
+
{"version":3,"file":"core-frontend.js","sourceRoot":"","sources":["../../src/core-frontend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;;AAI/F,6CAA2B;AAC3B,6CAA2B;AAC3B,gDAA8B;AAC9B,iDAA+B;AAC/B,wDAAsC;AACtC,iDAA+B;AAC/B,kDAAgC;AAChC,sDAAoC;AACpC,0DAAwC;AACxC,uDAAqC;AACrC,gDAA8B;AAC9B,yDAAuC;AACvC,2CAAyB;AACzB,6DAA2C;AAC3C,gDAA8B;AAC9B,qDAAmC;AACnC,6CAA2B;AAC3B,sDAAoC;AACpC,qDAAmC;AACnC,yDAAuC;AACvC,sDAAoC;AACpC,gDAA8B;AAC9B,2DAAyC;AACzC,4DAA0C;AAC1C,kDAAgC;AAChC,sDAAoC;AACp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A,iBAAiB,OAAA;AACjB,2HAAA,+BAA+B,OAAA;AAAE,uGAAA,WAAW,OAAA;AACkC,+GAAA,mBAAmB,OAAA;AAC3E,mHAAA,uBAAuB,OAAA;AAE/C,uDAAqC;AACrC,6DAA2C;AAC3C,uDAAqC;AACrC,0DAAwC;AACxC,yDAAuC;AACvC,0DAAwC;AACxC,mDAAiC;AACjC,sDAAoC;AACpC,wDAAsC;AACtC,qDAAmC;AACnC,2DAAyC;AACzC,+CAA6B;AAC7B,uDAAqC;AACrC,oDAAkC;AAClC,yDAAuC;AACvC,mDAAiC;AACjC,2DAAyC;AACzC,0DAAwC;AACxC,kDAAgC;AAChC,kDAAgC;AAChC,oDAAkC;AAClC,kDAAgC;AAChC,sDAAoC;AAEpC,2DAAyC;AAEzC,sGAAsG;AACtG,wCAAsC;AAEtC;;GAEG;AAEH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;EAGE","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\r\nimport type { TxnEntityMetadata as _TxnEntityMetadata } from \"@itwin/core-common\";\r\n\r\nexport * from \"./AccuDraw\";\r\nexport * from \"./AccuSnap\";\r\nexport * from \"./AuxCoordSys\";\r\nexport * from \"./BingLocation\";\r\nexport * from \"./BriefcaseConnection\";\r\nexport * from \"./GeoProviders\";\r\nexport * from \"./BriefcaseTxns\";\r\nexport * from \"./CatalogConnection\";\r\nexport * from \"./CategorySelectorState\";\r\nexport * from \"./CesiumAccessClient\";\r\nexport * from \"./ChangeFlags\";\r\nexport * from \"./CheckpointConnection\";\r\nexport * from \"./common\";\r\nexport * from \"./ContextRealityModelState\";\r\nexport * from \"./CoordSystem\";\r\nexport * from \"./DecorationsCache\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./DisplayStyleState\";\r\nexport * from \"./DrawingViewState\";\r\nexport * from \"./ElementLocateManager\";\r\nexport * from \"./EmphasizeElements\";\r\nexport * from \"./EntityState\";\r\nexport * from \"./EnvironmentDecorations\";\r\nexport * from \"./FeatureOverrideProvider\";\r\nexport * from \"./FlashSettings\";\r\nexport * from \"./FrontendHubAccess\";\r\nexport * from \"./Frustum2d\";\r\nexport * from \"./FrustumAnimator\";\r\nexport * from \"./FuzzySearch\";\r\nexport * from \"./GeoServices\";\r\nexport * from \"./GlobeAnimator\";\r\nexport * from \"./GraphicalEditingScope\";\r\nexport * from \"./HitDetail\";\r\nexport * from \"./IModelApp\";\r\nexport * from \"./IModelConnection\";\r\nexport * from \"./IModelRoutingContext\";\r\nexport * from \"./IpcApp\";\r\nexport * from \"./LinePlaneIntersect\";\r\nexport * from \"./MarginPercent\";\r\nexport * from \"./Marker\";\r\nexport * from \"./ModelSelectorState\";\r\nexport * from \"./ModelState\";\r\nexport * from \"./NativeApp\";\r\nexport * from \"./NativeAppLogger\";\r\nexport * from \"./NoRenderApp\";\r\nexport * from \"./NotificationManager\";\r\nexport * from \"./PerModelCategoryVisibility\";\r\nexport * from \"./PlanarClipMaskState\";\r\nexport * from \"./SelectionSet\";\r\nexport * from \"./SheetViewState\";\r\nexport * from \"./SpatialClassifiersState\";\r\nexport * from \"./SpatialViewState\";\r\nexport * from \"./Sprites\";\r\nexport * from \"./StandardView\";\r\nexport * from \"./SubCategoriesCache\";\r\nexport * from \"./TentativePoint\";\r\nexport * from \"./Tiles\";\r\nexport * from \"./UserPreferences\";\r\nexport * from \"./ViewAnimation\";\r\nexport * from \"./ViewContext\";\r\nexport * from \"./ViewGlobalLocation\";\r\nexport * from \"./ViewingSpace\";\r\nexport * from \"./ViewManager\";\r\nexport * from \"./Viewport\";\r\nexport * from \"./ViewportSync\";\r\nexport * from \"./ViewPose\";\r\nexport * from \"./ViewState\";\r\nexport * from \"./ViewStatus\";\r\nexport * from \"./extension/Extension\";\r\nexport * from \"./extension/providers/LocalExtensionProvider\";\r\nexport * from \"./extension/providers/RemoteExtensionProvider\";\r\nexport * from \"./properties/AngleDescription\";\r\nexport * from \"./properties/FormattedQuantityDescription\";\r\nexport * from \"./properties/LengthDescription\";\r\nexport * from \"./quantity-formatting/QuantityFormatter\";\r\nexport * from \"./quantity-formatting/BaseUnitFormattingSettingsProvider\";\r\nexport * from \"./quantity-formatting/LocalUnitFormatProvider\";\r\nexport * from \"./quantity-formatting/QuantityTypesEditorSpecs\";\r\nexport * from \"./render/CanvasDecoration\";\r\nexport * from \"./render/CreateRenderMaterialArgs\";\r\nexport * from \"./render/CreateTextureArgs\";\r\nexport * from \"./render/Decorations\";\r\nexport * from \"./render/FeatureSymbology\";\r\nexport * from \"./render/FrameStats\";\r\nexport * from \"./render/GraphicBranch\";\r\nexport * from \"./render/GraphicBuilder\";\r\nexport * from \"./render/GraphicTemplate\";\r\nexport * from \"./render/MeshArgs\";\r\nexport * from \"./render/ParticleCollectionBuilder\";\r\nexport * from \"./render/Pixel\";\r\nexport * from \"./render/PolylineArgs\";\r\nexport * from \"./render/RealityMeshParams\";\r\nexport * from \"./render/RenderClipVolume\";\r\nexport * from \"./render/RenderGraphic\";\r\nexport * from \"./render/RenderMemory\";\r\nexport * from \"./render/RenderSystem\";\r\nexport * from \"./render/RenderTarget\";\r\nexport * from \"./render/Scene\";\r\nexport * from \"./render/ScreenSpaceEffectBuilder\";\r\nexport * from \"./render/VisibleFeature\";\r\nexport * from \"./internal/render/webgl/IModelFrameLifecycle\";\r\nexport type {\r\n TxnEntityChange,\r\n TxnEntityChangeIterable,\r\n TxnEntityChangeType,\r\n TxnEntityChanges,\r\n TxnEntityChangesFilterOptions,\r\n TxnEntityMetadataCriterion,\r\n} from \"./TxnEntityChanges\";\r\n/** Deprecated frontend alias for the common TxnEntityMetadata interface.\r\n * @public\r\n * @deprecated in 5.13.0 - will not be removed until after 2027-09-03. Use [TxnEntityMetadata]($common) from @itwin/core-common instead.\r\n */\r\nexport type TxnEntityMetadata = _TxnEntityMetadata;\r\nexport {\r\n type TileTreeDiscloser, DisclosedTileTreeSet,\r\n type ReadGltfGraphicsArgs, type GltfGraphic, type GltfTemplate, readGltfGraphics, readGltfTemplate, readGltf,\r\n readElementGraphics,\r\n type BatchTableProperties, RealityTileTree,\r\n type RealityTileGeometry, RealityTile,\r\n type RenderGraphicTileTreeArgs,\r\n type GpuMemoryLimit, type GpuMemoryLimits, TileAdmin,\r\n type TileContent,\r\n type TiledGraphicsProvider,\r\n type TileDrawArgParams, TileDrawArgs,\r\n type CollectTileStatus, type TileGeometryCollectorOptions, TileGeometryCollector, type GeometryTileTreeReference,\r\n type GeometryTileTreeReferenceOptions,\r\n type TileParams,\r\n TileRequestChannels,\r\n type TileContentDecodingStatistics, TileRequestChannelStatistics, TileRequestChannel,\r\n TileRequest,\r\n type TileTreeOwner,\r\n type TileTreeParams,\r\n TileGraphicType, TileTreeReference,\r\n type TileTreeSupplier,\r\n TileTreeLoadStatus, TileTree,\r\n Tile, TileLoadStatus, TileVisibility, TileLoadPriority, TileBoundingBoxes,\r\n TileUsageMarker,\r\n TileUser,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n BingElevationProvider,\r\n QuadId, type QuadIdProps,\r\n MapTilingScheme, GeographicTilingScheme, WebMercatorProjection, WebMercatorTilingScheme,\r\n type MapLayerIndex,\r\n MapTileProjection, MapTile,\r\n MapLayerTileTreeReference,\r\n MapLayerSourceStatus, type MapLayerSourceProps, MapLayerSource, MapLayerSources,\r\n MapLayerImageryProviderStatus, MapLayerImageryProvider,\r\n ImageryMapLayerFormat,\r\n MapLayerFormat, type ValidateSourceArgs, type MapLayerFormatType, type MapLayerSourceValidation, type MapLayerOptions, MapLayerFormatRegistry, MapLayerAuthenticationFailedError,\r\n type MapLayerTokenEndpoint, type MapLayerAuthenticationInfo, type MapLayerAccessToken, type MapLayerAccessTokenParams, type MapLayerAccessClient,\r\n type MapLayerRequest, type MapLayerFetchRequest, type MapLayerFetchHandler,\r\n type MapFeatureInfoOptions, MapFeatureInfoRecord, type MapFeatureInfo, type MapLayerFeatureInfo, type MapSubLayerFeatureInfo, type MapLayerFeature, type MapLayerFeatureGeometry, type MapLayerFeatureAttribute, MapLayerFeatureRecord,\r\n MapCartoRectangle,\r\n ImageryMapLayerTreeReference,\r\n EllipsoidTerrainProvider,\r\n getCesiumAssetUrl,\r\n MapTileTreeScaleRangeVisibility, MapTileTree,\r\n type TerrainMeshProviderOptions, type RequestMeshDataArgs, type ReadMeshArgs, TerrainMeshProvider,\r\n type TerrainProvider, TerrainProviderRegistry,\r\n} from \"./tile/internal\";\r\nexport * from \"./tools/AccuDrawTool\";\r\nexport * from \"./tools/AccuDrawViewportUI\";\r\nexport * from \"./tools/ClipViewTool\";\r\nexport * from \"./tools/EditManipulator\";\r\nexport * from \"./tools/ElementSetTool\";\r\nexport * from \"./tools/EventController\";\r\nexport * from \"./tools/IdleTool\";\r\nexport * from \"./tools/MeasureTool\";\r\nexport * from \"./tools/PrimitiveTool\";\r\nexport * from \"./tools/SelectTool\";\r\nexport * from \"./tools/SetupCameraTools\";\r\nexport * from \"./tools/Tool\";\r\nexport * from \"./tools/ToolSettings\";\r\nexport * from \"./tools/ToolAdmin\";\r\nexport * from \"./tools/ToolAssistance\";\r\nexport * from \"./tools/ViewTool\";\r\nexport * from \"./workers/RegisterWorker\";\r\nexport * from \"./BackgroundMapGeometry\";\r\nexport * from \"./ViewCreator2d\";\r\nexport * from \"./ViewCreator3d\";\r\nexport * from \"./LocalhostIpcApp\";\r\nexport * from \"./request/utils\";\r\nexport * from \"./RealityDataSource\";\r\n\r\nexport * from \"./internal/cross-package\";\r\n\r\n// TODO/FIX: \"./extension/ExtensionRuntime\" import has to be last to avoid circular dependency errors.\r\nimport \"./extension/ExtensionRuntime\";\r\n\r\n/** @docs-package-description\r\n * The core-frontend package always runs in a web browser. It contains classes for [querying iModels and showing views]($docs/learning/frontend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description IModelApp\r\n * Classes for configuring and administering an iTwin.js application.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description IModelConnection\r\n * Classes for working with a connection to an [iModel briefcase]($docs/learning/IModels.md)\r\n */\r\n/**\r\n * @docs-group-description ElementState\r\n * Classes for working with the *state* of Elements in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ModelState\r\n * Classes for working with the *state* of Models in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Tools\r\n * Classes for [working with Tools]($docs/learning/frontend/Tools.md)\r\n */\r\n/**\r\n * @docs-group-description Measure\r\n * Classes for reporting point to point distances and mass properties of elements.\r\n */\r\n/**\r\n * @docs-group-description Views\r\n * Classes for [working with Views]($docs/learning/frontend/Views.md)\r\n */\r\n/**\r\n * @docs-group-description LocatingElements\r\n * Classes for locating and snapping to elements in views.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description AccuDraw\r\n * AccuDraw provides helpful assistance for creating and modifying elements in a view.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Notifications\r\n * Notifications provide feedback to the user of something of interest.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Extensions\r\n * Classes for creating and managing Extensions.\r\n */\r\n/**\r\n * @docs-group-description Properties\r\n * Classes for working with property records and descriptions.\r\n */\r\n/**\r\n * @docs-group-description Rendering\r\n * Classes for rendering the contents of views.\r\n */\r\n/**\r\n * @docs-group-description SelectionSet\r\n * Classes for working with the set of selected elements.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Native Applications\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package\r\n */\r\n/**\r\n * @docs-group-description QuantityFormatting\r\n * Classes for formatting and parsing quantity values.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * Classes representing graphics as [hierarchical 3d tiles](https://github.com/CesiumGS/3d-tiles).\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description UserPreferences\r\n * APIs for working with user preferences in an iModelApp.\r\n * See [the learning articles]($docs/learning/frontend/preferences.md).\r\n */\r\n/**\r\n * @docs-group-description MapLayers\r\n * Classes supporting map layers display.\r\n */\r\n/**\r\n * @docs-group-description TileStorage\r\n * Class for working with cloud storage using iTwin/object-storage cloud providers\r\n*/"]}
|
|
@@ -57,6 +57,8 @@ export declare class RealityDataSourceGoogle3dTilesImpl implements RealityDataSo
|
|
|
57
57
|
* For both absolute and relative tile path URLs, the search parameters are checked. If the search params are empty, the base URL's search params are appended to the tile path.
|
|
58
58
|
*/
|
|
59
59
|
getTileUrl(tilePath: string): string;
|
|
60
|
+
/** Returns true if `url` has the same origin as the root tileset. Credentials are only sent to that origin. */
|
|
61
|
+
private isSameOrigin;
|
|
60
62
|
/**
|
|
61
63
|
* Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.
|
|
62
64
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RealityDataSourceGoogle3dTilesImpl.d.ts","sourceRoot":"","sources":["../../../src/internal/RealityDataSourceGoogle3dTilesImpl.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAiB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AA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B,IAAI,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC;CAIlF"}
|
|
@@ -123,6 +123,9 @@ class RealityDataSourceGoogle3dTilesImpl {
|
|
|
123
123
|
// We also do not need to worry about the tile path starting with a slash.
|
|
124
124
|
// This happens in these tiles at the second .json level, but the URL API will handle that for us.
|
|
125
125
|
const url = new URL(tilePath, this._baseUrl);
|
|
126
|
+
// Never forward the API key or session params to a different origin.
|
|
127
|
+
if (!this.isSameOrigin(url))
|
|
128
|
+
return url.toString();
|
|
126
129
|
// If tile is a reference to a tileset, iterate over tileset url's search params and store them in this._searchParams so we can pass them down to children
|
|
127
130
|
if (this.getTileContentType(url.toString()) === "tileset" && url.searchParams.size !== 0) {
|
|
128
131
|
for (const [key, value] of url.searchParams.entries()) {
|
|
@@ -142,15 +145,20 @@ class RealityDataSourceGoogle3dTilesImpl {
|
|
|
142
145
|
}
|
|
143
146
|
return newUrl.toString();
|
|
144
147
|
}
|
|
148
|
+
/** Returns true if `url` has the same origin as the root tileset. Credentials are only sent to that origin. */
|
|
149
|
+
isSameOrigin(url) {
|
|
150
|
+
return new URL(url).origin === this._baseUrl;
|
|
151
|
+
}
|
|
145
152
|
/**
|
|
146
153
|
* Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.
|
|
147
154
|
*/
|
|
148
155
|
async getTileContent(name) {
|
|
156
|
+
const url = this.getTileUrl(name);
|
|
149
157
|
let authToken;
|
|
150
|
-
if (this._getAuthToken) {
|
|
158
|
+
if (this._getAuthToken && this.isSameOrigin(url)) {
|
|
151
159
|
authToken = await this._getAuthToken();
|
|
152
160
|
}
|
|
153
|
-
return (0, Request_1.request)(
|
|
161
|
+
return (0, Request_1.request)(url, "arraybuffer", authToken ? {
|
|
154
162
|
headers: {
|
|
155
163
|
authorization: `Bearer ${authToken}`
|
|
156
164
|
}
|
|
@@ -160,11 +168,12 @@ class RealityDataSourceGoogle3dTilesImpl {
|
|
|
160
168
|
* Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type.
|
|
161
169
|
*/
|
|
162
170
|
async getTileJson(name) {
|
|
171
|
+
const url = this.getTileUrl(name);
|
|
163
172
|
let authToken;
|
|
164
|
-
if (this._getAuthToken) {
|
|
173
|
+
if (this._getAuthToken && this.isSameOrigin(url)) {
|
|
165
174
|
authToken = await this._getAuthToken();
|
|
166
175
|
}
|
|
167
|
-
return (0, Request_1.request)(
|
|
176
|
+
return (0, Request_1.request)(url, "json", authToken ? {
|
|
168
177
|
headers: {
|
|
169
178
|
authorization: `Bearer ${authToken}`
|
|
170
179
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RealityDataSourceGoogle3dTilesImpl.js","sourceRoot":"","sources":["../../../src/internal/RealityDataSourceGoogle3dTilesImpl.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAAgE;AAChE,oDAA+H;AAE/H,gDAA6C;AAE7C,+CAA+D;AAE/D;;;;EAIE;AACF,MAAa,kCAAkC;IAC7B,GAAG,CAAuB;IAC1C,qFAAqF;IAC7E,WAAW,CAAqB;IACxC,yFAAyF;IACjF,QAAQ,GAAW,EAAE,CAAA;IAC7B,yEAAyE;IACjE,aAAa,CAAmB;IACxC,+DAA+D;IACvD,OAAO,CAAU;IACzB,sIAAsI;IAC9H,aAAa,CAAqC;IAE1D,4KAA4K;IAC5J,kBAAkB,GAAG,IAAI,CAAC;IAC1B,uBAAuB,GAAG,EAAE,CAAC;IAE7C;;OAEG;IACH,YAAsB,KAA6B,EAAE,MAA0B,EAAE,aAAiD;QAChI,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,KAAK,CAAC,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,aAAa,EAAE,UAAU,SAAS,EAAE;aACrC;SAAC,CAAC,CAAC,CAAC,SAAS,CACf,CAAC;IACJ,CAAC;IAEM,kBAAkB,CAAC,GAAW;QACnC,OAAO,IAAI,GAAG,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IACzG,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,4BAA4B;QACvC,IAAI,eAAsD,CAAC;QAC3D,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,+BAAiB,CAAC,UAAU,EAAE,CAAC;YACrD,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;YAC3D,eAAe,GAAG,sCAA2B,CAAC,4BAA4B,CAAC,YAAY,CAAC,CAAC;QAC3F,CAAC;QACD,OAAO,eAAe,CAAC;IACzB,CAAC;IACD;;;;;OAKG;IACI,KAAK,CAAC,uBAAuB;QAClC,IAAI,aAA+C,CAAC;QACpD,OAAO,aAAa,CAAC;IACvB,CAAC;CACF;AAxMD,gFAwMC","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 { BentleyStatus, GuidString } from \"@itwin/core-bentley\";\r\nimport { IModelError, RealityData, RealityDataFormat, RealityDataSourceKey, RealityDataSourceProps } from \"@itwin/core-common\";\r\n\r\nimport { request } from \"../request/Request\";\r\nimport { PublisherProductInfo, RealityDataSource, SpatialLocationAndExtents } from \"../RealityDataSource\";\r\nimport { ThreeDTileFormatInterpreter } from \"../tile/internal\";\r\n\r\n/** This class provides access to the reality data provider services.\r\n * It encapsulates access to a reality data from the Google Photorealistic 3D Tiles service.\r\n * A valid Google 3D Tiles authentication key must be configured for this provider to work (provide the key in the [[RealityDataSourceGoogle3dTilesImpl.createFromKey]] method).\r\n* @internal\r\n*/\r\nexport class RealityDataSourceGoogle3dTilesImpl implements RealityDataSource {\r\n public readonly key: RealityDataSourceKey;\r\n /** The URL that supplies the 3d tiles for displaying the Google 3D Tiles tileset. */\r\n private _tilesetUrl: string | undefined;\r\n /** Base URL of the Google 3D Tiles tileset. Does not include trailing subdirectories. */\r\n private _baseUrl: string = \"\"\r\n /** Search parameters that must be passed down to child tile requests. */\r\n private _searchParams?: URLSearchParams;\r\n /** Google Map Tiles API Key used to access Google 3D Tiles. */\r\n private _apiKey?: string;\r\n /** Function that returns an OAuth token for authenticating with GP3sDT. This token is expected to not contain the \"Bearer\" prefix. */\r\n private _getAuthToken?: () => Promise<string | undefined>;\r\n\r\n /** This is necessary for Google 3D Tiles tilesets! This tells the iTwin.js tiling system to use the geometric error specified in the tileset rather than any of our own. */\r\n public readonly usesGeometricError = true;\r\n public readonly maximumScreenSpaceError = 16;\r\n\r\n /** Construct a new reality data source.\r\n * @param props JSON representation of the reality data source\r\n */\r\n protected constructor(props: RealityDataSourceProps, apiKey: string | undefined, _getAuthToken?: () => Promise<string | undefined>) {\r\n this.key = props.sourceKey;\r\n this._tilesetUrl = this.key.id;\r\n this._apiKey = apiKey;\r\n this._getAuthToken = _getAuthToken;\r\n }\r\n\r\n /**\r\n * Create an instance of this class from a source key and iTwin context.\r\n */\r\n public static async createFromKey(sourceKey: RealityDataSourceKey, _iTwinId: GuidString | undefined, apiKey: string | undefined, _getAuthToken?: () => Promise<string | undefined>): Promise<RealityDataSource | undefined> {\r\n return new RealityDataSourceGoogle3dTilesImpl({ sourceKey }, apiKey, _getAuthToken);\r\n }\r\n\r\n public get isContextShare(): boolean {\r\n return false;\r\n }\r\n /**\r\n * Returns Reality Data if available\r\n */\r\n public get realityData(): RealityData | undefined {\r\n return undefined;\r\n }\r\n public get realityDataId(): string | undefined {\r\n return undefined;\r\n }\r\n /**\r\n * Returns Reality Data type if available\r\n */\r\n public get realityDataType(): string | undefined {\r\n return undefined;\r\n }\r\n\r\n public getTilesetUrl(): string | undefined {\r\n return this._tilesetUrl;\r\n }\r\n\r\n /** Return the URL of the Google 3D Tiles tileset with its API key included. */\r\n private getTilesetUrlWithKey() {\r\n const google3dTilesKey = this._apiKey;\r\n if (this._getAuthToken) {\r\n // If we have a getAuthToken function, no need to append API key to the URL\r\n return this._tilesetUrl;\r\n } else {\r\n return `${this._tilesetUrl}?key=${google3dTilesKey}`;\r\n }\r\n }\r\n\r\n protected setBaseUrl(url: string): void {\r\n const urlParts = url.split(\"/\");\r\n const newUrl = new URL(url);\r\n this._searchParams = newUrl.searchParams;\r\n urlParts.pop();\r\n if (urlParts.length === 0) {\r\n this._baseUrl = \"\";\r\n } else {\r\n this._baseUrl = newUrl.origin;\r\n }\r\n }\r\n\r\n /**\r\n * This method returns the URL to access the actual 3d tiles from the service provider.\r\n * @returns string containing the URL to reality data.\r\n */\r\n public async getServiceUrl(_iTwinId: GuidString | undefined): Promise<string | undefined> {\r\n return this._tilesetUrl;\r\n }\r\n\r\n public async getRootDocument(_iTwinId: GuidString | undefined): Promise<any> {\r\n const url = this.getTilesetUrlWithKey();\r\n if (!url)\r\n throw new IModelError(BentleyStatus.ERROR, \"Unable to get service url\");\r\n\r\n this.setBaseUrl(url);\r\n\r\n let authToken;\r\n if (this._getAuthToken) {\r\n authToken = await this._getAuthToken();\r\n }\r\n\r\n return request(url, \"json\", authToken ? {\r\n headers: {\r\n authorization: `Bearer ${authToken}`\r\n }} : undefined\r\n );\r\n }\r\n\r\n /** Returns the tile URL relative to the base URL.\r\n * If the tile path is a relative URL, the base URL is prepended to it.\r\n * For both absolute and relative tile path URLs, the search parameters are checked. If the search params are empty, the base URL's search params are appended to the tile path.\r\n */\r\n public getTileUrl(tilePath: string): string {\r\n // this._baseUrl does not include the trailing subdirectories.\r\n // This is not an issue because the tile path always starts with the appropriate subdirectories.\r\n // We also do not need to worry about the tile path starting with a slash.\r\n // This happens in these tiles at the second .json level, but the URL API will handle that for us.\r\n const url = new URL(tilePath, this._baseUrl);\r\n\r\n // If tile is a reference to a tileset, iterate over tileset url's search params and store them in this._searchParams so we can pass them down to children\r\n if (this.getTileContentType(url.toString()) === \"tileset\" && url.searchParams.size !== 0) {\r\n for (const [key, value] of url.searchParams.entries()) {\r\n this._searchParams?.append(key, value);\r\n }\r\n }\r\n\r\n if (this._searchParams === undefined || this._searchParams.size === 0) {\r\n return url.toString();\r\n }\r\n\r\n // Append all stored search params to url's existing ones\r\n const newUrl = new URL(url.toString());\r\n for (const [key, value] of this._searchParams.entries()) {\r\n if (!url.searchParams.has(key)) {\r\n // Only append the search param if it does not already exist in the url\r\n newUrl.searchParams.append(key, value);\r\n }\r\n }\r\n\r\n return newUrl.toString();\r\n }\r\n\r\n /**\r\n * Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileContent(name: string): Promise<ArrayBuffer> {\r\n let authToken;\r\n if (this._getAuthToken) {\r\n authToken = await this._getAuthToken();\r\n }\r\n\r\n return request(this.getTileUrl(name), \"arraybuffer\", authToken ? {\r\n headers: {\r\n authorization: `Bearer ${authToken}`\r\n }} : undefined\r\n );\r\n }\r\n\r\n /**\r\n * Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileJson(name: string): Promise<any> {\r\n let authToken;\r\n if (this._getAuthToken) {\r\n authToken = await this._getAuthToken();\r\n }\r\n\r\n return request(this.getTileUrl(name), \"json\", authToken ? {\r\n headers: {\r\n authorization: `Bearer ${authToken}`\r\n }} : undefined\r\n );\r\n }\r\n\r\n public getTileContentType(url: string): \"tile\" | \"tileset\" {\r\n return new URL(url, \"https://localhost/\").pathname.toLowerCase().endsWith(\"json\") ? \"tileset\" : \"tile\";\r\n }\r\n\r\n /**\r\n * Gets spatial location and extents of this reality data source\r\n * @returns spatial location and extents\r\n * @internal\r\n */\r\n public async getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined> {\r\n let spatialLocation: SpatialLocationAndExtents | undefined;\r\n if (this.key.format === RealityDataFormat.ThreeDTile) {\r\n const rootDocument = await this.getRootDocument(undefined);\r\n spatialLocation = ThreeDTileFormatInterpreter.getSpatialLocationAndExtents(rootDocument);\r\n }\r\n return spatialLocation;\r\n }\r\n /**\r\n * Gets information to identify the product and engine that create this reality data\r\n * Will return undefined if cannot be resolved\r\n * @returns information to identify the product and engine that create this reality data\r\n * @alpha\r\n */\r\n public async getPublisherProductInfo(): Promise<PublisherProductInfo | undefined> {\r\n let publisherInfo: PublisherProductInfo | undefined;\r\n return publisherInfo;\r\n }\r\n}\r\n\r\n"]}
|
|
1
|
+
{"version":3,"file":"RealityDataSourceGoogle3dTilesImpl.js","sourceRoot":"","sources":["../../../src/internal/RealityDataSourceGoogle3dTilesImpl.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAAgE;AAChE,oDAA+H;AAE/H,gDAA6C;AAE7C,+CAA+D;AAE/D;;;;EAIE;AACF,MAAa,kCAAkC;IAC7B,GAAG,CAAuB;IAC1C,qFAAqF;IAC7E,WAAW,CAAqB;IACxC,yFAAyF;IACjF,QAAQ,GAAW,EAAE,CAAA;IAC7B,yEAAyE;IACjE,aAAa,CAAmB;IACxC,+DAA+D;IACvD,OAAO,CAAU;IACzB,sIAAsI;IAC9H,aAAa,CAAqC;IAE1D,4KAA4K;IAC5J,kBAAkB,GAAG,IAAI,CAAC;IAC1B,uBAAuB,GAAG,EAAE,CAAC;IAE7C;;OAEG;IACH,YAAsB,KAA6B,EAAE,MAA0B,EAAE,aAAiD;QAChI,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CA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ND,gFAmNC","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 { BentleyStatus, GuidString } from \"@itwin/core-bentley\";\r\nimport { IModelError, RealityData, RealityDataFormat, RealityDataSourceKey, RealityDataSourceProps } from \"@itwin/core-common\";\r\n\r\nimport { request } from \"../request/Request\";\r\nimport { PublisherProductInfo, RealityDataSource, SpatialLocationAndExtents } from \"../RealityDataSource\";\r\nimport { ThreeDTileFormatInterpreter } from \"../tile/internal\";\r\n\r\n/** This class provides access to the reality data provider services.\r\n * It encapsulates access to a reality data from the Google Photorealistic 3D Tiles service.\r\n * A valid Google 3D Tiles authentication key must be configured for this provider to work (provide the key in the [[RealityDataSourceGoogle3dTilesImpl.createFromKey]] method).\r\n* @internal\r\n*/\r\nexport class RealityDataSourceGoogle3dTilesImpl implements RealityDataSource {\r\n public readonly key: RealityDataSourceKey;\r\n /** The URL that supplies the 3d tiles for displaying the Google 3D Tiles tileset. */\r\n private _tilesetUrl: string | undefined;\r\n /** Base URL of the Google 3D Tiles tileset. Does not include trailing subdirectories. */\r\n private _baseUrl: string = \"\"\r\n /** Search parameters that must be passed down to child tile requests. */\r\n private _searchParams?: URLSearchParams;\r\n /** Google Map Tiles API Key used to access Google 3D Tiles. */\r\n private _apiKey?: string;\r\n /** Function that returns an OAuth token for authenticating with GP3sDT. This token is expected to not contain the \"Bearer\" prefix. */\r\n private _getAuthToken?: () => Promise<string | undefined>;\r\n\r\n /** This is necessary for Google 3D Tiles tilesets! This tells the iTwin.js tiling system to use the geometric error specified in the tileset rather than any of our own. */\r\n public readonly usesGeometricError = true;\r\n public readonly maximumScreenSpaceError = 16;\r\n\r\n /** Construct a new reality data source.\r\n * @param props JSON representation of the reality data source\r\n */\r\n protected constructor(props: RealityDataSourceProps, apiKey: string | undefined, _getAuthToken?: () => Promise<string | undefined>) {\r\n this.key = props.sourceKey;\r\n this._tilesetUrl = this.key.id;\r\n this._apiKey = apiKey;\r\n this._getAuthToken = _getAuthToken;\r\n }\r\n\r\n /**\r\n * Create an instance of this class from a source key and iTwin context.\r\n */\r\n public static async createFromKey(sourceKey: RealityDataSourceKey, _iTwinId: GuidString | undefined, apiKey: string | undefined, _getAuthToken?: () => Promise<string | undefined>): Promise<RealityDataSource | undefined> {\r\n return new RealityDataSourceGoogle3dTilesImpl({ sourceKey }, apiKey, _getAuthToken);\r\n }\r\n\r\n public get isContextShare(): boolean {\r\n return false;\r\n }\r\n /**\r\n * Returns Reality Data if available\r\n */\r\n public get realityData(): RealityData | undefined {\r\n return undefined;\r\n }\r\n public get realityDataId(): string | undefined {\r\n return undefined;\r\n }\r\n /**\r\n * Returns Reality Data type if available\r\n */\r\n public get realityDataType(): string | undefined {\r\n return undefined;\r\n }\r\n\r\n public getTilesetUrl(): string | undefined {\r\n return this._tilesetUrl;\r\n }\r\n\r\n /** Return the URL of the Google 3D Tiles tileset with its API key included. */\r\n private getTilesetUrlWithKey() {\r\n const google3dTilesKey = this._apiKey;\r\n if (this._getAuthToken) {\r\n // If we have a getAuthToken function, no need to append API key to the URL\r\n return this._tilesetUrl;\r\n } else {\r\n return `${this._tilesetUrl}?key=${google3dTilesKey}`;\r\n }\r\n }\r\n\r\n protected setBaseUrl(url: string): void {\r\n const urlParts = url.split(\"/\");\r\n const newUrl = new URL(url);\r\n this._searchParams = newUrl.searchParams;\r\n urlParts.pop();\r\n if (urlParts.length === 0) {\r\n this._baseUrl = \"\";\r\n } else {\r\n this._baseUrl = newUrl.origin;\r\n }\r\n }\r\n\r\n /**\r\n * This method returns the URL to access the actual 3d tiles from the service provider.\r\n * @returns string containing the URL to reality data.\r\n */\r\n public async getServiceUrl(_iTwinId: GuidString | undefined): Promise<string | undefined> {\r\n return this._tilesetUrl;\r\n }\r\n\r\n public async getRootDocument(_iTwinId: GuidString | undefined): Promise<any> {\r\n const url = this.getTilesetUrlWithKey();\r\n if (!url)\r\n throw new IModelError(BentleyStatus.ERROR, \"Unable to get service url\");\r\n\r\n this.setBaseUrl(url);\r\n\r\n let authToken;\r\n if (this._getAuthToken) {\r\n authToken = await this._getAuthToken();\r\n }\r\n\r\n return request(url, \"json\", authToken ? {\r\n headers: {\r\n authorization: `Bearer ${authToken}`\r\n }} : undefined\r\n );\r\n }\r\n\r\n /** Returns the tile URL relative to the base URL.\r\n * If the tile path is a relative URL, the base URL is prepended to it.\r\n * For both absolute and relative tile path URLs, the search parameters are checked. If the search params are empty, the base URL's search params are appended to the tile path.\r\n */\r\n public getTileUrl(tilePath: string): string {\r\n // this._baseUrl does not include the trailing subdirectories.\r\n // This is not an issue because the tile path always starts with the appropriate subdirectories.\r\n // We also do not need to worry about the tile path starting with a slash.\r\n // This happens in these tiles at the second .json level, but the URL API will handle that for us.\r\n const url = new URL(tilePath, this._baseUrl);\r\n\r\n // Never forward the API key or session params to a different origin.\r\n if (!this.isSameOrigin(url))\r\n return url.toString();\r\n\r\n // If tile is a reference to a tileset, iterate over tileset url's search params and store them in this._searchParams so we can pass them down to children\r\n if (this.getTileContentType(url.toString()) === \"tileset\" && url.searchParams.size !== 0) {\r\n for (const [key, value] of url.searchParams.entries()) {\r\n this._searchParams?.append(key, value);\r\n }\r\n }\r\n\r\n if (this._searchParams === undefined || this._searchParams.size === 0) {\r\n return url.toString();\r\n }\r\n\r\n // Append all stored search params to url's existing ones\r\n const newUrl = new URL(url.toString());\r\n for (const [key, value] of this._searchParams.entries()) {\r\n if (!url.searchParams.has(key)) {\r\n // Only append the search param if it does not already exist in the url\r\n newUrl.searchParams.append(key, value);\r\n }\r\n }\r\n\r\n return newUrl.toString();\r\n }\r\n\r\n /** Returns true if `url` has the same origin as the root tileset. Credentials are only sent to that origin. */\r\n private isSameOrigin(url: URL | string): boolean {\r\n return new URL(url).origin === this._baseUrl;\r\n }\r\n\r\n /**\r\n * Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileContent(name: string): Promise<ArrayBuffer> {\r\n const url = this.getTileUrl(name);\r\n let authToken;\r\n if (this._getAuthToken && this.isSameOrigin(url)) {\r\n authToken = await this._getAuthToken();\r\n }\r\n\r\n return request(url, \"arraybuffer\", authToken ? {\r\n headers: {\r\n authorization: `Bearer ${authToken}`\r\n }} : undefined\r\n );\r\n }\r\n\r\n /**\r\n * Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileJson(name: string): Promise<any> {\r\n const url = this.getTileUrl(name);\r\n let authToken;\r\n if (this._getAuthToken && this.isSameOrigin(url)) {\r\n authToken = await this._getAuthToken();\r\n }\r\n\r\n return request(url, \"json\", authToken ? {\r\n headers: {\r\n authorization: `Bearer ${authToken}`\r\n }} : undefined\r\n );\r\n }\r\n\r\n public getTileContentType(url: string): \"tile\" | \"tileset\" {\r\n return new URL(url, \"https://localhost/\").pathname.toLowerCase().endsWith(\"json\") ? \"tileset\" : \"tile\";\r\n }\r\n\r\n /**\r\n * Gets spatial location and extents of this reality data source\r\n * @returns spatial location and extents\r\n * @internal\r\n */\r\n public async getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined> {\r\n let spatialLocation: SpatialLocationAndExtents | undefined;\r\n if (this.key.format === RealityDataFormat.ThreeDTile) {\r\n const rootDocument = await this.getRootDocument(undefined);\r\n spatialLocation = ThreeDTileFormatInterpreter.getSpatialLocationAndExtents(rootDocument);\r\n }\r\n return spatialLocation;\r\n }\r\n /**\r\n * Gets information to identify the product and engine that create this reality data\r\n * Will return undefined if cannot be resolved\r\n * @returns information to identify the product and engine that create this reality data\r\n * @alpha\r\n */\r\n public async getPublisherProductInfo(): Promise<PublisherProductInfo | undefined> {\r\n let publisherInfo: PublisherProductInfo | undefined;\r\n return publisherInfo;\r\n }\r\n}\r\n\r\n"]}
|
|
@@ -9,7 +9,7 @@ export { PerformanceMetrics } from "./render/webgl/PerformanceMetrics";
|
|
|
9
9
|
export { type GLTimerResult, RenderDiagnostics, type RenderSystemDebugControl } from "./render/RenderSystemDebugControl";
|
|
10
10
|
export { formatAnimationBranchId } from "./render/AnimationBranchState";
|
|
11
11
|
export { PrimitiveVisibility, type RenderTargetDebugControl } from "./render/RenderTargetDebugControl";
|
|
12
|
-
export { acquireImdlDecoder, appendQueryParams, ArcGisErrorCode, ArcGisGeometryReaderJSON, type ArcGisGetServiceJsonArgs, ArcGISImageryProvider, type ArcGISServiceMetadata, ArcGisUtilities, type ArcGisValidateSourceArgs, collectMaskRefs, createSpatialTileTreeReferences, deflateCoordinates, type FeatureAttributeDrivenSymbology, FeatureGeometryBaseRenderer, type FeatureGeometryRenderer, FeatureGraphicsRenderer, type FeatureSymbolizedRenderer, type FeatureSymbologyRenderer, GltfReader, type GltfReaderArgs, type GltfReaderResult, type GraphicsGeometryRenderer, ImageryMapTileTree, type ImdlDecoder, ImdlReader, type MapLayerInfoFromTileTree, MapTileTreeReference, RealityModelTileUtils, RealityTileLoader, SpatialTileTreeReferences, type WGS84Extent, WmsUtilities, LayerTileTreeHandler, type MapLayerTreeSetting, LayerTileTreeReferenceHandler } from "../tile/internal";
|
|
12
|
+
export { acquireImdlDecoder, appendQueryParams, ArcGisErrorCode, ArcGisGeometryReaderJSON, type ArcGisGetServiceJsonArgs, ArcGISImageryProvider, type ArcGISServiceMetadata, ArcGisUtilities, type ArcGisValidateSourceArgs, collectMaskRefs, createSpatialTileTreeReferences, deflateCoordinates, type FeatureAttributeDrivenSymbology, FeatureGeometryBaseRenderer, type FeatureGeometryRenderer, FeatureGraphicsRenderer, type FeatureSymbolizedRenderer, type FeatureSymbologyRenderer, GltfReader, type GltfReaderArgs, type GltfReaderResult, type GraphicsGeometryRenderer, ImageryMapTileTree, type ImdlDecoder, ImdlReader, type MapLayerInfoFromTileTree, MapTileTreeReference, RealityModelTileUtils, RealityTileLoader, credentialedFetchRedirect, fetchMapLayerRequest, type MapLayerFetchResult, MapLayerUntrustedOriginError, SpatialTileTreeReferences, type WGS84Extent, WmsUtilities, LayerTileTreeHandler, type MapLayerTreeSetting, LayerTileTreeReferenceHandler } from "../tile/internal";
|
|
13
13
|
export { GoogleMapsDecorator, LogoDecoration } from "./GoogleMapsDecorator";
|
|
14
14
|
export { DebugShaderFile } from "./render/RenderSystemDebugControl";
|
|
15
15
|
export { IModelTileTree } from "./tile/IModelTileTree";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cross-package.d.ts","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,KAAK,aAAa,EAAE,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AACzH,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAGvG,OAAO,EACN,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,wBAAwB,EACxB,KAAK,wBAAwB,EAC7B,qBAAqB,EACrB,KAAK,qBAAqB,EAC1B,eAAe,EACf,KAAK,wBAAwB,EAC7B,eAAe,EACf,+BAA+B,EAC/B,kBAAkB,EAClB,KAAK,+BAA+B,EACpC,2BAA2B,EAC3B,KAAK,uBAAuB,EAC5B,uBAAuB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,UAAU,EACV,KAAK,cAA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ule", { value: true });
|
|
10
|
-
exports._implementationProhibited = exports.IModelTileTree = exports.DebugShaderFile = exports.LogoDecoration = exports.GoogleMapsDecorator = exports.LayerTileTreeReferenceHandler = exports.LayerTileTreeHandler = exports.WmsUtilities = exports.SpatialTileTreeReferences = exports.RealityTileLoader = exports.RealityModelTileUtils = exports.MapTileTreeReference = exports.ImdlReader = exports.ImageryMapTileTree = exports.GltfReader = exports.FeatureGraphicsRenderer = exports.FeatureGeometryBaseRenderer = exports.deflateCoordinates = exports.createSpatialTileTreeReferences = exports.collectMaskRefs = exports.ArcGisUtilities = exports.ArcGISImageryProvider = exports.ArcGisGeometryReaderJSON = exports.ArcGisErrorCode = exports.appendQueryParams = exports.acquireImdlDecoder = exports.PrimitiveVisibility = exports.formatAnimationBranchId = exports.RenderDiagnostics = exports.PerformanceMetrics = exports.Target = exports.OnScreenTarget = exports.GltfDataType = exports.AnimationNodeId = exports._scheduleScriptReference = exports._callIpcChannel = void 0;
|
|
10
|
+
exports._implementationProhibited = exports.IModelTileTree = exports.DebugShaderFile = exports.LogoDecoration = exports.GoogleMapsDecorator = exports.LayerTileTreeReferenceHandler = exports.LayerTileTreeHandler = exports.WmsUtilities = exports.SpatialTileTreeReferences = exports.MapLayerUntrustedOriginError = exports.fetchMapLayerRequest = exports.credentialedFetchRedirect = exports.RealityTileLoader = exports.RealityModelTileUtils = exports.MapTileTreeReference = exports.ImdlReader = exports.ImageryMapTileTree = exports.GltfReader = exports.FeatureGraphicsRenderer = exports.FeatureGeometryBaseRenderer = exports.deflateCoordinates = exports.createSpatialTileTreeReferences = exports.collectMaskRefs = exports.ArcGisUtilities = exports.ArcGISImageryProvider = exports.ArcGisGeometryReaderJSON = exports.ArcGisErrorCode = exports.appendQueryParams = exports.acquireImdlDecoder = exports.PrimitiveVisibility = exports.formatAnimationBranchId = exports.RenderDiagnostics = exports.PerformanceMetrics = exports.Target = exports.OnScreenTarget = exports.GltfDataType = exports.AnimationNodeId = exports._scheduleScriptReference = exports._callIpcChannel = void 0;
|
|
11
11
|
var Symbols_1 = require("../common/internal/Symbols");
|
|
12
12
|
Object.defineProperty(exports, "_callIpcChannel", { enumerable: true, get: function () { return Symbols_1._callIpcChannel; } });
|
|
13
13
|
Object.defineProperty(exports, "_scheduleScriptReference", { enumerable: true, get: function () { return Symbols_1._scheduleScriptReference; } });
|
|
@@ -45,6 +45,9 @@ Object.defineProperty(exports, "ImdlReader", { enumerable: true, get: function (
|
|
|
45
45
|
Object.defineProperty(exports, "MapTileTreeReference", { enumerable: true, get: function () { return internal_1.MapTileTreeReference; } });
|
|
46
46
|
Object.defineProperty(exports, "RealityModelTileUtils", { enumerable: true, get: function () { return internal_1.RealityModelTileUtils; } });
|
|
47
47
|
Object.defineProperty(exports, "RealityTileLoader", { enumerable: true, get: function () { return internal_1.RealityTileLoader; } });
|
|
48
|
+
Object.defineProperty(exports, "credentialedFetchRedirect", { enumerable: true, get: function () { return internal_1.credentialedFetchRedirect; } });
|
|
49
|
+
Object.defineProperty(exports, "fetchMapLayerRequest", { enumerable: true, get: function () { return internal_1.fetchMapLayerRequest; } });
|
|
50
|
+
Object.defineProperty(exports, "MapLayerUntrustedOriginError", { enumerable: true, get: function () { return internal_1.MapLayerUntrustedOriginError; } });
|
|
48
51
|
Object.defineProperty(exports, "SpatialTileTreeReferences", { enumerable: true, get: function () { return internal_1.SpatialTileTreeReferences; } });
|
|
49
52
|
Object.defineProperty(exports, "WmsUtilities", { enumerable: true, get: function () { return internal_1.WmsUtilities; } });
|
|
50
53
|
Object.defineProperty(exports, "LayerTileTreeHandler", { enumerable: true, get: function () { return internal_1.LayerTileTreeHandler; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cross-package.js","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuF;AAA9E,0GAAA,eAAe,OAAA;AAAE,mHAAA,wBAAwB,OAAA;AAClD,6EAA4E;AA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AAA,UAAU,OAAA;AAEV,gHAAA,oBAAoB,OAAA;AACpB,iHAAA,qBAAqB,OAAA;AACrB,6GAAA,iBAAiB,OAAA;AACjB,qHAAA,yBAAyB,OAAA;AACzB,gHAAA,oBAAoB,OAAA;AAEpB,wHAAA,4BAA4B,OAAA;AAC5B,qHAAA,yBAAyB,OAAA;AAEzB,wGAAA,YAAY,OAAA;AACZ,gHAAA,oBAAoB,OAAA;AAA4B,yHAAA,6BAA6B,OAAA;AAE9E,6DAA4E;AAAnE,0HAAA,mBAAmB,OAAA;AAAE,qHAAA,cAAc,OAAA;AAE5C,qFAAqF;AACrF,mCAAmC;AACnC,8EAAoE;AAA3D,2HAAA,eAAe,OAAA;AACxB,wDAAuD;AAA9C,gHAAA,cAAc,OAAA;AAMvB,sDAAuE;AAA9D,oHAAA,yBAAyB,OAAA","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 Utils\r\n */\r\n\r\nexport { _callIpcChannel, _scheduleScriptReference } from \"../common/internal/Symbols\";\r\nexport { AnimationNodeId } from \"../common/internal/render/AnimationNodeId\";\r\nexport { GltfDataType, type GltfMeshPrimitive } from \"../common/gltf/GltfSchema\";\r\nexport { OnScreenTarget, Target } from \"./render/webgl/Target\";\r\nexport { PerformanceMetrics } from \"./render/webgl/PerformanceMetrics\";\r\nexport { type GLTimerResult, RenderDiagnostics, type RenderSystemDebugControl } from \"./render/RenderSystemDebugControl\";\r\nexport { formatAnimationBranchId } from \"./render/AnimationBranchState\";\r\nexport { PrimitiveVisibility, type RenderTargetDebugControl } from \"./render/RenderTargetDebugControl\";\r\n\r\n// Used by frontend-tiles, map-layers-formats, frontend-dev-tools\r\nexport {\r\n acquireImdlDecoder,\r\n appendQueryParams,\r\n ArcGisErrorCode,\r\n ArcGisGeometryReaderJSON,\r\n type ArcGisGetServiceJsonArgs,\r\n ArcGISImageryProvider,\r\n type ArcGISServiceMetadata,\r\n ArcGisUtilities,\r\n type ArcGisValidateSourceArgs,\r\n collectMaskRefs,\r\n createSpatialTileTreeReferences,\r\n deflateCoordinates,\r\n type FeatureAttributeDrivenSymbology,\r\n FeatureGeometryBaseRenderer,\r\n type FeatureGeometryRenderer,\r\n FeatureGraphicsRenderer,\r\n type FeatureSymbolizedRenderer,\r\n type FeatureSymbologyRenderer,\r\n GltfReader,\r\n type GltfReaderArgs,\r\n type GltfReaderResult,\r\n type GraphicsGeometryRenderer,\r\n ImageryMapTileTree,\r\n type ImdlDecoder,\r\n ImdlReader,\r\n type MapLayerInfoFromTileTree,\r\n MapTileTreeReference,\r\n RealityModelTileUtils,\r\n RealityTileLoader,\r\n credentialedFetchRedirect,\r\n fetchMapLayerRequest,\r\n type MapLayerFetchResult,\r\n MapLayerUntrustedOriginError,\r\n SpatialTileTreeReferences,\r\n type WGS84Extent,\r\n WmsUtilities,\r\n LayerTileTreeHandler, type MapLayerTreeSetting, LayerTileTreeReferenceHandler\r\n} from \"../tile/internal\";\r\nexport { GoogleMapsDecorator, LogoDecoration } from \"./GoogleMapsDecorator\";\r\n\r\n// Used by display-test-app which currently builds using both ESModules and CommonJS.\r\n// Remove once CommonJS is dropped.\r\nexport { DebugShaderFile } from \"./render/RenderSystemDebugControl\";\r\nexport { IModelTileTree } from \"./tile/IModelTileTree\";\r\n\r\n// Used by cesium-renderer\r\nexport { type RenderPlan } from \"./render/RenderPlan\";\r\nexport { type RenderAreaPattern } from \"./render/RenderAreaPattern\";\r\nexport { type RenderGeometry } from \"./render/RenderGeometry\";\r\nexport { _implementationProhibited } from \"../common/internal/Symbols\";\r\n"]}
|
|
@@ -52,7 +52,7 @@ export declare abstract class RealityTileLoader {
|
|
|
52
52
|
/** The base URL the glTF reader should resolve relatively-referenced resources (e.g. external images) against.
|
|
53
53
|
* Prefer the tile's own content URL so that images referenced relative to the content (typical of JSON `.gltf` tiles)
|
|
54
54
|
* resolve correctly, rather than against the tileset root. The tileset's query/authentication parameters (e.g.
|
|
55
|
-
* `?sig=abc`) are preserved on the returned URL: the data source appends them to every tile request, and the glTF
|
|
55
|
+
* `?sig=abc`) are preserved on the returned URL when it shares the tileset's origin: the data source appends them to every tile request, and the glTF
|
|
56
56
|
* reader re-applies the base URL's query string to each relatively-referenced resource (see `GltfReader.resolveUrl`),
|
|
57
57
|
* so external resources must be fetched with the same parameters.
|
|
58
58
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RealityTileLoader.d.ts","sourceRoot":"","sources":["../../../../src/internal/tile/RealityTileLoader.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAoB,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAsD,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGtH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAkB,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1D,OAAO,EACO,gBAAgB,EAAkE,eAAe,EAA0B,qBAAqB,EAC5J,WAAW,EAAE,kBAAkB,EAAE,IAAI,EAAe,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,kBAAkB,EAAE,QAAQ,EAC9H,MAAM,qBAAqB,CAAC;AAQ7B;;GAEG;AACH,8BAAsB,iBAAiB;IAKlB,OAAO,CAAC,gBAAgB,CAAC;IAJ5C,OAAO,CAAC,oBAAoB,CAAS;IACrC,SAAgB,yBAAyB,EAAE,MAAM,CAAC;IAClD,SAAgB,wBAAwB,EAAE,MAAM,CAAC;gBAEtB,gBAAgB,CAAC,EAAE,qBAAqB,YAAA;IAK5D,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,E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UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAUtI"}
|
|
@@ -89,7 +89,7 @@ class RealityTileLoader {
|
|
|
89
89
|
/** The base URL the glTF reader should resolve relatively-referenced resources (e.g. external images) against.
|
|
90
90
|
* Prefer the tile's own content URL so that images referenced relative to the content (typical of JSON `.gltf` tiles)
|
|
91
91
|
* resolve correctly, rather than against the tileset root. The tileset's query/authentication parameters (e.g.
|
|
92
|
-
* `?sig=abc`) are preserved on the returned URL: the data source appends them to every tile request, and the glTF
|
|
92
|
+
* `?sig=abc`) are preserved on the returned URL when it shares the tileset's origin: the data source appends them to every tile request, and the glTF
|
|
93
93
|
* reader re-applies the base URL's query string to each relatively-referenced resource (see `GltfReader.resolveUrl`),
|
|
94
94
|
* so external resources must be fetched with the same parameters.
|
|
95
95
|
*/
|
|
@@ -100,8 +100,10 @@ class RealityTileLoader {
|
|
|
100
100
|
return tile.contentUrl;
|
|
101
101
|
try {
|
|
102
102
|
const resolved = new URL(tile.contentUrl, treeBaseUrl);
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
const base = new URL(treeBaseUrl);
|
|
104
|
+
// Only inherit the tileset's query (which may contain credentials) on the tileset's own origin.
|
|
105
|
+
if ("" === resolved.search && resolved.origin === base.origin)
|
|
106
|
+
resolved.search = base.search;
|
|
105
107
|
return resolved.toString();
|
|
106
108
|
}
|
|
107
109
|
catch {
|