require(["esri/layers/ogc/wfsUtils"], (wfsUtils) => { /* code goes here */ });
import * as wfsUtils from "@arcgis/core/layers/ogc/wfsUtils.js";
esri/layers/ogc/wfsUtils
Provides utility functions for the WFSLayer.
- See also
Method Overview
Name | Return Type | Summary | Object |
---|---|---|---|
Promise<WFSCapabilities> | Fetches the GetCapabilities document of a WFS service which contains information about the list of layers in the service and the available operations. | wfsUtils | |
Promise<WFSLayerInfo> | Returns the WFSLayerInfo from the capabilities of the WFS service. | wfsUtils |
Method Details
-
getCapabilities
getCapabilities(url, options){Promise<WFSCapabilities>}
-
Fetches the GetCapabilities document of a WFS service which contains information about the list of layers in the service and the available operations.
ParametersSpecificationurl StringThe URL to the WFS endpoint.
options ObjectoptionalSpecificationcustomParameters ObjectoptionalA list of key-value pairs of parameters to append to the url.
signal AbortSignaloptionalAn AbortSignal to abort the executions of the remote method. If canceled, the promise will be rejected with an error named
AbortError
. See also AbortController.ReturnsType Description Promise<WFSCapabilities> The WFS Capabilities for the service. Exampleconst capabilities = await wfsUtils.getCapabilities(url); const layerInfo = await wfsUtils.getWFSLayerInfo(capabilities, "layer"); const layer = WFSLayer.fromWFSLayerInfo(layerInfo); // Same as const layer = WFSLayer({ url, name: "layer" });
-
getWFSLayerInfo
getWFSLayerInfo(capabilities, name, namespaceUri, options){Promise<WFSLayerInfo>}
-
Returns the WFSLayerInfo from the capabilities of the WFS service. Can be used in conjunction with getCapabilities
ParametersSpecificationcapabilities WFSCapabilitiesThe capabilities of the WFS service.
name StringoptionalThe type name to get information for. If not specified, the first layer of the service is chosen.
namespaceUri StringoptionalThe namespace URI of the type name. If not specified, the first namespace found for the
name
is chosen.options ObjectoptionalAn object specifying additional options. See the object specification table below for the required properties of this object.
SpecificationcustomParameters ObjectoptionalA list of key-value pairs of parameters to append to the url.
spatialReference ObjectoptionalThe desired spatial reference for the layer. By default will use the default spatial reference of the feature type.
signal AbortSignaloptionalAn AbortSignal to abort the executions of the remote method. If canceled, the promise will be rejected with an error named
AbortError
. See also AbortController.ReturnsType Description Promise<WFSLayerInfo> The layer info that can be used to create a WFSLayer Exampleconst capabilities = await wfsUtils.getCapabilities(url); const layerInfo = await wfsUtils.getWFSLayerInfo(capabilities, "layer"); const layer = WFSLayer.fromWFSLayerInfo(layerInfo); // Same as const layer = WFSLayer({ url, name: "layer" });
Type Definitions
-
WFS service information about the available layers and operations.
- Properties
-
operations WFSOperations
Information about the operations needed to consume the WFS service.
featureTypes WFSFeatureType[]An array of featureTypes (or layers) available in the WFS service.
- See also
-
Provides information about an individual feature type, or layer, found in the WFS service.
- Properties
-
typeName String
The type name of the featureType. This will be of the format
namespacePrefix:name
.name StringThe name of the featureType.
title StringThe title of the featureType.
description StringThe description of the featureType.
The extent of the features.
namespacePrefix StringThe prefix of the namespace.
namespaceUri StringThe namespaceUri of the featureType.
defaultSpatialReference Numberthe default spatialReference wkid used when not explicitely specified in the GetFeature call.
An array of spatialReference wkids that are supported on the featureType.
- See also
-
The layer info from the WFS service.
- Properties
-
url String
The URL to the WFS service.
name StringThe name of the layer in the WFS service to display.
namespaceUri StringThe namespace URI for the layer name.
The fields on the layer.
geometryType StringThe geometry type of the features in the layer.
Possible Values:"point"|"multipoint"|"polyline"|"polygon"
objectIdField StringThe field containing the object ID.
spatialReference SpatialReferenceThe spatial reference of the layer.
extent ExtentThe extent of the layer.
Determines whether the X and Y coordinates should be swapped.
wfsCapabilities WFSCapabilitiescustomParameters ObjectThe custom parameters applied to the layer.
- See also