An object literal which contains the settings for WFSFeatureStore to be created with WFSFeatureStore.createFromCapabilities or WFSFeatureStore.createFromURL.

Since

2022.0

interface WFSFeatureStoreCreateOptions {
    codec?: Codec<Feature<null | Shape, FeatureProperties>>;
    credentials?: boolean;
    geometryName?: string;
    methods?: string[];
    outputFormat?: string;
    reference?: CoordinateReference;
    requestHeaders?: null | HttpRequestHeaders;
    requestParameters?: null | HttpRequestParameters;
    serviceURL?: string | {
        GET?: string;
        POST?: string;
    };
    swapAxes?: string[];
    versions?: WFSVersion[];
}

Hierarchy (view full)

Properties

The Codec which will be used to convert the server response to LuciadRIA feature instances. The default codec assumes a server response in GeoJson format. Replace the codec if you want to support another format. The codec must only support the decode method as this is a read-only Store implementation.

credentials?: boolean

Whether credentials should be included with every HTTP request.

geometryName?: string

A geometry property name used in the BBOX OGC filter when querying a WFS service. The spatial filter can contain an optional geometry property name, which refers to the property that should be used to retrieve a feature geometry.

Default

null
methods?: string[]

An array of HTTP methods that can be used to communicate with the server. The store supports GET and POST. Methods returned in the server's capabilities response are used by default.

outputFormat?: string

Configures the outputFormat parameter on the request. For HTTP GET requests, the default outputFormat parameter is JSON, for HTTP POST requests, the default is application/json. Use this parameter if the server expects a different outputFormat parameter to respond with GeoJSON encoded data or if you want to support another format.

The reference in which the Feature instances will be defined when querying this store. This reference is passed to the Codec.decode method, so that the codec will decode Feature objects with the correct reference. This reference must match one of the CRS's listed in the capabilities of the WSF service.

You don't need to set the reference explicitly, as the store will pick automatically a right reference from the WFS capabilities.

Default

DefaultSRS from the capabilities, or the first supported reference from the list of OtherSRSs.
requestHeaders?: null | HttpRequestHeaders

An object literal that represents headers (as a key-value map) to send with each HTTP request. If set (and not empty), an XHR with the specified headers will be performed instead of creating an Image.

requestParameters?: null | HttpRequestParameters

An object literal that represents URL parameters (as a key-value map) to send with each HTTP request. If set (and not empty), an XHR with the specified query parameters will be performed instead of creating an Image.

Since

2021.0

serviceURL?: string | {
    GET?: string;
    POST?: string;
}

The location of the WFS service endpoint. Use this option to override the URL in the capabilities object. When the value is a string then it overrides the URL both for the POST and the GET method. You can also specify a different URL for the POST and the GET method. By default, the URL service endpoint is used from the capabilities object for both methods.

Type declaration

  • Optional GET?: string
  • Optional POST?: string

Since

2021.0.04

swapAxes?: string[]

Indicates whether this Store should swap the axis ordering of coordinates for the specified reference identifier(s) in the OGC BBOX filter when querying the WFS service. If undefined, the axis ordering dictated by the model reference is respected. For each specified reference, the order will be reversed. This is needed for EPSG:4326 data that is encoded in longitude-latitude order instead of latitude-longitude, for example.

versions?: WFSVersion[]

An array of WFS versions that the server supports. The WFSFeatureStore will select the most appropriate version to communicate with the server. An Error will be thrown if no supported versions are available.

Default

[WFSVersion.V200, WFSVersion.V110]