import { BoundingBox, CrsCode, GenericEndpointInfo, MimeType } from '../shared/models.js'; import { WmsLayerFull, WmsLayerSummary, WmsVersion } from './model.js'; /** * Represents a WMS endpoint advertising several layers arranged in a tree structure. */ export default class WmsEndpoint { private _capabilitiesUrl; private _capabilitiesPromise; private _info; private _layers; private _version; /** * @param url WMS 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; /** * Returns the service information. */ getServiceInfo(): GenericEndpointInfo; /** * Returns an array of layers in summary format; layers are organized in a tree * structure with each having an optional `children` property */ getLayers(): WmsLayerSummary[]; /** * Returns the full layer information, including supported coordinate systems, available layers, bounding boxes etc. * Layer name is case-sensitive. * @param name Layer name property (unique in the WMS service) * @return return null if layer was not found */ getLayerByName(name: string): WmsLayerFull; /** * If only one single renderable layer is available, return its name; otherwise, returns null; */ getSingleLayerName(): string | null; /** * Returns the highest protocol version that this WMS endpoint supports. * Note that if the url used for initialization does specify a version (e.g. 1.1.0), * this version will most likely be used instead of the highest supported one. */ getVersion(): WmsVersion; /** * Returns a URL that can be used to query an image from one or several layers * @param layers List of layers to render * @param {Object} options * @param {number} options.widthPx * @param {number} options.heightPx * @param {CrsCode} options.crs Coordinate reference system to use for the image * @param {BoundingBox} options.extent Expressed in the requested CRS * @param {MimeType} options.outputFormat * @param {string} [options.styles] List of styles to use, one for each layer requested; leave out or use empty string for default style * @returns Returns null if endpoint is not ready */ getMapUrl(layers: string[], options: { widthPx: number; heightPx: number; crs: CrsCode; extent: BoundingBox; outputFormat: MimeType; styles?: string[]; }): string; } //# sourceMappingURL=endpoint.d.ts.map