Edit layers#

NextGIS Mobile allows you to edit vector layers added to the map.

If a layer in Web GIS has custom forms for entering and editing attributes, they are automatically loaded when the layer is added to NextGIS Mobile.

Enter Edit mode#

There are several ways to switch to Edit mode:

  1. Long press a feature on the screen to activate the Edit mode for the layer.

If there are multiple features at the selected location, for example, a polygon and a point, a list will appear. Select the layer you want to edit.

A short tap will also bring up the toolbar, but only to view the feature information.

  1. In the Layers Tree, open the tree dots vector layer menu and select pencil “Edit”.

../../_images/mobile_layer_context_edit_en.png

Fig. 1033. Layer menu#

  1. Tap the large blue button in the bottom right corner to open the main operations menu.

../../_images/ngm_main_button_en_2.png

Fig. 1034. Main operations menu#

Tap pencil to enter Edit mode.

../../_images/ngm_main_edit_en_2.png

Fig. 1035. Starting editing from the main operations menu#

In the dialog box that opens, select the desired vector layer.

../../_images/select_layer_dialog_en.png

Fig. 1036. Layer selection dialog#

Editing toolbar#

In the Edit mode, there is a toolbar at the bottom of the screen; it is the same for vector layers with any geometry.

../../_images/toolbar_edit_layer_en.png

Fig. 1037. Editing toolbar#

With these tools, you can:

When you choose geometry editing, the panel provides tools for the corresponding geometry type:

Add feature#

Activate Edit mode <https://docs.nextgis.com/docs_ngmobile/source/editing.html#ngmobile-switch-to-edit>_ from the layer menu or via the large blue button in the bottom right corner, see. Enter Edit mode.

In the editing toolbar, click +.

For each geometry type, there are some particularities, described in more details below:

After entering the geometry, tap floppy disc. The attribute input screen opens.

../../_images/ngm_edit_attr_standard_en.png

Fig. 1038. Entering attributes.#

The numbers indicate: 1 - back; 2 - apply changes; 3 - add photo.

You can attach photos to a feature using the “Add photo” button camera.

Fill in the required fields, click tick to complete feature creation.

Below is a more detailed description of creating different types of geometries.

Create point#

Select a vector layer with point/multipoint geometry type. Switch to Edit mode from the layer’s menu or via the large blue button in the bottom right corner.

On the editing toolbar, tap + “Add new feature”.

A new point will appear in the center of the screen, highlighted in red. A cursor dark blue arrow will be displayed next to the point.

../../_images/mob_new_point_en.png

Fig. 1039. Adding a point to a point layer#

To move the point, hold the arrow dark blue arrow and drag it to the desired location.

The following buttons are available in the top panel:

  • X exit Edit mode (without saving);

  • arrow to the left undo changes;

  • arrow to the right redo changes;

  • floppy disc save geometry changes and proceed to entering feature attributes;

In the bottom panel:

  • point to plus move the point to the center of the screen;

  • point to location marker move the point to the current location.

To add a feature consisting of multiple points to a layer with multipoint geometry after adding the first point click “Add Point” point with a plus. The new point can also be moved using the arrow dark blue arrow.

../../_images/mob_new_multipoint_en.png

Fig. 1040. Adding a point to a multipoint layer#

Additional tools for multipoint features:

  • point with a plus add point to multipoint feature;

  • point with X delete point from multipoint feature.

After the point is set to the desired location, tap floppy disc. The created geometry is saved and the attribute form is open.

After all attributes are set, tap “Apply Changes” tick to save the attributes.

See how to add and label points in our videos:

Watch on youtube.

Watch on youtube.

Create line#

Select a vector layer with linestring geometry. Switch to Edit mode from the layer’s menu or via the large blue button in the bottom right corner.

On the editing toolbar, tap + “Add new feature”.

A new line will appear in the center of the screen. One of the line’s vertices will be highlighted and have a cursor dark blue arrow next to it. Use the cursor to drag the vertices anywhere on the map.

../../_images/new_line_en.png

Fig. 1041. Adding a line#

The following buttons are available in the top panel:

  • X exit Edit mode (without saving);

  • arrow to the left undo changes;

  • arrow to the right redo changes;

  • floppy disc save geometry changes and proceed to entering feature attributes;

In the bottom panel:

  • point with X delete vertex;

  • point to plus move vertex to the center of the screen;

  • point to location marker move vertex to the current location;

  • person add vertices by walking;

  • hand add vertices by touch.

To add a new vertex, click on the point in the middle of the segment and drag it to the side.

Add any number of vertices to create a complex line.

To add a feature consisting of multiple lines to a layer with multiline geometry after adding the first line tap “Add Line” line with a plus sign. After this, you can set the positions of the vertices of the new line.

../../_images/new_multiline_en.png

Fig. 1042. Adding a line to a multiline layer#

The following additional buttons are available for multilines:

  • line with a plus sign add line;

  • line with X delete line.

Adding geometry by walking and touch may not fit on the screen; in that case, tap the three dots to see hidden options.

