RoutingService

public protocol RoutingService

RoutingService protocol

Important

This is a Public Preview API. It may be changed or removed at any time.
  • This service calculates a route between an origin and a destination, passing through waypoints (if specified). Additional routing parameters like traffic, things to avoid, departure/arrival time, etc. can be taken into account using RoutingOptions.

    Declaration

    Swift

    func planRoute(options: RoutingOptions, completion: @escaping (Result<RoutingResponse, Error>) -> ())

    Parameters

    options
    completion

    The completion closure is called after the response to the request has been processed. If no errors occurred, RoutingResponse contains an array of routes between an origin and a destination.

  • Cancels all current requests.

    Declaration

    Swift

    func cancelPendingRequests()