- 另请参阅
方法概述
名称 | 返回值类值 | 描述 | 对象 |
---|---|---|---|
Promise<WFSCapabilities> | 获取 WFS 服务的 GetCapabilities 文档,其中包含有关服务中的图层列表和可用操作的信息。 更多详情 | wfsUtils | |
Promise<WFSLayerInfo> | 从 WFS 服务的功能中返回 WFSLayerInfo。 更多详情 | wfsUtils |
方法详细说明
-
getCapabilities(url, options){Promise<WFSCapabilities>}
-
获取 WFS 服务的 GetCapabilities 文档,其中包含有关服务中的图层列表和可用操作的信息。
参数规范url String指向 WFS 端点的 URL。
options Objectoptional规范customParameters Objectoptional要追加到 url 的参数键值对的列表。
signal AbortSignaloptional中止远程方法执行的 AbortSignal。如果取消,则 promise 将被拒绝,并返回一个名为
AbortError
的错误。另请参见 AbortController。返回类型 描述 Promise<WFSCapabilities> 服务的 WFS 功能。 示例const 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(capabilities, name, namespaceUri, options){Promise<WFSLayerInfo>}
-
从 WFS 服务的功能中返回 WFSLayerInfo。可与 getCapabilities 结合使用
参数规范capabilities WFSCapabilitiesWFS 服务的功能。
name Stringoptional要获取其信息的类型名称。如果未指定,则选择服务的第一个图层。
namespaceUri Stringoptional类型名称的命名空间 URI。如果未指定,则选择为该
name
找到的第一个命名空间。options Objectoptional指定附加选项的对象。有关此对象所需的属性,请参阅下面的对象规范表。
规范customParameters Objectoptional要追加到 url 的参数键值对的列表。
spatialReference Objectoptional图层的所需空间参考。
signal AbortSignaloptional中止远程方法执行的 AbortSignal。如果取消,则 promise 将被拒绝,并返回一个名为
AbortError
的错误。另请参见 AbortController。返回类型 描述 Promise<WFSLayerInfo> 可用于创建 WFSLayer 的图层信息。 示例const 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" });
类型定义
-
WFSCapabilities
-
有关可用图层和操作的 WFS 服务信息。
- 属性
-
operations WFSOperations
有关使用 WFS 服务所需操作的信息。
featureTypes WFSFeatureType[]WFS 服务中可用的 featureTypes (或图层) 数组。
- 另请参阅
-
WFSFeatureType
-
提供有关在 WFS 服务中找到的单个要素类型或图层的信息。
- 属性
-
typeName String
featureType 的类型名称。这将采用
namespacePrefix:name
格式。name StringfeatureType 的名称。
title StringfeatureType 的标题。
description StringfeatureType 的描述。
extent Extent要素的范围。
namespacePrefix String命名空间的前缀。
namespaceUri StringfeatureType 的 namespaceUri。
featureType 上支持的 spatialReference wkids 的数组。
- 另请参阅
-
WFSLayerInfo
-
来自 WFS 服务的图层信息。
- 属性
-
url String
指向 WFS 服务的 URL。
name StringWFS 服务中要显示的图层的名称。
namespaceUri String图层名称的命名空间 URI。
图层上的字段。
geometryType String图层中要素的几何类型。
可能值:"point"|"multipoint"|"polyline"|"polygon"
objectIdField String包含对象 ID 的字段。
spatialReference SpatialReference图层的空间参考。
extent Extent图层的范围。
确定是否应交换 X 和 Y 坐标。
wfsCapabilities WFSCapabilitiescustomParameters Object应用于图层的自定义参数。
- 另请参阅