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

WIP: Evict error tiles #577

Merged
merged 4 commits into from Mar 16, 2021
Merged

Conversation

maRci002
Copy link
Contributor

@maRci002 maRci002 commented Apr 7, 2020

Hello, this PR resolves #576 issue, this problem existed even in 0.8.2 release. Fortunately #572 made it possible to support Tile evict calls. TileLayerOptions got a EvictErrorTileStrategy enum which is currently none by default!

Maybe every TileProvider should define a default one if user not provides explicit evictErrorTileStrategy enum, forinstace #564 (-- @bugDim88 anyway what does storage tile caching do with errors? --) may want default none and others not, or MBTilesImageProvider my use none by default because if a Tile not exists on file system then maybe we shouldn't evict Tile image.

0.8.2 preview problem:
0 8 2 release

0.9.0 preview problem:
9 0 release

Preview the fix with EvictErrorTileStrategy.dispose this behaves like Leaflet if a Tile not retained anymore, and some time later Tile should be refeched this option simulates it:
9 0 release fix

Preview the fix with EvictErrorTileStrategy.notVisible:
evict not visible

closes #576

@maRci002
Copy link
Contributor Author

Ok, I think this is a little bit over engineered, maybe I should just listen for connection status (note: it only provides information if there is a network connection, but not if the network is connected to the Internet) and it should redownload the currently visible error tiles too (note: this is not true if TileProvider using filesystem). However it won't fix siituations like this #580.

@maRci002
Copy link
Contributor Author

maRci002 commented May 7, 2020

Don't merge this PR I'm going to add support for network changes soon.

@johnpryan
Copy link
Collaborator

@maRci002 what's the status on this?

@maRci002 maRci002 changed the title Evict error tiles WIP: Evict error tiles Aug 7, 2020
@maRci002 maRci002 mentioned this pull request Sep 17, 2020
@johnpryan johnpryan merged commit 6201ef9 into fleaflet:master Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tiles will not load after usage without a network
3 participants