> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lightdash.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Map

> Use maps to display geographic data on an interactive map

<a href="https://demo.lightdash.com/projects/d496d901-a76d-4916-9eae-b81bc7337013/dashboards/c24ef37d-6a28-451d-b414-641595684f23/view" target="_blank">
  <Card title="See maps in action" icon="external-link" horizontal>
    Explore an interactive demo dashboard with scatter maps, area maps, and heatmaps.
  </Card>
</a>

<Frame>
  <iframe width="100%" height="420" src="https://www.loom.com/embed/23e6301e4d494168a5946273b86c0423" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen />
</Frame>

<Frame>
  <img src="https://mintcdn.com/lightdash/6PKvTpisKKqbaQZk/images/visualizations/map/intro.png?fit=max&auto=format&n=6PKvTpisKKqbaQZk&q=85&s=d3c3dab049ad655902781232c9203c0b" alt="map" width="1878" height="1112" data-path="images/visualizations/map/intro.png" />
</Frame>

Maps display geographic data on an interactive map. They support three visualization modes:

* **Scatter** - Plot individual points using latitude/longitude coordinates
* **Area (Choropleth)** - Color regions based on values
* **Heatmap** - Show density of points as a heat overlay

Maps are useful when:

* Visualizing geographic distribution of data
* Showing regional performance or metrics
* Displaying location-based patterns

If a CARTO background displays an "API key required" watermark on a self-hosted instance, ask your administrator to [configure a CARTO Basemaps API key](/self-host/customize-deployment/environment-variables#map-basemaps).

## Scatter maps

<Frame>
  <img src="https://mintcdn.com/lightdash/6PKvTpisKKqbaQZk/images/visualizations/map/scatter.png?fit=max&auto=format&n=6PKvTpisKKqbaQZk&q=85&s=093a65d3ddacd5341b00d607d624de07" alt="scatter map" width="2828" height="1370" data-path="images/visualizations/map/scatter.png" />
</Frame>

Scatter maps plot individual data points on a map using latitude and longitude coordinates. You can optionally size and color the points based on field values.

### Data requirements

Your data must include latitude and longitude coordinates. If your data contains addresses instead of coordinates, you'll need to geocode them to latitude/longitude values using a third-party geocoding service before using them in a map.

### Layout options

| Option | Description |
| - | - |
| Latitude field | Field containing latitude coordinates. |
| Longitude field | Field containing longitude coordinates. |

### Display options

| Option | Description |
| - | - |
| Color based on | Field to determine point color. When set to a numeric field, displays a color gradient. |
| Color / Color range | Single color when no color field is selected, or gradient colors (2-5 colors) for numeric fields. |
| Size based on | Field to determine bubble size (optional). |
| Size / Size range | Fixed size when no size field is selected, or min/max range when sizing by a field. |
| Show legend | Toggle legend visibility. |
| Background map | None, OpenStreetMap, Light, Dark, Voyager (clean), or Satellite. Choose separate backgrounds for light and dark mode. When set to None, you can set a custom background color. |
| Save current map extent | Preserves zoom and pan position when enabled. |

## Area maps (Choropleth)

<Frame>
  <img src="https://mintcdn.com/lightdash/6PKvTpisKKqbaQZk/images/visualizations/map/cloreopath.png?fit=max&auto=format&n=6PKvTpisKKqbaQZk&q=85&s=ddb18f5e5ccd1c29594ec9a105d50283" alt="choropleth map" width="1360" height="1376" data-path="images/visualizations/map/cloreopath.png" />
</Frame>

Area maps color geographic regions based on data values. You can use built-in region shapes for countries or US states, or provide custom GeoJSON for other boundaries.

### Data requirements

* **Country codes** - ISO 3166-1 alpha-3 codes (e.g., "USA", "GBR") for world maps
* **US state codes** - State abbreviations (e.g., "CA", "NY") for US maps
* **Custom identifiers** - Any identifier that matches a property in your custom GeoJSON file

### Layout options

| Option | Description |
| - | - |
| Custom region | Toggle to use a custom GeoJSON file instead of built-in regions. |
| Map region | World or US (when custom region is off). |
| Custom GeoJSON URL | URL to your GeoJSON file (when custom region is on). |
| Map join field | Property from the GeoJSON file to join on (when custom region is on). |
| Data join field | Field in your data containing values that match the map join field. Label changes based on map type: "Country code field (ISO3)" for world, "State field" for US. |

#### Using custom GeoJSON

When you enable **Custom region**, you can provide a URL to any GeoJSON file that defines your region boundaries. After entering the URL, Lightdash loads the available properties from the GeoJSON and displays them in the **Map join field** dropdown. Select the property that contains values matching your data.

For example, if your GeoJSON has a `postal_code` property and your data has a `zip_code` field:

1. Enable **Custom region** and enter your GeoJSON URL
2. Select `postal_code` from the **Map join field** dropdown
3. Select your `zip_code` field as the **Data join field**

##### Custom GeoJSON URL requirements

Lightdash fetches custom GeoJSON files through a server-side proxy that enforces the following requirements:

* The URL must use **HTTPS**.
* The file path must end in `.json`, `.geojson`, or `.topojson`.
* The file must be **10 MB or smaller** and the host must respond within **30 seconds**.
* The host must be a public address. URLs that resolve to private, loopback, link-local, multicast, or carrier-grade NAT IP ranges are rejected.
* **Redirects are not followed.** Host your file at a stable URL that responds with `200 OK` directly.

If a URL fails these checks, the **Map join field** dropdown stays empty and the chart shows an error. Re-upload the file to a public HTTPS host (for example, a CDN or object storage bucket with public read access) and try again.

### Display options

| Option | Description |
| - | - |
| Color based on | Field to determine region color intensity. |
| Color range | Gradient colors (2-5 colors) from low to high values. |
| No data color | Color for regions that have no matching data. |
| Show legend | Toggle legend visibility. |
| Background map | None, OpenStreetMap, Light, Dark, Voyager (clean), or Satellite. Choose separate backgrounds for light and dark mode. When set to None, you can set a custom background color. |
| Save current map extent | Preserves zoom and pan position when enabled. |

## Heatmaps

<Frame>
  <img src="https://mintcdn.com/lightdash/6PKvTpisKKqbaQZk/images/visualizations/map/heatmap.png?fit=max&auto=format&n=6PKvTpisKKqbaQZk&q=85&s=441f7f9decd466f54ed98650aaf310b4" alt="heatmap" width="2816" height="1414" data-path="images/visualizations/map/heatmap.png" />
</Frame>

Heatmaps show the density of points as a heat overlay, useful for visualizing concentration of data points across geographic areas.

### Data requirements

Your data must include latitude and longitude coordinates. If your data contains addresses instead of coordinates, you'll need to geocode them to latitude/longitude values using a third-party geocoding service before using them in a map.

### Layout options

| Option | Description |
| - | - |
| Latitude field | Field containing latitude coordinates. |
| Longitude field | Field containing longitude coordinates. |

### Display options

| Option | Description |
| - | - |
| Color range | Gradient colors (2-5 colors) from low to high density. |
| Radius | Size of each heat point (1-50). |
| Blur | Amount of blur applied to heat points (0-30). |
| Opacity | Transparency of the heatmap overlay (0.1-1). |
| Show legend | Toggle legend visibility. |
| Background map | None, OpenStreetMap, Light, Dark, Voyager (clean), or Satellite. Choose separate backgrounds for light and dark mode. When set to None, you can set a custom background color. |
| Save current map extent | Preserves zoom and pan position when enabled. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.