Segment

public struct Segment

Represents a line between two RoutePoints.

  • The starting coordinate of the line segment.

    Declaration

    Swift

    public let start: RoutePoint
  • end

    The end coordinate of the line segment.

    Declaration

    Swift

    public let end: RoutePoint
  • The offset of this segment from the start of the route.

    Declaration

    Swift

    public var routeOffset: Measurement<UnitLength> { get }
  • The length of this segment.

    Declaration

    Swift

    public var length: Measurement<UnitLength> { get }
  • Calculates intermediate point of segment.

    Declaration

    Swift

    public func intermediatePoint(to distanceAlongSegment: Measurement<UnitLength>) -> CLLocationCoordinate2D

    Parameters

    distanceAlongSegment

    A distance along segment.

    Return Value

    Coordinate between start and end in the specified distanceAlongSegment