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

Android: Location puck switch icon on rotating camera #2879

Closed
Fabi755 opened this issue Sep 27, 2024 · 7 comments
Closed

Android: Location puck switch icon on rotating camera #2879

Fabi755 opened this issue Sep 27, 2024 · 7 comments
Labels
android bug Something isn't working

Comments

@Fabi755
Copy link

Fabi755 commented Sep 27, 2024

Describe the bug
We have a really strange behavior of the location icon. And I am at the end of my ideas.

I'm currently working on upgrading the MapLibre navigation to v11. After upgrade (from v11.0.2-pre0) to v11.1.0 (and above) the location puck gets flickering by rotating. After more research we found out that the icon goes to the maplibre_user_stroke_icon drawable. The puck is going back to the right drawable, when zoom in/out, or update the location.

The maplibre_user_stroke_icon is used by two styles (maplibre_backgroundDrawable & maplibre_backgroundDrawableStale). Changing the styles has no effect to displayed icon in my tests.

I can't see this issue on the sample app (build from source). But I see this issue also in a new project from scratch. I can't see this issue on my Emulator running on a Mac.

To Reproduce

Steps to reproduce the behavior:

  1. Clone my sample repository
  2. Run app on a real device
  3. Allow using location, to make things work
  4. Rotate map
  5. Puck is flickering between GPS puck and red dot (maplibre_user_stroke_icon)

(Use the enable/disable) button to see the stroke-icon state, without location updates. If disabled, only zoom in/out goes back to the GPS puck.

Expected behavior
Icon should not changed to the stroke icon, and the GPS puck should always showed.

Screenshots

maplibre-issue-sample.mp4

Platform information (please complete the following information):

  • OS: Android
  • Platform: Android
  • Version: MapLibre 11.1.0 - 11.5.0

Additional context

@alasram
Copy link
Collaborator

alasram commented Oct 18, 2024

I'm having the exact same problem but it's only reported in 11.5. (11.1 seems to not have this issue)

@alasram
Copy link
Collaborator

alasram commented Oct 21, 2024

The VAO of the Drawable is changing which means we're running vertex input commands outside the drawable that are affecting the bound VAO.
A solution is to unbind the VAO after drawing but a correct solution would ensure we never run commands that affect VAO outside a Drawable object.
This code works for me:
alasram@473fdfa

@louwers
Copy link
Collaborator

louwers commented Oct 22, 2024

@alasram Could you make a PR?

@boldtrn
Copy link
Collaborator

boldtrn commented Nov 5, 2024

Does merging #2957 close this issue?

@alasram
Copy link
Collaborator

alasram commented Nov 5, 2024

@boldtrn @Fabi755 Can you confirm the issue is fixed in Android v11.6.1? We can then close the issue

@boldtrn
Copy link
Collaborator

boldtrn commented Nov 7, 2024

I could not repro the issue with 11.6.1. Let's wait for confirmation of @Fabi755 as well.

@Fabi755
Copy link
Author

Fabi755 commented Nov 7, 2024

Is fixed. Works well with 11.6.1. Thank you!! 💙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants