# Further Project Customisation

In this tutorial you will learn how to further customise your Mergin Maps project from the previous tutorial, making it even more useful. The various changes we will make to the project will be made in QGIS and their effect observed and tested in Mergin Maps mobile app.

The topics covered here are:

TIP

Previous tutorials already covered the minimum concepts for data collection so feel free to skip ahead to the Working Collaboratively tutorial (and come back here later on) if you're super keen on collecting data right away.

# Opening the project in QGIS

If you already have the trees-and-hedges project open in QGIS, skip to Layer styles.

  1. Open QGIS

  2. Expand the Mergin Maps entry in the Browser panel to show projects in your workspace:
    Mergin Maps projects in QGIS Browser

    TIP

    If you have access to multiple workspaces, you may need to switch to the appropriate workspace in the QGIS browser to open your project.

  3. Locate the trees-and-hedges project

  4. Right-click it and select Open QGIS project:
    Open Mergin Maps project in QGIS

The project should now be loaded in QGIS. Don't worry if you cannot see the features you surveyed in the field - this is probably because you've not yet synchronised the project in QGIS.

If this is the case, click on the Synchronise icon from the Mergin Maps QGIS plugin toolbar to synchronise the changes
Mergin Maps QGIS plugin synchronisation icon

# Layer styles

When using Mergin Maps mobile app in the field in the last tutorial, we noticed hedges were difficult to see against the background maps. We'll now fix that.

  1. Double-click the hedges layer in QGIS to open its Layer properties
    Hedges layer in QGIS

  2. Select the Symbology tab on the left and click the current colour to change it:
    Layer properties Layer Symbology

  3. Pick a new colour for hedges which stands out better
    Select colour for layer symbology

  4. Click OK

  5. Increase the line width to 0.46mm and click OK
    Set line width in Layer symbology

Lines in the hedges layer should now be drawn thicker and in a more prominent colour.

In the next section we'll see what these changes look like in Mergin Maps mobile app.

# Trialing changes in Mergin Maps mobile app

Seeing how the changes look like in the mobile app is easy:

  1. In QGIS, save your project:
    Save QGIS project

  2. Use the Synchronise Mergin Maps Project button:
    Synchronise Mergin Maps Project

    The Project status window will open with the overview of local changes. Click Sync to synchronise the project:
    Project status with local changes

    QGIS and your project in the cloud should now be synchronised.
    Successful synchronisation message

  3. Open Mergin Maps mobile app on your mobile device

  4. Go to Home tab and sync the trees-and-hedges project by pressing the sync icon.

    The sync icon should be displayed next to the trees-and-hedges project like this:
    Updated project in Mergin Maps mobile app

TIP

If you do not see a sync icon, switch to the Projects tab and back to the Home tab. This should force Mergin Maps mobile app to check again for project updates.

  1. Tap the project to open it. The surveyed hedges should now be displayed in the style we set up in the last section
    Layer with new symbology in Mergin Maps mobile app

# Labels

Labels can be useful for showing attribute data or other information directly on the map. We'll now add labels to the trees layer so we can see tree species without having to open each tree's attributes:
Feature with label in QGIS

  1. Double-click the trees layer in QGIS:
    Trees layer in QGIS Layer panel

    Its layer properties dialog should appear.

  2. Select the Labels tab on the left hand side

  3. Set the labelling mode to Single Labels:
    QGIS Labels settings in Layer properties

  4. Set the Value to the species attribute
    Choose single label attribute

  5. Enable Draw text buffer under Buffer settings and click OK
    Enable Draw text buffer

  6. Test out these settings in Mergin Maps mobile app as described in the Trialing changes section above.

# Customising the preview panel

We will now learn how to control the content of the preview panel which is shown when you tap a feature in Mergin Maps mobile app.

The panel for the trees layer looks like the left-hand image below. We will configure it to look like the right-hand image.
Feature preview panel in Mergin Maps mobile app

  1. Double-click the trees layer in QGIS:
    Trees layer in QGIS Layer panel

    Its layer properties dialog should appear.

  2. Select the Display tab on the left hand side

  3. Set the Display Name to species:
    Display name attribute in Layer properties

TIP

If you notice subtle differences in the name / spelling of the field when you select it in the drop-down list, this is due to the field having been aliased.

  1. Set the HTML map tip to:
# fields
condition

HTML map tip in Layer properties

  1. Click OK
  2. Test out these settings in Mergin Maps mobile app as described in the Trialing changes section above.

# Controlling layer visibility

You might want to turn off some layers in Mergin Maps mobile app, e.g. when working with overlaying layers or to change the background map.

There are two ways how to change the layer visibility:

  • directly in Mergin Maps mobile app
  • setting map themes in QGIS

# Layers in Mergin Maps mobile app

To control the visibility of layers in Mergin Maps mobile app:

  1. Tap the More button and choose Layers to see the list of layers in the project
    Mergin Maps mobile app Layers in More tab

  2. Tap the eye icon next to the layer to turn it on or off.
    Mergin Maps mobile app Layers visibility

  3. Go back to the project

# Map themes

While the visibility of single layers can be controlled easily in Mergin Maps mobile app, it might be useful to set up map themes in QGIS. A map theme defines which layers will be displayed, so you can define useful combinations of layers and background maps and switch between them in Mergin Maps mobile app.

Here we'll define the following map themes:

  • All layers includes all map layers
  • Hedges contains just the hedges layer and the background map
  1. In QGIS, click the Manage Map Themes button and select Add Theme...:
    QGIS Add map theme

  2. Call the theme All layers and click OK
    Name the new theme

  3. Uncheck the trees and Survey notes layers:
    Uncheck layers that should not be visible

  4. Add another theme like in step 1, calling it Hedges and click OK:
    Create map theme

    Switching between the two themes in QGIS causes the layer visibility to be updated accordingly.
    QGIS switching map themes

    The themes have now been created. Don't forget to save and sync your project!

  5. Test out these settings in Mergin Maps mobile app as described in the Trialing changes section above

    You can access map themes in Mergin Maps mobile app from the More menu:
    Map themes in Mergin Maps mobile app

    Switch map themes in Mergin Maps mobile app

# Zoom to project extent

If you experimented with the Zoom to project button in Mergin Maps mobile app you'll have seen that by default, it zooms to the extent of the somewhat large background map:
Mergin Maps mobile app default map extent

This is not very useful so we will learn how to specify the extent that this button will zoom to.

  1. In QGIS, zoom / pan the map to your desired default extent:
    Desired project extent in QGIS

  2. Select Project > Properties...
    QGIS Project properties

  3. Select the View Settings tab
    View settings in Project properties

  4. Check Set Project Full Extent

  5. Click Map Canvas Extent:
    Use map canvas extent as project full extent

  6. Click OK

  7. Test out these settings in Mergin Maps mobile app as described in the Trialing changes section above

    The Zoom to project button can be found in Mergin Maps mobile app under the the More menu:
    Zoom to project in Mergin Maps mobile app

# Learning more

The aim of this tutorial was to introduce you to the main concepts of customising Mergin Maps projects in QGIS and to cover common customisation workflows in a basic way.

You will find more tips on how to prepare your QGIS project in Setup GIS Project.