-
-
Notifications
You must be signed in to change notification settings - Fork 861
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
Add a fastReplace option to TileLayerOptions. #781
Conversation
Haven't had chance to test yet, but my main test would be how it acts on pinch/zoom. The old flutter_map flickered a lot due to the problem, so I think it may be a step back if that is impacted, but there again, if it's just an option and clearly marked that it may cause flicker, I guess it feels ok. I did some testing with this stuff a while back and it felt like you had to have at least one of.. |
Thanks for the feedback, @ibrierley! You're right, there is noticeable flickering when using pinch-to-zoom, particuarly when the layer is not yet cached: the GIF below shows this when zooming in, then the flickering does become less noticeable when zooming back out again. I've updated the option documentation to note this caveat. |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
55a1c71
to
5f857e1
Compare
I've rebased this PR, I'm still using this change in my own fork, but I'd love if it could be merged here, instead. 🙂 |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
5f857e1
to
f7b064c
Compare
Okay stalebot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@pento Thanks for the contribution! |
Based on this comment, this PR adds a
fastReplace
option toTileLayerOptions
.The purpose of this option is to force tiles to be removed as soon as their replacement tile is ready, skipping
tileFadeIn*
options, as well as the hardcoded delay in_tileReady()
.Screenshots
These screenshots are based on this config: the top layer (the place names) uses transparent tiles.
Before
Note how different zoom levels of the top layer are visible at the same time while zooming.
After
It no longer shows multiple zoom levels at the same time, though there is sometimes a small flicker where no tile is visible at all, even after the tiles have been cached. I'm happy to make adjustments if there's a way to avoid this, but otherwise, I think this is an improvement.