createSearchEngineWithBuiltInDataProviders

fun createSearchEngineWithBuiltInDataProviders(apiType: ApiType, settings: SearchEngineSettings, executor: Executor = SearchSdkMainThreadWorker.mainExecutor, callback: CompletionCallback<Unit> = StubCompletionCallback()): SearchEngine

Creates a new instance of the SearchEngine with default data providers ( com.mapbox.search.record.HistoryDataProvider and com.mapbox.search.record.FavoritesDataProvider) registered by default.

Return

A new instance of SearchEngine.

See also

Parameters

apiType

The type of the API used by the Search Engine. Default: ApiType.GEOCODING. Note that ApiType.GEOCODING is the only available publicly. You might need to contact sales to enable access for other API types.

settings

SearchEngineSettings for the engine.

executor

Executor used for events dispatching. Default: main thread.

callback

Callback to handle result.


fun createSearchEngineWithBuiltInDataProviders(settings: SearchEngineSettings, executor: Executor = SearchSdkMainThreadWorker.mainExecutor, callback: CompletionCallback<Unit> = StubCompletionCallback()): SearchEngine

Deprecated

Specify ApiType explicitly

Replace with

createSearchEngineWithBuiltInDataProviders(apiType = , settings = )

Deprecated, use a function that takes ApiType as a parameter.

Creates a new instance of the SearchEngine with ApiType.GEOCODING api type and default data providers ( com.mapbox.search.record.HistoryDataProvider and com.mapbox.search.record.FavoritesDataProvider) registered by default.

Note: The ApiType.GEOCODING API type is supported in compatibility mode. For example, the Geocoding v5 API will align with Search Box response types.

Additionally, please note that Points of Interest (POI) data will be removed from the Geocoding v5 API on December 20, 2024.

For more information, visit Geocoding v5 API page.

Return

A new instance of SearchEngine.

See also

Parameters

settings

SearchEngine settings.

executor

Executor used for events dispatching. Default: main thread.

callback

Callback to handle result.