How to retrieve a whole set of tile from OpenStreetMap.org
The goal here is to set up a local cache to use with TangoGPS or other apps like that. I don't have 3G neither WiMax (and there isn't a great coverage anyway...) so I like to grab my tiles before a trip.
Here is a little bash script which help doing this. You just have to know the coordinates of the first tile you want to get. Example for the Finistère (France, Brittany)You get it with a right click on the wanted tile, and "show picture", then you get : Here this is the path from the URL which we are interested in : 8/124/88.- 8 stands for the zoom level.
- 124 si the x coordinate
- 88 is the y one.
There is a little algorithm to do a recursive download. I tried to sketch it by a small sample based on Brest Area.

To finish, don't abuse on it... If you need a huge area, or very often the same one, this will be far better to render by yourself the tiles. For that, have a look to Osmarender ot Mapnik on the OpenStreetMap Wiki.

