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
Guardiola31337
left a comment
There was a problem hiding this comment.
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 |
| 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.
Minor thing: Should we remove?
There was a problem hiding this comment.
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
NavigationMapRoutecreation. @pozdnyakov and I are looking into the root cause.