# Map

The **Map** widget allows you to view the location of a device on a map only if it has been configured with geolocation (latitude and longitude).

In the **Widget options** modal, enter a **name** as the label for your widget in the **Name** text box.

You can display the device position on the map in one of the following ways:

**Current position:**&#x20;

This will show the current/live position of the device on the map.

Click on the **Current position** checkbox to **select** it.

Click on the **Save** button.

<figure><img src="https://2494440469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fggsr9Xlsze5cwVr4WMof%2Fuploads%2FWL1nLqqdSbDFZubSCfsb%2Fmap-1.png?alt=media&#x26;token=56a8d9b8-a431-4320-a528-6db3caa1e172" alt="" width="328"><figcaption></figcaption></figure>

The resulting **Map** widget looks something like this:

<figure><img src="https://2494440469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fggsr9Xlsze5cwVr4WMof%2Fuploads%2FSwhud26e07XGOFDfPquc%2Fmap-3.png?alt=media&#x26;token=43c1df0b-8fcc-4cf0-9559-60e8425046e6" alt=""><figcaption></figcaption></figure>

**As an array of points:**

This will display the device's position over the selected timeframe as a route consisting of a series of points with directions.

Click on the **Current position** checkbox to **de-select** it.

Choose the desired timeframe using one of the following options:

* Click on the **Last from** text box and select a predefined timeframe from the list. If the desired timeframe is not available, you can manually type a timeframe, such as '3 days', '7 weeks', etc. Note that '3 days' refers to the last three days, including today, for example. Here is a list of predefined timeframe presets: `1 hour`, `1 day`, `1 week`, `1 month`, and `1 year`.
* Define a custom date range by selecting the **start date** and **end date**, including the start time and end time too from the date pickers.

Click on the **Save** button.&#x20;

<figure><img src="https://2494440469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fggsr9Xlsze5cwVr4WMof%2Fuploads%2FmShUqXDpHs49TGjMrovx%2Fmap-2.png?alt=media&#x26;token=22091d22-79eb-4ea3-b105-9e057499c0e1" alt="" width="327"><figcaption></figcaption></figure>

The resulting **Map** widget looks something like this:

<figure><img src="https://2494440469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fggsr9Xlsze5cwVr4WMof%2Fuploads%2FduSQwFrjfHQXKeU97Jx1%2Fmap-4.png?alt=media&#x26;token=e5489ac7-de34-45fe-befa-a178dbd5ea71" alt=""><figcaption></figcaption></figure>
