---
title: Map visualization
description: The Map visualization displays geo-temporal data on a geographic map.
url: https://docs.influxdata.com/influxdb/cloud/visualize-data/visualization-types/map/
estimated_tokens: 654
product: InfluxDB Cloud (TSM)
version: cloud
publisher: InfluxData
canonical: https://docs.influxdata.com/influxdb/cloud/visualize-data/visualization-types/map/
date: '2022-02-28T13:53:53-07:00'
lastmod: '2022-02-28T13:53:53-07:00'
---

The **Map** visualization displays geo-temporal data on a geographic map.

<img src="/img/influxdb/2-0-visualizations-map-point-example.png" width="730" alt="Map data visualization">

## Set up the Map visualization

To view geo-temporal data on a geographic map, set up a Map visualization.

### Set up the Map visualization

1. Do one of the following:

   * Click **Data Explorer** in the navigation bar.

     Data Explorer

   * Click **Dashboards** in the navigation bar:

     Dashboards

     Click the name of the dashboard to update and then do one of the following:

     * **To edit an existing cell**, click the  icon on
       the cell and then  **Configure**.
     * **To create a new cell**, click  **Add Cell**.

2. Use the **Query Builder** or the **Script Editor** to enter your query.
   To determine the location of points on a geographic map, query results must
   include the following **fields**:

   * **lat**: latitude in decimal degrees (WGS 84)
   * **lon**: longitude in decimal degrees (WGS 84)

   ***Or*** the `s2_cell_id` **tag** ([S2 Cell ID](https://s2geometry.io/devguide/s2cell_hierarchy.html#s2cellid-numbering) as a token)

   > [!Note]
> If query results include `lat` and `lon` fields *and* an `s2_cell_id` tag,
> the map uses the `lat` and `lon` fields to determine point locations.
> If results only include the `s2_cell_id`, the map uses the center of the S2 cell
> as the point location.

   *See [Example queries](#example-queries).*

## Example queries

* [View a bird’s migration path](#view-a-birds-migration-path)
* [View earthquakes reported by USGS](#view-earthquakes-reported-by-usgs)

### View a bird’s migration path

The following query uses the [Bird migration sample data](/influxdb/cloud/reference/sample-data/#bird-migration-sample-data)to display the migration path of a specific bird.

```js
from(bucket: "migration")
    |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
    |> filter(fn: (r) => r._measurement == "migration")
    |> filter(fn: (r) => r._field == "lat" or r._field == "lon")
    |> filter(fn: (r) => r.id == "91864A")  
    |> aggregateWindow(every: v.windowPeriod, fn: last)
```

### View earthquakes reported by USGS

The following query uses the [United States Geological Survey (USGS) earthquake data](/influxdb/cloud/reference/sample-data/#usgs-earthquake-data) to display the locations of earthquakes.

```js
from(bucket: "usgs")
    |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
    |> filter(fn: (r) => r._measurement == "earthquakes")
    |> filter(fn: (r) => r._field == "lat" or r._field == "lon")
```
