Offline Search Engine
The OfflineSearchEngine interface provides forward and reverse geocoding search that works offline. An instance of the OfflineSearchEngine can be obtained with OfflineSearchEngine.create.
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
Interface definition for a callback to be invoked when the OfflineSearchEngine is ready for use. With the current implementation the callback is invoked when previously downloaded offline data has been prepared and available for search.
Interface for a listener to be invoked when index data is changed in the OfflineSearchEngine. This interface notifies users when tiles changes made with com.mapbox.common.TileStore have been processed and visible in the OfflineSearchEngine.
Functions
Adds a callback to be notified when engine is ready. If the engine is already ready, callback will be notified immediately.
Adds a listener to be notified of index change events.
Removes a previously added callback.
Removes a previously added listener.
Function to retrieve the details for a given mapboxId that dispatches events using the main executor. The callback will be invoked with a OfflineSearchResult on successful execution. *
Function to retrieve the details for a given mapboxId. The callback will be invoked with a OfflineSearchResult on successful execution.
Performs reverse geocoding search request. Each new search request cancels the previous one if it is still in progress. In this case OfflineSearchCallback.onError will be called with com.mapbox.search.common.SearchCancellationException.
Performs forward geocoding search request. Each new search request cancels the previous one if it is still in progress. In this case OfflineSearchCallback.onError will be called with com.mapbox.search.common.SearchCancellationException.
Searches for addresses nearby (around proximity point), matched with specified street name. Each new search request cancels the previous one if it is still in progress. In this case OfflineSearchCallback.onError will be called with com.mapbox.search.common.SearchCancellationException.
Performs a search along the supplied route.
Selects preferable tileset for offline search. If dataset or version is set, OfflineSearchEngine will try to match appropriate tileset and use it. If several tilesets are available, the latest registered will be used.
Properties
Settings used for OfflineSearchEngine initialization.