sdk / com.mapbox.search / SearchSuggestionsCallback

SearchSuggestionsCallback

@UiThread interface SearchSuggestionsCallback

Used in the first step of forward geocoding to get a list of SearchSuggestion. When an event happens, the corresponding method will be called on the main thread.

Functions

onError

Called if an error occurred during the request.

abstract fun onError(e: Exception): Unit

onSuggestions

Called when the suggestions list is returned.

abstract fun onSuggestions(suggestions: List<SearchSuggestion>): Unit

Inheritors

SearchSelectionCallback

Callback for SearchResult, resolved from SearchSuggestion. onResult will be called on the main thread.

interface SearchSelectionCallback : SearchSuggestionsCallback