Kibana Guide: Maps

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 Kibana 9.5.x.

What you build

You add two geographic panels to the dashboard Bookshelf (guides). The first is a Lens region map that shades each country by the number of requests that came from it. The second is a Maps panel with two layers: a choropleth layer that joins the country shapes to the same counts, and a documents layer that draws one point for each request, with a tooltip. The Bookshelf logs have no geography, so both panels use the Sample web logs data of Kibana; the guide shows the steps, and the same steps work for any data with a country code or a geo_point field.

Finished Kibana dashboard Bookshelf (guides) in view mode with a region map of the sample web logs by country and a Maps panel with a choropleth layer and a documents layer

Before you start

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

    cd lab
    docker compose --profile kibana up -d
  • Open http://localhost:5601 and sign in as elastic with the password lab-elastic-password. When Kibana opens its full-screen welcome page, click Explore on my own.

  • Do the guide Create a dashboard and the first Lens panel, which creates the dashboard Bookshelf (guides) and shows the maps of the Lens editor and of a dashboard in edit mode.

  • Install the Sample web logs data, as the guide First steps in Kibana shows: Home → Try sample data → Install data on the card Sample web logs. This creates the data view Kibana Sample Data Logs, whose fields geo.src, geo.dest and geo.coordinates hold the country code of the source, the country code of the destination and the position of the request. The sample data covers about the last seven days, so the guide sets the time picker to Last 7 days.

  • Maps and the region map need no licence beyond the basic one; the lab runs a trial licence anyway. The Elastic Maps Service, which provides the country shapes, is reached over the internet, so the lab host needs internet access for the country boundaries.

  • The guide was checked on Elasticsearch and Kibana 9.5.6. The figures are drawings of the Kibana 9.5 user interface, not screenshots, so small details can differ from your screen. The Maps editor, the chart type list and the drop zones of the region map are drawn from the Elastic documentation, so look for a control by its name when it is not where a figure shows it. The maps in the figures draw the real country outlines (Natural Earth, at a scale of 1:110 million) in the colours of the Elastic Maps Service basemap; the shading and the points stand for the sample data, not for your exact counts. A highlighted box with a number marks the control of the step with the same number.

Steps

The guide works in the Lens editor, in the Maps editor and on a dashboard in edit mode. The screen maps of the Lens editor and of the dashboard are in the first dashboard guide; come back to them when a control is not where a figure shows it.

Open a Lens editor on the dashboard

  1. Open Dashboards in the primary navigation and click Bookshelf (guides).

  2. Click Edit in the second bar.

    Kibana dashboard Bookshelf (guides) in view mode with its bar chart panel; the Edit button of the second bar is marked by callout 2
  3. Click Add in the second bar. The Add to dashboard flyout opens.

  4. In the flyout, click Visualization ("Build charts, metrics, and tables with a point-and-click editor.").

    Dashboard in edit mode with the Add to dashboard flyout open: the Add button of the second bar is marked by callout 3 and the Visualization entry of the flyout by callout 4; the entry Maps is in the line under Other visualizations

Build a region map in Lens

  1. Lens opens. Open the Data view picker above the field list and choose Kibana Sample Data Logs.

  2. Open the time picker, which shows Last 15 minutes, and choose Last 7 days, so that the editor covers the period of the sample data.

    Lens editor with the data view picker open: the entry Kibana Sample Data Logs is marked by callout 5, and the time picker, which shows Last 15 minutes, is marked by callout 6
  3. Open the chart type list with the button of the layer card, which shows Bar, and choose Region map.

    Lens editor on the data view Kibana Sample Data Logs with the time picker at Last 7 days and the chart type list open under the Bar button; the entry Region map is marked by callout 7
  4. In Search field names, type geo. Drag the field geo.src onto the dashed button of the region dimension. If Lens asks which boundaries to use, choose the world countries and the country code that matches the values of the field.

  5. Drag the entry Records, above Available fields, onto the dashed Metric button. Lens shows it as Count of records and shades each country by its count.

    Lens editor with the chart type Region map and the field list narrowed to geo.src and geo.dest; geo.src is dragged onto the dashed region button (callout 8) and Records onto the dashed Metric button (callout 9)
  6. Click Save and return. The dashboard is back in edit mode with the region map as a new panel.

    Lens editor with a region map of the log records per country of geo.src, countries shaded by the count; the Save and return button of the second bar is marked by callout 10

