Geomap with influxdb2.0

Hi, I would like to use geomap with influxdb2.0.

How do I set latitude and longitude for Line Protocol?
I tried below 2 items, but geomap did not show A.
test,tag=test1,latitude=55,longitude=0 A=10
test,tag=test1 A=10,latitude=55,longitude=0

And, How do I write query on Grafana?

from(bucket: "my_bucket")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "test")
  |> filter(fn: (r) => r["tag"] == "test1")
  |> filter(fn: (r) => r["_field"] == "A" or r["_field"] == "latitude" or r["_field"] == "longitude")
  |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)
  |> yield(name: "last")

Hi,
I guess grafana has any problem.

I wrote below line protocol to influxDB.
Then, Grafana shows latitude and longitude fileds.

test,tag=test1 A=10,latitude=55,longitude=0

And, I set the location on the data layer to coords.
However, latitude and longitude must set same field value.
for example,

latitude on data layer= latitude{tag=“A”,latitude=“55”,longitude=“0”}
longitude on data layer= latitude{tag=“A”,latitude=“55”,longitude=“0”}

Or

latitude on data layer= longitude{tag=“A”,latitude=“55”,longitude=“0”}
longitude on data layer= longitude{tag=“A”,latitude=“55”,longitude=“0”}

This behavior is abnormal.
Please check and fix it.

This solves the issue
https://community.grafana.com/t/cant-visualize-my-data-with-the-geomap-plugin/58791/2?u=z3ky

Use the merge transformation.

1 Like