# MapGISCustomTilingScheme

MapGIS/TilingScheme/MapGISCustomTilingScheme.js 22

Author:
  - 基础平台-潘卓然

### Members

#### bounds : Array.<Number>
MapGIS/TilingScheme/MapGISCustomTilingScheme.js 144

获取瓦片范围 [[xmin, ymin], [xmax, ymax]]

Default Value: `[[-180, -90], [180, 90]]`

#### dpi : Number
MapGIS/TilingScheme/MapGISCustomTilingScheme.js 168

获取瓦片分辨率

Default Value: `96`

#### ellipsoid : Ellipsoid
MapGIS/TilingScheme/MapGISCustomTilingScheme.js 77

获取瓦片的椭球体

#### epsg : MapProjection
MapGIS/TilingScheme/MapGISCustomTilingScheme.js 110

获取瓦片的EPSG编号

#### origin : Array.<Number>
MapGIS/TilingScheme/MapGISCustomTilingScheme.js 132

获取瓦片起始点 [left, top]

#### projection : MapProjection
MapGIS/TilingScheme/MapGISCustomTilingScheme.js 99

获取瓦片的投影方式

#### rectangle : Rectangle
MapGIS/TilingScheme/MapGISCustomTilingScheme.js 88

获取瓦片的范围，弧度表示

#### resolutions : Array.<Number>
MapGIS/TilingScheme/MapGISCustomTilingScheme.js 121

获取各级别瓦片分辨率

#### tileWidth : Number
MapGIS/TilingScheme/MapGISCustomTilingScheme.js 156

获取瓦片宽度

Default Value: `256`

### Methods

#### getNumberOfXTilesAtLevel(level) → Number
MapGIS/TilingScheme/MapGISCustomTilingScheme.js 181

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.

#### getNumberOfYTilesAtLevel(level) → Number
MapGIS/TilingScheme/MapGISCustomTilingScheme.js 191

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.

#### positionToTileXY(position, level, result) → Cartesian2
MapGIS/TilingScheme/MapGISCustomTilingScheme.js 311

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.

#### rectangleToNativeRectangle(rectangle, result) → Rectangle
MapGIS/TilingScheme/MapGISCustomTilingScheme.js 205

Transforms a 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.

#### tileXYToNativeRectangle(x, y, level, result) → Rectangle
MapGIS/TilingScheme/MapGISCustomTilingScheme.js 233

Converts tile x, y coordinates and level to a 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.

#### tileXYToRectangle(x, y, level, result) → Rectangle
MapGIS/TilingScheme/MapGISCustomTilingScheme.js 257

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.