# Last location on map

**URL:** https://discuss.elastic.co/t/last-location-on-map/108935
**Category:** Kibana
**Created:** [November 23, 2017, 7:23pm UTC](https://discuss.elastic.co/t/last-location-on-map/108935 "2017-11-23T19:23:41Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![wkpv68](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@wkpv68](https://discuss.elastic.co/u/wkpv68)
#### Post date: [November 23, 2017, 7:23pm UTC](https://discuss.elastic.co/t/last-location-on-map/108935/1 "2017-11-23T19:23:42Z")

</div>

Hi,

I received every X sec the gps coordinates.  
I'm trying yo create a coordinate map that show only the last location.

I tried several options but the map always show also the old points.

Is there a option to show only the last location?

Thanks

---

<div class="post-metadata">

### Author: ![ppisljar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppisljar/32/11588_2.png) [@ppisljar](https://discuss.elastic.co/u/ppisljar)
#### Post date: [November 24, 2017, 7:29am UTC](https://discuss.elastic.co/t/last-location-on-map/108935/2 "2017-11-24T07:29:51Z")

</div>

I don't think this is possible at the moment.

tile map requires you to use geohash aggregation, which means it will split data into buckets, once bucket per region on map. so even if you do top hits on top of that, you will only get latest point for each geohash region.

could you open an enhancement request on [https://github.com/elastic/kibana](https://github.com/elastic/kibana) and describe your use case as good as you can ?

thank you

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [November 24, 2017, 8:08am UTC](https://discuss.elastic.co/t/last-location-on-map/108935/3 "2017-11-24T08:08:01Z")

</div>

A simple and scalable approach to this is to index into 2 indices. The first index is the one you have today, where each document represents one reading. The second index is not time-based and has a single document per entity (an [entity-centric index](https://www.elastic.co/elasticon/2015/sf/building-entity-centric-indexes)) you are tracking. Here you update the record with the latest known position. When you want to plot last known position, you can use this index instead.

---

<div class="post-metadata">

### Author: ![wkpv68](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@wkpv68](https://discuss.elastic.co/u/wkpv68)
#### Post date: [November 25, 2017, 3:59am UTC](https://discuss.elastic.co/t/last-location-on-map/108935/4 "2017-11-25T03:59:35Z")

</div>

Thanks, I'll try Entity-Centric Indexes and let you know the result

---

<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: [December 23, 2017, 3:59am UTC](https://discuss.elastic.co/t/last-location-on-map/108935/5 "2017-12-23T03:59:40Z")

</div>

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