Array

extension Array where Element == RoutePoint
extension Array where Element: Section

Important

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

Available where Element == RoutePoint

  • 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.

Available where Element: Section

  • Update the offset on the route for these route sections.

    Important

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

    Declaration

    Swift

    public func sectionsWithRouteOffset(_ routeOffset: Measurement<UnitLength>) -> Array<Element>