Adding custom online map with login

Started by pedja, March 10, 2018, 09:51:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pedja

I want to set custom online map in OruxMaps.



Map is TMS, url is in format: http://mapsite.com/?z=%7B$z%7D&x=%7B$x%7D&y=%7B$y">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.

orux

#1
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=%7B$z%7D&x=%7B$x%7D&y=%7B$y">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=%7B$z%7D&x=%7B$x%7D&y=%7B$y">http://mapsite.com/?us=usuario&pass=pas ... {$x}&y={$y">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/">https://www.blitter.se/utils/basic-auth ... generator/">https://www.blitter.se/utils/basic-authentication-header-generator/





orux

pedja

#2
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>