# Class GoogleMapsProvider

java.lang.Object
com.codename1.maps.providers.MapProvider
com.codename1.maps.providers.TiledProvider
com.codename1.maps.providers.GoogleMapsProvider

public class GoogleMapsProvider extends TiledProvider
This is a GoogleMaps Provider https://developers.google.com/maps/documentation/staticmaps/

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `HYBRID`
  This is a satellite + road map
  `static final int`
  `REGULAR`
  This is a regular road map
  `static final int`
  `SATELLITE`
  This is a satellite map

  ### Fields inherited from class TiledProvider

  `_url, _zoomLevel`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GoogleMapsProvider(String apiKey)`
  Google map provider Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `attribution()`
  The provider attribution.
  `String`
  `getLanguage()`
  Defines the language to use for display of labels on map tiles.
  `static int`
  `getTileSize()`

  ###### Returns

  `boolean`
  `isSensor()`
  Specifies whether the application requesting the static map is using a sensor to determine the user's location.
  `int`
  `maxZoomLevel()`
  Maximal zoom level.
  `void`
  `setLanguage(String language)`
  Defines the language to use for display of labels on map tiles.
  `void`
  `setMapType(int type)`
  Sets the map type
  `void`
  `setSensor(boolean sensor)`
  Specifies whether the application requesting the static map is using a sensor to determine the user's location.
  `static void`
  `setTileSize(int aTileSize)`

  ###### Parameters

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

  ### Methods inherited from class TiledProvider

  `bboxFor, scale, url`

  ### Methods inherited from class MapProvider

  `maxZoomFor, minZoomLevel, projection, tileSize, tileSize, translate`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### REGULAR

    public static final int REGULAR
    This is a regular road map
    See Also:
      - Constant Field Values

  - ### SATELLITE

    public static final int SATELLITE
    This is a satellite map
    See Also:
      - Constant Field Values

  - ### HYBRID

    public static final int HYBRID
    This is a satellite + road map
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### GoogleMapsProvider

    public GoogleMapsProvider(String apiKey)

    Google map provider Constructor

    ###### Parameters

    - `apiKey`: @param apiKey google maps api key https://developers.google.com/maps/documentation/staticmaps/#api_key

- ## Method Details

  - ### getTileSize

    public static int getTileSize()

    ###### Returns

    the tileSize

  - ### setTileSize

    public static void setTileSize(int aTileSize)

    ###### Parameters

    - `aTileSize`: 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.
    Specified by:
      `maxZoomLevel` in class `MapProvider`

  - ### attribution

    public String attribution()

    The provider attribution.

    ###### Returns

    a String of the provider attribution

    Specified by:
      `attribution` in class `MapProvider`

  - ### tileFor

    public Tile tileFor(BoundingBox bbox)

    Gets a tile for the given bounding box

    ###### Parameters

    - `bbox`: a bounding box

    ###### Returns

    a Tile for the given bounding box

    Overrides:
      `tileFor` in class `TiledProvider`

  - ### 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`: 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`: the sensor to set