AutocompleteOptions

data class AutocompleteOptions(val query: String, val locale: Locale = Locale.getDefault(), @IntRange(from = 1, to = 10) val limit: Int = 5, val position: GeoPoint? = null, val radius: Distance? = null, val countries: Set<String> = emptySet(), val resultTypes: Set<AutoCompleteResultType> = emptySet(), val sessionId: UUID? = null)

Contains the parameters to use in an autocomplete search.

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

Constructors

Link copied to clipboard
fun AutocompleteOptions(query: String, locale: Locale = Locale.getDefault(), @IntRange(from = 1, to = 10) limit: Int = 5, position: GeoPoint? = null, radius: Distance? = null, countries: Set<String> = emptySet(), resultTypes: Set<AutoCompleteResultType> = emptySet(), sessionId: UUID? = null)

Properties

Link copied to clipboard

A set of ISO 3166-1 alpha3 country codes. (e.g., FRA,ESP). This limits the autocomplete results to the specified countries.

Link copied to clipboard
val limit: Int = 5

The maximum number of autocomplete results that will be returned.

Link copied to clipboard

The language in which search results should be returned. If not specified, language is set to the system default language.

Link copied to clipboard
val position: GeoPoint? = null

The position around which results should be biased.

Link copied to clipboard

The search query.

Link copied to clipboard
val radius: Distance? = null

The search radius in meters.

Link copied to clipboard

Restricts the results to a specific result type. Valid result types are AutoCompleteResultType.Category and AutoCompleteResultType.Brand. An empty set implies restricting search results to both brand and category suggestions.

Link copied to clipboard
val sessionId: UUID? = null

A search session is a user session during which a user performs multiple search requests to find a specific address ot point of interest. This is needed for sending feedback to the online search. It must be a valid UUIDv4. If it is not provided, no feedback is sent.