InstructionBuilder
public protocol InstructionBuilder
Builder pattern deployed to modify only certain attributes in the Instruction
.
See also
Instruction
protocol.
-
The ID of the instruction.
Declaration
Swift
var id: UUID { get set }
-
The distance from the start of the route to the instruction point.
Declaration
Swift
var routeOffset: Measurement<UnitLength> { get set }
-
The estimated travel time up to the point corresponding to routeOffset.
Declaration
Swift
var travelTime: Measurement<UnitDuration> { get set }
-
Location of the maneuver expressed as
CLLocationCoordinate2D
.Declaration
Swift
var maneuverPoint: CLLocationCoordinate2D { get set }
-
Indicates left-hand vs. right-hand side driving at the point of the maneuver.
Declaration
Swift
var drivingSide: DrivingSide { get set }
-
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 set }
-
Fine-grained
Announcement
s for theInstruction
.Declaration
Swift
var announcements: [Announcement] { get set }
-
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 set }
-
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 set }
-
An array of
RouteCoordinate
s that represents a route path.Declaration
Swift
var routePath: [RouteCoordinate] { get set }
-
Name of the intersection at the maneuver point, if present for this instruction.
Declaration
Swift
var intersectionName: TextWithPhonetics? { get set }
-
Signpost information, if present for this instruction.
Declaration
Swift
var signpost: Signpost? { get set }
-
Landmark information, if present in this instruction.
Declaration
Swift
var landmark: Landmark? { get set }
-
Distance to the maneuver point from the intermediate side street, if any.
Declaration
Swift
var sideStreetOffset: Measurement<UnitLength>? { get set }
-
Distance to the maneuver point from the preceding traffic light, if any.
Declaration
Swift
var trafficLightOffset: Measurement<UnitLength>? { get set }
-
Initializes the builder with the current instruction.
Declaration
Swift
init(original: Instruction) throws
Parameters
original
Instruction
used as a source of data for creating aInstructionBuilder
instance. -
Returns the modified instruction instance.
Declaration
Swift
func toInstruction() throws -> Instruction