TilingScheme - Cesium Documentation

# TilingScheme

#### new TilingScheme()

  A tiling scheme for geometry or imagery on the surface of an ellipsoid. At level-of-detail zero, the coarsest, least-detailed level, the number of tiles is configurable. At level of detail one, each of the level zero tiles has four children, two in each direction. At level of detail two, each of the level one tiles has four children, two in each direction. This continues for as many levels as are present in the geometry or imagery source.

  ##### See:

  - WebMercatorTilingScheme
  - GeographicTilingScheme
  Source: Core/TilingScheme.js, line 23

### Members

#### ellipsoid :Ellipsoid

  Gets the ellipsoid that is tiled by the tiling scheme.
  Source: Core/TilingScheme.js, line 33

#### projection :MapProjection

  Gets the map projection used by the tiling scheme.
  Source: Core/TilingScheme.js, line 52

#### rectangle :Rectangle

  Gets the rectangle, in radians, covered by this tiling scheme.
  Source: Core/TilingScheme.js, line 42

### Methods

#### getNumberOfXTilesAtLevel(level) → Number

  Gets the total number of tiles in the X direction at a specified level-of-detail.

  Name | Type | Description
  --- | --- | ---
  `level` | Number | The level-of-detail.

  ##### Returns:

  The number of tiles in the X direction at the given level.
  Source: Core/TilingScheme.js, line 64

#### getNumberOfYTilesAtLevel(level) → Number

  Gets the total number of tiles in the Y direction at a specified level-of-detail.

  Name | Type | Description
  --- | --- | ---
  `level` | Number | The level-of-detail.

  ##### Returns:

  The number of tiles in the Y direction at the given level.
  Source: Core/TilingScheme.js, line 73

#### positionToTileXY(position, level, result) → Cartesian2

  Calculates the tile x, y coordinates of the tile containing a given cartographic position.

  Name | Type | Description
  --- | --- | ---
  `position` | Cartographic | The position.
  `level` | Number | The tile level-of-detail. Zero is the least detailed.
  `result` | Cartesian2 | optional The instance to which to copy the result, or undefined if a new instance should be created.

  ##### Returns:

  The specified 'result', or a new object containing the tile x, y coordinates if 'result' is undefined.
  Source: Core/TilingScheme.js, line 129

#### rectangleToNativeRectangle(rectangle, result) → Rectangle

  Transforms an rectangle specified in geodetic radians to the native coordinate system of this tiling scheme.

  Name | Type | Description
  --- | --- | ---
  `rectangle` | Rectangle | The rectangle to transform.
  `result` | Rectangle | optional The instance to which to copy the result, or undefined if a new instance should be created.

  ##### Returns:

  The specified 'result', or a new object containing the native rectangle if 'result' is undefined.
  Source: Core/TilingScheme.js, line 86

#### tileXYToNativeRectangle(x, y, level, result) → Rectangle

  Converts tile x, y coordinates and level to an rectangle expressed in the native coordinates of the tiling scheme.

  Name | Type | Description
  --- | --- | ---
  `x` | Number | The integer x coordinate of the tile.
  `y` | Number | The integer y coordinate of the tile.
  `level` | Number | The tile level-of-detail. Zero is the least detailed.
  `result` | Object | optional The instance to which to copy the result, or undefined if a new instance should be created.

  ##### Returns:

  The specified 'result', or a new object containing the rectangle if 'result' is undefined.
  Source: Core/TilingScheme.js, line 101

#### tileXYToRectangle(x, y, level, result) → Rectangle

  Converts tile x, y coordinates and level to a cartographic rectangle in radians.

  Name | Type | Description
  --- | --- | ---
  `x` | Number | The integer x coordinate of the tile.
  `y` | Number | The integer y coordinate of the tile.
  `level` | Number | The tile level-of-detail. Zero is the least detailed.
  `result` | Object | optional The instance to which to copy the result, or undefined if a new instance should be created.

  ##### Returns:

  The specified 'result', or a new object containing the rectangle if 'result' is undefined.
  Source: Core/TilingScheme.js, line 115