Instruction
struct Instruction
An instruction for a user to get from one Coordinate to another. It will have a Coordinate it happens at, an Action (depart, arrive, turn, take vortex), and optional Locations to perform this at or towards, as well as a String representing the text instructions to display to the user.
The at/towardsLocation properties are to let you mark or highlight key reference locations on the MapView if they will help the user find or keep their bearings.
-
An Action is the type of thing being performed at a Coordinate: Departing, arriving, turning, or entering a Connection
Declaration
Swift
public typealias Action = DirectionsInstructionAction
-
Start out leaving from this Coordinate
Declaration
Swift
public struct Departure : Action
-
End when you get at this Coordinate
Declaration
Swift
public struct Arrival : Action
-
The Coordinate this Direction occurs at
Declaration
Swift
public let coordinate: Coordinate
-
The type of thing happening at this Coordinate
Declaration
Swift
public let action: Action
-
A Location to display to the user, indicating whereabouts this Direction should occur (since a Coordinate can just be an arbitrary spot on the floor)
Declaration
Swift
public let atLocation: Location?
-
Text instructions to display to the user
Declaration
Swift
public internal(set) var description: String { get }