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

Investigate routes blinking when selecting alternatives #2473

Closed
Guardiola31337 opened this issue Feb 12, 2020 · 5 comments
Closed

Investigate routes blinking when selecting alternatives #2473

Guardiola31337 opened this issue Feb 12, 2020 · 5 comments
Assignees
Milestone

Comments

@Guardiola31337
Copy link
Contributor

As commented in #2452 (review)

Noticed a blinking behavior when switching routes when running the SimpleMapboxNavigationKt example from the examples test app 👀

simple_mapbox_navigation_kt_leak

Thought that was fixed in #2262

Maybe a different setup for SimpleMapboxNavigationKt?

cc @LukasPaczos @kmadsen

@Guardiola31337
Copy link
Contributor Author

Maybe we can fix as part of #2464? cc @RingerJK

@RingerJK
Copy link
Contributor

@Guardiola31337 I'll take a look, but if it leads to make huge changes better do fix in separate PR

@LukasPaczos
Copy link

The issue is with a way we set the DirectionsRoute into the legacy NavigationMapRoute. Right now, we're calling navigationMapRoute?.addRoutes(routes) which is going to completely redraw the layers.

NavigationMapRoute#addRoutes should internally check if the provided DirectionsRoutes references are the same but the in a different order and only change the underlying GeoJsonSources instead of always redrawing all of the layers.

@Guardiola31337
Copy link
Contributor Author

@RingerJK

I'll take a look, but if it leads to make huge changes better do fix in separate PR

Of course! I wanted to put this on your radar so you could 👀 as you're working on #2464 🍍

@Guardiola31337
Copy link
Contributor Author

The issue is with a way we set the DirectionsRoute into the legacy NavigationMapRoute. Right now, we're calling navigationMapRoute?.addRoutes(routes) which is going to completely redraw the layers.

NavigationMapRoute#addRoutes should internally check if the provided DirectionsRoutes references are the same but the in a different order and only change the underlying GeoJsonSources instead of always redrawing all of the layers.

That makes sense. Thanks for clarifying @LukasPaczos 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants