# 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="/files/Ps0cnEpKMz8P2SncyMWy" alt="" width="328"><figcaption></figcaption></figure>

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

<figure><img src="/files/Zz59eU45ddymtpI7sQW5" 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="/files/EF7bPDhJ1yJA0mqTNFWY" alt="" width="327"><figcaption></figcaption></figure>

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

<figure><img src="/files/ylZv06CDYYLMLx1yhLtx" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.widgelix.com/get-started/widgets/map.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
