public static class PlaceSearchRequestParams.Builder
extends java.lang.Object
PlaceSearchRequestParams| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
PlaceSearchRequestParams.Builder |
addCategory(java.lang.String category)
Add a place category to restrict the search results.
|
PlaceSearchRequestParams.Builder |
addField(java.lang.String field)
Add a place information field to the list of fields to be returned.
|
PlaceSearchRequestParams |
build()
Returns the
PlaceSearchRequestParams. |
PlaceSearchRequestParams.Builder |
setDistance(int distance)
Sets the maximum search radius in meters.
|
PlaceSearchRequestParams.Builder |
setLimit(int limit)
Sets the maximum number of places to be returned.
|
PlaceSearchRequestParams.Builder |
setSearchText(java.lang.String searchText)
Sets the name of the place to search for.
|
public PlaceSearchRequestParams.Builder setDistance(int distance)
PlaceManager.newPlaceSearchRequest()
is used, then this parameter defines the maximum search radius around the current device
location. If PlaceManager.newPlaceSearchRequestForLocation() is used, then this
parameter defines the maximum search radius around the specified location.distance - The maximum distance in meters.public PlaceSearchRequestParams.Builder setLimit(int limit)
limit - The maximum number of places to return.public PlaceSearchRequestParams.Builder setSearchText(java.lang.String searchText)
searchText - The name of the place to search for.public PlaceSearchRequestParams.Builder addCategory(java.lang.String category)
category - The name of the place category to add as a filter.public PlaceSearchRequestParams.Builder addField(java.lang.String field)
PlaceFields for a list of fields. Refer to the online Places Graph
documentation for the current list of supported fields.field - The field to be returned in the place search response.public PlaceSearchRequestParams build()
PlaceSearchRequestParams.PlaceSearchRequestParams.