Module: async-google-maps/map-loader

Members

(static) loaded

Properties:
Name Type Description
loaded Promise

A reference to a promise that is resolved once the google maps API is ready.

Source:

Methods

(static) create(mapContainer, options) → {Promise}

Creates a map instance given the supplied options. The options will be passed into the google.maps.Map constructor, therefore, all options from the google maps api can be used. This function returns a promise which will be resolved once the newly created map instance is in the idle state, which is the point at which overlays, markers, and geometries can be added to the map.

Parameters:
Name Type Description
mapContainer

The element to attach the map instance to

options

Options passed to the google Map constructor

Source:
Returns:
Type
Promise

(static) load(options) → {Promise}

Asynchronously loads the google maps javascript library, given the supplied options. Returns a promise that will be resolved once the google maps loader has finished. Once the promise resolves, it is safe to reference anything under the google.maps namespace. This method should only be called once for a given application.

Parameters:
Name Type Description
options Object

The configuration used to load the google maps API

Properties
Name Type Description
version string

The version of the google maps API to load

key string

The API key of the consuming application

Source:
Returns:
Type
Promise