QGIS Cloud (www.qgiscloud.com) is a platform which provides a convenient geodata infrastructure including database, web services and web maps in the cloud. Recently, Sourcepole implemented the possibility to enable web-based editing in published maps. This blog post shows how to enable editing in QGIS cloud pro maps.
We start with my_edit_project.qgs, a project in QGIS desktop containing a background layer and a point vector layer (trees).
We upload the data to QGIS Cloud using the QGIS Cloud plugin and publish the project. To make the layer ’trees’ editable, open the QGIS cloud website (www.qgiscloud.com), login and go to ‘Maps’
Click the pencil icon (second to the right) to edit the map properties. Scroll down, select the checkbox next to the ’trees’ layer in the ‘Edit layers’ section and click ‘Update Map’.
If we open the webmap now, there is an entry ‘Editing’ under ‘Map tools’. The edit tool allows to pick an existing item to edit or to create a new item by drawing on the map.
The edit form in the web browser is generated depending on the edit type for the feature attributes in the QGIS project. E.g. if we want a combo box to select different tree types, we can set the edit type to ‘value map’ in QGIS desktop.
After re-publishing the project, the combo box containing the tree types is also available in the web map. This works also for other data types. E.g. to select a date, a date picker is shown and for boolean attributes, there is an on/off slider. Hidden attributes are not shown in the webmap edit form.
Line and polygon features can also be edited in web maps
Editing in published web-maps is available with the QGIS Cloud pro plan only (see http://www.qgiscloud.com/en/pages/plans). Pro-maps can be protected such that only selected users have access to the maps. For editable web maps, this is very important, since we normally don’t want everyone to edit our data. To test the new editing functionality without a pro account, there is a publicly editable sandbox map https://qgiscloud.com/mhugent/sandbox_map. Feel free to add new point, line or polygon features and change attributes in this sandbox map!