java.lang.Object
com.trimblemaps.mapsdk.plugins.places.autocomplete.model.PlaceOptions
All Implemented Interfaces:
android.os.Parcelable

public abstract class PlaceOptions extends Object implements 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
  • Field Details

    • MODE_FULLSCREEN

      public static final int MODE_FULLSCREEN
      Mode for launching the autocomplete view in fullscreen.
      Since:
      0.1.0
      See Also:
    • MODE_CARDS

      public static final int MODE_CARDS
      Mode for launching the autocomplete view using Android cards for the layouts.
      Since:
      0.1.0
      See Also:
    • MODE_FLOATING

      public static final int MODE_FLOATING
      Mode 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

      @Nullable public abstract Integer 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

      @Nullable public abstract Integer maxResults()
    • center

      @Nullable public abstract com.trimblemaps.geojson.Point center()
    • excludeResultsFor

      @Nullable public abstract String excludeResultsFor()
    • includeOnly

      @Nullable public abstract String includeOnly()
    • poiCategories

      @Nullable public abstract String poiCategories()
    • countries

      @Nullable public abstract String countries()
    • countryType

      @Nullable public abstract String countryType()
    • states

      @Nullable public abstract String states()
    • include

      @Nullable public abstract String include()
    • useCustomPlaces

      @Nullable public abstract Boolean useCustomPlaces()
    • separateHouseNumber

      @Nullable public abstract Boolean separateHouseNumber()
    • getAllHouseNumberRanges

      @Nullable public abstract Boolean getAllHouseNumberRanges()
    • includeTrimblePlaceIds

      @Nullable public abstract Boolean includeTrimblePlaceIds()
    • lang

      @Nullable public abstract String lang()
    • matchNamedRoadsOnly

      @Nullable public abstract Boolean matchNamedRoadsOnly()
    • maxCleanupMiles

      @Nullable public abstract Double maxCleanupMiles()
    • heading

      @Nullable public abstract Double heading()
    • injectedPlaces

      @Nullable public abstract List<String> injectedPlaces()
      Optionally inject TrimbleMapsLocations 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 to MODE_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_CARDS or MODE_FULLSCREEN mode
      Since:
      0.1.0
    • statusbarColor

      @ColorInt public abstract int statusbarColor()
      Set the autocomplete's layout status bar color. Defaults Color.BLACK.
      Returns:
      the status bar color as a ColorInt
      Since:
      0.9.0
    • hint

      @Nullable public abstract String 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

      public abstract List<Integer> customizedCategories()
    • builder

      public static PlaceOptions.Builder builder()
      Build a new instance of the PlaceOptions class using this method. It will return the PlaceOptions.Builder which can be used to customize the users experience.
      Returns:
      an instance of PlaceOptions.Builder used to create a new PlaceOptions instance
      Since:
      0.1.0
    • buildSearch

      public com.trimblemaps.api.geocoding.v1.TrimbleMapsGeocoding.Builder buildSearch()
    • filterCategories

      public List<com.trimblemaps.api.poi.v1.models.PoiType> filterCategories(List<com.trimblemaps.api.poi.v1.models.PoiType> categories)
    • toBuilder

      public abstract PlaceOptions.Builder toBuilder()