public class NearbySearchRequest
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
NearbySearchRequest.Response |
PendingResult.Callback<T>
Constructor and Description |
---|
NearbySearchRequest(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.
|
A |
custom(java.lang.String parameter,
java.lang.String value)
Custom parameter.
|
NearbySearchRequest |
keyword(java.lang.String keyword)
keyword is a term to be matched against all content that Google has indexed for this place,
including but not limited to name, type, and address, as well as customer reviews and other
third-party content.
|
A |
language(java.lang.String language)
The language in which to return results.
|
NearbySearchRequest |
location(LatLng location)
location is the latitude/longitude around which to retrieve place information.
|
NearbySearchRequest |
maxPrice(PriceLevel priceLevel)
maxPrice restricts to places that are at most this price level.
|
NearbySearchRequest |
minPrice(PriceLevel priceLevel)
minPrice restricts to places that are at least this price level.
|
NearbySearchRequest |
name(java.lang.String name)
name is one or more terms to be matched against the names of places, separated with a space
character.
|
NearbySearchRequest |
openNow(boolean openNow)
openNow returns only those places that are open for business at the time the query is sent.
|
NearbySearchRequest |
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() |
NearbySearchRequest |
radius(int distance)
radius defines the distance (in meters) within which to return place results.
|
NearbySearchRequest |
rankby(RankBy ranking)
rankby specifies the order in which results are listed.
|
void |
setCallback(PendingResult.Callback<T> callback)
Performs the request asynchronously, calling onResult or onFailure after the request has been
completed.
|
NearbySearchRequest |
type(PlaceType... types)
type restricts the results to places matching the specified type.
|
NearbySearchRequest |
type(PlaceType type)
type restricts the results to places matching the specified type.
|
protected void |
validateRequest() |
public NearbySearchRequest(GeoApiContext context)
public NearbySearchRequest location(LatLng location)
public NearbySearchRequest radius(int distance)
public NearbySearchRequest rankby(RankBy ranking)
public NearbySearchRequest keyword(java.lang.String keyword)
public NearbySearchRequest minPrice(PriceLevel priceLevel)
public NearbySearchRequest maxPrice(PriceLevel priceLevel)
public NearbySearchRequest name(java.lang.String name)
public NearbySearchRequest openNow(boolean openNow)
public NearbySearchRequest pageToken(java.lang.String nextPageToken)
public NearbySearchRequest type(PlaceType type)
public NearbySearchRequest type(PlaceType... types)
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)