Hosted geojson file on github but kibana is not loading it

Kibana fails with the following error:

The geojson data is hosted at: 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:

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.

Hi,

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

Thank you,
Bhavya

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

thx,

I don't think CORS is the issue here. I tested the link on www.test-cors.org (link to test) and it is working fine.

Please let me know if I am wrong.

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.

The problem does seem to be with 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

1 Like

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