TomTomSDKRoute+Array

extension Array where Element == CLLocationCoordinate2D
extension Array where Element == RoutePoint

Important

This is a Public Preview API. It may be changed or removed at any time.
  • 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 smaller than 0, then returns Segment composed of the first two points of 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.