public class NavigationDirections : Directions
NavigationDirections object provides you with optimal directions between different locations, or waypoints. The directions object passes your request to a built-in routing engine and returns the requested information to a closure (block) that you provide. A directions object can handle multiple simultaneous requests. A
RouteOptions object specifies criteria for the results, such as intermediate waypoints, a mode of transportation, or the level of detail to be returned. In addition to
NavigationDirections provides support for offline routing.
Each result produced by the directions object is stored in a
Route object. Depending on the
RouteOptions object you provide, each route may include detailed information suitable for turn-by-turn directions, or it may include only high-level information such as the distance, estimated travel time, and name of each leg of the trip. The waypoints that form the request may be conflated with nearby locations, as appropriate; the resulting waypoints are provided to the closure.
Configures the router with the given set of tiles.
public func configureRouter(tilesURL: URL, completionHandler: @escaping NavigationDirectionsCompletionHandler)
The location where the tiles has been sideloaded to.
A block that is called when the router is completely configured.
Unpacks a .tar-file at the given filePathURL to a writeable output directory. The target at the filePathURL will be consumed while unpacking.
The file path to the .tar-file.
The output directory.
Unpacking reports progress every 500ms.
Called when unpacking completed.
Begins asynchronously calculating the route or routes using the given options and delivers the results to a closure.
This method retrieves the routes asynchronously via MapboxNavigationNative.
Routes may be displayed atop a Mapbox map.
RouteOptionsobject specifying the requirements for the resulting routes.
Determines whether to calculate the route offline or online.
The closure (block) to call with the resulting routes. This closure is executed on the application’s main thread.