Class GoogleMapsProvider

java.lang.Object

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
    This is a satellite + road map
    static final int
    This is a regular road map
    static final int
    This is a satellite map

    Fields inherited from class TiledProvider

    _url, _zoomLevel
  • Constructor Summary

    Constructors
    Constructor
    Description
    Google map provider Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    The provider attribution.
    Defines the language to use for display of labels on map tiles.
    static int
    Returns
    boolean
    Specifies whether the application requesting the static map is using a sensor to determine the user's location.
    int
    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
    Gets a tile for the given bounding box

    Methods inherited from class TiledProvider

    bboxFor, scale, url

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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