NavigationRouteOptions

open class NavigationRouteOptions: RouteOptions

A NavigationRouteOptions object specifies turn-by-turn-optimized criteria for results returned by the Mapbox Directions API.

NavigationRouteOptions is a subclass of RouteOptions that has been optimized for navigation. Pass an instance of this class into the Directions.calculate(_:completionHandler:) method.

  • Initializes a navigation route options object for routes between the given waypoints and an optional profile identifier optimized for navigation.

    See also

    RouteOptions

    Declaration

    Swift

    @objc public required init(waypoints: [Waypoint], profileIdentifier: MBDirectionsProfileIdentifier? = .automobileAvoidingTraffic)
  • Initializes a navigation route options object for routes between the given locations and an optional profile identifier optimized for navigation.

    See also

    RouteOptions

    Declaration

    Swift

    @objc public convenience init(locations: [CLLocation], profileIdentifier: MBDirectionsProfileIdentifier? = .automobileAvoidingTraffic)
  • Initializes a route options object for routes between the given geographic coordinates and an optional profile identifier optimized for navigation.

    See also

    RouteOptions

    Declaration

    Swift

    @objc public convenience init(coordinates: [CLLocationCoordinate2D], profileIdentifier: MBDirectionsProfileIdentifier? = .automobileAvoidingTraffic)