Methods
-
module:ol/tilegrid.createXYZ(opt_options){module:ol/tilegrid/TileGrid~TileGrid}
tilegrid.js, line 91 -
import {createXYZ} from 'ol/tilegrid';Creates a tile grid with a standard XYZ tiling scheme.
Name Type Description optionsTile grid options.
Name Type Description extentmodule:ol/extent~Extent Extent for the tile grid. The origin for an XYZ tile grid is the top-left corner of the extent. If
maxResolutionis not provided 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.maxResolutionnumber Resolution at level zero.
maxZoomnumber Maximum zoom. The default is
42. This determines the number of levels in the grid set. For example, amaxZoomof 21 means there are 22 levels in the grid set.minZoomnumber (defaults to 0) Minimum zoom.
tileSizenumber | module:ol/size~Size (defaults to [256, 256]) Tile size in pixels.
Returns:
Tile grid instance.
Type Definitions
-
XYZOptions{Object}
-
Properties:
Name Type Argument Default Description extentmodule:ol/extent~Extent <optional>
Extent for the tile grid. The origin for an XYZ tile grid is the top-left corner of the extent. If
maxResolutionis not provided 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.maxResolutionnumber <optional>
Resolution at level zero.
maxZoomnumber <optional>
Maximum zoom. The default is
42. This determines the number of levels in the grid set. For example, amaxZoomof 21 means there are 22 levels in the grid set.minZoomnumber <optional>
0 Minimum zoom.
tileSizenumber | module:ol/size~Size <optional>
[256, 256] Tile size in pixels.
OpenLayers