public final class TileSystem extends Object
Modifier and Type | Field and Description |
---|---|
protected static int |
mTileSize |
Constructor and Description |
---|
TileSystem() |
Modifier and Type | Method and Description |
---|---|
static int |
getMaximumZoomLevel() |
static int |
getTileSize() |
static double |
GroundResolution(double latitude,
int levelOfDetail)
Determines the ground resolution (in meters per pixel) at a specified latitude and level of
detail.
|
static Point |
LatLongToPixelXY(double latitude,
double longitude,
int levelOfDetail,
Point reuse)
Converts a point from latitude/longitude WGS-84 coordinates (in degrees) into pixel XY
coordinates at a specified level of detail.
|
static double |
MapScale(double latitude,
int levelOfDetail,
int screenDpi)
Determines the map scale at a specified latitude, level of detail, and screen resolution.
|
static int |
MapSize(int levelOfDetail)
Determines the map width and height (in pixels) at a specified level of detail.
|
static GeoPoint |
PixelXYToLatLong(int pixelX,
int pixelY,
int levelOfDetail,
GeoPoint reuse)
Converts a pixel from pixel XY coordinates at a specified level of detail into
latitude/longitude WGS-84 coordinates (in degrees).
|
static Point |
PixelXYToTileXY(int pixelX,
int pixelY,
Point reuse)
Converts pixel XY coordinates into tile XY coordinates of the tile containing the specified
pixel.
|
static Point |
QuadKeyToTileXY(String quadKey,
Point reuse)
Converts a QuadKey into tile XY coordinates.
|
static void |
setTileSize(int tileSize) |
static Point |
TileXYToPixelXY(int tileX,
int tileY,
Point reuse)
Converts tile XY coordinates into pixel XY coordinates of the upper-left pixel of the
specified tile.
|
static String |
TileXYToQuadKey(int tileX,
int tileY,
int levelOfDetail)
Converts tile XY coordinates into a QuadKey at a specified level of detail.
|
public static void setTileSize(int tileSize)
public static int getTileSize()
public static int getMaximumZoomLevel()
public static int MapSize(int levelOfDetail)
levelOfDetail
- Level of detail, from 1 (lowest detail) to 23 (highest detail)public static double GroundResolution(double latitude, int levelOfDetail)
latitude
- Latitude (in degrees) at which to measure the ground resolutionlevelOfDetail
- Level of detail, from 1 (lowest detail) to 23 (highest detail)public static double MapScale(double latitude, int levelOfDetail, int screenDpi)
latitude
- Latitude (in degrees) at which to measure the map scalelevelOfDetail
- Level of detail, from 1 (lowest detail) to 23 (highest detail)screenDpi
- Resolution of the screen, in dots per inchpublic static Point LatLongToPixelXY(double latitude, double longitude, int levelOfDetail, Point reuse)
latitude
- Latitude of the point, in degreeslongitude
- Longitude of the point, in degreeslevelOfDetail
- Level of detail, from 1 (lowest detail) to 23 (highest detail)reuse
- An optional Point to be recycled, or null to create a new one automaticallypublic static GeoPoint PixelXYToLatLong(int pixelX, int pixelY, int levelOfDetail, GeoPoint reuse)
pixelX
- X coordinate of the point, in pixelspixelY
- Y coordinate of the point, in pixelslevelOfDetail
- Level of detail, from 1 (lowest detail) to 23 (highest detail)reuse
- An optional GeoPoint to be recycled, or null to create a new one automaticallypublic static Point PixelXYToTileXY(int pixelX, int pixelY, Point reuse)
pixelX
- Pixel X coordinatepixelY
- Pixel Y coordinatereuse
- An optional Point to be recycled, or null to create a new one automaticallypublic static Point TileXYToPixelXY(int tileX, int tileY, Point reuse)
tileX
- Tile X coordinatetileY
- Tile X coordinatereuse
- An optional Point to be recycled, or null to create a new one automaticallypublic static String TileXYToQuadKey(int tileX, int tileY, int levelOfDetail)
tileX
- Tile X coordinatetileY
- Tile Y coordinatelevelOfDetail
- Level of detail, from 1 (lowest detail) to 23 (highest detail)public static Point QuadKeyToTileXY(String quadKey, Point reuse)
quadKey
- QuadKey of the tilereuse
- An optional Point to be recycled, or null to create a new one automatically