new ol.tilegrid.TileGrid(options)
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Tile grid options.
|
Subclasses
Methods
-
getMaxZoom(){number} experimental
src/ol/tilegrid/tilegrid.js, line 192 -
Get the maximum zoom level for the grid.
Returns:
Max zoom.
-
getMinZoom(){number} experimental
src/ol/tilegrid/tilegrid.js, line 202 -
Get the minimum zoom level for the grid.
Returns:
Min zoom.
-
getOrigin(z){ol.Coordinate}
src/ol/tilegrid/tilegrid.js, line 213 -
Get the origin for the grid at the given zoom level.
Name Type Description z
number Z.
Returns:
Origin.
-
getResolution(z){number}
src/ol/tilegrid/tilegrid.js, line 233 -
Get the resolution for the given zoom level.
Name Type Description z
number Z.
Returns:
Resolution.
-
getResolutions(){Array.<number>}
src/ol/tilegrid/tilegrid.js, line 246 -
Get the list of resolutions for the tile grid.
Returns:
Resolutions.
-
getTileCoordExtent(tileCoord, opt_extent){ol.Extent} experimental
src/ol/tilegrid/tilegrid.js, line 341 -
Get the extent of a tile coordinate.
Name Type Description tileCoord
ol.TileCoord Tile coordinate.
extent
ol.Extent Temporary extent object.
Returns:
Extent.
-
getTileCoordForCoordAndResolution(coordinate, resolution, opt_tileCoord){ol.TileCoord} experimental
src/ol/tilegrid/tilegrid.js, line 364 -
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} experimental
src/ol/tilegrid/tilegrid.js, line 415 -
Get a tile coordinate given a map coordinate and zoom level.
Name Type Description coordinate
ol.Coordinate Coordinate.
z
number Zoom level.
tileCoord
ol.TileCoord Destination ol.TileCoord object.
Returns:
Tile coordinate.
-
getTileSize(z){number|ol.Size}
src/ol/tilegrid/tilegrid.js, line 443 -
Get the tile size for a zoom level. The type of the return value matches the
tileSize
ortileSizes
that the tile grid was configured with. To always get anol.Size
, run the result throughol.size.toSize()
.Name Type Description z
number Z.
Returns:
Tile size.