Class PlaceOptions
java.lang.Object
com.trimblemaps.mapsdk.plugins.places.autocomplete.model.PlaceOptions
- All Implemented Interfaces:
android.os.Parcelable
Create a PlaceOptions object which can be used to customize the autocomplete geocoder results and the UI component. There are two modes to further change the autocomplete UI to fit your app better.
- Full screen mode: will place all the search history, results, and injected places into a view which has a width equal to the app width.
- Card view mode: the place search history, results, and injected places in into a
CardView
- Since:
- 0.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuild a new instance of thePlaceOptionsclass using this inner builder class.Nested classes/interfaces inherited from interface android.os.Parcelable
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMode for launching the autocomplete view using Android cards for the layouts.static final intMode for launching the autocomplete view as a floating overlaystatic final intMode for launching the autocomplete view in fullscreen.Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PlaceOptions.Builderbuilder()Build a new instance of thePlaceOptionsclass using this method.com.trimblemaps.api.geocoding.v1.TrimbleMapsGeocoding.Builderabstract com.trimblemaps.geojson.Pointcenter()abstract Stringabstract Stringabstract StringList<com.trimblemaps.api.poi.v1.models.PoiType> filterCategories(List<com.trimblemaps.api.poi.v1.models.PoiType> categories) abstract booleanShould focus the search bar immediately, without waiting for the user to tap thereabstract Booleanabstract Doubleheading()abstract booleanShould hide the menu icon in the search bar (only show back arrow)abstract Stringhint()Optionally set the hint string which is shown before the user inputs a search term inside the top edit text.abstract IntegerLimit the number of results returned.abstract Stringinclude()abstract Stringabstract BooleanOptionally injectTrimbleMapsLocations into the suggestion view so users can access points of interest quickly without typing a single character.abstract Stringlang()abstract Booleanabstract Doubleabstract Integerabstract Stringabstract Booleanabstract booleanShould the place picker bottom sheet show the dwell times?abstract booleanShould the place picker bottom sheet show the place details?abstract booleanShould show the POI categoriesabstract Stringstates()abstract intSet the autocomplete's layout status bar color.abstract PlaceOptions.Builderabstract Booleanabstract intviewMode()Set the autocomplete's layout view mode toMODE_CARDS,MODE_FULLSCREEN, or @link #MODE_FLOATING} which determines which layout you'd like to use for your autocomplete view.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface android.os.Parcelable
describeContents, writeToParcel
-
Field Details
-
MODE_FULLSCREEN
public static final int MODE_FULLSCREENMode for launching the autocomplete view in fullscreen.- Since:
- 0.1.0
- See Also:
-
MODE_CARDS
public static final int MODE_CARDSMode for launching the autocomplete view using Android cards for the layouts.- Since:
- 0.1.0
- See Also:
-
MODE_FLOATING
public static final int MODE_FLOATINGMode for launching the autocomplete view as a floating overlay- Since:
- 0.1.0
- See Also:
-
-
Constructor Details
-
PlaceOptions
public PlaceOptions()
-
-
Method Details
-
showPoiCategories
public abstract boolean showPoiCategories()Should show the POI categories- Returns:
- true if the POI categories should be shown, otherwise false
-
hideMenuIcon
public abstract boolean hideMenuIcon()Should hide the menu icon in the search bar (only show back arrow)- Returns:
- true to hide the menu icon, false to show the menu icon
-
focusSearchImmediately
public abstract boolean focusSearchImmediately()Should focus the search bar immediately, without waiting for the user to tap there- Returns:
- true to focus immediately, otherwise false
-
showDwellTimes
public abstract boolean showDwellTimes()Should the place picker bottom sheet show the dwell times?- Returns:
- true to show, otherwise false
-
showPlaceDetails
public abstract boolean showPlaceDetails()Should the place picker bottom sheet show the place details?- Returns:
- true to show, otherwise false
-
historyCount
Limit the number of results returned. The default is the maximum number of historical searches already saved by the Places plugin.- Returns:
- the number of past search results returned by the geocoder
- Since:
- 0.9.0
-
maxResults
-
center
@Nullable public abstract com.trimblemaps.geojson.Point center() -
excludeResultsFor
-
includeOnly
-
poiCategories
-
countries
-
countryType
-
states
-
include
-
useCustomPlaces
-
separateHouseNumber
-
getAllHouseNumberRanges
-
includeTrimblePlaceIds
-
lang
-
matchNamedRoadsOnly
-
maxCleanupMiles
-
heading
-
injectedPlaces
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.- Returns:
- a list of serialized
TrimbleMapsLocations which show immediately when the autocomplete UI is displayed to the user - Since:
- 0.1.0
-
viewMode
public abstract int viewMode()Set the autocomplete's layout view mode toMODE_CARDS,MODE_FULLSCREEN, or @link #MODE_FLOATING} which determines which layout you'd like to use for your autocomplete view.- Returns:
- an integer representing either the
MODE_CARDSorMODE_FULLSCREENmode - Since:
- 0.1.0
-
statusbarColor
@ColorInt public abstract int statusbarColor()Set the autocomplete's layout status bar color. DefaultsColor.BLACK.- Returns:
- the status bar color as a ColorInt
- 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.- Returns:
- the string used inside the edit text to display to the user before they input a character
- Since:
- 0.1.0
-
customizedCategories
-
builder
Build a new instance of thePlaceOptionsclass using this method. It will return thePlaceOptions.Builderwhich can be used to customize the users experience.- Returns:
- an instance of
PlaceOptions.Builderused to create a newPlaceOptionsinstance - Since:
- 0.1.0
-
buildSearch
public com.trimblemaps.api.geocoding.v1.TrimbleMapsGeocoding.Builder buildSearch() -
filterCategories
-
toBuilder
-