Class PlaceOptions.Builder

java.lang.Object
com.trimblemaps.mapsdk.plugins.places.autocomplete.model.PlaceOptions.Builder
Enclosing class:
PlaceOptions

public abstract static class PlaceOptions.Builder extends Object
Build a new instance of the PlaceOptions class using this inner builder class.
Since:
0.1.0
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • showPoiCategories

      public abstract PlaceOptions.Builder showPoiCategories(boolean showPoiCategories)
      Should show the POI categories
      Parameters:
      showPoiCategories - true to show the POI categories, otherwise false
      Returns:
      this builder for chaining options together
    • hideMenuIcon

      public abstract PlaceOptions.Builder hideMenuIcon(boolean hideMenuIcon)
      Should hide the menu icon
      Parameters:
      hideMenuIcon - true to hide the menu icon, otherwise false
      Returns:
      this builder for chaining options together
    • focusSearchImmediately

      public abstract PlaceOptions.Builder focusSearchImmediately(boolean focusSearchImmediately)
      Should focus search bar immediately
      Parameters:
      focusSearchImmediately - true to focus immediately, otherwise false
      Returns:
      this builder for chaining options together
    • maxResults

      public abstract PlaceOptions.Builder maxResults(@Nullable Integer 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

      public abstract PlaceOptions.Builder center(@Nullable com.trimblemaps.geojson.Point 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

      public abstract PlaceOptions.Builder excludeResultsFor(@Nullable String excludeResultsFor)
    • excludeResultsFor

      public PlaceOptions.Builder excludeResultsFor(@NonNull String[] types)
    • includeOnly

      public abstract PlaceOptions.Builder includeOnly(@Nullable String includeOnly)
    • includeOnly

      public PlaceOptions.Builder includeOnly(@NonNull String[] types)
    • poiCategories

      public abstract PlaceOptions.Builder poiCategories(@Nullable String poiCategories)
    • poiCategories

      public PlaceOptions.Builder poiCategories(@NonNull String[] poiCategories)
    • countries

      public abstract PlaceOptions.Builder countries(@Nullable String countries)
    • country

      public PlaceOptions.Builder country(Locale 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

      public PlaceOptions.Builder countries(@NonNull String[] countries)
    • countryType

      public abstract PlaceOptions.Builder countryType(@Nullable String countryType)
    • states

      public abstract PlaceOptions.Builder states(@Nullable String states)
    • states

      public PlaceOptions.Builder states(@NonNull String[] states)
    • include

      public abstract PlaceOptions.Builder include(@Nullable String include)
    • useCustomPlaces

      public abstract PlaceOptions.Builder useCustomPlaces(@Nullable Boolean useCustomPlaces)
    • separateHouseNumber

      public abstract PlaceOptions.Builder separateHouseNumber(@Nullable Boolean separateHouseNumber)
    • getAllHouseNumberRanges

      public abstract PlaceOptions.Builder getAllHouseNumberRanges(@Nullable Boolean getAllHouseNumberRanges)
    • includeTrimblePlaceIds

      public abstract PlaceOptions.Builder includeTrimblePlaceIds(@Nullable Boolean includeTrimblePlaceIds)
    • lang

      public abstract PlaceOptions.Builder lang(@Nullable String lang)
    • matchNamedRoadsOnly

      public abstract PlaceOptions.Builder matchNamedRoadsOnly(@Nullable Boolean matchNamedRoadsOnly)
    • maxCleanupMiles

      public abstract PlaceOptions.Builder maxCleanupMiles(@Nullable Double maxCleanupMiles)
    • heading

      public abstract PlaceOptions.Builder heading(@Nullable Double heading)
    • addInjectedFeature

      public PlaceOptions.Builder addInjectedFeature(com.trimblemaps.api.geocoding.v1.models.TrimbleMapsLocation carmenFeature)
      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.
      Parameters:
      carmenFeature - a list of serialized TrimbleMapsLocations 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

      public abstract PlaceOptions.Builder viewMode(@IntRange(from=1L,to=3L) int mode)
    • showDwellTimes

      public abstract PlaceOptions.Builder showDwellTimes(boolean show)
    • showPlaceDetails

      public abstract PlaceOptions.Builder showPlaceDetails(boolean show)
    • customizedCategories

      public abstract PlaceOptions.Builder customizedCategories(List<Integer> customizedCategoryIds)
    • 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

      public abstract PlaceOptions.Builder statusbarColor(@ColorInt int statusbarColor)
      Set the autocomplete's layout status bar color. Defaults Color.BLACK.
      Parameters:
      statusbarColor - the views status bar color as a ColorInt
      Returns:
      this builder instance for chaining options together
      Since:
      0.9.0
    • hint

      public abstract PlaceOptions.Builder hint(@Nullable String 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

      public PlaceOptions build()
      Build a new instance of the PlaceOptions class using the characteristics set in this PlaceOptions.Builder.
      Returns:
      a new instance of the PlaceOptions class
      Since:
      0.1.0