AlongRouteQuery
public struct AlongRouteQuery
Defines the parameters of a Search Along the Route query.
Important
This is a Public Preview API. It may be changed or removed at any time.-
init(query:
route: maxDetourTime: limit: categories: brands: connectors: minPower: maxPower: fuelTypes: geoPoliticalView: shouldFetchDetourOffset: sortOrder: openingHours: sessionId: ) Declaration
Swift
public init( query: String = "", route: [CLLocationCoordinate2D], maxDetourTime: Measurement<UnitDuration> = Measurement<UnitDuration>(value: 3600, unit: .seconds), limit: Int = 10, categories: Set<PoiCategoryId> = [], brands: Set<Brand> = [], connectors: Set<ConnectorType> = [], minPower: Measurement<UnitPower>? = nil, maxPower: Measurement<UnitPower>? = nil, fuelTypes: Set<FuelType> = [], geoPoliticalView: GeoPoliticalView? = nil, shouldFetchDetourOffset: Bool = false, sortOrder: SortOrder = .detourTime, openingHours: OpeningHoursMode = .nextSevenDays(from: Date()), sessionId: String? = nil )
Parameters
query
The search query.
route
The route points.
maxDetourTime
The maximum detour time. The maximum and default value is 3600 seconds. Detour time is the time added to the estimated time of arrival at the destination because of the change of route.
limit
The maximum number of search results that will be returned.
categories
Restricts the Points Of Interest in the response to those whose category ID is listed.
brands
A list of brand names used to restrict the result to POIs associated with those brands.
connectorSet
A list of connector types used to restrict the results to electric vehicle stations that support those connector types. See https://developer.tomtom.com/search-api/search-api-documentation/supported-connector-types for more details.
minPower
A double value representing a power rate, used to restrict the results to electric vehicle stations with at least one connector with that minimum power.
maxPower
A double value representing a power rate, used the results to electric vehicle stations with at least one connector with that maximum power.
fuelTypes
A set of fuel types, used to restrict the results to ones with specific fuel types.
geoPoliticalView
Defines what kind of geopolitical view should be used.
shouldFetchDetourOffset
Parameter which turns on calculation of the distance between the start of the route and the starting point of the detour to a POI.
sortOrder
Defines how the results will be sorted.
openingHours
Scope of the opening hours to be provided.
sessionId
A search session is a user session during which a user performs multiple search requests to find a specific address or point of interest. This is needed for sending feedback to the online search.
-
The search query.
Declaration
Swift
public let query: String
-
The route points.
Declaration
Swift
public let route: [CLLocationCoordinate2D]
-
The time added to the estimated time of arrival at the destination because of the change of route.
Note
The maximum value is 3600 seconds.Declaration
Swift
public let maxDetourTime: Measurement<UnitDuration>
-
The maximum number of search results that will be returned.
Declaration
Swift
public let limit: Int
-
Restricts the Points Of Interest in the response to those whose category ID is listed.
Declaration
Swift
public let categories: Set<PoiCategoryId>
-
A set of brand names used to restrict the result to POIs associated with those brands.
Declaration
Swift
public let brands: Set<Brand>
-
A set of connector types used to restrict the results to electric vehicle stations that support those connector types. See https://developer.tomtom.com/search-api/search-api-documentation/supported-connector-types for more details.
Declaration
Swift
public let connectors: Set<ConnectorType>
-
A double value representing a power rate in kilowatts, used to restrict the results to electric vehicle stations with at least one connector with that minimum power.
Declaration
Swift
public let minPower: Measurement<UnitPower>?
-
A double value representing a power rate in kilowatts, used the results to electric vehicle stations with at least one connector with that maximum power.
Declaration
Swift
public let maxPower: Measurement<UnitPower>?
-
A set of fuel types, used to restrict the results to ones with specific fuel types.
Declaration
Swift
public let fuelTypes: Set<FuelType>
-
Defines what kind of geopolitical view should be used.
Declaration
Swift
public let geoPoliticalView: GeoPoliticalView?
-
Parameter which turns on calculation of the distance between the start of the route and the starting point of the detour to a POI.
Declaration
Swift
public let shouldFetchDetourOffset: Bool
-
Defines how the results will be sorted.
Declaration
Swift
public let sortOrder: SortOrder
-
Scope of the opening hours to be provided.
Declaration
Swift
public let openingHours: OpeningHoursMode
-
A search session is a user session during which a user performs multiple search requests to find a specific address or point of interest. This is needed for sending feedback to the online search.
Declaration
Swift
public let sessionId: String?