I am trying to add an online mapsource. The map displays its tiles not in order. What can be wrong?
(https://photos.smugmug.com/photos/i-SXT3fm8/0/8086ac52/X3/i-SXT3fm8-X3.jpg)
The URL string has to have x/y (lon/lat) included. Are they in the right place (order)?
If I remember correctly this is what is in the providers file:
<provider id="10921" type="1" visible="true" background="-1">
<name>Hitta Friluft</name>
<mode>Classic</mode>
<countries>Sweden</countries>
<url><![CDATA[http://static.hitta.se/tile/v3/4_2x/{z}/{x}/{y}]]></url>
<zoomPart>{z}-8</zoomPart>
<zoomMin>12</zoomMin>
<zoomMax>25</zoomMax>
<tileSize>256</tileSize>
<attribution><![CDATA[© Karttakeskus. Lantmäteriet/Metria]]></attribution>
<extraHeader><![CDATA[Referer#http://kartor.eniro.se/]]></extraHeader>
<extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0]]></extraHeader>
<usage>road,city</usage>
</provider>
This is what works in Guru maps for the same map source:
<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
<name>Hitta Frilufts</name>
<url>http://static.hitta.se/tile/v3/4_2x/{$z}/{$x}/{$invY}</url>
</customMapSource>
Quote from: michaelbechtold on February 03, 2024, 13:49:45The URL string has to have x/y (lon/lat) included. Are they in the right place (order)?
In Guru maps we use invY, inverted Y. Is it possible with Locus?
Seems so:
https://docs.locusmap.eu/doku.php?id=manual:advanced:customization:online_maps
Perfect. However I cant make it work woth any of the modes.
Here is my provider:
<provider id="10921" type="1" visible="true" background="-1">
<name>Hitta Friluft</name>
<mode>Classic</mode>
<countries>Sweden</countries>
<url><![CDATA[http://static.hitta.se/tile/v3/4_2x/{z}/{x}/{y}]]></url>
<zoomPart>{z}-8</zoomPart>
<zoomMin>12</zoomMin>
<zoomMax>25</zoomMax>
<tileSize>256</tileSize>
<attribution><![CDATA[© Karttakeskus. Lantmäteriet/Metria]]></attribution>
<extraHeader><![CDATA[Referer#http://kartor.eniro.se/]]></extraHeader>
<extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0]]></extraHeader>
<usage>road,city</usage>
</provider>
Hmm seems to be a little too complicated. It is because of 512x512 tiles used in the common 256x256 system.
Give this a try:
<provider id="10921" type="1" visible="true" background="-1">
<name>Hitta Friluft</name>
<mode>Classic</mode>
<countries>Sweden</countries>
<url><![CDATA[http://static.hitta.se/tile/v3/4_{ts}/{z}/{x}/{y}]]></url>
<zoomPart>{z}-8</zoomPart>
<zoomMin>12</zoomMin>
<zoomMax>25</zoomMax>
<tileSize>256</tileSize>
<tileScale dpi="0" multi="2.0" replace="2x" />
<attribution><![CDATA[© Karttakeskus. Lantmäteriet/Metria]]></attribution>
<extraHeader><![CDATA[Referer#http://kartor.eniro.se/]]></extraHeader>
<extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0]]></extraHeader>
<usage>road,city</usage>
</provider>