Using layer attributes to add labels to your map
This article is for Citizen Space Geospatial. Please speak to your customer success manager if you are interested in learning more about it.
Attributes are the non-spatial information about a geographic feature, for example the name or description of each feature within a layer. These attributes will be displayed as additional information when a respondent clicks on that feature on the map.
For example, if you have a GeoJSON file showing the location of polling stations, that GeoJSON file can also include additional data such as the name of the polling station and what ward it is in.
There are 2 kinds of layer attributes supported by Citizen Space:
- Built-in layer attributes — contained in your uploaded GeoJSON files
- Custom layer attributes — manually added through Citizen Space
Configuring built-in attributes (uploaded layers only)
When uploading a layer to your map, your GeoJSON or Shape file will often include additional data about the features contained within it.
For example, if you have a GeoJSON file showing the location of polling stations, that GeoJSON file may also include attributes such as the name of the polling station and what ward it is in.
To choose which attributes you would like to appear on the map, select 'Choose attributes' in the information block for that layer.
You will then see a screen showing the available attributes, and can choose whether that attribute should show or not. The default for attributes will always be 'Don't show'. This screen also includes a preview map, allowing you click on any feature and see how the attributes will appear.
If you choose to show the attribute, an additional text box will appear and you will be able to edit the 'Display name' should you wish to.
The preview map will automatically update to reflect any changes you make to the visibility, display name and order of attributes. Once you are happy with your changes you can select 'Save layer attributes' at the bottom of the page.
Once this has been done it is always a good idea to use preview mode to check how things look. In an effort to keep the maps as clear and easy to use and navigate as possible, we do encourage you to consider whether the information you have chosen to show on the map is genuinely useful for your respondents within the context of the map and the question that accompanies the map.
Adding custom layer attributes (for drawn and uploaded layers)
As well as displaying existing attributes from your uploaded layers, you can add and edit custom attributes for both uploaded and drawn layers.
To add a custom layer attribute, select 'Choose attributes' in the information block for that layer.
You will then see a screen showing a preview map, and any existing attributes for that layer. Select 'Add new layer attribute' button, provide a display name for the new attribute and then select 'Add attribute'.
This new attribute will now be available on all features in this layer. To edit the values of this new attribute, see the section on Editing feature values.
Editing feature values (for drawn and uploaded layers)
Once you have configured the attributes for a layer, you can also change the values of the attributes for each individual feature in your layer.
To edit the feature values for a layer, first select 'Choose attributes' on the relevant layer from the Configure map layers page.
Use the map at the top of the 'Choose attributes' page to select the feature you want to change values for. On the tooltip that appears for your feature, select 'Edit feature values'.
You will then see a screen with a preview map showing only the selected feature, followed by a list of the layer attributes. For each layer attribute you can enter a value for the selected feature. The preview map will automatically update as you make changes to the feature values. When you have finished making changes, select 'Save feature attributes'.
You can then select the 'Back to Choose layer attributes' link to return to the previous screen and choose a different feature for editing.
Once you have finished editing the feature values it is a good idea to use preview mode to check things over. In an effort to keep the maps as clear and easy to use and navigate as possible, we do encourage you to consider whether the information you have chosen to show on the map is genuinely useful for your respondents within the context of the map and the question that accompanies the map.