public class PlaceAutocompleteRequest
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PlaceAutocompleteRequest.Response |
PendingResult.Callback<T>
Modifier | Constructor and Description |
---|---|
protected |
PlaceAutocompleteRequest(GeoApiContext context) |
Modifier and Type | Method and Description |
---|---|
T |
await()
Performs the GET request synchronously.
|
T |
awaitIgnoreError()
Performs the request synchronously, ignoring exceptions while performing the request and errors
returned by the server.
|
void |
cancel()
Attempt to cancel the request.
|
A |
channel(java.lang.String channel)
A channel to pass with the request.
|
PlaceAutocompleteRequest |
components(ComponentFilter... filters)
Components is a grouping of places to which you would like to restrict your results.
|
A |
custom(java.lang.String parameter,
java.lang.String value)
Custom parameter.
|
PlaceAutocompleteRequest |
input(java.lang.String input)
input is the text string on which to search.
|
A |
language(java.lang.String language)
The language in which to return results.
|
PlaceAutocompleteRequest |
location(LatLng location)
location is the point around which you wish to retrieve place information.
|
PlaceAutocompleteRequest |
offset(int offset)
offset is the character position in the input term at which the service uses text for
predictions.
|
protected A |
param(java.lang.String key,
java.lang.String val) |
protected A |
param(java.lang.String key,
com.google.maps.internal.StringJoin.UrlValue val) |
protected java.util.Map<java.lang.String,java.lang.String> |
params() |
PlaceAutocompleteRequest |
radius(int radius)
radius is the distance (in meters) within which to return place results.
|
void |
setCallback(PendingResult.Callback<T> callback)
Performs the request asynchronously, calling onResult or onFailure after the request has been
completed.
|
PlaceAutocompleteRequest |
type(PlaceAutocompleteType type)
type restricts the results to places matching the specified type.
|
protected void |
validateRequest() |
protected PlaceAutocompleteRequest(GeoApiContext context)
public PlaceAutocompleteRequest input(java.lang.String input)
public PlaceAutocompleteRequest offset(int offset)
public PlaceAutocompleteRequest location(LatLng location)
public PlaceAutocompleteRequest radius(int radius)
public PlaceAutocompleteRequest type(PlaceAutocompleteType type)
public PlaceAutocompleteRequest components(ComponentFilter... filters)
protected void validateRequest()
public final void setCallback(PendingResult.Callback<T> callback)
PendingResult
setCallback
in interface PendingResult<T>
public final T await() throws ApiException, java.lang.InterruptedException, java.io.IOException
PendingResult
await
in interface PendingResult<T>
ApiException
java.lang.InterruptedException
java.io.IOException
public final T awaitIgnoreError()
PendingResult
awaitIgnoreError
in interface PendingResult<T>
public final void cancel()
PendingResult
cancel
in interface PendingResult<T>
protected A param(java.lang.String key, java.lang.String val)
protected A param(java.lang.String key, com.google.maps.internal.StringJoin.UrlValue val)
protected java.util.Map<java.lang.String,java.lang.String> params()
public final A language(java.lang.String language)
language
- The language code, e.g. "en-AU" or "es"public A channel(java.lang.String channel)
channel
- String to pass with the request for analyticspublic A custom(java.lang.String parameter, java.lang.String value)