new WebMercatorTilingScheme
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 | Argument | Default | Description |
---|---|---|---|---|
description.ellipsoid |
Ellipsoid |
<optional> |
Ellipsoid.WGS84 | The ellipsoid whose surface is being tiled. Defaults to the WGS84 ellipsoid. |
description.numberOfLevelZeroTilesX |
Number |
<optional> |
1 | The number of tiles in the X direction at level zero of the tile tree. |
description.numberOfLevelZeroTilesY |
Number |
<optional> |
1 | The number of tiles in the Y direction at level zero of the tile tree. |
description.extentSouthwestInMeters |
Cartesian2 |
<optional> |
The southwest corner of the extent covered by the tiling scheme, in meters. If this parameter or extentNortheastInMeters 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. | |
description.extentNortheastInMeters |
Cartesian2 |
<optional> |
The northeast corner of the extent covered by the tiling scheme, in meters. If this parameter or extentSouthwestInMeters 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. |
Members
-
ellipsoid :Ellipsoid
-
Gets the ellipsoid that is tiled by this tiling scheme.
-
extent :Extent
-
Gets the extent, in radians, covered by this tiling scheme.
-
projection :Projection
-
Gets the map projection used by this tiling scheme.
Methods
-
createLevelZeroTiles
-
Creates the tile or tiles at level of detail zero, the coarsest, least detailed level.
Returns:
Array An array containing the tiles at level of detail zero, starting with the tile in the northwest corner of the globe and followed by the tile (if any) to its east. -
extentToNativeExtent
-
Transforms an extent specified in geodetic radians to the native coordinate system of this tiling scheme.
Parameters:
Name Type Argument Description extent
Extent The extent to transform. result
Extent <optional>
The instance to which to copy the result, or undefined if a new instance should be created. Returns:
Extent The specified 'result', or a new object containing the native extent if 'result' is undefined. -
getNumberOfXTilesAtLevel
-
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. Returns:
Number The number of tiles in the X direction at the given level. -
getNumberOfYTilesAtLevel
-
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. Returns:
Number The number of tiles in the Y direction at the given level. -
tileXYToNativeExtent
-
Converts tile x, y coordinates and level to an extent expressed in the native coordinates of the tiling scheme.
Parameters:
Name Type Argument 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:
Extent The specified 'result', or a new object containing the extent if 'result' is undefined.