Creating offline maps using Maperitive
MapIt offline extension is allowing to use prepared earlier basemaps when there is no Internet connection available. Please follow this guide to create .mbtiles file which you can then use as an alternative base map.
There is number of commercial application allowing you to create such a file, but in this article we will focus on the open source solution and the Maperitive software.
You can download the application from here. You need to unzip the file, and run Maperitive.exe. Maperitive may take a while to start up, just wait.
Linux or Mac OS X users can follow this guide to install the software.
The full documentation for the Maperitive is available here, however following this sample guide you will be able to create the offline map just in few minutes.
1. Open the software and zoom to the area of your choice. You can add more web maps (e.g. Open See Map if required)
2. Set Geometry Bounds for your area
3. Zoom-out slightly to see the selected area – you can modify the rectangle if you wish.
4. Download OSM data for selected area.
5. Wait until the OSM data will be downloaded from the server:
6. Ones the data is downloaded remove Web map (OSM Mapnik) from the map viewer – this is not necessary, but will speed up the generation of the tiles.
7. If you like Hill Shading – you can apply the preset template. The necessary high data will be automatically downloaded.
8. If you need you can add contours to your map as well.
9. Ones you are happy with the map, you can zoom-in or pan around to check the details you need to generate the offline tiles. This operation may take a while and depends from various factors like the performance of the PC, selected zoom-levels etc.
You can read more about the consequences of the zoom-level selected here.
I would strongly recommend that you do not use zoom levels above 17 when creating offline tiles. Usually level 16 or 17 is enough for most activities.
When you are happy with all the map settings please follow this guide to generate the mbtiles file.
Basically you need to run a command like:
generate-mbtiles minzoom=0 maxzoom=17
From my our personal experience is better that you generate more smaller files than one big one for huge area, however it’s entirely up to you and you may prefer other options.
The generated file will be located in the Tiles folder, you can rename it before copying it over to device SD card:
10. The offline map can be set as default using the extension and used without Internet connection.
Andrzej, I think this is a great application but I can’t leave a review as I can’t find anywhere to write it. The little box on your app site on Google won’t open for me. I will keep trying, as I said it is a great app. I wrote awhile ago with a suggestion as to the export of [pictures. I have continued to use your app as my data collector and now have another suggestion, if I may. I also have OsmAnd on my tablet, which uses OSM data and was wondering whether instead of using Maperitive as the tiler, whether it was possible to link to OsmAnd as the offline map server on the device? This would save that precious commodity on tablets, space, and, since OsmAnd is a fairly mature app, would lower the anxiety threshold of your users. I can’t see any reason why OsmAnd and Mapit-Gis shouldn’t work together except pointing Mapit to OsmAnd. I have just driven a few thousand kms around in southern Australia, where I live, and I used OsmAnd as a backup GPS (SatNav to you) with no trouble even when on walking trails in redgum forests. I also logged some more of my roadside fruit trees using your app, but with no visible map because my tablet hadn’t the foresight to collect them before I left. I was offline so I had to wait until near a wifi point to get the maps.
Which brings up the next issue, that of editing the location data. Is it possible? I didn’t wait for the satellite data to fix and now have a fruit tree in the sea. I can locate the tree using my SatNav logs so want to edit the data on Mapit-Gis. Is it possible? Thanks in advance for any help. Cheers Kevin Brewer
Hi Kevin, I am on a trip with limited access to Internet. I will answer with more details after Easter.
Regards,
ANdrzej
Thanks! Your article is helpful for my work!