6. Add offline background layers

In the previous section we've added online background layers to our survey project. Sometimes we don't have internet in the field. For those cases we can create offline layers from the online layers and we can add other layers that we need. Note that the storage in the free plan of Mergin Maps is 100 MB, so you can't have too many detailed offline layers.

Let's create an offline layer of the Luchfoto Actueel Ortho 8cm RGB layer.

1. Make sure that in the Layers panel only the Luchfoto Actueel Ortho 8cm RGB layer is visible.

2. Go to the Processing Toolbox.

3. Go to Raster Tools | Generate XYZ tiles (MBTiles).


4. In the Generate XYZ Tiles (MBTiles) dialog choose the Map Canvas Extent as Extent (make sure you're still zoomed to the Spatial Bookmark of the Smaller study area!).

5. Here we keep the Minimum zoom and Maximum zoom level at 17. You can give a range, but then also the file size will increase.

6. Save the result (orthophoto.mbtiles) to the same folder as your Mergin Maps project. Only then it will be later synchronized.


7. Click Run.

8. Click Close to close the dialog after the processing has completed.

9. In the Browser panel go to Project Home to see all the files in your project folder and drag the orthophoto.mbtiles layer to the map canvas.


10. Check the result.

Of course we can also add existing raster layers to our project. Here we'll add the recent NDVI layer that we've created in a previous tutorial.

11. Locate the NDVI_11022023.tif layer in the Browser panel and drag it to the map canvas.

12. Because the layer is not in our project folder, you need to first export the layer: in the Layers panel right-click on NDVI_11022023 and choose Export | Save as... from the context menu.

13. Save the layer as a GeoTIFF in the correct folder and choose the map canvas extent for the extent (make sure you're still zoomed in to the Smaller study area).


14. Use the Layer Styling panel to style the NDVI layer with a color ramp.


Next, we'll setup the survey layers.