Tile class
Represents a rectangular map tile in a hierarchical tiling scheme.
Tiles divide the world map into a grid at different zoom levels, following the standard web mercator tiling scheme. Each tile is uniquely identified by its X/Y coordinates and zoom level:
- Zoom level 0: Single tile (0,0) covers the entire world
- Zoom level 1: 2×2 grid of tiles (0,0 to 1,1)
- Zoom level n: 2^n × 2^n grid of tiles
Key features:
- Hierarchical parent/child relationships
- Neighbor tile calculation
- Cached boundary calculations for performance
- Indoor level support for multi-floor mapping
- Efficient coordinate-to-tile conversions
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- indoorLevel → int
-
The indoor level of this tile.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tileX → int
-
The X number of this tile.
final
- tileY → int
-
The Y number of this tile.
final
- zoomLevel → int
-
The zoom level of this tile.
final
Methods
-
dispose(
) → void -
getAbove(
) → Tile - Gets the tile immediately to the north (above) of this tile.
-
getAboveLeft(
) → Tile - Returns the tile above left
-
getAboveRight(
) → Tile - Returns the tile above right
-
getBelow(
) → Tile - Gets the tile immediately to the south (below) of this tile.
-
getBelowLeft(
) → Tile - Returns the tile below left
-
getBelowRight(
) → Tile - Returns the tile below right
-
getBoundingBox(
) → BoundingBox -
getCenter(
) → Mappoint -
getChilds(
) → List< Tile> - Returns the childs of this tile. The first two items are the upper row from left to right, the next two items are the lower row.
-
getGrandchilds(
) → List< Tile> - Returns the grandchild-tiles. The tiles are ordered by row, then column meaning the first 4 tiles are the upper row from left to right.
-
getLeft(
) → Tile - Gets the tile immediately to the west (left) of this tile.
-
getLeftUpper(
) → Mappoint -
getMapBoundary(
) → MapRectangle -
getNeighbours(
) → Set< Tile> - Gets all eight neighboring tiles around this tile.
-
getParent(
) → Tile? - @return the parent tile of this tile or null, if the zoom level of this tile is 0.
-
getRight(
) → Tile - Gets the tile immediately to the east (right) of this tile.
-
getShiftX(
Tile otherTile) → int -
getShiftY(
Tile otherTile) → int -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
getMaxTileNumber(
int zoomLevel) → int - Calculates the maximum valid tile coordinate for a given zoom level.