Module: ol/source/OGCMapTile

ol/source/OGCMapTile


Classes

OGCMapTile

Type Definitions

Options{Object}

Properties:
Name Type Description
url string

OGC Map Tileset 端点的 URL。

context Object | undefined

在瓦片 URL 模板中使用的值查找表。URL 中的 {tileMatrix}(缩放级别)、{tileRow}{tileCol} 变量将始终由数据源提供。

mediaType string | undefined

瓦片的内容类型(如 "image/png")。如果未提供,数据源将尝试找到使用支持图像类型的 rel="item" 链接。

projection ProjectionLike | undefined

投影。默认情况下,投影将从 tileMatrixSet 的 crs 派生。可以通过在构造函数中提供投影来覆盖此设置。

attributions AttributionLike | undefined

归属信息。

cacheSize number | undefined

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

crossOrigin null | string | undefined 已加载图像的 crossOrigin 属性。注意如果要使用 Canvas 渲染器访问像素数据,必须提供 crossOrigin 值。详见 https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image。
referrerPolicy ReferrerPolicy | undefined

已加载图像的 referrerPolicy 属性。

interpolate boolean
(defaults to true)

重采样时是否使用插值。默认情况下, 重采样时使用线性插值。设置为 false 可使用 the nearest neighbor instead.

reprojectionErrorThreshold number
(defaults to 0.5)

允许的最大重投影误差(以像素为单位)。 值越高可以提高重投影性能,但会降低精度。

tileLoad函数 Load函数 | undefined

给定 URL 加载瓦片的可选函数。默认为

function(tile, src) {
  tile.getImage().src = src;
};
wrapX boolean
(defaults to true)

是否水平环绕世界。

transition number | undefined

渲染的不透明度过渡持续时间。要禁用不透明度过渡,请传递 transition: 0

collections Array.<string> | undefined

要包含的地理空间数据子资源列表。如果未提供,将包含整个数据集。此选项不适用于请求单个集合的瓦片集。