Class PlaceAutocomplete
java.lang.Object
com.trimblemaps.mapsdk.plugins.places.autocomplete.PlaceAutocomplete
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 ClassesModifier and TypeClassDescriptionstatic classBuilder for the Place Autocomplete launch intent. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclearRecentHistory(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.TrimbleMapsLocationgetPlace(android.content.Intent data) Returns theTrimbleMapsLocationselected by the user.
-
Method Details
-
getPlace
public static com.trimblemaps.api.geocoding.v1.models.TrimbleMapsLocation getPlace(android.content.Intent data) Returns theTrimbleMapsLocationselected by the user.- Parameters:
data- the result Intent that was provided inActivity.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
-