public class GoogleMapsProvider

  1. Object
  2. MapProvider
  3. TiledProvider
  4. GoogleMapsProvider

Fields

public static final int REGULAR = 0This is a regular road map
public static final int SATELLITE = 1This is a satellite map
public static final int HYBRID = 2This is a satellite + road map

Constructors

public GoogleMapsProvider(String apiKey)Google map provider Constructor

Methods

public static int getTileSize()
public static void setTileSize(int aTileSize)
public void setMapType(int type)Sets the map type
public int maxZoomLevel()Maximal zoom level.
public String attribution()The provider attribution.
public Tile tileFor(BoundingBox bbox)Gets a tile for the given bounding box
public String getLanguage()Defines the language to use for display of labels on map tiles.
public void setLanguage(String language)Defines the language to use for display of labels on map tiles.
public boolean isSensor()Specifies whether the application requesting the static map is using a sensor to determine the user’s location.
public void setSensor(boolean sensor)Specifies whether the application requesting the static map is using a sensor to determine the user’s location.

Inherited fields

Inherited methods

Field details

REGULAR

public static final int REGULAR = 0
This is a regular road map

SATELLITE

public static final int SATELLITE = 1
This is a satellite map

HYBRID

public static final int HYBRID = 2
This is a satellite + road map

Constructor details

GoogleMapsProvider

public GoogleMapsProvider(String apiKey)
Google map provider Constructor

Method details

getTileSize

public static int getTileSize()

Returns

the tileSize

setTileSize

public static void setTileSize(int aTileSize)

Parameters

aTileSize int
the tileSize to set

setMapType

public void setMapType(int type)
Sets the map type

maxZoomLevel

public int maxZoomLevel()
Maximal zoom level. Zoom levels are counted from zero to maxZoomLevel(). 0 is farest view, where the scale is greatest.

attribution

public String attribution()
The provider attribution.

Returns

a String of the provider attribution

tileFor

public Tile tileFor(BoundingBox bbox)
Gets a tile for the given bounding box

Parameters

bbox BoundingBox
a bounding box

Returns

a Tile for the given bounding box

getLanguage

public String getLanguage()
Defines the language to use for display of labels on map tiles. Note that this parameter is only supported for some country tiles; if the specific language requested is not supported for the tile set, then the default language for that tileset will be used.

Returns

the language

setLanguage

public void setLanguage(String language)
Defines the language to use for display of labels on map tiles. Note that this parameter is only supported for some country tiles; if the specific language requested is not supported for the tile set, then the default language for that tileset will be used.

Parameters

language String
the language to set

isSensor

public boolean isSensor()
Specifies whether the application requesting the static map is using a sensor to determine the user’s location.

Returns

the sensor

setSensor

public void setSensor(boolean sensor)
Specifies whether the application requesting the static map is using a sensor to determine the user’s location.

Parameters

sensor boolean
the sensor to set