Classes
Methods
-
module:ol/tilegrid/WMTS.createFromCapabilitiesMatrixSet(matrixSet, opt_extent, opt_matrixLimits){module:ol/tilegrid/WMTS~WMTSTileGrid}
tilegrid/WMTS.js, line 103 -
import {createFromCapabilitiesMatrixSet} from 'ol/tilegrid/WMTS';Create a tile grid from a WMTS capabilities matrix set and an optional TileMatrixSetLimits.
Name Type Description matrixSetObject An object representing a matrixSet in the capabilities document.
extentmodule:ol/extent~Extent An optional extent to restrict the tile ranges the server provides.
matrixLimitsArray.<Object> An optional object representing the available matrices for tileGrid.
Returns:
WMTS tileGrid instance.
Type Definitions
-
Options{Object}
-
Properties:
Name Type Argument Description extentmodule:ol/extent~Extent <optional>
Extent for the tile grid. No tiles outside this extent will be requested by
module:ol/source/Tilesources. When nooriginororiginsare configured, theoriginwill be set to the top-left corner of the extent.originmodule:ol/coordinate~Coordinate <optional>
The tile grid origin, i.e. where the
xandyaxes meet ([z, 0, 0]). Tile coordinates increase left to right and downwards. If not specified,extentororiginsmust be provided.originsArray.<module:ol/coordinate~Coordinate> <optional>
Tile grid origins, i.e. where the
xandyaxes meet ([z, 0, 0]), for each zoom level. If given, the array length should match the length of theresolutionsarray, i.e. each resolution can have a different origin. Tile coordinates increase left to right and downwards. If not specified,extentororiginmust be provided.resolutionsArray.<number> Resolutions. The array index of each resolution needs to match the zoom level. This means that even if a
minZoomis configured, the resolutions array will have a length ofmaxZoom + 1matrixIdsArray.<string> matrix IDs. The length of this array needs to match the length of the
resolutionsarray.sizesArray.<module:ol/size~Size> <optional>
Number of tile rows and columns of the grid for each zoom level. The values here are the
TileMatrixWidthandTileMatrixHeightadvertised in the GetCapabilities response of the WMTS, and define each zoom level's extent together with theoriginororigins. A gridextentcan be configured in addition, and will further limit the extent for which tile requests are made by sources. If the bottom-left corner of an extent is used asoriginororigins, then theyvalue must be negative because OpenLayers tile coordinates use the top left as the origin.tileSizenumber | module:ol/size~Size <optional>
Tile size.
tileSizesArray.<module:ol/size~Size> <optional>
Tile sizes. The length of this array needs to match the length of the
resolutionsarray.
OpenLayers