VisualInstruction
open class VisualInstruction : Codable
extension VisualInstruction: Equatable
The contents of a banner that should be displayed as added visual guidance for a route. The banner instructions are children of the steps during which they should be displayed, but they refer to the maneuver in the following step.
-
Initializes a new visual instruction banner object that displays the given information.
Declaration
Swift
public init(text: String?, maneuverType: ManeuverType?, maneuverDirection: ManeuverDirection?, components: [Component], degrees: CLLocationDegrees? = nil)
-
Declaration
Swift
public func encode(to encoder: Encoder) throws
-
Declaration
Swift
public required init(from decoder: Decoder) throws
-
A plain text representation of the instruction.
This property is set to
nil
when thetext
property in the Mapbox Directions API response is an empty string.Declaration
Swift
public let text: String?
-
A structured representation of the instruction.
Declaration
Swift
public let components: [Component]
-
The type of maneuver required for beginning the step described by the visual instruction.
Declaration
Swift
public var maneuverType: ManeuverType?
-
Additional directional information to clarify the maneuver type.
Declaration
Swift
public var maneuverDirection: ManeuverDirection?
-
The heading at which the user exits a roundabout (traffic circle or rotary).
This property is measured in degrees clockwise relative to the user’s initial heading. A value of 180° means continuing through the roundabout without changing course, whereas a value of 0° means traversing the entire roundabout back to the entry point.
This property is only relevant if the
maneuverType
is any of the following values:ManeuverType.takeRoundabout
,ManeuverType.takeRotary
,ManeuverType.turnAtRoundabout
,ManeuverType.exitRoundabout
, orManeuverType.exitRotary
.Declaration
Swift
public var finalHeading: CLLocationDegrees?
-
Declaration
Swift
public static func == (lhs: VisualInstruction, rhs: VisualInstruction) -> Bool
-
A unit of information displayed to the user as part of a
See moreVisualInstruction
.Declaration
Swift
enum Component
extension VisualInstruction.Component: Codable
extension VisualInstruction.Component: Equatable