You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix TileLayer lag during fling/animated movement (#1247)
* Separate TileLayer in to multiple files for readability
* Refactor TileLayer in to separate files/classes to make it more readable
* Remove unnecessary code
* Stop precalculating zindexes for levels, just calculate it during build as it's fast anyways and just complicates the code
* Calculate tile translations during build
Previously we listened to the movement stream, calculated the
translations and then called setState(). This introduced noticible
jank/lag where when flinging the map or moving it with an
AnimatedController other layers (e.g. markers) would not move together
with the map.
* Fix tile sorting and level removing check
* Final changes
* Run dart format
* Re-fix the tile ordering function, it was putting lower-zoom tiles.
above higher zoom ones.
* Add the StreamBuilder to trigger builds as a result of map movement.
* Fix Tile tileReady callback race condition
The Tile loading was initiated before adding the Tile to the TileManager
which meant that with a very fast connection or cached Tile images the
load callback would be called before the Tile was in the TileManager.
Therefore when we tried to set the loaded value of the Tile in the
callback we would not find the Tile and the Tile was never marked as
loaded.
This caused the tile to be removed sooner than it should be since we
prune tiles that are not loaded yet when zooming in.
* Small tidy-ups
* Re-order TileManager functions to a more logical order
* Move all TileLayer code to the tile_layer/ directory. Add Coords to the exports since it's needed for custom TileProvider implementations
0 commit comments