Array

extension Array where Element == RouteCoordinate

Important

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

Available where Element == RouteCoordinate

  • Finds Segment at given distance along the route.

    Declaration

    Swift

    public func segmentForDistance(distanceAlongRoute: Measurement<UnitLength>) -> Segment?

    Parameters

    distanceAlongRoute

    A distance along the route.

    Return Value

    Segment at a given distance along the route. If the given distance is greater than total length of the route then returns Segment composed of the last two points of the Route.