# Tile map service CORS errors

**URL:** <https://discuss.elastic.co/t/tile-map-service-cors-errors/216262>\
**Category:** Kibana\
**Tags:** maps\
**Created:** [January 23, 2020, 2:11pm UTC](https://discuss.elastic.co/t/tile-map-service-cors-errors/216262 "2020-01-23T14:11:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rainae](https://avatars.discourse-cdn.com/v4/letter/r/77aa72/32.png) [@rainae](https://discuss.elastic.co/u/rainae)\
**Post date:** [January 23, 2020, 2:11pm UTC](https://discuss.elastic.co/t/tile-map-service-cors-errors/216262/1 "2020-01-23T14:11:58Z")

</div>

Hi,

I tried to create a map with a tile map service with the url

[https://tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png](https://tiles.openrailwaymap.org/standard/%7Bz%7D/%7Bx%7D/%7By%7D.png)

but the tiles are not loaded, and the debug-console of the browser tells me:

> Blockquote  
> Access to fetch at '[https://tiles.openrailwaymap.org/standard/2/1/2.png](https://tiles.openrailwaymap.org/standard/2/1/2.png)' from origin '[http://172.30.36.129:5601](http://172.30.36.129:5601)' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.  
> Blockquote

The default layer from openstreetmap works without a problem.

I already configured cors in the kibana.yml with the parameters:

server.cors: true  
server.cors.origin: ["\*"]

I'm running elasticsearch and kibana in version 7.5.1 in a docker-environment.

What am I doing wrong?

---

<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:** [January 23, 2020, 4:33pm UTC](https://discuss.elastic.co/t/tile-map-service-cors-errors/216262/2 "2020-01-23T16:33:07Z")

</div>

Hi @rainae

Are you using Elastic Maps, right? The problem is that openrailwaymap is not supporting CORS requests.

Other tile servers that support CORS you can try:

- Stamen Watercolor: `https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg`
- CARTO voyager `https://a.basemaps.cartocdn.com/rastertiles/voyager_labels_under/{z}/{x}/{y}.png`
- CARTO positron `https://a.basemaps.cartocdn.com/rastertiles/light_all/{z}/{x}/{y}.png`

The only workaround I can think about is to set up your own reversed proxy that actually supports CORS if you really need that server.

---

<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 20, 2020, 4:33pm UTC](https://discuss.elastic.co/t/tile-map-service-cors-errors/216262/3 "2020-02-20T16:33:23Z")

</div>

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