This object is in archive! 

Custom map not working

Guilherme Alexsander Pereira shared this problem 2 years ago
Solved

Hi! I'm trying to add a custom map through providers.xml. But for some reason the tiles are not showing. I was able to visualize correctly using Leaflet (check: https://www.trilhasabertas.com.br/chapada-dos-veadeiros.html).

I even managed to get the map to show, but the tiles were out of order (using type = 0, tileSize = 256px).

More informations about my custom map:

- EPSG:3857 (spherical)

- Zoom: 9 - 13

- Tile size: 512px (for higher quality)

- URL: http://www.trilhasabertas.com.br/tiles/{z}/{x}/{y}.png


providers.xml:


<?xml version="1.0" encoding="UTF-8"?>
<providers>
   <provider id="1001" type="0" visible="true" background="-1">
	  <name>Trilhas Perdidas</name>
	  <mode>Chapada dos Veadeiros</mode>
	  <url><![CDATA[http://www.trilhasabertas.com.br/tiles/{z}/{x}/{y}.png]]></url>;
	  <zoomPart>{z}-8</zoomPart>
	  <zoomMin>17</zoomMin>
	  <zoomMax>21</zoomMax>
	  <tileSize>512</tileSize>
   </provider>
</providers>

Replies (1)

photo
1

You need to include a tileScale tag and a tileScale placeholder in the URL.

Additionally, remove the ";" at the end of your url-tag and leave the tileSize at 256.


<provider id='1001' type='0' visible='true' background='-1'>
    <name>Trilhas Perdidas</name>
    <mode>Chapada dos Veadeiros</mode>
    <url><![CDATA[http://www.trilhasabertas.com.br/tiles/{z}/{x}/{y}.png?v={ts}]]></url>;
    <zoomPart>{z}-8</zoomPart>
    <zoomMin>17</zoomMin>
    <zoomMax>21</zoomMax>
    <tileSize>256</tileSize>
    <tileScales>
        <tileScale dpi='0' multi='2' replace='19'/>
    </tileScales>
</provider>

photo
2

Thanks! It's working now. Gradually I understand more about this providers.xml


e3f0c6a118a8b1449990867eff62b3bd

Replies have been locked on this page!