Class: WebMercatorTilingScheme

WebMercatorTilingScheme

new WebMercatorTilingScheme(optionsopt)

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.
Parameters:
Name Type Attributes Description
options Object <optional>
Object with the following properties:
Properties
Name Type Attributes Default Description
ellipsoid Ellipsoid <optional>
Ellipsoid.WGS84 The ellipsoid whose surface is being tiled. Defaults to the WGS84 ellipsoid.
numberOfLevelZeroTilesX Number <optional>
1 The number of tiles in the X direction at level zero of the tile tree.
numberOfLevelZeroTilesY Number <optional>
1 The number of tiles in the Y direction at level zero of the tile tree.
rectangleSouthwestInMeters Cartesian2 <optional>
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 <optional>
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.
Source:

Members

ellipsoid :Ellipsoid

Gets the ellipsoid that is tiled by this tiling scheme.
Type:
Source:

projection :MapProjection

Gets the map projection used by this tiling scheme.
Type:
Source:

rectangle :Rectangle

Gets the rectangle, in radians, covered by this tiling scheme.
Type:
Source:

Methods

getNumberOfXTilesAtLevel(level) → {Number}

Gets the total number of tiles in the X direction at a specified level-of-detail.
Parameters:
Name Type Description
level Number The level-of-detail.
Source:
Returns:
The number of tiles in the X direction at the given level.
Type
Number

getNumberOfYTilesAtLevel(level) → {Number}

Gets the total number of tiles in the Y direction at a specified level-of-detail.
Parameters:
Name Type Description
level Number The level-of-detail.
Source:
Returns:
The number of tiles in the Y direction at the given level.
Type
Number

positionToTileXY(position, level, resultopt) → {Cartesian2}

Calculates the tile x, y coordinates of the tile containing a given cartographic position.
Parameters:
Name Type Attributes 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.
Source:
Returns:
The specified 'result', or a new object containing the tile x, y coordinates if 'result' is undefined.
Type
Cartesian2

rectangleToNativeRectangle(rectangle, resultopt) → {Rectangle}

Transforms an rectangle specified in geodetic radians to the native coordinate system of this tiling scheme.
Parameters:
Name Type Attributes 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.
Source:
Returns:
The specified 'result', or a new object containing the native rectangle if 'result' is undefined.
Type
Rectangle

tileXYToNativeRectangle(x, y, level, resultopt) → {Rectangle}

Converts tile x, y coordinates and level to an rectangle expressed in the native coordinates of the tiling scheme.
Parameters:
Name Type Attributes 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.
Source:
Returns:
The specified 'result', or a new object containing the rectangle if 'result' is undefined.
Type
Rectangle

tileXYToRectangle(x, y, level, resultopt) → {Rectangle}

Converts tile x, y coordinates and level to a cartographic rectangle in radians.
Parameters:
Name Type Attributes 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.
Source:
Returns:
The specified 'result', or a new object containing the rectangle if 'result' is undefined.
Type
Rectangle