Package com.navmii.sdk.search
Class GeocodingRequest.Builder
- java.lang.Object
-
- com.navmii.sdk.search.GeocodingRequest.Builder
-
- Enclosing class:
- GeocodingRequest
public static final class GeocodingRequest.Builder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_SEARCH_RADIUS
-
Constructor Summary
Constructors Constructor Description Builder(com.navmii.sdk.search.SearchManager.SearchManagerPrivate searchManagerPrivate, java.lang.String searchQuery, MapCoordinates searchLocation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Request
build()
GeocodingRequest.Builder
setCountryCodes(java.util.List<java.lang.String> countryCodes)
Limit search results to one or more countries.ConcreteBuilder
setLocale(java.lang.String locale)
ConcreteBuilder
setMaxResultCount(int maxResultCount)
GeocodingRequest.Builder
setSearchLocation(MapCoordinates searchLocation)
Sets the center of the circle where the search will be performed.GeocodingRequest.Builder
setSearchRadius(int searchRadius)
Sets the radius of the circle around the search location where the search will be performed.GeocodingRequest.Builder
setViewBox(MapRectangle viewBox)
Limit search results to the specified map rectangle.
-
-
-
Field Detail
-
DEFAULT_SEARCH_RADIUS
public static final int DEFAULT_SEARCH_RADIUS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Builder
public Builder(com.navmii.sdk.search.SearchManager.SearchManagerPrivate searchManagerPrivate, java.lang.String searchQuery, MapCoordinates searchLocation)
-
-
Method Detail
-
setCountryCodes
public GeocodingRequest.Builder setCountryCodes(java.util.List<java.lang.String> countryCodes)
Limit search results to one or more countries. Must be the ISO 3166-1alpha2 code. Example: country_codes=de,at- Returns:
- The builder.
-
setSearchLocation
public GeocodingRequest.Builder setSearchLocation(MapCoordinates searchLocation)
Sets the center of the circle where the search will be performed.Setting this option overrides the bounds set with
setViewBox(MapRectangle)
.- Parameters:
searchLocation
- The search location.- Returns:
- The builder.
-
setSearchRadius
public GeocodingRequest.Builder setSearchRadius(int searchRadius)
Sets the radius of the circle around the search location where the search will be performed.Setting this option overrides the bounds set with
setViewBox(MapRectangle)
.The default radius is 10000 meters.
- Parameters:
searchRadius
- The search radius.- Returns:
- The builder.
-
setViewBox
public GeocodingRequest.Builder setViewBox(MapRectangle viewBox)
Limit search results to the specified map rectangle.Setting this option overrides the bounds set with
setSearchLocation(MapCoordinates)
andsetSearchRadius(int)
.- Parameters:
viewBox
- The rectangle to use.- Returns:
- The builder.
-
build
public Request build()
-
setMaxResultCount
public ConcreteBuilder setMaxResultCount(int maxResultCount)
- Parameters:
maxResultCount
- The maximum number of search results.- Returns:
- The builder.
-
setLocale
public ConcreteBuilder setLocale(java.lang.String locale)
- Parameters:
locale
- The language used for results.- Returns:
- The builder.
-
-