GuidanceInstruction
public protocol GuidanceInstruction
Protocol for a Guidance Instruction, which provides information to the user about the next action to take on the route.
Contains a set of attributes common to all GuidanceInstruction
s.
e.g., ‘Turn right’, ‘Keep left’, ‘Take the ferry’, ‘Take the motorway’, ‘Arrive’.
Different types of GuidanceInstruction
‘s will implement this, and may add extra attributes specific to the
TomTomSDKRoute/Instruction
type.
TurnGuidanceInstruction
: Implements theGuidanceInstruction
protocol and additionally containsTomTomSDKRoute/Instruction/turnAngle
, which is the angle where the turn should be made, andTomTomSDKRoute/Instruction/turnDirection
, which is the direction of the turn (left/right).TurnInstruction
: Implements theInstruction
protocol and additionally containsTomTomSDKRoute/Instruction/turnAngle
, which is the angle where the turn should be made, andTomTomSDKRoute/Instruction/turnDirection
, which is the direction of the turn (left/right).
-
The ID of the instruction.
Declaration
Swift
var id: UUID { get }
-
The distance from the start of the route to the instruction point.
Declaration
Swift
var routeOffset: Measurement<UnitLength> { get }
-
Location of the maneuver expressed as a
CLLocationCoordinate2D
.Declaration
Swift
var maneuverPoint: CLLocationCoordinate2D { get }
-
Indicates left-hand vs. right-hand side driving at the point of the maneuver.
Declaration
Swift
var drivingSide: TomTomSDKCommon.DrivingSide { get }
-
Indicates if the instruction should be combined with the next one. This can be used to build messages like “Turn left and then turn right”.
Declaration
Swift
var combinedWithNext: Bool { get }
-
Information about the road the driver will be on immediately before starting the maneuver, if available for this instruction.
Declaration
Swift
var previousSignificantRoad: Road? { get }
-
Information about the road the driver will be on immediately after completing the maneuver, if available for this instruction.
Declaration
Swift
var nextSignificantRoad: Road? { get }
-
An array of
InstructionPoint
‘s that represents a route path.Declaration
Swift
var routePath: [InstructionPoint] { get }
-
Name of the intersection at the maneuver point, if present for this instruction.
Declaration
Swift
var intersectionName: String { get }
-
Signpost information, if present for this instruction.
Declaration
Swift
var signpost: Signpost? { get }