MapCompose: redrawTiles() sometimes clears the map and does not redraw tiles
I am currently investigating an issue where redrawTiles() sometimes does not trigger a redraw, only clears the map.
In a successful redraw, visibleTilesFlow gets set to null, that gets collected, then to the new VisibleTiles, which gets collected and redrawn.
Sometimes, visibleTilesFlow gets sets to null, and then VisibleTiles, as normal, but neither are collected. For some reason the visibleTilesFlow emissions are ignored by the collector. I am still investigating why, but maybe you have an idea.
This only seems to happen when redrawTiles() is called quickly after a previous call, maybe up to 2 seconds. It may just be that it can only happen when the tiles are still loading when another redrawTiles() call is made.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 46 (27 by maintainers)
Commits related to this issue
- Try fix #20 — committed to p-lr/MapCompose by p-lr 3 years ago
- Fixes #20 — committed to Nohus/MapCompose by Nohus 3 years ago
- Fixes #20 — committed to Nohus/MapCompose by Nohus 3 years ago
- Fixes #20 — committed to Nohus/MapCompose by Nohus 3 years ago
- Merge pull request #21 from Nohus/fix-redraw-tiles Fixes #20 — committed to p-lr/MapCompose by p-lr 3 years ago
I’m back porting this inside the
layerbranch!I updated the PR, can you take a look? Now duplicate emissions are ignored as they were, but the
nullcannot be lost as it can withStateFlow.It’s most probably because
tileCanvasStateflow receives the sameVisibleTilesobject it already received the last timeredrawTileswas invoked. That should be easy to fix. Thanks.