initialize

fun initialize(application: Application, accessToken: String, locationEngine: LocationEngine = LocationEngineProvider.getBestLocationEngine(application), viewportProvider: ViewportProvider? = null, searchSdkSettings: SearchSdkSettings = SearchSdkSettings(), offlineSearchSettings: OfflineSearchSettings = OfflineSearchSettings())

Experimental API, can be changed or removed in the next SDK releases. Initialize Search SDK.

Parameters

application

android application instance.

accessToken

mapbox access token.

locationEngine

optional location engine instance. Default LocationEngine is retrieved from LocationEngineProvider.getBestLocationEngine.

viewportProvider

optional viewport provider.

searchSdkSettings

optional Search SDK settings.

offlineSearchSettings

optional offline search settings.

Throws

if MapboxSearchSdk has already been initialized.