Class: XYZ

ol.tilegrid.XYZ

Set the grid pattern for sources accessing XYZ tiled-image servers.

new ol.tilegrid.XYZ(options) experimental

Name Type Description
options

XYZ options.

Name Type Description
extent ol.Extent | undefined experimental

Extent for the tile grid. The origin for an XYZ tile grid is the top-left corner of the extent. The zero level of the grid is defined by the resolution at which one tile fits in the provided extent. If not provided, the extent of the EPSG:3857 projection is used.

maxZoom number | undefined experimental

Maximum zoom. The default is ol.DEFAULT_MAX_ZOOM. This determines the number of levels in the grid set. For example, a maxZoom of 21 means there are 22 levels in the grid set.

minZoom number | undefined experimental

Minimum zoom. Default is 0.

tileSize number | undefined experimental

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

Extends

Methods

getMaxZoom(){number} inherited experimental

Returns:
Max zoom.

getMinZoom(){number} inherited experimental

Returns:
Min zoom.
Name Type Description
z number

Z.

Returns:
Origin.

getResolution(z){number} inherited

Name Type Description
z number

Z.

Returns:
Resolution.

getResolutions(){Array.<number>} inherited

Returns:
Resolutions.
Name Type Description
z number

Z.

Returns:
Tile size.