public class

TileUtils

extends Object
java.lang.Object
   ↳ com.carto.utils.TileUtils

Class Overview

A helper class for mapping coordinates to tiles and back.

Summary

Public Methods
static MapTile calculateMapTile(MapPos mapPos, int zoom, Projection proj)
Calculates the map tile corresponding to specified point and zoom level.
static MapBounds calculateMapTileBounds(MapTile mapTile, Projection proj)
Calculates bounds for the given map tile.
static MapPos calculateMapTileOrigin(MapTile mapTile, Projection proj)
Calculates origin coordinates for the given map tile.
synchronized void delete()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static MapTile calculateMapTile (MapPos mapPos, int zoom, Projection proj)

Calculates the map tile corresponding to specified point and zoom level.

Parameters
mapPos Coordinates for the point.
zoom Zoom level for the tile.
proj The projection to use for tile and point.
Returns
  • The corresponding map tile.

public static MapBounds calculateMapTileBounds (MapTile mapTile, Projection proj)

Calculates bounds for the given map tile.

Parameters
mapTile The map tile to use.
proj The projection to use for bounds.
Returns
  • The corresponding tile bounds.

public static MapPos calculateMapTileOrigin (MapTile mapTile, Projection proj)

Calculates origin coordinates for the given map tile.

Parameters
mapTile The map tile to use.
proj The projection to use for origin.
Returns
  • The corresponding tile origin.

public synchronized void delete ()