How to display offline map tiles in Geomap panel?

Environment

  • Grafana version: 12.2.1

  • Installation type: Windows (installed version)

  • Network: Offline/Air-gapped environment

What I’m trying to achieve

I want to display map tiles in Geomap panel using locally stored map data in an offline environment, and plot data points based on latitude/longitude coordinates from my database.

What I’ve tried

  1. Downloaded and stored map tiles locally:

    • Downloaded GSI (Geospatial Information Authority of Japan) tiles

    • Placed them in: C:\Program Files\GrafanaLabs\grafana\public\maps\tiles

    • Directory structure: 8\214\91.png (tiles are stored under zoom level directories)

  2. Set up IIS web server:

    • Configured IIS to serve the tiles directory

    • Confirmed tiles are accessible via: http://localhost/GrafanaMaps

    • Verified individual tile loads correctly: http://localhost/GrafanaMaps/8/214/91.png

  3. Configured Geomap panel:

    • Layer type: XYZ Tile layer

    • URL template: http://localhost/GrafanaMaps/{z}/{x}/{y}.png

Problem

The map panel remains dark/blank and doesn’t display any tiles. When I connect to the internet, the default world map displays correctly.

Questions

  1. Is my URL template format correct for offline tiles?

  2. Are there any additional configurations needed in Grafana for offline map tiles?

  3. Are there any CORS or security settings I need to configure in IIS or Grafana?

  4. Has anyone successfully set up offline map tiles in Grafana 12.2.1?

Any guidance would be greatly appreciated!

what does your network tab or console tab show in your browser?

Sorry for the late reply.
When I checked the developer console, it showed “404 not found.”
It appears there was an error in the URL template specification.
http://localhost/public/maps/tiles/{z}/{x}/{y}.png
Also, upon checking the developer console, it seems that one of the causes was that the corresponding images did not exist.

This issue has been resolved!
Thank you for reaching out to me.

1 Like