AutocompleteSearchOptions

data class AutocompleteSearchOptions(    val query: String,     val language: String,     val limit: Int? = null,     val position: GeoCoordinate? = null,     val radius: Int? = null,     val countryCodes: Set<String>,     val resultTypes: Set<String>)

Contains the parameters to use in an autocomplete search. Use the AutocompleteSearchOptions.Builder to create a new instance of the object.

Parameters

query

The search query.

language

Language in which the autocomplete results should be returned. Must be one of the TomTom-supported IETF language tags. See https://developer.tomtom.com/search-api/search-api/supported-languages for more details.

limit

The maximum number of autocomplete results that will be returned.

position

The position around which results should be biased.

radius

The search radius in meters.

countryCodes

A set of country codes (e.g., FR,ES). This limits the autocomplete results to the specified countries.

resultTypes

Restricts the results to specific segments (e.g., "category", "brand", or "category,brand"). A result is only included if at least one segment is any of the indicated types.

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

Constructors

Link copied to clipboard
fun AutocompleteSearchOptions(    query: String,     language: String,     limit: Int? = null,     position: GeoCoordinate? = null,     radius: Int? = null,     countryCodes: Set<String>,     resultTypes: Set<String>)

Types

Link copied to clipboard
class Builder(query: String, language: String)

Builder used to create an instance of the AutocompleteSearchOptions. Once constructed, the user cannot change the field values.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val countryCodes: Set<String>
Link copied to clipboard
val language: String
Link copied to clipboard
val limit: Int? = null
Link copied to clipboard
val position: GeoCoordinate? = null
Link copied to clipboard
val query: String
Link copied to clipboard
val radius: Int? = null
Link copied to clipboard
val resultTypes: Set<String>