Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add route refresh #2570
Add route refresh #2570
Changes from all commits
7c87897
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This is a pain to find. I had to ask in #directions to figure it out
https://mapbox.slack.com/archives/C03KW1JQD/p1583881618015100
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.
Updating this feature to be enabled automatically with traffic profiles because that's the only place it's supported.
https://mapbox.slack.com/archives/C03KW1JQD/p1583883018020600?thread_ts=1583881618.015100&cid=C03KW1JQD
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.
Is this a good idea? Wondering if we should implement something similar to faster route in which we expose the route to the client and it's up to them to use it or not, instead of us always doing it internally 🤔
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.
Should we update the
MapboxDirectionsSession#routes[0]
too 🤔? Actually, updating theMapboxDirectionsSession#routes
will end up updatingMapboxTripSession#route
👀mapbox-navigation-android/libnavigation-core/src/main/java/com/mapbox/navigation/core/MapboxNavigation.kt
Lines 440 to 448 in 1656229
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.
Also noticed that we're updating the whole route in NN
mapbox-navigation-android/libnavigation-core/src/main/java/com/mapbox/navigation/core/trip/session/MapboxTripSession.kt
Line 45 in 1656229
RouteHandler
. Do you know if this has a performance impact? Probably yes because it's not the same to serialize the whole route rather than only updating the annotations of the current route.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.
looking into update the annotations only now, i did try before but that was early on.
considered performance impacts and considered it minor since it's per minutes (opposed to per seconds)
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.
Another note is that legacy doesn't only update the navigator annotations. It also updates the entire route
https://github.com/mapbox/mapbox-navigation-android/blob/master/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/internal/navigation/RouteRefresherCallback.kt#L17
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.
Nah, that's not correct 👀
mapbox-navigation-android/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/internal/navigation/RouteHandler.kt
Lines 18 to 26 in cd4d864
NEW_ROUTE
mapbox-navigation-android/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/internal/navigation/RouteRefresherCallback.kt
Line 17 in cd4d864
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.
Yeah discussed offline, now see how fresh_route causes the condition in RouteHandler
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.
When attempting to only update annotations in NN, it didn't update the the traffic on the map.