# Problem with map visual

**URL:** <https://discuss.elastic.co/t/problem-with-map-visual/368849>\
**Category:** Kibana\
**Tags:** maps\
**Created:** [October 15, 2024, 12:21pm UTC](https://discuss.elastic.co/t/problem-with-map-visual/368849 "2024-10-15T12:21:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![HermannSamimi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hermannsamimi/32/137155_2.png) [@HermannSamimi](https://discuss.elastic.co/u/HermannSamimi)\
**Post date:** [October 15, 2024, 12:21pm UTC](https://discuss.elastic.co/t/problem-with-map-visual/368849/1 "2024-10-15T12:21:58Z")

</div>

Hello,

I have a problem with map visual while i create some points in the map in Kibana, After a refreshment, The map went failed to show the points.[Error message: Unable to create layer]

 ![Screenshot 2024-10-15 at 15.38.47](https://us1.discourse-cdn.com/elastic/original/3X/f/7/f7b1d08e664323904e9f1241362335a0218f8e56.jpeg)

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [October 15, 2024, 1:12pm UTC](https://discuss.elastic.co/t/problem-with-map-visual/368849/2 "2024-10-15T13:12:23Z")

</div>

Hi @HermannSamimi

- Which excat version of the Stack are you using?
- Does your user have permissions to create indices and ingest documents into it?
- Can you share the exact steps to reproduce the issue?
- Do you get any other errors in your browser or the browser console?

---

<div class="post-metadata">

**Author:** ![HermannSamimi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hermannsamimi/32/137155_2.png) [@HermannSamimi](https://discuss.elastic.co/u/HermannSamimi)\
**Post date:** [October 16, 2024, 8:31am UTC](https://discuss.elastic.co/t/problem-with-map-visual/368849/3 "2024-10-16T08:31:30Z")

</div>

- The latest version
- I have tried by super admin permission level.
- Dashboard \> maps \> add layer \> documents \> select data view \> select Geospatial field \> filtering data
- here is the exact error  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/7/b7c78a96fcab3431aed7cfb2a7937e3b48b2082a.jpeg)

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [October 16, 2024, 10:34am UTC](https://discuss.elastic.co/t/problem-with-map-visual/368849/4 "2024-10-16T10:34:58Z")

</div>

I'm afraid I could not reproduce I did the following steps:

- Started an instance of the stack (8.15.2)
- Created a new dashboard
- Added a new map
- Add layer of `Create Index` type with the name `discuss_368849_test_1`
- Added a few points to this new index
- Exit layer editing
- Exit map
- Save dashboard
- Open again this new dashboard from the list
- Edit the existing map
- Add layer `Documents` selecting the `discuss_368849_test_1` data view (if the data view does not show up on the list you may need to refresh the browser)

I end up with a dashboard containing a map with two equal layers.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/7/37431b91e0abc43c92666c9e9186c57ca2fa85b8.jpeg)

---

<div class="post-metadata">

**Author:** ![HermannSamimi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hermannsamimi/32/137155_2.png) [@HermannSamimi](https://discuss.elastic.co/u/HermannSamimi)\
**Post date:** [October 16, 2024, 11:27am UTC](https://discuss.elastic.co/t/problem-with-map-visual/368849/5 "2024-10-16T11:27:12Z")

</div>

Thanks, but first i'm not gonna read data from an index, while i'm using a particular data stream.  
and second everything looks ok unless i refresh the page after save the dashboard.  
when i refresh the the page, everything on the map got failed!

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [October 17, 2024, 1:23pm UTC](https://discuss.elastic.co/t/problem-with-map-visual/368849/6 "2024-10-17T13:23:32Z")

</div>

Could you please provide some steps to reproduce the issue and the datastream definition? Otherwise it is hard to understand what may be wrong.

I did the following to create a minimal data stream and tried to add it and refresh the map and nothing went wrong so feel free to adapt my code to something that yields the errors you are facing

```auto
# Create an ILM Policy
PUT _ilm/policy/discuss_368849
{
  "policy": {
    "phases": {
      "delete": {
        "min_age": "735d",
        "actions": {
          "delete": {}
        }
      }
    }
  }
}

# Creates a component template
PUT _component_template/discuss_368849
{
  "template": {
    "settings": {
      "index.lifecycle.name": "discuss_368849"
    },
    "mappings": {
      "properties": {
        "@timestamp": {
          "type": "date",
          "format": "date_optional_time||epoch_millis"
        },
        "message": {
          "type": "wildcard"
        },
        "location": {
          "type": "geo_point"
        }
      }
    }
  }
}

# Create an index template
PUT _index_template/discuss_368849
{
  "index_patterns": ["discuss_368849*"],
  "data_stream": { },
  "composed_of": ["discuss_368849"],
  "priority": 500
}

# Add some data
PUT discuss_368849/_bulk
{ "create":{ } }
{ "@timestamp": "2024-08-17T15:13:14+0200", "message": "NYC", "location": [-74, 41] }
{ "create":{ } }
{ "@timestamp": "2024-09-17T15:13:14+0200", "message": "Rio", "location": [-43, -21] }
{ "create":{ } }
{ "@timestamp": "2024-10-17T15:13:14+0200", "message": "Cairo", "location": [31, 31] }

# Check the data_stream got the data inserted
GET discuss_368849/_search

# Create the data view
POST kbn:/api/data_views/data_view
{
  "data_view": {
    "title": "discuss_368849",
    "timeFieldName": "@timestamp"
  }
}

```
