Edit layers#
NextGIS Mobile allows you to edit vector layers added to the map.
add a new feature to the layer;
change feature:
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:
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.
Fig. 1033. Layer menu#
Tap the large blue button in the bottom right corner to open the main operations menu.
Fig. 1034. Main operations menu#
Fig. 1035. Starting editing from the main operations menu#
In the dialog box that opens, select the desired vector layer.
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.
Fig. 1037. Editing toolbar#
With these tools, you can:
add a new feature to the layer;
view feature attributes and modify them.
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
. The attribute input screen opens.
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
.
Fill in the required fields, click
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
will be displayed next to the point.
Fig. 1039. Adding a point to a point layer#
To move the point, hold the arrow
and drag it to the desired location.
The following buttons are available in the top panel:
In the bottom panel:
To add a feature consisting of multiple points to a layer with multipoint geometry after adding the first point click “Add Point”
. The new point can also be moved using the arrow
.
Fig. 1040. Adding a point to a multipoint layer#
Additional tools for multipoint features:
After the point is set to the desired location, tap
. The created geometry is saved and the attribute form is open.
After all attributes are set, tap “Apply Changes”
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
next to it. Use the cursor to drag the vertices anywhere on the map.
Fig. 1041. Adding a line#
The following buttons are available in the top panel:
In the bottom panel:
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”
. After this, you can set the positions of the vertices of the new line.
Fig. 1042. Adding a line to a multiline layer#
The following additional buttons are available for multilines:
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
. The created geometry is saved and the attribute form is open.
Fill in the form fields and tap “Apply changes”
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
next to it. To move a vertex of a polygon, select it, then drag the cursor to the desired location.
Fig. 1043. Adding a polygon#
The following buttons are available in the top panel:
In the bottom panel:
Tap on the three dots to open a menu with other functions that didn’t fit on the panel:
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
. 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”
. Next, set the geometry of the new polygon.
Fig. 1044. Adding a polygon to a multipolygon layer#
Additional buttons are available for multipolygons:
After adding a new polygon, tap
. The created geometry is saved and the attribute form is open.
Fill in the form fields and tap “Apply changes”
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
.
In the dialog that opens, select the desired vector layer. If only one point/multipoint layer is available, it will be selected automatically.
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”
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
in the bottom panel (see Fig. 1041.).
If not, tap the large blue button in the bottom corner and select the walking person icon
.
Fig. 1046. Selecting feature creation by walking#
In the dialog that opens, select the desired vector layer.
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.
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
.
When you’ve reached the end, tap
Save feature.
The attribute input screen opens (see Fig. 1038.)
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
icon. After that, the feature changes its color to red, a cursor
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
is displayed next to it.
Fig. 1049. Multipoint editing#
To move the selected point:
Additional operations are also available for multipoints:
You can cancel editing at any time without saving changes by tapping
.
Edit line and multiline#
A long press on a feature activates the editing panel. Tap the
icon.
After that, the feature changes its color to red, a cursor
appears next to one of the vertices.
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
displayed next to the vertex.
To move the selected vertex of the line:
Also you can:
add a vertex by selecting the small dot in the middle of the segment and dragging it to the desired location.
Note
If only one vertex is left, the line is deleted.
You can cancel editing at any time without saving changes by tapping
.
Edit polygon and multipolygon#
A long press on a feature activates the editing panel. Tap the
icon. After that, the feature changes its color to red, a cursor
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.
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:
Also you can:
add a vertex by selecting the small dot in the middle of the segment and dragging it to the desired location;
add inner ring (ring geometry is edited the same way as polygon geometry);
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
.
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
“View feature Attributes” . To proceed to editing, tap
.
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 form available by default;
custom form can be added in NextGIS Web.
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.
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
to save the changes.
The
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:
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
“Apply Changes” to save the edits.











