VisualInstructionBanner
@objc(MBVisualInstructionBanner)
open class VisualInstructionBanner : NSObject, NSSecureCoding
A visual instruction banner contains all the information necessary for creating a visual cue about a given RouteStep
.
-
The distance at which the visual instruction should be shown, measured in meters from the beginning of the step.
Declaration
Swift
@objc public let distanceAlongStep: CLLocationDistance
-
The most important information to convey to the user about the
RouteStep
.Declaration
Swift
@objc public let primaryInstruction: VisualInstruction
-
Less important details about the
RouteStep
.Declaration
Swift
@objc public let secondaryInstruction: VisualInstruction?
-
A visual instruction that is presented simultaneously to provide information about an additional maneuver that occurs in rapid succession.
This instruction could either contain the visual layout information or the lane information about the upcoming maneuver.
Declaration
Swift
@objc public let tertiaryInstruction: VisualInstruction?
-
Which side of a bidirectional road the driver should drive on, also known as the rule of the road.
Declaration
Swift
@objc public var drivingSide: DrivingSide
-
Initializes a new visual instruction banner object based on the given JSON dictionary representation and a driving side.
Declaration
Swift
@objc(initWithJSON:drivingSide:) public convenience init(json: [String : Any], drivingSide: DrivingSide)
Parameters
json
A JSON object that conforms to the primary or secondary banner format described in the Directions API documentation.
drivingSide
The side of the road the user should drive on. This value should be consistent with the containing route step.
-
Initializes a new visual instruction banner object that displays the given information.
Declaration
Swift
@objc public init(distanceAlongStep: CLLocationDistance, primaryInstruction: VisualInstruction, secondaryInstruction: VisualInstruction?, tertiaryInstruction: VisualInstruction?, drivingSide: DrivingSide)
Parameters
distanceAlongStep
The distance at which the visual instruction should be shown, measured in meters from the beginning of the step.
primaryInstruction
The most important information to convey to the user about the
RouteStep
.secondaryInstruction
Less important details about the
RouteStep
.drivingSide
Which side of a bidirectional road the driver should drive on.