[Question] Downloading raster data of street maps for offline usage

I am working on an offline desktop application which uses the Leaflet library for loading the mbtiles (raster format, not vector) and display the map.
My application and need is for a detailed street map up to zoom level of 18. I aim to download data for a couple of countries and I have read online that I cannot download huge amounts of data because it will overload the server.
I want to know if there is a way to get the street maps raster data for a country in the mbtiles format, some way where I could pay or something where I can get the required data without it being illegal or causing a problem on the server.

Either Planet OSM or Geofabrik extracts will be of interest to you.

1 Like

If you’re just looking to download data, then I think that some of the people at https://switch2osm.org/providers/ probably offer .mbtile downloads. See also here.

The other option is to create the raster tiles yourself via e.g. https://switch2osm.org/serving-tiles/ and then convert to your desired format as per perhaps https://wiki.openstreetmap.org/wiki/MBTiles (though I haven’t tried that myself).

However, if you’re looking for offline maps on a device you probably want to use vector tiles since you can include the data that you want without having to include every zoom level 18 tile, which would be a lot of tiles. Vector tile options include https://wiki.openstreetmap.org/wiki/Planetiler, https://tilemaker.org/ and a shedload of other options at https://github.com/mapbox/awesome-vector-tiles#cli-utilities (none of which I can vouch for, but all of which will have some adherents).

1 Like

Thank you for the response, this definitely helped clear some of my queries.
The solution I found to have work for me is using Maperative, I downloaded the osm.pbf files for the country I needed from planet.osm, then I used Maperitive to load those files locally. Maperitive rendered the tiles and then I was able to generate the map in raster mbtiles format using the generate-mbtiles command in the command line for the places I needed. The process is time consuming but it gets the job done.