This object is in archive! 

Custom Online Map zoomMax ignored on background map

Peter L shared this problem 19 months ago
Solved

I am testing the bounds of layering maps and the zoom feature and it seems that when a background map is called, the background map's zoomMax attribute is ignored and is replaced with the selected map's zoomMax attribute. I use Locus Map 3 Classic.


Is this behaviour intended? In my test below, OSM Background stops at zoom 17 as intended, but when it is accessed through OSM Pistes Lvl18, the zoomMax of OSM Background is ignored and {z} in the url receives 18. I do not want this to occur. Is it possible to have mismatched zooms?

<?xml version="1.0" encoding="UTF-8"?>

<providers>

<provider id="1000" type="0" visible="true" required="true" background="-1">

<name>OSM</name>

<mode>Background</mode>

<url><![CDATA[http://tiles.opensnowmap.org/base_snow_map/{z}/{x}/{y}.png?debug1]]></url>;

<zoomPart>{z}-8</zoomPart>

<zoomMin>8</zoomMin>

<zoomMax>25</zoomMax>

<tileSize>256</tileSize>

</provider>

<provider id="1002" type="0" visible="true" required="false" background="1000">

<name>OSM</name>

<mode>Pistes Lvl18</mode>

<url><![CDATA[http://tiles.opensnowmap.org/pistes/{z}/{x}/{y}.png?debug1]]></url>;

<zoomPart>{z}-8</zoomPart>

<zoomMin>8</zoomMin>

<zoomMax>26</zoomMax>

<tileSize>256</tileSize>

</provider>

</providers>


<?xml version="1.0" encoding="UTF-8"?>
<providers>
	<provider id="1000" type="0" visible="true" required="true" background="-1">
	<name>OSM</name>
	<mode>Background</mode>
	<url><![CDATA[http://tiles.opensnowmap.org/base_snow_map/{z}/{x}/{y}.png?debug1]]></url>;
	<zoomPart>{z}-8</zoomPart>
	<zoomMin>8</zoomMin>
	<zoomMax>25</zoomMax>
	<tileSize>256</tileSize>
	</provider>
	<provider id="1002" type="0" visible="true" required="false" background="1000">
	<name>OSM</name>
	<mode>Pistes Lvl18</mode>
	<url><![CDATA[http://tiles.opensnowmap.org/pistes/{z}/{x}/{y}.png?debug1]]></url>;
	<zoomPart>{z}-8</zoomPart>
	<zoomMin>8</zoomMin>
	<zoomMax>26</zoomMax>
	<tileSize>256</tileSize>
	</provider>
</providers>
The help page https://docs.locusmap.eu/doku.php?id=manual:advanced:customization:online_maps does not make any mention of restrictions either.

Replies (3)

photo
1

Hello Peter,

yes, it is the correct intended behavior. The base map defines all necessary parameters and the background map is used when possible, but it is not required to make this "duo" work. Anyway, app should stop request tiles of the background map in case, map layers are no longer defined. So app should not ask for tiles of the background OSM map in the zoom level 18. Or you are sure this happens and the app ask for invalid zoom level 18 map tiles of the background map?

photo
1

The server in my example has tiles available to level 18, but I am testing the limits of zooms coding on background layers to create complex stacked layers. I can confirm <zoomPart> is ignored from background providers and is replaced with the <zoomPart> from the base map to all background providers that may be listed.

photo
1

Hello Peter,

very good observation, thank you! You are of course correct. Issue will be fixed in the next app version.

Jiří M. aka Menion

Replies have been locked on this page!