Skip to content
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

Merged
merged 1 commit into from
Sep 5, 2018
Merged

Added allowsArrivingOnOppositeSide #288

merged 1 commit into from
Sep 5, 2018

Conversation

frederoni
Copy link
Contributor

Fixes #280 support approaches URL query parameter.

/cc @1ec5 @akitchen

@frederoni frederoni force-pushed the fred/approaches branch 4 times, most recently from 297495c to fa3cf9a Compare August 23, 2018 20:52
*/
@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.

Copy link
Contributor

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 👍

@frederoni frederoni force-pushed the fred/approaches branch 2 times, most recently from 5123b06 to 46379a8 Compare August 24, 2018 11:51
@frederoni frederoni requested a review from 1ec5 August 24, 2018 17:12
@@ -9,6 +9,16 @@ open class Waypoint: NSObject, NSCopying, NSSecureCoding {
return true
}

/// :nodoc:

This comment was marked as resolved.

*/
@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.

/**
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.

@frederoni frederoni force-pushed the fred/approaches branch 3 times, most recently from d65b327 to cf4b16b Compare August 28, 2018 09:31
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")
Copy link
Contributor

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.

@frederoni frederoni merged commit 5d0ed2d into master Sep 5, 2018
@frederoni frederoni deleted the fred/approaches branch September 5, 2018 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants