public class RadarSearchRequest
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RadarSearchRequest.Response |
PendingResult.Callback<T>
Modifier | Constructor and Description |
---|---|
protected |
RadarSearchRequest(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()
Attempts 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.
|
RadarSearchRequest |
keyword(java.lang.String keyword)
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.
|
RadarSearchRequest |
location(LatLng location)
The latitude/longitude around which to retrieve place information.
|
RadarSearchRequest |
maxPrice(PriceLevel priceLevel)
Restricts to places that are at most this price level.
|
RadarSearchRequest |
minPrice(PriceLevel priceLevel)
Restricts to places that are at least this price level.
|
RadarSearchRequest |
name(java.lang.String name)
One or more terms to be matched against the names of places, separated with space characters.
|
RadarSearchRequest |
openNow(boolean openNow)
Restricts the results to only those places that are open for business at the time the query is
sent.
|
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() |
RadarSearchRequest |
radius(int distance)
The distance (in meters) within which to return place results.
|
void |
setCallback(PendingResult.Callback<T> callback)
|
RadarSearchRequest |
type(PlaceType type)
Restricts the results to places matching the specified type.
|
protected void |
validateRequest() |
protected RadarSearchRequest(GeoApiContext context)
public RadarSearchRequest location(LatLng location)
location
- The location around which to search.RadarSearchRequest
for call chaining.public RadarSearchRequest radius(int distance)
distance
- The radius distance to restrict results.RadarSearchRequest
for call chaining.public RadarSearchRequest keyword(java.lang.String keyword)
keyword
- The keyword to search for.RadarSearchRequest
for call chaining.public RadarSearchRequest minPrice(PriceLevel priceLevel)
priceLevel
- The minimum price level to restrict results with.RadarSearchRequest
for call chaining.public RadarSearchRequest maxPrice(PriceLevel priceLevel)
priceLevel
- The maximum price level to restrict results with.RadarSearchRequest
for call chaining.public RadarSearchRequest name(java.lang.String name)
name
- The name to restrict results with.RadarSearchRequest
for call chaining.public RadarSearchRequest openNow(boolean openNow)
openNow
- Whether to restrict to results that are open now.RadarSearchRequest
for call chaining.public RadarSearchRequest type(PlaceType type)
type
- The Place Type to restrict results to.RadarSearchRequest
for call chaining.protected void validateRequest()
public final void setCallback(PendingResult.Callback<T> callback)
PendingResult
onResult
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
PendingResult
await
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()
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.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.