SearchOptions

data class SearchOptions

Defines the parameters of a Search.

Constructors

Link copied to clipboard
constructor(query: String = "", @IntRange(from = 1, to = 100) limit: Int = DEFAULT_LIMIT, maxDetourDuration: Duration? = MAX_DETOUR_DURATION_UPPER_LIMIT, countryCodes: Set<String> = emptySet(), geoBias: GeoPoint? = null, @Size(min = 0, max = 50) searchAreas: Set<Geometry> = emptySet(), locale: Locale = Locale.getDefault(), resultTypes: Set<SearchResultType> = emptySet(), categoryIds: Set<CategoryId> = emptySet(), brands: Set<Brand> = emptySet(), connectors: Set<ConnectorType> = emptySet(), minPower: Power? = null, maxPower: Power? = null, fuelTypes: Set<FuelType> = emptySet(), openingHoursMode: OpeningHoursMode? = null, sessionId: UUID? = null)
constructor(query: String = "", @IntRange(from = 1, to = 100) limit: Int = DEFAULT_LIMIT, countryCodes: Set<String> = emptySet(), geoBias: GeoPoint? = null, @Size(min = 0, max = 50) searchAreas: Set<Geometry> = emptySet(), locale: Locale = Locale.getDefault(), resultTypes: Set<SearchResultType> = emptySet(), categoryIds: Set<CategoryId> = emptySet(), brands: Set<Brand> = emptySet(), connectors: Set<ConnectorType> = emptySet(), minPower: Power? = null, maxPower: Power? = null, fuelTypes: Set<FuelType> = emptySet(), openingHoursMode: OpeningHoursMode? = null, sessionId: UUID? = null)
constructor(route: List<GeoPoint>, query: String = "", @IntRange(from = 1, to = 20) limit: Int = DEFAULT_LIMIT, maxDetourDuration: Duration? = MAX_DETOUR_DURATION_UPPER_LIMIT, categoryIds: Set<CategoryId> = emptySet(), brands: Set<Brand> = emptySet(), fuelTypes: Set<FuelType> = emptySet(), connectors: Set<ConnectorType> = emptySet(), minPower: Power? = null, maxPower: Power? = null, sortOrder: SortOrder = SortOrder.ByDetourTime, openingHoursMode: OpeningHoursMode? = null, sessionId: UUID? = null, locale: Locale = Locale.getDefault())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

A list of brand names (case sensitive) used to restrict the result.

Link copied to clipboard

Restricts the Points Of Interest in the response to those whose ID is listed.

Link copied to clipboard

A list of connector types used to restrict the result to Points Of Interest of type Electric Vehicle Station, supporting specific connector types. See https://developer.tomtom.com/search-api/search-api-documentation/supported-connector-types for more details.

Link copied to clipboard

A set of ISO 3166-1 alpha3 country codes. (e.g., FRA,ESP). This will limit the search to the specified countries.

Link copied to clipboard

A set of a FuelType used to restrict the result to Points Of Interest with those specific fuels.

Link copied to clipboard

The GeoPoint position where results should be biased.

Link copied to clipboard
val limit: Int

The maximum number of search results that will be returned. Defaults to DEFAULT_LIMIT.

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

The maximum detour duration (for a passenger car) limits the search area. The detour duration is the value added to the estimated time of arrival (to the final destination) after a point of interest is added to the route. Search results that add more than this value are filtered out. The maximum accepted value is 3600 seconds (which equals one hour). Default duration is set to MAX_DETOUR_DURATION_UPPER_LIMIT.

Link copied to clipboard

A power rate, used to restrict the results to electric vehicle stations with at least one connector that has a power lesser or equal to that maximum power.

Link copied to clipboard

A power rate, used to restrict the results to electric vehicle stations with at least one connector that has a power greater or equal to that minimum power.

Link copied to clipboard

The opening hours scope. If it's not provided, no data about opening hours will be returned.

Link copied to clipboard

The search query.

Link copied to clipboard

The route points define the skeleton of the search area.

Link copied to clipboard

The geographic filter for search, all search results returned are confined in the specified geography. Max number of geometries is MAX_NUMBER_OF_SEARCH_AREAS. Three types of geometries can be passed as searchAreas: CircleGeometry, RectangleGeometry and PolygonGeometry When a single CircleGeometry is set the CircleGeometry center overrides geoBias.

Link copied to clipboard

A set of SearchResultType which should be used for the search. An empty set implies search can return results of any type. Other filters can influence the selection of searchResultTypes. For example when a category filter is set, result types are limited to SearchResultType.Poi.

Link copied to clipboard

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.

Link copied to clipboard

Defines how the results will be sorted. Default value is SortOrder.ByDetourTime.