-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added allowsArrivingOnOppositeSide #288
Conversation
297495c
to
fa3cf9a
Compare
MapboxDirections/MBWaypoint.swift
Outdated
*/ | ||
@objc public init(coordinate: CLLocationCoordinate2D, coordinateAccuracy: CLLocationAccuracy = -1, name: String? = nil) { | ||
@objc public init(coordinate: CLLocationCoordinate2D, coordinateAccuracy: CLLocationAccuracy = -1, name: String? = nil, allowsArrivingOnOppositeSide: Bool = true) { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a good idea 👍
5123b06
to
46379a8
Compare
MapboxDirections/MBWaypoint.swift
Outdated
@@ -9,6 +9,16 @@ open class Waypoint: NSObject, NSCopying, NSSecureCoding { | |||
return true | |||
} | |||
|
|||
/// :nodoc: |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
MapboxDirections/MBWaypoint.swift
Outdated
*/ | ||
@objc public init(coordinate: CLLocationCoordinate2D, coordinateAccuracy: CLLocationAccuracy = -1, name: String? = nil) { | ||
@objc public init(coordinate: CLLocationCoordinate2D, coordinateAccuracy: CLLocationAccuracy = -1, name: String? = nil, allowsArrivingOnOppositeSide: Bool = true) { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
MapboxDirections/MBWaypoint.swift
Outdated
/** | ||
A boolean value indicating whether arriving on opposite side is allowed. | ||
|
||
This parameter can only be used in combination with `RouteOptions.includesSteps` = true. |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
d65b327
to
cf4b16b
Compare
routeOptions.includesSteps = true | ||
let params = routeOptions.params | ||
let approaches = params.filter { $0.name == "approaches" }.first! | ||
XCTAssert(approaches.value! == "unrestricted;curb;unrestricted", "waypoints[1] should be restricted to curb") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: use XCTAssertEqual(_:_:)
for a more precise assertion message.
cf4b16b
to
ead055b
Compare
Fixes #280 support
approaches
URL query parameter./cc @1ec5 @akitchen