@terrestris/ol-util

    Helper class to parse capabilities of WMS layers

    CapabilitiesUtil

    Index

    Constructors

    Methods

    • Returns the layers from a parsed WMS GetCapabilities object.

      Parameters

      • capabilities: any

        A capabilities object.

      • nameField: string = 'Name'

        Configure the field which should be set as the 'name' property in the openlayers layer.

      • OptionalproxyFn: (proxyUrl: string) => string

        Optional proxy function which can be applied to GetMap, GetFeatureInfo and GetLegendGraphic requests to avoid CORS issues.

      Returns ImageLayer<ImageWMS>[]

      Array of OlLayerImage

    • Fetches and parses the WMS Capabilities document for the given URL.

      Parameters

      • capabilitiesUrl: string

        Url to WMS capabilities document.

      • fetchOpts: RequestInit = {}

        Optional fetch options to make use of while requesting the Capabilities.

      Returns Promise<any>

      An object representing the WMS capabilities.

    • Fetches and parses the WMS Capabilities document for the given layer.

      Parameters

      • layer: WmsLayer

        The layer to the get the Capabilites for.

      • fetchOpts: RequestInit = {}

        Optional fetch options to make use of while requesting the Capabilities.

      Returns Promise<any>

      An object representing the WMS capabilities.

    MMNEPVFCICPMFPCPTTAAATR