Constructor options for WFSFeatureStore.

interface WFSFeatureStoreConstructorOptions {
    codec?: Codec<Feature<null | Shape, FeatureProperties>>;
    credentials?: boolean;
    geometryName?: string;
    methods?: string[];
    outputFormat?: string;
    reference: CoordinateReference;
    requestHeaders?: null | HttpRequestHeaders;
    requestParameters?: null | {
        [headerName: string]:
            | string
            | number
            | boolean
            | null
            | undefined;
    };
    serviceURL: string;
    swapAxes?: string[];
    typeName: string | QName;
    versions?: WFSVersion[];
}

Hierarchy (view full)

Properties

The Codec which will be used to convert the server response to LuciadRIA feature instances. If omitted, the codec is derived from the outputFormat or defaulted to GeoJsonCodec if outputFormat is not set. Replace the codec if you want to support another format. The codec must support only 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 that is used in the BBOX OGC filter when querying 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's geometry.

null
methods?: string[]

An array HTTP methods that can be used to communicate with the server. The store supports GET and POST.

["GET","POST"]
outputFormat?: string

Configures the outputFormat parameter on the request. The default value is application/json. Use this parameter if the server requires a different outputFormat to return GeoJSON-encoded data, or if you want to support another format. Note that the value of outputFormat is also used to determine the appropriate codec, GeoJsonCodec or GMLCodec used by this store.

The reference in which the Feature instances will be defined when querying this store. This should match the reference of the FeatureModel on which this Store is used. 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 the default CRS listed in the capabilities of the WFS service. Please use the WFSFeatureStore.createFromURL or WFSFeatureStore.createFromCapabilities utility methods to create an instance of this store that guarantees the right reference.

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 | {
    [headerName: string]:
        | string
        | number
        | boolean
        | null
        | undefined;
}

An object literal that represents the request parameters (as a key-value map) to send with each HTTP request. If set and not empty, the parameters will be added to the HTTP requests.

2021.0

serviceURL: string

The location of the WFS service endpoint.

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 for example needed for EPSG:4326 data that is encoded in longitude-latitude order instead of latitude-longitude.

typeName: string | QName

The name of the feature type this query will be requesting from the server. The type name should be specified as either a string or a QName object. A QName object is a JavaScript object that contains three string properties: prefix, namespace, localPart.

versions?: WFSVersion[]

An array of WFS versions that the server supports. By default, the WFSFeatureStore will select the most appropriate version to communicate with the server. Use this option if you want to explicitly specify which WFS version to use. The order of the versions determines which version is selected, based on the versions supported by the server.