GuidanceInstruction

public protocol GuidanceInstruction

The protocol for a basic Guidance Instruction contains information used to guide the driver during navigation. It contains a set of default attributes common to all GuidanceInstructions e.g., ‘Turn right’, ‘Keep left’, ‘Take the ferry’, ‘Take the motorway’, ‘Arrive’.

Different types of GuidanceInstructions will implement this, and may add extra attributes specific to the Instruction type. e.g., TurnInstruction will contain turnAngleInDegrees and turnDirection

Important

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

    Unique ID of the instruction.

    Declaration

    Swift

    var id: UUID { get }
  • The distance from the start of the route to the point of the instruction

    Declaration

    Swift

    var routeOffset: Measurement<UnitLength> { get }
  • The estimated travel time up to the point corresponding to routeOffset.

    Declaration

    Swift

    var travelTimeInSeconds: TimeInterval { get }
  • The coordinate of the maneuver

    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 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 }
  • Road information at some point on a [Route].

    Declaration

    Swift

    var previousSignificantRoad: RoadInformation? { get }
  • Road information at some point on a [Route].

    Declaration

    Swift

    var nextSignificantRoad: RoadInformation? { get }
  • List of [RouteCoordinate] on the [Route] with information about distance from start in meters.

    Declaration

    Swift

    var routePath: [RouteCoordinate] { get }
  • Name of the intersection

    Declaration

    Swift

    var intersectionName: String? { get }
  • The Signpost contains information about the signpost for the [GuidanceInstruction].

    Declaration

    Swift

    var signpost: Signpost? { get }