# Kibana Map doesn't visualize any data

**URL:** <https://discuss.elastic.co/t/kibana-map-doesnt-visualize-any-data/209150>\
**Category:** Kibana\
**Created:** [November 23, 2019, 1:45pm UTC](https://discuss.elastic.co/t/kibana-map-doesnt-visualize-any-data/209150 "2019-11-23T13:45:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElasticMaa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticmaa/32/58210_2.png) [@ElasticMaa](https://discuss.elastic.co/u/ElasticMaa)\
**Post date:** [November 23, 2019, 1:45pm UTC](https://discuss.elastic.co/t/kibana-map-doesnt-visualize-any-data/209150/1 "2019-11-23T13:45:23Z")

</div>

Hi to all,  
I'm finding an issue with Kibana v. 7.4.2 cloud version. This is the mapping of my address field location (using php):

```
....
'location' => [
    'type' => 'geo_point'
], 
....

```

I checked that the mapping has been correctly applied.  
First of all, I create Map visualization as shown in figure hereunder.

 ![Kibana2](https://us1.discourse-cdn.com/elastic/original/3X/0/2/025880f336cf8ee4b2deb6477e42602cc1f46190.jpeg)

The data that I have in my index is:

 ![Kibana3](https://us1.discourse-cdn.com/elastic/original/3X/4/0/40c2bc0adb8aca67739ef5f524474f79cbb3bd79.png)

Despite this, any data is visualized. Where I'm doing wrong?  
Thanks a lot to all in advance.

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [November 23, 2019, 2:05pm UTC](https://discuss.elastic.co/t/kibana-map-doesnt-visualize-any-data/209150/2 "2019-11-23T14:05:50Z")

</div>

Have you tried using new [Maps application](https://www.elastic.co/guide/en/kibana/current/maps.html)?

To debug your problem, click `Inspect` to view the request/response from Elasticsearch. are any results coming back? Do you have any data in the selected time range?

---

<div class="post-metadata">

**Author:** ![ElasticMaa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticmaa/32/58210_2.png) [@ElasticMaa](https://discuss.elastic.co/u/ElasticMaa)\
**Post date:** [November 23, 2019, 10:00pm UTC](https://discuss.elastic.co/t/kibana-map-doesnt-visualize-any-data/209150/3 "2019-11-23T22:00:07Z")

</div>

Hi Nathan,  
thanks a lot for your quick response. In my "inspect" I have this request:

```
{
    "aggs": {
        "filter_agg": {
            "filter": {
                "geo_bounding_box": {
                    "ignore_unmapped": true,
                        "addresses.location": {
                            "top_left": {
                                "lat": 90,
                                "lon": -180
                            },
                            "bottom_right": {
                                "lat": -90,
                                "lon": 180
                            }
                        }
                    }
                },
                "aggs": {
                    "2": {
                        "geohash_grid": {
                            "field": "addresses.location",
                            "precision": 2
                        },
                        "aggs": {
                            "3": {
                                "geo_centroid": {
                                    "field": "addresses.location"
                                }
                            }
                        }
                    }
                }
            }
        },
        "size": 0,
        "_source": {
            "excludes": []
        },
        "stored_fields": [
            "*"
        ],
        "script_fields": {},
        "docvalue_fields": [
            {
                "field": "created_at",
                "format": "date_time"
            },
            {
                "field": "scraped_at",
                "format": "date_time"
            },
            {
                "field": "updated_at",
                "format": "date_time"
            }
        ],
        "query": {
            "bool": {
                "must": [],
                    "filter": [
                        {
                            "match_all": {}
                        },
                        {
                            "range": {
                            "scraped_at": {
                                "format": "strict_date_optional_time",
                                "gte": "2019-11-22T23:00:00.000Z",
                                "lte": "2019-11-23T22:59:59.999Z"
                            }
                        }
                    }
                ],
                "should": [],
                "must_not": []
            }
        }
    }

```

and the response is

```
{
    "took": 1,
    "timed_out": false,
    "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": 2,
        "max_score": null,
        "hits": []
    },
    "aggregations": {
        "filter_agg": {
            "2": {
                "buckets": []
            },
            "doc_count": 0
        }
    },
    "status": 200
  }

```

It makes me suppose that the error could be in the way I save data, but I simply save lat and lon in location, exactly like I show in the previous message. How could I investigate deeply?

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [November 24, 2019, 1:19am UTC](https://discuss.elastic.co/t/kibana-map-doesnt-visualize-any-data/209150/4 "2019-11-24T01:19:45Z")

</div>

Go to Dev tools -\> console and run a simple match all query to see what your documents look like. Something like

```auto
GET your_index_name/_search
{
  "query": {
    "match_all": {}
  }
}

```

---

<div class="post-metadata">

**Author:** ![ElasticMaa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticmaa/32/58210_2.png) [@ElasticMaa](https://discuss.elastic.co/u/ElasticMaa)\
**Post date:** [November 24, 2019, 9:22am UTC](https://discuss.elastic.co/t/kibana-map-doesnt-visualize-any-data/209150/5 "2019-11-24T09:22:24Z")

</div>

I did it, and actually I obtained the list of all my documents. I report hereunder the part of response that is relative to the address field:

```
"addresses" : [
    {
        "rawaddress" : "Lungomare Fata Morgana, 91026 Mazara del Vallo, Sicilia Italia",
        "label" : "Location",
        "description" : "Location of the restaurant",
        "formatted" : "Lungomare Fata Morgana, 91026 Mazara del Vallo TP, Italy",
        "place_id" : "ChIJwytKbW3HGxMRfoKgYdtikX4",
        "location" : {
            "lat" : 37.66216299999999,
            "lon" : 12.562813
        },
        "viewport" : {
            "northeast" : {
                "lat" : 37.6635319802915,
                "lon" : 12.5641688802915
            },
            "southwest" : {
                "lat" : 37.6608340197085,
                "lon" : 12.5614709197085
            }
        },
        "route" : "Lungomare Fata Morgana",
        "locality" : "Mazara del Vallo",
        "administrative_area_level_2" : {
            "long" : "Provincia di Trapani",
            "short" : "TP"
        },
        "administrative_area_level_1" : {
            "long" : "Sicilia",
            "short" : "Sicilia"
        },
        "country" : {
            "long" : "Italy",
            "short" : "IT"
        },
        "postal_code" : "91026",
        "is_formatted" : true
    }
],

```

I got my mistake, the addresses field is a nested field, and the request of the map correctly returns an empty bucket. How can I change my request in kibana?  
I suppose my correct request should be something like this:

```
{
  "size": 0,
  "aggs" : {
    "locations": {
      "nested": {
        "path": "addresses"
      },
      "aggs": {
        "kind_of_address": {
          "filter": {
            "term": {
              "addresses.label": "Location"
            }
          },
          "aggs": {
            "2": {
              "geohash_grid": {
                "field": "addresses.location",
                "precision": 2
              },
              "aggs": {
                "3": {
                  "geo_centroid": {
                    "field": "addresses.location"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [November 24, 2019, 2:20pm UTC](https://discuss.elastic.co/t/kibana-map-doesnt-visualize-any-data/209150/6 "2019-11-24T14:20:08Z")

</div>

That could be it. Kibana does not support nested fields

---

<div class="post-metadata">

**Author:** ![ElasticMaa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticmaa/32/58210_2.png) [@ElasticMaa](https://discuss.elastic.co/u/ElasticMaa)\
**Post date:** [November 24, 2019, 3:33pm UTC](https://discuss.elastic.co/t/kibana-map-doesnt-visualize-any-data/209150/7 "2019-11-24T15:33:02Z")

</div>

Oh I see ☹ Can I make Kibana show on the map the response of my custom query?

---

<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 22, 2019, 3:33pm UTC](https://discuss.elastic.co/t/kibana-map-doesnt-visualize-any-data/209150/8 "2019-12-22T15:33:12Z")

</div>

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