Class PlaceAutocomplete

java.lang.Object
com.trimblemaps.mapsdk.plugins.places.autocomplete.PlaceAutocomplete

public final class PlaceAutocomplete extends Object
PlaceAutocomplete provides an activity that allows a user to start typing a place name or an address and see place predictions appear as they type. The activity can also display recent search history, injected places (as a separate list), and more.

If the user exits the autocomplete activity without choosing a place, the calling activity will receive Activity.RESULT_CANCELED.

Since:
0.1.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Builder for the Place Autocomplete launch intent.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    clearRecentHistory(android.content.Context context)
    If the search history is being displayed in the search results section you should provide a setting for the user to clear their search history.
    static com.trimblemaps.api.geocoding.v1.models.TrimbleMapsLocation
    getPlace(android.content.Intent data)
    Returns the TrimbleMapsLocation selected by the user.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getPlace

      public static com.trimblemaps.api.geocoding.v1.models.TrimbleMapsLocation getPlace(android.content.Intent data)
      Returns the TrimbleMapsLocation selected by the user.
      Parameters:
      data - the result Intent that was provided in Activity.onActivityResult(int, int, Intent)
      Returns:
      the users selected TrimbleMapsLocation
    • clearRecentHistory

      public static void clearRecentHistory(android.content.Context context)
      If the search history is being displayed in the search results section you should provide a setting for the user to clear their search history. Calling this method will remove all entries from the database.
      Parameters:
      context - your application's context
      Since:
      0.1.0