VisualInstruction
@objc(MBVisualInstruction)
open class VisualInstruction : NSObject, NSSecureCoding
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.
-
A plain text representation of the instruction.
Declaration
Swift
@objc public let text: String?
-
The type of maneuver required for beginning the step described by the visual instruction.
Declaration
Swift
@objc public var maneuverType: ManeuverType
-
Additional directional information to clarify the maneuver type.
Declaration
Swift
@objc public var maneuverDirection: ManeuverDirection
-
A structured representation of the instruction.
Declaration
Swift
@objc public let components: [ComponentRepresentable]
-
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
@objc public var finalHeading: CLLocationDegrees
-
Initializes a new visual instruction banner object that displays the given information.
Declaration
Swift
@objc public init(text: String?, maneuverType: ManeuverType, maneuverDirection: ManeuverDirection, components: [ComponentRepresentable], degrees: CLLocationDegrees = 180)
-
Initializes a new visual instruction object based on the given JSON dictionary representation.
Declaration
Swift
@objc(initWithJSON:) public convenience init(json: [String : Any])
Parameters
json
A JSON object that conforms to the banner instruction format described in the Directions API documentation.