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

Hide LanesView on navigation start #96

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

Patrick-Kladek
Copy link
Contributor

Checklist

Description

Hide LaneView when Navigation is starting but make sure it shows up if the route contains lane information

Tasks

  • don't hide LanesView by adjusting alpha value
  • let update(for visualInstruction: VisualInstructionBanner?) handle show & hide

Infos for Reviewer

NavigationView has a function showUI(animated: Bool = true) which showed the LanesView even when the route doesn't contain lane information. This function was called when navigation starts, therefore the next step view was double in size. After the first turn this view was then correctly hidden.

Because the all other views animate via alpha value, this could lead to a state where the LanesView wouldn't show up, as update(for visualInstruction: VisualInstructionBanner?) only changed the isHidden property, alpha could be still zero, which would prevent the view from appearing.

I've used a route in Berlin using Mapbox API to obtain a route which I know contains lane information. This is a recording form our app, please note that our map style doesn't contain map data in this region, thats why it's empty. The route works regardless and the important part, showing the LanesView appearing is visible.

364466824-d00dae8c-8981-4ea4-8f0f-592acfa260b3

Copy link
Collaborator

@michaelkirk michaelkirk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense - good find!

@Patrick-Kladek
Copy link
Contributor Author

@hactar can you please review as well and if approved merge it.

@hactar hactar merged commit 8c0811f into maplibre:main Sep 6, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants