import { FetchOptions, HRN, TileKey, OlpClientSettings } from "@here/olp-sdk-core"; import { Index as QuadTreeIndex } from "@here/olp-sdk-dataservice-api/lib/query-api"; import { QuadTreeIndexDepth, TileRequest, TileRequestParams } from "@here/olp-sdk-dataservice-read"; /** * Parameters used to get a tile. */ export interface GetTileParams { catalogHrn: HRN; settings: OlpClientSettings; layerId: string; layerType: "versioned" | "volatile"; } /** * Fetches asynchronously data from a tile or from its nearest ancestor if not found. * * The tile is a geometric area represented as a HERE tile. * The quad tree metadata fetches the blob of needed tile from the HERE Query Service, * then caches it, and returns to the user. * To disable caching of metadata use `request.withFetchOption(FetchOptions.OnlineOnly)`. * * @param request Requests the [[TileRequest]] instance with the configured parameters. * @see [[TileRequest]] * * @param abortSignal The signal object that allows you to communicate with a request (such as the `fetch` request) * and, if required, abort it using the `AbortController` object. * @see the [`AbortController` documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * * @example * * ``` * const params: GetTileParams = { * settings: "% your `OlpClientSettings` instance % ", * catalogHrn: "% the HRN instance of your catalog %", * layerId: "% your layer ID %", * layerType: "% versioned or volatile %", * } * * const request = new TileRequest(); * * const tile1 = await getTile(request.withTileKey(yourTileKey1), params); * const tile2 = await getTile(request.withTileKey(yourTileKey2), params); * * ``` * * @returns The blob of the requested tile or the blob of the closest parent Tile. */ export declare function getTile(request: TileRequest, params: TileRequestParams, abortSignal?: AbortSignal): Promise; /** * The function should request quad tree index for the parent tile with delta 4 * and cache the responses in cache for later calls. * @hidden */ export declare function fetchQuadTreeIndex(params: GetTileParams & { tileKey: TileKey; depth: QuadTreeIndexDepth; fetchOptions: FetchOptions; catalogVersion?: number; billingTag?: string; abortSignal?: AbortSignal; }): Promise;