new TileGrid(options)
| Name | Type | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Tile grid options.
|
||||||||||||||||||||||||||||
Subclasses
Methods
-
forEachTileCoord(extent, zoom, callback)
tilegrid/TileGrid.js, line 201 -
Call a function with each tile coordinate for a given extent and zoom level.
Name Type Description extentmodule:ol/extent~Extent Extent.
zoomnumber Integer zoom level.
callbackfunction Function called with each tile coordinate.
-
Get the extent for this tile grid, if it was configured.
Returns:
Extent.
-
getMaxZoom(){number}
tilegrid/TileGrid.js, line 257 -
Get the maximum zoom level for the grid.
Returns:
Max zoom.
-
getMinZoom(){number}
tilegrid/TileGrid.js, line 266 -
Get the minimum zoom level for the grid.
Returns:
Min zoom.
-
Get the origin for the grid at the given zoom level.
Name Type Description znumber Integer zoom level.
Returns:
Origin.
-
getResolution(z){number}
tilegrid/TileGrid.js, line 290 -
Get the resolution for the given zoom level.
Name Type Description znumber Integer zoom level.
Returns:
Resolution.
-
getResolutions(){Array.<number>}
tilegrid/TileGrid.js, line 299 -
Get the list of resolutions for the tile grid.
Returns:
Resolutions.
-
Get the extent of a tile coordinate.
Name Type Description tileCoordmodule:ol/tilecoord~TileCoord Tile coordinate.
extentmodule:ol/extent~Extent Temporary extent object.
Returns:
Extent.
-
getTileCoordForCoordAndResolution(coordinate, resolution, opt_tileCoord){module:ol/tilecoord~TileCoord}
tilegrid/TileGrid.js, line 401 -
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 coordinatemodule:ol/coordinate~Coordinate Coordinate.
resolutionnumber Resolution.
tileCoordmodule:ol/tilecoord~TileCoord Destination module:ol/tilecoord~TileCoord object.
Returns:
Tile coordinate.
-
getTileCoordForCoordAndZ(coordinate, z, opt_tileCoord){module:ol/tilecoord~TileCoord}
tilegrid/TileGrid.js, line 489 -
Get a tile coordinate given a map coordinate and zoom level.
Name Type Description coordinatemodule:ol/coordinate~Coordinate Coordinate.
znumber Zoom level.
tileCoordmodule:ol/tilecoord~TileCoord Destination module:ol/tilecoord~TileCoord object.
Returns:
Tile coordinate.
-
Get the tile size for a zoom level. The type of the return value matches the
tileSizeortileSizesthat the tile grid was configured with. To always get anmodule:ol/size~Size, run the result throughmodule:ol/size~Size.toSize().Name Type Description znumber Z.
Returns:
Tile size.
-
getZForResolution(resolution, opt_direction){number}
tilegrid/TileGrid.js, line 538 -
Name Type Description resolutionnumber Resolution.
directionnumber If 0, the nearest resolution will be used. If 1, the nearest lower resolution will be used. If -1, the nearest higher resolution will be used. Default is 0.
Returns:
Z.
OpenLayers