Class: GoogleMapsAutocompleter

GoogleMapsAutocompleter()

Integrate with the Google Maps Places Autocomplete API using the Google Maps AutocompleteService JS library.

Constructor

new GoogleMapsAutocompleter()

Since:
  • 2.28.0
Source:

Members

autocompleter

Google Maps service for interacting with the Places Autocomplete API.
Source:

Methods

autocomplete(input) → {Array.<Prediction>}

Use the Google Maps Places API to get place predictions based off of a user input string as the user types.
Parameters:
Name Type Description
input string User input to search for Google Maps places.
Source:
Returns:
An array of places that could be the result the user is looking for. Most often this comes in five or less results.
Type
Array.<Prediction>

getPredictionsFromResults(List) → {Array.<Prediction>}

Helper function that converts a Google Maps Autocomplete API result into a useable Prediction model.
Parameters:
Name Type Description
List Array.<Object> of Google Maps Autocomplete API results.
Source:
Returns:
List of corresponding predictions.
Type
Array.<Prediction>