TurnAroundWhenPossibleInstruction

public struct TurnAroundWhenPossibleInstruction : Instruction

Instruction indicating that the driver should turn around when it is possible.

Important

This is a Public Preview API. It may be changed or removed at any time.

Lifecycle

  • Initializes the route instruction, specifying values for its fields.

    Declaration

    Swift

    public init(
        id: UUID = UUID(),
        routeOffset: Measurement<UnitLength>,
        travelTime: Measurement<UnitDuration>,
        maneuverPoint: CLLocationCoordinate2D,
        drivingSide: DrivingSide,
        combineWithNext: Bool,
        announcements: [Announcement],
        previousSignificantRoad: RoadInformation? = nil,
        nextSignificantRoad: RoadInformation? = nil,
        routePath: [RouteCoordinate],
        intersectionName: TextWithPhonetics? = nil,
        signpost: Signpost? = nil,
        landmark: Landmark? = nil,
        sideStreetOffset: Measurement<UnitLength>? = nil,
        trafficLightOffset: Measurement<UnitLength>? = nil
    )

    Parameters

    id

    The ID of the instruction.

    routeOffset

    The distance from the start of the route to the instruction point.

    travelTime

    Estimated travel time to the point at routeOffset.

    maneuverPoint

    Location of the maneuver expressed as CLLocationCoordinate2D.

    drivingSide

    Indicates left-hand vs. right-hand side driving at the point of the maneuver.

    combineWithNext

    Indicates if the instruction should be combined with the next one. This can be used to build messages like “Turn left and then turn right”.

    announcements

    Fine-grained Announcements for the Instruction.

    previousSignificantRoad

    Information about the road the driver will be on immediately before starting the maneuver, if available for this instruction.

    nextSignificantRoad

    Information about the road the driver will be on immediately after completing the maneuver.

    routePath

    An array of RouteCoordinates that represents a route path.

    intersectionName

    Name of the intersection at the maneuver point, if present for this instruction.

    sideStreetOffset

    Distance to the maneuver point from the intermediate side street, if any.

    trafficLightOffset

    Distance to the maneuver point from the preceding traffic light, if any.

    signpost

    Signpost information, if present for this instruction.

    landmark

    Landmark information, if present in this instruction.

Public

  • id

    The ID of the instruction.

    Declaration

    Swift

    public let id: UUID
  • The distance from the start of the route to the instruction point.

    Declaration

    Swift

    public let routeOffset: Measurement<UnitLength>
  • The estimated travel time up to the point corresponding to routeOffset.

    Declaration

    Swift

    public let travelTime: Measurement<UnitDuration>
  • Location of the maneuver expressed as CLLocationCoordinate2D.

    Declaration

    Swift

    public let maneuverPoint: CLLocationCoordinate2D
  • Indicates left-hand vs. right-hand side driving at the point of the maneuver.

    Declaration

    Swift

    public let drivingSide: DrivingSide
  • 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

    public let combineWithNext: Bool
  • Fine-grained Announcements for the Instruction.

    Declaration

    Swift

    public let announcements: [Announcement]
  • Information about the road the driver will be on immediately before starting the maneuver, if available for this instruction.

    Declaration

    Swift

    public let previousSignificantRoad: RoadInformation?
  • Information about the road the driver will be on immediately after completing the maneuver, if available for this instruction.

    Declaration

    Swift

    public let nextSignificantRoad: RoadInformation?
  • An array of RouteCoordinates that represents a route path.

    Declaration

    Swift

    public let routePath: [RouteCoordinate]
  • Name of the intersection at the maneuver point, if present for this instruction.

    Declaration

    Swift

    public let intersectionName: TextWithPhonetics?
  • Signpost information, if present for this instruction.

    Declaration

    Swift

    public let signpost: Signpost?
  • Landmark information, if present in this instruction.

    Declaration

    Swift

    public let landmark: Landmark?
  • Distance to the maneuver point from the intermediate side street, if any.

    Declaration

    Swift

    public let sideStreetOffset: Measurement<UnitLength>?
  • Distance to the maneuver point from the preceding traffic light, if any.

    Declaration

    Swift

    public let trafficLightOffset: Measurement<UnitLength>?
  • Implements instance copy functionality.

    Declaration

    Swift

    public func copy(build: (inout InstructionBuilder) throws -> ()) throws -> Instruction