One of the best features of using Mergin Maps for your field survey project is the degree of flexibility you have to design your survey layers. Whether you have your own custom background layers that you want to use or your own map symbology that you want to represent features on your map.
For many cases, using simple markers with a categorised colour scheme is not sufficient to give your field workers and clients enough context to understand the information displayed in your project. In order to better represent your data, you might want to use SVG symbols in your project.
If you simply open the layer properties in QGIS and go to the Symbology tab and select an SVG symbol to represent features in your project, it is likely that it will not load properly in Mergin Maps. However, it is possible to add SVG symbols to your Mergin Maps project in just a few easy steps. In this guide, we will show you two methods to add SVG symbols to your project.
Use a symbol from the QGIS library
In our first example, we will show you how to add a SVG symbol from the QGIS library. We have an example project where we are going to map different activity areas in our local community. So far, we have mapped the locations of several sports fields and skateparks. The sports fields are currently represented by red dots and the skateparks are represented by purple dots.
In the future we plan to add more features for the parks and recreation areas, so we want to add some symbols to make it easier for our surveyors and end users to find what they are looking for on the map. We’re going to start by adding a symbol for the sports fields. To do this, we’ll take the following steps:
1. Right click on the ‘sports_fields’ layer, select ‘Properties…’ and go to the ‘Symbology’ tab.
2. Click on ‘Simple Marker’ and then set ‘Symbol layer type’ to ‘SVG Marker’.
3. Scroll down to ‘SVG browser’ and select the symbol you want to use. In our case, we’re going to use the soccer ball symbol.
If this were a standard QGIS project, you would just need to scroll back to the top of the menu and set the colour and size of your symbol and click ‘OK’ to add it to your project. But we need to store everything in the project folder so that Mergin Maps can sync it to the server. These next steps will show you how to do this:
4. Scroll down to ‘Dynamic SVG parameters’ where you will see the filepath for the selected symbol, click on the arrow to the right of the filepath and select ‘Embed File…’.
5. A file browser will open to the folder where your QGIS SVG symbol library is saved. Select the filename for the symbol, which should be automatically selected, and press ‘Open’.
6. Scroll back to the top of the menu and set the size and colour of your symbol. In this example we are going to set height and width to 5mm and keep the default black colour. Once you have the symbol the way you want it, press ‘OK’.
7. Synchronise your Mergin Maps project.
Now, when you open and sync the project in the mobile app, you can see the soccer ball symbol that we just added to our project:
Use a custom SVG symbol for your project
Next, we want to add a symbol for the skateparks that we have on our map. Unfortunately, QGIS does not have a symbol for skateboards so we have created our own basic symbol using a vector drawing program. We named the file ‘sk8er.svg’ and saved it in our project folder.
In order to add this symbol to our project we will take the following steps:
1. Right click on the ‘skateparks’ layer, select ‘Properties…’ and go to the ‘Symbology’ tab.
2. Click on ‘Simple Marker’ and then set ‘Symbol layer type’ to ‘SVG Marker’.
3. Scroll down to the ‘Dynamic SVG parameters’ section and select the drop down menu in the file path field and choose ‘Select File…’.
4. Browse to your project folder, select the .svg file for the symbol you want to use and click ‘Open’.
5. Set the size that you want for the symbol and click ‘OK’.
6. Synchronise your Mergin Maps project.
Now you can open the project in the mobile app and you will see that the custom SVG symbol has been included in the project.