How to display other info than geopoint on map vizualization?

I am beginning with both elastic search and kibana.
I would like, when clicking on a result displayed on the map vizualisation, that it would display other info about the node (if possible even a clickable link to image location).

Here is the script I run to create the DB

curl -XPUT http://localhost:9200/db_test -d '
{
    "mappings": {
        "img": {
            "properties": {
                "img": {"type": "string"},
                "tag": {"type": "string"},
                "location": {"type": "geo_point"}            }

        }
    }
}
'

here is script I run to insert the data

curl -XPOST 'http://localhost:9200/db_test/img/' -d '{"img": "/home/imgs/01.PNG", "tag": ["red"],"location": {"lat": "61", "lon": "-149"}}'
curl -XPOST 'http://localhost:9200/db_test/img/' -d '{"img": "/home/imgs/02.PNG", "tag": ["blue"],"location": {"lat": "33", "lon": "-86"}}'
curl -XPOST 'http://localhost:9200/db_test/img/' -d '{"img": "/home/imgs/03.PNG", "tag": ["pink"],"location": {"lat": "34", "lon": "-86"}}'
curl -XPOST 'http://localhost:9200/db_test/img/' -d '{"img": "/home/imgs/04.PNG", "tag": ["green"],"location": {"lat": "30", "lon": "-88"}}'
curl -XPOST 'http://localhost:9200/db_test/img/' -d '{"img": "/home/imgs/05.PNG", "tag": ["blue,pink"],"location": {"lat": "38", "lon": "-88"}}'

I can see the data on kibana

I can visualize correctly the 5 items on the map

But when I click on a result point, the popup displays only the geocoordinnates of the result

I would like that it would display also the tags and the image path. If possible even with a link to the image path. Is it achievable?

Thank in advance for the help

K.

The nature of everything in visualizations being based on aggregations pretty much prevents what you are trying to do. Don't think of the markers on the map as being "points" but rather "hot spots" where the documents are grouped together by a range of distance. There isn't a change in functionality if the hot spot consists of 1 document or multiple.

What you can do though is combine a tilemap visualization with a data table visualization on a dashboard, and create filters using selection in the tile map, and the selection documents for the data table visualization will also be updated. You can add a field formatter to the img field to have it render images inside the data table.

3 Likes

Awesome!! thank you @tsullivan

I didn't succeed to display fields contents via the table vizualization

So instead I used the discover area, displayed there my fields

then I saved the search and called it together with the map in the dashboard

It works great (thanks again :slight_smile: ) - both for geoloc results restriction, and with queries.

My only issue now is that I can not find how to use any field formatter to display image (or link to images)
What shall I change/add ? from where?

(I managed to do it if the image is on the web, by configuring in setting the field with url type image as explained here
https://www.elastic.co/blog/kibana-4-1-field-formatters
but it does not succeed to display if it is a path to an image on the disk)

If you could help a little more ... :slight_smile:
K.

You might have some luck trying different variations from this page: File URI scheme - Wikipedia . If it's not working, check your browser console for error logs to see if the browser security policy is not allowing the remote site to access local content.

If nothing else is working out, your best option may be to run a lightweight webserver locally (nginx would probably be a good choice), on port 8080 for example, to serve static content from your /home/imgs directory. Then you can access the image using: http://localhost:8080/imgs/xy.png

1 Like

ok I ll try
thanks a lot again :slight_smile:

Just for update - I installed and configured Apache to serve the images and used their localhost urls in the field
Here is the insertion command line:
curl -XPOST 'http://localhost:9200/db_test/img/' -d '{"img": "http://localhost/my_images/01.jpg", "tag": ["turquoise"],"location": {"lat": "61", "lon": "-149"}}'

And I used the kibana field formatter for string as url for image

and it worked just as fine as you recommended :slight_smile:
Thank you again very much @tsullivan
K.

Nice :slight_smile: