# Region Map does not show

**URL:** <https://discuss.elastic.co/t/region-map-does-not-show/124447>\
**Category:** Kibana\
**Created:** [March 18, 2018, 2:34pm UTC](https://discuss.elastic.co/t/region-map-does-not-show/124447 "2018-03-18T14:34:39Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![BicaLuv](https://avatars.discourse-cdn.com/v4/letter/b/c5a1d2/32.png) [@BicaLuv](https://discuss.elastic.co/u/BicaLuv)\
**Post date:** [March 18, 2018, 2:34pm UTC](https://discuss.elastic.co/t/region-map-does-not-show/124447/1 "2018-03-18T14:34:39Z")

</div>

Hi!  
I'm playing with my own German region maps.  
I got a geojson file with the following format:  
{"type":"FeatureCollection","features":[  
{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[...]]]},"properties":{"plz":"01067","note":"01067 Dresden","qkm":6.866412,"einwohner":11957}},  
I registered it in kibana.yml with the little trick of kibana server self hosting:  
regionmap:  
layers:  
- name: "Deutschland"  
url: "../plugins/mm\_geo/plz-5stellig.geojson"  
fields:  
- name: "plz"  
description: "zip code"  
And I see it in kibana region map definition and can select the given field "zip code". But I still do not get any visual feedback.  
The data in Elasticsearch uses this mapping:  
put streaming  
{  
"mappings":{  
"exc":{  
"properties":{  
"id": {"type":"keyword"},  
"eventTime":{"type":"date"},  
"plz": {"type":"long"}  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)\
**Post date:** [March 19, 2018, 11:09am UTC](https://discuss.elastic.co/t/region-map-does-not-show/124447/2 "2018-03-19T11:09:51Z")

</div>

Hi,

the issue is most likely due to a data type mismatch. As you can see in your geojson file, the field is `"plz": "01067"`, so of type string, where as you index it in your mapping as type `long`. Since German _Postleizahls_ can begin with a 0, you must actually use a string format, since numeric values, won't have the capabilities for any leading zeroes.

So you should change the type to `string` and reindex the data with the leading zeroes. In that case the mapping should work.

Cheers,  
Tim

---

<div class="post-metadata">

**Author:** ![BicaLuv](https://avatars.discourse-cdn.com/v4/letter/b/c5a1d2/32.png) [@BicaLuv](https://discuss.elastic.co/u/BicaLuv)\
**Post date:** [March 19, 2018, 12:52pm UTC](https://discuss.elastic.co/t/region-map-does-not-show/124447/3 "2018-03-19T12:52:15Z")

</div>

Thx Tim, I will try using string type.  
Should I use type string or keyword?

---

<div class="post-metadata">

**Author:** ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)\
**Post date:** [March 19, 2018, 12:54pm UTC](https://discuss.elastic.co/t/region-map-does-not-show/124447/4 "2018-03-19T12:54:47Z")

</div>

Sorry, you should use type `keyword` i.e. a non analyzed string for that field.

---

<div class="post-metadata">

**Author:** ![BicaLuv](https://avatars.discourse-cdn.com/v4/letter/b/c5a1d2/32.png) [@BicaLuv](https://discuss.elastic.co/u/BicaLuv)\
**Post date:** [March 19, 2018, 5:19pm UTC](https://discuss.elastic.co/t/region-map-does-not-show/124447/5 "2018-03-19T17:19:50Z")

</div>

Changed mapping to the following:  
put streaming  
{  
"mappings":{  
"exc":{  
"properties":{  
"id": {"type":"keyword"},  
"eventTime":{"type":"date"},  
"plz": {"type":"keyword"}  
}  
}  
}  
}

But still do not get anything displayed.

---

<div class="post-metadata">

**Author:** ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)\
**Post date:** [March 19, 2018, 5:21pm UTC](https://discuss.elastic.co/t/region-map-does-not-show/124447/6 "2018-03-19T17:21:34Z")

</div>

@thomasneirynck is the above GeoJSON format correct or do you see any other issues?

---

<div class="post-metadata">

**Author:** ![BicaLuv](https://avatars.discourse-cdn.com/v4/letter/b/c5a1d2/32.png) [@BicaLuv](https://discuss.elastic.co/u/BicaLuv)\
**Post date:** [March 19, 2018, 5:37pm UTC](https://discuss.elastic.co/t/region-map-does-not-show/124447/7 "2018-03-19T17:37:05Z")

</div>

No warnings or things like that. I see the correct name of the region map in kibana and the correct description of my field.  
How can I check the correct format of the geojson file?  
I downloaded it from here: [https://www.suche-postleitzahl.org/plz-karte-erstellen](https://www.suche-postleitzahl.org/plz-karte-erstellen)  
If you want to, I can provide the geojson file. Or does elastic provide a zip code geojson file ?

---

<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:** [March 19, 2018, 6:06pm UTC](https://discuss.elastic.co/t/region-map-does-not-show/124447/8 "2018-03-19T18:06:57Z")

</div>

Hi @BicaLuv,

can you double check a couple of things:

- open the spy panel (little arrow bottom left). Do you see the correct result there? Be sure that the values in the first column exactly match the property-values in your geojson
- open the browser debugger. is your geojson file correctly served by Kibana? (ie. no errors)

Make sure you keep "display warnings" in the Options-tab checked. It will give you feedback if any rows from your terms-aggregation cannot be joined to the geojson from your Germany file.

---

<div class="post-metadata">

**Author:** ![BicaLuv](https://avatars.discourse-cdn.com/v4/letter/b/c5a1d2/32.png) [@BicaLuv](https://discuss.elastic.co/u/BicaLuv)\
**Post date:** [March 19, 2018, 6:54pm UTC](https://discuss.elastic.co/t/region-map-does-not-show/124447/9 "2018-03-19T18:54:33Z")

</div>

spy panel: Yes, I see plz 64291 and count 16. both are right  
BUT I get an 404 for the following url: [http://localhost:5601/plugins/region\_map/data/plz-5stellig.geojson](http://localhost:5601/plugins/region_map/data/plz-5stellig.geojson)  
I thought I can place my geojson file under "/Users/BicaLuv/kibana-6.1.1-darwin-x86\_64/plugins" to get it served by kibana server like I read in another post.  
Isn't this correct? Do you support file serving/providing go geojson files?

---

<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:** [March 19, 2018, 6:58pm UTC](https://discuss.elastic.co/t/region-map-does-not-show/124447/10 "2018-03-19T18:58:39Z")

</div>

Serving files with Kibana is not recommended as it uses internal implementation details.

There recommend way is to setup your own server, see [https://www.elastic.co/blog/custom-region-maps-in-kibana-6-0](https://www.elastic.co/blog/custom-region-maps-in-kibana-6-0) for a tutorial.

As for your particular problem. Did you put the file inside a "kibanainstallfolder/core\_plugins/region\_map/data" folder? It seems from the 404 that Kibana is trying to get the file from that location.

---

<div class="post-metadata">

**Author:** ![BicaLuv](https://avatars.discourse-cdn.com/v4/letter/b/c5a1d2/32.png) [@BicaLuv](https://discuss.elastic.co/u/BicaLuv)\
**Post date:** [March 19, 2018, 7:06pm UTC](https://discuss.elastic.co/t/region-map-does-not-show/124447/11 "2018-03-19T19:06:36Z")

</div>

I understand and know that it is not an officially supported way but due to the absence of file serving in kibana, I tried this for a quick test.  
I provided the file under "kibanainstallfolder/plugins/region\_map/data".  
Moving it to the core\_plug-ins/region\_map/public folder, everything works!

---

<div class="post-metadata">

**Author:** ![BicaLuv](https://avatars.discourse-cdn.com/v4/letter/b/c5a1d2/32.png) [@BicaLuv](https://discuss.elastic.co/u/BicaLuv)\
**Post date:** [March 20, 2018, 7:23pm UTC](https://discuss.elastic.co/t/region-map-does-not-show/124447/12 "2018-03-20T19:23:23Z")

</div>

One addition:  
When I copy my geojson file to my own web server and change the kibana.yml file accordingly I get the following error while kibana (5.6.x) tries to load my region map:

Uncaught (in promise) Error: Could not retrieve manifest from the tile service: status -1  
at ServiceSettings. (kibana.bundle.js?v=15554:262)  
at tryCatch (commons.bundle.js?v=15554:52)  
at Generator.\_invoke (commons.bundle.js?v=15554:52)  
at Generator.prototype.(anonymous function) [as throw] ([http://vxbdlabneo4je01:5611/bundles/commons.bundle.js?v=15554:52:28913](http://vxbdlabneo4je01:5611/bundles/commons.bundle.js?v=15554:52:28913))  
at step (kibana.bundle.js?v=15554:262)  
at kibana.bundle.js?v=15554:262  
Promise.then (async)  
(anonymous) @ kibana.bundle.js?v=15554:277  
$digest @ commons.bundle.js?v=15554:39  
$apply @ commons.bundle.js?v=15554:39  
(anonymous) @ commons.bundle.js?v=15554:42  
dispatch @ commons.bundle.js?v=15554:28  
elemData.handle @ commons.bundle.js?v=15554:28

---

<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:** [April 17, 2018, 7:23pm UTC](https://discuss.elastic.co/t/region-map-does-not-show/124447/13 "2018-04-17T19:23:41Z")

</div>

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