new ol.tilegrid.TileGrid(options)
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Tile grid options.
|
|||||||||||||||||||||||||
Subclasses
Members
-
createTileCoordTransform experimental
-
Creates a TileCoord transform function for use with this tile grid. Transforms the internal tile coordinates with bottom-left origin to the tile coordinates used by the
ol.TileUrlFunction. The returned function expects anol.TileCoordas first and anol.proj.Projectionas second argument and returns a transformedol.TileCoord.
Methods
-
getMaxZoom(){number} experimental
src/ol/tilegrid/tilegrid.js, line 214 -
Get the maximum zoom level for the grid.
Returns:
Max zoom.
-
getMinZoom(){number} experimental
src/ol/tilegrid/tilegrid.js, line 224 -
Get the minimum zoom level for the grid.
Returns:
Min zoom.
-
getOrigin(z){ol.Coordinate}
src/ol/tilegrid/tilegrid.js, line 235 -
Get the origin for the grid at the given zoom level.
Name Type Description znumber Z.
Returns:
Origin.
-
getResolution(z){number}
src/ol/tilegrid/tilegrid.js, line 255 -
Get the resolution for the given zoom level.
Name Type Description znumber Z.
Returns:
Resolution.
-
getResolutions(){Array.<number>}
src/ol/tilegrid/tilegrid.js, line 268 -
Get the list of resolutions for the tile grid.
Returns:
Resolutions.
-
getTileCoordForCoordAndResolution(coordinate, resolution, opt_tileCoord){ol.TileCoord} experimental
src/ol/tilegrid/tilegrid.js, line 388 -
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 coordinateol.Coordinate Coordinate.
resolutionnumber Resolution.
tileCoordol.TileCoord Destination ol.TileCoord object.
Returns:
Tile coordinate.
-
getTileCoordForCoordAndZ(coordinate, z, opt_tileCoord){ol.TileCoord} experimental
src/ol/tilegrid/tilegrid.js, line 439 -
Get a tile coordinate given a map coordinate and zoom level.
Name Type Description coordinateol.Coordinate Coordinate.
znumber Zoom level.
tileCoordol.TileCoord Destination ol.TileCoord object.
Returns:
Tile coordinate.
-
getTileSize(z){number|ol.Size}
src/ol/tilegrid/tilegrid.js, line 468 -
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 anol.Size, run the result throughol.size.toSize().Name Type Description znumber Z.
Returns:
Tile size.
OpenLayers 3