Classes
Methods
-
module:ol/tilegrid/WMTS.createFromCapabilitiesMatrixSet(matrixSet, opt_extent, opt_matrixLimits){module:ol/tilegrid/WMTS~WMTSTileGrid}
tilegrid/WMTS.js, line 108 -
Create a tile grid from a WMTS capabilities matrix set and an optional TileMatrixSetLimits.
Name Type Description matrixSet
Object An object representing a matrixSet in the capabilities document.
extent
module:ol/extent~Extent An optional extent to restrict the tile ranges the server provides.
matrixLimits
Array.<Object> An optional object representing the available matrices for tileGrid.
Returns:
WMTS tileGrid instance.
Type Definitions
-
Options{Object}
-
Properties:
Name Type Argument Description extent
module:ol/extent~Extent <optional>
Extent for the tile grid. No tiles outside this extent will be requested by
module:ol/source/Tile
sources. When noorigin
ororigins
are configured, theorigin
will be set to the top-left corner of the extent.origin
module:ol/coordinate~Coordinate <optional>
The tile grid origin, i.e. where the
x
andy
axes meet ([z, 0, 0]
). Tile coordinates increase left to right and upwards. If not specified,extent
ororigins
must be provided.origins
Array.<module:ol/coordinate~Coordinate> <optional>
Tile grid origins, i.e. where the
x
andy
axes meet ([z, 0, 0]
), for each zoom level. If given, the array length should match the length of theresolutions
array, i.e. each resolution can have a different origin. Tile coordinates increase left to right and upwards. If not specified,extent
ororigin
must be provided.resolutions
Array.<number> 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 ofmaxZoom + 1
matrixIds
Array.<string> matrix IDs. The length of this array needs to match the length of the
resolutions
array.sizes
Array.<module:ol/size~Size> <optional>
Number of tile rows and columns of the grid for each zoom level. The values here are the
TileMatrixWidth
andTileMatrixHeight
advertised in the GetCapabilities response of the WMTS, and define the grid's extent together with theorigin
. Anextent
can be configured in addition, and will further limit the extent for which tile requests are made by sources. Note that when the top-left corner of theextent
is used asorigin
ororigins
, then they
value must be negative because OpenLayers tile coordinates increase upwards.tileSize
number | module:ol/size~Size <optional>
Tile size.
tileSizes
Array.<module:ol/size~Size> <optional>
Tile sizes. The length of this array needs to match the length of the
resolutions
array.widths
Array.<number> <optional>
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 totrue
, 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 theresolutions
array, i.e. each resolution will have a matching entry here.