# How to make Kibana show the last location of a device in Tilemap?

**URL:** https://discuss.elastic.co/t/how-to-make-kibana-show-the-last-location-of-a-device-in-tilemap/92027
**Category:** Kibana
**Created:** [July 6, 2017, 7:08am UTC](https://discuss.elastic.co/t/how-to-make-kibana-show-the-last-location-of-a-device-in-tilemap/92027 "2017-07-06T07:08:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mikelD](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@mikelD](https://discuss.elastic.co/u/mikelD)
#### Post date: [July 6, 2017, 7:08am UTC](https://discuss.elastic.co/t/how-to-make-kibana-show-the-last-location-of-a-device-in-tilemap/92027/1 "2017-07-06T07:08:52Z")

</div>

Hi,  
I'm trying to use the kibana Tilemap to show only the latest location received from a device. I'm not exactly sure how or if it can be done, so i ask if any has done something similar.

I have a search query that returns the latest documents send by the devices (the last document for each device), but i am unable to apply it as a filter to my Tilemap.

```
 GET /_search/
 {
 "size":0,
 "query": {
   "term": {
      "port":2
  }
 },
 "aggs": {
   "group": {
             "terms": {
                 "field": "dev_id.keyword"
             },
     "aggs":{
       "group_logs": {
        "top_hits": {
           "size": 1,
           "sort": [
               {
                 "_timestamp": {
                   "order": "desc"
                }
          }
         ]
      }
     }
     }
  }
 }
 }

```

I want to know if it can be converted to a saved Search that can be applied to the visualization? or if there is any other way to show only the latest position on the tilemap?

---

<div class="post-metadata">

### Author: ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)
#### Post date: [July 7, 2017, 5:45pm UTC](https://discuss.elastic.co/t/how-to-make-kibana-show-the-last-location-of-a-device-in-tilemap/92027/2 "2017-07-07T17:45:31Z")

</div>

hi @mikelD,

that's tough. The tilemap only can show geohash\_grid aggregations.

But this would be a good enhancement, so I would add an enhancement request to Kibana. [https://github.com/elastic/kibana/issues/new](https://github.com/elastic/kibana/issues/new)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 4, 2017, 5:45pm UTC](https://discuss.elastic.co/t/how-to-make-kibana-show-the-last-location-of-a-device-in-tilemap/92027/3 "2017-08-04T17:45:33Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
