PendingResult<GeocodingResult[]>public class GeocodingApiRequest
extends java.lang.Object
PendingResult.Callback<T>| Constructor | Description | 
|---|---|
GeocodingApiRequest(GeoApiContext context) | 
| Modifier and Type | Method | Description | 
|---|---|---|
GeocodingApiRequest | 
address(java.lang.String address) | 
 Creates a forward geocode for  
address. | 
T | 
await() | 
 Performs the request synchronously. 
 | 
T | 
awaitIgnoreError() | 
 Performs the request synchronously, ignoring exceptions while performing the request and errors
 returned by the server. 
 | 
GeocodingApiRequest | 
bounds(LatLng southWestBound,
      LatLng northEastBound) | 
 Sets the bounding box of the viewport within which to bias geocode results more prominently. 
 | 
void | 
cancel() | 
 Attempts to cancel the request. 
 | 
A | 
channel(java.lang.String channel) | 
 A channel to pass with the request. 
 | 
GeocodingApiRequest | 
components(ComponentFilter... filters) | 
 Sets the component filters. 
 | 
A | 
custom(java.lang.String parameter,
      java.lang.String value) | 
 Custom parameter. 
 | 
A | 
language(java.lang.String language) | 
 The language in which to return results. 
 | 
GeocodingApiRequest | 
latlng(LatLng latlng) | 
 Creates a reverse geocode for  
latlng. | 
GeocodingApiRequest | 
locationType(LocationType... locationTypes) | 
 Sets the location type. 
 | 
protected A | 
param(java.lang.String key,
     int val) | 
|
protected A | 
param(java.lang.String key,
     com.google.maps.internal.StringJoin.UrlValue val) | 
|
protected A | 
param(java.lang.String key,
     java.lang.String val) | 
|
protected A | 
paramAddToList(java.lang.String key,
              com.google.maps.internal.StringJoin.UrlValue val) | 
|
protected A | 
paramAddToList(java.lang.String key,
              java.lang.String val) | 
|
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> | 
params() | 
|
GeocodingApiRequest | 
place(java.lang.String placeId) | 
 Creates a forward geocode for  
placeId. | 
GeocodingApiRequest | 
region(java.lang.String region) | 
 Sets the region code, specified as a ccTLD ("top-level domain") two-character value. 
 | 
GeocodingApiRequest | 
resultType(AddressType... resultTypes) | 
 Sets the result type. 
 | 
void | 
setCallback(PendingResult.Callback<T> callback) | 
|
protected void | 
validateRequest() | 
public GeocodingApiRequest(GeoApiContext context)
protected void validateRequest()
public GeocodingApiRequest address(java.lang.String address)
address.address - The address to geocode.GeocodingApiRequest for call chaining.public GeocodingApiRequest place(java.lang.String placeId)
placeId.placeId - The Place ID to geocode.GeocodingApiRequest for call chaining.public GeocodingApiRequest latlng(LatLng latlng)
latlng.latlng - The location to reverse geocode.GeocodingApiRequest for call chaining.public GeocodingApiRequest bounds(LatLng southWestBound, LatLng northEastBound)
For more information see Viewport Biasing.
southWestBound - The South West bound of the bounding box.northEastBound - The North East bound of the bounding box.GeocodingApiRequest for call chaining.public GeocodingApiRequest region(java.lang.String region)
For more information see Region Biasing.
region - The region code to influence results.GeocodingApiRequest for call chaining.public GeocodingApiRequest components(ComponentFilter... filters)
For more information see Component Filtering.
filters - Component filters to apply to the request.GeocodingApiRequest for call chaining.public GeocodingApiRequest resultType(AddressType... resultTypes)
resultTypes - The result types to restrict to.GeocodingApiRequest for call chaining.public GeocodingApiRequest locationType(LocationType... locationTypes)
locationTypes - The location types to restrict to.GeocodingApiRequest for call chaining.public final void setCallback(PendingResult.Callback<T> callback)
PendingResultonResult or onFailure after the request has been
 completed.setCallback in interface PendingResult<T>callback - The callback to call on completion.public final T await()
              throws ApiException,
                     java.lang.InterruptedException,
                     java.io.IOException
PendingResultawait in interface PendingResult<T>ApiException - Thrown if the API Returned result is an error.java.lang.InterruptedException - Thrown when a thread is waiting, sleeping, or otherwise occupied,
     and the thread is interrupted.java.io.IOException - Thrown when an I/O exception of some sort has occurred.public final T awaitIgnoreError()
PendingResultawaitIgnoreError in interface PendingResult<T>public final void cancel()
PendingResultcancel in interface PendingResult<T>protected A param(java.lang.String key,
                  java.lang.String val)
protected A param(java.lang.String key,
                  int val)
protected A param(java.lang.String key,
                  com.google.maps.internal.StringJoin.UrlValue val)
protected A paramAddToList(java.lang.String key,
                           java.lang.String val)
protected A paramAddToList(java.lang.String key,
                           com.google.maps.internal.StringJoin.UrlValue val)
protected java.util.Map<java.lang.String,java.util.List<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 analytics.public A custom(java.lang.String parameter,
                java.lang.String value)
parameter - The name of the custom parameter.value - The value of the custom parameter.