# Region Maps - configuration of vector map with self-hosted layers

**URL:** <https://discuss.elastic.co/t/region-maps-configuration-of-vector-map-with-self-hosted-layers/94937>\
**Category:** Kibana\
**Created:** [July 28, 2017, 10:48am UTC](https://discuss.elastic.co/t/region-maps-configuration-of-vector-map-with-self-hosted-layers/94937 "2017-07-28T10:48:27Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fguti](https://avatars.discourse-cdn.com/v4/letter/f/e274bd/32.png) [@Fguti](https://discuss.elastic.co/u/Fguti)\
**Post date:** [July 28, 2017, 10:48am UTC](https://discuss.elastic.co/t/region-maps-configuration-of-vector-map-with-self-hosted-layers/94937/1 "2017-07-28T10:48:27Z")

</div>

Hi all,

I am using Kibana 5.5 with Region Maps. I need to set up a vector map based on a hosted service (self-hosted layers as polygon) in GeoServer.

I get the GeoJSON URL from Geoserver: [http://localhost:8080/geoserver/mytest/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=mytest:Limits\_EU\_Countries&maxFeatures=50&outputFormat=application%2Fjson](http://localhost:8080/geoserver/mytest/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=mytest:Limits_EU_Countries&maxFeatures=50&outputFormat=application%2Fjson)

Then I define in the Kibana config file content:

regionmap:  
layers:  
- name: "Limits\_EU\_Countries"  
url: "[http://localhost:8080/geoserver/mytest/wfs/Limits\_EU\_Countries.geojson](http://localhost:8080/geoserver/mytest/wfs/Limits_EU_Countries.geojson)"  
fields:  
- name: "ADMIN"  
description: "Full country name"  
- name: "SU\_A3"  
description: "Country 3-letters identifier"

But is not working in Kibana as vector map. Please anyone can check what is the problem or the correct way to include the information of the WFS in the config/kibana.yml file.

Thanks.

Best,

Francisco Gutierres

---

<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:** [July 28, 2017, 3:46pm UTC](https://discuss.elastic.co/t/region-maps-configuration-of-vector-map-with-self-hosted-layers/94937/2 "2017-07-28T15:46:28Z")

</div>

hi @Fguti,

the attribution-value is just an example. You can use it to display provenance of the data.

Is your server CORS enabled? It needs to accept requests from the browser running the Kibana application.

---

<div class="post-metadata">

**Author:** ![ICG](https://avatars.discourse-cdn.com/v4/letter/i/4491bb/32.png) [@ICG](https://discuss.elastic.co/u/ICG)\
**Post date:** [July 28, 2017, 7:35pm UTC](https://discuss.elastic.co/t/region-maps-configuration-of-vector-map-with-self-hosted-layers/94937/3 "2017-07-28T19:35:01Z")

</div>

I have a similar question. In my case the server is CORS enabled. But it is not clear to me which url should I put in Kibana config file. Should it be the path like `http://localhost:8080/geoserver/wfs` or should it be the direct link to geojson file? If it's a direct link, then I can only extract something like this: `http://localhost:8080/geoserver/rober/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=rober:PopulationSites&maxFeatures=50&outputFormat=application%2Fjson`. Can the issue be related to the version of WFS? In this case where should I define the version of WFS in Kibana settings?

---

<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:** [July 28, 2017, 8:25pm UTC](https://discuss.elastic.co/t/region-maps-configuration-of-vector-map-with-self-hosted-layers/94937/4 "2017-07-28T20:25:02Z")

</div>

Hi @ICG the URL needs to return an actual GeoJson featurecollection. So in the case of WFS, it actually needs to point to a GetFeature-call. There is no specific WFS configuration in Kibana.

If this is required, I would open a feature-request in Kibana [https://github.com/elastic/kibana/issues/new](https://github.com/elastic/kibana/issues/new).

---

<div class="post-metadata">

**Author:** ![ICG](https://avatars.discourse-cdn.com/v4/letter/i/4491bb/32.png) [@ICG](https://discuss.elastic.co/u/ICG)\
**Post date:** [July 28, 2017, 8:45pm UTC](https://discuss.elastic.co/t/region-maps-configuration-of-vector-map-with-self-hosted-layers/94937/5 "2017-07-28T20:45:25Z")

</div>

> [@thomasneirynck](#):
>
> return an actual GeoJson featurecollection

Thanks.  
When I execute `http://localhost:8080/geoserver/rober/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=rober:PopulationSites&outputFormat=application%2Fjson`, I get geojson featurecollection `{"type":"FeatureCollection","totalFeatures":51,"features":[{"type":"Feature","id":"PopulationSites.1","geometry":{"type":"MultiPolygon","coordinates":[[[[19.74776575,42.57890086],[19.74600875,42.57993439],[19.74135787,42.57440501],.....`. So, I understand that `url` in kibana config is correct, since it returns featurecollection. However, since it does not work, should I open the issue ticket?

---

<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:** [July 28, 2017, 8:53pm UTC](https://discuss.elastic.co/t/region-maps-configuration-of-vector-map-with-self-hosted-layers/94937/6 "2017-07-28T20:53:50Z")

</div>

@ICG

can you verify two things first:

- can you inspect your browser debugger and see if the call is made correctly to that file. if so, you should see it somewhere in the network-tab.
- Also, is that file present in the UI drop down selection after configuring it in the kibana.yml?

---

<div class="post-metadata">

**Author:** ![ICG](https://avatars.discourse-cdn.com/v4/letter/i/4491bb/32.png) [@ICG](https://discuss.elastic.co/u/ICG)\
**Post date:** [July 28, 2017, 9:10pm UTC](https://discuss.elastic.co/t/region-maps-configuration-of-vector-map-with-self-hosted-layers/94937/7 "2017-07-28T21:10:45Z")

</div>

Yep, it appears in Region Map -\> Options -\> Layer Settings -\> Vector map. I can also see Join field. Let me check browser debugger.

---

<div class="post-metadata">

**Author:** ![ICG](https://avatars.discourse-cdn.com/v4/letter/i/4491bb/32.png) [@ICG](https://discuss.elastic.co/u/ICG)\
**Post date:** [July 28, 2017, 9:16pm UTC](https://discuss.elastic.co/t/region-maps-configuration-of-vector-map-with-self-hosted-layers/94937/8 "2017-07-28T21:16:51Z")

</div>

I checked network tab and observed the following message: `XMLHttpRequest cannot load http://localhost:8080/geoserver/rober/ows?service=WFS&version=1.1.0&requ…ture&typeName=rober:PopulationSites&outputFormat=application%2Fjson. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:5601' is therefore not allowed access. The response had HTTP status code 403.` It looks like the file cannot be found, while I get the file when putting this link in browser. Looks like CORS issue, while I followed all instructions for enabling it. Hmm

---

<div class="post-metadata">

**Author:** ![ICG](https://avatars.discourse-cdn.com/v4/letter/i/4491bb/32.png) [@ICG](https://discuss.elastic.co/u/ICG)\
**Post date:** [July 28, 2017, 10:47pm UTC](https://discuss.elastic.co/t/region-maps-configuration-of-vector-map-with-self-hosted-layers/94937/9 "2017-07-28T22:47:48Z")

</div>

Since I get 403 forbidden error when trying to access geojson file from Kibana, I guess that I should configure Kibana proxy. I have already CORS-enabled my WFS server. So,there is some issue on Kibana side because it cannot see the port 8080 (localhost:8080) as if it would be a different domain. How can I indicate to Kibana that /geoserver should be substituted by localhost:8080/geoserver ?

---

<div class="post-metadata">

**Author:** ![Fguti](https://avatars.discourse-cdn.com/v4/letter/f/e274bd/32.png) [@Fguti](https://discuss.elastic.co/u/Fguti)\
**Post date:** [July 31, 2017, 11:33am UTC](https://discuss.elastic.co/t/region-maps-configuration-of-vector-map-with-self-hosted-layers/94937/10 "2017-07-31T11:33:22Z")

</div>

Hi all,

Our problem was related to CORS. Is solved. We used the GetFeature-call.

Best and thank you very much

Francisco

---

<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:** [August 28, 2017, 11:33am UTC](https://discuss.elastic.co/t/region-maps-configuration-of-vector-map-with-self-hosted-layers/94937/11 "2017-08-28T11:33:41Z")

</div>

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