- Added support for building and running on any Linux distribution supported by Swift. (#488)
- Added the
MapboxDirectionsCLIcommand line tool that round-trips Mapbox Directions API responses between JSON format and Swift model objects. (#469)
- Added the
RouteStep.segmentIndicesByIntersectionproperty for associatingIntersections with portions of the step’s shape. (#490) - Added the
Intersection.outletMapboxStreetsRoadClassproperty that indicates a more detailed road classification than the existingIntersection.outletRoadClassesproperty. (#507) - Added the
RouteLeg.incidentsproperty that indicates known traffic incidents, toll collection points, rest areas, and border crossings along the route leg. (#466, #506) - Added the
RouteLeg.regionCode(atStepIndex:intersectionIndex:)method andIntersection.regionCodeproperty to get the administrative region where an intersection is located, as well as aRouteLeg.administrativeRegionsproperty that indicates the administrative regions traversed by the route leg. (#466, #485, #506) - Added the
Intersection.tunnelName,Intersection.tollCollection,Intersection.restStop, andIntersection.isUrbanproperties. (#466, #506) - The
CongestionLevelenumeration now conforms to theCaseIterableprotocol. (#500)
- Added the
DirectionsResult.typicalTravelTime,RouteLeg.typicalTravelTimeandRouteStep.typicalTravelTimeproperties that indicate the typical travel time, as opposed to the current expected travel time. (#462) - Fixed an error that occurred when setting the
Waypoint.separatesLegsproperty totrueand setting theWaypoint.targetCoordinateproperty. (#480) Directions.fetchAvailableOfflineVersions(completionHandler:)now calls its completion handler on the main queue consistently. (#475)- Upgraded to Polyline v5.0.0. (#487)
- Added the
Directions.refreshRoute(responseIdentifier:routeIndex:fromLegAtIndex:completionHandler:)method for refreshing attributes along the legs of a route and theRoute.refreshLegAttributes(from:)method for merging the refreshed attributes into an existing route. To enable route refreshing for the routes in a particular route response, setRouteOptions.refreshingEnabledtotruebefore passing theRouteOptionsobject intoDirections.calculate(_:completionHandler:). (#420) - Fixed a crash that could occur if the Mapbox Directions API includes unrecognized
RoadClassesvalues in its response. (#450) - Fixed malformed
RouteStep.shapevalues that could occur whenRouteStep.maneuverTypeisManeuverType.arrive,DirectionsOptions.shapeFormatisRouteShapeFormat.polyline6, and the Mapbox Directions API returns certain encoded Polyline strings. (#456) - Restored the
DirectionsOptions.urlQueryItemsproperty so that subclasses ofRouteOptionsandMatchOptionscan add any additional URL query parameters that are supported by the Mapbox Directions and Map Matching APIs. (#461)
- Fixed an issue where waypoints in a
RouteResponsedid not persist theWaypoint.targetCoordinate,Waypoint.heading,Waypoint.headingAccuracy, andWaypoint.allowsArrivingOnOppositeSideproperties from the initialRouteOptionsobject.
- Fixed an issue where
RouteResponse(matching:options:credentials:)andDirections.calculateRoutes(matching:completionHandler:)resulted in misshappenRoute.shapes andRouteStep.shapes in the Atlantic Ocean ifMatchOptions.shapeFormatwas set toRouteShapeFormat.polyline6. (#437)
- Fixed an issue where decoding and reencoding a JSON-formatted response from the Mapbox Directions API would cause the
voiceLocaleproperty to be omitted from route objects. (#424) - Added the
Route(legs:shape:distance:expectedTravelTime:)andRoute(from:)initializers. (#430) - Fixed an issue where
VisualInstruction.Component.guidanceViewlacked an image URL. (#432)
- Removed the
CoordinateBoundsstruct in favor ofBoundingBoxfrom Turf. (#427) - Added the
VisualInstructionBanner.quaternaryInstructionproperty andVisualInstruction.Component.guidanceView(image:alternativeText:)enumeration case to represent a detailed image of an upcoming junction. (#425)
- Fixed an issue where
RouteResponse(matching:options:credentials:)andDirections.calculateRoutes(matching:completionHandler:)resulted in misshappenRoute.shapes andRouteStep.shapes in the Atlantic Ocean ifMatchOptions.shapeFormatwas set toRouteShapeFormat.polyline6. (#437)
- Renamed MapboxDirections.swift to Mapbox Directions for Swift. The CocoaPods pod is now named MapboxDirections, matching the module name. (#400)
- This library now requires a minimum deployment target of iOS 10.0 or above, macOS 10.12.0 or above, tvOS 10.0 or above, or watchOS 3.0 or above. Older operating system versions are no longer supported. (#379)
- Swift is now required to directly use public types and methods defined by this library. If your application is written in Objective-C or Cocoa-AppleScript, you need to implement your own wrapper in Swift that bridges to Objective-C. (#382)
- This library now depends on Turf. (#382)
- The
RouteCompletionHandlerandMatchCompletionHandlerclosures’errorargument is now aDirectionsErrorinstead of anNSError. (#382) - Classes such as
Route,Match, andRouteStepconform to theCodableprotocol, so you can create instances of them from JSON-formattedDatausingJSONDecoderand round-trip them back to JSON usingJSONEncoder. Malformed input now throws decoding errors instead of crashing by unwrappingnils. (#382)
- Removed the
Laneclass in favor of storing an array ofLaneIndications directly in theIntersection.approachLanesproperty. (#382) - Removed the
ComponentRepresentableprotocol,VisualInstructionComponentclass, andLaneIndicationComponentclass in favor of aVisualInstruction.Componentenumeration that contains aVisualInstruction.Component.TextRepresentationand/orVisualInstruction.Component.ImageRepresentation, depending on the type of component. (#382) - Added the
VisualInstruction.Component.ImageRepresentation.imageURL(scale:format:)method for fetching images with scales other than the current screen’s native scale or formats other than PNG. (#382)
- Removed support for Mapbox Directions API v4. (#382)
- Replaced the
MBDefaultWalkingSpeed,MBMinimumWalkingSpeed, andMBMaximumWalkingSpeedconstants withCLLocationSpeed.normalWalking,CLLocationSpeed.minimumWalking, andCLLocationSpeed.maximumWalking, respectively. - Replaced the
Route.coordinatesproperty withRoute.shapeand theRouteStep.coordinatesproperty withRouteStep.shape. TheRoute.coordinateCountandRouteStep.coordinateCountproperties have been removed, but you can use theLineString.coordinatesproperty to get the array ofCLLocationCoordinate2Ds. (#382) RouteLeg.sourceandRouteLeg.destinationare now optional. They can benilwhen theRouteLegobject is decoded individually from JSON. (#382)- Removed
TransportType.none,ManeuverType.none, andManeuverDirection.none. UnrecognizedTransportTypeandManeuverDirectionvalues now raise decoding errors. (#382) RouteStep.maneuverTypeis now optional. (#382)- Renamed the
Tracepoint.alternateCountproperty toTracepoint.countOfAlternatives. (#382) - The
Intersection.approachIndexandIntersection.outletIndexproperties are now optional, not −1, in the case of a departure or arrival maneuver. (#393) - Added initializers for
Route,Match,RouteLeg, andRouteStep. (#393) - Various properties of
Route,RouteLeg, andRouteStepare now writable. (#393) - Added
AttributeOptions.maximumSpeedLimitfor getting maximum posted speed limits in theRouteLeg.segmentMaximumSpeedLimitsproperty. (#367) - Added the
RouteLeg.segmentRangesByStepproperty for more easily associatingRouteSteps with the values in segment-based arrays such asRouteLeg.segmentCongestionLevels. (#367) - The
RouteOptions.alleyPriorityproperty now works withDirectionsProfileIdentifier.automobile, allowing you to request routes that prefer or avoid alleys while driving. (#416)
Directions.fetchAvailableOfflineVersions(completionHandler:)andDirections.downloadTiles(in:version:completionHandler:)now resumes the data task before returning it to conform to its naming conventions and avoid confusion. (#353)
- Added support for Swift Package Manager. (#362)
- Added the
RouteOptions.alleyPriority,RouteOptions.walkwayPriority, andRouteOptions.speedproperties for fine-tuning walking directions. (#370) - Added the
MBStringFromManeuverType(),MBStringFromManeuverDirection(),MBStringFromDrivingSide(), andMBStringFromTransportType()functions, which are intended for use in Objective-C. (#369)
- Fixed compatibility issues with Xcode 10.2 when the SDK is installed using Carthage. (#363)
- Fixed an issue where
Waypoint.separatesLegscaused the resultingRouteLeg.sourceandRouteLeg.destinationto have mismatched coordinates and names. (#358) - Fixed an issue where a Directions API or Map Matching API request would fail if a
WaypointhasWaypoint.nameset andWaypoint.separatesLegsset tofalse. (#358)
- Fixed an issue where
Directions.downloadTiles(in:version:session:completionHandler:)always failed with an error after passing in aCoordinateBoundscreated using theCoordinateBounds(northWest:southEast:)initializer. (#349) - Added a
CoordinateBounds(southWest:northEast:)initializer. (#349) - The versions passed into the completion handler of
Directions.fetchAvailableOfflineVersions(completionHandler:)are now sorted in reverse chronological order. (#350)
- Fixed issues where
VisualInstruction,VisualInstructionBanner,VisualInstructionComponent,LaneIndicationComponent, andRouteOptionsV4objects failed to roundtrip throughNSCoder. (#351)
- If a
RouteOptionsobject has exceptionally many waypoints or if many of the waypoint have very long names,Directions.calculate(_:completionHandler:)sends a POST request to the Mapbox Directions API instead of sending a GET request that returns an error. (#341) - When possible,
Directions.calculateRoutes(matching:completionHandler:)now sends a GET request to the Mapbox Map Matching API instead of a POST request. (#341) - Fixed an issue where certain waypoint names would cause
Directions.calculateRoutes(matching:completionHandler:)to return an error. (#341) - Added the
Directions.url(forCalculating:httpMethod:)andDirections.urlRequest(forCalculating:)methods for implementing custom GET- and POST-compatible request code. (#341) - Added the
Waypoint.separatesLegsproperty, which you can set tofalseto create a route that travels “via” the waypoint but doesn’t stop there. Deprecated theMatchOptions.waypointIndicesproperty in favor ofWaypoint.separatesLegs, which also works withRouteOptions. (#340) - Fixed unset properties in
Waypointobjects that are included in a calculatedRoutes orMatches. (#340) - Added
DirectionsResult.fetchStartDateandDirectionsResult.requestEndDateproperties. (#335) - Added a
DirectionsOptions.urlQueryItemsproperty so that subclasses ofRouteOptionsandMatchOptionscan add any additional URL query parameters that are supported by the Mapbox Directions and Map Matching APIs. (#343)
Waypoints andTracepoints can now be compared for object equality. (#331)- Fixed an issue where the
DirectionsResult.accessTokenandDirectionsResult.apiEndpointproperties failed to roundtrip throughNSCoder. (#331) Routenow supports secure coding via theNSSecureCodingprotocol. (#331)- Fixed an issue where
Intersectionfailed to decode when an outlet road has no road classes (i.e., a normal road that isn’t a bridge, tunnel, toll road, or motorway). (#331)
- Renamed
CoordinateBounds(_:)toCoordinateBounds(coordinates:). (#325) - Added a
Waypoint.targetCoordinateproperty for specifying a more specific destination for arrival instructions. (#326) - Fixed an issue where the
Waypoint.allowsArrivingOnOppositeSideproperty was not copied when copying aWaypointobject. (#326)
- Fixed an issue where
VisualInstructionComponent(json:)would setVisualInstructionComponent.imageURLto an invalid URL when the JSON representation includes an empty image URL. (#322)
- Added the
Directions.apiEndpointandDirections.accessTokenproperties that reflect the values passed into theDirectionsclass’s initializers. (#313) - Fixed an issue causing some requests with many waypoints or long waypoint names to fail. (#311)
- Fixed an issue where some requests with very many waypoints would fail silently. (#314)
- Added
Directions.fetchAvailableOfflineVersions(completionHandler:)for listing available offline versions. (#303) - Added
Directions.downloadTiles(in:version:session:completionHandler:)for downloading a tile pack. (#303)
- Added
RouteOptions.response(from:)which can be used for deserializing a response from an external source. (#300)
DirectionsResultnow includes the API response as JSON
- Added
Waypoint.allowsArrivingOnOppositeSideproperty for restricting the side of arrival. (#288)
- Added the
VisualInstructionBanner.tertiaryInstructionproperty for additional information to display, such as a lane configuration or subsequent turn. Renamed theVisualInstruction.textComponentsproperty toVisualInstruction.components. Some of the components may beLaneIndicationComponentobjects, representing a lane at an intersection. (#258) - Fixed a bug which caused coordinates to be off by a factor of 10 when requesting
.polyline6shape format. (#281) - Removed
MBAttributeOpenStreetMapNodeIdentifier, as it is no longer being tracked by the API. This is a breaking change. (#275)
- Renamed
VisualInstruction.degreestoVisualInstruction.finalHeading. (#266) - Removed support for
MBAttributeOpenStreetMapNodeIdentifier. (#272) - A named
Waypointwill now be exposed inVisualInstructionComponent. (#273)
- Banner instructions object now includes a
degreesfield, corresponding to the location at which the user should exit a roundabout. (#259) - Also introduces a
VisualInstructionBannerobject which now contains the primary and secondaryVisualInstructionobjects. (#259)
- Fixed an issue that caused a warning when using Swift 4.1. (#254, #255)
- Added types
.exitand.exitCodestoMBVisualInstructionType. (#252) - Made an initializer on
MBLanepublic. (#253)
This release includes the ability to make a Mapbox Map Matching request.
CompletionHandlerhas been renamed toRouteCompletionHandlerto give room forMatchCompletionHandler.
- Added new class
Match. AMatchobject defines a single route that was created from a series of points that were matched against a road network. - Added new class
MatchOptions. AMatchOptionsobject is a structure that specifies the criteria for results returned by the Mapbox Map Matching API. - Added
Directions.calculate(matchOptions:completionHandler:)which returns aMatch. - Added
Directions.calculateRoutes(matching:completionHandler:). This is useful for creating aRoutefrom a map matching request.
- Added support for abbreviations to
VisualInstructionComponents. (#244) - Added new types to
VisualInstructionComponentType. (#243)
- Added
ManeuverTypeandManeuverDirectiontoVisualInstructionComponents(#239)
RouteStep.drivingSideis now safely unwrapped for cases where the value is missing from the response. (#233)- Added
.tunnelas a validRoadClass. (#237) - Added
.speechLocaletoRoutefor deciphering whichLocaleto use for speaking voice instructions. (#235)
- The
maneuverType,maneuverDirection, andtransportTypeproperties ofRouteStepare now available in Objective-C code. The properties are no longer optional in Swift; check forManeuverType.none,ManeuverDirection.none, andTransportType.noneinstead ofnil. (#227)
- API Response parser now handles API JSON response containing empty waypoint names correctly. (#222)
- Added property
drivingSidetoRouteStepthat indicates which side of the road cars and traffic flow. (#219) - Fixed a bug where named
Waypointswere having their names stripped from the response. (#218) - Moved the class
SpokenInstructionfrom private to open for easier testability. (#216)
- Added a
RouteOption.roadClassesToAvoidproperty that avoids toll roads, motorways, or ferries. (#180) - The return value of
Directions.calculate(_:completionHandler:)can be implicitly discarded. (#209)
- Upgraded the project to Swift 4. A final Swift 3.2 version is v0.12.1 and is also available on the branch
swift3.2. (#196)
- Fixed an issue preventing
Routeobjects archived prior to v0.12.0 from unarchiving. (#204)
- The
RouteOptions.localeproperty now defaults to the current system locale and is no longer optional in Swift or nullable in Objective-C. (#202) - The
RouteOptionsclass now conforms to theNSCopyingprotocol. (#200) - Fixed an issue preventing the
RouteOptions.distanceMeasurementSystemproperty from round-tripping after theRouteOptionsobject is encoded and decoded. (#200) - Clarified the factors that may affect the
RouteStep.expectedTravelTimeproperty’s accuracy. (#193)
- Changed
RouteOptions.includesVoiceInstructionstoRouteOptions. includesSpokenInstructions.
- Fixed a bug when decoding a
Route, if the route did not include alocaleoption, it would fail. (#187)
- Added
instructionsSpokenAlongSteptoRouteOptions. This can be used for getting voice instructions for aRouteStep(#175) - Added
localetoRouteOptions. This can be used for setting the language settings for instructions on aRouteStep. (#176)
- Fixed build errors in Xcode 9. (#183)
- Added
RouteStep.phoneticNamesandRouteStep.phoneticExitNamesfor providing speech synthesizers with accurate road name pronunciation data. (#174)
- Added a
RouteShapeFormat.polyline6option for enhanced route line precision. (#167) - Added a
RouteOptions.includeExitRoundaboutManeuveroption to get separate steps for entering and exiting each roundabout. (#168, #169)
- Added a
RouteShapeFormat.polyline6option for enhanced route line precision. (#167) - Added a
RouteOptions.includeExitRoundaboutManeuveroption to get separate steps for entering and exiting each roundabout. (#168, #169)
- Added a
Route.routeIdentiferproperty that contains the unique identifier associated with the network request that created the route. (#165)
- While the debugger is paused, you can visually inspect
Route,RouteLeg,RouteStep, andWaypointobjects using Xcode’s built-in Quick Look feature. (#152) - Fixed an issue causing an exit with multiple exit numbers to correspond to only a single item in the
RouteStep.exitCodesproperty. (#149) - Added an
Intersection.outletRoadClassesproperty that provides details about the road leading away from the intersection. (#154, #157) - Added properties to
Routethat indicate the access token and API endpoint of theDirectionsobject that created the route. (#155)
- Added an
AttributeOptionsoption,congestion, for obtaining the level of traffic congestion along each segment of aRouteLeg. (#123) - Added a
RouteStep.exitCodesproperty that contains the exit number of atakeOffRampmaneuver. (#147) - Renamed
Directions.urlForCalculating(_:)tourl(forCalculating:)to adhere to Swift 3 naming conventions. (#138) - If any of the waypoints of
RouteOptionsis named, those names persist in theRouteLegs’ waypoints. - Fixed an issue causing
RouteSteps to fail to decode if themaneuverDirectionwas omitted or unrecognized. (#137) - Changed the raw values of the
AttributeOptionsoptions. (#123)
RouteOptionsnow conforms toNSSecureCoding. (#129)- Multiple
AttributeOptionsvalues can be specified simultaneously in oneRouteOptionsobject. (#129)
- Added an option to RouteOptions for obtaining attributes about each node or segment between nodes in the returned route legs. Available attributes include expected speed and travel time. (#118)
- Replaced Route’s
profileIdentifierproperty with arouteOptionsproperty set to the RouteOptions object that was used to obtain the route. (#122)
- Improved Swift 3.1 compatibility. (#119, raphaelmor/Polyline#43)
- Migrated to Swift 3.0. If your application is written in Swift 2.3, you should stick to v0.7.x or use the swift2.3 branch. (#57)
- Fixed an issue causing the error “The sandbox is not in sync with the Podfile.lock” when updating a Carthage-based project that requires this framework. (#102)
- Replaced the profile identifier constants with the
MBDirectionsProfileIdentifierextensible string enumeration, which is available to both Objective-C and Swift. (#106)
- Migrated to Swift 2.3.
- Fixed an error that occurred when archiving an application that links to this library. (#108)
- Added the profile identifier constant
MBDirectionsProfileIdentifierAutomobileAvoidingTrafficfor driving routes that avoid traffic congestion. (#86) - Replaced RouteStep’s
nameproperty with anamesproperty; each string in the array is a road name that was previously delimited by a semicolon. (#91) - Added a
codesproperty to RouteStep that contains any highway route numbers associated with the road. These are the same route numbers that were formerly parenthesized in thenameproperty. (#91) - Added a
destinationsproperty to RouteStep that indicates a highway ramp’s signposted destination. (#63) - Added an
intersectionsproperty to RouteStep that indicates the locations and configurations of each intersection along the step, including turn lane markings. (#80) - Added
UseLaneandTakeRotarymaneuver types, which indicate an instruction to change lanes or enter a large, named roundabout, respectively. (#93) - Fixed a crash that could occur when the user is connected to a captive network. (#71)
- Fixed a crash that occurred when a request failed due to rate limiting. (#103)
- The Route, RouteLeg, and RouteStep classes now conform to the NSSecureCoding protocol. (#68)
- Added convenience initializers to RouteLeg and RouteStep that accept a JSON dictionary formatted as the relevant part of a Mapbox Directions API response. (#92)
- The user agent string sent by the Mac version of this library now says “macOS” instead of “OS X”. (#55)
This is a complete rewrite of mapbox-directions-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:
- Most types and methods can now be used in Objective-C.
- Removed the
MBclass prefix from Swift but kept it for Objective-C. If any type conflicts with a type in your application’s module, prefix it withMapboxDirections.. - Added a shared (singleton)
Directionsobject. Use the shared object if you’ve set your Mapbox access token in theMGLMapboxAccessTokenkey 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 aDirectionsobject with the access token explicitly. - Simplified the networking part of the library:
- Removed the dependency on RequestKit. If you’re upgrading to this version using CocoaPods, you can remove the
NBNRequestKitdependency override. Directionsno 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 theURLForCalculatingDirections(options:)property.- A single directions object uses the shared URL session for all requests, so it can handle multiple requests concurrently without raising an exception.
- Removed the
cancel()method; instead, directly cancel the NSURLSessionDataTask returned bycalculateDirections(options:completionHandler:).
- Removed the dependency on RequestKit. If you’re upgrading to this version using CocoaPods, you can remove the
- Replaced
calculateDirectionsWithCompletionHandler(_:completionHandler:)andcalculateETAWithCompletionHandler(_:completionHandler:)with a singlecalculateDirections(options:completionHandler:)method, which takes aRouteOptionsobject that supports all the options exposed by the Geocoding API. If you need to use Mapbox Directions API v4, use aRouteOptionsV4instead ofRouteOptions. - Steps are no longer returned by default, and the overview geometry is simplified by default. If you want full, turn-by-turn directions, configure the
RouteOptionsobject 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 inRouteOptions. - Replaced the
MBDirectionsRequest.TransportTypetype with a freeformprofileIdentifieroption. Use one of the three profile identifier constants with this option. - Removed the
MBDirectionsResponseclass in favor of passing the waypoints and routes from the response directly into the completion handler. - Renamed
Route.geometrytoRoute.coordinates. For Objective-C compatibility, there are additional methods that work with C arrays of coordinates. - Each enumeration’s raw values are integer types instead of strings, but the enumerations also conform to
CustomStringConvertiblein Swift, allowing the enumeration values to be converted to and from strings easily.
Other changes since v0.5.0:
- Added official support for OS X, tvOS, and watchOS. (#49)
- Added documentation for the entire library. You can access the documentation for any symbol using Quick Help (option-click) or Jump to Definition (command-click). (#47)
- Replaced the
TakeRampmaneuver type withTakeOnRamp,TakeOffRamp, andTurnAtRoundaboutto reflect changes in OSRM v5.1.0 and Mapbox Directions API v5. (#45) - Added options to configure what’s included in the output, how close the route needs to come to the specified waypoints, and whether to include routes that U-turn at intermediate waypoints. (#47)
- Added a way to specify the heading accuracy of any waypoint. (#47)
- By default, returned routes may U-turn at intermediate waypoints. (#47)
- Various error conditions returned by the API, such as the rate limiting error, cause the localized failure reason and recovery suggestion to be set in the NSError object that is passed into the completion handler. (#47)
- Requests sent through this library now use a more specific user agent string, so you can more easily identify this library on your Statistics page in Mapbox Studio. (#50)
- Updated Directions API v5 support to reflect late-breaking changes to the API. (#40)
- Distinguished between requested transport types and transport types in the response. Each route step in a returned route may have a different transport type. (#40)
- Route lines returned by the Directions API are now polyline-encoded instead of GeoJSON-encoded, so your application receives directions faster with less data usage (#27)
- Fixed a crash that occurred when encountering an unrecognized maneuver type from the Directions API. The API reserves the right to add new maneuver types at any time. Now unrecognized maneuver types resolve to
nil. (#38) - Route summaries are synthesized on the client side when absent from routes returned from the server. (#40)
- A single MBDirections object can manage multiple concurrent requests.
cancel()cancels all outstanding tasks. (#42)
- Added support for Mapbox Directions API v5. (#23, #25) Some highlights:
- An MBRoute now contains one or more MBRouteLegs, each of which contains one or more MBRouteSteps. A route leg connects two waypoints.
- The arrival step now announces the side of the street that contains the destination, if available.
- Specify an initial heading to avoid getting directions that begin opposite the current course.
- Start and end headings are provided for most steps.
- The library is now packaged as a dynamic framework, MapboxDirections.framework, rather than a collection of standalone Swift files. (#24)
- Added support for getting the estimated travel time to a destination. (#17)
- Added support for intermediate waypoints. (#16)
- Added support for specifying a custom profile identifier beyond the standard driving, biking, and walking profiles. (#15)
- An alternative route is no longer requested by default but can be requested by setting
MBDirectionsRequest.requestsAlternateRoutes. (#19) - Fixed a crash that occurred when the departure step required a turn. (#24)
No notable changes.
No notable changes.
- Removed the use of SwiftyJSON.
- Updated the API endpoint URL. (#5)
Initial release.