import { MimeType } from '../shared/models.js'; import { WmtsLayerDimensionValue, WmtsLayerResourceLink, WmtsEndpointInfo, WmtsLayer, WmtsMatrixSet } from './model.js'; import type WMTSTileGrid from 'ol/tilegrid/WMTS'; /** * Represents a WMTS endpoint advertising several layers. */ export default class WmtsEndpoint { private _capabilitiesPromise; private _info; private _layers; private _matrixSets; /** * Creates a new WMTS endpoint; wait for the `isReady()` promise before using the endpoint methods. * @param url WMTS endpoint url; can contain any query parameters, these will be used to * initialize the endpoint */ constructor(url: string); /** * Resolves when the endpoint is ready to use. Returns the same endpoint object for convenience. * @throws {EndpointError} */ isReady(): Promise; /** * A Promise which resolves to the endpoint information. */ getServiceInfo(): WmtsEndpointInfo; /** * Returns the layers advertised in the endpoint. */ getLayers(): WmtsLayer[]; /** * Returns the matrix sets available for that endpoint. Each matrix set contains a list of tile matrices as well as a supported CRS. */ getMatrixSets(): WmtsMatrixSet[]; /** * Returns a matrix set by identifier * @param identifier Matrix set identifier * @return return null if matrix set was not found */ getMatrixSetByIdentifier(identifier: string): WmtsMatrixSet; /** * Returns a complete layer based on its name * Note: the first matching layer will be returned * @param name Layer name property * @return return null if layer was not found */ getLayerByName(name: string): WmtsLayer; /** * If only one single layer is available, return its name; otherwise, returns null; */ getSingleLayerName(): string | null; /** * Returns a layer resource link. If no type hint is specified, the first resource will be returned. * A resource link contains a URL as well as an image format and a request encoding (KVP or REST). * @param layerName * @param formatHint */ getLayerResourceLink(layerName: string, formatHint?: MimeType): WmtsLayerResourceLink; /** * Generates a URL for a specific tile of a specific layer */ getTileUrl(layerName: string, styleName: string, matrixSetName: string, tileMatrix: string, tileRow: number, tileCol: number, outputFormat?: MimeType): string; /** * Return an object with all defined dimensions for the layer, as well as their default values. * @param layerName */ getDefaultDimensions(layerName: string): Record; private tileGridModule; /** * Creates a WMTSTileGrid instance from the 'ol' package, for a given layer. Optionally, a matrix set * can be provided; * @param layerName * @param matrixSetIdentifier */ getOpenLayersTileGrid(layerName: string, matrixSetIdentifier?: string): Promise; } //# sourceMappingURL=endpoint.d.ts.map