Grafana Guide: Geomap

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

Checked on 2026-11-11 against Grafana 13.3.x.

What you build

You add a Geomap panel, Requests by country, to the dashboard Bookshelf (guides). It shows a world map with one marker for each country in the data. The size and colour of each marker grow with the number of requests from that country, and a heatmap layer under the markers shows where the requests concentrate. The Bookshelf metrics of the lab carry no location, so the panel reads a small table of country codes and request counts that you type into the TestData data source. The same steps work for any query that returns a country code, a pair of latitude and longitude fields or a geohash.

Dashboard Bookshelf (guides) in view mode with the Geomap panel Requests by country: a dark world map with yellow to red markers sized by the requests of each country, a heatmap layer under them and the legend Layer 1 from 90 to 1840

Before you start

  • Start the Grafana profile of the hands-on lab and wait about a minute:

    cd lab
    docker compose --profile grafana up -d
  • Open http://localhost:3000, sign in as admin with the password admin, and click Skip when Grafana 13.3 asks you to update the default password.

  • Do the guide Create a dashboard and the first panel first: it creates the folder Guides and the dashboard Bookshelf (guides) that this guide extends.

  • The data source TestData is provisioned by the lab. It generates data inside Grafana, here from a CSV table, so the panel needs no traffic from the load generator.

  • The map itself, the Default base layer, comes from the CARTO basemap service over the internet, so the lab host needs internet access for the land and the coastlines; the markers draw without it. The country positions come from the Countries gazetteer that ships with Grafana.

  • The guide was checked on Grafana Enterprise 13.3.0 (the free image, no licence key). Editing dashboards needs the Editor or Admin role of the organization; admin has it.

  • The figures are drawings of the Grafana 13.3 user interface, not screenshots, so small details can differ from your screen. The maps in the figures draw the real country outlines (Natural Earth, at a scale of 1:110 million) in the colours of the dark CARTO basemap that Grafana uses. A highlighted box with a number marks the control of the step with the same number.

Steps

The panel editor used here is the one shown in the map of the first dashboard guide; come back to that map when a control is not where a figure shows it. The options pane of Geomap is long: scroll it, or type an option name in Search options, when an option of a step is not in view.

Open the dashboard and add a panel

  1. In the left navigation, click Dashboards, open the folder Guides and click Bookshelf (guides).

  2. Click Edit at the top right.

    Dashboard Bookshelf (guides) in view mode with the navigation docked: callout 1 marks the Dashboards item of the navigation and callout 2 marks the Edit button of the toolbar
  3. In the toolbar, click Add.

  4. In the Add pane of the right sidebar, click the Panel tile.

    Dashboard Bookshelf (guides) in edit mode with the Add pane of the right sidebar open: callout 3 marks the Add button of the toolbar and callout 4 marks the Panel tile of the Add pane
  5. In the Panel pane that replaces the Add pane, click Edit visualization.

Type the country data

  1. At the bottom of the panel editor, open the Data source list, which shows Prometheus, type TestData and choose TestData.

  2. In query A, open the Scenario list, which shows Random Walk, and choose CSV Content. An empty CSV editor appears.

  3. Click inside the CSV editor and type the table below: a header line, then one line per country with its two-letter ISO 3166-1 code and a request count.

    country,requests
    US,1840
    IN,1210
    CN,1150
    BR,620
    DE,410
    GB,380
    FR,300
    JP,290
    NG,250
    MX,240
    AU,160
    ES,150
    ZA,90
    Panel editor on the Queries tab: the data source TestData is marked by callout 6, the Scenario list set to CSV Content by callout 7 and the CSV editor, whose first lines are country,requests, US,1840, IN,1210 and CN,1150, by callout 8

Choose Geomap and place the markers

  1. In the right column, click the All visualizations tab, type Geomap in Search for…​ and click Geomap ("Geomap panel"). The preview turns into a world map with the first data layer, Layer 1, of type Markers.

    Panel editor with the All visualizations tab of the right column: Geomap is typed in the search field and the only result, Geomap with the description Geomap panel, is marked by callout 9
  2. The right column becomes the options pane, headed Geomap. Under Panel options, type Requests by country in Title.

  3. Under Map layers, with Layer 1 (markers) selected, open Location Mode and choose Lookup ("Specify Gazetteer and lookup field"). With the default, Auto, Grafana looks for fields named like latitude, longitude or geohash and finds none in this table.

  4. Open Lookup field and choose country. Leave Gazetteer at Countries: it turns each two-letter code into the position of that country, and one small green marker appears on each country of the table.

    Panel editor with the Geomap options pane: the Title Requests by country is marked by callout 10, the Location Mode Lookup of Layer 1 (markers) by callout 11 and the Lookup field country by callout 12, with the Gazetteer Countries below; the preview shows a dark world map with one small green marker on each country of the data

