GoogleMapsLoader Class
Constructor
Methods
load
-
parameters
Loads the Google Maps JavaScript API through JSONP. Does nothing if this object has already loaded it.
Parameters:
-
parameters
ObjectAn optional object with the following optional properties:
- client
- This is your client id when using Google Maps API for Business.
- language
- The language code to override the browser's default language.
- libraries
- An array or comma separated string of library names.
- key
- This is your Google Maps v3 API key.
- region
- A Unicode region subtag identifier to override the default region.
- sensor
- Set this to a truthy value if your application determines the user's location via a sensor.
- source
- Location of the Google Maps JavaScript API to override the attribute.
- timeout
- Timeout in milliseconds to override the attribute.
- version
- The version of the Google Maps JavaScript API to load.
If other properties not listed here are included in the parameters object, they will also be included the the Google Maps API request.
Attributes
loaded
Boolean
Default: false
Fires event loadedChange
Fires when the value for the configuration attribute loaded
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
source
String
The location of the Google Maps JavaScrpt API.
Default: 'http://maps.google.com/maps/api/js'
Fires event sourceChange
Fires when the value for the configuration attribute source
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
timeout
Number
The timeout in milliseconds used by JSONP.
Default: 30000
Fires event timeoutChange
Fires when the value for the configuration attribute timeout
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
Events
failure
Fired when JSONP fails.
success
Fired when JSONP succeeds.
timeout
Fired when JSONP times out.