ServiceProvider

interface ServiceProvider

This class provides access to search-related services and utility classes.

Functions

analyticsService
Link copied to clipboard
abstract fun analyticsService(): AnalyticsService
Provides entity to track analytics events.
distanceCalculator
Link copied to clipboard
abstract fun distanceCalculator(latitude: Double): DistanceCalculator
Provides entity to calculate distances between geographical points.
favoritesDataProvider
Link copied to clipboard
abstract fun favoritesDataProvider(): FavoritesDataProvider
Provides entity to work with com.mapbox.search.record.FavoriteRecord.
globalDataProvidersRegistry
Link copied to clipboard
abstract fun globalDataProvidersRegistry(): IndexableDataProvidersRegistry
Experimental API, can be changed or removed in the next SDK releases.
highlightsCalculator
Link copied to clipboard
abstract fun highlightsCalculator(): HighlightsCalculator
Provides entity to calculate highlights ranges in search results.
historyDataProvider
Link copied to clipboard
abstract fun historyDataProvider(): HistoryDataProvider
Provides entity to work with com.mapbox.search.record.HistoryRecord.
locationEngine
Link copied to clipboard
abstract fun locationEngine(): LocationEngine
Provides entity to get current user location.