Size and colour the markers by value

  1. Further down in the same layer, under Styles, open Size, which shows Fixed value, and choose requests. Min (2) and Max (15) appear: the country with the fewest requests gets the smallest marker and the one with the most gets the largest.

  2. Open Color, which shows Fixed color, and choose requests, so that the colour of each marker also follows its value.

    Panel editor with the Styles of Layer 1: Size set to the field requests, with Min 2 and Max 15, is marked by callout 13 and Color set to requests by callout 14; the preview draws the largest markers on the United States, India and China
  3. The colours come from the field settings. Open Standard options, open Color scheme, which shows From thresholds (by value), and choose Yellow-Red (by value). The markers go from yellow for few requests to red for many, and the legend Layer 1 shows the range from 90 to 1840 at the bottom left of the map.

    Panel editor with Standard options open: the Color scheme Yellow-Red (by value) is marked by callout 15; the preview colours the markers from yellow for few requests to red for many and shows the legend Layer 1 with the range 90 to 1840

Add a heatmap layer and save

  1. Under Map layers, click Add layer and choose Heatmap ("Visualizes a heatmap of the data"). The new layer, Layer 2 (heatmap), is added above Layer 1 and selected.

    Panel editor with the Add layer list of Map layers open, listing Markers, Heatmap, GeoJSON, Night / Day, Route, Photos and Network; the entry Heatmap is marked by callout 16
  2. A new layer has its own location settings. Set Location Mode to Lookup and Lookup field to country, as in steps 11 and 12.

  3. Open Weight values and choose requests, so that a country with more requests glows hotter. Radius, Blur and Opacity below it change the size and softness of the glow.

  4. Click Save in the header of the editor.

    Panel editor with Layer 2 (heatmap) selected above Layer 1 (markers): Location Mode Lookup and Lookup field country are marked by callout 17, Weight values set to requests by callout 18 and the Save button of the editor by callout 19; the preview adds glowing density areas under the markers
  5. In the Save dashboard drawer, click Save.

  6. Click Back to return to the dashboard.

  7. Click Exit edit. If Grafana 13.3.0 shows the dialog Unsaved changes, click Save and click Save again in the drawer, as in the first dashboard guide.

Check the result

Open Dashboards → Guides → Bookshelf (guides). The panel Requests by country must show the world map with thirteen markers: the largest and reddest on the United States, India and China, the smallest and yellowest on South Africa. Hover a marker: the tooltip lists the country and requests of that row. Drag the map and use the + and − buttons at the top left to zoom.

The data is typed into the query, so the load generator has no effect on this panel; change a number in the CSV editor of the panel to see the marker change.

Variations

  • Use positions instead of countries: add lat and lon columns to the CSV, with a row for each city, and set Location Mode to Coords ("Specify latitude and longitude fields"), then pick lat and lon as the two fields.

  • Start the panel on one region: under Map view, open View and choose Fit to data, or a region such as Europe, and set Zoom.

  • Change the map behind the data: under Basemap layer, open Layer type and choose OpenStreetMap, CARTO basemap (with a light or dark theme), ArcGIS MapServer or XYZ Tile layer.

  • Show a text next to each marker: under Styles, set Text label to the field requests.

  • Use real data: any query that returns a two-letter country code works with the same Lookup settings, for example a PostgreSQL table of orders by country added with the guide Add a data source.

What can go wrong

Symptom Cause Fix

The layer shows Unable to find location fields

Location Mode is Auto, and the table has no field named like a latitude, a longitude or a geohash.

Set Location Mode to Lookup and Lookup field to country.

The map shows land but no markers

The codes do not match the gazetteer: a lower-case code, a space after the comma, or a three-letter code.

Type upper-case two-letter codes without spaces, or pick the matching Gazetteer.

The panel shows markers on a blank background

The lab host cannot reach the CARTO basemap service.

Check the internet access of the host, or choose a basemap that your network can reach under Basemap layer.

All markers have the same size and colour

Size and Color are still a fixed value and a fixed colour.

Set both to the field requests under Styles.

The heatmap layer draws nothing

The new layer still uses Location Mode Auto.

Set Location Mode to Lookup and Lookup field to country in Layer 2 too.

Exit edit keeps showing Unsaved changes

Grafana 13.3.0 raises the dialog even after a save.

Click Save, and Save again in the drawer; the dialog does not return once edit mode has closed.

Clean up

Keep the panel, or remove it: open the dashboard, click Edit, open the menu of the panel Requests by country and delete it, then save the dashboard.

Where to go next