模块:ol/source/OGCMapTile

ol/source/OGCMapTile


OGCMapTile

类型定义

Options{Object}

属性:
Name Type 描述
url string

OGC地图瓦片集端点的URL。

context Object | undefined

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

mediaType string | undefined

瓦片的内容类型(例如“image/png”)。若未提供,源将尝试查找使用支持图像类型的rel="item"链接。

projection ProjectionLike | undefined

投影:默认情况下,投影将从crstileMatrixSet您可以通过在构造函数中指定投影来覆盖此设置。

attributions AttributionLike | undefined

归属

cacheSize number | undefined

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

crossOrigin null | string | undefined

crossOrigin 表示已加载图像的属性。请注意,必须提供 crossOrigin;若需使用 Canvas 渲染器访问像素数据,请使用该值。参见文档(https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image)了解更多。

interpolate boolean
(defaults to true)

重采样时采用插值方法,默认使用线性插值;设置为 false 可改用最近邻插值。

reprojectionErrorThreshold number
(defaults to 0.5)

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

tileLoadFunction LoadFunction | undefined

用于根据指定URL加载瓦片的可选函数。默认为

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

是否水平环绕世界。

transition number | undefined

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

collections Array.<string> | undefined

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