AutocompleteOptions
public struct AutocompleteOptions
Defines the parameters of an Autocomplete Search.
-
Declaration
Swift
public init( query: String, locale: Locale = Locale.current, limit: Int = Defaults.limit, position: CLLocationCoordinate2D? = nil, radius: Measurement<UnitLength>? = nil, countries: Set<String> = [], resultTypes: Set<AutocompleteResultType> = [], sessionID: UUID? = nil )Parameters
queryA search phrase to find an autocomplete text for.
localeLocale in which autocomplete results should be returned. Locale should be created with one of the TomTom supported IETF language tags: https://developer.tomtom.com/search-api/documentation/product-information/supported-languages
limitLimits the number of autocomplete suggestions.
positionradiusA radius that defines an area around
position.countriesA list of country codes in the ISO 3166-1 alpha-2 format. When used the results will be limited to the specified countries.
resultTypesDefines the types of results to return.
sessionIDA search session during which a user performs multiple search requests. This is needed for sending the feedback to the online search engine.
-
Defines default parameters for
See moreAutocompleteOptionsDeclaration
Swift
public enum Defaults -
A search phrase to find an autocomplete text for.
Declaration
Swift
public let query: String -
Locale in which autocomplete results should be returned. Locale should be created with one of the TomTom supported IETF language tags: https://developer.tomtom.com/search-api/documentation/product-information/supported-languages
Declaration
Swift
public let locale: Locale -
Limits the number of autocomplete suggestions.
Declaration
Swift
public var limit: Int? -
When
positionis used on its own, results nearer the location will be boosted. When used in combination withradius, results will be constrained to the defined area.Declaration
Swift
public var position: CLLocationCoordinate2D? -
A radius that defines an area around
position.Declaration
Swift
public var radius: Measurement<UnitLength>? -
A set of country codes in the ISO 3166-1 alpha-2 format limiting the autocomplete results. When used the results will be limited to the specified countries.
Declaration
Swift
public var countries: Set<String> -
Defines the types of results to return.
Declaration
Swift
public var resultTypes: Set<AutocompleteResultType> -
A search session during which a user performs multiple search requests. This is needed for sending the feedback to the online search engine.
Declaration
Swift
public let sessionID: UUID?
AutocompleteOptions Structure Reference