-
Notifications
You must be signed in to change notification settings - Fork 90
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
Enable alleyPriority for automobile routing #416
Conversation
Until this PR lands, or in v0.38, you can work around the lack of alley priority support while driving by subclassing |
Now that the |
These changes look good to me aside from fixing the tests. |
78fb76b
to
e0690f7
Compare
I’ve updated the tests. |
@@ -110,7 +110,7 @@ open class RouteOptions: DirectionsOptions { | |||
/** | |||
A number that influences whether the route should prefer or avoid alleys or narrow service roads between buildings. | |||
|
|||
This property has no effect unless the profile identifier is set to `DirectionsProfileIdentifier.walking`. | |||
This property has no effect unless the profile identifier is set to `DirectionsProfileIdentifier.automobile` or `DirectionsProfileIdentifier.walking`. |
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.
Maybe with this change it now make sense to set alleyPriority
to .low
by default if current profile is .automobile
?
It alters current behavior, but maybe that is what we wanted with this change?
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.
I think the application or maybe the navigation SDK should be responsible for making that decision. As much as possible, MapboxDirections should align with the Directions API defaults. But the navigation SDK does vend a NavigationRouteOptions subclass that could set the alleyPriority
to .low
for .automobile
.
The
RouteOptions.alleyPriority
property now works withDirectionsProfileIdentifier.automobile
in addition toDirectionsProfileIdentifier.walking
./cc @mapbox/navigation-ios @avi-c