Class GARSTileProvider

java.lang.Object
mil.nga.gars.tile.GARSTileProvider
All Implemented Interfaces:
TileProvider

public class GARSTileProvider extends Object implements TileProvider
GARS Tile Provider
  • Constructor Details

    • GARSTileProvider

      public GARSTileProvider(Context context)
      Constructor
      Parameters:
      context - app context
    • GARSTileProvider

      public GARSTileProvider(Context context, GridType... types)
      Constructor
      Parameters:
      context - app context
      types - grids types to enable
    • GARSTileProvider

      public GARSTileProvider(Context context, Collection<GridType> types)
      Constructor
      Parameters:
      context - app context
      types - grids types to enable
    • GARSTileProvider

      public GARSTileProvider(Context context, Grids grids)
      Constructor
      Parameters:
      context - app context
      grids - grids
    • GARSTileProvider

      public GARSTileProvider(int tileLength)
      Constructor
      Parameters:
      tileLength - tile width and height
    • GARSTileProvider

      public GARSTileProvider(int tileLength, GridType... types)
      Constructor
      Parameters:
      tileLength - tile width and height
      types - grids types to enable
    • GARSTileProvider

      public GARSTileProvider(int tileLength, Collection<GridType> types)
      Constructor
      Parameters:
      tileLength - tile width and height
      types - grids types to enable
    • GARSTileProvider

      public GARSTileProvider(int tileLength, Grids grids)
      Constructor
      Parameters:
      tileLength - tile width and height
      grids - grids
    • GARSTileProvider

      public GARSTileProvider(int tileWidth, int tileHeight)
      Constructor
      Parameters:
      tileWidth - tile width
      tileHeight - tile height
    • GARSTileProvider

      public GARSTileProvider(int tileWidth, int tileHeight, GridType... types)
      Constructor
      Parameters:
      tileWidth - tile width
      tileHeight - tile height
      types - grids types to enable
    • GARSTileProvider

      public GARSTileProvider(int tileWidth, int tileHeight, Collection<GridType> types)
      Constructor
      Parameters:
      tileWidth - tile width
      tileHeight - tile height
      types - grids types to enable
    • GARSTileProvider

      public GARSTileProvider(int tileWidth, int tileHeight, Grids grids)
      Constructor
      Parameters:
      tileWidth - tile width
      tileHeight - tile height
      grids - grids
  • Method Details

    • create

      public static GARSTileProvider create(Context context)
      Create a tile provider with all grids
      Parameters:
      context - app context
      Returns:
      tile provider
    • create

      public static GARSTileProvider create(Context context, GridType... types)
      Create a tile provider with grid types
      Parameters:
      context - app context
      types - grids types to enable
      Returns:
      tile provider
    • create

      public static GARSTileProvider create(Context context, Collection<GridType> types)
      Create a tile provider with grid types
      Parameters:
      context - app context
      types - grids types to enable
      Returns:
      tile provider
    • create

      public static GARSTileProvider create(Context context, Grids grids)
      Create a tile provider with grids
      Parameters:
      context - app context
      grids - grids
      Returns:
      tile provider
    • create

      public static GARSTileProvider create(int tileLength)
      Create a tile provider with all grids
      Parameters:
      tileLength - tile width and height
      Returns:
      tile provider
    • create

      public static GARSTileProvider create(int tileLength, GridType... types)
      Create a tile provider with grid types
      Parameters:
      tileLength - tile width and height
      types - grids types to enable
      Returns:
      tile provider
    • create

      public static GARSTileProvider create(int tileLength, Collection<GridType> types)
      Create a tile provider with grid types
      Parameters:
      tileLength - tile width and height
      types - grids types to enable
      Returns:
      tile provider
    • create

      public static GARSTileProvider create(int tileLength, Grids grids)
      Create a tile provider with grids
      Parameters:
      tileLength - tile width and height
      grids - grids
      Returns:
      tile provider
    • create

      public static GARSTileProvider create(int tileWidth, int tileHeight)
      Create a tile provider with all grids
      Parameters:
      tileWidth - tile width
      tileHeight - tile height
      Returns:
      tile provider
    • create

      public static GARSTileProvider create(int tileWidth, int tileHeight, GridType... types)
      Create a tile provider with grid types
      Parameters:
      tileWidth - tile width
      tileHeight - tile height
      types - grids types to enable
      Returns:
      tile provider
    • create

      public static GARSTileProvider create(int tileWidth, int tileHeight, Collection<GridType> types)
      Create a tile provider with grid types
      Parameters:
      tileWidth - tile width
      tileHeight - tile height
      types - grids types to enable
      Returns:
      tile provider
    • create

      public static GARSTileProvider create(int tileWidth, int tileHeight, Grids grids)
      Create a tile provider with grids
      Parameters:
      tileWidth - tile width
      tileHeight - tile height
      grids - grids
      Returns:
      tile provider
    • getTileWidth

      public int getTileWidth()
      Get the tile width
      Returns:
      tile width
    • setTileWidth

      public void setTileWidth(int tileWidth)
      Set the tile width
      Parameters:
      tileWidth - tile width
    • getTileHeight

      public int getTileHeight()
      Get the tile height
      Returns:
      tile height
    • setTileHeight

      public void setTileHeight(int tileHeight)
      Set the tile height
      Parameters:
      tileHeight - tile height
    • getGrids

      public Grids getGrids()
      Get the grids
      Returns:
      grids
    • setGrids

      public void setGrids(Grids grids)
      Set the grids
      Parameters:
      grids - grids
    • getGrid

      public Grid getGrid(GridType type)
      Get the grid
      Parameters:
      type - grid type
      Returns:
      grid
    • getCoordinate

      public String getCoordinate(LatLng latLng)
      Get the Global Area Reference System coordinate for the location in five minute precision
      Parameters:
      latLng - location
      Returns:
      GARS coordinate
    • getCoordinate

      public String getCoordinate(LatLng latLng, int zoom)
      Get the Global Area Reference System coordinate for the location in the zoom level precision
      Parameters:
      latLng - location
      zoom - zoom level precision
      Returns:
      GARS coordinate
    • getCoordinate

      public String getCoordinate(LatLng latLng, GridType type)
      Get the Global Area Reference System coordinate for the location in the grid type precision
      Parameters:
      latLng - location
      type - grid type precision
      Returns:
      GARS coordinate
    • getGARS

      public GARS getGARS(LatLng latLng)
      Get the Global Area Reference System for the location
      Parameters:
      latLng - location
      Returns:
      GARS
    • getPrecision

      public GridType getPrecision(int zoom)
      Get the grid precision for the zoom level
      Parameters:
      zoom - zoom level
      Returns:
      grid type precision
    • getTile

      public Tile getTile(int x, int y, int zoom)
      Specified by:
      getTile in interface TileProvider
    • drawTile

      public Bitmap drawTile(int x, int y, int zoom)
      Draw the tile
      Parameters:
      x - x coordinate
      y - y coordinate
      zoom - zoom level
      Returns:
      bitmap