Interface: GoogleMapsClient

GoogleMapsClient

The client object returned by the createClient() method.
Source:

Methods

.directions(query, callback) → {RequestHandle}

Makes a directions request.
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
origin LatLng
destination LatLng
mode string <optional>
waypoints Array.<LatLng> <optional>
alternatives boolean <optional>
avoid Array.<string> <optional>
language string <optional>
units string <optional>
region string <optional>
departure_time Date | number <optional>
arrival_time Date | number <optional>
traffic_model string <optional>
transit_mode Array.<string> <optional>
transit_routing_preference string <optional>
optimize boolean <optional>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.distanceMatrix(query, callback) → {RequestHandle}

Makes a distance matrix request.
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
origins Array.<LatLng>
destinations Array.<LatLng>
mode string <optional>
language string <optional>
avoid Array.<string> <optional>
units string <optional>
departure_time Date | number <optional>
arrival_time Date | number <optional>
transit_mode Array.<string> <optional>
transit_routing_preference string <optional>
traffic_model string <optional>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.elevation(query, callback) → {RequestHandle}

Makes an elevation request.
Parameters:
Name Type Description
query Object
Properties
Name Type Description
locations Array.<LatLng>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.elevationAlongPath(query, callback) → {RequestHandle}

Makes an elevation-along-path request.
Parameters:
Name Type Description
query Object
Properties
Name Type Description
path Array.<LatLng> | string
samples number
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.findPlace(query, callback) → {RequestHandle}

A Find Place request takes a text input, and returns a place. The text input can be any kind of Places data, for example, a name, address, or phone number.
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
input string
inputtype string
language string <optional>
fields Array.<string> <optional>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.geocode(query, callback) → {RequestHandle}

Makes a geocode request.
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
address string <optional>
components Object <optional>
bounds Object <optional>
Properties
Name Type Description
south number
west number
north number
east number
region string <optional>
language string <optional>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.geolocate(query, callback) → {RequestHandle}

Makes a geolocation request. For a detailed guide, see https://developers.google.com/maps/documentation/geolocation/intro
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
homeMobileCountryCode number <optional>
homeMobileNetworkCode number <optional>
radioType string <optional>
carrier string <optional>
considerIp boolean <optional>
cellTowers Array.<Object> <optional>
wifiAccessPoints Array.<Object> <optional>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.nearestRoads(query, callback) → {RequestHandle}

Makes a nearest roads request.
Parameters:
Name Type Description
query Object
Properties
Name Type Description
points Array.<LatLng>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.place(query, callback) → {RequestHandle}

Makes a place detail request.
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
placeid string
sessiontoken string <optional>
language string <optional>
fields Array.<string> <optional>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.places(query, callback) → {RequestHandle}

Makes a places request.
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
query string
language string <optional>
location LatLng <optional>
radius number <optional>
minprice number <optional>
maxprice number <optional>
opennow boolean <optional>
type string <optional>
pagetoken string <optional>
region string <optional>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.placesAutoComplete(query, callback) → {RequestHandle}

Makes a places autocomplete request.
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
input string
sessiontoken string
offset number <optional>
location LatLng <optional>
language string <optional>
radius number <optional>
types string <optional>
components Array.<string> <optional>
strictbounds boolean <optional>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.placesNearby(query, callback) → {RequestHandle}

Makes a nearby places request.
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
location LatLng
language string <optional>
radius number <optional>
keyword string <optional>
minprice number <optional>
maxprice number <optional>
name string <optional>
opennow boolean <optional>
rankby string <optional>
Either 'prominence' or 'distance'
type string <optional>
pagetoken string <optional>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.placesPhoto(query, callback) → {RequestHandle}

Makes a place photos request.
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
photoreference string
maxwidth number <optional>
maxheight number <optional>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.placesQueryAutoComplete(query, callback) → {RequestHandle}

Makes a places query autocomplete request.
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
input string
offset number <optional>
location LatLng <optional>
language string <optional>
radius number <optional>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.placesRadar(query, callback) → {RequestHandle}

Makes a places radar search request.
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
location LatLng
radius number
language string <optional>
keyword string <optional>
minprice number <optional>
maxprice number <optional>
name string <optional>
opennow boolean <optional>
type string <optional>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.reverseGeocode(query, callback) → {RequestHandle}

Makes a reverse geocode request.
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
latlng LatLng <optional>
place_id string <optional>
result_type string <optional>
location_type string <optional>
language string <optional>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.snappedSpeedLimits(query, callback) → {RequestHandle}

Makes a speed-limits request for a path.
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
path Array.<LatLng>
units string <optional>
Either 'KPH' or 'MPH'
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.snapToRoads(query, callback) → {RequestHandle}

Makes a snap-to-roads request.
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
path Array.<LatLng>
interpolate boolean <optional>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.speedLimits(query, callback) → {RequestHandle}

Makes a speed-limits request for a place ID. For speed-limits requests using a path parameter, use the snappedSpeedLimits method.
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
placeId Array.<string>
units string <optional>
Either 'KPH' or 'MPH'
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle

.timezone(query, callback) → {RequestHandle}

Makes a timezone request.
Parameters:
Name Type Description
query Object
Properties
Name Type Attributes Description
location LatLng
timestamp Date | number <optional>
language string <optional>
callback ResponseCallback Callback function for handling the result
Source:
Returns:
Type
RequestHandle