Instruction
public protocol Instruction
Represents an instruction for a maneuver along the Route
.
In order to guide a driver along the route, the navigation system invokes guiding Instruction
s for every maneuver.
Contains a set of attributes common to all instructions.
Is a part of the RouteLeg
which itself is a part of the Route
.
Different types of Instruction will implement this. They may also add extra attributes specific to their Instruction type.
e.g., TurnInstruction
will contain turnAngle
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 }
-
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: TomTomSDKCommon.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
@available(*, deprecated, message: "This API is deprecated and will be removed with the next major release.") var combineWithNext: Bool { get }
-
Fine-grained
Announcement
s for theInstruction
.Declaration
Swift
@available(*, deprecated, message: "This API is deprecated and will be removed with the next major release.") 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: Road? { get }
-
Information about the road the driver will be on immediately after completing the maneuver, if available for this instruction.
Declaration
Swift
var nextSignificantRoad: Road? { get }
-
An array of
InstructionPoint
s that represents a route path.Declaration
Swift
var routePath: [InstructionPoint] { 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 }
-
maneuver
Extension methodRepresentation of the instruction in
AnnouncementManeuver
value.Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public var maneuver: AnnouncementManeuver { get }
-
roadSide
Extension methodIf an instruction is arrival or waypoint, the method returns corresponding a road side value.
Declaration
Swift
public var roadSide: RoadSide? { get }