Significant lag/drift with MarkerView on Android when panning #4137
Unanswered
andrewmyersdev
asked this question in
Q&A
Replies: 1 comment
-
|
Worth noting the performance is exactly the same if a single marker or 30+. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm experiencing a significant synchronization issue with MarkerView on Android using rnmapbox/maps. When panning or zooming the map, the markers lag behind the map movement, appearing to "float" or drift away from their coordinate before snapping back into place once the map movement stops. This does not happen on iOS, where the markers track perfectly.
I initially tried using PointAnnotation, but I needed to implement a continuous pulsing animation. Since PointAnnotation renders its children to a static bitmap on Android (preventing continuous animation), I switched to MarkerView to support the Animated views. However, the performance/synchronization on Android is creating a poor user experience.
Environment:
Device: Android Emulator / Android Device
React Native: 0.81.5
Expo: ~54.0.31 (SDK 54)
rnmapbox/maps: ^10.2.10
Code Snippet:
What I've observed:
PointAnnotation: Renders correctly and sticks to map, but animations (Animated.View) are frozen/static on Android because of the bitmap snapshotting.
MarkerView: Animations play perfectly, but the view position lags significantly behind the map camera updates during gestures.
Has anyone found a workaround to improve the synchronization of MarkerView on Android, or a way to get performant continuous animations working with PointAnnotation (or another method) without the drift?
I've created an example here: https://github.com/andrewmyersdev/example-marker-view-lag
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions