import { Coordinate } from '../coordinate'; import { EventsKey } from '../events'; import BaseEvent from '../events/Event'; import { Extent } from '../extent'; import ImageWrapper, { LoadFunction } from '../Image'; import { ObjectEvent } from '../Object'; import { ProjectionLike } from '../proj'; import Projection from '../proj/Projection'; import ImageSource, { ImageSourceEvent } from './Image'; import { AttributionLike } from './Source'; import WMSServerType from './WMSServerType'; export interface Options { attributions?: AttributionLike | undefined; crossOrigin?: null | string | undefined; hidpi?: boolean | undefined; serverType?: WMSServerType | string | undefined; imageLoadFunction?: LoadFunction | undefined; imageSmoothing?: boolean | undefined; params: { [key: string]: any }; projection?: ProjectionLike | undefined; ratio?: number | undefined; resolutions?: number[] | undefined; url: string; } export default class ImageWMS extends ImageSource { constructor(opt_options?: Options); /** * Return the GetFeatureInfo URL for the passed coordinate, resolution, and * projection. Return undefined if the GetFeatureInfo URL cannot be * constructed. */ getFeatureInfoUrl( coordinate: Coordinate, resolution: number, projection: ProjectionLike, params: any, ): string | undefined; getImageInternal(extent: Extent, resolution: number, pixelRatio: number, projection: Projection): ImageWrapper; /** * Return the image load function of the source. */ getImageLoadFunction(): LoadFunction; /** * Return the GetLegendGraphic URL, optionally optimized for the passed * resolution and possibly including any passed specific parameters. Returns * undefined if the GetLegendGraphic URL cannot be constructed. */ getLegendUrl(resolution?: number, params?: any): string | undefined; /** * Get the user-provided params, i.e. those passed to the constructor through * the "params" option, and possibly updated using the updateParams method. */ getParams(): any; /** * Return the URL used for this WMS source. */ getUrl(): string | undefined; /** * Set the image load function of the source. */ setImageLoadFunction(imageLoadFunction: LoadFunction): void; /** * Set the URL to use for requests. */ setUrl(url: string | undefined): void; /** * Update the user-provided params. */ updateParams(params: any): void; on(type: string | string[], listener: (p0: any) => any): EventsKey | EventsKey[]; once(type: string | string[], listener: (p0: any) => any): EventsKey | EventsKey[]; un(type: string | string[], listener: (p0: any) => any): void; on(type: 'change', listener: (evt: BaseEvent) => void): EventsKey; once(type: 'change', listener: (evt: BaseEvent) => void): EventsKey; un(type: 'change', listener: (evt: BaseEvent) => void): void; on(type: 'error', listener: (evt: BaseEvent) => void): EventsKey; once(type: 'error', listener: (evt: BaseEvent) => void): EventsKey; un(type: 'error', listener: (evt: BaseEvent) => void): void; on(type: 'imageloadend', listener: (evt: ImageSourceEvent) => void): EventsKey; once(type: 'imageloadend', listener: (evt: ImageSourceEvent) => void): EventsKey; un(type: 'imageloadend', listener: (evt: ImageSourceEvent) => void): void; on(type: 'imageloaderror', listener: (evt: ImageSourceEvent) => void): EventsKey; once(type: 'imageloaderror', listener: (evt: ImageSourceEvent) => void): EventsKey; un(type: 'imageloaderror', listener: (evt: ImageSourceEvent) => void): void; on(type: 'imageloadstart', listener: (evt: ImageSourceEvent) => void): EventsKey; once(type: 'imageloadstart', listener: (evt: ImageSourceEvent) => void): EventsKey; un(type: 'imageloadstart', listener: (evt: ImageSourceEvent) => void): void; on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey; once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey; un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void; }