Traffic-aware directions and map matching in Swift on iOS, macOS, tvOS, watchOS, and Linux
ISC License
Bot releases are visible (Hide)
Published by fabian-guerra over 4 years ago
CoordinateBounds
struct in favor of BoundingBox
from Turf. (#427)VisualInstructionBanner.quaternaryInstruction
property and VisualInstruction.Component.guidanceView(image:alternativeText:)
enumeration case to represent a detailed image of an upcoming junction. (#425)Documentation is available online or within Xcode.
Published by 1ec5 over 4 years ago
RouteCompletionHandler
and MatchCompletionHandler
closures’ error
argument is now a DirectionsError
instead of an NSError
. (#382)Route
, Match
, and RouteStep
conform to the Codable
protocol, so you can create instances of them from JSON-formatted Data
using JSONDecoder
and round-trip them back to JSON using JSONEncoder
. Malformed input now throws decoding errors instead of crashing by unwrapping nil
s. (#382)Lane
class in favor of storing an array of LaneIndication
s directly in the Intersection.approachLanes
property. (#382)ComponentRepresentable
protocol, VisualInstructionComponent
class, and LaneIndicationComponent
class in favor of a VisualInstruction.Component
enumeration that contains a VisualInstruction.Component.TextRepresentation
and/or VisualInstruction.Component.ImageRepresentation
, depending on the type of component. (#382)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)MBDefaultWalkingSpeed
, MBMinimumWalkingSpeed
, and MBMaximumWalkingSpeed
constants with CLLocationSpeed.normalWalking
, CLLocationSpeed.minimumWalking
, and CLLocationSpeed.maximumWalking
, respectively.Route.coordinates
property with Route.shape
and the RouteStep.coordinates
property with RouteStep.shape
. The Route.coordinateCount
and RouteStep.coordinateCount
properties have been removed, but you can use the LineString.coordinates
property to get the array of CLLocationCoordinate2D
s. (#382)RouteLeg.source
and RouteLeg.destination
are now optional. They can be nil
when the RouteLeg
object is decoded individually from JSON. (#382)TransportType.none
, ManeuverType.none
, and ManeuverDirection.none
. Unrecognized TransportType
and ManeuverDirection
values now raise decoding errors. (#382)RouteStep.maneuverType
is now optional. (#382)Tracepoint.alternateCount
property to Tracepoint.countOfAlternatives
. (#382)Intersection.approachIndex
and Intersection.outletIndex
properties are now optional, not −1, in the case of a departure or arrival maneuver. (#393)Route
, Match
, RouteLeg
, and RouteStep
. (#393)Route
, RouteLeg
, and RouteStep
are now writable. (#393)AttributeOptions.maximumSpeedLimit
for getting maximum posted speed limits in the RouteLeg.segmentMaximumSpeedLimits
property. (#367)RouteLeg.segmentRangesByStep
property for more easily associating RouteStep
s with the values in segment-based arrays such as RouteLeg.segmentCongestionLevels
. (#367)RouteOptions.alleyPriority
property now works with DirectionsProfileIdentifier.automobile
, allowing you to request routes that prefer or avoid alleys while driving. (#416)Documentation is available online or within Xcode.
Published by 1ec5 almost 5 years ago
RouteCompletionHandler
and MatchCompletionHandler
closures’ error
argument is now a DirectionsError
instead of an NSError
. (#382)Route
, Match
, and RouteStep
conform to the Codable
protocol, so you can create instances of them from JSON-formatted Data
using JSONDecoder
and round-trip them back to JSON using JSONEncoder
. Malformed input now throws decoding errors instead of crashing by unwrapping nil
s. (#382)Lane
class in favor of storing an array of LaneIndication
s directly in the Intersection.approachLanes
property. (#382)ComponentRepresentable
protocol, VisualInstructionComponent
class, and LaneIndicationComponent
class in favor of a VisualInstruction.Component
enumeration that contains a VisualInstruction.Component.TextRepresentation
and/or VisualInstruction.Component.ImageRepresentation
, depending on the type of component. (#382)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)MBDefaultWalkingSpeed
, MBMinimumWalkingSpeed
, and MBMaximumWalkingSpeed
constants with CLLocationSpeed.normalWalking
, CLLocationSpeed.minimumWalking
, and CLLocationSpeed.maximumWalking
, respectively.Route.coordinates
property with Route.shape
and the RouteStep.coordinates
property with RouteStep.shape
. The Route.coordinateCount
and RouteStep.coordinateCount
properties have been removed, but you can use the LineString.coordinates
property to get the array of CLLocationCoordinate2D
s. (#382)RouteLeg.source
and RouteLeg.destination
are now optional. They can be nil
when the RouteLeg
object is decoded individually from JSON. (#382)TransportType.none
, ManeuverType.none
, and ManeuverDirection.none
. Unrecognized TransportType
and ManeuverDirection
values now raise decoding errors. (#382)RouteStep.maneuverType
is now optional. (#382)Tracepoint.alternateCount
property to Tracepoint.countOfAlternatives
. (#382)Intersection.approachIndex
and Intersection.outletIndex
properties are now optional, not −1, in the case of a departure or arrival maneuver. (#393)Route
, Match
, RouteLeg
, and RouteStep
. (#393)Route
, RouteLeg
, and RouteStep
are now writable. (#393)AttributeOptions.maximumSpeedLimit
for getting maximum posted speed limits in the RouteLeg.segmentMaximumSpeedLimits
property. (#367)RouteLeg.segmentRangesByStep
property for more easily associating RouteStep
s with the values in segment-based arrays such as RouteLeg.segmentCongestionLevels
. (#367)Documentation is available online or within Xcode.
Published by 1ec5 about 5 years ago
Directions.fetchAvailableOfflineVersions(completionHandler:)
and Directions.downloadTiles(in:version:completionHandler:)
now resumes the data task before returning it to conform to its naming conventions and avoid confusion. (#353)Documentation is available online or within Xcode.
Published by 1ec5 over 5 years ago
RouteOptions.alleyPriority
, RouteOptions.walkwayPriority
, and RouteOptions.speed
properties for fine-tuning walking directions. (#370)MBStringFromManeuverType()
, MBStringFromManeuverDirection()
, MBStringFromDrivingSide()
, and MBStringFromTransportType()
functions, which are intended for use in Objective-C. (#369)Documentation is available online or within Xcode.
Published by JThramer over 5 years ago
Documentation is available online or within Xcode.
Published by 1ec5 over 5 years ago
Waypoint.separatesLegs
caused the resulting RouteLeg.source
and RouteLeg.destination
to have mismatched coordinates and names. (#358)Waypoint
has Waypoint.name
set and Waypoint.separatesLegs
set to false
. (#358)Documentation is available online or within Xcode.
Published by 1ec5 over 5 years ago
Directions.downloadTiles(in:version:session:completionHandler:)
always failed with an error after passing in a CoordinateBounds
created using the CoordinateBounds(northWest:southEast:)
initializer. (#349)CoordinateBounds(southWest:northEast:)
initializer. (#349)Directions.fetchAvailableOfflineVersions(completionHandler:)
are now sorted in reverse chronological order. (#350)VisualInstruction
, VisualInstructionBanner
, VisualInstructionComponent
, LaneIndicationComponent
, and RouteOptionsV4
objects failed to roundtrip through NSCoder
. (#351)Documentation is available online or within Xcode.
Published by 1ec5 over 5 years ago
RouteOptions
object 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)Directions.calculateRoutes(matching:completionHandler:)
now sends a GET request to the Mapbox Map Matching API instead of a POST request. (#341)Directions.calculateRoutes(matching:completionHandler:)
to return an error. (#341)Directions.url(forCalculating:httpMethod:)
and Directions.urlRequest(forCalculating:)
methods for implementing custom GET- and POST-compatible request code. (#341)Waypoint.separatesLegs
property, which you can set to false
to create a route that travels “via” the waypoint but doesn’t stop there. Deprecated the MatchOptions.waypointIndices
property in favor of Waypoint.separatesLegs
, which also works with RouteOptions
. (#340)Waypoint
objects that are included in a calculated Route
s or Match
es. (#340)DirectionsResult.fetchStartDate
and DirectionsResult.requestEndDate
properties. (#335)DirectionsOptions.urlQueryItems
property so that subclasses of RouteOptions
and MatchOptions
can add any additional URL query parameters that are supported by the Mapbox Directions and Map Matching APIs. (#343)Documentation is available online or within Xcode.
Published by 1ec5 over 5 years ago
Waypoint
s and Tracepoint
s can now be compared for object equality. (#331)DirectionsResult.accessToken
and DirectionsResult.apiEndpoint
properties failed to roundtrip through NSCoder
. (#331)Route
now supports secure coding via the NSSecureCoding
protocol. (#331)Intersection
failed 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)Documentation is available online or within Xcode.
Published by 1ec5 almost 6 years ago
CoordinateBounds(_:)
to CoordinateBounds(coordinates:)
. (#325)Waypoint.targetCoordinate
property for specifying a more specific destination for arrival instructions. (#326)Waypoint.allowsArrivingOnOppositeSide
property was not copied when copying a Waypoint
object. (#326)Documentation is available online or within Xcode.
Published by 1ec5 almost 6 years ago
VisualInstructionComponent(json:)
would set VisualInstructionComponent.imageURL
to an invalid URL when the JSON representation includes an empty image URL. (#322)Documentation is available online or within Xcode.
Published by 1ec5 almost 6 years ago
Directions.apiEndpoint
and Directions.accessToken
properties that reflect the values passed into the Directions
class’s initializers. (#313)Documentation is available online or within Xcode.
Published by frederoni almost 6 years ago
RouteOptions.response(from:)
which can be used for deserializing a response from an external source.Documentation is available online or within Xcode.
Published by akitchen about 6 years ago
DirectionsResult
now includes the API response as JSONDocumentation is available online or within Xcode.
Published by JThramer about 6 years ago
Waypoint.allowsArrivingOnOppositeSide
property for restricting the side of arrival. (#288)Documentation is available online or within Xcode.
Published by vincethecoder over 6 years ago
VisualInstructionBanner.tertiaryInstruction
property for additional information to display, such as a lane configuration or subsequent turn. Renamed the VisualInstruction.textComponents
property to VisualInstruction.components
. Some of the components may be LaneIndicationComponent
objects, representing a lane at an intersection. #258
.polyline6
shape format. #281
MBAttributeOpenStreetMapNodeIdentifier
, as it is no longer being tracked by the API. This is a breaking change. #275
Documentation is available online or within Xcode.
Published by bsudekum over 6 years ago
VisualInstruction.degrees
to VisualInstruction.finalHeading
. https://github.com/mapbox/MapboxDirections.swift/pull/266
MBAttributeOpenStreetMapNodeIdentifier
. https://github.com/mapbox/MapboxDirections.swift/pull/272/
Waypoint
will now be exposed in VisualInstructionComponent
. https://github.com/mapbox/MapboxDirections.swift/pull/273
Documentation is available online or within Xcode.