After adding a new line, tap floppy disc. The created geometry is saved and the attribute form is open.

Fill in the form fields and tap “Apply changes” tick to save the attributes.

Create polygon#

Select a vector layer with polygon/multipolygon geometry type. Switch to Edit mode from the layer’s menu or via the large blue button in the bottom right corner.

On the editing toolbar, tap + “Add new feature”.

A new polygon, a triangle, will appear in the center of the screen. One of the polygon’s vertices will be highlighted, with a cursor dark blue arrow next to it. To move a vertex of a polygon, select it, then drag the cursor to the desired location.

../../_images/new_polygon_en.png

Fig. 1043. Adding a polygon#

The following buttons are available in the top panel:

  • X exit Edit mode (without saving);

  • arrow to the left undo changes;

  • arrow to the right redo changes;

  • floppy disc save geometry changes and proceed to entering feature attributes;

In the bottom panel:

  • polygon with a hole add inner ring;

  • triangle with a hole and an X delete inner ring;

  • point with X delete vertex;

  • point to plus move vertex to the center of the screen;

  • point to location marker move vertex to the current location;

Tap on the three dots to open a menu with other functions that didn’t fit on the panel:

  • person add vertices by walking;

  • hand add vertices by touch.

To add a vertex, tap on the point in the middle of the polygon’s side and drag it. You can add any number of vertices and modify the polygon geometry.

To cut a hole in a polygon, tap the “Add inner ring” button polygon with a hole. The ring geometry can be adjusted the same as the polygon.

Note

The ring geometry must be located INSIDE the polygon geometry, otherwise the changes will not be saved!

To add a feature consisting of multiple polygons to a multipolygon layer, create the first polygon, then tap “Add Polygon” triangle with a plus sign. Next, set the geometry of the new polygon.

../../_images/new_multipolygon_en.png

Fig. 1044. Adding a polygon to a multipolygon layer#

Additional buttons are available for multipolygons:

  • triangle with a plus sign add polygon;

  • triangle with X delete polygon.

After adding a new polygon, tap floppy disc. The created geometry is saved and the attribute form is open.

Fill in the form fields and tap “Apply changes” tick to save the attributes.

Mark current location#

The current location can be added to a vector layer with point or multipoint geometry.

Click the large blue button in the bottom corner and select the icon with the pushpin image map pin.

In the dialog that opens, select the desired vector layer. If only one point/multipoint layer is available, it will be selected automatically.

../../_images/ngm_currentloc_select_layer_en.png

Fig. 1045. Selecting layer to mark current location#

The current location will be added to the selected layer as a new point feature. The feature attribute form will open.

Fill in the form fields and tap “Apply changes” tick to save the attributes.

Create a line or polygon by walking#

Geometry can be added to a linear or polygonal layer by walking – that is, by recording the trajectory of your movement.

If you are already editing the layer, tap person in the bottom panel (see Fig. 1041.).

If not, tap the large blue button in the bottom corner and select the walking person icon person.

../../_images/mob_new_walk_en.png

Fig. 1046. Selecting feature creation by walking#

In the dialog that opens, select the desired vector layer.

../../_images/ngmobile_selectlayer_by_walk_en.png

Fig. 1047. Selecting layer to add geometry by walking#

This layer will open in Walking mode, and NextGIS Mobile will start recording new geometry into the vector layer.

../../_images/ngm_new_walk_process_en.png

Fig. 1048. Adding geometry by walking.#

The numbers indicate: 1 - stop recording (without saving); 2 - status icon; 3 - feature ID and layer name; 4 - save feature; 5 - current device location; 6 - starting point; 7 - walking mode indication; 8 - location settings.

Note

If you see that the accuracy of the added geometry is insufficient, you can adjust NextGIS Mobile location settings lines with dashes.

When you’ve reached the end, tap floppy disc Save feature.

The attribute input screen opens (see Fig. 1038.)

Tap tick “Apply changes” to finish adding the feature.

Edit geometry#

A long press on a feature activates Edit mode. The selected feature changes its color to blue, and an editing toolbar appears. Tap the pencil icon. After that, the feature changes its color to red, a cursor dark blue arrow appears next to it.

Edit point and multipoint#

Hold the feature to activate Edit mode (see also other methods). When editing a multipoint, all points belonging to one feature are highlighted. The currently edited point is highlighted in red, and a cursor dark blue arrow is displayed next to it.

../../_images/edit_multipoint_en.png

Fig. 1049. Multipoint editing#

To move the selected point:

  • hold the dark blue arrow cursor and drag it to a new location;

  • point to plus move the point to the center of the screen;

  • point to location marker move the point to the current device location.

Additional operations are also available for multipoints:

  • point with a plus add point to multipoint feature;

  • point with X delete selected point from the multipoint.

You can cancel editing at any time without saving changes by tapping X.

To finish editing the geometry and save changes, tap floppy disc.

Edit line and multiline#

A long press on a feature activates the editing panel. Tap the pencil icon.

