# How to creating Map View in Kibana using Latitude and Longitude imported from Logstash?

**URL:** <https://discuss.elastic.co/t/how-to-creating-map-view-in-kibana-using-latitude-and-longitude-imported-from-logstash/178461>\
**Category:** Logstash\
**Created:** [April 25, 2019, 1:06pm UTC](https://discuss.elastic.co/t/how-to-creating-map-view-in-kibana-using-latitude-and-longitude-imported-from-logstash/178461 "2019-04-25T13:06:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ac3](https://avatars.discourse-cdn.com/v4/letter/a/3ab097/32.png) [@Ac3](https://discuss.elastic.co/u/Ac3)\
**Post date:** [April 25, 2019, 1:06pm UTC](https://discuss.elastic.co/t/how-to-creating-map-view-in-kibana-using-latitude-and-longitude-imported-from-logstash/178461/1 "2019-04-25T13:06:23Z")

</div>

Hi  
I am trying to create a map view in Kibana using Latitude and Longitude. I have been following posts online saying I need to have my Latitude and Longitude combined into 1 field. However, I am still unable to choose the 'Location' field as my coordinates, can anyone help me?

Logstash file:

```
csv {
    separator => ","
    columns => ["Disk Location","Hash","Date","Latitude","Longitude","Somethingelse","other"]

}
mutate {convert => ["Disk Location", "integer"]}
mutate {add_field => ["location", "%{Latitude},%{Longitude}"]}

```

}

Thanks

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [April 25, 2019, 3:21pm UTC](https://discuss.elastic.co/t/how-to-creating-map-view-in-kibana-using-latitude-and-longitude-imported-from-logstash/178461/2 "2019-04-25T15:21:11Z")

</div>

Hey @Ac3,

What you need is a `geo_point` field ([here are the docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html)).

Essentially, you want this:

```auto
PUT my_index/_doc/1
{
  "text": "Geo-point as an object",
  "location": { 
    "lat": 41.12,
    "lon": -71.34
  }
}

```

with `location` being a property in the index mapped as `geo_point`:

```auto
PUT my_index
{
  "mappings": {
    "properties": {
      "location": {
        "type": "geo_point"
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![Ac3](https://avatars.discourse-cdn.com/v4/letter/a/3ab097/32.png) [@Ac3](https://discuss.elastic.co/u/Ac3)\
**Post date:** [April 25, 2019, 3:59pm UTC](https://discuss.elastic.co/t/how-to-creating-map-view-in-kibana-using-latitude-and-longitude-imported-from-logstash/178461/3 "2019-04-25T15:59:14Z")

</div>

Hi @Larry_Gregory

Thanks for your reply, this is one of the things which has confused me.... I am importing a set of values from CSV and have Latitude Longitude set as a set of values. How do I tell Logstash these are the values I want to use?  
Is it like so ?

```
   else if [path] == "C:/ProgramData/FDA/output/processed/gpsbe.csv"{
    	csv {
            separator => ","
            columns => ["Disk Location","Hash","Date","Latitude","Longitude","Somethingelse","other"]

    }
	mutate {convert => ["Disk Location", "integer"]}
	mutate {add_field => ["location", "%{Latitude},%{Longitude}"]}

}

PUT map
{
  "text": "Geo-point as an object",
  "location": { 
    "lat": Latitude,
    "lon": Longitude
  }
}
```

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [April 25, 2019, 4:07pm UTC](https://discuss.elastic.co/t/how-to-creating-map-view-in-kibana-using-latitude-and-longitude-imported-from-logstash/178461/4 "2019-04-25T16:07:59Z")

</div>

You'll have better luck asking in the Logstash topic on that, but could you do something like this?

```auto
mutate {add_field => ["location.lat", "%{Latitude}"]}
mutate {add_field => ["location.lon", "%{Longitude}"]}

```

---

<div class="post-metadata">

**Author:** ![Ac3](https://avatars.discourse-cdn.com/v4/letter/a/3ab097/32.png) [@Ac3](https://discuss.elastic.co/u/Ac3)\
**Post date:** [April 25, 2019, 4:13pm UTC](https://discuss.elastic.co/t/how-to-creating-map-view-in-kibana-using-latitude-and-longitude-imported-from-logstash/178461/5 "2019-04-25T16:13:56Z")

</div>

Yeah, that's what I want to achieve, thanks for your help anyway 🙂

---

<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:** [May 23, 2019, 4:14pm UTC](https://discuss.elastic.co/t/how-to-creating-map-view-in-kibana-using-latitude-and-longitude-imported-from-logstash/178461/6 "2019-05-23T16:14:00Z")

</div>

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