Class PlaceOptions.Builder
java.lang.Object
com.trimblemaps.mapsdk.plugins.places.autocomplete.model.PlaceOptions.Builder
- Enclosing class:
PlaceOptions
Build a new instance of the
PlaceOptions class using this inner builder class.- Since:
- 0.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddInjectedFeature(com.trimblemaps.api.geocoding.v1.models.TrimbleMapsLocation carmenFeature) Optionally injectTrimbleMapsLocations into the suggestion view so users can access points of interest quickly without typing a single character.build()Build a new instance of thePlaceOptionsclass using the characteristics set in thisPlaceOptions.Builder.abstract PlaceOptions.Buildercenter(com.trimblemaps.geojson.Point center) The current longitude and latitude, where longitude and latitude are either decimal or integer coordinates.abstract PlaceOptions.BuilderLimit results to one or more countries by passing in a locale.abstract PlaceOptions.BuildercountryType(String countryType) abstract PlaceOptions.BuildercustomizedCategories(List<Integer> customizedCategoryIds) abstract PlaceOptions.BuilderexcludeResultsFor(String excludeResultsFor) excludeResultsFor(String[] types) abstract PlaceOptions.BuilderfocusSearchImmediately(boolean focusSearchImmediately) Should focus search bar immediatelyabstract PlaceOptions.BuildergetAllHouseNumberRanges(Boolean getAllHouseNumberRanges) abstract PlaceOptions.Builderabstract PlaceOptions.BuilderhideMenuIcon(boolean hideMenuIcon) Should hide the menu iconabstract PlaceOptions.BuilderOptionally set the hint string which is shown before the user inputs a search term inside the top edit text.abstract PlaceOptions.BuilderhistoryCount(Integer historyCount) Limit the number of past search results shown.abstract PlaceOptions.Builderabstract PlaceOptions.BuilderincludeOnly(String includeOnly) includeOnly(String[] types) abstract PlaceOptions.BuilderincludeTrimblePlaceIds(Boolean includeTrimblePlaceIds) abstract PlaceOptions.Builderabstract PlaceOptions.BuildermatchNamedRoadsOnly(Boolean matchNamedRoadsOnly) abstract PlaceOptions.BuildermaxCleanupMiles(Double maxCleanupMiles) abstract PlaceOptions.BuildermaxResults(Integer maxResults) Limits search results by the specified numberabstract PlaceOptions.BuilderpoiCategories(String poiCategories) poiCategories(String[] poiCategories) abstract PlaceOptions.BuilderseparateHouseNumber(Boolean separateHouseNumber) abstract PlaceOptions.BuildershowDwellTimes(boolean show) abstract PlaceOptions.BuildershowPlaceDetails(boolean show) abstract PlaceOptions.BuildershowPoiCategories(boolean showPoiCategories) Should show the POI categoriesabstract PlaceOptions.Builderabstract PlaceOptions.BuilderstatusbarColor(int statusbarColor) Set the autocomplete's layout status bar color.abstract PlaceOptions.BuilderuseCustomPlaces(Boolean useCustomPlaces) abstract PlaceOptions.BuilderviewMode(int mode)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
showPoiCategories
Should show the POI categories- Parameters:
showPoiCategories- true to show the POI categories, otherwise false- Returns:
- this builder for chaining options together
-
hideMenuIcon
Should hide the menu icon- Parameters:
hideMenuIcon- true to hide the menu icon, otherwise false- Returns:
- this builder for chaining options together
-
focusSearchImmediately
Should focus search bar immediately- Parameters:
focusSearchImmediately- true to focus immediately, otherwise false- Returns:
- this builder for chaining options together
-
maxResults
Limits search results by the specified number- Parameters:
maxResults- Must be a value between 1 and 100- Returns:
- this builder for chaining options together
-
center
The current longitude and latitude, where longitude and latitude are either decimal or integer coordinates.- Parameters:
center-- Returns:
- this builder for chaining options together
-
excludeResultsFor
-
excludeResultsFor
-
includeOnly
-
includeOnly
-
poiCategories
-
poiCategories
-
countries
-
country
Limit results to one or more countries by passing in a locale.- Parameters:
country- a locale you are limiting the geocoder responses to- Returns:
- this builder instance for chaining options together
- Since:
- 0.1.0
-
countries
-
countryType
-
states
-
states
-
include
-
useCustomPlaces
-
separateHouseNumber
-
getAllHouseNumberRanges
public abstract PlaceOptions.Builder getAllHouseNumberRanges(@Nullable Boolean getAllHouseNumberRanges) -
includeTrimblePlaceIds
public abstract PlaceOptions.Builder includeTrimblePlaceIds(@Nullable Boolean includeTrimblePlaceIds) -
lang
-
matchNamedRoadsOnly
-
maxCleanupMiles
-
heading
-
addInjectedFeature
public PlaceOptions.Builder addInjectedFeature(com.trimblemaps.api.geocoding.v1.models.TrimbleMapsLocation carmenFeature) Optionally injectTrimbleMapsLocations into the suggestion view so users can access points of interest quickly without typing a single character. Typical places include, the users home, work, or favorite POI.- Parameters:
carmenFeature- a list of serializedTrimbleMapsLocations which show immediately when the autocomplete UI is displayed to the user- Returns:
- this builder instance for chaining options together
- Since:
- 0.1.0
-
viewMode
-
showDwellTimes
-
showPlaceDetails
-
customizedCategories
-
historyCount
public abstract PlaceOptions.Builder historyCount(@Nullable @IntRange(from=0L) Integer historyCount) Limit the number of past search results shown.- Parameters:
historyCount- the number of past historical searches shown before a search starts.- Returns:
- this builder instance for chaining options together
- Since:
- 0.9.0
-
statusbarColor
Set the autocomplete's layout status bar color. DefaultsColor.BLACK.- Parameters:
statusbarColor- the views status bar color as a ColorInt- Returns:
- this builder instance for chaining options together
- Since:
- 0.9.0
-
hint
Optionally set the hint string which is shown before the user inputs a search term inside the top edit text.- Parameters:
hint- the string used inside the edit text to display to the user before they input a character- Returns:
- this builder instance for chaining options together
- Since:
- 0.1.0
-
build
Build a new instance of thePlaceOptionsclass using the characteristics set in thisPlaceOptions.Builder.- Returns:
- a new instance of the
PlaceOptionsclass - Since:
- 0.1.0
-