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.

The API of this class is temporary and subject to change. Tiles loading functionality is available to selected customers only. Contact our team, to get early preview.

Types

EngineReadyCallback
Link copied to clipboard
interface EngineReadyCallback
Interface definition for a callback to be invoked when the OfflineSearchEngine is ready for use.
OnIndexChangeListener
Link copied to clipboard
interface OnIndexChangeListener
Interface for a listener to be invoked when index data is changed in the OfflineSearchEngine.

Functions

addEngineReadyCallback
Link copied to clipboard
open fun addEngineReadyCallback(callback: OfflineSearchEngine.EngineReadyCallback)
Adds a callback to be notified when engine is ready.
abstract fun addEngineReadyCallback(executor: Executor, callback: OfflineSearchEngine.EngineReadyCallback)
Adds a callback to be notified when engine is ready.
addOnIndexChangeListener
Link copied to clipboard
open fun addOnIndexChangeListener(listener: OfflineSearchEngine.OnIndexChangeListener)
Adds a listener to be notified of index change events.
abstract fun addOnIndexChangeListener(executor: Executor, listener: OfflineSearchEngine.OnIndexChangeListener)
Adds a listener to be notified of index change events.
createPlacesTilesetDescriptor
Link copied to clipboard
open fun createPlacesTilesetDescriptor(): TilesetDescriptor
Creates TilesetDescriptor for offline search using the specified dataset and version.
abstract fun createPlacesTilesetDescriptor(dataset: String, version: String): TilesetDescriptor
Creates TilesetDescriptor for offline search using the specified dataset and version.
createTilesetDescriptor
Link copied to clipboard
open fun createTilesetDescriptor(): TilesetDescriptor
Creates TilesetDescriptor for offline search index data using default dataset and version.
abstract fun createTilesetDescriptor(dataset: String, version: String): TilesetDescriptor
Creates TilesetDescriptor for offline search index data using the specified dataset and version.
removeEngineReadyCallback
Link copied to clipboard
abstract fun removeEngineReadyCallback(callback: OfflineSearchEngine.EngineReadyCallback)
Removes a previously added callback.
removeOnIndexChangeListener
Link copied to clipboard
abstract fun removeOnIndexChangeListener(listener: OfflineSearchEngine.OnIndexChangeListener)
Removes a previously added listener.
reverseGeocoding
Link copied to clipboard
open fun reverseGeocoding(options: OfflineReverseGeoOptions, callback: SearchCallback): SearchRequestTask
Performs reverse geocoding.
abstract fun reverseGeocoding(options: OfflineReverseGeoOptions, executor: Executor, callback: SearchCallback): SearchRequestTask
Performs reverse geocoding.
search
Link copied to clipboard
open fun search(query: String, options: OfflineSearchOptions, callback: SearchSuggestionsCallback): SearchRequestTask
The first step of the offline forward geocoding.
abstract fun search(query: String, options: OfflineSearchOptions, executor: Executor, callback: SearchSuggestionsCallback): SearchRequestTask
The first step of the offline forward geocoding.
searchAddressesNearby
Link copied to clipboard
open fun searchAddressesNearby(street: String, proximity: Point, radiusMeters: Double, callback: SearchCallback): SearchRequestTask
Searches for addresses nearby (around proximity point), matched with specified street name.
abstract fun searchAddressesNearby(street: String, proximity: Point, radiusMeters: Double, executor: Executor, callback: SearchCallback): SearchRequestTask
Searches for addresses nearby (around proximity point), matched with specified street name.
select
Link copied to clipboard
open fun select(suggestion: SearchSuggestion, callback: SearchSelectionCallback): SearchRequestTask
The second step of the offline forward geocoding.
open fun select(suggestion: SearchSuggestion, options: SelectOptions, callback: SearchSelectionCallback): SearchRequestTask
The second step of the offline forward geocoding.
abstract fun select(suggestion: SearchSuggestion, options: SelectOptions, executor: Executor, callback: SearchSelectionCallback): SearchRequestTask
The second step of the offline forward geocoding.
selectTileset
Link copied to clipboard
abstract fun selectTileset(dataset: String?, version: String?)
Selects preferable tileset for offline search.

Properties

tileStore
Link copied to clipboard
abstract val tileStore: TileStore
TileStore object used for offline tiles management.