Package mil.nga.mgrs.tile
Class MGRSTileProvider
java.lang.Object
mil.nga.mgrs.tile.MGRSTileProvider
- All Implemented Interfaces:
TileProvider
MGRS Tile Provider
-
Field Summary
Fields inherited from interface com.google.android.gms.maps.model.TileProvider
NO_TILE
-
Constructor Summary
ConstructorDescriptionMGRSTileProvider
(int tileLength) ConstructorMGRSTileProvider
(int tileWidth, int tileHeight) ConstructorMGRSTileProvider
(int tileWidth, int tileHeight, Collection<GridType> types) ConstructorMGRSTileProvider
(int tileWidth, int tileHeight, GridType... types) ConstructorMGRSTileProvider
(int tileWidth, int tileHeight, Grids grids) ConstructorMGRSTileProvider
(int tileLength, Collection<GridType> types) ConstructorMGRSTileProvider
(int tileLength, GridType... types) ConstructorMGRSTileProvider
(int tileLength, Grids grids) ConstructorMGRSTileProvider
(Context context) ConstructorMGRSTileProvider
(Context context, Collection<GridType> types) ConstructorMGRSTileProvider
(Context context, GridType... types) ConstructorMGRSTileProvider
(Context context, Grids grids) Constructor -
Method Summary
Modifier and TypeMethodDescriptionstatic MGRSTileProvider
create
(int tileLength) Create a tile provider with all gridsstatic MGRSTileProvider
create
(int tileWidth, int tileHeight) Create a tile provider with all gridsstatic MGRSTileProvider
create
(int tileWidth, int tileHeight, Collection<GridType> types) Create a tile provider with grid typesstatic MGRSTileProvider
Create a tile provider with grid typesstatic MGRSTileProvider
Create a tile provider with gridsstatic MGRSTileProvider
create
(int tileLength, Collection<GridType> types) Create a tile provider with grid typesstatic MGRSTileProvider
Create a tile provider with grid typesstatic MGRSTileProvider
Create a tile provider with gridsstatic MGRSTileProvider
Create a tile provider with all gridsstatic MGRSTileProvider
create
(Context context, Collection<GridType> types) Create a tile provider with grid typesstatic MGRSTileProvider
Create a tile provider with grid typesstatic MGRSTileProvider
Create a tile provider with gridsstatic MGRSTileProvider
createGZD
(int tileLength) Create a tile provider with Grid Zone Designator gridsstatic MGRSTileProvider
createGZD
(int tileWidth, int tileHeight) Create a tile provider with Grid Zone Designator gridsstatic MGRSTileProvider
Create a tile provider with Grid Zone Designator gridsdrawTile
(int x, int y, int zoom) Draw the tilegetCoordinate
(LatLng latLng) Get the Military Grid Reference System coordinate for the location in one meter precisiongetCoordinate
(LatLng latLng, int zoom) Get the Military Grid Reference System coordinate for the location in the zoom level precisiongetCoordinate
(LatLng latLng, GridType type) Get the Military Grid Reference System coordinate for the location in the grid type precisionGet the gridgetGrids()
Get the gridsGet the Military Grid Reference System for the locationgetPrecision
(int zoom) Get the grid precision for the zoom levelgetTile
(int x, int y, int zoom) int
Get the tile heightint
Get the tile widthvoid
Set the gridsvoid
setTileHeight
(int tileHeight) Set the tile heightvoid
setTileWidth
(int tileWidth) Set the tile width
-
Constructor Details
-
MGRSTileProvider
Constructor- Parameters:
context
- app context
-
MGRSTileProvider
Constructor- Parameters:
context
- app contexttypes
- grids types to enable
-
MGRSTileProvider
Constructor- Parameters:
context
- app contexttypes
- grids types to enable
-
MGRSTileProvider
Constructor- Parameters:
context
- app contextgrids
- grids
-
MGRSTileProvider
public MGRSTileProvider(int tileLength) Constructor- Parameters:
tileLength
- tile width and height
-
MGRSTileProvider
Constructor- Parameters:
tileLength
- tile width and heighttypes
- grids types to enable
-
MGRSTileProvider
Constructor- Parameters:
tileLength
- tile width and heighttypes
- grids types to enable
-
MGRSTileProvider
Constructor- Parameters:
tileLength
- tile width and heightgrids
- grids
-
MGRSTileProvider
public MGRSTileProvider(int tileWidth, int tileHeight) Constructor- Parameters:
tileWidth
- tile widthtileHeight
- tile height
-
MGRSTileProvider
Constructor- Parameters:
tileWidth
- tile widthtileHeight
- tile heighttypes
- grids types to enable
-
MGRSTileProvider
Constructor- Parameters:
tileWidth
- tile widthtileHeight
- tile heighttypes
- grids types to enable
-
MGRSTileProvider
Constructor- Parameters:
tileWidth
- tile widthtileHeight
- tile heightgrids
- grids
-
-
Method Details
-
create
Create a tile provider with all grids- Parameters:
context
- app context- Returns:
- tile provider
-
create
Create a tile provider with grid types- Parameters:
context
- app contexttypes
- grids types to enable- Returns:
- tile provider
-
create
Create a tile provider with grid types- Parameters:
context
- app contexttypes
- grids types to enable- Returns:
- tile provider
-
create
Create a tile provider with grids- Parameters:
context
- app contextgrids
- grids- Returns:
- tile provider
-
create
Create a tile provider with all grids- Parameters:
tileLength
- tile width and height- Returns:
- tile provider
-
create
Create a tile provider with grid types- Parameters:
tileLength
- tile width and heighttypes
- grids types to enable- Returns:
- tile provider
-
create
Create a tile provider with grid types- Parameters:
tileLength
- tile width and heighttypes
- grids types to enable- Returns:
- tile provider
-
create
Create a tile provider with grids- Parameters:
tileLength
- tile width and heightgrids
- grids- Returns:
- tile provider
-
create
Create a tile provider with all grids- Parameters:
tileWidth
- tile widthtileHeight
- tile height- Returns:
- tile provider
-
create
Create a tile provider with grid types- Parameters:
tileWidth
- tile widthtileHeight
- tile heighttypes
- grids types to enable- Returns:
- tile provider
-
create
Create a tile provider with grid types- Parameters:
tileWidth
- tile widthtileHeight
- tile heighttypes
- grids types to enable- Returns:
- tile provider
-
create
Create a tile provider with grids- Parameters:
tileWidth
- tile widthtileHeight
- tile heightgrids
- grids- Returns:
- tile provider
-
createGZD
Create a tile provider with Grid Zone Designator grids- Parameters:
context
- app context- Returns:
- tile provider
-
createGZD
Create a tile provider with Grid Zone Designator grids- Parameters:
tileLength
- tile length- Returns:
- tile provider
-
createGZD
Create a tile provider with Grid Zone Designator grids- Parameters:
tileWidth
- tile widthtileHeight
- tile height- 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
Get the grids- Returns:
- grids
-
setGrids
Set the grids- Parameters:
grids
- grids
-
getGrid
Get the grid- Parameters:
type
- grid type- Returns:
- grid
-
getCoordinate
Get the Military Grid Reference System coordinate for the location in one meter precision- Parameters:
latLng
- location- Returns:
- MGRS coordinate
-
getCoordinate
Get the Military Grid Reference System coordinate for the location in the zoom level precision- Parameters:
latLng
- locationzoom
- zoom level precision- Returns:
- MGRS coordinate
-
getCoordinate
Get the Military Grid Reference System coordinate for the location in the grid type precision- Parameters:
latLng
- locationtype
- grid type precision- Returns:
- MGRS coordinate
-
getMGRS
Get the Military Grid Reference System for the location- Parameters:
latLng
- location- Returns:
- MGRS
-
getPrecision
Get the grid precision for the zoom level- Parameters:
zoom
- zoom level- Returns:
- grid type precision
-
getTile
- Specified by:
getTile
in interfaceTileProvider
-
drawTile
Draw the tile- Parameters:
x
- x coordinatey
- y coordinatezoom
- zoom level- Returns:
- bitmap
-