TollgateInstruction
public struct TollgateInstruction : Instruction
Instruction indicating the driver is approaching a tollgate or ETC terminal.
-
init(tollgateName:paymentTypes: routeOffset: maneuverPoint: drivingSide: combineWithNext: announcements: previousSignificantRoad: nextSignificantRoad: routePath: intersectionName: signpost: landmark: sideStreetOffset: trafficLightOffset: id: ) Initializes the route instruction, specifying values for its fields.
Throws
An error of the typeInitializationError.Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public init( tollgateName: TextWithPhonetics?, paymentTypes: Set<TollPaymentType>, routeOffset: Measurement<UnitLength>, maneuverPoint: CLLocationCoordinate2D, drivingSide: TomTomSDKCommon.DrivingSide, combineWithNext: Bool, announcements: [Announcement] = [], previousSignificantRoad: Road? = nil, nextSignificantRoad: Road? = nil, routePath: [InstructionPoint] = [], intersectionName: TextWithPhonetics? = nil, signpost: Signpost? = nil, landmark: Landmark? = nil, sideStreetOffset: Measurement<UnitLength>? = nil, trafficLightOffset: Measurement<UnitLength>? = nil, id: UUID = UUID() ) throwsParameters
tollgateNameThe name of the tollgate, if any.
paymentTypesThe payment types accepted at the tollgate, if available.
routeOffsetThe distance from the start of the route to the instruction point.
maneuverPointLocation of the maneuver expressed as
CLLocationCoordinate2D.drivingSideIndicates left-hand vs. right-hand side driving at the point of the maneuver.
combineWithNextIndicates if the instruction should be combined with the next one. This can be used to build messages like “Turn left and then turn right”.
announcementsFine-grained
Announcements for theInstruction.previousSignificantRoadInformation about the road the driver will be on immediately before starting the maneuver, if available for this instruction.
nextSignificantRoadInformation about the road the driver will be on immediately after completing the maneuver.
routePathAn array of
RoutePoints that represents a route path.intersectionNameName of the intersection at the maneuver point, if present for this instruction.
signpostSignpost information, if present for this instruction.
landmarkLandmark information, if present in this instruction.
sideStreetOffsetDistance to the maneuver point from the intermediate side street, if any.
trafficLightOffsetDistance to the maneuver point from the preceding traffic light, if any.
idThe ID of the instruction.
-
The ID of the instruction.
Declaration
Swift
public let id: UUID -
The distance from the start of the route to the instruction point.
Declaration
Swift
public let routeOffset: Measurement<UnitLength> -
Location of the maneuver expressed as
CLLocationCoordinate2D.Declaration
Swift
public let maneuverPoint: CLLocationCoordinate2D -
Indicates left-hand vs. right-hand side driving at the point of the maneuver.
Declaration
Swift
public let drivingSide: TomTomSDKCommon.DrivingSide -
Indicates whether it is possible to combine the instruction with the next one. This can be used to build messages like “Turn left and then turn right”.
Declaration
Swift
@available(*, deprecated, message: "This API is deprecated and will be removed with the next major release.") public let combineWithNext: Bool -
Fine-grained
Announcements for theInstruction.Declaration
Swift
@available(*, deprecated, message: "This API is deprecated and will be removed with the next major release.") public let announcements: [Announcement] -
Information about the road the driver will be on immediately before starting the maneuver, if available for this instruction.
Declaration
Swift
public let previousSignificantRoad: Road? -
Information about the road the driver will be on immediately after completing the maneuver, if available for this instruction.
Declaration
Swift
public let nextSignificantRoad: Road? -
An array of
RoutePoints that represents a route path.Declaration
Swift
public let routePath: [InstructionPoint] -
Name of the intersection at the maneuver point, if present for this instruction.
Declaration
Swift
public let intersectionName: TextWithPhonetics? -
Signpost information, if present for this instruction.
Declaration
Swift
public let signpost: Signpost? -
Landmark information, if present in this instruction.
Declaration
Swift
public let landmark: Landmark? -
Distance to the maneuver point from the intermediate side street, if any.
Declaration
Swift
public let sideStreetOffset: Measurement<UnitLength>? -
Distance to the maneuver point from the preceding traffic light, if any.
Declaration
Swift
public let trafficLightOffset: Measurement<UnitLength>? -
The name of the tollgate.
Declaration
Swift
public let tollgateName: TextWithPhonetics? -
The payment types accepted at the tollgate, if available.
Declaration
Swift
public let paymentTypes: Set<TollPaymentType>
-
Errors that can be thrown during creation an instance.
See moreDeclaration
Swift
public enum InitializationError : Error
TomTom SDK for iOS (0.53.1)
TollgateInstruction