galileo
galileo copied to clipboard
Smart tile iteration
Current implementation of TileScheme::iter_tiles
has some limitations:
- Tiles are iterated over rectangular are with constant resolution. This means that when the map view is tilted over x-axis, far away tiles are displayed with too high resolution, and we need to load extra tiles that are not actually displayed on the current view.
- It always returns
None
if the map viewCrs
is not the same as the tile schemeCrs
.
We need to find a smarter way to iterate over tiles. For starter, MapView::position
and MapView::resolution
are always the values at the center of the screen (map). So we can start from the center and go out to the sides, checking for every tile if it's still in the view.