Skip to content

Keep tiles for a short time before pruning to stop grey screen#190

Closed
ibrierley wants to merge 1 commit into
fleaflet:masterfrom
ibrierley:master
Closed

Keep tiles for a short time before pruning to stop grey screen#190
ibrierley wants to merge 1 commit into
fleaflet:masterfrom
ibrierley:master

Conversation

@ibrierley

Copy link
Copy Markdown
Contributor

This helps with grey screen where tiles are pruned before new ones loaded, by adding keepTileDelay = 1200 as an option. It keeps a Map as a cache, with the time it was added, and then after the time set in keepTileDelay removes it from the cache & marks the tile false in _tiles, so it can then get pruned.

I think a better future solution may use a callback instead of a time limit, when the images have finished downloading, before pruning, but I don't see a way to do that currently.

This helps with grey screen where tiles are pruned before new ones loaded, by adding keepTileDelay = 1200 as an option
@ganisback

Copy link
Copy Markdown

@johnpryan can you approve this pr? that we can test it in master branch

@WoodenPC

Copy link
Copy Markdown

Merged your commit for testing. After i zoom in, old tiles are still showed(1.2s passed) until i moved a map

@ibrierley ibrierley closed this Jan 22, 2019
@johnpryan

Copy link
Copy Markdown
Collaborator

Sorry, I haven't been able to review test this yet. @ibrierley are you re-working your solution?

@ganisback I would prefer to keep master release-ready. If you've tested it and would like to vouch for this please upvote so I can better prioritize issues. Thanks!

@ibrierley

Copy link
Copy Markdown
Contributor Author

Hi John, I've just pulled it for the moment, whilst I try and rework a couple of bits I think I've misunderstood (also just distracted atm). Can I just ask, whats a 'level' on the tile layer, ? As I think that's the bit I hadn't accounted for properly.

@johnpryan

Copy link
Copy Markdown
Collaborator

@ibrierley Ah good question :). It's a bit of a holdover from leaflet's rendering system... Leaflet sorts tiles into different "layers" so that it can place new ones on top of the old ones in order to give a smoother transition when you're zooming in and out and tiles are getting replaced

@Arkangel12

Copy link
Copy Markdown

Hello, i am facing the same trouble, did you merge it yet or are still under review.

@ibrierley

ibrierley commented May 16, 2019 via email

Copy link
Copy Markdown
Contributor Author

@Arkangel12

Copy link
Copy Markdown

Hi Argel, No, I cancelled it for the time. There was a bug somewhere, at odd times with several zooms, tiles wouldn't display at all (maybe due to overlayed tiles). Never got to the bottom of that (I'm not sure if it was a problem with flutter_map or flutter itself), and I haven't had any time since to work on flutter. I hopefully will in the future, and maybe some other changes in the repo or flutter in the meantime may have helped with it if anyone revisits it. Ian

On Wed, May 15, 2019 at 11:27 PM Argel Bejarano @.***> wrote: Hello, i am facing the same trouble, did you merge it yet or are still under review. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#190?email_source=notifications&email_token=AA5YN5KCKNYB37UJLKXW4PTPVSE3ZA5CNFSM4GLWX5QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVQD7AA#issuecomment-492846976>, or mute the thread https://github.com/notifications/unsubscribe-auth/AA5YN5KO2J74BGTPDGW7TC3PVSE3ZANCNFSM4GLWX5QA .

Thanks for your reply, and thanks for the plugin, by the moment i'm like you without time hopefully will have more than in a month i could try it to help you with this.

Argel

@mtan11

mtan11 commented Sep 24, 2019

Copy link
Copy Markdown

where i can put keepDelayTile in? can u give me example of this code please! thanks you

@ibrierley

ibrierley commented Sep 24, 2019 via email

Copy link
Copy Markdown
Contributor Author

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.

6 participants