Show Labels on GeoJSON Layer

  • What Grafana version and what operating system are you using?
    We are using Grafana 10.4.1 on a Linux host.

  • What are you trying to achieve?
    I am trying to displpay a GeoJSON file as a background of sorts for the data in our Geomap panel with labels to indicate each Map Area number. These Map Area numbers serve as a quick reference to get you to the correct part of our territory.

  • How are you trying to achieve it?
    I have a GeoJSON layer that I have dumped out of our GIS which contains polygons for each Map Area in our service territory. I have imported this layer into my Geomap panel and have it sitting underneath my main data layer (which comes from an Influx query and a SQL query) to serve as a reference for our folks when they’re looking at the data in this panel. I can see the boundaries of each Map Area, but I can’t figure out how to turn on any text labels to actually display the area number on the map as a label for each polygon.

  • What happened?
    I get the following map, with the tooltip showing for one Map Area polygon:
    2024-03-26 12_17_31-Windownolabel
    Note how the tooltip shows that the data file contains an Area_No field. The contents of this field are what I would like to have displayed as a label on the map.

  • What did you expect to happen?
    I was expecting to be able to generate something like this (which I just used a graphic editor to edit in some “labels” showing what I’m after):
    2024-03-26 12_27_41-Windowlabelled

If I’m missing something obvious or less than obvious here, I’d sure appreciate the help trying to get this layer set up correctly.

Might be pushing the geomap plugin’s boundaries

Try the orchestra cities plugin or dynamic text plugin with leaflet

But see this one also (are the labels coming from the geojson or the query?)

Okay, thanks. I wondered if I was asking too much of it or if I was just overlooking something simple. I will have to look into these other solutions. Thank you for your help!

1 Like