public abstract class GeocodingRequest extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
GeocodingRequest() |
Modifier and Type | Method and Description |
---|---|
abstract String |
getCountryCode()
An optional ISO 3166 alpha 3 country code used to filter results.
|
abstract String |
getLanguageCode()
The ISO 639-1 language code for the preferred language of the results.
|
abstract LatLng |
getLocation()
The location around which to search for results.
|
abstract String |
getQuery()
The search query.
|
abstract Collection<GeocodingResult.Type> |
getResultTypes()
The result types to obtain.
|
static GeocodingRequest |
newForwardRequest(String query,
LatLng location)
Creates a new forward geocoding request with the given query, around the given location.
|
static GeocodingRequest |
newForwardRequest(String query,
LatLng location,
String languageCode)
Creates a new forward geocoding request with the given query, around the given location, in
the given preferred language.
|
static GeocodingRequest |
newForwardRequest(String query,
LatLng location,
String countryCode,
String languageCode,
Collection<GeocodingResult.Type> resultTypes)
Creates a new forward geocoding request with the given query, around the given location, in
the given country, requesting results of the given types.
|
static GeocodingRequest |
newPlacesAroundRequest(LatLng location)
Creates a request for places around the given location.
|
static GeocodingRequest |
newPlacesAroundRequest(LatLng location,
String languageCode)
Creates a request for places around the given location, in the given preferred language.
|
static GeocodingRequest |
newReverseRequest(LatLng location)
Creates a reverse geocoding request for the address at the given location.
|
static GeocodingRequest |
newReverseRequest(LatLng location,
String languageCode)
Creates a reverse geocoding request for the address at the given location, in the given
preferred language.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
describeContents, writeToParcel
public static GeocodingRequest newForwardRequest(String query, LatLng location, String countryCode, String languageCode, Collection<GeocodingResult.Type> resultTypes)
query
- The search query itself; must not be null
or empty.location
- The location around which to search for resultscountryCode
- ISO 3166-1 alpha 3 country to code used filter resultslanguageCode
- ISO 639-1 language code for the preferred language of the resultsresultTypes
- The result types to obtainpublic static GeocodingRequest newForwardRequest(String query, LatLng location, String languageCode)
query
- The search query itself; may not be null
or empty.location
- The location around which to search for resultslanguageCode
- ISO 639-1 language code for the preferred language of the resultspublic static GeocodingRequest newForwardRequest(String query, LatLng location)
query
- The search query itself; must not be null
or empty.location
- The location around which to search for resultspublic static GeocodingRequest newReverseRequest(LatLng location, String languageCode)
location
- The location whose address to returnlanguageCode
- ISO 639-1 language code for the preferred language of the resultspublic static GeocodingRequest newReverseRequest(LatLng location)
public static GeocodingRequest newPlacesAroundRequest(LatLng location, String languageCode)
location
- The location around which to look for placeslanguageCode
- ISO 639-1 language code for the preferred language of the resultspublic static GeocodingRequest newPlacesAroundRequest(LatLng location)
public abstract String getQuery()
public abstract LatLng getLocation()
public abstract String getCountryCode()
public abstract String getLanguageCode()
public abstract Collection<GeocodingResult.Type> getResultTypes()