Geomaping json or kml data from OpenSearch indices into grafana map

Hello Grafanatics, :slightly_smiling_face:

I am trying to map a route on Geomap from an json/kml field in OpensSearch index formatted as follows:

{
	"type": "linestring",
	"coordinates": [
		[
			11.5329599753,
			48.2488099951
		],
		[
			11.5328399464,
			48.2500499301
		],
		[
			11.5340899397,
			48.2577899471
		]
	]
}

The OpensSearch datasource is set in the Grafana and working, I can get all the fields in table format using Raw Data, Query (Lucene) → _index: index-name*

But I don’t know how to get the data to cover the Geomap element and to draw lines on the map from the coordinates data shown above. When I try with the same query on the Geomap only the base layer of the world map is displayed but there is nothing displayed from the coordinates which I want to plot on it.

Please advise what I am missing to complete the desired setup.

Regards,

geomap needs longitude, latitude, you need to extract those values from that data you posted.

Hello Yosiasz,

Thanks for the fast response! Is it possible to set up this extraction to happen automatically in Grafana because this information is in a dynamically collected OpenSearch index which has a long list of coordinates that covers roads on the map? I am not sure if the Geomap route or marker functionality or other isn’t more appropriate in this case?

The question was more likely could we somehow use exactly the provided data format directly from the OpenSearch data source and how to create this visualization (Dasbord setup, query the data, etc.)

Could you also share the steps that you did to create the dashboard and display coordinates? What data source type and queries/transformation did you use and in which Grafana version, on my site I will probably have to stick with v9.4.7 Do you know for limitations in this version related to the task?

Kind Regards,

but does this change dynamically also?

"type": "linestring",
	"coordinates": [