How to Use the [alpha] dynamic geojson layer in geomap panel?

Hi Team,
We are working on showing kpi per region across the nation and we thought this geomap might help us!
So we have a static geojson file with customized regions, each region has an “id” in geojson, this “id” can be linked to our kpi data in mysql db.
And our goal is:

  • filter region with template variable (so only selected region from geojson is shown/popup)
  • show regions in different colors based on kpi value from db datasource.

So far we have load our geojson in “dynamic geojson” layer as /public/gazetteer/test.geojson as blow:

The shapes can be shown in geomap panel (bravo!)
However i am confused about the dynamic part (very limited documentation about this alpha layer, other than “providing dynamic styling on geojson”), it asks for a data filter:

Which i guess should be a query of the geojson in “GeoJson URL”, but how can we query that? Can geojson in /public/ be added as a data source somehow? Is there any example on this?
Or “dynamic geojson” actually means we can generate geojson dynamically? rather than load the file into /public?

Thank you for any insights in this! And thanks for createing this wonderful geomap panel as well.

Check this thread out

Hi Yosiasz,
Thank you! We actually have come across this thread before we post.
The solution in this thread seems to involve loading geojson in postgres, read the geosjon, process and query and reassemble then load back to grafana as we web service endpoint.
We are looking for a more native approach, so we are wondering how this grafana native “dynamic geojson” layer works. Does it allow to dynamically generate geojson based on grafana query results or does it to query a static geojson file.

1 Like

Reads local file. Where did you read this dynamic feature?

But you already are reading kpi stuff from my sql so what’s the problem with loading your data in a db?