OruxMaps

Uncategorized Boards => GENERAL => Topic started by: pedja on March 10, 2018, 09:51:02 PM

Title: Adding custom online map with login
Post by: pedja on March 10, 2018, 09:51:02 PM
I want to set custom online map in OruxMaps.



Map is TMS, url is in format: http://mapsite.com/?z={$z}&x={$x}&y={$y}



Access is protected by user and password. On first access service asks for user and password.



I cannot find any info how to set this up.



I have added it into onlinemapsources.xml and it shows in list, but when I try to open that map id does not diplay, nor ask for login.



I noticed that there is customonlinemaps directory but it is empty, and I could not find any info how to place settings for map in that directory.
Title: Re: Adding custom online map with login
Post by: orux on March 11, 2018, 10:13:48 AM
Quote from: pedja post_id=13031 time=1520715062 user_id=1416
I want to set custom online map in OruxMaps.



Map is TMS, url is in format: http://mapsite.com/?z={$z}&x={$x}&y={$y}



Access is protected by user and password. On first access service asks for user and password.



I cannot find any info how to set this up.



I have added it into onlinemapsources.xml and it shows in list, but when I try to open that map id does not diplay, nor ask for login.



I noticed that there is customonlinemaps directory but it is empty, and I could not find any info how to place settings for map in that directory.


You have to put the user/password in the url, if those values can go there:



(example) http://mapsite.com/?us=usuario&pass=password&z={$z}&x={$x}&y={$y}



or if it is using basic http authorization, you can add those parameters in the onlinemapsources.xml file, using this tag:



<httpparam name="Authorization">Basic aG9sYTpwYXNzcw==</httpparam>



You can create here your header: https://www.blitter.se/utils/basic-authentication-header-generator/





orux
Title: Re: Adding custom online map with login
Post by: pedja on October 14, 2018, 08:28:25 PM
Thanks. It worked but not easy task to set, especially with phone that does not share its file system to PC.



If would be good if option to set this through application is added to OruXmaps. Just entrering parameters and avoiding manual edit of XML file would be great.



For those that cam to the same issue here is ane example of settings for custom map:


<onlinemapsource uid="999">
<name>MapName</name>
<url><![CDATA[http://yourmap.com/tile/?z={$z}&x={$x}&y={$y}]]></url>
<website><![CDATA[<a href="http://yourmap.com</a>]]></website>
<minzoom>6</minzoom>
<maxzoom>18</maxzoom>
<projection>MERCATORESFERICA</projection>
<servers>a,b,c</servers>
<httpparam name="User-Agent">{om}</httpparam>
                <httpparam name="Authorization">Basic cGVk4mE6b6Bkdn7zMWNl</httpparam>
<cacheable>1</cacheable>
<downloadable>1</downloadable>
<maxtilesday>0</maxtilesday>
<maxthreads>0</maxthreads>
<xop></xop>
<yop></yop>
<zop></zop>
<qop></qop>
<sop></sop>
</onlinemapsource>