Class: TileGrid

ol.tilegrid.TileGrid

Base class for setting the grid pattern for sources accessing tiled-image servers.

new ol.tilegrid.TileGrid(options)

Name Type Description
options

Tile grid options.

Name Type Description
minZoom number | undefined experimental

Minimum zoom. Default is 0.

origin ol.Coordinate | undefined

Origin. Default is null.

origins Array.<ol.Coordinate> | undefined

Origins. If given, the array should match the resolutions array, i.e. each resolution can have a different origin.

resolutions Array.<number>

Resolutions.

tileSize number | undefined

Tile size. Default is 256. (Only square tiles are supported.)

tileSizes Array.<number> | undefined

Tile sizes. If given, the array should match the resolutions array, i.e. each resolution can have a different tile size.

Subclasses

Methods

getMaxZoom(){number} experimental

Returns:
Max zoom.

getMinZoom(){number} experimental

Returns:
Min zoom.
Name Type Description
z number

Z.

Returns:
Origin.

getResolution(z){number}

Name Type Description
z number

Z.

Returns:
Resolution.

getResolutions(){Array.<number>}

Returns:
Resolutions.

getTileSize(z){number}

Name Type Description
z number

Z.

Returns:
Tile size.