sdk / com.mapbox.search / SearchEngine

SearchEngine

interface SearchEngine

Used for forward geocoding (looking up a place by name to retrieve its geographic coordinates). Instance of it can be retrieved from MapboxSearchSdk. Results will be delivered on the main thread.

Functions

search

The first step of forward geocoding. Returns a list of SearchSuggestion without coordinates.

abstract fun search(query: String, options: SearchOptions, callback: SearchSuggestionsCallback): SearchRequestTask

select

The second step of forward geocoding. Call this function to get a SearchResult (with coordinates) from a SearchSuggestion.

abstract fun select(suggestion: SearchSuggestion, callback: SearchSelectionCallback): SearchRequestTask