google-maps-documentation

AutocompletePrediction interface

google.maps.places.AutocompletePrediction interface

Represents a single autocomplete prediction.

Library

places

Properties
description
Type:  string
This is the unformatted version of the query suggested by the Places service.
distance_meters
Type:  number optional
The distance in meters of the place from the AutocompletionRequest.origin.
matched_substrings
Type:  Array<PredictionSubstring>
A set of substrings in the place's description that match elements in the user's input, suitable for use in highlighting those substrings. Each substring is identified by an offset and a length, expressed in unicode characters.
place_id
Type:  string
A place ID that can be used to retrieve details about this place using the place details service (see PlacesService.getDetails).
structured_formatting
Structured information about the place's description, divided into a main text and a secondary text, including an array of matched substrings from the autocomplete input, identified by an offset and a length, expressed in unicode characters.
terms
Type:  Array<PredictionTerm>
Information about individual terms in the above description, from most to least specific. For example, "Taco Bell", "Willitis", and "CA".
types
Type:  Array<string>
An array of types that the prediction belongs to, for example 'establishment' or 'geocode'.