Component
enum Component
extension VisualInstruction.Component: Codable
extension VisualInstruction.Component: Equatable
A unit of information displayed to the user as part of a VisualInstruction
.
-
The component separates two other destination components.
If the two adjacent components are both displayed as images, you can hide this delimiter component.
Declaration
Swift
case delimiter(text: TextRepresentation)
-
The component bears the name of a place or street.
Declaration
Swift
case text(text: TextRepresentation)
-
The component is an image, such as a route marker, with a fallback text representation.
Declaration
Swift
case image(image: ImageRepresentation, alternativeText: TextRepresentation)
Parameters
image
The component’s preferred image representation.
alternativeText
The component’s alternative text representation. Use this representation if the image representation is unavailable or unusable, but consider formatting the text in a special way to distinguish it from an ordinary
.text
component. -
The component is an image of a zoomed junction, with a fallback text representation.
Declaration
Swift
case guidanceView(image: GuidanceViewImageRepresentation, alternativeText: TextRepresentation)
-
The component contains the localized word for “Exit”.
This component may appear before or after an
.exitCode
component, depending on the language. You can hide this component if the adjacent.exitCode
component has an obvious exit-number appearance, for example with an accompanying motorway exit icon.Declaration
Swift
case exit(text: TextRepresentation)
-
The component contains an exit number.
You can hide the adjacent
.exit
component in favor of giving this component an obvious exit-number appearance, for example by pairing it with a motorway exit icon.Declaration
Swift
case exitCode(text: TextRepresentation)
-
A component that represents a turn lane or through lane at the approach to an intersection.
Declaration
Swift
case lane(indications: LaneIndication, isUsable: Bool)
Parameters
indications
The direction or directions of travel that the lane is reserved for.
isUsable
Whether the user can use this lane to continue along the current route.
-
A textual representation of a visual instruction component.
See moreDeclaration
Swift
struct TextRepresentation : Equatable
-
An image representation of a visual instruction component.
See moreDeclaration
Swift
struct ImageRepresentation : Equatable
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
Declaration
Swift
public func encode(to encoder: Encoder) throws
-
Declaration
Swift
public static func == (lhs: VisualInstruction.Component, rhs: VisualInstruction.Component) -> Bool