import type { Options as WMSSourceOptions } from "ol/source/ImageWMS"; import ImageWMS from "ol/source/ImageWMS"; import { MapModel } from "../model/MapModel"; import { InternalConstructorTag } from "../utils/InternalConstructorTag"; import { AbstractLayer } from "./AbstractLayer"; import { ATTACH_TO_MAP, DETACH_FROM_MAP, LayerDependencies } from "./shared/internals"; import { LayerConfig } from "./shared/LayerConfig"; import { SublayersCollection } from "./shared/SublayersCollection"; import { WMSSublayer, WMSSublayerConfig } from "./wms/WMSSublayer"; /** * Configuration options to construct a {@link WMSLayer}. * * @group Layers */ export interface WMSLayerConfig extends LayerConfig { /** URL of the WMS service. */ url: string; /** Configures the layer's sublayers. */ sublayers?: WMSSublayerConfig[]; /** * Additional source options for the layer's WMS source. * * NOTE: These options are intended for advanced configuration: * the WMS Layer manages some of the OpenLayers source options itself. */ sourceOptions?: Partial; /** * Whether to automatically fetch capabilities from the service when needed (default: `true`). * * Setting this to `false` can be useful as a performance optimization when capabilities are not really required by the application. * Note that this will disable some features of the WMS layer: for example, the legend URL will not be available. */ fetchCapabilities?: boolean; } /** * Displays an OGC Web Map Service (WMS). * * @group Layers */ export declare class WMSLayer extends AbstractLayer { #private; /** * @deprecated Prefer using {@link LayerFactory.create} instead of calling the constructor directly */ constructor(config: WMSLayerConfig); /** * NOTE: Do not use this overload. Use {@link LayerFactory.create} instead. * * @internal */ constructor(config: WMSLayerConfig, deps: LayerDependencies, internalTag: InternalConstructorTag); destroy(): void; get type(): "wms"; get legend(): undefined; /** * Returns the current source associated with this layer as a reactive property. * * Note that the return type may be expanded in the future with additional source types. */ get olSource(): ImageWMS | undefined; /** The URL of the WMS service that was used during layer construction. */ get url(): string; get layers(): undefined; /** * Holds the sublayers of this layer. */ get sublayers(): SublayersCollection; /** * @internal * * Note: this property was never documented and has been exposed by accident. **/ get capabilities(): Record | undefined; /** @internal */ [ATTACH_TO_MAP](map: MapModel): void; /** @internal */ [DETACH_FROM_MAP](): void; }