Class GoogleMapsProvider

Google maps tile server.

The tile API is only available to select partners, and is not included with the Google Maps Core ServiceList.

API Reference

Hierarchy

Constructors

Properties

apiToken: string

Server API access token.

bounds: number[] = []

Map bounds.

center: number[] = []

Map center point.

format: string = 'png'

Map image tile format, the formats available are:

  • png PNG
  • jpg JPG
mapType: string = 'roadmap'

The type of base map. This can be one of the following:

  • roadmap: The standard Google Maps painted map tiles.
  • satellite: Satellite imagery.
  • terrain: Shaded relief maps of 3D terrain. When selecting terrain as the map type, you must also include the layerRoadmap layer type (described in the Optional fields section below).
  • streetview: Street View panoramas. See the Street View guide.
maxZoom: number = 20

Maximum tile level.

minZoom: number = 0

Minimum tile level.

name: string = ''

Name of the map provider

orientation: number = 0

The map orientation in degrees.

Can be 0, 90, 180 or 270.

overlay: boolean = false

If true overlays are shown.

sessionToken: string = null

After the first call a session token is stored.

The session token is required for subsequent requests for tile and viewport information.

Methods

  • Get a tile for the x, y, zoom based on the provider configuration.

    The tile should be returned as a image object, compatible with canvas context 2D drawImage() and with webgl texImage2D() method.

    Returns

    Promise with the image obtained for the tile ready to use.

    Parameters

    • zoom: number

      Zoom level.

    • x: number

      Tile x.

    • y: number

      Tile y.

    Returns Promise<any>

Generated using TypeDoc