From 3dc5742a75c12c12791432b5e89c9f7cb52aa8eb Mon Sep 17 00:00:00 2001 From: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com> Date: Thu, 8 May 2025 09:17:03 -0700 Subject: [PATCH] Geomap: Add variable support for GeoJSON url (#104587) * Geomap: Add variable support for GeoJSON url * Add a check for variable dependency * Add tests for hasVariableDependencies function * Update docs * Update docs/sources/panels-visualizations/visualizations/geomap/index.md Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> --------- Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> --- .../visualizations/geomap/index.md | 2 +- .../app/plugins/panel/geomap/GeomapPanel.tsx | 23 +++- .../panel/geomap/layers/data/geojsonLayer.ts | 7 +- .../plugins/panel/geomap/utils/utils.test.ts | 101 ++++++++++++++++++ .../app/plugins/panel/geomap/utils/utils.ts | 10 ++ 5 files changed, 140 insertions(+), 3 deletions(-) create mode 100644 public/app/plugins/panel/geomap/utils/utils.test.ts diff --git a/docs/sources/panels-visualizations/visualizations/geomap/index.md b/docs/sources/panels-visualizations/visualizations/geomap/index.md index 64b20d33dd7..27352e77caa 100644 --- a/docs/sources/panels-visualizations/visualizations/geomap/index.md +++ b/docs/sources/panels-visualizations/visualizations/geomap/index.md @@ -313,7 +313,7 @@ The GeoJSON layer allows you to select and load a static GeoJSON file from the f | Option | Description | | ------ | ----------- | -| GeoJSON URL | Provides a choice of GeoJSON files that ship with Grafana. | +| GeoJSON URL | Provides a choice of GeoJSON files that are included with Grafana. You can also enter a URL manually, which supports variables. | | Default Style | Controls which styles to apply when no rules above match. | | Style Rules | Apply styles based on feature properties