# How to vizualize on a map the latest position of each unique identifier

**URL:** https://discuss.elastic.co/t/how-to-vizualize-on-a-map-the-latest-position-of-each-unique-identifier/116119
**Category:** Kibana
**Created:** [January 18, 2018, 6:54pm UTC](https://discuss.elastic.co/t/how-to-vizualize-on-a-map-the-latest-position-of-each-unique-identifier/116119 "2018-01-18T18:54:46Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![anon24174512](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@anon24174512](https://discuss.elastic.co/u/anon24174512)
#### Post date: [January 18, 2018, 6:54pm UTC](https://discuss.elastic.co/t/how-to-vizualize-on-a-map-the-latest-position-of-each-unique-identifier/116119/1 "2018-01-18T18:54:46Z")

</div>

Hello,

I am populating an index with documents containing a coordinate (lat,lon) and a unique identifier. I would like to refresh the Kibana Map with the latest position of each unique identifier and assign a color per identifier.

Is it possible ? How could I do that ?

Thanks

---

<div class="post-metadata">

### Author: ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)
#### Post date: [January 18, 2018, 8:58pm UTC](https://discuss.elastic.co/t/how-to-vizualize-on-a-map-the-latest-position-of-each-unique-identifier/116119/2 "2018-01-18T20:58:44Z")

</div>

Yes, should be possible using the Top Hits aggregation in combination with a Terms aggregation.

---

<div class="post-metadata">

### Author: ![anon24174512](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@anon24174512](https://discuss.elastic.co/u/anon24174512)
#### Post date: [January 19, 2018, 10:52am UTC](https://discuss.elastic.co/t/how-to-vizualize-on-a-map-the-latest-position-of-each-unique-identifier/116119/3 "2018-01-19T10:52:23Z")

</div>

Dear Lukas,

How could I do that ? In the map there is no Terms aggregation (I am using the coordinate map) and the Top Hits aggregation shows me only numeric fields.

My identifier is a string keyword. To be more clear, this id is a string identifying a unique device sending its coordinate.

Several documents can contain this id. So I would like given a date, to show on the map for each id its latest position.

---

<div class="post-metadata">

### Author: ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)
#### Post date: [January 19, 2018, 8:21pm UTC](https://discuss.elastic.co/t/how-to-vizualize-on-a-map-the-latest-position-of-each-unique-identifier/116119/4 "2018-01-19T20:21:23Z")

</div>

Ah, you're right. I don't think there's currently a way with Kibana to accomplish what you'd like to.

---

<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: [February 16, 2018, 8:21pm UTC](https://discuss.elastic.co/t/how-to-vizualize-on-a-map-the-latest-position-of-each-unique-identifier/116119/5 "2018-02-16T20:21:59Z")

</div>

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