Module: ol/source/DataTile

ol/source/DataTile


Classes

DataTileSource

Type Definitions

Data tile loading function. The function is called with z, x, and y tile coordinates and returns data for a tile or a promise for the same.

Options{Object}

Properties:
Name Type Argument Default Description
loader module:ol/source/DataTile~Loader <optional>

Data loader. Called with z, x, and y tile coordinates. Returns data for a tile or a promise for the same.

attributions module:ol/source/Source~AttributionLike <optional>

Attributions.

attributionsCollapsible boolean <optional>
true

Attributions are collapsible.

maxZoom number <optional>
42

Optional max zoom level. Not used if tileGrid is provided.

minZoom number <optional>
0

Optional min zoom level. Not used if tileGrid is provided.

tileSize number | module:ol/size~Size <optional>
[256, 256]

The pixel width and height of the source tiles. This may be different than the rendered pixel size if a tileGrid is provided.

gutter number <optional>
0

The size in pixels of the gutter around data tiles to ignore. This allows artifacts of rendering at tile edges to be ignored. Supported data should be wider and taller than the tile size by a value of 2 x gutter.

maxResolution number <optional>

Optional tile grid resolution at level zero. Not used if tileGrid is provided.

projection module:ol/proj~ProjectionLike <optional>
'EPSG:3857'

Tile projection.

tileGrid module:ol/tilegrid/TileGrid~TileGrid <optional>

Tile grid.

opaque boolean <optional>
false

Whether the layer is opaque.

state module:ol/source/Source~State <optional>

The source state.

tilePixelRatio number <optional>

Deprecated. To have tiles scaled, pass a tileSize representing the source tile size and a tileGrid with the desired rendered tile size.

wrapX boolean <optional>
false

Render tiles beyond the antimeridian.

transition number <optional>

Transition time when fading in new tiles (in miliseconds).

bandCount number <optional>
4

Number of bands represented in the data.

interpolate boolean <optional>
false

Use interpolated values when resampling. By default, the nearest neighbor is used when resampling.