public class GeocodingApiRequest
extends java.lang.Object
PendingResult.Callback<T>
Constructor and Description |
---|
GeocodingApiRequest(GeoApiContext context) |
Modifier and Type | Method and Description |
---|---|
GeocodingApiRequest |
address(java.lang.String address)
Create 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)
Set the bounding box of the viewport within which to bias geocode results more prominently.
|
void |
cancel()
Attempt to cancel the request.
|
GeocodingApiRequest |
components(GeocodingApi.ComponentFilter... filters)
Set the component filters.
|
A |
language(java.lang.String language)
The language in which to return results.
|
GeocodingApiRequest |
latlng(LatLng latlng)
Create a reverse geocode for
latlng . |
GeocodingApiRequest |
locationType(LocationType... locationTypes)
Set the location type.
|
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() |
GeocodingApiRequest |
place(java.lang.String placeId)
Create a forward geocode for
placeId . |
GeocodingApiRequest |
region(java.lang.String region)
Set the region code, specified as a ccTLD ("top-level domain") two-character value.
|
GeocodingApiRequest |
resultType(AddressType... resultTypes)
Set the result type.
|
void |
setCallback(PendingResult.Callback<T> callback)
Performs the request asynchronously, calling onResult or onFailure after
the request has been completed.
|
protected void |
validateRequest() |
public GeocodingApiRequest(GeoApiContext context)
protected void validateRequest()
public GeocodingApiRequest address(java.lang.String address)
address
.public GeocodingApiRequest place(java.lang.String placeId)
placeId
.public GeocodingApiRequest latlng(LatLng latlng)
latlng
.public GeocodingApiRequest bounds(LatLng southWestBound, LatLng northEastBound)
For more information see Viewports documentation.
public GeocodingApiRequest region(java.lang.String region)
For more information see Region Codes.
public GeocodingApiRequest components(GeocodingApi.ComponentFilter... filters)
For more information see Component Filtering.
public GeocodingApiRequest resultType(AddressType... resultTypes)
public GeocodingApiRequest locationType(LocationType... locationTypes)
public final void setCallback(PendingResult.Callback<T> callback)
PendingResult
setCallback
in interface PendingResult<T>
public final T await() throws java.lang.Exception
PendingResult
await
in interface PendingResult<T>
java.lang.Exception
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"