# Hosted geojson file on github but kibana is not loading it

**URL:** https://discuss.elastic.co/t/hosted-geojson-file-on-github-but-kibana-is-not-loading-it/117491
**Category:** Kibana
**Created:** [January 29, 2018, 3:56pm UTC](https://discuss.elastic.co/t/hosted-geojson-file-on-github-but-kibana-is-not-loading-it/117491 "2018-01-29T15:56:54Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![ashishmadeti](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@ashishmadeti](https://discuss.elastic.co/u/ashishmadeti)
#### Post date: [January 29, 2018, 3:56pm UTC](https://discuss.elastic.co/t/hosted-geojson-file-on-github-but-kibana-is-not-loading-it/117491/1 "2018-01-29T15:56:54Z")

</div>

Kibana fails with the following error:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/a/aa4f12e79c20e5cb5d4b47d07dbc3ef408064f1a.png)

The geojson data is hosted at: [https://raw.githubusercontent.com/ashishmadeti/india/master/state/india\_telengana.geojson](https://raw.githubusercontent.com/ashishmadeti/india/master/state/india_telengana.geojson)

I am using the field "NAME\_1" and my kibana config looks like this:

```auto
regionmap:
  layers:
    - name: "All the states of India"
      url: "https://raw.githubusercontent.com/ashishmadeti/india/master/state/india_telengana.geojson"
      attribution: "geohacker"
      fields:
        - name: "NAME_1"
          description: "Name of state"

```

When I choose the Vector map **World Countries** with join field **Two letter abbreviation** , it is working fine.

Please tell me where I am going wrong.

---

<div class="post-metadata">

### Author: ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)
#### Post date: [January 29, 2018, 5:25pm UTC](https://discuss.elastic.co/t/hosted-geojson-file-on-github-but-kibana-is-not-loading-it/117491/2 "2018-01-29T17:25:08Z")

</div>

Hi,

I am not sure whats happening. I am going to ask our maps team here. @thomasneirynck?

Thank you,  
Bhavya

---

<div class="post-metadata">

### Author: ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)
#### Post date: [January 29, 2018, 5:40pm UTC](https://discuss.elastic.co/t/hosted-geojson-file-on-github-but-kibana-is-not-loading-it/117491/3 "2018-01-29T17:40:54Z")

</div>

hi @ashishmadeti,

when serving a file, make sure it is CORS-enabled:

I don't think github allows this. The solution is to download the file and serve it up yourself.

This blog post has some pointers: [https://www.elastic.co/blog/custom-region-maps-in-kibana-6-0](https://www.elastic.co/blog/custom-region-maps-in-kibana-6-0)

thx,

---

<div class="post-metadata">

### Author: ![ashishmadeti](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@ashishmadeti](https://discuss.elastic.co/u/ashishmadeti)
#### Post date: [January 30, 2018, 5:41am UTC](https://discuss.elastic.co/t/hosted-geojson-file-on-github-but-kibana-is-not-loading-it/117491/4 "2018-01-30T05:41:14Z")

</div>

I don't think CORS is the issue here. I tested the link on [www.test-cors.org](http://www.test-cors.org) ([link to test](https://www.test-cors.org/#?client_method=GET&client_credentials=false&server_url=https%3A%2F%2Fraw.githubusercontent.com%2Fashishmadeti%2Findia%2Fmaster%2Fstate%2Findia_telengana.geojson&server_enable=true&server_status=200&server_credentials=false&server_tabs=remote)) and it is working fine.

Please let me know if I am wrong.

---

<div class="post-metadata">

### Author: ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)
#### Post date: [January 30, 2018, 2:35pm UTC](https://discuss.elastic.co/t/hosted-geojson-file-on-github-but-kibana-is-not-loading-it/117491/5 "2018-01-30T14:35:13Z")

</div>

Can you inspect the 400 error and see what the error response is effectively? Options requests precede other AJAX-calls when issuing CORS-requests, and it seems the handshake is failing.

---

<div class="post-metadata">

### Author: ![ashishmadeti](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@ashishmadeti](https://discuss.elastic.co/u/ashishmadeti)
#### Post date: [January 30, 2018, 4:07pm UTC](https://discuss.elastic.co/t/hosted-geojson-file-on-github-but-kibana-is-not-loading-it/117491/6 "2018-01-30T16:07:19Z")

</div>

The problem does seem to be with [github.com](http://github.com)  
Although it does accept CORS GET requests, it responds to OPTIONS with `400: Invalid Request`

I fixed the problem by hosting it on AWS S3 with CORS enabled.

Thanks for your help @thomasneirynck and @bhavyarm

---

<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 27, 2018, 4:07pm UTC](https://discuss.elastic.co/t/hosted-geojson-file-on-github-but-kibana-is-not-loading-it/117491/7 "2018-02-27T16:07:31Z")

</div>

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