After that, the feature changes its color to red, a cursor dark blue arrow appears next to one of the vertices.

../../_images/edit_multiline_en.png

Fig. 1050. Multiline editing#

When editing a multiline, all lines belonging to it are highlighted. The line currently being edited and one of its vertices are highlighted in red, with a cursor dark blue arrow displayed next to the vertex.

To move the selected vertex of the line:

  • hold the dark blue arrow cursor and drag it to a new location;

  • tap point to plus to move the vertex to the center of the screen;

  • tap point to location marker to move the vertex to your current location.

Also you can:

  • add a vertex by selecting the small dot in the middle of the segment and dragging it to the desired location.

  • point with X delete selected vertex;

  • line with a plus sign add a new line to the multiline;

  • line with X delete the selected line from the multiline;

  • person add vertices by walking;

  • hand add vertices by touch.

Note

If only one vertex is left, the line is deleted.

You can cancel editing at any time without saving changes by tapping X.

To finish editing the geometry and save changes, tap floppy disc.

Edit polygon and multipolygon#

A long press on a feature activates the editing panel. Tap the pencil icon. After that, the feature changes its color to red, a cursor dark blue arrow appears next to one of the vertices. When editing a multipolygon, all its parts are highlighted. The currently edited polygon and one of its vertices are highlighted in red, with a cursor displayed next to the selected vertex.

../../_images/edit_multipolygon_en.png

Fig. 1051. Editing a multipolygon Options that do not fit in the bottom panel are available in the menu. Tap the three dots on the right side of the panel to open it.#

To move the selected vertex:

  • hold the dark blue arrow cursor and drag it to a new location;

  • tap point to plus to move the vertex to the center of the screen;

  • tap point to location marker to move the vertex to your current location.

Also you can:

  • add a vertex by selecting the small dot in the middle of the segment and dragging it to the desired location;

  • point with X delete selected vertex;

  • polygon with a hole add inner ring (ring geometry is edited the same way as polygon geometry);

  • triangle with a plus sign add a new polygon to the multipolygon,

  • triangle with X delete the selected polygon from the multipolygon;

  • person add vertices by walking;

  • hand add vertices by touch.

Note

  • The ring geometry must be located INSIDE the polygon geometry, otherwise the changes will not be saved!

  • If only two vertices remain, the polygon is deleted.

You can cancel editing at any time without saving changes by tapping X.

To finish editing the geometry and save changes, tap floppy disc.

Edit attributes#

Activate Edit mode for the layer. For example, a long press on a feature will open the editing panel.

After the editing panel opens, select the feature (if it is not already selected) and tap i in a circle “View feature Attributes” . To proceed to editing, tap rectangle with lines.

../../_images/ngm_view_attr_en.png

Fig. 1052. Viewing attributes.#

The numbers indicate: 1 - return to the previous screen; 2 - layer name and feature ID; 3 - attribute fields; 4 - settings; 5 - close attributes viewer; 6 - set attributes; 7 - go to the previous feature in the layer; 8 - go to the next feature in the layer.

NextGIS Mobile displays the following default attribute fields (see Fig. 1052., item 4):

  • For layers with point/multipoint geometry: the location of each point (latitude/longitude).

  • For layers with linear/multilinear geometry: the length of each line (in meters).

  • For layers with polygonal/multipolygonal geometry: perimeter length (in meters) and area of each polygon (in square meters).

There are two forms for editing attributes:

Standard attribute editing form#

On the attribute view screen, tap|ic_attributes| to edit the values.

If a custom form has not been added to the layer, the standard attribute input form opens. It contains all the layer fields, with their names indicated above.

../../_images/ngm_edit_attr_standard_en.png

Fig. 1053. Standard attribute editing form#

The numbers indicate: 1 - Back, 2 - Apply changes, 3 - Settings, 4 - Add photo

After all attributes are set, tap tick to save the changes.

The camera button allows you to add graphic files (e.g., photos) from local storage to each feature or take new photos and add them.

Custom form for attribute editing#

If a custom form is added to the layer, it will be used for editing attributes. An example of a custom form:

../../_images/ngm_edit_attr_form_en.png

Fig. 1054. Custom form for editing attributes.#

The numbers indicate: 1 - return to the previous screen; 2 - apply changes; 3 - settings; 4 - dropdown list; 5 - field for entering numbers and free text; 6 - radio buttons; 7 - date and time selection; 8 - distance from current location; 9 - add photo.

The attribute editing form can contain the following input fields:

  • Text field - for entering text or numbers, depending on the type of the field itself;

  • Dropdown, double dropdown, dependent dropdowns - allows selection from a predetermined list. A dependent dropdown allows you to select a broad category first and then a specific item within it, for example, city + city district.

  • Checkbox - tick or untick;

  • Radio button - selection of one of the possible options;

  • Date - select a date from the calendar;

  • Photo - create a new photo or upload an image from your device.

See also

How to create a custom form More details on form elements

After filling in all the required attributes, tap tick “Apply Changes” to save the edits.