@itwin/core-frontend 5.1.6 → 5.1.8
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 +13 -1
- package/lib/cjs/RealityDataSource.d.ts.map +1 -1
- package/lib/cjs/RealityDataSource.js +5 -1
- package/lib/cjs/RealityDataSource.js.map +1 -1
- package/lib/cjs/internal/GoogleMapsDecorator.js +6 -6
- package/lib/cjs/internal/GoogleMapsDecorator.js.map +1 -1
- package/lib/esm/RealityDataSource.d.ts.map +1 -1
- package/lib/esm/RealityDataSource.js +5 -1
- package/lib/esm/RealityDataSource.js.map +1 -1
- package/lib/esm/internal/GoogleMapsDecorator.js +6 -6
- package/lib/esm/internal/GoogleMapsDecorator.js.map +1 -1
- package/lib/public/images/GoogleMaps_Logo_Gray.svg +50 -0
- package/lib/public/images/GoogleMaps_Logo_WithDarkOutline.svg +78 -0
- package/lib/public/images/GoogleMaps_Logo_WithLightOutline.svg +78 -0
- package/package.json +20 -20
- package/lib/public/images/google_on_non_white.png +0 -0
- package/lib/public/images/google_on_non_white_hdpi.png +0 -0
- package/lib/public/images/google_on_white.png +0 -0
- package/lib/public/images/google_on_white_hdpi.png +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# Change Log - @itwin/core-frontend
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 17 Sep 2025 17:17:16 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 5.1.8
|
|
6
|
+
Wed, 17 Sep 2025 17:17:16 GMT
|
|
7
|
+
|
|
8
|
+
### Updates
|
|
9
|
+
|
|
10
|
+
- Update Google Maps attribution
|
|
11
|
+
|
|
12
|
+
## 5.1.7
|
|
13
|
+
Tue, 09 Sep 2025 19:28:04 GMT
|
|
14
|
+
|
|
15
|
+
_Version update only_
|
|
4
16
|
|
|
5
17
|
## 5.1.6
|
|
6
18
|
Mon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C,EAAE,KAAK,CAAC;IACf,+IAA+I;IAC/I,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,yKAAyK;IACzK,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,qBAAa,qBAAsB,YAAW,yBAAyB;IACrE,+DAA+D;IAC/D,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,+IAA+I;IAC/I,OAAO,CAAC,aAAa,CAAC,CAAoC;IAC1D,uCAAuC;IACvC,OAAO,CAAC,UAAU,CAAsB;IACxC,oGAAoG;IACpG,SAAgB,oBAAoB,QAAQ;IAE/B,uBAAuB,CAAC,GAAG,EAAE,oBAAoB,EAAE,OAAO,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;gBAQrH,OAAO,EAAE,4BAA4B;IAMxD;;;OAGG;IACU,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAUpC,QAAQ,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAInC,eAAe,CAAC,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAyBzF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,WAElC"}
|
|
@@ -217,8 +217,12 @@ class Google3dTilesProvider {
|
|
|
217
217
|
let copyrightMsg = "Data provided by:<br><ul>";
|
|
218
218
|
copyrightMsg += sortedCopyrights.map(([key]) => `<li>${key}</li>`).join("");
|
|
219
219
|
copyrightMsg += "</ul>";
|
|
220
|
+
const iconSrc = document.createElement("img");
|
|
221
|
+
iconSrc.src = `${IModelApp_1.IModelApp.publicPath}images/GoogleMaps_Logo_Gray.svg`;
|
|
222
|
+
iconSrc.style.padding = "10px 10px 5px 10px";
|
|
220
223
|
cards.appendChild(IModelApp_1.IModelApp.makeLogoCard({
|
|
221
|
-
iconSrc
|
|
224
|
+
iconSrc,
|
|
225
|
+
iconWidth: 98,
|
|
222
226
|
heading: "Google Photorealistic 3D Tiles",
|
|
223
227
|
notice: copyrightMsg
|
|
224
228
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RealityDataSource.js","sourceRoot":"","sources":["../../src/RealityDataSource.ts"],"names":[],"mappings":";;;AA0XA,kDAEC;AA5XD;;;+FAG+F;AAC/F;;GAEG;AACH,sDAA0H;AAC1H,oDAA6J;AAE7J,4EAAyE;AACzE,8CAAkG;AAClG,uFAAoF;AACpF,2FAAwF;AACxF,+FAA4F;AAC5F,sGAAmG;AACnG,2CAAwC;AACxC,wEAAoF;AAIpF,MAAM,cAAc,GAAW,+CAAsB,CAAC,WAAW,CAAC;AAElE;;;GAGG;AACH,MAAa,gBAAiB,SAAQ,2BAAY;IAChD,YAAmB,WAA8B,EAAE,OAAe,EAAE,WAA6B;QAC/F,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3C,CAAC;CACF;AAJD,4CAIC;AAkGD;;GAEG;AACH,IAAiB,iBAAiB,CAuFjC;AAvFD,WAAiB,iBAAiB;IAChC;;;;;OAKG;IACH,SAAgB,gBAAgB,CAAC,UAAkB,EAAE,aAAmC,EAAE,WAA+B;QACvH,IAAI,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,+BAAiB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC/E,IAAI,iCAAsB,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC;YACrD,MAAM,QAAQ,GAAG,iCAAmB,CAAC,cAAc,CAAC;YACpD,IAAI,iBAAiB,GAAyB,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAG,iCAAsB,CAAC,aAAa,EAAE,CAAC,CAAC,uBAAuB;YACtI,6DAA6D;YAC7D,MAAM,WAAW,GAAG,iCAAsB,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;YACtE,IAAI,WAAW,EAAE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,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAEM,KAAK,CAAC,eAAe,CAAC,KAAuB,EAAE,EAAkB;QACtE,MAAM,YAAY,GAAG,IAAA,mCAAa,EAAC,EAAE,CAAC,CAAC;QAEvC,yDAAyD;QACzD,IAAI,YAAY,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YAC1B,oCAAoC;YACpC,iGAAiG;YACjG,MAAM,gBAAgB,GAAG,CAAC,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAEjF,IAAI,YAAY,GAAG,2BAA2B,CAAC;YAC/C,YAAY,IAAI,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC5E,YAAY,IAAI,OAAO,CAAC;YAExB,KAAK,CAAC,WAAW,CAAC,qBAAS,CAAC,YAAY,CAAC;gBACvC,OAAO,EAAE,GAAG,qBAAS,CAAC,UAAU,iCAAiC;gBACjE,OAAO,EAAE,gCAAgC;gBACzC,MAAM,EAAE,YAAY;aACrB,CAAC,CAAC,CAAC;QACN,CAAC;IACH,CAAC;CACF;AA9DD,sDA8DC;AAED;;GAEG;AACH,SAAgB,mBAAmB;IACjC,OAAO,kDAAkD,CAAC;AAC5D,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\nimport { BentleyError, BentleyStatus, GuidString, Logger, LoggingMetaData, RealityDataStatus } from \"@itwin/core-bentley\";\nimport { Cartographic, EcefLocation, OrbitGtBlobProps, RealityData, RealityDataFormat, RealityDataProvider, RealityDataSourceKey } from \"@itwin/core-common\";\nimport { Range3d } from \"@itwin/core-geometry\";\nimport { FrontendLoggerCategory } from \"./common/FrontendLoggerCategory\";\nimport { CesiumIonAssetProvider, ContextShareProvider, getCesiumAssetUrl } from \"./tile/internal\";\nimport { RealityDataSourceTilesetUrlImpl } from \"./RealityDataSourceTilesetUrlImpl\";\nimport { RealityDataSourceContextShareImpl } from \"./RealityDataSourceContextShareImpl\";\nimport { RealityDataSourceCesiumIonAssetImpl } from \"./RealityDataSourceCesiumIonAssetImpl\";\nimport { RealityDataSourceGoogle3dTilesImpl } from \"./internal/RealityDataSourceGoogle3dTilesImpl\";\nimport { IModelApp } from \"./IModelApp\";\nimport { getCopyrights, GoogleMapsDecorator } from \"./internal/GoogleMapsDecorator\";\nimport { DecorateContext } from \"./ViewContext\";\nimport { ScreenViewport } from \"./Viewport\";\n\nconst loggerCategory: string = FrontendLoggerCategory.RealityData;\n\n/**\n * Reality Data Operation error\n * @alpha\n */\nexport class RealityDataError extends BentleyError {\n public constructor(errorNumber: RealityDataStatus, message: string, getMetaData?: LoggingMetaData) {\n super(errorNumber, message, getMetaData);\n }\n}\n\n/** This interface provide spatial location and volume of interest, in meters, centered around `spatial location`\n * @alpha\n */\nexport interface SpatialLocationAndExtents {\n /** location of the point at the center of the reaity data */\n location: Cartographic | EcefLocation;\n /** extents of the volume around location */\n worldRange: Range3d;\n /** true if this reality data is geolocated\n * A reality data is geolocated when we can compute a valid position relative to the earth surface.\n * Note that some reality data contains custom coordinate system without any information on the relative position on earth.\n * These reality data will have a location and worldRange but will be identified by the isGeoLocated set to false.\n */\n isGeolocated: boolean;\n}\n\n/** This interface provides information to identify the product and engine that create this reality data\n * @alpha\n */\nexport interface PublisherProductInfo {\n /** product that create this reality data */\n product: string;\n /** engine that create this reality data */\n engine: string;\n /** the version of the engine that create this reality data */\n version: string;\n}\n\n/** This interface provide methods used to access a reality data from a reality data provider\n * @beta\n */\nexport interface RealityDataSource {\n readonly key: RealityDataSourceKey;\n readonly isContextShare: boolean;\n readonly realityDataId: string | undefined;\n /** Metatdata on the reality data source */\n readonly realityData: RealityData | undefined;\n /** The reality data type (e.g.: \"RealityMesh3DTiles\", OPC, Terrain3DTiles, Cesium3DTiles, ... )*/\n readonly realityDataType: string | undefined;\n /** This method returns the URL to obtain the Reality Data properties.\n * @param iTwinId id of associated iTwin project\n * @returns string containing the URL to reality data.\n */\n getServiceUrl(iTwinId: GuidString | undefined): Promise<string | undefined>;\n /** If true, the geometricError property of the tiles will be used to compute screen-space error.\n * @alpha\n */\n readonly usesGeometricError?: boolean;\n /** If [[usesGeometricError]] is `true`, optionally specifies the maximum error, in pixels, to permit for a tile before requiring refinement of that tile.\n * Default: 16\n * @alpha\n */\n readonly maximumScreenSpaceError?: number;\n /** Given the URL of a tile's content, return the type of that content.\n * \"tileset\" indicates the content points to a JSON tileset describing the structure of the tile tree below the tile.\n * \"tile\" indicates the content points to a binary representation of the tile's graphics.\n * @alpha\n */\n getTileContentType(url: string): \"tile\" | \"tileset\";\n\n /** Gets a reality data root document json\n * @returns tile data json\n * @internal\n */\n getRootDocument(iTwinId: GuidString | undefined): Promise<any>;\n /** Gets tile content\n * @param name name or path of tile\n * @returns array buffer of tile content\n * @internal\n */\n getTileContent(name: string): Promise<any>;\n /** Gets a tileset's app data json\n * @param name name or path of tile\n * @returns app data json object\n * @internal\n */\n getTileJson(name: string): Promise<any>;\n /** Gets spatial location and extents of this reality data source.\n * Will return undefined if cannot be resolved or is unbounded (cover entire earth eg: Open Street Map Building from Ion Asset)\n * @returns spatial location and extents\n * @throws [[RealityDataError]] if source is invalid or cannot be read\n * @alpha\n */\n getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined>;\n /** Gets information to identify the product and engine that create this reality data\n * Will return undefined if cannot be resolved\n * @returns information to identify the product and engine that create this reality data\n * @alpha\n */\n getPublisherProductInfo(): Promise<PublisherProductInfo | undefined>;\n /** Optional, gets the tileset url associated with the reality data source\n * @returns tileset url\n * @internal\n */\n getTilesetUrl?(): string | undefined;\n}\n/** Utility functions for RealityDataSource\n * @beta\n */\nexport namespace RealityDataSource {\n /** Create a RealityDataSourceKey from a tilesetUrl.\n * @param tilesetUrl the reality data attachment url\n * @param inputProvider identify the RealityDataProvider if known, otherwise function will try to extract it from the tilesetUrl\n * @param inputFormat identify the RealityDataFormat if known, otherwise function will try to extract it from the tilesetUrl\n * @returns the RealityDataSourceKey that uniquely identify a reality data for a provider\n */\n export function createKeyFromUrl(tilesetUrl: string, inputProvider?: RealityDataProvider, inputFormat?: RealityDataFormat): RealityDataSourceKey {\n let format = inputFormat ? inputFormat : RealityDataFormat.fromUrl(tilesetUrl);\n if (CesiumIonAssetProvider.isProviderUrl(tilesetUrl)) {\n const provider = RealityDataProvider.CesiumIonAsset;\n let cesiumIonAssetKey: RealityDataSourceKey = { provider, format, id: CesiumIonAssetProvider.osmBuildingId }; // default OSM building\n // Parse URL to extract possible asset id and key if provided\n const cesiumAsset = CesiumIonAssetProvider.parseCesiumUrl(tilesetUrl);\n if (cesiumAsset) {\n cesiumIonAssetKey = RealityDataSource.createCesiumIonAssetKey(cesiumAsset.id, cesiumAsset.key);\n }\n return cesiumIonAssetKey;\n }\n\n // Try to extract realityDataId from URL and if not possible, use the url as the key\n if (ContextShareProvider.isProviderUrl(tilesetUrl)) {\n const info = ContextShareProvider.getInfoFromUrl(tilesetUrl);\n const provider = inputProvider ? inputProvider : info.provider;\n format = inputFormat ? inputFormat : info.format;\n const contextShareKey: RealityDataSourceKey = { provider, format, id: info.id, iTwinId: info.iTwinId };\n return contextShareKey;\n }\n\n // default to tileSetUrl\n const provider2 = inputProvider ? inputProvider : RealityDataProvider.TilesetUrl;\n const urlKey: RealityDataSourceKey = { provider: provider2, format, id: tilesetUrl };\n return urlKey;\n }\n /** @alpha - was used for a very specific case of point cloud (opc) attachment that should not be made public */\n export function createKeyFromBlobUrl(blobUrl: string, inputProvider?: RealityDataProvider, inputFormat?: RealityDataFormat): RealityDataSourceKey {\n const info = ContextShareProvider.getInfoFromBlobUrl(blobUrl);\n const format = inputFormat ? inputFormat : info.format;\n const provider = inputProvider ? inputProvider : info.provider;\n const contextShareKey: RealityDataSourceKey = { provider, format, id: info.id };\n return contextShareKey;\n }\n /** @alpha - OrbitGtBlobProps is alpha */\n export function createKeyFromOrbitGtBlobProps(orbitGtBlob: OrbitGtBlobProps, inputProvider?: RealityDataProvider, inputFormat?: RealityDataFormat): RealityDataSourceKey {\n const format = inputFormat ? inputFormat : RealityDataFormat.OPC;\n if (orbitGtBlob.blobFileName && orbitGtBlob.blobFileName.toLowerCase().startsWith(\"http\")) {\n return RealityDataSource.createKeyFromBlobUrl(orbitGtBlob.blobFileName, inputProvider, format);\n } else if (orbitGtBlob.rdsUrl) {\n return RealityDataSource.createKeyFromUrl(orbitGtBlob.rdsUrl, inputProvider, format);\n }\n const provider = inputProvider ? inputProvider : RealityDataProvider.OrbitGtBlob;\n const id = `${orbitGtBlob.accountName}:${orbitGtBlob.containerName}:${orbitGtBlob.blobFileName}:?${orbitGtBlob.sasToken}`;\n return { provider, format, id };\n }\n /** @alpha - OrbitGtBlobProps is alpha */\n export function createOrbitGtBlobPropsFromKey(rdSourceKey: RealityDataSourceKey): OrbitGtBlobProps | undefined {\n if (rdSourceKey.provider !== RealityDataProvider.OrbitGtBlob)\n return undefined;\n const splitIds = rdSourceKey.id.split(\":\");\n const sasTokenIndex = rdSourceKey.id.indexOf(\":?\");\n const sasToken = rdSourceKey.id.substring(sasTokenIndex + 2);\n const orbitGtBlob: OrbitGtBlobProps = {\n accountName: splitIds[0],\n containerName: splitIds[1],\n blobFileName: splitIds[2],\n sasToken,\n };\n return orbitGtBlob;\n }\n /** @internal - Is used by \"fdt attach cesium asset\" keyin*/\n export function createCesiumIonAssetKey(osmAssetId: number, requestKey: string): RealityDataSourceKey {\n const id = getCesiumAssetUrl(osmAssetId,requestKey);\n return {provider: RealityDataProvider.CesiumIonAsset, format: RealityDataFormat.ThreeDTile, id};\n }\n /** Return an instance of a RealityDataSource from a source key.\n * There will aways be only one reality data RealityDataSource for a corresponding reality data source key.\n * @alpha\n */\n export async function fromKey(key: RealityDataSourceKey, iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined> {\n const provider = IModelApp.realityDataSourceProviders.find(key.provider);\n if (!provider) {\n Logger.logWarning(loggerCategory, `RealityDataSourceProvider \"${key.provider}\" is not registered`);\n return undefined;\n }\n\n return provider.createRealityDataSource(key, iTwinId);\n }\n}\n\n/** A named supplier of [RealityDataSource]]s.\n * The provider's name is stored in a [RealityDataSourceKey]($common). When the [[RealityDataSource]] is requested from the key,\n * the provider is looked up in [[IModelApp.realityDataSourceProviders]] by its name and, if found, its [[createRealityDataSource]] method\n * is invoked to produce the reality data source.\n * @beta\n */\n\nexport interface RealityDataSourceProvider {\n /** Produce a RealityDataSource for the specified `key`.\n * @param key Identifies the reality data source.\n * @param iTwinId A default iTwinId to use.\n * @returns the requested reality data source, or `undefined` if it could not be produced.\n */\n createRealityDataSource(key: RealityDataSourceKey, iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined>;\n /** Optionally add any decorations specific to this reality data source provider.\n * For example, the Google Photorealistic 3D Tiles reality data source provider will add the Google logo.\n */\n decorate?(_context: DecorateContext): void;\n /** Optionally add attribution logo cards to the viewport's logo div. */\n addAttributions?(cards: HTMLTableElement, vp: ScreenViewport): Promise<void>;\n /** Enables cached decorations for this provider. @see [[ViewportDecorator.useCachedDecorations]] */\n useCachedDecorations?: true | undefined;\n}\n\n/** A registry of [[RealityDataSourceProvider]]s identified by their unique names. The registry can be accessed via [[IModelApp.realityDataSourceProviders]].\n * It includes a handful of built-in providers for sources like Cesium ION, ContextShare, OrbitGT, and arbitrary public-accessible URLs.\n * Any number of additional providers can be registered. They should typically be registered just after [[IModelApp.startup]].\n * @beta\n */\nexport class RealityDataSourceProviderRegistry {\n private readonly _providers = new Map<string, RealityDataSourceProvider>();\n\n /** @internal */\n public constructor() {\n this.register(RealityDataProvider.CesiumIonAsset, {\n createRealityDataSource: async (key, iTwinId) => RealityDataSourceCesiumIonAssetImpl.createFromKey(key, iTwinId),\n });\n this.register(RealityDataProvider.TilesetUrl, {\n createRealityDataSource: async (key, iTwinId) => RealityDataSourceTilesetUrlImpl.createFromKey(key, iTwinId),\n });\n this.register(RealityDataProvider.ContextShare, {\n createRealityDataSource: async (key, iTwinId) => RealityDataSourceContextShareImpl.createFromKey(key, iTwinId),\n });\n this.register(RealityDataProvider.OrbitGtBlob, {\n // ###TODO separate TilesetUrlImpl\n createRealityDataSource: async (key, iTwinId) => RealityDataSourceTilesetUrlImpl.createFromKey(key, iTwinId),\n });\n }\n\n /** Register `provider` to produce [[RealityDataSource]]s for the specified provider `name`. */\n public register(name: string, provider: RealityDataSourceProvider): void {\n this._providers.set(name, provider);\n }\n\n /** Look up the provider registered by the specified `name`. */\n public find(name: string): RealityDataSourceProvider | undefined {\n return this._providers.get(name);\n }\n}\n\n/**\n * Options for creating a Google Photorealistic 3D Tiles reality data source provider.\n * The caller must provide either an API key or a function that returns an auth token.\n * @beta\n */\nexport type Google3dTilesProviderOptions = {\n /** Google Map Tiles API Key used to access Google 3D Tiles. */\n apiKey: string;\n getAuthToken?: never;\n /** If true, the data attributions/copyrights from the Google 3D Tiles will be displayed on screen. The Google Maps logo will always be displayed. Defaults to `true`. */\n showCreditsOnScreen?: boolean\n} | {\n apiKey?: never;\n /** Function that returns an OAuth token for authenticating with Google 3D Tiles. This token is expected to not contain the \"Bearer\" prefix. */\n getAuthToken: () => Promise<string>;\n /** If true, the data attributions/copyrights from the Google 3D Tiles will be displayed on screen. The Google Maps logo will always be displayed. Defaults to `true`. */\n showCreditsOnScreen?: boolean;\n};\n\n/**\n * Will provide Google Photorealistic 3D Tiles (in 3dTile format).\n * A valid API key or getAuthToken fuction must be supplied when creating this provider.\n * To use this provider, you must register it with [[IModelApp.realityDataSourceProviders]].\n * Example usage:\n * ```ts\n * [[include:GooglePhotorealistic3dTiles_providerApiKey]]\n * ```\n * @see [Google Photorealistic 3D Tiles]($docs/learning/frontend/GooglePhotorealistic3dTiles.md)\n * @beta\n */\nexport class Google3dTilesProvider implements RealityDataSourceProvider {\n /** Google Map Tiles API Key used to access Google 3D Tiles. */\n private _apiKey?: string;\n /** Function that returns an OAuth token for authenticating with Google 3D Tiles. This token is expected to not contain the \"Bearer\" prefix. */\n private _getAuthToken?: () => Promise<string | undefined>;\n /** Decorator for Google Maps logos. */\n private _decorator: GoogleMapsDecorator;\n /** Enables cached decorations for this provider. @see [[ViewportDecorator.useCachedDecorations]] */\n public readonly useCachedDecorations = true;\n\n public async createRealityDataSource(key: RealityDataSourceKey, iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined> {\n if (!this._apiKey && !this._getAuthToken) {\n Logger.logError(loggerCategory, \"Either an API key or getAuthToken function are required to create a Google3dTilesProvider.\");\n return undefined;\n }\n return RealityDataSourceGoogle3dTilesImpl.createFromKey(key, iTwinId, this._apiKey, this._getAuthToken);\n }\n\n public constructor(options: Google3dTilesProviderOptions) {\n this._apiKey = options.apiKey;\n this._getAuthToken = options.getAuthToken;\n this._decorator = new GoogleMapsDecorator(options.showCreditsOnScreen ?? true);\n }\n\n /**\n * Initialize the Google 3D Tiles reality data source provider by activating its decorator, which consists of loading the correct Google Maps logo.\n * @returns `true` if the decorator was successfully activated, otherwise `false`.\n */\n public async initialize(): Promise<boolean> {\n const isActivated = await this._decorator.activate(\"satellite\");\n if (!isActivated) {\n const msg = \"Failed to activate decorator\";\n Logger.logError(loggerCategory, msg);\n throw new BentleyError(BentleyStatus.ERROR, msg);\n }\n return isActivated;\n }\n\n public decorate(_context: DecorateContext): void {\n this._decorator.decorate(_context);\n }\n\n public async addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void> {\n const copyrightMap = getCopyrights(vp);\n\n // Only add another logo card if the tiles have copyright\n if (copyrightMap.size > 0) {\n // Order by most occurances to least\n // See https://developers.google.com/maps/documentation/tile/create-renderer#display-attributions\n const sortedCopyrights = [...copyrightMap.entries()].sort((a, b) => b[1] - a[1]);\n\n let copyrightMsg = \"Data provided by:<br><ul>\";\n copyrightMsg += sortedCopyrights.map(([key]) => `<li>${key}</li>`).join(\"\");\n copyrightMsg += \"</ul>\";\n\n cards.appendChild(IModelApp.makeLogoCard({\n iconSrc: `${IModelApp.publicPath}images/google_on_white_hdpi.png`,\n heading: \"Google Photorealistic 3D Tiles\",\n notice: copyrightMsg\n }));\n }\n }\n}\n\n/** Returns the URL used for retrieving Google Photorealistic 3D Tiles.\n * @beta\n */\nexport function getGoogle3dTilesUrl() {\n return \"https://tile.googleapis.com/v1/3dtiles/root.json\";\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RealityDataSource.js","sourceRoot":"","sources":["../../src/RealityDataSource.ts"],"names":[],"mappings":";;;AA+XA,kDAEC;AAjYD;;;+FAG+F;AAC/F;;GAEG;AACH,sDAA0H;AAC1H,oDAA6J;AAE7J,4EAAyE;AACzE,8CAAkG;AAClG,uFAAoF;AACpF,2FAAwF;AACxF,+FAA4F;AAC5F,sGAAmG;AACnG,2CAAwC;AACxC,wEAAoF;AAIpF,MAAM,cAAc,GAAW,+CAAsB,CAAC,WAAW,CAAC;AAElE;;;GAGG;AACH,MAAa,gBAAiB,SAAQ,2BAAY;IAChD,YAAmB,WAA8B,EAAE,OAAe,EAAE,WAA6B;QAC/F,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3C,CAAC;CACF;AAJD,4CAIC;AAkGD;;GAEG;AACH,IAAiB,iBAAiB,CAuFjC;AAvFD,WAAiB,iBAAiB;IAChC;;;;;OAKG;IACH,SAAgB,gBAAgB,CAAC,UAAkB,EAAE,aAAmC,EAAE,WAA+B;QACvH,IAAI,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,+BAAiB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC/E,IAAI,iCAAsB,CAAC,aAAa,CAAC,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ACP,SAAS,EAAE,EAAE;gBACb,OAAO,EAAE,gCAAgC;gBACzC,MAAM,EAAE,YAAY;aACrB,CAAC,CAAC,CAAC;QACN,CAAC;IACH,CAAC;CACF;AAnED,sDAmEC;AAED;;GAEG;AACH,SAAgB,mBAAmB;IACjC,OAAO,kDAAkD,CAAC;AAC5D,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\nimport { BentleyError, BentleyStatus, GuidString, Logger, LoggingMetaData, RealityDataStatus } from \"@itwin/core-bentley\";\nimport { Cartographic, EcefLocation, OrbitGtBlobProps, RealityData, RealityDataFormat, RealityDataProvider, RealityDataSourceKey } from \"@itwin/core-common\";\nimport { Range3d } from \"@itwin/core-geometry\";\nimport { FrontendLoggerCategory } from \"./common/FrontendLoggerCategory\";\nimport { CesiumIonAssetProvider, ContextShareProvider, getCesiumAssetUrl } from \"./tile/internal\";\nimport { RealityDataSourceTilesetUrlImpl } from \"./RealityDataSourceTilesetUrlImpl\";\nimport { RealityDataSourceContextShareImpl } from \"./RealityDataSourceContextShareImpl\";\nimport { RealityDataSourceCesiumIonAssetImpl } from \"./RealityDataSourceCesiumIonAssetImpl\";\nimport { RealityDataSourceGoogle3dTilesImpl } from \"./internal/RealityDataSourceGoogle3dTilesImpl\";\nimport { IModelApp } from \"./IModelApp\";\nimport { getCopyrights, GoogleMapsDecorator } from \"./internal/GoogleMapsDecorator\";\nimport { DecorateContext } from \"./ViewContext\";\nimport { ScreenViewport } from \"./Viewport\";\n\nconst loggerCategory: string = FrontendLoggerCategory.RealityData;\n\n/**\n * Reality Data Operation error\n * @alpha\n */\nexport class RealityDataError extends BentleyError {\n public constructor(errorNumber: RealityDataStatus, message: string, getMetaData?: LoggingMetaData) {\n super(errorNumber, message, getMetaData);\n }\n}\n\n/** This interface provide spatial location and volume of interest, in meters, centered around `spatial location`\n * @alpha\n */\nexport interface SpatialLocationAndExtents {\n /** location of the point at the center of the reaity data */\n location: Cartographic | EcefLocation;\n /** extents of the volume around location */\n worldRange: Range3d;\n /** true if this reality data is geolocated\n * A reality data is geolocated when we can compute a valid position relative to the earth surface.\n * Note that some reality data contains custom coordinate system without any information on the relative position on earth.\n * These reality data will have a location and worldRange but will be identified by the isGeoLocated set to false.\n */\n isGeolocated: boolean;\n}\n\n/** This interface provides information to identify the product and engine that create this reality data\n * @alpha\n */\nexport interface PublisherProductInfo {\n /** product that create this reality data */\n product: string;\n /** engine that create this reality data */\n engine: string;\n /** the version of the engine that create this reality data */\n version: string;\n}\n\n/** This interface provide methods used to access a reality data from a reality data provider\n * @beta\n */\nexport interface RealityDataSource {\n readonly key: RealityDataSourceKey;\n readonly isContextShare: boolean;\n readonly realityDataId: string | undefined;\n /** Metatdata on the reality data source */\n readonly realityData: RealityData | undefined;\n /** The reality data type (e.g.: \"RealityMesh3DTiles\", OPC, Terrain3DTiles, Cesium3DTiles, ... )*/\n readonly realityDataType: string | undefined;\n /** This method returns the URL to obtain the Reality Data properties.\n * @param iTwinId id of associated iTwin project\n * @returns string containing the URL to reality data.\n */\n getServiceUrl(iTwinId: GuidString | undefined): Promise<string | undefined>;\n /** If true, the geometricError property of the tiles will be used to compute screen-space error.\n * @alpha\n */\n readonly usesGeometricError?: boolean;\n /** If [[usesGeometricError]] is `true`, optionally specifies the maximum error, in pixels, to permit for a tile before requiring refinement of that tile.\n * Default: 16\n * @alpha\n */\n readonly maximumScreenSpaceError?: number;\n /** Given the URL of a tile's content, return the type of that content.\n * \"tileset\" indicates the content points to a JSON tileset describing the structure of the tile tree below the tile.\n * \"tile\" indicates the content points to a binary representation of the tile's graphics.\n * @alpha\n */\n getTileContentType(url: string): \"tile\" | \"tileset\";\n\n /** Gets a reality data root document json\n * @returns tile data json\n * @internal\n */\n getRootDocument(iTwinId: GuidString | undefined): Promise<any>;\n /** Gets tile content\n * @param name name or path of tile\n * @returns array buffer of tile content\n * @internal\n */\n getTileContent(name: string): Promise<any>;\n /** Gets a tileset's app data json\n * @param name name or path of tile\n * @returns app data json object\n * @internal\n */\n getTileJson(name: string): Promise<any>;\n /** Gets spatial location and extents of this reality data source.\n * Will return undefined if cannot be resolved or is unbounded (cover entire earth eg: Open Street Map Building from Ion Asset)\n * @returns spatial location and extents\n * @throws [[RealityDataError]] if source is invalid or cannot be read\n * @alpha\n */\n getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined>;\n /** Gets information to identify the product and engine that create this reality data\n * Will return undefined if cannot be resolved\n * @returns information to identify the product and engine that create this reality data\n * @alpha\n */\n getPublisherProductInfo(): Promise<PublisherProductInfo | undefined>;\n /** Optional, gets the tileset url associated with the reality data source\n * @returns tileset url\n * @internal\n */\n getTilesetUrl?(): string | undefined;\n}\n/** Utility functions for RealityDataSource\n * @beta\n */\nexport namespace RealityDataSource {\n /** Create a RealityDataSourceKey from a tilesetUrl.\n * @param tilesetUrl the reality data attachment url\n * @param inputProvider identify the RealityDataProvider if known, otherwise function will try to extract it from the tilesetUrl\n * @param inputFormat identify the RealityDataFormat if known, otherwise function will try to extract it from the tilesetUrl\n * @returns the RealityDataSourceKey that uniquely identify a reality data for a provider\n */\n export function createKeyFromUrl(tilesetUrl: string, inputProvider?: RealityDataProvider, inputFormat?: RealityDataFormat): RealityDataSourceKey {\n let format = inputFormat ? inputFormat : RealityDataFormat.fromUrl(tilesetUrl);\n if (CesiumIonAssetProvider.isProviderUrl(tilesetUrl)) {\n const provider = RealityDataProvider.CesiumIonAsset;\n let cesiumIonAssetKey: RealityDataSourceKey = { provider, format, id: CesiumIonAssetProvider.osmBuildingId }; // default OSM building\n // Parse URL to extract possible asset id and key if provided\n const cesiumAsset = CesiumIonAssetProvider.parseCesiumUrl(tilesetUrl);\n if (cesiumAsset) {\n cesiumIonAssetKey = RealityDataSource.createCesiumIonAssetKey(cesiumAsset.id, cesiumAsset.key);\n }\n return cesiumIonAssetKey;\n }\n\n // Try to extract realityDataId from URL and if not possible, use the url as the key\n if (ContextShareProvider.isProviderUrl(tilesetUrl)) {\n const info = ContextShareProvider.getInfoFromUrl(tilesetUrl);\n const provider = inputProvider ? inputProvider : info.provider;\n format = inputFormat ? inputFormat : info.format;\n const contextShareKey: RealityDataSourceKey = { provider, format, id: info.id, iTwinId: info.iTwinId };\n return contextShareKey;\n }\n\n // default to tileSetUrl\n const provider2 = inputProvider ? inputProvider : RealityDataProvider.TilesetUrl;\n const urlKey: RealityDataSourceKey = { provider: provider2, format, id: tilesetUrl };\n return urlKey;\n }\n /** @alpha - was used for a very specific case of point cloud (opc) attachment that should not be made public */\n export function createKeyFromBlobUrl(blobUrl: string, inputProvider?: RealityDataProvider, inputFormat?: RealityDataFormat): RealityDataSourceKey {\n const info = ContextShareProvider.getInfoFromBlobUrl(blobUrl);\n const format = inputFormat ? inputFormat : info.format;\n const provider = inputProvider ? inputProvider : info.provider;\n const contextShareKey: RealityDataSourceKey = { provider, format, id: info.id };\n return contextShareKey;\n }\n /** @alpha - OrbitGtBlobProps is alpha */\n export function createKeyFromOrbitGtBlobProps(orbitGtBlob: OrbitGtBlobProps, inputProvider?: RealityDataProvider, inputFormat?: RealityDataFormat): RealityDataSourceKey {\n const format = inputFormat ? inputFormat : RealityDataFormat.OPC;\n if (orbitGtBlob.blobFileName && orbitGtBlob.blobFileName.toLowerCase().startsWith(\"http\")) {\n return RealityDataSource.createKeyFromBlobUrl(orbitGtBlob.blobFileName, inputProvider, format);\n } else if (orbitGtBlob.rdsUrl) {\n return RealityDataSource.createKeyFromUrl(orbitGtBlob.rdsUrl, inputProvider, format);\n }\n const provider = inputProvider ? inputProvider : RealityDataProvider.OrbitGtBlob;\n const id = `${orbitGtBlob.accountName}:${orbitGtBlob.containerName}:${orbitGtBlob.blobFileName}:?${orbitGtBlob.sasToken}`;\n return { provider, format, id };\n }\n /** @alpha - OrbitGtBlobProps is alpha */\n export function createOrbitGtBlobPropsFromKey(rdSourceKey: RealityDataSourceKey): OrbitGtBlobProps | undefined {\n if (rdSourceKey.provider !== RealityDataProvider.OrbitGtBlob)\n return undefined;\n const splitIds = rdSourceKey.id.split(\":\");\n const sasTokenIndex = rdSourceKey.id.indexOf(\":?\");\n const sasToken = rdSourceKey.id.substring(sasTokenIndex + 2);\n const orbitGtBlob: OrbitGtBlobProps = {\n accountName: splitIds[0],\n containerName: splitIds[1],\n blobFileName: splitIds[2],\n sasToken,\n };\n return orbitGtBlob;\n }\n /** @internal - Is used by \"fdt attach cesium asset\" keyin*/\n export function createCesiumIonAssetKey(osmAssetId: number, requestKey: string): RealityDataSourceKey {\n const id = getCesiumAssetUrl(osmAssetId,requestKey);\n return {provider: RealityDataProvider.CesiumIonAsset, format: RealityDataFormat.ThreeDTile, id};\n }\n /** Return an instance of a RealityDataSource from a source key.\n * There will aways be only one reality data RealityDataSource for a corresponding reality data source key.\n * @alpha\n */\n export async function fromKey(key: RealityDataSourceKey, iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined> {\n const provider = IModelApp.realityDataSourceProviders.find(key.provider);\n if (!provider) {\n Logger.logWarning(loggerCategory, `RealityDataSourceProvider \"${key.provider}\" is not registered`);\n return undefined;\n }\n\n return provider.createRealityDataSource(key, iTwinId);\n }\n}\n\n/** A named supplier of [RealityDataSource]]s.\n * The provider's name is stored in a [RealityDataSourceKey]($common). When the [[RealityDataSource]] is requested from the key,\n * the provider is looked up in [[IModelApp.realityDataSourceProviders]] by its name and, if found, its [[createRealityDataSource]] method\n * is invoked to produce the reality data source.\n * @beta\n */\n\nexport interface RealityDataSourceProvider {\n /** Produce a RealityDataSource for the specified `key`.\n * @param key Identifies the reality data source.\n * @param iTwinId A default iTwinId to use.\n * @returns the requested reality data source, or `undefined` if it could not be produced.\n */\n createRealityDataSource(key: RealityDataSourceKey, iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined>;\n /** Optionally add any decorations specific to this reality data source provider.\n * For example, the Google Photorealistic 3D Tiles reality data source provider will add the Google logo.\n */\n decorate?(_context: DecorateContext): void;\n /** Optionally add attribution logo cards to the viewport's logo div. */\n addAttributions?(cards: HTMLTableElement, vp: ScreenViewport): Promise<void>;\n /** Enables cached decorations for this provider. @see [[ViewportDecorator.useCachedDecorations]] */\n useCachedDecorations?: true | undefined;\n}\n\n/** A registry of [[RealityDataSourceProvider]]s identified by their unique names. The registry can be accessed via [[IModelApp.realityDataSourceProviders]].\n * It includes a handful of built-in providers for sources like Cesium ION, ContextShare, OrbitGT, and arbitrary public-accessible URLs.\n * Any number of additional providers can be registered. They should typically be registered just after [[IModelApp.startup]].\n * @beta\n */\nexport class RealityDataSourceProviderRegistry {\n private readonly _providers = new Map<string, RealityDataSourceProvider>();\n\n /** @internal */\n public constructor() {\n this.register(RealityDataProvider.CesiumIonAsset, {\n createRealityDataSource: async (key, iTwinId) => RealityDataSourceCesiumIonAssetImpl.createFromKey(key, iTwinId),\n });\n this.register(RealityDataProvider.TilesetUrl, {\n createRealityDataSource: async (key, iTwinId) => RealityDataSourceTilesetUrlImpl.createFromKey(key, iTwinId),\n });\n this.register(RealityDataProvider.ContextShare, {\n createRealityDataSource: async (key, iTwinId) => RealityDataSourceContextShareImpl.createFromKey(key, iTwinId),\n });\n this.register(RealityDataProvider.OrbitGtBlob, {\n // ###TODO separate TilesetUrlImpl\n createRealityDataSource: async (key, iTwinId) => RealityDataSourceTilesetUrlImpl.createFromKey(key, iTwinId),\n });\n }\n\n /** Register `provider` to produce [[RealityDataSource]]s for the specified provider `name`. */\n public register(name: string, provider: RealityDataSourceProvider): void {\n this._providers.set(name, provider);\n }\n\n /** Look up the provider registered by the specified `name`. */\n public find(name: string): RealityDataSourceProvider | undefined {\n return this._providers.get(name);\n }\n}\n\n/**\n * Options for creating a Google Photorealistic 3D Tiles reality data source provider.\n * The caller must provide either an API key or a function that returns an auth token.\n * @beta\n */\nexport type Google3dTilesProviderOptions = {\n /** Google Map Tiles API Key used to access Google 3D Tiles. */\n apiKey: string;\n getAuthToken?: never;\n /** If true, the data attributions/copyrights from the Google 3D Tiles will be displayed on screen. The Google Maps logo will always be displayed. Defaults to `true`. */\n showCreditsOnScreen?: boolean\n} | {\n apiKey?: never;\n /** Function that returns an OAuth token for authenticating with Google 3D Tiles. This token is expected to not contain the \"Bearer\" prefix. */\n getAuthToken: () => Promise<string>;\n /** If true, the data attributions/copyrights from the Google 3D Tiles will be displayed on screen. The Google Maps logo will always be displayed. Defaults to `true`. */\n showCreditsOnScreen?: boolean;\n};\n\n/**\n * Will provide Google Photorealistic 3D Tiles (in 3dTile format).\n * A valid API key or getAuthToken fuction must be supplied when creating this provider.\n * To use this provider, you must register it with [[IModelApp.realityDataSourceProviders]].\n * Example usage:\n * ```ts\n * [[include:GooglePhotorealistic3dTiles_providerApiKey]]\n * ```\n * @see [Google Photorealistic 3D Tiles]($docs/learning/frontend/GooglePhotorealistic3dTiles.md)\n * @beta\n */\nexport class Google3dTilesProvider implements RealityDataSourceProvider {\n /** Google Map Tiles API Key used to access Google 3D Tiles. */\n private _apiKey?: string;\n /** Function that returns an OAuth token for authenticating with Google 3D Tiles. This token is expected to not contain the \"Bearer\" prefix. */\n private _getAuthToken?: () => Promise<string | undefined>;\n /** Decorator for Google Maps logos. */\n private _decorator: GoogleMapsDecorator;\n /** Enables cached decorations for this provider. @see [[ViewportDecorator.useCachedDecorations]] */\n public readonly useCachedDecorations = true;\n\n public async createRealityDataSource(key: RealityDataSourceKey, iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined> {\n if (!this._apiKey && !this._getAuthToken) {\n Logger.logError(loggerCategory, \"Either an API key or getAuthToken function are required to create a Google3dTilesProvider.\");\n return undefined;\n }\n return RealityDataSourceGoogle3dTilesImpl.createFromKey(key, iTwinId, this._apiKey, this._getAuthToken);\n }\n\n public constructor(options: Google3dTilesProviderOptions) {\n this._apiKey = options.apiKey;\n this._getAuthToken = options.getAuthToken;\n this._decorator = new GoogleMapsDecorator(options.showCreditsOnScreen ?? true);\n }\n\n /**\n * Initialize the Google 3D Tiles reality data source provider by activating its decorator, which consists of loading the correct Google Maps logo.\n * @returns `true` if the decorator was successfully activated, otherwise `false`.\n */\n public async initialize(): Promise<boolean> {\n const isActivated = await this._decorator.activate(\"satellite\");\n if (!isActivated) {\n const msg = \"Failed to activate decorator\";\n Logger.logError(loggerCategory, msg);\n throw new BentleyError(BentleyStatus.ERROR, msg);\n }\n return isActivated;\n }\n\n public decorate(_context: DecorateContext): void {\n this._decorator.decorate(_context);\n }\n\n public async addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void> {\n const copyrightMap = getCopyrights(vp);\n\n // Only add another logo card if the tiles have copyright\n if (copyrightMap.size > 0) {\n // Order by most occurances to least\n // See https://developers.google.com/maps/documentation/tile/create-renderer#display-attributions\n const sortedCopyrights = [...copyrightMap.entries()].sort((a, b) => b[1] - a[1]);\n\n let copyrightMsg = \"Data provided by:<br><ul>\";\n copyrightMsg += sortedCopyrights.map(([key]) => `<li>${key}</li>`).join(\"\");\n copyrightMsg += \"</ul>\";\n\n const iconSrc = document.createElement(\"img\");\n iconSrc.src = `${IModelApp.publicPath}images/GoogleMaps_Logo_Gray.svg`;\n iconSrc.style.padding = \"10px 10px 5px 10px\";\n\n cards.appendChild(IModelApp.makeLogoCard({\n iconSrc,\n iconWidth: 98,\n heading: \"Google Photorealistic 3D Tiles\",\n notice: copyrightMsg\n }));\n }\n }\n}\n\n/** Returns the URL used for retrieving Google Photorealistic 3D Tiles.\n * @beta\n */\nexport function getGoogle3dTilesUrl() {\n return \"https://tile.googleapis.com/v1/3dtiles/root.json\";\n}\n"]}
|
|
@@ -76,12 +76,12 @@ class GoogleMapsDecorator {
|
|
|
76
76
|
/** Activate the logo based on the given map type. */
|
|
77
77
|
async activate(mapType) {
|
|
78
78
|
// Pick the logo that is the most visible on the background map
|
|
79
|
-
const imageName = mapType === "
|
|
80
|
-
"
|
|
81
|
-
"
|
|
79
|
+
const imageName = mapType === "satellite" ?
|
|
80
|
+
"GoogleMaps_Logo_WithDarkOutline" :
|
|
81
|
+
"GoogleMaps_Logo_WithLightOutline";
|
|
82
82
|
// We need to move the logo right after the 'i.js' button
|
|
83
83
|
this.logo.offset = new core_geometry_1.Point3d(45, 10);
|
|
84
|
-
return this.logo.activate(Sprites_1.IconSprites.getSpriteFromUrl(`${IModelApp_1.IModelApp.publicPath}images/${imageName}.
|
|
84
|
+
return this.logo.activate(Sprites_1.IconSprites.getSpriteFromUrl(`${IModelApp_1.IModelApp.publicPath}images/${imageName}.svg`));
|
|
85
85
|
}
|
|
86
86
|
;
|
|
87
87
|
/** Decorate implementation */
|
|
@@ -105,8 +105,8 @@ class GoogleMapsDecorator {
|
|
|
105
105
|
elem.style.fontSize = "11px";
|
|
106
106
|
elem.style.textWrap = "wrap";
|
|
107
107
|
elem.style.position = "absolute";
|
|
108
|
-
elem.style.bottom = "
|
|
109
|
-
elem.style.left = "
|
|
108
|
+
elem.style.bottom = "14px";
|
|
109
|
+
elem.style.left = "155px";
|
|
110
110
|
context.addHtmlDecoration(elem);
|
|
111
111
|
};
|
|
112
112
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleMapsDecorator.js","sourceRoot":"","sources":["../../../src/internal/GoogleMapsDecorator.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AA4I/F,sCAcC;AAxJD,wDAA+C;AAG/C,4CAAyC;AAEzC,wCAAiD;AASjD;;GAEG;AACH,MAAa,cAAc;IACjB,OAAO,CAAU;IAEzB,4DAA4D;IAC5C,QAAQ,GAAG,IAAI,uBAAO,EAAE,CAAC;IAEjC,OAAO,CAAsB;IAErC,IAAW,MAAM,CAAC,MAA2B;QAC3C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,0CAA0C;IAC1C,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,4DAA4D;IACrD,qBAAqB,CAAC,OAAwB;QACnD,IAAI,CAAC,IAAI,CAAC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AAa,CAAC;QAC/B,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC;QAC3B,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;QACjC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QAC3B,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC;QAE1B,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC,CAAC;CACH;AArDD,kDAqDC;AAED;;GAEG;AACH,SAAgB,aAAa,CAAC,EAAkB;IAC9C,MAAM,KAAK,GAAG,qBAAS,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC;IAChE,MAAM,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC/C,IAAI,KAAK,EAAE,CAAC;QACV,KAAK,MAAM,IAAI,IAAI,KAAyB,EAAE,CAAC;YAC7C,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gBACnB,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;oBAClD,MAAM,YAAY,GAAG,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;oBACjD,YAAY,CAAC,GAAG,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACnE,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { Point3d } from \"@itwin/core-geometry\";\nimport { CanvasDecoration } from \"../render/CanvasDecoration\";\nimport { DecorateContext } from \"../ViewContext\";\nimport { IModelApp } from \"../IModelApp\";\nimport { Decorator } from \"../ViewManager\";\nimport { IconSprites, Sprite } from \"../Sprites\";\nimport { RealityTile } from \"../tile/internal\";\nimport { ScreenViewport } from \"../Viewport\";\n\n/** Layer types that can be added to the map.\n * @internal\n */\ntype GoogleMapsMapTypes = \"roadmap\" | \"satellite\" | \"terrain\";\n\n/** A simple decorator that shows the logo at a given screen position.\n * @internal\n */\nexport class LogoDecoration implements CanvasDecoration {\n private _sprite?: Sprite;\n\n /** The current position of the logo in view coordinates. */\n public readonly position = new Point3d();\n\n private _offset: Point3d | undefined;\n\n public set offset(offset: Point3d | undefined) {\n this._offset = offset;\n }\n\n /** The logo offset in view coordinates.*/\n public get offset() {\n return this._offset;\n }\n\n /** Move the logo to the lower left corner of the screen. */\n public moveToLowerLeftCorner(context: DecorateContext): boolean {\n if (!this._sprite || !this._sprite.isLoaded)\n return false;\n\n this.position.x = this._offset?.x ?? 0;\n this.position.y = context.viewport.parentDiv.clientHeight - this._sprite.size.y;\n if (this._offset?.y)\n this.position.y -= this._offset.y;\n return true;\n }\n\n /* TODO: Add other move methods as needed */\n\n /** Indicate if the logo is loaded and ready to be drawn. */\n public get isLoaded() { return this._sprite?.isLoaded ?? false; }\n\n public async activate(sprite: Sprite): Promise<boolean> {\n this._sprite = sprite;\n return new Promise<boolean>((resolve, _reject) => {\n sprite.loadPromise.then(() => {\n resolve(true);\n }).catch(() => {\n resolve (false);\n });\n });\n }\n\n /** Draw this sprite onto the supplied canvas.\n * @see [[CanvasDecoration.drawDecoration]]\n */\n public drawDecoration(ctx: CanvasRenderingContext2D): void {\n if (this.isLoaded) {\n // Draw image with an origin at the top left corner\n ctx.drawImage(this._sprite!.image!, 0, 0);\n }\n }\n\n public decorate(context: DecorateContext) {\n context.addCanvasDecoration(this);\n }\n}\n\n/** A decorator that adds the Google Maps logo to the lower left corner of the screen.\n * @internal\n */\nexport class GoogleMapsDecorator implements Decorator {\n public readonly logo = new LogoDecoration();\n private _showCreditsOnScreen?: boolean;\n\n /** Create a new GoogleMapsDecorator.\n * @param showCreditsOnScreen If true, the data attributions/copyrights from the Google Photorealistic 3D Tiles will be displayed on screen. The Google Maps logo will always be displayed.\n */\n constructor(showCreditsOnScreen?: boolean) {\n this._showCreditsOnScreen = showCreditsOnScreen;\n }\n\n /** Activate the logo based on the given map type. */\n public async activate(mapType: GoogleMapsMapTypes): Promise<boolean> {\n // Pick the logo that is the most visible on the background map\n const imageName = mapType === \"satellite\" ?\n \"GoogleMaps_Logo_WithDarkOutline\" :\n \"GoogleMaps_Logo_WithLightOutline\";\n\n // We need to move the logo right after the 'i.js' button\n this.logo.offset = new Point3d(45, 10);\n\n return this.logo.activate(IconSprites.getSpriteFromUrl(`${IModelApp.publicPath}images/${imageName}.svg`));\n };\n\n /** Decorate implementation */\n public decorate = (context: DecorateContext) => {\n if (!this.logo.isLoaded)\n return;\n this.logo.moveToLowerLeftCorner(context);\n this.logo.decorate(context);\n\n if (!this._showCreditsOnScreen)\n return;\n\n // Get data attribution (copyright) text\n const copyrightMap = getCopyrights(context.viewport);\n // Order by most occurances to least\n // See https://developers.google.com/maps/documentation/tile/create-renderer#display-attributions\n const sortedCopyrights = [...copyrightMap.entries()].sort((a, b) => b[1] - a[1]);\n const copyrightText = sortedCopyrights.map(([key]) => ` • ${key}`).join(\"\");\n\n // Create and add element, offset to leave space for i.js and Google logos\n const elem = document.createElement(\"div\");\n elem.innerHTML = copyrightText;\n elem.style.color = \"white\";\n elem.style.fontSize = \"11px\";\n elem.style.textWrap = \"wrap\";\n elem.style.position = \"absolute\";\n elem.style.bottom = \"14px\";\n elem.style.left = \"155px\";\n\n context.addHtmlDecoration(elem);\n };\n}\n\n/** Get copyrights from tiles currently in the viewport.\n * @internal\n */\nexport function getCopyrights(vp: ScreenViewport): Map<string, number> {\n const tiles = IModelApp.tileAdmin.getTilesForUser(vp)?.selected;\n const copyrightMap = new Map<string, number>();\n if (tiles) {\n for (const tile of tiles as Set<RealityTile>) {\n if (tile.copyright) {\n for (const copyright of tile.copyright.split(\";\")) {\n const currentCount = copyrightMap.get(copyright);\n copyrightMap.set(copyright, currentCount ? currentCount + 1 : 1);\n }\n }\n }\n }\n return copyrightMap;\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RealityDataSource.d.ts","sourceRoot":"","sources":["../../src/RealityDataSource.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAiB,UAAU,EAAU,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC1H,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7J,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAS/C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAI5C;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;gBAC7B,WAAW,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,eAAe;CAGlG;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,6DAA6D;IAC7D,QAAQ,EAAE,YAAY,GAAG,YAAY,CAAC;IACtC,4CAA4C;IAC5C,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;C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AED;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,yKAAyK;IACzK,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,GAAG;IACF,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,+IAA+I;IAC/I,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,yKAAyK;IACzK,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,qBAAa,qBAAsB,YAAW,yBAAyB;IACrE,+DAA+D;IAC/D,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,+IAA+I;IAC/I,OAAO,CAAC,aAAa,CAAC,CAAoC;IAC1D,uCAAuC;IACvC,OAAO,CAAC,UAAU,CAAsB;IACxC,oGAAoG;IACpG,SAAgB,oBAAoB,QAAQ;IAE/B,uBAAuB,CAAC,GAAG,EAAE,oBAAoB,EAAE,OAAO,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;gBAQrH,OAAO,EAAE,4BAA4B;IAMxD;;;OAGG;IACU,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAUpC,QAAQ,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAInC,eAAe,CAAC,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAyBzF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,WAElC"}
|
|
@@ -211,8 +211,12 @@ export class Google3dTilesProvider {
|
|
|
211
211
|
let copyrightMsg = "Data provided by:<br><ul>";
|
|
212
212
|
copyrightMsg += sortedCopyrights.map(([key]) => `<li>${key}</li>`).join("");
|
|
213
213
|
copyrightMsg += "</ul>";
|
|
214
|
+
const iconSrc = document.createElement("img");
|
|
215
|
+
iconSrc.src = `${IModelApp.publicPath}images/GoogleMaps_Logo_Gray.svg`;
|
|
216
|
+
iconSrc.style.padding = "10px 10px 5px 10px";
|
|
214
217
|
cards.appendChild(IModelApp.makeLogoCard({
|
|
215
|
-
iconSrc
|
|
218
|
+
iconSrc,
|
|
219
|
+
iconWidth: 98,
|
|
216
220
|
heading: "Google Photorealistic 3D Tiles",
|
|
217
221
|
notice: copyrightMsg
|
|
218
222
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RealityDataSource.js","sourceRoot":"","sources":["../../src/RealityDataSource.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAc,MAAM,EAAsC,MAAM,qBAAqB,CAAC;AAC1H,OAAO,EAA6D,iBAAiB,EAAE,mBAAmB,EAAwB,MAAM,oBAAoB,CAAC;AAE7J,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAClG,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,kCAAkC,EAAE,MAAM,+CAA+C,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAIpF,MAAM,cAAc,GAAW,sBAAsB,CAAC,WAAW,CAAC;AAElE;;;GAGG;AACH,MAAM,OAAO,gBAAiB,SAAQ,YAAY;IAChD,YAAmB,WAA8B,EAAE,OAAe,EAAE,WAA6B;QAC/F,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CA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C;YAC5E,YAAY,IAAI,OAAO,CAAC;YAExB,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,YAAY,CAAC;gBACvC,OAAO,EAAE,GAAG,SAAS,CAAC,UAAU,iCAAiC;gBACjE,OAAO,EAAE,gCAAgC;gBACzC,MAAM,EAAE,YAAY;aACrB,CAAC,CAAC,CAAC;QACN,CAAC;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,kDAAkD,CAAC;AAC5D,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\nimport { BentleyError, BentleyStatus, GuidString, Logger, LoggingMetaData, RealityDataStatus } from \"@itwin/core-bentley\";\nimport { Cartographic, EcefLocation, OrbitGtBlobProps, RealityData, RealityDataFormat, RealityDataProvider, RealityDataSourceKey } from \"@itwin/core-common\";\nimport { Range3d } from \"@itwin/core-geometry\";\nimport { FrontendLoggerCategory } from \"./common/FrontendLoggerCategory\";\nimport { CesiumIonAssetProvider, ContextShareProvider, getCesiumAssetUrl } from \"./tile/internal\";\nimport { RealityDataSourceTilesetUrlImpl } from \"./RealityDataSourceTilesetUrlImpl\";\nimport { RealityDataSourceContextShareImpl } from \"./RealityDataSourceContextShareImpl\";\nimport { RealityDataSourceCesiumIonAssetImpl } from \"./RealityDataSourceCesiumIonAssetImpl\";\nimport { RealityDataSourceGoogle3dTilesImpl } from \"./internal/RealityDataSourceGoogle3dTilesImpl\";\nimport { IModelApp } from \"./IModelApp\";\nimport { getCopyrights, GoogleMapsDecorator } from \"./internal/GoogleMapsDecorator\";\nimport { DecorateContext } from \"./ViewContext\";\nimport { ScreenViewport } from \"./Viewport\";\n\nconst loggerCategory: string = FrontendLoggerCategory.RealityData;\n\n/**\n * Reality Data Operation error\n * @alpha\n */\nexport class RealityDataError extends BentleyError {\n public constructor(errorNumber: RealityDataStatus, message: string, getMetaData?: LoggingMetaData) {\n super(errorNumber, message, getMetaData);\n }\n}\n\n/** This interface provide spatial location and volume of interest, in meters, centered around `spatial location`\n * @alpha\n */\nexport interface SpatialLocationAndExtents {\n /** location of the point at the center of the reaity data */\n location: Cartographic | EcefLocation;\n /** extents of the volume around location */\n worldRange: Range3d;\n /** true if this reality data is geolocated\n * A reality data is geolocated when we can compute a valid position relative to the earth surface.\n * Note that some reality data contains custom coordinate system without any information on the relative position on earth.\n * These reality data will have a location and worldRange but will be identified by the isGeoLocated set to false.\n */\n isGeolocated: boolean;\n}\n\n/** This interface provides information to identify the product and engine that create this reality data\n * @alpha\n */\nexport interface PublisherProductInfo {\n /** product that create this reality data */\n product: string;\n /** engine that create this reality data */\n engine: string;\n /** the version of the engine that create this reality data */\n version: string;\n}\n\n/** This interface provide methods used to access a reality data from a reality data provider\n * @beta\n */\nexport interface RealityDataSource {\n readonly key: RealityDataSourceKey;\n readonly isContextShare: boolean;\n readonly realityDataId: string | undefined;\n /** Metatdata on the reality data source */\n readonly realityData: RealityData | undefined;\n /** The reality data type (e.g.: \"RealityMesh3DTiles\", OPC, Terrain3DTiles, Cesium3DTiles, ... )*/\n readonly realityDataType: string | undefined;\n /** This method returns the URL to obtain the Reality Data properties.\n * @param iTwinId id of associated iTwin project\n * @returns string containing the URL to reality data.\n */\n getServiceUrl(iTwinId: GuidString | undefined): Promise<string | undefined>;\n /** If true, the geometricError property of the tiles will be used to compute screen-space error.\n * @alpha\n */\n readonly usesGeometricError?: boolean;\n /** If [[usesGeometricError]] is `true`, optionally specifies the maximum error, in pixels, to permit for a tile before requiring refinement of that tile.\n * Default: 16\n * @alpha\n */\n readonly maximumScreenSpaceError?: number;\n /** Given the URL of a tile's content, return the type of that content.\n * \"tileset\" indicates the content points to a JSON tileset describing the structure of the tile tree below the tile.\n * \"tile\" indicates the content points to a binary representation of the tile's graphics.\n * @alpha\n */\n getTileContentType(url: string): \"tile\" | \"tileset\";\n\n /** Gets a reality data root document json\n * @returns tile data json\n * @internal\n */\n getRootDocument(iTwinId: GuidString | undefined): Promise<any>;\n /** Gets tile content\n * @param name name or path of tile\n * @returns array buffer of tile content\n * @internal\n */\n getTileContent(name: string): Promise<any>;\n /** Gets a tileset's app data json\n * @param name name or path of tile\n * @returns app data json object\n * @internal\n */\n getTileJson(name: string): Promise<any>;\n /** Gets spatial location and extents of this reality data source.\n * Will return undefined if cannot be resolved or is unbounded (cover entire earth eg: Open Street Map Building from Ion Asset)\n * @returns spatial location and extents\n * @throws [[RealityDataError]] if source is invalid or cannot be read\n * @alpha\n */\n getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined>;\n /** Gets information to identify the product and engine that create this reality data\n * Will return undefined if cannot be resolved\n * @returns information to identify the product and engine that create this reality data\n * @alpha\n */\n getPublisherProductInfo(): Promise<PublisherProductInfo | undefined>;\n /** Optional, gets the tileset url associated with the reality data source\n * @returns tileset url\n * @internal\n */\n getTilesetUrl?(): string | undefined;\n}\n/** Utility functions for RealityDataSource\n * @beta\n */\nexport namespace RealityDataSource {\n /** Create a RealityDataSourceKey from a tilesetUrl.\n * @param tilesetUrl the reality data attachment url\n * @param inputProvider identify the RealityDataProvider if known, otherwise function will try to extract it from the tilesetUrl\n * @param inputFormat identify the RealityDataFormat if known, otherwise function will try to extract it from the tilesetUrl\n * @returns the RealityDataSourceKey that uniquely identify a reality data for a provider\n */\n export function createKeyFromUrl(tilesetUrl: string, inputProvider?: RealityDataProvider, inputFormat?: RealityDataFormat): RealityDataSourceKey {\n let format = inputFormat ? inputFormat : RealityDataFormat.fromUrl(tilesetUrl);\n if (CesiumIonAssetProvider.isProviderUrl(tilesetUrl)) {\n const provider = RealityDataProvider.CesiumIonAsset;\n let cesiumIonAssetKey: RealityDataSourceKey = { provider, format, id: CesiumIonAssetProvider.osmBuildingId }; // default OSM building\n // Parse URL to extract possible asset id and key if provided\n const cesiumAsset = CesiumIonAssetProvider.parseCesiumUrl(tilesetUrl);\n if (cesiumAsset) {\n cesiumIonAssetKey = RealityDataSource.createCesiumIonAssetKey(cesiumAsset.id, cesiumAsset.key);\n }\n return cesiumIonAssetKey;\n }\n\n // Try to extract realityDataId from URL and if not possible, use the url as the key\n if (ContextShareProvider.isProviderUrl(tilesetUrl)) {\n const info = ContextShareProvider.getInfoFromUrl(tilesetUrl);\n const provider = inputProvider ? inputProvider : info.provider;\n format = inputFormat ? inputFormat : info.format;\n const contextShareKey: RealityDataSourceKey = { provider, format, id: info.id, iTwinId: info.iTwinId };\n return contextShareKey;\n }\n\n // default to tileSetUrl\n const provider2 = inputProvider ? inputProvider : RealityDataProvider.TilesetUrl;\n const urlKey: RealityDataSourceKey = { provider: provider2, format, id: tilesetUrl };\n return urlKey;\n }\n /** @alpha - was used for a very specific case of point cloud (opc) attachment that should not be made public */\n export function createKeyFromBlobUrl(blobUrl: string, inputProvider?: RealityDataProvider, inputFormat?: RealityDataFormat): RealityDataSourceKey {\n const info = ContextShareProvider.getInfoFromBlobUrl(blobUrl);\n const format = inputFormat ? inputFormat : info.format;\n const provider = inputProvider ? inputProvider : info.provider;\n const contextShareKey: RealityDataSourceKey = { provider, format, id: info.id };\n return contextShareKey;\n }\n /** @alpha - OrbitGtBlobProps is alpha */\n export function createKeyFromOrbitGtBlobProps(orbitGtBlob: OrbitGtBlobProps, inputProvider?: RealityDataProvider, inputFormat?: RealityDataFormat): RealityDataSourceKey {\n const format = inputFormat ? inputFormat : RealityDataFormat.OPC;\n if (orbitGtBlob.blobFileName && orbitGtBlob.blobFileName.toLowerCase().startsWith(\"http\")) {\n return RealityDataSource.createKeyFromBlobUrl(orbitGtBlob.blobFileName, inputProvider, format);\n } else if (orbitGtBlob.rdsUrl) {\n return RealityDataSource.createKeyFromUrl(orbitGtBlob.rdsUrl, inputProvider, format);\n }\n const provider = inputProvider ? inputProvider : RealityDataProvider.OrbitGtBlob;\n const id = `${orbitGtBlob.accountName}:${orbitGtBlob.containerName}:${orbitGtBlob.blobFileName}:?${orbitGtBlob.sasToken}`;\n return { provider, format, id };\n }\n /** @alpha - OrbitGtBlobProps is alpha */\n export function createOrbitGtBlobPropsFromKey(rdSourceKey: RealityDataSourceKey): OrbitGtBlobProps | undefined {\n if (rdSourceKey.provider !== RealityDataProvider.OrbitGtBlob)\n return undefined;\n const splitIds = rdSourceKey.id.split(\":\");\n const sasTokenIndex = rdSourceKey.id.indexOf(\":?\");\n const sasToken = rdSourceKey.id.substring(sasTokenIndex + 2);\n const orbitGtBlob: OrbitGtBlobProps = {\n accountName: splitIds[0],\n containerName: splitIds[1],\n blobFileName: splitIds[2],\n sasToken,\n };\n return orbitGtBlob;\n }\n /** @internal - Is used by \"fdt attach cesium asset\" keyin*/\n export function createCesiumIonAssetKey(osmAssetId: number, requestKey: string): RealityDataSourceKey {\n const id = getCesiumAssetUrl(osmAssetId,requestKey);\n return {provider: RealityDataProvider.CesiumIonAsset, format: RealityDataFormat.ThreeDTile, id};\n }\n /** Return an instance of a RealityDataSource from a source key.\n * There will aways be only one reality data RealityDataSource for a corresponding reality data source key.\n * @alpha\n */\n export async function fromKey(key: RealityDataSourceKey, iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined> {\n const provider = IModelApp.realityDataSourceProviders.find(key.provider);\n if (!provider) {\n Logger.logWarning(loggerCategory, `RealityDataSourceProvider \"${key.provider}\" is not registered`);\n return undefined;\n }\n\n return provider.createRealityDataSource(key, iTwinId);\n }\n}\n\n/** A named supplier of [RealityDataSource]]s.\n * The provider's name is stored in a [RealityDataSourceKey]($common). When the [[RealityDataSource]] is requested from the key,\n * the provider is looked up in [[IModelApp.realityDataSourceProviders]] by its name and, if found, its [[createRealityDataSource]] method\n * is invoked to produce the reality data source.\n * @beta\n */\n\nexport interface RealityDataSourceProvider {\n /** Produce a RealityDataSource for the specified `key`.\n * @param key Identifies the reality data source.\n * @param iTwinId A default iTwinId to use.\n * @returns the requested reality data source, or `undefined` if it could not be produced.\n */\n createRealityDataSource(key: RealityDataSourceKey, iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined>;\n /** Optionally add any decorations specific to this reality data source provider.\n * For example, the Google Photorealistic 3D Tiles reality data source provider will add the Google logo.\n */\n decorate?(_context: DecorateContext): void;\n /** Optionally add attribution logo cards to the viewport's logo div. */\n addAttributions?(cards: HTMLTableElement, vp: ScreenViewport): Promise<void>;\n /** Enables cached decorations for this provider. @see [[ViewportDecorator.useCachedDecorations]] */\n useCachedDecorations?: true | undefined;\n}\n\n/** A registry of [[RealityDataSourceProvider]]s identified by their unique names. The registry can be accessed via [[IModelApp.realityDataSourceProviders]].\n * It includes a handful of built-in providers for sources like Cesium ION, ContextShare, OrbitGT, and arbitrary public-accessible URLs.\n * Any number of additional providers can be registered. They should typically be registered just after [[IModelApp.startup]].\n * @beta\n */\nexport class RealityDataSourceProviderRegistry {\n private readonly _providers = new Map<string, RealityDataSourceProvider>();\n\n /** @internal */\n public constructor() {\n this.register(RealityDataProvider.CesiumIonAsset, {\n createRealityDataSource: async (key, iTwinId) => RealityDataSourceCesiumIonAssetImpl.createFromKey(key, iTwinId),\n });\n this.register(RealityDataProvider.TilesetUrl, {\n createRealityDataSource: async (key, iTwinId) => RealityDataSourceTilesetUrlImpl.createFromKey(key, iTwinId),\n });\n this.register(RealityDataProvider.ContextShare, {\n createRealityDataSource: async (key, iTwinId) => RealityDataSourceContextShareImpl.createFromKey(key, iTwinId),\n });\n this.register(RealityDataProvider.OrbitGtBlob, {\n // ###TODO separate TilesetUrlImpl\n createRealityDataSource: async (key, iTwinId) => RealityDataSourceTilesetUrlImpl.createFromKey(key, iTwinId),\n });\n }\n\n /** Register `provider` to produce [[RealityDataSource]]s for the specified provider `name`. */\n public register(name: string, provider: RealityDataSourceProvider): void {\n this._providers.set(name, provider);\n }\n\n /** Look up the provider registered by the specified `name`. */\n public find(name: string): RealityDataSourceProvider | undefined {\n return this._providers.get(name);\n }\n}\n\n/**\n * Options for creating a Google Photorealistic 3D Tiles reality data source provider.\n * The caller must provide either an API key or a function that returns an auth token.\n * @beta\n */\nexport type Google3dTilesProviderOptions = {\n /** Google Map Tiles API Key used to access Google 3D Tiles. */\n apiKey: string;\n getAuthToken?: never;\n /** If true, the data attributions/copyrights from the Google 3D Tiles will be displayed on screen. The Google Maps logo will always be displayed. Defaults to `true`. */\n showCreditsOnScreen?: boolean\n} | {\n apiKey?: never;\n /** Function that returns an OAuth token for authenticating with Google 3D Tiles. This token is expected to not contain the \"Bearer\" prefix. */\n getAuthToken: () => Promise<string>;\n /** If true, the data attributions/copyrights from the Google 3D Tiles will be displayed on screen. The Google Maps logo will always be displayed. Defaults to `true`. */\n showCreditsOnScreen?: boolean;\n};\n\n/**\n * Will provide Google Photorealistic 3D Tiles (in 3dTile format).\n * A valid API key or getAuthToken fuction must be supplied when creating this provider.\n * To use this provider, you must register it with [[IModelApp.realityDataSourceProviders]].\n * Example usage:\n * ```ts\n * [[include:GooglePhotorealistic3dTiles_providerApiKey]]\n * ```\n * @see [Google Photorealistic 3D Tiles]($docs/learning/frontend/GooglePhotorealistic3dTiles.md)\n * @beta\n */\nexport class Google3dTilesProvider implements RealityDataSourceProvider {\n /** Google Map Tiles API Key used to access Google 3D Tiles. */\n private _apiKey?: string;\n /** Function that returns an OAuth token for authenticating with Google 3D Tiles. This token is expected to not contain the \"Bearer\" prefix. */\n private _getAuthToken?: () => Promise<string | undefined>;\n /** Decorator for Google Maps logos. */\n private _decorator: GoogleMapsDecorator;\n /** Enables cached decorations for this provider. @see [[ViewportDecorator.useCachedDecorations]] */\n public readonly useCachedDecorations = true;\n\n public async createRealityDataSource(key: RealityDataSourceKey, iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined> {\n if (!this._apiKey && !this._getAuthToken) {\n Logger.logError(loggerCategory, \"Either an API key or getAuthToken function are required to create a Google3dTilesProvider.\");\n return undefined;\n }\n return RealityDataSourceGoogle3dTilesImpl.createFromKey(key, iTwinId, this._apiKey, this._getAuthToken);\n }\n\n public constructor(options: Google3dTilesProviderOptions) {\n this._apiKey = options.apiKey;\n this._getAuthToken = options.getAuthToken;\n this._decorator = new GoogleMapsDecorator(options.showCreditsOnScreen ?? true);\n }\n\n /**\n * Initialize the Google 3D Tiles reality data source provider by activating its decorator, which consists of loading the correct Google Maps logo.\n * @returns `true` if the decorator was successfully activated, otherwise `false`.\n */\n public async initialize(): Promise<boolean> {\n const isActivated = await this._decorator.activate(\"satellite\");\n if (!isActivated) {\n const msg = \"Failed to activate decorator\";\n Logger.logError(loggerCategory, msg);\n throw new BentleyError(BentleyStatus.ERROR, msg);\n }\n return isActivated;\n }\n\n public decorate(_context: DecorateContext): void {\n this._decorator.decorate(_context);\n }\n\n public async addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void> {\n const copyrightMap = getCopyrights(vp);\n\n // Only add another logo card if the tiles have copyright\n if (copyrightMap.size > 0) {\n // Order by most occurances to least\n // See https://developers.google.com/maps/documentation/tile/create-renderer#display-attributions\n const sortedCopyrights = [...copyrightMap.entries()].sort((a, b) => b[1] - a[1]);\n\n let copyrightMsg = \"Data provided by:<br><ul>\";\n copyrightMsg += sortedCopyrights.map(([key]) => `<li>${key}</li>`).join(\"\");\n copyrightMsg += \"</ul>\";\n\n cards.appendChild(IModelApp.makeLogoCard({\n iconSrc: `${IModelApp.publicPath}images/google_on_white_hdpi.png`,\n heading: \"Google Photorealistic 3D Tiles\",\n notice: copyrightMsg\n }));\n }\n }\n}\n\n/** Returns the URL used for retrieving Google Photorealistic 3D Tiles.\n * @beta\n */\nexport function getGoogle3dTilesUrl() {\n return \"https://tile.googleapis.com/v1/3dtiles/root.json\";\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RealityDataSource.js","sourceRoot":"","sources":["../../src/RealityDataSource.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAc,MAAM,EAAsC,MAAM,qBAAqB,CAAC;AAC1H,OAAO,EAA6D,iBAAiB,EAAE,mBAA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AC;IACrB,CAAC;IAEM,QAAQ,CAAC,QAAyB;QACvC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAEM,KAAK,CAAC,eAAe,CAAC,KAAuB,EAAE,EAAkB;QACtE,MAAM,YAAY,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC;QAEvC,yDAAyD;QACzD,IAAI,YAAY,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YAC1B,oCAAoC;YACpC,iGAAiG;YACjG,MAAM,gBAAgB,GAAG,CAAC,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAEjF,IAAI,YAAY,GAAG,2BAA2B,CAAC;YAC/C,YAAY,IAAI,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC5E,YAAY,IAAI,OAAO,CAAC;YAExB,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAC9C,OAAO,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,UAAU,iCAAiC,CAAC;YACvE,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,oBAAoB,CAAC;YAE7C,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,YAAY,CAAC;gBACvC,OAAO;gBACP,SAAS,EAAE,EAAE;gBACb,OAAO,EAAE,gCAAgC;gBACzC,MAAM,EAAE,YAAY;aACrB,CAAC,CAAC,CAAC;QACN,CAAC;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,kDAAkD,CAAC;AAC5D,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\nimport { BentleyError, BentleyStatus, GuidString, Logger, LoggingMetaData, RealityDataStatus } from \"@itwin/core-bentley\";\nimport { Cartographic, EcefLocation, OrbitGtBlobProps, RealityData, RealityDataFormat, RealityDataProvider, RealityDataSourceKey } from \"@itwin/core-common\";\nimport { Range3d } from \"@itwin/core-geometry\";\nimport { FrontendLoggerCategory } from \"./common/FrontendLoggerCategory\";\nimport { CesiumIonAssetProvider, ContextShareProvider, getCesiumAssetUrl } from \"./tile/internal\";\nimport { RealityDataSourceTilesetUrlImpl } from \"./RealityDataSourceTilesetUrlImpl\";\nimport { RealityDataSourceContextShareImpl } from \"./RealityDataSourceContextShareImpl\";\nimport { RealityDataSourceCesiumIonAssetImpl } from \"./RealityDataSourceCesiumIonAssetImpl\";\nimport { RealityDataSourceGoogle3dTilesImpl } from \"./internal/RealityDataSourceGoogle3dTilesImpl\";\nimport { IModelApp } from \"./IModelApp\";\nimport { getCopyrights, GoogleMapsDecorator } from \"./internal/GoogleMapsDecorator\";\nimport { DecorateContext } from \"./ViewContext\";\nimport { ScreenViewport } from \"./Viewport\";\n\nconst loggerCategory: string = FrontendLoggerCategory.RealityData;\n\n/**\n * Reality Data Operation error\n * @alpha\n */\nexport class RealityDataError extends BentleyError {\n public constructor(errorNumber: RealityDataStatus, message: string, getMetaData?: LoggingMetaData) {\n super(errorNumber, message, getMetaData);\n }\n}\n\n/** This interface provide spatial location and volume of interest, in meters, centered around `spatial location`\n * @alpha\n */\nexport interface SpatialLocationAndExtents {\n /** location of the point at the center of the reaity data */\n location: Cartographic | EcefLocation;\n /** extents of the volume around location */\n worldRange: Range3d;\n /** true if this reality data is geolocated\n * A reality data is geolocated when we can compute a valid position relative to the earth surface.\n * Note that some reality data contains custom coordinate system without any information on the relative position on earth.\n * These reality data will have a location and worldRange but will be identified by the isGeoLocated set to false.\n */\n isGeolocated: boolean;\n}\n\n/** This interface provides information to identify the product and engine that create this reality data\n * @alpha\n */\nexport interface PublisherProductInfo {\n /** product that create this reality data */\n product: string;\n /** engine that create this reality data */\n engine: string;\n /** the version of the engine that create this reality data */\n version: string;\n}\n\n/** This interface provide methods used to access a reality data from a reality data provider\n * @beta\n */\nexport interface RealityDataSource {\n readonly key: RealityDataSourceKey;\n readonly isContextShare: boolean;\n readonly realityDataId: string | undefined;\n /** Metatdata on the reality data source */\n readonly realityData: RealityData | undefined;\n /** The reality data type (e.g.: \"RealityMesh3DTiles\", OPC, Terrain3DTiles, Cesium3DTiles, ... )*/\n readonly realityDataType: string | undefined;\n /** This method returns the URL to obtain the Reality Data properties.\n * @param iTwinId id of associated iTwin project\n * @returns string containing the URL to reality data.\n */\n getServiceUrl(iTwinId: GuidString | undefined): Promise<string | undefined>;\n /** If true, the geometricError property of the tiles will be used to compute screen-space error.\n * @alpha\n */\n readonly usesGeometricError?: boolean;\n /** If [[usesGeometricError]] is `true`, optionally specifies the maximum error, in pixels, to permit for a tile before requiring refinement of that tile.\n * Default: 16\n * @alpha\n */\n readonly maximumScreenSpaceError?: number;\n /** Given the URL of a tile's content, return the type of that content.\n * \"tileset\" indicates the content points to a JSON tileset describing the structure of the tile tree below the tile.\n * \"tile\" indicates the content points to a binary representation of the tile's graphics.\n * @alpha\n */\n getTileContentType(url: string): \"tile\" | \"tileset\";\n\n /** Gets a reality data root document json\n * @returns tile data json\n * @internal\n */\n getRootDocument(iTwinId: GuidString | undefined): Promise<any>;\n /** Gets tile content\n * @param name name or path of tile\n * @returns array buffer of tile content\n * @internal\n */\n getTileContent(name: string): Promise<any>;\n /** Gets a tileset's app data json\n * @param name name or path of tile\n * @returns app data json object\n * @internal\n */\n getTileJson(name: string): Promise<any>;\n /** Gets spatial location and extents of this reality data source.\n * Will return undefined if cannot be resolved or is unbounded (cover entire earth eg: Open Street Map Building from Ion Asset)\n * @returns spatial location and extents\n * @throws [[RealityDataError]] if source is invalid or cannot be read\n * @alpha\n */\n getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined>;\n /** Gets information to identify the product and engine that create this reality data\n * Will return undefined if cannot be resolved\n * @returns information to identify the product and engine that create this reality data\n * @alpha\n */\n getPublisherProductInfo(): Promise<PublisherProductInfo | undefined>;\n /** Optional, gets the tileset url associated with the reality data source\n * @returns tileset url\n * @internal\n */\n getTilesetUrl?(): string | undefined;\n}\n/** Utility functions for RealityDataSource\n * @beta\n */\nexport namespace RealityDataSource {\n /** Create a RealityDataSourceKey from a tilesetUrl.\n * @param tilesetUrl the reality data attachment url\n * @param inputProvider identify the RealityDataProvider if known, otherwise function will try to extract it from the tilesetUrl\n * @param inputFormat identify the RealityDataFormat if known, otherwise function will try to extract it from the tilesetUrl\n * @returns the RealityDataSourceKey that uniquely identify a reality data for a provider\n */\n export function createKeyFromUrl(tilesetUrl: string, inputProvider?: RealityDataProvider, inputFormat?: RealityDataFormat): RealityDataSourceKey {\n let format = inputFormat ? inputFormat : RealityDataFormat.fromUrl(tilesetUrl);\n if (CesiumIonAssetProvider.isProviderUrl(tilesetUrl)) {\n const provider = RealityDataProvider.CesiumIonAsset;\n let cesiumIonAssetKey: RealityDataSourceKey = { provider, format, id: CesiumIonAssetProvider.osmBuildingId }; // default OSM building\n // Parse URL to extract possible asset id and key if provided\n const cesiumAsset = CesiumIonAssetProvider.parseCesiumUrl(tilesetUrl);\n if (cesiumAsset) {\n cesiumIonAssetKey = RealityDataSource.createCesiumIonAssetKey(cesiumAsset.id, cesiumAsset.key);\n }\n return cesiumIonAssetKey;\n }\n\n // Try to extract realityDataId from URL and if not possible, use the url as the key\n if (ContextShareProvider.isProviderUrl(tilesetUrl)) {\n const info = ContextShareProvider.getInfoFromUrl(tilesetUrl);\n const provider = inputProvider ? inputProvider : info.provider;\n format = inputFormat ? inputFormat : info.format;\n const contextShareKey: RealityDataSourceKey = { provider, format, id: info.id, iTwinId: info.iTwinId };\n return contextShareKey;\n }\n\n // default to tileSetUrl\n const provider2 = inputProvider ? inputProvider : RealityDataProvider.TilesetUrl;\n const urlKey: RealityDataSourceKey = { provider: provider2, format, id: tilesetUrl };\n return urlKey;\n }\n /** @alpha - was used for a very specific case of point cloud (opc) attachment that should not be made public */\n export function createKeyFromBlobUrl(blobUrl: string, inputProvider?: RealityDataProvider, inputFormat?: RealityDataFormat): RealityDataSourceKey {\n const info = ContextShareProvider.getInfoFromBlobUrl(blobUrl);\n const format = inputFormat ? inputFormat : info.format;\n const provider = inputProvider ? inputProvider : info.provider;\n const contextShareKey: RealityDataSourceKey = { provider, format, id: info.id };\n return contextShareKey;\n }\n /** @alpha - OrbitGtBlobProps is alpha */\n export function createKeyFromOrbitGtBlobProps(orbitGtBlob: OrbitGtBlobProps, inputProvider?: RealityDataProvider, inputFormat?: RealityDataFormat): RealityDataSourceKey {\n const format = inputFormat ? inputFormat : RealityDataFormat.OPC;\n if (orbitGtBlob.blobFileName && orbitGtBlob.blobFileName.toLowerCase().startsWith(\"http\")) {\n return RealityDataSource.createKeyFromBlobUrl(orbitGtBlob.blobFileName, inputProvider, format);\n } else if (orbitGtBlob.rdsUrl) {\n return RealityDataSource.createKeyFromUrl(orbitGtBlob.rdsUrl, inputProvider, format);\n }\n const provider = inputProvider ? inputProvider : RealityDataProvider.OrbitGtBlob;\n const id = `${orbitGtBlob.accountName}:${orbitGtBlob.containerName}:${orbitGtBlob.blobFileName}:?${orbitGtBlob.sasToken}`;\n return { provider, format, id };\n }\n /** @alpha - OrbitGtBlobProps is alpha */\n export function createOrbitGtBlobPropsFromKey(rdSourceKey: RealityDataSourceKey): OrbitGtBlobProps | undefined {\n if (rdSourceKey.provider !== RealityDataProvider.OrbitGtBlob)\n return undefined;\n const splitIds = rdSourceKey.id.split(\":\");\n const sasTokenIndex = rdSourceKey.id.indexOf(\":?\");\n const sasToken = rdSourceKey.id.substring(sasTokenIndex + 2);\n const orbitGtBlob: OrbitGtBlobProps = {\n accountName: splitIds[0],\n containerName: splitIds[1],\n blobFileName: splitIds[2],\n sasToken,\n };\n return orbitGtBlob;\n }\n /** @internal - Is used by \"fdt attach cesium asset\" keyin*/\n export function createCesiumIonAssetKey(osmAssetId: number, requestKey: string): RealityDataSourceKey {\n const id = getCesiumAssetUrl(osmAssetId,requestKey);\n return {provider: RealityDataProvider.CesiumIonAsset, format: RealityDataFormat.ThreeDTile, id};\n }\n /** Return an instance of a RealityDataSource from a source key.\n * There will aways be only one reality data RealityDataSource for a corresponding reality data source key.\n * @alpha\n */\n export async function fromKey(key: RealityDataSourceKey, iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined> {\n const provider = IModelApp.realityDataSourceProviders.find(key.provider);\n if (!provider) {\n Logger.logWarning(loggerCategory, `RealityDataSourceProvider \"${key.provider}\" is not registered`);\n return undefined;\n }\n\n return provider.createRealityDataSource(key, iTwinId);\n }\n}\n\n/** A named supplier of [RealityDataSource]]s.\n * The provider's name is stored in a [RealityDataSourceKey]($common). When the [[RealityDataSource]] is requested from the key,\n * the provider is looked up in [[IModelApp.realityDataSourceProviders]] by its name and, if found, its [[createRealityDataSource]] method\n * is invoked to produce the reality data source.\n * @beta\n */\n\nexport interface RealityDataSourceProvider {\n /** Produce a RealityDataSource for the specified `key`.\n * @param key Identifies the reality data source.\n * @param iTwinId A default iTwinId to use.\n * @returns the requested reality data source, or `undefined` if it could not be produced.\n */\n createRealityDataSource(key: RealityDataSourceKey, iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined>;\n /** Optionally add any decorations specific to this reality data source provider.\n * For example, the Google Photorealistic 3D Tiles reality data source provider will add the Google logo.\n */\n decorate?(_context: DecorateContext): void;\n /** Optionally add attribution logo cards to the viewport's logo div. */\n addAttributions?(cards: HTMLTableElement, vp: ScreenViewport): Promise<void>;\n /** Enables cached decorations for this provider. @see [[ViewportDecorator.useCachedDecorations]] */\n useCachedDecorations?: true | undefined;\n}\n\n/** A registry of [[RealityDataSourceProvider]]s identified by their unique names. The registry can be accessed via [[IModelApp.realityDataSourceProviders]].\n * It includes a handful of built-in providers for sources like Cesium ION, ContextShare, OrbitGT, and arbitrary public-accessible URLs.\n * Any number of additional providers can be registered. They should typically be registered just after [[IModelApp.startup]].\n * @beta\n */\nexport class RealityDataSourceProviderRegistry {\n private readonly _providers = new Map<string, RealityDataSourceProvider>();\n\n /** @internal */\n public constructor() {\n this.register(RealityDataProvider.CesiumIonAsset, {\n createRealityDataSource: async (key, iTwinId) => RealityDataSourceCesiumIonAssetImpl.createFromKey(key, iTwinId),\n });\n this.register(RealityDataProvider.TilesetUrl, {\n createRealityDataSource: async (key, iTwinId) => RealityDataSourceTilesetUrlImpl.createFromKey(key, iTwinId),\n });\n this.register(RealityDataProvider.ContextShare, {\n createRealityDataSource: async (key, iTwinId) => RealityDataSourceContextShareImpl.createFromKey(key, iTwinId),\n });\n this.register(RealityDataProvider.OrbitGtBlob, {\n // ###TODO separate TilesetUrlImpl\n createRealityDataSource: async (key, iTwinId) => RealityDataSourceTilesetUrlImpl.createFromKey(key, iTwinId),\n });\n }\n\n /** Register `provider` to produce [[RealityDataSource]]s for the specified provider `name`. */\n public register(name: string, provider: RealityDataSourceProvider): void {\n this._providers.set(name, provider);\n }\n\n /** Look up the provider registered by the specified `name`. */\n public find(name: string): RealityDataSourceProvider | undefined {\n return this._providers.get(name);\n }\n}\n\n/**\n * Options for creating a Google Photorealistic 3D Tiles reality data source provider.\n * The caller must provide either an API key or a function that returns an auth token.\n * @beta\n */\nexport type Google3dTilesProviderOptions = {\n /** Google Map Tiles API Key used to access Google 3D Tiles. */\n apiKey: string;\n getAuthToken?: never;\n /** If true, the data attributions/copyrights from the Google 3D Tiles will be displayed on screen. The Google Maps logo will always be displayed. Defaults to `true`. */\n showCreditsOnScreen?: boolean\n} | {\n apiKey?: never;\n /** Function that returns an OAuth token for authenticating with Google 3D Tiles. This token is expected to not contain the \"Bearer\" prefix. */\n getAuthToken: () => Promise<string>;\n /** If true, the data attributions/copyrights from the Google 3D Tiles will be displayed on screen. The Google Maps logo will always be displayed. Defaults to `true`. */\n showCreditsOnScreen?: boolean;\n};\n\n/**\n * Will provide Google Photorealistic 3D Tiles (in 3dTile format).\n * A valid API key or getAuthToken fuction must be supplied when creating this provider.\n * To use this provider, you must register it with [[IModelApp.realityDataSourceProviders]].\n * Example usage:\n * ```ts\n * [[include:GooglePhotorealistic3dTiles_providerApiKey]]\n * ```\n * @see [Google Photorealistic 3D Tiles]($docs/learning/frontend/GooglePhotorealistic3dTiles.md)\n * @beta\n */\nexport class Google3dTilesProvider implements RealityDataSourceProvider {\n /** Google Map Tiles API Key used to access Google 3D Tiles. */\n private _apiKey?: string;\n /** Function that returns an OAuth token for authenticating with Google 3D Tiles. This token is expected to not contain the \"Bearer\" prefix. */\n private _getAuthToken?: () => Promise<string | undefined>;\n /** Decorator for Google Maps logos. */\n private _decorator: GoogleMapsDecorator;\n /** Enables cached decorations for this provider. @see [[ViewportDecorator.useCachedDecorations]] */\n public readonly useCachedDecorations = true;\n\n public async createRealityDataSource(key: RealityDataSourceKey, iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined> {\n if (!this._apiKey && !this._getAuthToken) {\n Logger.logError(loggerCategory, \"Either an API key or getAuthToken function are required to create a Google3dTilesProvider.\");\n return undefined;\n }\n return RealityDataSourceGoogle3dTilesImpl.createFromKey(key, iTwinId, this._apiKey, this._getAuthToken);\n }\n\n public constructor(options: Google3dTilesProviderOptions) {\n this._apiKey = options.apiKey;\n this._getAuthToken = options.getAuthToken;\n this._decorator = new GoogleMapsDecorator(options.showCreditsOnScreen ?? true);\n }\n\n /**\n * Initialize the Google 3D Tiles reality data source provider by activating its decorator, which consists of loading the correct Google Maps logo.\n * @returns `true` if the decorator was successfully activated, otherwise `false`.\n */\n public async initialize(): Promise<boolean> {\n const isActivated = await this._decorator.activate(\"satellite\");\n if (!isActivated) {\n const msg = \"Failed to activate decorator\";\n Logger.logError(loggerCategory, msg);\n throw new BentleyError(BentleyStatus.ERROR, msg);\n }\n return isActivated;\n }\n\n public decorate(_context: DecorateContext): void {\n this._decorator.decorate(_context);\n }\n\n public async addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void> {\n const copyrightMap = getCopyrights(vp);\n\n // Only add another logo card if the tiles have copyright\n if (copyrightMap.size > 0) {\n // Order by most occurances to least\n // See https://developers.google.com/maps/documentation/tile/create-renderer#display-attributions\n const sortedCopyrights = [...copyrightMap.entries()].sort((a, b) => b[1] - a[1]);\n\n let copyrightMsg = \"Data provided by:<br><ul>\";\n copyrightMsg += sortedCopyrights.map(([key]) => `<li>${key}</li>`).join(\"\");\n copyrightMsg += \"</ul>\";\n\n const iconSrc = document.createElement(\"img\");\n iconSrc.src = `${IModelApp.publicPath}images/GoogleMaps_Logo_Gray.svg`;\n iconSrc.style.padding = \"10px 10px 5px 10px\";\n\n cards.appendChild(IModelApp.makeLogoCard({\n iconSrc,\n iconWidth: 98,\n heading: \"Google Photorealistic 3D Tiles\",\n notice: copyrightMsg\n }));\n }\n }\n}\n\n/** Returns the URL used for retrieving Google Photorealistic 3D Tiles.\n * @beta\n */\nexport function getGoogle3dTilesUrl() {\n return \"https://tile.googleapis.com/v1/3dtiles/root.json\";\n}\n"]}
|
|
@@ -71,12 +71,12 @@ export class GoogleMapsDecorator {
|
|
|
71
71
|
/** Activate the logo based on the given map type. */
|
|
72
72
|
async activate(mapType) {
|
|
73
73
|
// Pick the logo that is the most visible on the background map
|
|
74
|
-
const imageName = mapType === "
|
|
75
|
-
"
|
|
76
|
-
"
|
|
74
|
+
const imageName = mapType === "satellite" ?
|
|
75
|
+
"GoogleMaps_Logo_WithDarkOutline" :
|
|
76
|
+
"GoogleMaps_Logo_WithLightOutline";
|
|
77
77
|
// We need to move the logo right after the 'i.js' button
|
|
78
78
|
this.logo.offset = new Point3d(45, 10);
|
|
79
|
-
return this.logo.activate(IconSprites.getSpriteFromUrl(`${IModelApp.publicPath}images/${imageName}.
|
|
79
|
+
return this.logo.activate(IconSprites.getSpriteFromUrl(`${IModelApp.publicPath}images/${imageName}.svg`));
|
|
80
80
|
}
|
|
81
81
|
;
|
|
82
82
|
/** Decorate implementation */
|
|
@@ -100,8 +100,8 @@ export class GoogleMapsDecorator {
|
|
|
100
100
|
elem.style.fontSize = "11px";
|
|
101
101
|
elem.style.textWrap = "wrap";
|
|
102
102
|
elem.style.position = "absolute";
|
|
103
|
-
elem.style.bottom = "
|
|
104
|
-
elem.style.left = "
|
|
103
|
+
elem.style.bottom = "14px";
|
|
104
|
+
elem.style.left = "155px";
|
|
105
105
|
context.addHtmlDecoration(elem);
|
|
106
106
|
};
|
|
107
107
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleMapsDecorator.js","sourceRoot":"","sources":["../../../src/internal/GoogleMapsDecorator.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAG/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAU,MAAM,YAAY,CAAC;AASjD;;GAEG;AACH,MAAM,OAAO,cAAc;IACjB,OAAO,CAAU;IAEzB,4DAA4D;IAC5C,QAAQ,GAAG,IAAI,OAAO,EAAE,CAAC;IAEjC,OAAO,CAAsB;IAErC,IAAW,MAAM,CAAC,MAA2B;QAC3C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,0CAA0C;IAC1C,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,4DAA4D;IACrD,qBAAqB,CAAC,OAAwB;QACnD,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ;YACzC,OAAO,KAAK,CAAC;QAEf,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,QAAQ,CAA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B,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;QACjC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QAC3B,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC;QAE1B,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,EAAkB;IAC9C,MAAM,KAAK,GAAG,SAAS,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC;IAChE,MAAM,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC/C,IAAI,KAAK,EAAE,CAAC;QACV,KAAK,MAAM,IAAI,IAAI,KAAyB,EAAE,CAAC;YAC7C,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gBACnB,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;oBAClD,MAAM,YAAY,GAAG,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;oBACjD,YAAY,CAAC,GAAG,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACnE,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { Point3d } from \"@itwin/core-geometry\";\nimport { CanvasDecoration } from \"../render/CanvasDecoration\";\nimport { DecorateContext } from \"../ViewContext\";\nimport { IModelApp } from \"../IModelApp\";\nimport { Decorator } from \"../ViewManager\";\nimport { IconSprites, Sprite } from \"../Sprites\";\nimport { RealityTile } from \"../tile/internal\";\nimport { ScreenViewport } from \"../Viewport\";\n\n/** Layer types that can be added to the map.\n * @internal\n */\ntype GoogleMapsMapTypes = \"roadmap\" | \"satellite\" | \"terrain\";\n\n/** A simple decorator that shows the logo at a given screen position.\n * @internal\n */\nexport class LogoDecoration implements CanvasDecoration {\n private _sprite?: Sprite;\n\n /** The current position of the logo in view coordinates. */\n public readonly position = new Point3d();\n\n private _offset: Point3d | undefined;\n\n public set offset(offset: Point3d | undefined) {\n this._offset = offset;\n }\n\n /** The logo offset in view coordinates.*/\n public get offset() {\n return this._offset;\n }\n\n /** Move the logo to the lower left corner of the screen. */\n public moveToLowerLeftCorner(context: DecorateContext): boolean {\n if (!this._sprite || !this._sprite.isLoaded)\n return false;\n\n this.position.x = this._offset?.x ?? 0;\n this.position.y = context.viewport.parentDiv.clientHeight - this._sprite.size.y;\n if (this._offset?.y)\n this.position.y -= this._offset.y;\n return true;\n }\n\n /* TODO: Add other move methods as needed */\n\n /** Indicate if the logo is loaded and ready to be drawn. */\n public get isLoaded() { return this._sprite?.isLoaded ?? false; }\n\n public async activate(sprite: Sprite): Promise<boolean> {\n this._sprite = sprite;\n return new Promise<boolean>((resolve, _reject) => {\n sprite.loadPromise.then(() => {\n resolve(true);\n }).catch(() => {\n resolve (false);\n });\n });\n }\n\n /** Draw this sprite onto the supplied canvas.\n * @see [[CanvasDecoration.drawDecoration]]\n */\n public drawDecoration(ctx: CanvasRenderingContext2D): void {\n if (this.isLoaded) {\n // Draw image with an origin at the top left corner\n ctx.drawImage(this._sprite!.image!, 0, 0);\n }\n }\n\n public decorate(context: DecorateContext) {\n context.addCanvasDecoration(this);\n }\n}\n\n/** A decorator that adds the Google Maps logo to the lower left corner of the screen.\n * @internal\n */\nexport class GoogleMapsDecorator implements Decorator {\n public readonly logo = new LogoDecoration();\n private _showCreditsOnScreen?: boolean;\n\n /** Create a new GoogleMapsDecorator.\n * @param showCreditsOnScreen If true, the data attributions/copyrights from the Google Photorealistic 3D Tiles will be displayed on screen. The Google Maps logo will always be displayed.\n */\n constructor(showCreditsOnScreen?: boolean) {\n this._showCreditsOnScreen = showCreditsOnScreen;\n }\n\n /** Activate the logo based on the given map type. */\n public async activate(mapType: GoogleMapsMapTypes): Promise<boolean> {\n // Pick the logo that is the most visible on the background map\n const imageName = mapType === \"satellite\" ?\n \"GoogleMaps_Logo_WithDarkOutline\" :\n \"GoogleMaps_Logo_WithLightOutline\";\n\n // We need to move the logo right after the 'i.js' button\n this.logo.offset = new Point3d(45, 10);\n\n return this.logo.activate(IconSprites.getSpriteFromUrl(`${IModelApp.publicPath}images/${imageName}.svg`));\n };\n\n /** Decorate implementation */\n public decorate = (context: DecorateContext) => {\n if (!this.logo.isLoaded)\n return;\n this.logo.moveToLowerLeftCorner(context);\n this.logo.decorate(context);\n\n if (!this._showCreditsOnScreen)\n return;\n\n // Get data attribution (copyright) text\n const copyrightMap = getCopyrights(context.viewport);\n // Order by most occurances to least\n // See https://developers.google.com/maps/documentation/tile/create-renderer#display-attributions\n const sortedCopyrights = [...copyrightMap.entries()].sort((a, b) => b[1] - a[1]);\n const copyrightText = sortedCopyrights.map(([key]) => ` • ${key}`).join(\"\");\n\n // Create and add element, offset to leave space for i.js and Google logos\n const elem = document.createElement(\"div\");\n elem.innerHTML = copyrightText;\n elem.style.color = \"white\";\n elem.style.fontSize = \"11px\";\n elem.style.textWrap = \"wrap\";\n elem.style.position = \"absolute\";\n elem.style.bottom = \"14px\";\n elem.style.left = \"155px\";\n\n context.addHtmlDecoration(elem);\n };\n}\n\n/** Get copyrights from tiles currently in the viewport.\n * @internal\n */\nexport function getCopyrights(vp: ScreenViewport): Map<string, number> {\n const tiles = IModelApp.tileAdmin.getTilesForUser(vp)?.selected;\n const copyrightMap = new Map<string, number>();\n if (tiles) {\n for (const tile of tiles as Set<RealityTile>) {\n if (tile.copyright) {\n for (const copyright of tile.copyright.split(\";\")) {\n const currentCount = copyrightMap.get(copyright);\n copyrightMap.set(copyright, currentCount ? currentCount + 1 : 1);\n }\n }\n }\n }\n return copyrightMap;\n}"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 26.5.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
width="98px" height="18px" viewBox="0 0 98 18" enable-background="new 0 0 98 18" xml:space="preserve">
|
|
5
|
+
<g>
|
|
6
|
+
<path fill="#5E5E5E" d="M7.08,13.96c-1.93,0-3.59-0.68-4.99-2.05C0.7,10.54,0,8.9,0,6.98c0-1.92,0.7-3.56,2.09-4.93
|
|
7
|
+
C3.49,0.68,5.15,0,7.08,0c1.85,0,3.45,0.64,4.79,1.92l-1.35,1.35C9.56,2.36,8.41,1.91,7.08,1.91c-1.4,0-2.58,0.49-3.55,1.48
|
|
8
|
+
C2.56,4.38,2.08,5.57,2.08,6.98c0,1.41,0.49,2.61,1.46,3.59c0.97,0.99,2.15,1.48,3.55,1.48c1.42,0,2.59-0.47,3.53-1.4
|
|
9
|
+
c0.56-0.56,0.9-1.36,1.04-2.4H7.08V6.35h6.42c0.07,0.34,0.1,0.74,0.1,1.19c0,1.87-0.55,3.36-1.65,4.46
|
|
10
|
+
C10.71,13.31,9.08,13.96,7.08,13.96z M22,12.68c-0.87,0.86-1.94,1.29-3.2,1.29c-1.26,0-2.33-0.43-3.2-1.29
|
|
11
|
+
c-0.87-0.86-1.31-1.93-1.31-3.21c0-1.28,0.44-2.35,1.31-3.21c0.87-0.86,1.94-1.29,3.2-1.29c1.26,0,2.33,0.43,3.2,1.29
|
|
12
|
+
c0.87,0.86,1.31,1.93,1.31,3.21C23.31,10.75,22.88,11.82,22,12.68z M17.01,11.42c0.5,0.52,1.1,0.77,1.79,0.77
|
|
13
|
+
c0.69,0,1.29-0.26,1.79-0.77c0.5-0.52,0.75-1.17,0.75-1.95c0-0.79-0.25-1.45-0.74-1.96C20.1,7,19.5,6.74,18.8,6.74
|
|
14
|
+
c-0.7,0-1.3,0.26-1.8,0.77c-0.49,0.51-0.74,1.16-0.74,1.96C16.26,10.25,16.51,10.9,17.01,11.42z M31.85,12.68
|
|
15
|
+
c-0.87,0.86-1.94,1.29-3.2,1.29s-2.33-0.43-3.2-1.29c-0.87-0.86-1.31-1.93-1.31-3.21c0-1.28,0.44-2.35,1.31-3.21
|
|
16
|
+
c0.87-0.86,1.94-1.29,3.2-1.29s2.33,0.43,3.2,1.29c0.87,0.86,1.31,1.93,1.31,3.21C33.16,10.75,32.72,11.82,31.85,12.68z
|
|
17
|
+
M26.86,11.42c0.5,0.52,1.1,0.77,1.79,0.77c0.69,0,1.29-0.26,1.79-0.77c0.5-0.52,0.75-1.17,0.75-1.95c0-0.79-0.25-1.45-0.74-1.96
|
|
18
|
+
s-1.09-0.77-1.8-0.77c-0.7,0-1.3,0.26-1.8,0.77c-0.49,0.51-0.74,1.16-0.74,1.96C26.11,10.25,26.36,10.9,26.86,11.42z M38.32,18
|
|
19
|
+
c-1,0-1.84-0.27-2.52-0.8c-0.68-0.53-1.17-1.15-1.46-1.86l1.72-0.72c0.18,0.43,0.47,0.81,0.85,1.12c0.39,0.32,0.86,0.48,1.41,0.48
|
|
20
|
+
c0.75,0,1.34-0.23,1.76-0.68c0.43-0.45,0.64-1.11,0.64-1.96v-0.65h-0.07c-0.56,0.68-1.35,1.02-2.37,1.02
|
|
21
|
+
c-1.15,0-2.15-0.44-3.01-1.31c-0.86-0.87-1.29-1.93-1.29-3.17c0-1.25,0.43-2.31,1.29-3.19c0.86-0.88,1.87-1.32,3.01-1.32
|
|
22
|
+
c0.51,0,0.97,0.1,1.39,0.29c0.41,0.19,0.74,0.43,0.98,0.72h0.07V5.25h1.87v8.07c0,1.57-0.4,2.74-1.2,3.52
|
|
23
|
+
C40.59,17.61,39.57,18,38.32,18z M38.45,12.19c0.68,0,1.25-0.26,1.71-0.77c0.46-0.52,0.69-1.16,0.69-1.93
|
|
24
|
+
c0-0.78-0.23-1.44-0.69-1.96C39.7,7,39.13,6.74,38.45,6.74c-0.69,0-1.28,0.26-1.77,0.78c-0.49,0.52-0.73,1.18-0.73,1.96
|
|
25
|
+
c0,0.77,0.24,1.42,0.73,1.93C37.17,11.93,37.76,12.19,38.45,12.19z M45.93,0.48v13.21h-1.98V0.48H45.93z M51.34,13.96
|
|
26
|
+
c-1.27,0-2.33-0.43-3.18-1.29c-0.85-0.86-1.28-1.93-1.28-3.2c0-1.32,0.41-2.4,1.23-3.24c0.82-0.84,1.82-1.26,3.01-1.26
|
|
27
|
+
c0.55,0,1.05,0.1,1.52,0.3c0.47,0.2,0.85,0.45,1.16,0.77c0.31,0.31,0.55,0.62,0.73,0.91c0.18,0.3,0.33,0.59,0.44,0.89l0.2,0.51
|
|
28
|
+
l-6.01,2.49c0.47,0.91,1.19,1.36,2.18,1.36c0.91,0,1.65-0.41,2.21-1.24l1.53,1.02c-0.34,0.51-0.82,0.97-1.45,1.38
|
|
29
|
+
C53.02,13.76,52.25,13.96,51.34,13.96z M48.84,9.33l4.02-1.67c-0.11-0.28-0.32-0.51-0.63-0.69c-0.31-0.18-0.65-0.26-1.04-0.26
|
|
30
|
+
c-0.58,0-1.12,0.24-1.63,0.72C49.06,7.9,48.82,8.54,48.84,9.33z"/>
|
|
31
|
+
<path fill="#5E5E5E" d="M60.05,13.69V1.5h1.57l4.24,7.42h0.07l4.24-7.42h1.57v12.19h-1.57V6.45l0.07-2.04h-0.07l-3.81,6.69h-0.92
|
|
32
|
+
l-3.81-6.69h-0.07l0.07,2.04v7.24H60.05z M76.36,13.96c-0.89,0-1.63-0.26-2.22-0.77c-0.6-0.51-0.89-1.19-0.89-2.03
|
|
33
|
+
c0-0.91,0.35-1.62,1.06-2.14c0.7-0.52,1.57-0.77,2.61-0.77c0.92,0,1.67,0.17,2.26,0.51V8.53c0-0.61-0.21-1.1-0.63-1.47
|
|
34
|
+
c-0.42-0.37-0.94-0.55-1.55-0.55c-0.45,0-0.87,0.11-1.23,0.32C75.39,7.04,75.13,7.34,75,7.71L73.57,7.1
|
|
35
|
+
c0.19-0.5,0.57-0.96,1.14-1.39c0.57-0.43,1.32-0.64,2.25-0.64c1.07,0,1.95,0.31,2.66,0.94c0.7,0.62,1.06,1.5,1.06,2.64v5.04h-1.5
|
|
36
|
+
v-1.16H79.1C78.48,13.49,77.56,13.96,76.36,13.96z M76.61,12.53c0.65,0,1.23-0.24,1.76-0.72c0.53-0.48,0.79-1.05,0.79-1.71
|
|
37
|
+
c-0.44-0.36-1.11-0.54-1.99-0.54c-0.76,0-1.33,0.16-1.72,0.49c-0.39,0.33-0.58,0.72-0.58,1.16c0,0.41,0.18,0.73,0.53,0.97
|
|
38
|
+
C75.76,12.41,76.16,12.53,76.61,12.53z M86.58,13.96c-0.64,0-1.21-0.14-1.71-0.41c-0.51-0.27-0.88-0.61-1.13-1.02h-0.07l0.07,1.16
|
|
39
|
+
v3.68h-1.57V5.35h1.5v1.16h0.07c0.25-0.41,0.63-0.75,1.13-1.02c0.51-0.27,1.08-0.41,1.71-0.41c1.08,0,2.01,0.43,2.79,1.28
|
|
40
|
+
c0.78,0.85,1.18,1.91,1.18,3.17c0,1.26-0.39,2.32-1.18,3.17C88.59,13.54,87.66,13.96,86.58,13.96z M86.32,12.53
|
|
41
|
+
c0.73,0,1.35-0.28,1.87-0.83c0.52-0.55,0.78-1.28,0.78-2.19c0-0.91-0.26-1.64-0.78-2.19c-0.52-0.55-1.15-0.83-1.87-0.83
|
|
42
|
+
c-0.74,0-1.37,0.27-1.88,0.82c-0.52,0.54-0.77,1.28-0.77,2.2s0.26,1.65,0.77,2.2C84.96,12.26,85.58,12.53,86.32,12.53z
|
|
43
|
+
M94.71,13.96c-0.93,0-1.7-0.23-2.31-0.68c-0.61-0.45-1.05-1.02-1.34-1.7l1.4-0.58c0.44,1.04,1.2,1.57,2.26,1.57
|
|
44
|
+
c0.49,0,0.89-0.11,1.2-0.32c0.31-0.22,0.47-0.5,0.47-0.85c0-0.54-0.38-0.91-1.14-1.11l-1.69-0.41c-0.53-0.14-1.04-0.39-1.52-0.77
|
|
45
|
+
c-0.48-0.38-0.72-0.89-0.72-1.54c0-0.74,0.33-1.34,0.98-1.8c0.65-0.46,1.43-0.69,2.32-0.69c0.74,0,1.4,0.17,1.98,0.5
|
|
46
|
+
c0.58,0.34,0.99,0.81,1.24,1.44L96.5,7.58c-0.31-0.74-0.94-1.11-1.91-1.11c-0.47,0-0.86,0.1-1.18,0.29
|
|
47
|
+
c-0.32,0.19-0.48,0.45-0.48,0.78c0,0.48,0.37,0.8,1.11,0.97l1.65,0.39c0.78,0.18,1.36,0.49,1.74,0.94c0.37,0.44,0.56,0.94,0.56,1.5
|
|
48
|
+
c0,0.75-0.31,1.37-0.92,1.87C96.47,13.71,95.68,13.96,94.71,13.96z"/>
|
|
49
|
+
</g>
|
|
50
|
+
</svg>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 26.5.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
width="105px" height="22px" viewBox="0 0 105 22" enable-background="new 0 0 105 22" xml:space="preserve">
|
|
5
|
+
<g id="Logo">
|
|
6
|
+
<g id="Outline" opacity="0.8">
|
|
7
|
+
<path fill="#1E1E1E" d="M59.77,11.44l-0.93-2.32c-0.16-0.4-0.36-0.81-0.61-1.22c-0.26-0.42-0.6-0.85-1.01-1.27
|
|
8
|
+
c-0.49-0.5-1.1-0.9-1.8-1.2c-0.71-0.3-1.49-0.46-2.3-0.46c-1.16,0-2.25,0.3-3.19,0.87V0.48h-5.98v4.77H42
|
|
9
|
+
c-0.54-0.18-1.12-0.27-1.72-0.27c-1.68,0-3.21,0.66-4.44,1.92c-0.09,0.09-0.18,0.19-0.26,0.29c-0.1-0.12-0.21-0.24-0.33-0.35
|
|
10
|
+
c-1.26-1.23-2.81-1.86-4.6-1.86c-1.77,0-3.36,0.64-4.6,1.86c-0.11,0.11-0.22,0.22-0.32,0.34c-0.1-0.12-0.21-0.23-0.32-0.34
|
|
11
|
+
c-1.26-1.23-2.81-1.86-4.6-1.86c-1.55,0-2.91,0.46-4.06,1.38h-2.47l2.46-2.46l-1.48-1.41C13.53,0.83,11.46,0,9.08,0
|
|
12
|
+
C6.62,0,4.47,0.88,2.7,2.62C0.91,4.38,0,6.51,0,8.98s0.91,4.61,2.7,6.36c1.78,1.74,3.93,2.62,6.39,2.62
|
|
13
|
+
c2.56,0,4.68-0.87,6.28-2.54c0.04-0.04,0.08-0.08,0.12-0.13c0.21,0.29,0.44,0.56,0.7,0.81c1.24,1.22,2.83,1.86,4.6,1.86
|
|
14
|
+
c1.8,0,3.34-0.62,4.6-1.86c0.11-0.11,0.22-0.22,0.32-0.34c0.1,0.12,0.21,0.23,0.32,0.34c1.24,1.22,2.83,1.86,4.6,1.86
|
|
15
|
+
c1.26,0,2.4-0.31,3.4-0.92l0.45,1.07c0.43,1.02,1.13,1.91,2.08,2.66c1.04,0.81,2.3,1.23,3.75,1.23c1.78,0,3.29-0.58,4.47-1.73
|
|
16
|
+
c0.71-0.69,1.21-1.55,1.5-2.58h3.64v-0.67c1,0.62,2.16,0.94,3.42,0.94c1.3,0,2.44-0.32,3.39-0.94c0.85-0.55,1.53-1.21,2.02-1.94
|
|
17
|
+
l1.11-1.66l-1.87-1.25L59.77,11.44z"/>
|
|
18
|
+
<path fill="#1E1E1E" d="M105,10.11l-0.74-1.84c-0.42-1.05-1.13-1.86-2.1-2.43c-0.89-0.51-1.89-0.77-2.98-0.77
|
|
19
|
+
c-1.31,0-2.48,0.35-3.48,1.05c-0.24,0.17-0.45,0.36-0.65,0.56c-1.11-1.05-2.46-1.61-3.95-1.61c-0.63,0-1.22,0.09-1.78,0.27h-4.63
|
|
20
|
+
v0.6c-0.93-0.58-2-0.87-3.21-0.87c-1.26,0-2.34,0.31-3.22,0.9V1.5h-4.73l-3.11,5.45l-3.1-5.45H62.6v16.19h5.57V15.1h0.65h3.24
|
|
21
|
+
h0.65v2.59h5.57v-0.37c0.77,0.42,1.65,0.64,2.62,0.64c0.64,0,1.23-0.09,1.78-0.27h2.03v3.68h5.57v-3.46
|
|
22
|
+
c0.27,0.04,0.56,0.06,0.84,0.06c1.5,0,2.87-0.57,3.98-1.64c0.2,0.2,0.42,0.39,0.65,0.56c0.96,0.72,2.14,1.08,3.51,1.08
|
|
23
|
+
c1.43,0,2.65-0.4,3.63-1.2c1.08-0.88,1.66-2.07,1.66-3.42c0-0.97-0.32-1.89-0.93-2.66L105,10.11z"/>
|
|
24
|
+
</g>
|
|
25
|
+
<g id="Inner_text">
|
|
26
|
+
<g>
|
|
27
|
+
<path fill="#FFFFFF" d="M9.08,8.35v1.9h4.58c-0.14,1.04-0.48,1.84-1.04,2.4c-0.94,0.93-2.11,1.4-3.53,1.4
|
|
28
|
+
c-1.4,0-2.58-0.49-3.55-1.48c-0.97-0.98-1.46-2.18-1.46-3.59c0-1.41,0.48-2.6,1.45-3.59C6.5,4.4,7.68,3.91,9.08,3.91
|
|
29
|
+
c1.33,0,2.47,0.45,3.44,1.36l1.35-1.35C12.53,2.64,10.93,2,9.08,2C7.15,2,5.49,2.68,4.09,4.05C2.7,5.42,2,7.06,2,8.98
|
|
30
|
+
c0,1.92,0.7,3.56,2.09,4.93c1.4,1.37,3.06,2.05,4.99,2.05c2,0,3.63-0.65,4.87-1.96c1.1-1.1,1.65-2.59,1.65-4.46
|
|
31
|
+
c0-0.45-0.03-0.85-0.1-1.19H9.08z"/>
|
|
32
|
+
<path fill="#FFFFFF" d="M42.72,7.97h-0.07c-0.24-0.29-0.57-0.53-0.98-0.72c-0.42-0.19-0.88-0.29-1.39-0.29
|
|
33
|
+
c-1.14,0-2.15,0.44-3.01,1.32c-0.86,0.88-1.29,1.94-1.29,3.19c0,1.24,0.43,2.3,1.29,3.17c0.86,0.87,1.86,1.31,3.01,1.31
|
|
34
|
+
c1.02,0,1.81-0.34,2.37-1.02h0.07v0.65c0,0.85-0.21,1.51-0.64,1.96c-0.42,0.45-1.01,0.68-1.76,0.68c-0.55,0-1.02-0.16-1.41-0.48
|
|
35
|
+
c-0.38-0.31-0.67-0.69-0.85-1.12l-1.72,0.72c0.29,0.71,0.78,1.33,1.46,1.86c0.68,0.53,1.52,0.8,2.52,0.8
|
|
36
|
+
c1.25,0,2.27-0.39,3.07-1.17c0.8-0.78,1.2-1.95,1.2-3.52V7.24h-1.87V7.97z M42.16,13.42c-0.46,0.51-1.03,0.77-1.71,0.77
|
|
37
|
+
c-0.69,0-1.28-0.26-1.77-0.78c-0.49-0.51-0.73-1.16-0.73-1.93c0-0.78,0.24-1.44,0.73-1.96c0.49-0.52,1.08-0.78,1.77-0.78
|
|
38
|
+
c0.68,0,1.25,0.26,1.71,0.79c0.46,0.52,0.69,1.18,0.69,1.96C42.85,12.26,42.62,12.9,42.16,13.42z"/>
|
|
39
|
+
<path fill="#FFFFFF" d="M20.8,6.97c-1.26,0-2.33,0.43-3.2,1.29s-1.31,1.93-1.31,3.21c0,1.28,0.44,2.35,1.31,3.21
|
|
40
|
+
s1.94,1.29,3.2,1.29s2.33-0.43,3.2-1.29c0.88-0.86,1.31-1.93,1.31-3.21c0-1.28-0.44-2.35-1.31-3.21S22.06,6.97,20.8,6.97z
|
|
41
|
+
M22.59,13.42c-0.5,0.51-1.1,0.77-1.79,0.77s-1.29-0.25-1.79-0.77c-0.5-0.52-0.75-1.17-0.75-1.95c0-0.8,0.25-1.45,0.74-1.96
|
|
42
|
+
c0.5-0.51,1.1-0.77,1.8-0.77S22.1,9,22.6,9.51c0.49,0.51,0.74,1.17,0.74,1.96C23.34,12.25,23.09,12.9,22.59,13.42z"/>
|
|
43
|
+
<rect x="45.95" y="2.48" fill="#FFFFFF" width="1.98" height="13.21"/>
|
|
44
|
+
<path fill="#FFFFFF" d="M53.34,14.2c-0.99,0-1.71-0.45-2.18-1.36l6.01-2.49l-0.2-0.51c-0.11-0.3-0.26-0.59-0.44-0.89
|
|
45
|
+
c-0.18-0.29-0.42-0.6-0.73-0.91c-0.31-0.32-0.69-0.57-1.16-0.77c-0.47-0.2-0.97-0.3-1.52-0.3c-1.19,0-2.19,0.42-3.01,1.26
|
|
46
|
+
c-0.82,0.84-1.23,1.92-1.23,3.24c0,1.27,0.43,2.34,1.28,3.2c0.85,0.86,1.91,1.29,3.18,1.29c0.91,0,1.68-0.2,2.29-0.6
|
|
47
|
+
c0.63-0.41,1.11-0.87,1.45-1.38l-1.53-1.02C54.99,13.79,54.25,14.2,53.34,14.2z M51.56,9.43c0.51-0.48,1.05-0.72,1.63-0.72
|
|
48
|
+
c0.39,0,0.73,0.08,1.04,0.26c0.31,0.18,0.52,0.41,0.63,0.69l-4.02,1.67C50.82,10.54,51.06,9.9,51.56,9.43z"/>
|
|
49
|
+
<path fill="#FFFFFF" d="M30.65,6.97c-1.26,0-2.33,0.43-3.2,1.29s-1.31,1.93-1.31,3.21c0,1.28,0.44,2.35,1.31,3.21
|
|
50
|
+
s1.94,1.29,3.2,1.29c1.26,0,2.33-0.43,3.2-1.29c0.87-0.86,1.31-1.93,1.31-3.21c0-1.28-0.44-2.35-1.31-3.21S31.91,6.97,30.65,6.97
|
|
51
|
+
z M32.44,13.42c-0.5,0.51-1.1,0.77-1.79,0.77s-1.29-0.25-1.79-0.77c-0.5-0.52-0.75-1.17-0.75-1.95c0-0.8,0.25-1.45,0.74-1.96
|
|
52
|
+
c0.5-0.51,1.1-0.77,1.8-0.77c0.71,0,1.31,0.26,1.8,0.77s0.74,1.17,0.74,1.96C33.19,12.25,32.94,12.9,32.44,13.42z"/>
|
|
53
|
+
</g>
|
|
54
|
+
<g>
|
|
55
|
+
<polygon fill="#FFFFFF" points="70.48,10.92 70.41,10.92 66.17,3.5 64.6,3.5 64.6,15.69 66.17,15.69 66.17,8.45 66.1,6.41
|
|
56
|
+
66.17,6.41 69.98,13.1 70.9,13.1 74.72,6.41 74.79,6.41 74.72,8.45 74.72,15.69 76.29,15.69 76.29,3.5 74.72,3.5 "/>
|
|
57
|
+
<path fill="#FFFFFF" d="M81.5,7.07c-0.93,0-1.68,0.21-2.25,0.64S78.3,8.6,78.11,9.1l1.44,0.61c0.14-0.38,0.39-0.67,0.76-0.89
|
|
58
|
+
c0.36-0.21,0.78-0.32,1.23-0.32c0.61,0,1.13,0.18,1.55,0.55c0.42,0.37,0.63,0.86,0.63,1.47v0.24c-0.59-0.34-1.34-0.51-2.26-0.51
|
|
59
|
+
c-1.04,0-1.91,0.25-2.61,0.77c-0.71,0.52-1.06,1.23-1.06,2.14c0,0.84,0.29,1.52,0.89,2.03c0.59,0.51,1.33,0.77,2.22,0.77
|
|
60
|
+
c1.21,0,2.12-0.47,2.75-1.43h0.07v1.16h1.5v-5.04c0-1.14-0.36-2.02-1.06-2.64C83.45,7.38,82.57,7.07,81.5,7.07z M82.92,13.81
|
|
61
|
+
c-0.53,0.48-1.11,0.72-1.76,0.72c-0.46,0-0.86-0.12-1.21-0.35c-0.35-0.24-0.53-0.56-0.53-0.97c0-0.44,0.19-0.83,0.58-1.16
|
|
62
|
+
s0.96-0.49,1.72-0.49c0.88,0,1.55,0.18,1.99,0.54C83.71,12.76,83.45,13.33,82.92,13.81z"/>
|
|
63
|
+
<path fill="#FFFFFF" d="M91.12,7.08c-0.63,0-1.2,0.14-1.71,0.41c-0.5,0.27-0.88,0.61-1.13,1.02h-0.07V7.35h-1.5v12.02h1.57v-3.68
|
|
64
|
+
l-0.07-1.16h0.07c0.25,0.41,0.62,0.75,1.13,1.02c0.5,0.27,1.07,0.41,1.71,0.41c1.08,0,2.01-0.42,2.79-1.26
|
|
65
|
+
c0.79-0.85,1.18-1.91,1.18-3.17c0-1.26-0.4-2.32-1.18-3.17C93.13,7.51,92.2,7.08,91.12,7.08z M92.73,13.7
|
|
66
|
+
c-0.52,0.55-1.14,0.83-1.87,0.83c-0.73,0-1.36-0.27-1.88-0.82c-0.51-0.55-0.77-1.28-0.77-2.2s0.25-1.66,0.77-2.2
|
|
67
|
+
c0.51-0.55,1.14-0.82,1.88-0.82c0.72,0,1.35,0.28,1.87,0.83c0.52,0.55,0.78,1.28,0.78,2.19C93.51,12.42,93.25,13.15,92.73,13.7z"
|
|
68
|
+
/>
|
|
69
|
+
<path fill="#FFFFFF" d="M101.96,11.84c-0.38-0.45-0.96-0.76-1.74-0.94l-1.65-0.39c-0.74-0.17-1.11-0.49-1.11-0.97
|
|
70
|
+
c0-0.33,0.16-0.59,0.48-0.78s0.71-0.29,1.18-0.29c0.97,0,1.6,0.37,1.91,1.11l1.36-0.56c-0.25-0.63-0.66-1.1-1.24-1.44
|
|
71
|
+
c-0.58-0.33-1.24-0.5-1.98-0.5c-0.89,0-1.67,0.23-2.32,0.69c-0.65,0.46-0.98,1.06-0.98,1.8c0,0.65,0.24,1.16,0.72,1.54
|
|
72
|
+
s0.99,0.63,1.52,0.77l1.69,0.41c0.76,0.2,1.14,0.57,1.14,1.11c0,0.35-0.16,0.63-0.47,0.85c-0.31,0.21-0.71,0.32-1.2,0.32
|
|
73
|
+
c-1.06,0-1.82-0.53-2.26-1.57l-1.4,0.58c0.29,0.68,0.73,1.25,1.34,1.7c0.61,0.45,1.38,0.68,2.31,0.68c0.96,0,1.75-0.25,2.34-0.75
|
|
74
|
+
c0.61-0.5,0.92-1.12,0.92-1.87C102.52,12.78,102.33,12.28,101.96,11.84z"/>
|
|
75
|
+
</g>
|
|
76
|
+
</g>
|
|
77
|
+
</g>
|
|
78
|
+
</svg>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 26.5.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
width="105px" height="22px" viewBox="0 0 105 22" enable-background="new 0 0 105 22" xml:space="preserve">
|
|
5
|
+
<g id="Logo">
|
|
6
|
+
<g id="Outline" opacity="0.8">
|
|
7
|
+
<path fill="#FFFFFF" d="M59.77,11.44l-0.93-2.32c-0.16-0.4-0.36-0.81-0.61-1.22c-0.26-0.42-0.6-0.85-1.01-1.27
|
|
8
|
+
c-0.49-0.5-1.1-0.9-1.8-1.2c-0.71-0.3-1.49-0.46-2.3-0.46c-1.16,0-2.25,0.3-3.19,0.87V0.48h-5.98v4.77H42
|
|
9
|
+
c-0.54-0.18-1.12-0.27-1.72-0.27c-1.68,0-3.21,0.66-4.44,1.92c-0.09,0.09-0.18,0.19-0.26,0.29c-0.1-0.12-0.21-0.24-0.33-0.35
|
|
10
|
+
c-1.26-1.23-2.81-1.86-4.6-1.86c-1.77,0-3.36,0.64-4.6,1.86c-0.11,0.11-0.22,0.22-0.32,0.34c-0.1-0.12-0.21-0.23-0.32-0.34
|
|
11
|
+
c-1.26-1.23-2.81-1.86-4.6-1.86c-1.55,0-2.91,0.46-4.06,1.38h-2.47l2.46-2.46l-1.48-1.41C13.53,0.83,11.46,0,9.08,0
|
|
12
|
+
C6.62,0,4.47,0.88,2.7,2.62C0.91,4.38,0,6.51,0,8.98s0.91,4.61,2.7,6.36c1.78,1.74,3.93,2.62,6.39,2.62
|
|
13
|
+
c2.56,0,4.68-0.87,6.28-2.54c0.04-0.04,0.08-0.08,0.12-0.13c0.21,0.29,0.44,0.56,0.7,0.81c1.24,1.22,2.83,1.86,4.6,1.86
|
|
14
|
+
c1.8,0,3.34-0.62,4.6-1.86c0.11-0.11,0.22-0.22,0.32-0.34c0.1,0.12,0.21,0.23,0.32,0.34c1.24,1.22,2.83,1.86,4.6,1.86
|
|
15
|
+
c1.26,0,2.4-0.31,3.4-0.92l0.45,1.07c0.43,1.02,1.13,1.91,2.08,2.66c1.04,0.81,2.3,1.23,3.75,1.23c1.78,0,3.29-0.58,4.47-1.73
|
|
16
|
+
c0.71-0.69,1.21-1.55,1.5-2.58h3.64v-0.67c1,0.62,2.16,0.94,3.42,0.94c1.3,0,2.44-0.32,3.39-0.94c0.85-0.55,1.53-1.21,2.02-1.94
|
|
17
|
+
l1.11-1.66l-1.87-1.25L59.77,11.44z"/>
|
|
18
|
+
<path fill="#FFFFFF" d="M105,10.11l-0.74-1.84c-0.42-1.05-1.13-1.86-2.1-2.43c-0.89-0.51-1.89-0.77-2.98-0.77
|
|
19
|
+
c-1.31,0-2.48,0.35-3.48,1.05c-0.24,0.17-0.45,0.36-0.65,0.56c-1.11-1.05-2.46-1.61-3.95-1.61c-0.63,0-1.22,0.09-1.78,0.27h-4.63
|
|
20
|
+
v0.6c-0.93-0.58-2-0.87-3.21-0.87c-1.26,0-2.34,0.31-3.22,0.9V1.5h-4.73l-3.11,5.45l-3.1-5.45H62.6v16.19h5.57V15.1h0.65h3.24
|
|
21
|
+
h0.65v2.59h5.57v-0.37c0.77,0.42,1.65,0.64,2.62,0.64c0.64,0,1.23-0.09,1.78-0.27h2.03v3.68h5.57v-3.46
|
|
22
|
+
c0.27,0.04,0.56,0.06,0.84,0.06c1.5,0,2.87-0.57,3.98-1.64c0.2,0.2,0.42,0.39,0.65,0.56c0.96,0.72,2.14,1.08,3.51,1.08
|
|
23
|
+
c1.43,0,2.65-0.4,3.63-1.2c1.08-0.88,1.66-2.07,1.66-3.42c0-0.97-0.32-1.89-0.93-2.66L105,10.11z"/>
|
|
24
|
+
</g>
|
|
25
|
+
<g id="Inner_text">
|
|
26
|
+
<g>
|
|
27
|
+
<path fill="#474747" d="M9.08,8.35v1.9h4.58c-0.14,1.04-0.48,1.84-1.04,2.4c-0.94,0.93-2.11,1.4-3.53,1.4
|
|
28
|
+
c-1.4,0-2.58-0.49-3.55-1.48c-0.97-0.98-1.46-2.18-1.46-3.59c0-1.41,0.48-2.6,1.45-3.59C6.5,4.4,7.68,3.91,9.08,3.91
|
|
29
|
+
c1.33,0,2.47,0.45,3.44,1.36l1.35-1.35C12.53,2.64,10.93,2,9.08,2C7.15,2,5.49,2.68,4.09,4.05C2.7,5.42,2,7.06,2,8.98
|
|
30
|
+
c0,1.92,0.7,3.56,2.09,4.93c1.4,1.37,3.06,2.05,4.99,2.05c2,0,3.63-0.65,4.87-1.96c1.1-1.1,1.65-2.59,1.65-4.46
|
|
31
|
+
c0-0.45-0.03-0.85-0.1-1.19H9.08z"/>
|
|
32
|
+
<path fill="#474747" d="M42.72,7.97h-0.07c-0.24-0.29-0.57-0.53-0.98-0.72c-0.42-0.19-0.88-0.29-1.39-0.29
|
|
33
|
+
c-1.14,0-2.15,0.44-3.01,1.32c-0.86,0.88-1.29,1.94-1.29,3.19c0,1.24,0.43,2.3,1.29,3.17c0.86,0.87,1.86,1.31,3.01,1.31
|
|
34
|
+
c1.02,0,1.81-0.34,2.37-1.02h0.07v0.65c0,0.85-0.21,1.51-0.64,1.96c-0.42,0.45-1.01,0.68-1.76,0.68c-0.55,0-1.02-0.16-1.41-0.48
|
|
35
|
+
c-0.38-0.31-0.67-0.69-0.85-1.12l-1.72,0.72c0.29,0.71,0.78,1.33,1.46,1.86c0.68,0.53,1.52,0.8,2.52,0.8
|
|
36
|
+
c1.25,0,2.27-0.39,3.07-1.17c0.8-0.78,1.2-1.95,1.2-3.52V7.24h-1.87V7.97z M42.16,13.42c-0.46,0.51-1.03,0.77-1.71,0.77
|
|
37
|
+
c-0.69,0-1.28-0.26-1.77-0.78c-0.49-0.51-0.73-1.16-0.73-1.93c0-0.78,0.24-1.44,0.73-1.96c0.49-0.52,1.08-0.78,1.77-0.78
|
|
38
|
+
c0.68,0,1.25,0.26,1.71,0.79c0.46,0.52,0.69,1.18,0.69,1.96C42.85,12.26,42.62,12.9,42.16,13.42z"/>
|
|
39
|
+
<path fill="#474747" d="M20.8,6.97c-1.26,0-2.33,0.43-3.2,1.29s-1.31,1.93-1.31,3.21c0,1.28,0.44,2.35,1.31,3.21
|
|
40
|
+
s1.94,1.29,3.2,1.29s2.33-0.43,3.2-1.29c0.88-0.86,1.31-1.93,1.31-3.21c0-1.28-0.44-2.35-1.31-3.21S22.06,6.97,20.8,6.97z
|
|
41
|
+
M22.59,13.42c-0.5,0.51-1.1,0.77-1.79,0.77s-1.29-0.25-1.79-0.77c-0.5-0.52-0.75-1.17-0.75-1.95c0-0.8,0.25-1.45,0.74-1.96
|
|
42
|
+
c0.5-0.51,1.1-0.77,1.8-0.77S22.1,9,22.6,9.51c0.49,0.51,0.74,1.17,0.74,1.96C23.34,12.25,23.09,12.9,22.59,13.42z"/>
|
|
43
|
+
<rect x="45.95" y="2.48" fill="#474747" width="1.98" height="13.21"/>
|
|
44
|
+
<path fill="#474747" d="M53.34,14.2c-0.99,0-1.71-0.45-2.18-1.36l6.01-2.49l-0.2-0.51c-0.11-0.3-0.26-0.59-0.44-0.89
|
|
45
|
+
c-0.18-0.29-0.42-0.6-0.73-0.91c-0.31-0.32-0.69-0.57-1.16-0.77c-0.47-0.2-0.97-0.3-1.52-0.3c-1.19,0-2.19,0.42-3.01,1.26
|
|
46
|
+
c-0.82,0.84-1.23,1.92-1.23,3.24c0,1.27,0.43,2.34,1.28,3.2c0.85,0.86,1.91,1.29,3.18,1.29c0.91,0,1.68-0.2,2.29-0.6
|
|
47
|
+
c0.63-0.41,1.11-0.87,1.45-1.38l-1.53-1.02C54.99,13.79,54.25,14.2,53.34,14.2z M51.56,9.43c0.51-0.48,1.05-0.72,1.63-0.72
|
|
48
|
+
c0.39,0,0.73,0.08,1.04,0.26c0.31,0.18,0.52,0.41,0.63,0.69l-4.02,1.67C50.82,10.54,51.06,9.9,51.56,9.43z"/>
|
|
49
|
+
<path fill="#474747" d="M30.65,6.97c-1.26,0-2.33,0.43-3.2,1.29s-1.31,1.93-1.31,3.21c0,1.28,0.44,2.35,1.31,3.21
|
|
50
|
+
s1.94,1.29,3.2,1.29c1.26,0,2.33-0.43,3.2-1.29c0.87-0.86,1.31-1.93,1.31-3.21c0-1.28-0.44-2.35-1.31-3.21S31.91,6.97,30.65,6.97
|
|
51
|
+
z M32.44,13.42c-0.5,0.51-1.1,0.77-1.79,0.77s-1.29-0.25-1.79-0.77c-0.5-0.52-0.75-1.17-0.75-1.95c0-0.8,0.25-1.45,0.74-1.96
|
|
52
|
+
c0.5-0.51,1.1-0.77,1.8-0.77c0.71,0,1.31,0.26,1.8,0.77s0.74,1.17,0.74,1.96C33.19,12.25,32.94,12.9,32.44,13.42z"/>
|
|
53
|
+
</g>
|
|
54
|
+
<g>
|
|
55
|
+
<polygon fill="#474747" points="70.48,10.92 70.41,10.92 66.17,3.5 64.6,3.5 64.6,15.69 66.17,15.69 66.17,8.45 66.1,6.41
|
|
56
|
+
66.17,6.41 69.98,13.1 70.9,13.1 74.72,6.41 74.79,6.41 74.72,8.45 74.72,15.69 76.29,15.69 76.29,3.5 74.72,3.5 "/>
|
|
57
|
+
<path fill="#474747" d="M81.5,7.07c-0.93,0-1.68,0.21-2.25,0.64S78.3,8.6,78.11,9.1l1.44,0.61c0.14-0.38,0.39-0.67,0.76-0.89
|
|
58
|
+
c0.36-0.21,0.78-0.32,1.23-0.32c0.61,0,1.13,0.18,1.55,0.55c0.42,0.37,0.63,0.86,0.63,1.47v0.24c-0.59-0.34-1.34-0.51-2.26-0.51
|
|
59
|
+
c-1.04,0-1.91,0.25-2.61,0.77c-0.71,0.52-1.06,1.23-1.06,2.14c0,0.84,0.29,1.52,0.89,2.03c0.59,0.51,1.33,0.77,2.22,0.77
|
|
60
|
+
c1.21,0,2.12-0.47,2.75-1.43h0.07v1.16h1.5v-5.04c0-1.14-0.36-2.02-1.06-2.64C83.45,7.38,82.57,7.07,81.5,7.07z M82.92,13.81
|
|
61
|
+
c-0.53,0.48-1.11,0.72-1.76,0.72c-0.46,0-0.86-0.12-1.21-0.35c-0.35-0.24-0.53-0.56-0.53-0.97c0-0.44,0.19-0.83,0.58-1.16
|
|
62
|
+
s0.96-0.49,1.72-0.49c0.88,0,1.55,0.18,1.99,0.54C83.71,12.76,83.45,13.33,82.92,13.81z"/>
|
|
63
|
+
<path fill="#474747" d="M91.12,7.08c-0.63,0-1.2,0.14-1.71,0.41c-0.5,0.27-0.88,0.61-1.13,1.02h-0.07V7.35h-1.5v12.02h1.57v-3.68
|
|
64
|
+
l-0.07-1.16h0.07c0.25,0.41,0.62,0.75,1.13,1.02c0.5,0.27,1.07,0.41,1.71,0.41c1.08,0,2.01-0.42,2.79-1.26
|
|
65
|
+
c0.79-0.85,1.18-1.91,1.18-3.17c0-1.26-0.4-2.32-1.18-3.17C93.13,7.51,92.2,7.08,91.12,7.08z M92.73,13.7
|
|
66
|
+
c-0.52,0.55-1.14,0.83-1.87,0.83c-0.73,0-1.36-0.27-1.88-0.82c-0.51-0.55-0.77-1.28-0.77-2.2s0.25-1.66,0.77-2.2
|
|
67
|
+
c0.51-0.55,1.14-0.82,1.88-0.82c0.72,0,1.35,0.28,1.87,0.83c0.52,0.55,0.78,1.28,0.78,2.19C93.51,12.42,93.25,13.15,92.73,13.7z"
|
|
68
|
+
/>
|
|
69
|
+
<path fill="#474747" d="M101.96,11.84c-0.38-0.45-0.96-0.76-1.74-0.94l-1.65-0.39c-0.74-0.17-1.11-0.49-1.11-0.97
|
|
70
|
+
c0-0.33,0.16-0.59,0.48-0.78s0.71-0.29,1.18-0.29c0.97,0,1.6,0.37,1.91,1.11l1.36-0.56c-0.25-0.63-0.66-1.1-1.24-1.44
|
|
71
|
+
c-0.58-0.33-1.24-0.5-1.98-0.5c-0.89,0-1.67,0.23-2.32,0.69c-0.65,0.46-0.98,1.06-0.98,1.8c0,0.65,0.24,1.16,0.72,1.54
|
|
72
|
+
s0.99,0.63,1.52,0.77l1.69,0.41c0.76,0.2,1.14,0.57,1.14,1.11c0,0.35-0.16,0.63-0.47,0.85c-0.31,0.21-0.71,0.32-1.2,0.32
|
|
73
|
+
c-1.06,0-1.82-0.53-2.26-1.57l-1.4,0.58c0.29,0.68,0.73,1.25,1.34,1.7c0.61,0.45,1.38,0.68,2.31,0.68c0.96,0,1.75-0.25,2.34-0.75
|
|
74
|
+
c0.61-0.5,0.92-1.12,0.92-1.87C102.52,12.78,102.33,12.28,101.96,11.84z"/>
|
|
75
|
+
</g>
|
|
76
|
+
</g>
|
|
77
|
+
</g>
|
|
78
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/core-frontend",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.8",
|
|
4
4
|
"description": "iTwin.js frontend components",
|
|
5
5
|
"main": "lib/cjs/core-frontend.js",
|
|
6
6
|
"module": "lib/esm/core-frontend.js",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"url": "http://www.bentley.com"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@itwin/appui-abstract": "5.1.
|
|
27
|
-
"@itwin/core-
|
|
28
|
-
"@itwin/core-
|
|
29
|
-
"@itwin/core-
|
|
30
|
-
"@itwin/
|
|
31
|
-
"@itwin/core-
|
|
32
|
-
"@itwin/
|
|
33
|
-
"@itwin/ecschema-rpcinterface-common": "5.1.
|
|
26
|
+
"@itwin/appui-abstract": "5.1.8",
|
|
27
|
+
"@itwin/core-common": "5.1.8",
|
|
28
|
+
"@itwin/core-geometry": "5.1.8",
|
|
29
|
+
"@itwin/core-bentley": "5.1.8",
|
|
30
|
+
"@itwin/core-orbitgt": "5.1.8",
|
|
31
|
+
"@itwin/core-quantity": "5.1.8",
|
|
32
|
+
"@itwin/ecschema-metadata": "5.1.8",
|
|
33
|
+
"@itwin/ecschema-rpcinterface-common": "5.1.8"
|
|
34
34
|
},
|
|
35
35
|
"//devDependencies": [
|
|
36
36
|
"NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install",
|
|
@@ -55,15 +55,15 @@
|
|
|
55
55
|
"vite-multiple-assets": "^1.3.1",
|
|
56
56
|
"vite-plugin-static-copy": "2.2.0",
|
|
57
57
|
"webpack": "^5.97.1",
|
|
58
|
-
"@itwin/appui-abstract": "5.1.
|
|
59
|
-
"@itwin/
|
|
60
|
-
"@itwin/core-
|
|
61
|
-
"@itwin/
|
|
62
|
-
"@itwin/core-geometry": "5.1.
|
|
63
|
-
"@itwin/core-quantity": "5.1.
|
|
64
|
-
"@itwin/core-orbitgt": "5.1.
|
|
65
|
-
"@itwin/ecschema-rpcinterface-common": "5.1.
|
|
66
|
-
"@itwin/ecschema-metadata": "5.1.
|
|
58
|
+
"@itwin/appui-abstract": "5.1.8",
|
|
59
|
+
"@itwin/core-bentley": "5.1.8",
|
|
60
|
+
"@itwin/core-common": "5.1.8",
|
|
61
|
+
"@itwin/build-tools": "5.1.8",
|
|
62
|
+
"@itwin/core-geometry": "5.1.8",
|
|
63
|
+
"@itwin/core-quantity": "5.1.8",
|
|
64
|
+
"@itwin/core-orbitgt": "5.1.8",
|
|
65
|
+
"@itwin/ecschema-rpcinterface-common": "5.1.8",
|
|
66
|
+
"@itwin/ecschema-metadata": "5.1.8"
|
|
67
67
|
},
|
|
68
68
|
"//dependencies": [
|
|
69
69
|
"NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"@loaders.gl/draco": "^3.1.6",
|
|
77
77
|
"fuse.js": "^3.3.0",
|
|
78
78
|
"wms-capabilities": "0.4.0",
|
|
79
|
-
"@itwin/core-i18n": "5.1.
|
|
80
|
-
"@itwin/webgl-compatibility": "5.1.
|
|
79
|
+
"@itwin/core-i18n": "5.1.8",
|
|
80
|
+
"@itwin/webgl-compatibility": "5.1.8"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
83
|
"build": "npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|