Class: WMTS

ol.tilegrid.WMTS

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

new ol.tilegrid.WMTS(options) experimental

src/ol/tilegrid/wmtstilegrid.js, line 20
Name Type Description
options

WMTS options.

Name Type Description
origin ol.Coordinate | undefined experimental

Origin.

origins Array.<ol.Coordinate> | undefined experimental

Origins. The length of this array needs to match the length of the resolutions array.

resolutions Array.<number> experimental

Resolutions. The array index of each resolution needs to match the zoom level. This means that even if a minZoom is configured, the resolutions array will have a length of maxZoom + 1

matrixIds Array.<string> experimental

matrix IDs. The length of this array needs to match the length of the resolutions array.

tileSize number | undefined experimental

Tile size.

tileSizes Array.<number> | undefined experimental

Tile sizes. The length of this array needs to match the length of the resolutions array.

widths Array.<number> | undefined experimental

Number of tile columns that cover the grid's extent for each zoom level. Only required when used with a source that has wrapX set to true, and only when the grid's origin differs from the one of the projection's extent. The array length has to match the length of the resolutions array, i.e. each resolution will have a matching entry here.

Extends

Methods

ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet(matrixSet){ol.tilegrid.WMTS} experimental

src/ol/tilegrid/wmtstilegrid.js, line 70
Name Type Description
matrixSet Object

An object representing a matrixSet in the capabilities document.

Returns:
WMTS tileGrid instance.

getMatrixIds(){Array.<string>} experimental

src/ol/tilegrid/wmtstilegrid.js, line 59
Returns:
MatrixIds.

getMaxZoom(){number} inherited experimental

src/ol/tilegrid/tilegrid.js, line 155
Returns:
Max zoom.

getMinZoom(){number} inherited experimental

src/ol/tilegrid/tilegrid.js, line 164
Returns:
Min zoom.

getOrigin(z){ol.Coordinate} inherited

src/ol/tilegrid/tilegrid.js, line 174
Name Type Description
z number

Z.

Returns:
Origin.

getResolution(z){number} inherited

src/ol/tilegrid/tilegrid.js, line 190
Name Type Description
z number

Z.

Returns:
Resolution.

getResolutions(){Array.<number>} inherited

src/ol/tilegrid/tilegrid.js, line 200
Returns:
Resolutions.

getTileCoordForCoordAndResolution(coordinate, resolution, opt_tileCoord){ol.TileCoord} inherited experimental

src/ol/tilegrid/tilegrid.js, line 320

Get the tile coordinate for the given map coordinate and resolution. This method considers that coordinates that intersect tile boundaries should be assigned the higher tile coordinate.

Name Type Description
coordinate ol.Coordinate

Coordinate.

resolution number

Resolution.

tileCoord ol.TileCoord

Destination ol.TileCoord object.

Returns:
Tile coordinate.

getTileCoordForCoordAndZ(coordinate, z, opt_tileCoord){ol.TileCoord} inherited experimental

src/ol/tilegrid/tilegrid.js, line 367
Name Type Description
coordinate ol.Coordinate

Coordinate.

z number

Z.

tileCoord ol.TileCoord

Destination ol.TileCoord object.

Returns:
Tile coordinate.

getTileSize(z){number} inherited

src/ol/tilegrid/tilegrid.js, line 410
Name Type Description
z number

Z.

Returns:
Tile size.