<a id="tracks"></a>

# Tracks

With NextGIS Mobile you can record your movements and display tracks. The app records points of your location to its internal database and visualizes them as lines on the map.

<a id="tracks-settings"></a>

## Setting up

To record a track, make sure the app has access to your **location** (check the device settings, something like Settings ‣ Confidentiality ‣ Location).

To display your tracks on a Web Map in your WebGIS:

* Make sure you’re logged in (![tree dots](docs_ngmobile/source/_static/ic_menu.png) - Settings - Account).
* Copy the device ID (Settings - My tracks - Device ID) and [add the tracker to Web GIS](https://docs.nextgis.com/docs_ngcom/source/tracking.html#tracking-create).
* In Settings - My tracks enable **Send location to server**

![image](docs_ngmobile/source/_static/Mobile_send_to_server_en.png)

Now the tracks you record are automatically send to your Web GIS and can be [viewed on a Web Map](https://docs.nextgis.com/docs_ngweb/source/trackers.html#tracking-web-map).

<a id="ngmobile-record-tracks"></a>

## Record a track

For each recorded location point the app captures the following information: date, time, speed (km/h), height (m), course (bearing i.e. the horizontal direction of travel of this device in the range between 0 and 360 counting clockwise from the North), number of satellites and HDOP.

Tracks are stored on the device in GPX format.

#### SEE ALSO
Use tracking to [add a new line or polygon to an existing vector layer](https://docs.nextgis.com/docs_ngmobile/source/editing.html#ngmobile-add-track).

To start recording a track, open the main menu ![tree dots](docs_ngmobile/source/_static/ic_menu.png) and select **Start new track**.

![image](docs_ngmobile/source/_static/ngm_start_track_en.png)

Track recording is performed in background mode. If it’s the first time you’re recording a track, the app asks for additional permissions (exact dialogs depend on your OS):

* Allow background access to geolocation (select **Allow all the time**);
* Disable battery optimisation (otherwise it may shut down the track recording) - allow NextGIS Mobile to be active in the background.

See details in our video:

<iframe width="560" height="315" src="https://www.youtube.com/embed/uPkVkVakppE?si=52PecU2RFcwiUiQM" 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/uPkVkVakppE?si=bZKQqlM4xmwuRqbC).

![image](docs_ngmobile/source/_static/ngm_geoloc_background_en.png)![image](docs_ngmobile/source/_static/ngm_geoloc_all_en.png)![image](docs_ngmobile/source/_static/ngm_batteryopt_disable_en.png)![image](docs_ngmobile/source/_static/ngm_battery_ignore_en.png)

When a track is recording, it’s indicated in the notifications panel.

![image](docs_ngmobile/source/_static/ngm_track_status_en.png)

While the track is recording, you can see it on the map. Recording status icon (a walking figure) is displayed in the notification panel of your device. Your current location is marked by an arrow ![arrow with cross](docs_ngmobile/source/_static/ic_location_moving.png).

![image](docs_ngmobile/source/_static/new_gpx_layer_2.png)

#### NOTE
Track points are grouped by days and sessions within a day. If track recording continues the next day track will be split up into two parts. If you want to combine them into one track, use [GPX merge](https://toolbox.nextgis.com/t/gpxmerge).

To stop track recording, tap **Stop** either in notification bar (see [Fig. 1079.](#ngmobile-new-gpx-layer-1-pic).) or in the main menu.

![image](docs_ngmobile/source/_static/ngm_stop_track_en.png)

The status icon will disappear from notification bar, the location marker will be replaced by the red flag indicating the end of the track.

![image](docs_ngmobile/source/_static/new_gpx_layer_3.png)

You can now manage this track, including its export in GPX format. To learn how to export the tracks see [Export tracks to GPX](share.html.md#ngmobile-export-gpx). Tracks can also be [displayed on a Web Map](https://docs.nextgis.com/docs_ngcom/source/tracking.html#tracking-create).

<a id="ngmobile-manage-tracks"></a>

## Manage tracks

Select the ![squiggle](docs_ngmobile/source/_static/ic_tracks.png) “My tracks” layer in the Layer tree. Open the layer menu ![three dots](docs_ngmobile/source/_static/ic_menu_grey.png) and select **List**.

![image](docs_ngmobile/source/_static/ngm_tree_tracks_menu_en.png)

A list of all recorded tracks is opened. Recorded points are grouped into days and sessions within one day.

![image](docs_ngmobile/source/_static/tracks_list_en.png)

To select a track mark it by a tick. When at least one track is selected, a toolbar appears.

![image](docs_ngmobile/source/_static/track_selected_en.png)

Use these tools to:

* set the color of track(s);
* share tracks as GPX files;
* make particular tracks visible/invisible by toggling the eye icon ![eye](docs_ngmobile/source/_static/ic_eye.png).

Tap the three dots in the top right corner to open the menu.

![image](docs_ngmobile/source/_static/track_list_menu_en.png)

Use this menu to:

* Make selected tracks visible/invisible;
* Delete selected tracks (**! cannot be undone**);
* Select all the tracks in the list to perform a group action (set visibility or delete).

#### WARNING
Once a track is deleted, it cannot be restored! To avoid losing important data, we advise to make backups of the tracks by [saving them as GPX files](https://docs.nextgis.com/docs_ngmobile/source/share.html#gpx).
