public class TextSearchRequest
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TextSearchRequest.Response |
PendingResult.Callback<T>
Modifier | Constructor and Description |
---|---|
protected |
TextSearchRequest(GeoApiContext context) |
Modifier and Type | Method and Description |
---|---|
T |
await()
Performs the 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.
|
A |
language(java.lang.String language)
The language in which to return results.
|
TextSearchRequest |
location(LatLng location)
location is the latitude/longitude around which to retrieve place information.
|
TextSearchRequest |
maxPrice(PlaceDetails.PriceLevel priceLevel)
maxPrice restricts to places that are at most this price level.
|
TextSearchRequest |
minPrice(PlaceDetails.PriceLevel priceLevel)
minPrice restricts to places that are at least this price level.
|
TextSearchRequest |
openNow(boolean openNow)
openNow returns only those places that are open for business at the time the query is sent.
|
TextSearchRequest |
pageToken(java.lang.String nextPageToken)
pageToken returns the next 20 results from a previously run search.
|
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() |
TextSearchRequest |
query(java.lang.String query)
query is the text string on which to search, for example: "restaurant".
|
TextSearchRequest |
radius(int radius)
radius defines the distance (in meters) within which to bias place results.
|
void |
setCallback(PendingResult.Callback<T> callback)
Performs the request asynchronously, calling onResult or onFailure after
the request has been completed.
|
protected void |
validateRequest() |
protected TextSearchRequest(GeoApiContext context)
public TextSearchRequest query(java.lang.String query)
public TextSearchRequest location(LatLng location)
public TextSearchRequest radius(int radius)
public TextSearchRequest minPrice(PlaceDetails.PriceLevel priceLevel)
public TextSearchRequest maxPrice(PlaceDetails.PriceLevel priceLevel)
public TextSearchRequest openNow(boolean openNow)
public TextSearchRequest pageToken(java.lang.String nextPageToken)
protected void validateRequest()
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"public A channel(java.lang.String channel)
channel
- String to pass with the request for analytics