Build a Maps panel with two layers

  1. Click Add and then, under Other visualizations, Maps. The Maps editor opens with a base map.

  2. Click Add layer in the Layers panel.

    The Maps editor of a new map panel with the Layers panel at the left and the map at the right; the Add layer button of the Layers panel is marked by callout 12
  3. In the list of layer types, choose Choropleth. A choropleth shades areas, here countries, by a value.

    The Maps editor with the Add layer flyout open and its list of layer types; the entry Choropleth is marked by callout 13
  4. Choose the boundaries: the world countries of the Elastic Maps Service, and the field of the shapes that holds the two-letter country code (ISO 3166-1 alpha-2).

  5. Choose the statistics source: the data view Kibana Sample Data Logs and the join field geo.src. Kibana counts the records for each value of geo.src and joins the count to the shape whose country code has the same value.

  6. Confirm the flyout with its primary button.

    Add layer flyout of the Choropleth layer: the boundaries World Countries and their join field ISO 3166-1 alpha-2 code are marked by callout 14, the statistics source Kibana Sample Data Logs with the join field geo.src by callout 15 and the confirm button by callout 16
  7. In the settings of the layer, open the Fill color and choose a colour ramp from light to dark, so that the darker a country is, the more requests came from it.

    The Maps editor with the Choropleth layer World Countries drawn on the map and the layer settings flyout open; the Fill color group, a colour ramp, is marked by callout 17
  8. Click Add layer again and choose Documents. A documents layer draws one point for each record.

    The Maps editor with the choropleth drawn and the Add layer flyout open; the entry Documents is marked by callout 18
  9. Choose the data view Kibana Sample Data Logs and the geospatial field geo.coordinates.

  10. In the tooltip fields, add clientip, response and bytes. When a reader clicks a point, the tooltip lists these values of the record.

  11. Confirm the flyout with its primary button.

    Add layer flyout of the Documents layer: the data view Kibana Sample Data Logs and the geospatial field geo.coordinates are marked by callout 19, the tooltip fields clientip, response and bytes by callout 20 and the confirm button by callout 21
  12. Both layers are on the map. Click Save and return.

    The Maps editor with the choropleth layer and the documents layer drawn on the map and listed in the Layers panel; the Save and return button of the second bar is marked by callout 22

Save the dashboard

  1. The dashboard shows the region map and the Maps panel in edit mode (the figure leaves out the bar chart of the first guide). Click Save in the second bar.

  2. Click Exit edit to return to view mode.

    Kibana dashboard in edit mode with the region map panel and the Maps panel; the Save button of the second bar is marked by callout 23 and the Exit edit button by callout 24

Check the result

Open Dashboards and then Bookshelf (guides) and set the time picker to Last 7 days, because the sample data is older than the Last 15 minutes that the dashboard opens with. The region map and the choropleth layer must shade the countries, and the documents layer must show points on the Maps panel. Click a point: its tooltip lists clientip, response and bytes.

The sample data is static, so the load generator has no effect on these panels.

Variations

  • On the Maps panel, add a heat map layer to see the density of the requests instead of single points.

  • Use geo.dest instead of geo.src as the join field to map where the requests were going to.

  • In the query box of the Maps editor, type response:404 to see only the missing pages; the filter applies to the layers that read from Elasticsearch.

  • For a real service, map the field that holds the client position, as the reference page shows; the Bookshelf logs of the lab have no such field.

What can go wrong

Symptom Cause Fix

The maps are empty

The time picker covers Last 15 minutes, and the sample data is older.

Set the time picker to Last 7 days.

The countries have no shading

The join does not match: the field of the shapes and geo.src hold different kinds of code.

Join the two-letter country code of the shapes to geo.src, which holds two-letter codes.

The country shapes do not load

The lab host cannot reach the Elastic Maps Service.

Check the internet access of the host, or use shapes that you uploaded.

The documents layer shows no points

The geospatial field is wrong, or the data view has no geo_point field.

Choose geo.coordinates, which is a geo_point field in the sample data.

The data view Kibana Sample Data Logs is not in the picker

The sample web logs are not installed.

Install them from Home → Try sample data, then reopen the editor.

Clean up

Keep the dashboard: the following guides extend it. To remove the sample data, open Home → Try sample data and click Remove on the card Sample web logs. To remove everything the lab stores, stop the profile with docker compose --profile kibana down -v, which also deletes the volumes and therefore the dashboard.

Where to go next