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 GuidanceInstructions. 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 the GuidanceInstruction protocol and additionally contains TomTomSDKRoute/Instruction/turnAngle, which is the angle where the turn should be made, and TomTomSDKRoute/Instruction/turnDirection, which is the direction of the turn (left/right).
  • TurnInstruction: Implements the Instruction protocol and additionally contains TomTomSDKRoute/Instruction/turnAngle, which is the angle where the turn should be made, and TomTomSDKRoute/Instruction/turnDirection, which is the direction of the turn (left/right).
  • 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 }
  • Indicates left-hand vs. right-hand side driving at the point of the maneuver.

    Declaration

    Swift

    var drivingSide: TomTomSDKCommon.DrivingSide { get }
  • id

    The ID of the instruction.

    Declaration

    Swift

    var id: UUID { get }
  • Name of the intersection at the maneuver point, if present for this instruction.

    Declaration

    Swift

    var intersectionName: String { get }
  • Location of the maneuver expressed as a CLLocationCoordinate2D.

    Declaration

    Swift

    var maneuverPoint: CLLocationCoordinate2D { 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 }
  • 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 }
  • The distance from the start of the route to the instruction point.

    Declaration

    Swift

    var routeOffset: Measurement<UnitLength> { get }
  • An array of InstructionPoint‘s that represents a route path.

    Declaration

    Swift

    var routePath: [InstructionPoint] { get }
  • Signpost information, if present for this instruction.

    Declaration

    Swift

    var signpost: Signpost? { get }