Problem with online map source

Started by kavetheman, February 03, 2024, 11:24:52

0 Members and 1 Guest are viewing this topic.

kavetheman

I am trying to add an online mapsource. The map displays its tiles not in order. What can be wrong?
  •  

michaelbechtold

The URL string has to have x/y (lon/lat) included. Are they in the right place (order)?
  •  
    The following users thanked this post: kavetheman

kavetheman

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>
  •  

kavetheman

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>
  •  

kavetheman

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?
  •  

michaelbechtold

  •  
    The following users thanked this post: kavetheman

kavetheman

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>
  •  

Menion

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>
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •