模块:ol/source/OGCVectorTile

ol/source/OGCVectorTile


OGCVectorTile

类型定义

Options{Object}

属性:
Name Type 描述
url string

OGC矢量图块集端点的URL。

context Object | undefined

用于瓦片URL模板的值查询。{tileMatrix}(缩放级别),{tileRow}{tileCol}URL变量始终由数据源提供。

format FeatureFormat<FeatureType> | undefined

瓦片要素格式,默认配置所使用且必需。

mediaType string | undefined

瓦片的内容类型(例如“application/vnd.mapbox-vector-tile”)。若未指定,数据源将尝试查找带有 rel="item" 属性的链接,该链接指向配置格式所支持的矢量格式。

attributions AttributionLike | undefined

版权信息。

attributionsCollapsible boolean
(defaults to true)

署名是可折叠的。

cacheSize number | undefined

已弃用。请改用图层上的 cacheSize 选项。

overlaps boolean
(defaults to true)

该数据源可能存在几何重叠。将其设置为false(例如,对于代表行政边界的多边形数据源或 TopoJSON 数据源)允许渲染器优化填充和描边操作。

projection ProjectionLike
(defaults to 'EPSG:3857')

瓦片网格的投影。

tileClass Class<VectorTile> | undefined

用于实例化图像瓦片的类。默认为VectorTile.

transition number | undefined

瓦片不透明度过渡的持续时间(单位:毫秒)。当持续时间为 0 时,将禁用不透明度过渡。

wrapX boolean
(defaults to true)

是否水平环绕世界。当设置为false,仅渲染一个世界。当设置为true,瓦片将水平环绕以渲染多个世界。

zDirection number | NearestDirectionFunction
(defaults to 1)

当缩放级别位于整数之间时,请选择是否使用更高或更低缩放级别的瓦片。参见getZForResolution.

collections Array.<string> | undefined

需包含的地理空间数据子资源列表。若未提供,则包含整个数据集。请求单个集合的瓦片集时,此选项不适用。