-
Notifications
You must be signed in to change notification settings - Fork 319
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
fixes ordering of the bearings #455
Conversation
@@ -139,6 +139,7 @@ public void onMilestoneEvent(RouteProgress routeProgress, String instruction, in | |||
|
|||
@Override | |||
public void onResponse(Call<DirectionsResponse> call, Response<DirectionsResponse> response) { | |||
Timber.d(call.request().url().toString()); |
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.
Did you want to keep this log in?
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.
lets just leave it, it's in the testapp
@@ -95,14 +95,14 @@ public void fetchRouteNewOrigin(Point newOrigin) { | |||
private void fetchRoute(Point origin, Point destination) { | |||
if (origin != null && destination != null) { | |||
NavigationRoute.Builder routeBuilder = NavigationRoute.builder() | |||
.accessToken(Mapbox.getAccessToken()) | |||
.destination(destination); | |||
.accessToken(Mapbox.getAccessToken()); | |||
|
|||
if (locationHasBearing()) { | |||
fetchRouteWithBearing(routeBuilder, origin); |
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.
The builder finishes building in fetchRouteWithBearing
and fetchRouteWithoutBearing
, so in this case, the destination will never be added. Adding the destination in those methods would fix this
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.
ah good catch
routeBuilder.destination(destination); | ||
NavigationRoute.builder() | ||
.accessToken(Mapbox.getAccessToken()) | ||
.origin(origin, bearing, 90d) |
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.
Will adding a null
bearing but still including a 90 degree tolerance have any effect on the request?
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.
Shouldn't be an issue since in the directions SDK we have a check:
if(angle != null && tolerance != null) {
this.bearings.add(new Double[]{angle, tolerance});
} else {
this.bearings.add(new Double[0]);
}
if either value is null, we essentially skip the bearing value in the URL with a simple ;
which is what is specified in the spec.
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.
Sweet, looks good to go then 🚗
* cam-upgrade-project: Changed location engine imports changed to 0.2 location layer version fixes ordering of the bearings (mapbox#455) Updated Maneuver Icons (mapbox#445) Change feedback timing (mapbox#442) changed apk filepath changed sonarqube version to work with gradle 3.0 fixed a few test issues upgraded to gradle 3.0
No description provided.