public class Tile
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
long |
mapSize
the map size implied by zoom level and tileSize, to avoid multiple computations.
|
static int |
SIZE
Width and height of a map tile in pixels.
|
static int |
TILE_SIZE_MULTIPLE
Tile size multiple in pixels.
|
int |
tileX
The X number of this tile.
|
int |
tileY
The Y number of this tile.
|
byte |
zoomLevel
The Zoom level of this tile.
|
| Constructor and Description |
|---|
Tile(int tileX,
int tileY,
byte zoomLevel) |
| Modifier and Type | Method and Description |
|---|---|
static int |
calculateTileSize()
Calculate tile size (256px) with a scale factor.
|
boolean |
equals(java.lang.Object obj) |
BoundingBox |
getBoundingBox()
Gets the geographic extend of this Tile as a BoundingBox.
|
static BoundingBox |
getBoundingBox(Tile upperLeft,
Tile lowerRight)
Return the BoundingBox of a rectangle of tiles defined by upper left and lower right tile.
|
static int |
getMaxTileNumber(byte zoomLevel) |
Point |
getOrigin()
Returns the top-left point of this tile in absolute coordinates.
|
int |
hashCode() |
java.lang.String |
toString() |
public static int SIZE
public static int TILE_SIZE_MULTIPLE
public final long mapSize
public final int tileX
public final int tileY
public final byte zoomLevel
public Tile(int tileX,
int tileY,
byte zoomLevel)
tileX - the X number of the tile.tileY - the Y number of the tile.zoomLevel - the zoom level of the tile.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic static int calculateTileSize()
public BoundingBox getBoundingBox()
public static BoundingBox getBoundingBox(Tile upperLeft, Tile lowerRight)
upperLeft - tile in upper left corner.lowerRight - tile in lower right corner.public static int getMaxTileNumber(byte zoomLevel)
public Point getOrigin()