Custom Map not working - Problems with zoomMin, zoomMax and zoomPart?

Guilherme Alexsander Pereira shared this question 2 years ago
Answered

Hello! I am trying to add my custom maps, but something is wrong. The providers.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<providers>
	<provider id="20000" type="1" visible="true" background="-1">
		<name>Trilhas Abertas</name>
		<mode>Chapada dos Veadeiros (Alto Paraíso e Cavalcante)</mode>
		<url><![CDATA[http://www.trilhasabertas.com.br/veadeiros/{z}/{x}/{y}.png]]></url>;
		<zoomPart>{z}-7</zoomPart>
		<zoomMin>7</zoomMin>
		<zoomMax>18</zoomMax>
		<tileSize>256</tileSize>
		<countries>Brazil</countries>
		<attribution><![CDATA[(c)2018 Trilhas Abertas - Map data]]></attribution>
		<extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0]]></extraHeader>
		<extraHeader><![CDATA[Referer#http://www.trilhasabertas.com.br]]></extraHeader>;
		<usage>cachoeiras, fazendas, rios, estradas</usage>
	</provider>
</providers>

After debugging the server, I noticed that the tile requested by LocusMap doesn't really exist. What am I doing wrong?


You can see this same map on this site (using Leaflet): http://www.trilhasabertas.com.br/tms?map=veadeiros

Replies (1)

photo
1

Hello Guilherme,

quick check of your file without testing: is it intended to have zoomPart defined as {z}-7 ? For most of the servers, common value should be here {z}-8 . So please give it a try if it helps. If not, let me know and I'll test precisely on the device.

Menion

photo
1

The minimum and maximum zoom of my custom map is 7 and 18, respectively. I followed the {z} - minZoom rule. Here is the map metadata:


format -> png8

minzoom -> 7

maxzoom -> 18

srs -> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over

scale -> 1

metatile -> 4

photo
1

Anyway, I tried with {z} - 8 and it didn't work.

photo
2

Hello,

nice map ... few problems. From where you took sample for your XML? Correct version is:

<?xml version="1.0" encoding="UTF-8"?>
<providers>
	<provider id="20000" type="0" visible="true" background="-1">
		<name>Trilhas Abertas</name>
		<mode>Chapada dos Veadeiros (Alto Paraíso e Cavalcante)</mode>
		<url><![CDATA[http://www.trilhasabertas.com.br/veadeiros/{z}/{x}/{y}.png]]></url>;;
		<zoomPart>{z}-8</zoomPart>
		<zoomMin>15</zoomMin>
		<zoomMax>26</zoomMax>
		<tileSize>256</tileSize>
		<countries>Brazil</countries>
		<attribution><![CDATA[(c)2018 Trilhas Abertas - Map data]]></attribution>
		<extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0]]></extraHeader>
		<extraHeader><![CDATA[Referer#http://www.trilhasabertas.com.br]]></extraHeader>;;
		<usage>cachoeiras, fazendas, rios, estradas</usage>
	</provider>
</providers>


I've changed

- type: to value "0" for classis OSM maps

- zoomPart: to "z-8" which define Locus Map logic how compute zoom levels (zoom 8 is for Locus Map 256x256px one tile world)

- zoomMin: to correctly match "z-8"

- zoomMax: to correctly match "z-8"


Menion

photo
1

It worked! I had tried various value combinations, but not this combination of zoomPart, zoomMin, zoomMax, and Type. Thanks for the quick and excellent assistance.

One more question ... Is there any way to insert our maps in the LocusMap Store? We are making maps using what may already be one of the largest waterfall and mountain database in Brazil. Thanks!

photo
2

Perfect, you are welcome.

@Petr Voldan (my colleague) will definitely help with it ;).

photo
Leave a Comment
 
Attach a file