Skip to main content

WMSFeatureInfoLoader

ogc-logo

From-v3.3

 

BETA

The WMSFeatureInfoLoader parses the XML-formatted response from the the OGC WMS (Web Map Service) standard GetFeatureInfo request into a typed JavaScript data structure.

Note that the WMS standard is rather verbose and the XML responses can contain many rarely used metadata fields, not all of which are extracted by this loader. If this is a problem, it is possible to use the XMLLoader directly though the result will be untyped and not normalized.

LoaderCharacteristic
File Extension.xml
File TypeText
File FormatWMS
Data FormatData structure
Decoder TypeSynchronous
Worker Thread SupportNo
Streaming SupportNo

Usage

import {WMSFeatureInfoLoader} from '@loaders.gl/wms';
import {load} from '@loaders.gl/core';

// Form a WMS request
const url = `${WMS_SERVICE_URL}?REQUEST=GetFeatureInfo&LAYER=...`;

const data = (await load(url, WMSFeatureInfoLoader, options)) as WMSFeatureInfo;

Parsed Data Format

/** All capabilities of a WMS service. Typed data structure extracted from XML */
export type WMSFeatureInfo = {
// TO BE DOCUMENTED
};

Options

OptionTypeDefaultDescription