Instruction
public protocol Instruction
Protocol for basic Instruction. Contains a set of attributes common to all instructions.
Different types of Instruction will implement this. They may also add extra attributes specific to their Instruction type. e.g., TurnInstruction will contain turnAngleInDegrees and turnDirection.
-
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 }
-
The estimated travel time up to the point corresponding to routeOffset.
Declaration
Swift
var travelTime: Measurement<UnitDuration> { 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
Announcement
s for theInstruction
.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: RoadInformation? { get }
-
Information about the road the driver will be on immediately after completing the maneuver, if available for this instruction.
Declaration
Swift
var nextSignificantRoad: RoadInformation? { get }
-
An array of
RouteCoordinate
s that represents a route path.Declaration
Swift
var routePath: [RouteCoordinate] { 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 }
-
Implements instance copy functionality.
Declaration
Swift
func copy(build: (inout InstructionBuilder) throws -> ()) throws -> Instruction