Module: ol/source/TileJSON

ol/source/TileJSON


Classes

TileJSON

Type Definitions

Config{Object}

Properties:
Name Type Description
name string | undefined

名称。

description string | undefined

描述。

version string | undefined

版本。

attribution string | undefined

归属信息。

template string | undefined

模板。

legend string | undefined

图例。

scheme string | undefined

方案。

tiles Array.<string>

瓦片 URL 模板。

grids Array.<string> | undefined

可选网格。

minzoom number | undefined

最小缩放级别。

maxzoom number | undefined

最大缩放级别。

bounds Array.<number> | undefined

可选边界。

center Array.<number> | undefined

可选中心。

Options{Object}

Properties:
Name Type Description
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。
interpolate boolean
(defaults to true)

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

jsonp boolean
(defaults to false)

使用带回调的 JSONP 加载 TileJSON。当服务器不支持 CORS 时有用。

reprojectionErrorThreshold number
(defaults to 0.5)

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

tileJSON Config | undefined

此数据源的 TileJSON 配置。如果未提供,必须配置 url

tileLoad函数 Load函数 | undefined

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

function(imageTile, src) {
  imageTile.getImage().src = src;
};
tileSize number | Size
(defaults to [256, 256])

瓦片服务使用的瓦片尺寸。注意:tileSize 和其他非标准 TileJSON 属性当前被忽略。

url string | undefined

TileJSON 文件的 URL。如果未提供,必须配置 tileJSON

wrapX boolean
(defaults to true)

是否水平环绕世界。

transition number | undefined

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

zDirection number | NearestDirection函数
(defaults to 0)

选择在整数缩放级别之间使用更高还是更低缩放级别的瓦片。参见 getZForResolution