osm-gps-map
osm-gps-map copied to clipboard
ENHANCEMENT: do not download tiles that are not needed any more
If the zoom level is raised rapidly (mouse scroll) in the app using osm_gps, e.g. from 5 to 9, all the tiles needed tiles for zoom 6, then all those for zoom 7, then those for zoom 8, then those for zoom 9 are downloaded.
The same thing happens when lowering the zoom level, and when moving the map. A big amount of data is downloaded without a real need. This gives a serious "user experience" problem on slow connections.
My proposal is: if the zoom level changes while downloading a set of tiles, cancel the download of the zoom level not needed any more.
More generally: If a tile isn't needed any more, for changing the zoom level or for remaining outside the visible map window, stop downloading it.