WfsClient class
A class that manages connections to an OGC Web Mapping Feature Service (WFS)
Constructors
Wfs |
A class for connecting to a OGC Web Feature Services (WFS). May require CORs or a proxy via transformRequest. |
Methods
describe |
Retrieves details about one or more feature types. The order of the results may not align with input. |
get |
Requests service metadata, which contains a description of the server’s information, content, and acceptable request parameter values. |
get |
Retrieves the number of features that match the query. Sets the WFS |
get |
Queries features from the service and returns a raw JSON response.
This may not include geometery information depending on filter parameters.
Sets the WFS |
get |
Queries features from the service and returns a GeoJSON FeatureCollection.
Sets the WFS |
Constructor Details
WfsClient(WfsServiceOptions)
A class for connecting to a OGC Web Feature Services (WFS). May require CORs or a proxy via transformRequest.
new WfsClient(options: WfsServiceOptions)
Parameters
- options
- WfsServiceOptions
Options that define how to connect to a WFS service.
Method Details
describeFeatureTypes(string | string[])
Retrieves details about one or more feature types. The order of the results may not align with input.
function describeFeatureTypes(featureTypeNames: string | string[]): Promise<WfsFeatureTypeDescription[]>
Parameters
- featureTypeNames
-
string | string[]
One or more feature type names to retrieve details for.
Returns
Promise<WfsFeatureTypeDescription[]>
getCapabilities()
Requests service metadata, which contains a description of the server’s information, content, and acceptable request parameter values.
function getCapabilities(): Promise<WfsCapabilities>
Returns
Promise<WfsCapabilities>
getFeatureCount(WfsFeatureRequest)
Retrieves the number of features that match the query. Sets the WFS resultType
parameter to "hits"
function getFeatureCount(request: WfsFeatureRequest): Promise<number>
Parameters
- request
- WfsFeatureRequest
Returns
Promise<number>
getFeatureInfo(WfsFeatureRequest)
Queries features from the service and returns a raw JSON response.
This may not include geometery information depending on filter parameters.
Sets the WFS resultType
parameter to "results"
.
function getFeatureInfo(request: WfsFeatureRequest): Promise<Record<string, any>>
Parameters
- request
- WfsFeatureRequest
The request details for the WFS service.
Returns
Promise<Record<string, any>>
getFeatures(WfsFeatureRequest)
Queries features from the service and returns a GeoJSON FeatureCollection.
Sets the WFS resultType
parameter to "results"
.
If geometry details are filtered out, null will be returned.
function getFeatures(request: WfsFeatureRequest): Promise<azmaps.data.FeatureCollection>
Parameters
- request
- WfsFeatureRequest
The request details for the WFS service.
Returns
Promise<azmaps.data.FeatureCollection>