mm001
August 12, 2021, 1:08am
1
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")
mm001
August 12, 2021, 3:07am
2
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.
z3ky
January 12, 2022, 8:21pm
4
1 Like