Instruction

public struct Instruction : CustomStringConvertible

The Instruction structure contains information that can be used to help the driver during navigation.

Lifecycle

Public

  • The distance from the start of the route to the point of the maneuver to which the instruction refers

    Declaration

    Swift

    public let routeOffsetInMeters: Double
  • The estimated travel time up to the point corresponding to routeOffsetInMeters.

    Declaration

    Swift

    public let travelTimeInSeconds: TimeInterval
  • The coordinate of the maneuver

    Declaration

    Swift

    public let point: CLLocationCoordinate2D
  • The Largest index in the polyline of the route.

    Declaration

    Swift

    public let pointIndex: Int
  • The type of instruction

    Declaration

    Swift

    public let instructionType: InstructionType
  • The street name of the next significant road segment after the maneuver, or of the street that should be followed.

    Declaration

    Swift

    public let street: String?
  • The road number(s) of the next significant road segment after the maneuver, or of the road that should be followed.

    Declaration

    Swift

    public let roadNumbers: [String]?
  • The 3-character ISO 3166-1 alpha-3 country code.

    Declaration

    Swift

    public let countryCode: String?
  • The text on the signpost which is most relevant to the maneuver, or to the direction that should be followed.

    Declaration

    Swift

    public let signpostText: String?
  • The type of the junction where the maneuver takes place.

    Declaration

    Swift

    public let junctionType: JunctionType?
  • Indicates the direction of an instruction.

    Declaration

    Swift

    public let turnAngleInDecimalDegrees: Double?
  • The number(s) of a highway exit taken by the current maneuver.

    Declaration

    Swift

    public let exitNumber: String?
  • Indicates which exit to take at a roundabout.

    Declaration

    Swift

    public let roundaboutExitNumber: Int?
  • 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

    public let possibleCombineWithNext: Bool
  • Indicates left-hand vs. right-hand side driving at the point of the maneuver.

    Declaration

    Swift

    public let drivingSide: DrivingSide?
  • A human-readable message for the maneuver

    Declaration

    Swift

    public let message: String?
  • A human-readable message for the maneuver combined with the message from the next instruction.

    Declaration

    Swift

    public let combinedMessage: String?
  • The type of the maneuver.

    Declaration

    Swift

    public let maneuver: Maneuver
  • Phonetic transcription of the verbal message

    Declaration

    Swift

    public let verbalMessagePhonetics: Phonetics?
  • The tagged message to be used for verbal instruction playback.

    Declaration

    Swift

    public let verbalMessage: String?
  • List of announcements related to the instruction.

    Declaration

    Swift

    public let announcements: [Announcement]
  • Additional data related to the instruction. Should be used with maneuver type “OTHER” in order to provide custom maneuver types.

    Declaration

    Swift

    public let extras: [String : AnyObject]?
  • Unique ID of the instruction.

    Declaration

    Swift

    public let uuid: UUID
  • Declaration

    Swift

    public var description: String { get }

Instruction

  • Copies the current Instruction with changes specified in build closure

    Declaration

    Swift

    public func copy(build: (inout Builder) -> ()) -> Instruction

    Parameters

    build

    This closure allows for change of Instruction values

    Return Value

    An Instruction with the changes set on the closure