It's the 15th anniversary of Google Maps Platform!   Check out the latest news and announcements.

FindAutocompletePredictionsRequest

public abstract class FindAutocompletePredictionsRequest extends Object
implements Request

Nested Class Summary

class FindAutocompletePredictionsRequest.Builder Builder for FindAutocompletePredictionsRequest

Public Constructor Summary

Public Method Summary

static FindAutocompletePredictionsRequest.Builder
abstract CancellationToken
getCancellationToken()
Returns the CancellationToken used by PlacesClient to cancel any queued requests.
abstract List<String>
getCountries()
Returns a list of countries to which results will be restricted.
String
getCountry()
Returns the country to which results will be restricted.
abstract LocationBias
getLocationBias()
Returns the location bias applied for autocomplete predictions.
abstract LocationRestriction
getLocationRestriction()
Returns the location restriction applied for autocomplete predictions.
abstract LatLng
getOrigin()
Returns the location where getDistanceMeters() is calculated from.
abstract String
getQuery()
Returns the user query string used to generate autocomplete predictions.
abstract AutocompleteSessionToken
getSessionToken()
Returns the AutocompleteSessionToken for this request.
abstract TypeFilter
getTypeFilter()
Returns the filter used to restrict the type of the results returned.
static FindAutocompletePredictionsRequest

Inherited Method Summary

Public Constructors

public FindAutocompletePredictionsRequest ()

Public Methods

public abstract CancellationToken getCancellationToken ()

Returns the CancellationToken used by PlacesClient to cancel any queued requests.

public abstract List<String> getCountries ()

Returns a list of countries to which results will be restricted. See setCountries(List) for details.

public String getCountry ()

Returns the country to which results will be restricted.

This should be a ISO 3166-1 Alpha-2 country code (case insensitive). If null or empty, country restrictions will not be applied.

Throws
UnsupportedOperationException if multiple countries were set on this request.

public abstract LocationBias getLocationBias ()

Returns the location bias applied for autocomplete predictions. See setLocationBias(LocationBias) for details.

public abstract LocationRestriction getLocationRestriction ()

Returns the location restriction applied for autocomplete predictions. See setLocationRestriction(LocationRestriction) for details.

public abstract LatLng getOrigin ()

Returns the location where getDistanceMeters() is calculated from. If null, no distances will be included in the response.

public abstract String getQuery ()

Returns the user query string used to generate autocomplete predictions. If null or empty, no predictions will be included in the response.

public abstract AutocompleteSessionToken getSessionToken ()

Returns the AutocompleteSessionToken for this request.

public abstract TypeFilter getTypeFilter ()

Returns the filter used to restrict the type of the results returned.

public static FindAutocompletePredictionsRequest newInstance (String query)

Parameters
query