Module: ol/source/ImageTile

ol/source/ImageTile


Classes

ImageTileSource

Type Definitions

图像瓦片加载函数。该函数使用 z、x 和 y 瓦片坐标调用,返回 image 或其 Promise。

Options{Object}

Properties:
Name Type Description
url UrlLike | undefined

图像 URL 模板。除了单个 URL 模板外,还可以提供 URL 模板数组或函数。如果提供函数,它将以 z、x、y 瓦片坐标和加载器选项调用,并应返回 URL。

loader Loader | undefined

数据加载器。使用 z、x 和 y 瓦片坐标调用。返回瓦片的 image 或其 Promise。Promise 应在图像加载完成之前不解析。如果提供了 url 选项,将创建一个加载器。

attributions AttributionLike | undefined

归属信息。

attributionsCollapsible boolean
(defaults to true)

归属信息是否可折叠。

maxZoom number
(defaults to 42)

可选的最大缩放级别。如果提供了 tileGrid 则不使用。

minZoom number
(defaults to 0)

可选的最小缩放级别。如果提供了 tileGrid 则不使用。

tileSize number | Size
(defaults to [256, 256])

源瓦片的像素宽度和高度。如果提供了 tileGrid,这可能与渲染的像素尺寸不同。

gutter number
(defaults to 0)

数据瓦片周围要忽略的边距大小(像素)。这允许忽略瓦片边缘的渲染伪影。支持的数据应比瓦片尺寸宽和高 2 x gutter 值。

maxResolution number | undefined

可选的零级别瓦片网格分辨率。如果提供了 tileGrid 则不使用。

projection ProjectionLike
(defaults to 'EPSG:3857')

瓦片投影。

tileGrid TileGrid | undefined

瓦片网格。

state State | undefined

数据源状态。

wrapX boolean
(defaults to true)

渲染对趾线以外的瓦片。

transition number | undefined

淡入新瓦片的过渡时间(毫秒)。

interpolate boolean
(defaults to true)

重采样时使用插值。

crossOrigin CrossOriginAttribute
(defaults to 'anonymous')

传递给图像数据加载器的 crossOrigin 属性。

referrerPolicy ReferrerPolicy | undefined

已加载图像的 referrerPolicy 属性。

zDirection number | NearestDirection函数
(defaults to 0)

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

UrlLike{string} {Array.<string>} {UrlGetter}