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>? = nil, brands: Set<Brand>? = nil, connectors: Set<ConnectorType>? = nil, minPower: Measurement<UnitPower>? = nil, maxPower: Measurement<UnitPower>? = nil, fuelTypes: Set<FuelType>? = nil, geoPoliticalView: GeoPoliticalView? = nil, shouldFetchDetourOffset: Bool = false, sortOrder: SortOrder = .detourTime, openingHours: OpeningHoursMode = .nextSevenDays(from: Date()), sessionId: String? = nil )Parameters
queryThe search query.
routeThe route points.
maxDetourTimeThe 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.
limitThe maximum number of search results that will be returned.
categoriesRestricts the Points Of Interest in the response to those whose category ID is listed.
brandsA list of brand names used to restrict the result to POIs associated with those brands.
connectorSetA 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.
minPowerA double value representing a power rate, used to restrict the results to electric vehicle stations with at least one connector with that minimum power.
maxPowerA double value representing a power rate, used the results to electric vehicle stations with at least one connector with that maximum power.
fuelTypesA set of fuel types, used to restrict the results to ones with specific fuel types.
geoPoliticalViewDefines what kind of geopolitical view should be used.
shouldFetchDetourOffsetParameter which turns on calculation of the distance between the start of the route and the starting point of the detour to a POI.
sortOrderDefines how the results will be sorted.
openingHoursScope of the opening hours to be provided.
sessionIdA 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?
AlongRouteQuery Structure Reference