Preload tiles manually

Bug #579389 reported by Kieran Fleming on 2009-07-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Would be nice if the user can download all the tiles for a given area ahead of time and over a cheap connection.

Will Uther (willu-mailinglists) wrote :

This feature is VERY important if you don't have a data plan. There is already one method to do this: you can load map tiles directly onto the SD card as noted in Issue #64 (and probably elsewhere).

The attached patch adds another solution. The patch adds a menu option that will take the current route and animate along it.

This is useful in two ways:
* It allows you a brief overview of where you're going.
* It primes the cache with all the map tiles along the way.

On the first animation, I often don't see much - I see an animated display with lots of 'loading...' squares. This is actually by design - I don't wait until the tiles are loaded before continuing the animation. The tiles needed get added to a queue and will all be downloaded in turn.

I didn't want to completely overload the OSM tile server, so there is no way to download the tiles in a region, only along a planned route. Also, only the tiles for one zoom level are downloaded (although you could zoom in/out and repeat).

Kieran Fleming (kieran-fleming) wrote :

Sorry, but I'm declining this patch. It seems like something that would be useful for you but not suitable for the average user. The main problem with this approach is that it may take a few passes before the user is convinced that all the tiles have downloaded. I think a better way would be to have a non-default setting saying that after a route is downloaded, the 'wait' screen continues until all the required tiles have been downloaded.

I remember reading on the OSM wiki a page with a code of conduct for using their map tiles but I can't find it anymore. From what I remember it definitely said that large scale downloading like what AndNav does is not allowed, so this patch is definitely in the right direction. Maybe AndNav run their own tile server so they can precache a lot more, but I don't think we'll be looking for that.

Will Uther (willu-mailinglists) wrote :

Okie - I'm attaching an updated version of the patch (this patch is applied instead of the other one, not on top of the other one). I don't like this as much, but it solves some of the issues Kizza mentions at the expense of other issues.

This patch is similar to the last one, but waits at each point for the map to display before continuing the animation. This means that you know the entire map is cached once the animation finishes.

Now for the bad news. a) there is no way to cancel the animation, so if it is taking a while then that's too bad. b) you'll want the fix attached to issue #72 before using this patch otherwise it is possible for the animation to get stuck with a tile that will never load. Even with that fix if an http request times out you'll need to nudge the screen a little to force another download attempt and get the animation going again.

I don't think this patch is as good a solution as before, but I thought I'd post it in case anyone else wants to play with it.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers