UNPKG

@itwin/core-frontend

Version:
77 lines 3.88 kB
/** @packageDocumentation * @module Tiles */ import { GuidString } from "@itwin/core-bentley"; import { RealityData, RealityDataSourceKey, RealityDataSourceProps } from "@itwin/core-common"; import { PublisherProductInfo, RealityDataSource, SpatialLocationAndExtents } from "./RealityDataSource"; /** This class provides access to the reality data provider services. * It encapsulates access to a reality data weiter it be from local access, http or ProjectWise Context Share. * The key provided at the creation determines if this is ProjectWise Context Share reference. * If not then it is considered local (ex: C:\temp\TileRoot.json) or plain http access (http://someserver.com/data/TileRoot.json) * There is a one to one relationship between a reality data and the instances of present class. * @internal */ export declare class RealityDataSourceTilesetUrlImpl implements RealityDataSource { readonly key: RealityDataSourceKey; /** The URL that supplies the 3d tiles for displaying the reality model. */ private _tilesetUrl; /** For use by all Reality Data. For RD stored on PW Context Share, represents the portion from the root of the Azure Blob Container*/ private _baseUrl; /** Need to be passed down to child tile requests when requesting from blob storage, e.g. a Cesium export from the Mesh Export Service*/ private _searchParams; /** Construct a new reality data source. * @param props JSON representation of the reality data source */ protected constructor(props: RealityDataSourceProps); /** * Create an instance of this class from a source key and iTwin context/ */ static createFromKey(sourceKey: RealityDataSourceKey, _iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined>; get isContextShare(): boolean; /** * Returns Reality Data if available */ get realityData(): RealityData | undefined; get realityDataId(): string | undefined; /** * Returns Reality Data type if available */ get realityDataType(): string | undefined; getTilesetUrl(): string | undefined; private setBaseUrl; /** * This method returns the URL to access the actual 3d tiles from the service provider. * @returns string containing the URL to reality data. */ getServiceUrl(_iTwinId: GuidString | undefined): Promise<string | undefined>; getRootDocument(iTwinId: GuidString | undefined): Promise<any>; private isValidURL; /** Returns the tile URL. * If the tile path is a relative URL, the base URL is prepended to it. * For both absolute and relative tile path URLs, the search parameters are checked. If the search params are empty, the base URL's search params are appended to the tile path. */ private getTileUrl; /** * Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type. */ getTileContent(name: string): Promise<ArrayBuffer>; /** * Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type. */ getTileJson(name: string): Promise<any>; getTileContentType(url: string): "tile" | "tileset"; /** * Gets spatial location and extents of this reality data source * @returns spatial location and extents * @internal */ getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined>; /** * Gets information to identify the product and engine that create this reality data * Will return undefined if cannot be resolved * @returns information to identify the product and engine that create this reality data * @alpha */ getPublisherProductInfo(): Promise<PublisherProductInfo | undefined>; } //# sourceMappingURL=RealityDataSourceTilesetUrlImpl.d.ts.map