create

fun OnlineSearch.Companion.create(context: Context, apiKey: String, customPoiProviders: List<CustomPoiProvider>, customApiUrl: URL? = null, geopoliticalView: String? = null): Search

Instantiates a Search object utilizing TomTom's online service, with added functionality to incorporate custom POIs into search queries.

Important: This is a Public Preview API. It may be changed or removed at any time.

Parameters

context

Android context.

apiKey

API key for the online search.

customPoiProviders

A list of custom POI providers for injecting external data into the search engine. The custom POIs will be included in the search process.

customApiUrl

Custom base URL to execute Search API calls.

geopoliticalView

A country code in the ISO 3166-1 alpha-3 format. the country's view on disputed areas will be followed.

Throws


fun OnlineSearch.Companion.create(context: Context, apiKey: String, customPoiDataProviders: List<CustomPoiProvider>? = emptyList(), customApiUrl: URL? = null, geopoliticalView: String? = null, personalData: PersonalData? = null): Search

Deprecated

This will be removed from future releases after October 10th 2024.

Replace with

createWithPersonalData(context, apiKey, customPoiDataProviders, customApiUrl, geopoliticalView, personalData)

Instantiates a Search object utilizing TomTom's online service, with added functionality to incorporate custom POIs and personal locations into search queries.

Parameters

context

Android context.

apiKey

API key for the online search.

customPoiDataProviders

A list of custom POI providers for injecting external data into the search engine. The custom POIs will be included in the search process.

customApiUrl

Custom base URL to execute Search API calls.

geopoliticalView

A country code in the ISO 3166-1 alpha-3 format. the country's view on disputed areas will be followed.

personalData

PersonalData service that provides access to personal locations.

Throws