Mergin Maps allows multiple users to collect data in the field simultaneously. This is perfect for crowd-sourced initiatives, and the Derbyshire Historic Buildings Trust has been leveraging it for their Buildings at Risk project. Volunteers can assess and record the status of listed buildings in the area, helping to inform local authorities about any buildings that might be at risk. With the project up and running, data is pouring in, but one challenge we've encountered is the accidental deletion of existing buildings!
For users to collect data, the layer in question must be editable. They can add new features, edit existing features, and delete existing features. This last action is undesirable for this project, so we started looking for ways to prevent buildings from being deleted. First, let's take a look at the default behavior for an editable layer.
We get a big green Edit button when we click on a feature, and in terms of the user interface, it is pretty obvious what to do to edit the feature. But now let's take a look at what happens if we set the layer to be read-only through QGIS...
Now the Edit button has disappeared, and we can't update, add, or delete features in this layer. Your first question might be, "What's the use of this layer then?" Well, we have a related table that actually holds the survey information. One building can be surveyed many times, so it makes sense to use a one-to-many relationship here. This way, the related table can be edited as much as you like, but you won't be able to delete buildings on a whim (or by mistake). Great, but in terms of the user interface, it's not entirely clear what to do next. We don't have that inviting Edit button anymore. However, we do have the feature details, and since these are set in QGIS (using map tips and HTML), perhaps we can create a "hyperlink." Everyone knows that blue underlined text is clickable, right? Initially, we went for the "a href" HTML tag, but that wasn't picked up in the Mergin Maps interface. So instead, we can just set the font color to blue and added underlining. Here's what we see now: a blue "clickable" link to add a survey.
I should add that when developing Mergin Maps projects, a real-time saver has been the Windows version of Input (the mobile app). With this installed, there's no more need to switch between phone and laptop for testing. Perfect!
If you're looking for help setting up or maintaining a Mergin Maps project, drop me an email.
If you enjoyed this post and would like to learn more about GIS or improve your skills check out our training courses. If you'd like to contribute a story, tutorial or anything else, please contact us.
Thanks for reading and if you'd like to support our content please feel free to buy us a coffee.