Open orkun1675 opened 1 month ago
Hi, are you using the latest renderer for Google Maps? It's a known issue. Let me know if this issue persists even when using the legacy renderer.
I just updated the package to use the latest flutter and dependencies on v0.0.8
Thanks @landxcape !
I've tested with 0.0.8
using the example app on Android Emulator, iOS Emulator, Pixel 8, iPhone SE. The only one that had the flickering issue was Pixel 8.
https://github.com/user-attachments/assets/c200cc6f-2403-4f62-8a65-fedbc4306e52
I have not tried switching to the legacy renderer. I didn't know this was an option until now. Would you recommend doing so, especially given the legacy renderer deprecation announcement? Are folks still using the legacy renderer for production apps?
Issues I was able to find regarding the flickering issue:
I've tested with the legacy renderer which does fix the issue.
See: https://github.com/landxcape/animated_marker/compare/main...orkun1675:animated_marker:main
However, this workaround changes the look and feel of the map quite drastically:
https://github.com/user-attachments/assets/ace84b7a-c4df-4914-9e34-856a218655ca
Just to confirm did updating to v0.0.8 fix the issue with the default renderer? because when I made this, the default was still the legacy renderer and I had that issue when I tried to manually change it to the latest. so I updated the google_flutter_map to its latest on v0.0.8 and recreated the example app which did not have this flickering issue while testing on my phone (Oneplus 7)
Ohh okay, the issue is still there when zooming and panning around. for now, the issue is still with the latest renderer. Another workaround should be reducing the fps. I'll try that and see if it solves the issue, but that will create another one of having low fps.
Thanks for looking into this! If low FPS can be used as a workaround that would work for our use case.
Hi, I have pushed the latest update, v0.1.0. Here #8, I have removed the use of AnimationController, which does not let us change FPS, and completely switched to Timer and StreamController while properly handling Timer's disposal. Did lowering the FPS have any improvements in your context besides performance gain?
Thank you for your work on this @landxcape !
I've tested with 0.1.0
and found that the flicker is still there for FPS values 30, 10, and 5; but dissapears at FPS values 2 and 1. Note that flickering decreases drastically as FPS is lowered.
However, since flickering is so distracting from a UX point of view we won't be turning it on for Android until Google Maps fixes the underlying bug.
I've also noticed a regression with 0.1.0
: the marker appears a few seconds late (after the map loads). This makes it appear like the marker is missing for a few seconds.
Thank you too for the suggestions and tests as well.
so, Is it working fine on IOS?
I'll look into the markers appearing late.
I forgot to add animated markers to the markers stream before the animation started in v0.1.0. So I fixed it by adding it to initState with addPostFrameCallback to ensure all the markers are immediately added to the stream after the map builds in v0.1.2.
You could also try the legacy renderer for Android if it does not impact much but I have experienced performance issues with legacy. I hope the Flutter team fixes this soon.
Thanks for the quick turnaround!
so, Is it working fine on IOS?
Yes, no noticeable issues on iOS.
So I fixed it by adding it to initState with addPostFrameCallback to ensure all the markers are immediately added to the stream after the map builds in v0.1.2.
I've tested with 0.1.2
and the marker delay is fixed for staticMarkers
but continues to be a problem for animatedMarkers
.
I am using the latest version: 0.1.2 and I wrapped google map with animated_marker and streambuilder. when there is an update in the stream, the markers flicker on the screen. Also, the markers dont move from one location to abother, rather, they go around in circles
I know this isnt the right thing to say in this thread but can you make it animate along a path I am trying to get the uber car animation
hi @Inihood1, could you create a new issue for this? as for the StreamBuilder, is the animation duration less than the stream update interval? if the animation duration is longer than the updates from the stream, the markers will lag and won't be able to follow the path properly, it will take the shortest path from where it is in the animation to the new position.
Hi @orkun1675, I couldn't replicate the same issue but have adjusted the initial animated markers not properly working when they are updated before the animation ends. Could you check if the issue still exists on v0.1.3?
Hi @landxcape, Marker delay is fixed in 0.1.3
but came back in 0.1.4
. We were able to upgrade to 0.1.3.
for now.
The marker is flashing (dissapearing and reappearing in the next frame) when it is being animated.
This was discovered a month ago using
v0.0.7
.Are you aware of this issue? Or maybe it has something to do with our implementation?
I'll try to supply a minimum repoduceable example when I get the chance.