<a id="ngw-edit-objects"></a>

# Edit vector features

You can modify **geometries and attributes** of vector features:

* on a Web Map (see below);
* [in the Feature table](https://docs.nextgis.com/docs_ngweb/source/feature_table.html) ;
* [in QGIS desktop app](https://docs.nextgis.com/docs_ngconnect/source/edit.html).

Editing is available for users who have permissions to [read and modify data](https://docs.nextgis.com/docs_ngcom/source/permissions.html). You can
[check user permissions](https://docs.nextgis.com/docs_ngcom/source/permissions.html#ngcom-permissions-view) on the layer page.

By default, when a new Web Map is created, users can edit features directly on it. You can [disable feature editing on the map](https://docs.nextgis.com/docs_ngweb/source/feature_edit.html#ngw-allow-edit) in Web Map settings.

For layers with feature versioning enabled all the edits are recorded in the [layer history](https://docs.nextgis.com/docs_ngweb/source/version.html#nextgis-web).

<a id="edit-mode"></a>

## Edit mode on a Web Map

1. Open [Web Map](https://docs.nextgis.com/docs_ngweb/source/webmaps_client.html) and select the layer with the feature you need to edit.
2. Open dropdown menu by pressing the three dots to the right of the layer name (see [Fig. 421.](#webmap-edit)), then select “Edit”.

![image](docs_ngweb/source/_static/webgis_edit_objects_en_2.png)
1. Editing toolbar will appear on the Web Map (see [Fig. 422.](#webmap-edit-panel)):

![image](docs_ngweb/source/_static/webmap_edit_panel_en.png)
* ![+ in a circle](docs_ngweb/source/_static/button_maptool_add.png) [Create feature](https://docs.nextgis.com/docs_ngweb/source/feature_edit.html#ngw-create-objects) - this tool is active when you first enter the edit mode;
* ![pencil](docs_ngweb/source/_static/button_maptool_edit.png) [Edit](https://docs.nextgis.com/docs_ngweb/source/feature_edit.html#webmap-edit-vertices);
* ![outward arrows](docs_ngweb/source/_static/button_maptool_move.png) [Move](https://docs.nextgis.com/docs_ngweb/source/feature_edit.html#ngw-move-objects) an entire feature;
* ![three lines](docs_ngweb/source/_static/button_maptool_attrib.png) [Edit attribute values](https://docs.nextgis.com/docs_ngweb/source/feature_edit.html#ngw-attributes);
* ![trash can](docs_ngweb/source/_static/button_maptool_delete.png) [Delete](https://docs.nextgis.com/docs_ngweb/source/feature_edit.html#ngw-delete-objects);
* ![frame with a dot](docs_ngweb/source/_static/button_maptool_snap.png) Snapping (blue = enabled, white = disabled), click on the icon to set up snapping to edges, vertices and/or intersections, when all is unticked, snapping is off;
* ![floppy disc](docs_ngweb/source/_static/button_maptool_save.png) Stop editing and leave Edit mode;
* ![U-shaped arrow](docs_ngweb/source/_static/button_maptool_undo.png) Undo the last action.

Also, for polygons one more tool is available:

* ![scissors](docs_ngweb/source/_static/button_maptool_hole.png) [Cut a hole](https://docs.nextgis.com/docs_ngweb/source/feature_edit.html#webmap-hole).

Below you can find detailed description of these operations.

Features available for editing are highlighed. You can edit multiple layers at once, each is highlighted with a different color.

<a id="ngw-create-objects"></a>

## Create a new feature (point, line, polygon)

1. Enter Edit mode. The ![+ in a circle](docs_ngweb/source/_static/button_maptool_add.png) “Create” tool is active by default (the button is blue). If you used some other tool before that, click on the button to activate feature creation.

![image](docs_ngweb/source/_static/webmap_create_point_en.png)
1. A colored circle will appear nearby a mouse pointer, with it you can add new features. Click on the map to create a new feature. Alternatively, you can [enter coordinates from the keyboard](https://docs.nextgis.com/docs_ngweb/source/feature_edit.html#ngw-create-coords).
2. A dialog opens where you can add attribute values.

Click **OK** to finish creating a feature. To clear the attribute form, click **Reset**.

![image](docs_ngweb/source/_static/webgis_attr_new_objects_en_2.png)

You can enter multiple features one after the other.

When creating a line, click on the map to indicate its start and end points. While creating a polygon each new click on the map adds a new vertex.

To finish creating geometry, press Enter, click twice on the last vertex or click ![tick](docs_ngweb/source/_static/button_maptool_confirm.png). To finish a polygon you can also click on its starting point.

If you accidentally click on a wrong place, press Backspace to delete the last vertex and place it elsewhere.

Snapping is enabled by default for lines and polygons. To disable it, click ![frame with a dot](docs_ngweb/source/_static/button_maptool_snap.png) and untick all the options.

#### NOTE
If you need to create a polygon with a hole, first draw the outer ring and complete feature creation, then use ![scissors](docs_ngweb/source/_static/button_maptool_hole.png) tool to [cut the hole](https://docs.nextgis.com/docs_ngweb/source/feature_edit.html#webmap-hole).

4. To save created features to the layer, click ![floppy disc](docs_ngweb/source/_static/button_maptool_save.png) “Stop editing”.
In the opened dialog select **“Save”** to save changes, “Don’t save” to discard them, or “Cancel” to stay in the edit mode:

![image](docs_ngweb/source/_static/webgis_finish_editting_en.png)

<a id="ngw-create-coords"></a>

## Add feature by entering coordinates

Click ![keyboard](docs_ngweb/source/_static/button_keyboard.png) button next to the “+” maptool and enter the two coordinates separated by a space. As in the search bar, you’ll get two possible interpretations: latitude-longitude or longitude-latitude.

![image](docs_ngweb/source/_static/webmap_create_coord_select_en.png)

After one of the options is selected, the point appears on the map. If the position is correct, click **Ok** to proceed to enetring attributes.

![image](docs_ngweb/source/_static/webmap_create_coord_confirm_en.png)

When creating a line or polygon click **Ok** to confirm a vertex. The coordinates field is cleard and you can enter the coordinates for the next vertex.

![image](docs_ngweb/source/_static/webmap_create_coord_poly_en.png)

After the last vertex is entered click ![tick](docs_ngweb/source/_static/button_maptool_confirm.png) or press Enter on the keyboard to proceed to entering attributes.

![image](docs_ngweb/source/_static/webmap_create_coord_poly_result_en.png)

To save the changes made to the layer click ![floppy disc](docs_ngweb/source/_static/button_maptool_save.png) or exit the Edit mode ![pencil](docs_ngweb/source/_static/button_edit.png) in the layer menu and confirm changes.

<a id="ngw-delete-objects"></a>

## Delete feature

1. Enter the edit mode. On the editing toolbar click on the ![trash can](docs_ngweb/source/_static/button_maptool_delete.png) “Delete” button.
2. Click on the features you want to delete. The highlighted contour of the editable features disappears.

![image](docs_ngweb/source/_static/webmap_delete_polygon_en.png)

4. To finish deleting features, click ![floppy disc](docs_ngweb/source/_static/button_maptool_save.png) “Stop editing”.
In the opened dialog select “Save” to save changes, “Don’t save” to discard them, or “Cancel” to stay in the edit mode (see [Fig. 425.](#webmap-finish-edit)).

<a id="ngw-move-objects"></a>

## Move feature

1. To move en etire feature, enter the Edit mode and activate ![outward arrows](docs_ngweb/source/_static/button_maptool_move.png) “Move” tool.
2. Click on the feature to select it, then drag to a new location.

Both the old position (style colors) and the new position (selection color) are shown.

![image](docs_ngweb/source/_static/webmap_move_point_en.png)![image](docs_ngweb/source/_static/webmap_move_polygon_en.png)
1. Click ![floppy disc](docs_ngweb/source/_static/button_maptool_save.png) “Stop editing” and save the changes.

Also you can move individual vertices of lines and polygons.

<a id="webmap-edit-vertices"></a>

## Edit vertices

1. On the toolbar click on the ![pencil](docs_ngweb/source/_static/button_maptool_edit.png) “Edit” button.

Editable features are highlighted.

1. Click on a vertex and drag it to a new position by holding the left mouse button. Snapping is active by default. To disable it, click ![frame with a dot](docs_ngweb/source/_static/button_maptool_snap.png) and untick all the options.

![image](docs_ngweb/source/_static/webgis_edit_vertices_en.png)
1. To finish editing click ![floppy disc](docs_ngweb/source/_static/button_maptool_save.png) “Stop editing” and save the changes (see [Fig. 425.](#webmap-finish-edit)).

#### NOTE
You can edit several layers simultaneously. To do it enter the edit mode in every layer you want to edit. Snapping works for features of all these layers.

<a id="ngw-vertices"></a>

## Add and delete vertices

To **delete** a vertice enter the Edit mode, then activate the ![pencil](docs_ngweb/source/_static/button_maptool_edit.png) “Edit” tool, hold **Shift** and click on the vertex.

To **add** a vertex, click on the line between two existing vertices and drag it to the desired location.

![image](docs_ngweb/source/_static/ngw_new_vertex_en.png)

<a id="webmap-hole"></a>

## Create holes

If you need to create a polygon that has one or seleral areas cut from it:

1. First add the outer contour using the ![+ in a circle](docs_ngweb/source/_static/button_maptool_add.png) Create tool.
2. Activate the ![scissors](docs_ngweb/source/_static/button_maptool_hole.png) Cut hole tool and draw a closed boundary of the hole.

![image](docs_ngweb/source/_static/cutting_hole_en.png)
1. To finish editing click ![floppy disc](docs_ngweb/source/_static/button_maptool_save.png) “Stop editing” and save the changes (see [Fig. 425.](#webmap-finish-edit)).

<a id="ngw-attributes"></a>

## Edit feature’s attributes

NextGIS Web software allows users to edit attributes of geographical features. There are several ways to open the dialog:

* From the resource list:
  - Click on the ![table](docs_ngweb/source/_static/button_open_feature_table.png) table symbol [by the vector layer](https://docs.nextgis.com/docs_ngweb/source/admin_interface.html#feature-table-choice-from-group-pic) (or open the layer resource page and select “Feature table” in the [actions pane](https://docs.nextgis.com/docs_ngweb/source/admin_interface.html#admin-table-objects-upload)).
  - Feature table opens. Click on the entry in the table to select it.
  - Click on the **Edit** button in the table toolbar.

![image](docs_ngweb/source/_static/ngweb_editing_attributes_en.png)

If you are in the Web Map ![map and magnifying glass](docs_ngweb/source/_static/button_open_web_map.png) display mode.

* From the Feature table:
  - In the layer’s context menu select “Feature table” and then follow the steps described above.
* In the Edit mode:
  - In the layer’s context menu select “Edit”.
  - In the toolbar on the map select ![three lines](docs_ngweb/source/_static/button_maptool_attrib.png).
  - Click on the feature on the map.
* From the Identify panel:
  - Click on the feature on the map.
  - In the Identify panel click on the “Edit” symbol (see [Fig. 437.](#ngweb-editing-when-viewing-map)).

![image](docs_ngweb/source/_static/editing_when_viewing_map_open_en.png)

Editing dialog has the following tabs:

* “Attributes” tab:

![image](docs_ngweb/source/_static/ngweb_tab_attributes_en.png)

To edit an attribute click on the field.

Numbers can be typed in or modified with arrows 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.

Add a [Lookup table](https://docs.nextgis.com/docs_ngweb/source/create_other.html#ngw-create-lookup-table) to a field to be able to pick a value from a dropdown list.

You can also add a configurable [custom form](https://docs.nextgis.com/docs_ngweb/source/collector.html#collector-create-form) for entering and editing attributes. An added form is available on a separate tab.

![image](docs_ngweb/source/_static/ngweb_tab_form_en.png)
* “Attachments” tab ([more on managing attachments](https://docs.nextgis.com/docs_ngweb/source/feature_edit.html#ngw-attachments));

![image](docs_ngweb/source/_static/ngweb_tab_attachment_eng_2.png)
* “Description” tab - the description is displayed in the Identify panel when you click on a featre.

![image](docs_ngweb/source/_static/ngweb_tab_description_eng_2.png)

#### SEE ALSO
[Export and import descriptions](https://docs.nextgis.com/docs_ngweb/source/feature_edit.html#ngw-manage-descriptions)

#### NOTE
If you opened the feature attributes dialog from the Feature table on a separate page, you can edit the feature’s geometry in the fourth tab. If you opened the edit dialog from a Web Map, to edit the geometry activate [Edit mode](https://docs.nextgis.com/docs_ngweb/source/feature_edit.html#edit-mode).

<a id="ngw-attachments"></a>

## Attachments

NextGIS Web software supports adding photos, panoramas and other files to the features.
If a feature has attachments, they will be shown along with description and attributes in the identify window  (see  [Fig. 442.](#attachm-tab-pic)).

![image](docs_ngweb/source/_static/attachm_tab_en.png)

Files in the following formats can be viewed directly in the web client:

* JPEG, PNG images. GIF format not supported.
* Panoramas complying with the [specification](https://developers.google.com/streetview/spherical-metadata?hl=en).

Other types of files can be added as attachments, but won’t be viewed in the interface.

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 [Fig. 443.](#webmap-identification-photo-lightbox)).

![image](docs_ngweb/source/_static/webmap_ident_photo_lightbox_2.png)

You can zoom in and out, turn the image or save it to your device.

To navigate within the panorama, use the mouse. Hold down the left mouse button to rotate the camera. Use the wheel to zoom in and out. Panorama mode can be disabled by clicking ![button_panorama_toggle](docs_ngweb/source/_static/button_panorama_toggle.png).

![image](docs_ngweb/source/_static/panorama_opened_en_2.png)

You can also navigate between connected panoramas. If you have a tour in Garden Gnome Package (.ggpkg) format exported by Pano2VR you can [convert it to a set of panoramas with navigation points](https://toolbox.nextgis.com/t/pano2vr?from-docs=1). Red dots mark the points where you can move to the ajasent panorama.

![image](docs_ngweb/source/_static/panorama_connected_en.png)

<a id="ngw-add-photos"></a>

### Add attachments to a feature

To add an attachment to a feature, go to the edit window. There are several ways to open it:

* Click on the feature on the Web Map, then in the pop-up window press the **Edit** button.
* Open the feature table on the Web Map, select the feature and click **Edit** in the toolbar.
* Open the feature table from the resource page,  select the feature and click **Edit** in the toolbar.

On the Edit page open the Attachments tab and upload the files.

![image](docs_ngweb/source/_static/add_attachment_en.png)

Enter titles for the attachments and press **Save**.

After uploading you can see previews of photos and panoramas on the “Attachments” tab of the identify window (see `attach_tab_pic`).

#### NOTE
By default attachments could be added by any user but there is an option to limit number of users who can upload photos (see [Managing access rights](https://docs.nextgis.com/docs_ngcom/source/permissions.html)).

You can edit file names and descriptions of the added attachments. To delete an attachment, press the cross icon to its right. If you’ve made an error during editing, press **Reset**, all modifications will be cancelled.

To delete an attachment select it on the “Attachments” tab of the edit window, click **Delete**, and then click **Save** button.

See the process of adding attachments in our video:

<iframe width="560" height="315" src="https://www.youtube.com/embed/t1c1GT2myD4?si=q-zfGXgUifTx_62U" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

Watch on [youtube](https://youtu.be/t1c1GT2myD4?si=2SZsLHOYH_lfnNAx).

<a id="ngw-attachments-panoramas"></a>

### How to use panoramas

Not only photos, but also panoramas can be added as attachments. They allow to immerse explore new locations or find new details in familiar places.

![image](docs_ngweb/source/_static/identpanel_attachm_panor_en.png)

Uploaded panoramic images must comply with the Google XMP Photo Sphere [specification](https://developers.google.com/streetview/spherical-metadata?hl=en).

See how to work with panoramas in our video:

<iframe width="560" height="315" src="https://www.youtube.com/embed/MeZ0jJAbZ5I?si=czq1-hdAKBZpfabA" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

Watch on [youtube](https://youtu.be/MeZ0jJAbZ5I?si=F6s_wScaTeEjfpPl).

<a id="ngw-attachments-imp-exp"></a>

### Export and import attachments

To copy feature attachments between different layers or to create a backup you can save them to your device as an archive (Standard layer saving does not include attachments).

Navigate to the layer resource page and select **Manage attachments**.

![image](docs_ngweb/source/_static/manage_att_select_en.png)

To save the attachments, go to the **Export** tab and press **Export attachments to ZIP archive**. The resulting ZIP archive will contain all of the attachments put in directories named after feature IDs. Attachment metadata are put into a separate JSON file.

![image](docs_ngweb/source/_static/manage_att_export_en.png)

The resulting archive can be imported to add the attachments to the layer features. Open the **Import** tab, click **Import attachments from ZIP archive** and select the archive on your device. An archive must contain directories named after feature IDs. Each folder can contain one or many attachments. Duplicates will be ignored. If you need to replace the current attachments, tick “Delete existing attachments”.

![image](docs_ngweb/source/_static/manage_att_import_en.png)
<!-- to do:: See the process of importing and exporting attachments in our video: -->

<a id="ngw-manage-descriptions"></a>

## Export and import feature descriptions

Feature descriptions are not included in the data file while exporting the layer features or copying them to another layer. So if you want to copy the descriptions too, you can export them separately.

![image](docs_ngweb/source/_static/ngw_manage_descriptions_en.png)

Two tabs are available: export and import. On the Export tab you can download the descriptions af all layer’s features as a ZIP archive.

![image](docs_ngweb/source/_static/ngw_descriptions_export_en.png)

The archive contains one HTML per layer feature, with the feature ID used as the file name. The text formatting is preserved.

To upload the saved descriptions, open the target layer, to to **Manage descriptions**, open the “Import” tab and upload the ZIP-archive.

![image](docs_ngweb/source/_static/ngw_descriptions_import_en.png)

If the layer features already have descriptions and you want to replace them, tick **Delete existing descriptions**.

<a id="ngw-allow-edit"></a>

## Disable editing on the map

By default editing of features on a Web Map is enabled. You can disable editing in the Web Map settings on the “Settings” tab.

#### NOTE
There are other way to edit vector layers. If you don’t want users to modify your data, configure [permissions](https://docs.nextgis.com/docs_ngcom/source/permissions.html) for the resources.

Click ![pencil](docs_ngweb/source/_static/button_edit.png) next to the Web Map name to enter [Update resource](https://docs.nextgis.com/docs_ngweb/source/edit_resource.html#ngw-update-resource) dialog.

On the Settings tab in the Layers editing field select **Disable** in the dropdown menu.

![image](docs_ngweb/source/_static/webmap_no_editting_en.png)
