Instruction

public protocol Instruction

Represents an instruction for a maneuver along the Route. In order to guide a driver along the route, the navigation system invokes guiding Instructions for every maneuver.

Contains a set of attributes common to all instructions. Is a part of the RouteLeg which itself is a part of the Route.

Different types of Instruction will implement this. They may also add extra attributes specific to their Instruction type. e.g., TurnInstruction will contain turnAngle and turnDirection.

  • id

    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 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: DrivingSide { get }
  • 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

    var combineWithNext: Bool { get }
  • Fine-grained Announcements for the Instruction.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    var announcements: [Announcement] { 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 InstructionPoints 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: TextWithPhonetics? { get }
  • Signpost information, if present for this instruction.

    Declaration

    Swift

    var signpost: Signpost? { get }
  • Landmark information, if present in this instruction.

    Declaration

    Swift

    var landmark: Landmark? { get }
  • Distance to the maneuver point from the intermediate side street, if any.

    Declaration

    Swift

    var sideStreetOffset: Measurement<UnitLength>? { get }
  • Distance to the maneuver point from the preceding traffic light, if any.

    Declaration

    Swift

    var trafficLightOffset: Measurement<UnitLength>? { get }

Defaults

  • maneuver Extension method

    Representation of the instruction in AnnouncementManeuver value.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public var maneuver: AnnouncementManeuver { get }
  • roadSide Extension method

    If an instruction is arrival or waypoint, the method returns corresponding a road side value.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public var roadSide: RoadSide? { get }