-
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
Persist routes across style changes #2262
Conversation
The issue is caused with style changes handling logic in |
2e8a7b6
to
584c017
Compare
This is ready for review, but we cannot merge until @pozdnyakov's fix is available in a Map SDK's patch. |
Codecov Report
@@ Coverage Diff @@
## master #2262 +/- ##
============================================
+ Coverage 32.92% 32.97% +0.05%
- Complexity 621 627 +6
============================================
Files 143 143
Lines 5492 5519 +27
Branches 417 420 +3
============================================
+ Hits 1808 1820 +12
- Misses 3488 3505 +17
+ Partials 196 194 -2 |
The corresponding GL-Native issue is at https://github.com/mapbox/mapbox-gl-native-team/issues/108 and the fix is at mapbox/mapbox-gl-native#15941 |
7774d1e
to
6d65f05
Compare
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 looking good, great work @LukasPaczos
Nice refactoring out of MapboxMap
into Style
💯 ❤️
As soon as we get the Maps final release we can merge here 🚀
…er style change This prevents the route layers from blinking when restoring the collection.
6d65f05
to
08a8be4
Compare
Bumped Maps version to |
@@ -37,6 +37,7 @@ allprojects { | |||
jcenter() | |||
maven { url 'https://plugins.gradle.org/m2' } | |||
maven { url 'https://mapbox.bintray.com/mapbox' } | |||
// maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local/' } |
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.
Minor thing: Should we remove?
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 left it for ease of use in the future. So that we don't have to look up the reference every time 😅
This PR fixes #2039 by caching the currently drawn routes/waypoints and reusing those same geometries immediately when the new style is loaded.
As you can see, the transitions are smooth, besides the first style change after
NavigationMapRoute
creation. @pozdnyakov and I are looking into the root cause.