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

[FEATURE] Add option to automatically retry missed tiles #1856

Open
corepuncher opened this issue Mar 20, 2024 · 2 comments
Open

[FEATURE] Add option to automatically retry missed tiles #1856

corepuncher opened this issue Mar 20, 2024 · 2 comments
Labels
feature This issue requests a new feature

Comments

@corepuncher
Copy link

What do you want implemented?

When downloading large numbers of tiles, sometimes a few are missed for whatever reason, resulting in ye olde checkerboard pattern.

However, the next time the tile layers rebuild (for example, when my timer updates with new data), all the previously missed tiles get filled in. So it appears they are "remembered" in some way. This fill-in behavior is reliable.

Instead of waiting for a rebuild (which in my case is 10 minutes later), it would be nice to have the option to automatically retry missed/failed tile downloads. It could take two parameters:

delay: The length of time to wait before retrying
retries: The number of times to retry

What other alternatives are available?

No response

Can you provide any other information?

I'd be happy to test this out, tune the parameters, etc.

Severity

Obtrusive: No workarounds are available, and this is essential to me

@corepuncher corepuncher added the feature This issue requests a new feature label Mar 20, 2024
@corepuncher
Copy link
Author

I will say that using fallbackUrl seems to really mitigate the issue. To my surprise the images remain cached, although I have been told this may be more of a flutter bug, and is not really a "fix".

In addition, another workaround I have found (especially for slow web rendering) is to split TileLayers up among CancellableNetworkTileProvider and NetworkTileProvider. I have scores of TileLayers, and for some reason, changing a portion of them to NetworkTileProvider alleviates the load somewhat, resulting in less missed tiles.

@JaffaKetchup
Copy link
Member

JaffaKetchup commented May 16, 2024

Indeed, as discussed, if fallbackUrl is still caching tiles, that could be considered a bug. See the discussion at #1629 for info.

The equality method does implement this properly, but the hashCode does not, which could be causing the bug: https://github.com/fleaflet/flutter_map/blob/master/lib%2Fsrc%2Flayer%2Ftile_layer%2Ftile_provider%2Fnetwork_image_provider.dart#L120.


Does using the reset stream make a difference? Not sure if we've already tried that. (Although it might not work, see #1808).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue requests a new feature
Projects
Status: To do
Development

No branches or pull requests

2 participants