5.7. Layer settings
5.7.1. Introduction
Layers settings become available after a layer creation.
To edit a layer you need to navigate to a child resource group (see item 4 in Pic. 5.5.), where would be displayed resource types. Then select from child resources a resource with type vector layer and press the “Pencil” icon opposite the resource or select the layer and then select an action called “Update” in actions pane (see Pic. 5.17.). The window “Update resource” will open, where you can edit the layer.
5.7.2. Delete or replace all features
NextGIS Web software allows to delete all features of a layer or replace them by uploading a new file.
Click on the pencil icon next to the layer.
In the “Vector layer” tab select the action from the dropdown menu.

Pic. 5.118. Options to edit the layer file
You can delete all the features. This will result in an empty layer of the same structure that you can add new features to. To do so, select “Delete all features from layer”, tick to confirm and press Save.

Pic. 5.119. Deleting all features from the layer
You can replace all the features by uploading a previously prepared file. Select “Replace layer features from file”. Open the file or drag and drop it into the frame.

Pic. 5.120. Replacing layer file
If the file has multiple layers, select the one you need in the “Source layer” field. You can also set up other properties, as while creating a new vector layer.
If you replace the file, now only the features, but the structure of the attributes and other properties will be changed to match the new file.
5.7.3. Edit attribute values
NextGIS Web software allows to edit attributes for geographical features. Editing could be launched from the administrator interface or from the map display.
Editing attributes from administrator interface:
Click the table icon opposite the resource or select an action for a vector layer called “Feature table” in the actions pane (see Pic. 5.11.).
A feature table for the layer will open. Select the row you want to edit. It will be highlighted in yellow.
Click Edit button (see Pic. 5.121.).

Pic. 5.121. Editing attributes from administrator interface
Editing attributes from the map display:
Open a Web Map.
Click on the map with Identify tool active.
Click edit button in the Identify window (the last tab, see Pic. 5.122.).

Pic. 5.122. Editing attributes from the map
You can change attribute values in the opened window. Description made on “Description” tab will be visible on the map display in the indentify window.
Editing page has following tabs:
“Attributes” tab (see Pic. 5.123.).

Pic. 5.123. “Attributes” tab
To edit an attribute click on the field.
Numbers can be typed in or modified with errows that appear on the right end of the field.
Dates also can be typed in or selected in the calender. To open the calender click the icon on the right end of the field.
“Description” tab (see Pic. 5.124.).

Pic. 5.124. “Description” tab
“Attachments” tab (see Pic. 5.125.).

Pic. 5.125. “Attachments” tab
When editing a PostGIS layer attribute changes are saved to PostGIS database and descriptions are saved to a local database. When editing a layer based on a Shapefile attribute all changes are saved to a local database.
Geodata with changed attributes could be downloaded by link Download as GeoJSON or published as WFS service. Download of descriptions is currently unavailable.
5.7.4. Adding photos to geodata
NextGIS Web software supports adding photos to features. If a feature has attached photos, they will be shown along with description and attributes in the identify window (see Pic. 5.126.).

Pic. 5.126. Identify window for a feature with attached photos
You can add photos in a map display.
Click on a feature on the map with active Identify tool.
Click edit button in the Identify window (see Pic. 5.122.).
In the edit tab navigate to “Attachments” tab (see Pic. 5.125.).
Upload photos. JPEG and PNG formats are supported. GIF format is not supported (see. Pic. 5.127.).

Pic. 5.127. Uploading photos in the “Attachments” tab
Enter description for the image and click Save.
After uploading you can see previews of photos on the “Attachments” tab of the identify window (see Pic. 5.126.).
After a click on a photo preview a lightbox window is open (a javascript powered window in browser). Photo size is adjusted to fit the window. Photos have descriptions and user can navigate through them using left and right arrow keys on the keyboard (see Pic. 5.128.).

Pic. 5.128. A lightbox with uploaded photos for the identified feature
Note
By default photos could be added by any user but there is an option to limit number of users who can upload photos (see Access management).
To delete a photo select it on “Attachments” tab of editting attributes window and click “Delete”, and then click Save button.