OfflineSearchEngine

interface OfflineSearchEngine

The OfflineSearchEngine interface provides forward and reverse geocoding search that works offline. An instance of the OfflineSearchEngine can be obtained with MapboxSearchSdk.getOfflineSearchEngine.

Offline forward geocoding search works in a two-step manner, see SearchEngine for more details.

Types

AddRegionCallback
Link copied to clipboard
interface AddRegionCallback
Interface definition for a callback to be invoked when the offline region has been added to the engine.

Functions

addOfflineRegion
Link copied to clipboard
abstract fun addOfflineRegion(path: String, mapsFileNames: List<String>, boundaryFileName: String, callback: OfflineSearchEngine.AddRegionCallback)
Register offline region data for search index.
reverseGeocoding
Link copied to clipboard
abstract fun reverseGeocoding(options: OfflineReverseGeoOptions, callback: SearchCallback): SearchRequestTask
Performs reverse geocoding.
search
Link copied to clipboard
abstract fun search(query: String, options: OfflineSearchOptions, callback: SearchSuggestionsCallback): SearchRequestTask
The first step of the offline forward geocoding.
select
Link copied to clipboard
abstract fun select(suggestion: SearchSuggestion, callback: SearchSelectionCallback): SearchRequestTask
The second step of the offline forward geocoding.