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

Leg source and destination are mismatched when route contains trackpoint or silent waypoint #556

Closed
1ec5 opened this issue Jun 28, 2021 · 2 comments
Labels
bug map matching Map Matching API
Milestone

Comments

@1ec5
Copy link
Contributor

1ec5 commented Jun 28, 2021

When the RouteOptions contains a waypoint whose separatesLegs property is set to false, the resulting route’s legs have mismatching source and destination property values, as though the separatesLegs property were set to true.

The following code should pass DirectionsOptions.legSeparators into Array.populate(waypoints:), rather than passing in DirectionsOptions.waypoints:

let waypoints = options.waypoints
legs.populate(waypoints: waypoints)

This regression of #358 was introduced by #406.

/cc @mapbox/navigation-ios @ZiZasaurus

@1ec5 1ec5 added the bug label Jun 28, 2021
@1ec5 1ec5 added this to the v2.0.0 (GA) milestone Jun 28, 2021
@1ec5
Copy link
Contributor Author

1ec5 commented Jun 28, 2021

This issue is even more likely to affect Map Matching API usage, because any trackpoint would be handled like a Directions API silent waypoint.

@1ec5 1ec5 added the map matching Map Matching API label Jun 28, 2021
@1ec5 1ec5 changed the title Leg source and destination are mismatched when route contains silent waypoint Leg source and destination are mismatched when route contains trackpoint or silent waypoint Jun 28, 2021
@1ec5 1ec5 added the quick fix label Jun 28, 2021
@1ec5
Copy link
Contributor Author

1ec5 commented Jul 20, 2021

Fixed in #560.

@1ec5 1ec5 closed this as completed Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug map matching Map Matching API
Projects
None yet
Development

No branches or pull requests

1 participant