Create and use offline maps
If you are working offline or in an area where the cellular network is not available, you can still have background reference maps. Pack them up in a compact MBtile package and take them with you on the field. Here are the steps explaining how to generate offline maps from Open Street Map:
1. Download the latest QGIS version and install it on your computer. This is a free software available at https://qgis.org/
2. Open QGIS Map and locate “OpenStreetMap” under “XYZ Tiles” tab in the browser window.
3. Drag and drop it to the “Layers” window. The map of the world will appear in the main window.
4. Zoom to the area where the survey will be conducted. In this example, it is the Anjou suburb and part of the river shore. The performance of the map depends on two main factors - the area and the resolution. You can select a whole city or even country if you don’t need very detailed map (the zoom level and the details are discussed in step 8). As a general rule, two smaller maps work better than one large map.
5. Now we need the proper tool to extract the tiles into an MBTile. Go to “Processing” and choose “Toolbox” (or use Ctrl+Alt+T on your keyboard).
6. The processing toolbar will dock on the right side of QGIS. Find the tool “Generate XYZ tiles (MBTiles)” under “Raster tools” and click on it.
7. Click on the three dots next to the first field. Choose the option “Use Canvas Extent” to generate a map that matches the area shown on the screen. Alternatively, you can use “Select Extent on Canvas”.
8. The next two options will determine the zoom levels of the map. In other words, how “deep” you can zoom in. Min 5 and max 15 gives good results for general use in a city. For open spaces and large territories, lower values will work better. Feel free to experiment. If the output file is too big, use smaller numbers.
9. Use the three dots at the bottom and choose “Save to File”. Indicate a folder on your disk and choose a name for the file.
10. Here is one very easy step - just press “Run”
11. Work in progress - time to grab a glass of water or check your emails. The time depends of your internet connection, the area of the map and the levels of zoom selected in step 8.
12. The example form this tutorial took less than a minute to complete and the size of the output file was 40 MB - much more efficient than a TIFF file with the same coverage. The location of the file will be displayed once again at the end of the log file.
13. Go to OnPOZ Cloud, choose “Maps” from the main menu and click on “Import map” button.
14. Drag and drop the file generated in step 12 inside the upload zone (or use the blue “Browse file” button).
15. When the upload is complete, the preview will display the area covered by the map. You can leave the opacity as is (100%) and choose a name for your map. Click “Save” when done.
16. Go to “Projects” and add the map to the corresponding project.
17. “Publish” the changes
18. The last step would be to synchronize OnPOZ Collect and re-enter the project.
19. This is how the map looks on maxim zoom level.
The same steps can be used to generate maps from other online tile maps, various types of raster files and vector features like points, lines and polygons. Here is an example of a map created from polygons that are used to identify the limits of the inspection zones.
Note that the symbology created in QGIS (fill, stroke, colors, transparency, labeling) is carried in the MBTile file and displayed in OnPOZ Collect.
One final word: the maps can be turned on and off in OnPOZ Collect. In case you have multiple overlapping maps and you don’t need them all at once.