# Kibana not able to load Map tiles from maptiler

**URL:** <https://discuss.elastic.co/t/kibana-not-able-to-load-map-tiles-from-maptiler/263865>\
**Category:** Kibana\
**Tags:** maps\
**Created:** [February 10, 2021, 12:02pm UTC](https://discuss.elastic.co/t/kibana-not-able-to-load-map-tiles-from-maptiler/263865 "2021-02-10T12:02:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlanMark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alanmark/32/56292_2.png) [@AlanMark](https://discuss.elastic.co/u/AlanMark)\
**Post date:** [February 10, 2021, 12:02pm UTC](https://discuss.elastic.co/t/kibana-not-able-to-load-map-tiles-from-maptiler/263865/1 "2021-02-10T12:02:07Z")

</div>

I've set up a Maptiler server with a world map as my environment is airgapped.

In my Kibana.yml config i have:

```
map.includeElasticMapsService: false
map.tilemap.url: "localhost:3650/api/maps/streets/{z}/{x}/{y}.png"
map.proxyElasticMapsServiceInMaps: true
map.tilemap.options.attributions: "[OpenMapTiles](http://www.openmaptiles.org/)"
map.tilemap.options.maxZoom: 18

```

When i go to view a map in Kibana i have 2 issues:

- Where do i replace the default map layer to use my map layer instead of the default [elastic.co](http://elastic.co) map service? It would be a long day at the office if im to manually replace all the layers.

- Kibana queries my Maptiler server seemingly correct and gets a URL for the tiles like: "[http://server.ip.address:3650/api/maps/streets/3/3/1.png](http://server.ip.address:3650/api/maps/streets/3/3/1.png)"  
The server returns OK, and if you went to the URL above you will see the tile as below. Which suggests maptiler is returning the tiles correctly:  

But in kibana i just see a blank map:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/1/7148b5de57f5344dfad3f48d8f7434ebe936d98c.png)

And the networking request looks to fail:

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

I can see that Kibana requests the same URL as i showed in the example above, and maptiler serves the tile correctly. Is there anything i'm missing? The custom mapping documentation is a bit lacking.

I used this blogpost as an example:

> **[Custom basemaps for region and coordinate maps in Kibana](https://www.elastic.co/blog/custom-basemaps-for-region-and-coordinate-maps-in-kibana)**
>
> Did you know you can configure Kibana to use a custom basemap for all your region maps and coordinate maps? Let's talk about a few options for doing so.

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [February 10, 2021, 1:48pm UTC](https://discuss.elastic.co/t/kibana-not-able-to-load-map-tiles-from-maptiler/263865/2 "2021-02-10T13:48:16Z")

</div>

> Where do i replace the default map layer to use my map layer instead of the default [elastic.co](http://elastic.co/) map service? It would be a long day at the office if im to manually replace all the layers.

There is no automated way to update existing saved objects with new base map layers. However, once `map.tilemap.url` is set in your kibana.yml, then any newly created map will use this basemap layer.

> I can see that Kibana requests the same URL as i showed in the example above, and maptiler serves the tile correctly. Is there anything i'm missing?

Ensure your tile server has configured [Cross-Origin Resource Sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) so tile requests from your Kibana domain have permission to access your tile server domain. More help can be found at [Troubleshoot Maps | Kibana Guide [7.10] | Elastic](https://www.elastic.co/guide/en/kibana/7.10/maps-troubleshooting.html#_tiles_are_not_displayed)

Also, once 7.11 is released, there is now an option to host Elastic Map Service locally as a docker image. [Connect to Elastic Maps Service | Kibana Guide [7.11] | Elastic](https://www.elastic.co/guide/en/kibana/7.11/maps-connect-to-ems.html#elastic-maps-server)

---

<div class="post-metadata">

**Author:** ![AlanMark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alanmark/32/56292_2.png) [@AlanMark](https://discuss.elastic.co/u/AlanMark)\
**Post date:** [March 2, 2021, 11:48am UTC](https://discuss.elastic.co/t/kibana-not-able-to-load-map-tiles-from-maptiler/263865/3 "2021-03-02T11:48:30Z")

</div>

Hi Nathan,  
Thanks for getting back to me.

As i wrote it seems like the request from kibana is going through, but somehow being aborted. I tested CORS settings with curl as such:  
curl -H "Origin: [https://ip.of.kibana:5601](https://ip.of.kibana:5601)" --verbose   
[http://ip.of.maptiler:3650/api/maps/streets/1/0/0.png](http://ip.of.maptiler:3650/api/maps/streets/1/0/0.png)

And it works perfectly fine, i download the specific tile as expected and nothing fails in the log. What is odd to me is that both are hosted on the same machine, and access is done on localhost.  
As far as i know Maptiler defaults to no cors policy as well.

---

<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:** [March 30, 2021, 11:48am UTC](https://discuss.elastic.co/t/kibana-not-able-to-load-map-tiles-from-maptiler/263865/4 "2021-03-30T11:48:35Z")

</div>

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