Traffic-aware directions and map matching in Swift on iOS, macOS, tvOS, watchOS, and Linux
ISC License
Bot releases are hidden (Show)
RouteOptions.includesVoiceInstructions
to RouteOptions. includesSpokenInstructions
Documentation is available online or within Xcode.
Route
, if the route did not include a locale
option, it would fail. #187Documentation is available online or within Xcode.
instructionsSpokenAlongStep
to RouteOptions
. This can be used for getting voice instructions for a RouteStep
#175locale
to RouteOptions
. This can be used for setting the language settings for instructions on a RouteStep
. #176Documentation is available online or within Xcode.
Published by 1ec5 about 7 years ago
Documentation is available online or within Xcode.
Published by 1ec5 about 7 years ago
RouteShapeFormat.polyline6
option for enhanced route line precision. (#167)RouteOptions.includeExitRoundaboutManeuver
option to get separate steps for entering and exiting each roundabout. (#168, #169)Documentation is available online or within Xcode.
Published by 1ec5 about 7 years ago
RouteShapeFormat.polyline6
option for enhanced route line precision. (#167)RouteOptions.includeExitRoundaboutManeuver
option to get separate steps for entering and exiting each roundabout. (#168, #169)Documentation is available online or within Xcode.
Route.routeIdentifer
property that contains the unique identifier associated with the network request that created the route. (#165)Documentation is available online or within Xcode.
Published by 1ec5 over 7 years ago
Route
, RouteLeg
, RouteStep
, and Waypoint
objects using Xcode’s built-in Quick Look feature. (#152)RouteStep.exitCodes
property. (#149)Intersection.outletRoadClasses
property that provides details about the road leading away from the intersection. (#154, #157)Route
that indicate the access token and API endpoint of the Directions
object that created the route. (#155)Published by 1ec5 over 7 years ago
AttributeOptions
option, congestion
, for obtaining the level of traffic congestion along each segment of a RouteLeg
. (#123)RouteStep.exitCodes
property that contains the exit number of a takeOffRamp
maneuver. (#147)Directions.urlForCalculating(_:)
to url(forCalculating:)
to adhere to Swift 3 naming conventions. (#138)RouteOptions
is named, those names persist in the RouteLeg
s’ waypoints.RouteStep
s to fail to decode if the maneuverDirection
was omitted or unrecognized. (#137)AttributeOptions
options. (#123)Documentation is available online or within Xcode.
Published by 1ec5 over 7 years ago
Changes since v0.8.1:
profileIdentifier
property with a routeOptions
property set to the RouteOptions object that was used to obtain the route. (#122)Published by 1ec5 over 7 years ago
Changes since v0.8.0:
Published by 1ec5 over 7 years ago
Changes since v0.7.0:
MBDirectionsProfileIdentifier
extensible string enumeration, which is available to both Objective-C and Swift. (#106)Published by 1ec5 over 7 years ago
This will be the final Swift 2.x release. Changes since v0.6.0:
MBDirectionsProfileIdentifierAutomobileAvoidingTraffic
for driving routes that avoid traffic congestion. (#86)name
property with a names
property; each string in the array is a road name that was previously delimited by a semicolon. (#91)codes
property to RouteStep that contains any highway route numbers associated with the road. These are the same route numbers that were formerly parenthesized in the name
property. (#91)destinations
property to RouteStep that indicates a highway ramp’s signposted destination. (#63)intersections
property to RouteStep that indicates the locations and configurations of each intersection along the step, including turn lane markings. (#80)UseLane
and TakeRotary
maneuver types, which indicate an instruction to change lanes or enter a large, named roundabout, respectively. (#93)Published by 1ec5 over 8 years ago
This is a complete rewrite of MapboxDirections.swift that focuses on making the API more Swift-like in Swift but also adds Objective-C support (#47). The goal is no longer to be a drop-in replacement for MapKit’s MKDirections API, but the library continues to use terminology familiar to Cocoa and Cocoa Touch developers. This version includes a number of breaking changes:
MB
class prefix from Swift but kept it for Objective-C. If any type conflicts with a type in your application’s module, prefix it with MapboxDirections.
.Directions
object. Use the shared object if you’ve set your Mapbox access token in the MGLMapboxAccessToken
key of your application’s Info.plist file. (You may have already done so if you’ve installed the Mapbox iOS SDK or Mapbox OS X SDK.) Otherwise, create a Directions
object with the access token explicitly.NBNRequestKit
dependency override.Directions
no longer needs to be strongly held in order for the request to finish. Instead, the request is made against the shared URL session; to use a custom URL session, make the request yourself using the URL returned by the URLForCalculatingDirections(options:)
property.cancel()
method; instead, directly cancel the NSURLSessionDataTask returned by calculateDirections(options:completionHandler:)
.calculateDirectionsWithCompletionHandler(_:completionHandler:)
and calculateETAWithCompletionHandler(_:completionHandler:)
with a single calculateDirections(options:completionHandler:)
method, which takes a RouteOptions
object that supports all the options exposed by the Geocoding API. If you need to use Mapbox Directions API v4, use a RouteOptionsV4
instead of RouteOptions
.RouteOptions
object to include the route steps and full-resolution route shapes. If you only want the estimated travel time or distance to a destination, use the default values in RouteOptions
.MBDirectionsRequest.TransportType
type with a freeform profileIdentifier
option. Use one of the three profile identifier constants with this option.MBDirectionsResponse
class in favor of passing the waypoints and routes from the response directly into the completion handler.Route.geometry
to Route.coordinates
. For Objective-C compatibility, there are additional methods that work with C arrays of coordinates.CustomStringConvertible
in Swift, allowing the enumeration values to be converted to and from strings easily.Other changes since v0.5.0:
TakeRamp
maneuver type with TakeOnRamp
, TakeOffRamp
, and TurnAtRoundabout
to reflect changes in OSRM v5.1.0 and Mapbox Directions API v5. (#45)Published by 1ec5 over 8 years ago
Changes since v0.4.0:
nil
. (#38)cancel()
cancels all outstanding tasks. (#42)Published by 1ec5 over 8 years ago
Changes since 0.3.1:
MBDirectionsRequest.requestsAlternateRoutes
. (#19)