WebMercatorTilingScheme

new Cesium.WebMercatorTilingScheme(options)

A tiling scheme for geometry referenced to a WebMercatorProjection, EPSG:3857. This is the tiling scheme used by Google Maps, Microsoft Bing Maps, and most of ESRI ArcGIS Online.
参数名称 类型 描述信息
options object 可选 Object with the following properties:
参数名称 类型 默认值 描述信息
ellipsoid Ellipsoid Ellipsoid.WGS84 可选 The ellipsoid whose surface is being tiled. Defaults to the WGS84 ellipsoid.
numberOfLevelZeroTilesX number 1 可选 The number of tiles in the X direction at level zero of the tile tree.
numberOfLevelZeroTilesY number 1 可选 The number of tiles in the Y direction at level zero of the tile tree.
rectangleSouthwestInMeters Cartesian2 可选 The southwest corner of the rectangle covered by the tiling scheme, in meters. If this parameter or rectangleNortheastInMeters is not specified, the entire globe is covered in the longitude direction and an equal distance is covered in the latitude direction, resulting in a square projection.
rectangleNortheastInMeters Cartesian2 可选 The northeast corner of the rectangle covered by the tiling scheme, in meters. If this parameter or rectangleSouthwestInMeters is not specified, the entire globe is covered in the longitude direction and an equal distance is covered in the latitude direction, resulting in a square projection.

成员(属性)

Gets the ellipsoid that is tiled by this tiling scheme.
Gets the map projection used by this tiling scheme.
Gets the rectangle, in radians, covered by this tiling scheme.

方法

getNumberOfXTilesAtLevel(level)number

Gets the total number of tiles in the X direction at a specified level-of-detail.
参数名称 类型 描述信息
level number The level-of-detail.
返回值:
The number of tiles in the X direction at the given level.

getNumberOfYTilesAtLevel(level)number

Gets the total number of tiles in the Y direction at a specified level-of-detail.
参数名称 类型 描述信息
level number The level-of-detail.
返回值:
The number of tiles in the Y direction at the given level.

positionToTileXY(position, level, result)Cartesian2

Calculates the tile x, y coordinates of the tile containing a given cartographic position.
参数名称 类型 描述信息
position Cartographic The position.
level number The tile level-of-detail. Zero is the least detailed.
result Cartesian2 可选 The instance to which to copy the result, or undefined if a new instance should be created.
返回值:
The specified 'result', or a new object containing the tile x, y coordinates if 'result' is undefined.

rectangleToNativeRectangle(rectangle, result)Rectangle

Transforms a rectangle specified in geodetic radians to the native coordinate system of this tiling scheme.
参数名称 类型 描述信息
rectangle Rectangle The rectangle to transform.
result Rectangle 可选 The instance to which to copy the result, or undefined if a new instance should be created.
返回值:
The specified 'result', or a new object containing the native rectangle if 'result' is undefined.

tileXYToNativeRectangle(x, y, level, result)Rectangle

Converts tile x, y coordinates and level to a rectangle expressed in the native coordinates of the tiling scheme.
参数名称 类型 描述信息
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 可选 The instance to which to copy the result, or undefined if a new instance should be created.
返回值:
The specified 'result', or a new object containing the rectangle if 'result' is undefined.

tileXYToRectangle(x, y, level, result)Rectangle

Converts tile x, y coordinates and level to a cartographic rectangle in radians.
参数名称 类型 描述信息
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 可选 The instance to which to copy the result, or undefined if a new instance should be created.
返回值:
The specified 'result', or a new object containing the rectangle if 'result' is undefined.