Customize Onlinemapsources.xml

Started by vincecarter729, February 11, 2019, 11:27:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

notbru

Quote from: LaurentG on July 28, 2025, 08:54:22 PMHello @Phil74,

I don't know if you are still interested in the Austrian map you were asking for 6 months ago (I just saw your post today), but in case, you can find hereafter the required code. I added also another server that serves the same data, but with 512x512 tiles.

<onlinemapsource uid="110001"><name>Bev.gv.at (AT)</name>
<url><![CDATA[https://maps.bev.gv.at/tiles/karte/{$z}/{$x}/{$y}.png]]></url>
<minzoom>6</minzoom>
<maxzoom>16</maxzoom>
<projection>MERCATORESFERICA</projection>
<cacheable>1</cacheable>
<downloadable>1</downloadable>
<maxtilesday>0</maxtilesday>
<maxthreads>0</maxthreads>
<xop></xop>
<yop></yop>
<zop></zop>
<qop></qop>
<sop></sop>
</onlinemapsource>   

<onlinemapsource uid="110002"><name>Bergfex 50K (AT)</name>
<url><![CDATA[https://tiles.bergfex.at/data/oek50-512/{$z}/{$x}/{$y}.jpeg]]></url>
<minzoom>6</minzoom>
<maxzoom>15</maxzoom>
<projection>MERCATORESFERICAx512</projection>
<cacheable>1</cacheable>
<downloadable>1</downloadable>
<maxtilesday>0</maxtilesday>
<maxthreads>0</maxthreads>
<xop></xop>
<yop></yop>
<zop></zop>
<qop></qop>
<sop></sop>
</onlinemapsource>   


Thank you, that's great!
Perhaps you also have the code for bergfex OSM?

Notbru

LaurentG

#16
Personnally, I can't see the interest of these maps (that actually are not specific to Austria but cover the full world) that are not really better than OSM Mapnik....
But if you want to use them, it's up to you !

These maps can be get either with tiles 256x256 or 512x512

<onlinemapsource uid="110003"><name>Bergfex OSM 512 (AT)</name>
<url><![CDATA[https://tiles.bergfex.at/styles/bergfex-osm/{$z}/{$x}/{$y}@2x.jpeg]]></url>
<minzoom>0</minzoom>
<maxzoom>22</maxzoom>
<projection>MERCATORESFERICAx512</projection>
<cacheable>1</cacheable>
<downloadable>1</downloadable>
<maxtilesday>0</maxtilesday>
<maxthreads>0</maxthreads>
<xop></xop>
<yop></yop>
<zop></zop>
<qop></qop>
<sop></sop>
</onlinemapsource>   

<onlinemapsource uid="110004"><name>Bergfex OSM 256 (AT)</name>
<url><![CDATA[https://tiles.bergfex.at/styles/bergfex-osm/{$z}/{$x}/{$y}.jpeg]]></url>
<minzoom>0</minzoom>
<maxzoom>22</maxzoom>
<projection>MERCATORESFERICA</projection>
<cacheable>1</cacheable>
<downloadable>1</downloadable>
<maxtilesday>0</maxtilesday>
<maxthreads>0</maxthreads>
<xop></xop>
<yop></yop>
<zop></zop>
<qop></qop>
<sop></sop>
</onlinemapsource>
   


and the equivalent sources for Mobac

name = "Autriche Bergfex-OSM 256";

tileType = "jpg";
minZoom = 0;
maxZoom = 22;
String getTileUrl( int Zoom, int X, int Y ) {
   
   return "https://tiles.bergfex.at/styles/bergfex-osm/" + Zoom + "/" + X + "/" + Y + ".jpeg";
}


name = "Autriche Bergfex-OSM 512";

tileType = "jpg";
minZoom = 0;
maxZoom = 22;
String getTileUrl( int Zoom, int X, int Y ) {
   
   return "https://tiles.bergfex.at/styles/bergfex-osm/" + Zoom + "/" + X + "/" + Y + "@2x.jpeg";
}



notbru

Thanks a lot!
I like the style from bergfex for OSM.
notbru

japetus

Trying to find a way to parse the map of Greece below:
https://tiles-eu1.arcgis.com/40tFGWzosjaLJpmn/arcgis/rest/services/OFX_45_v2/MapServer/tile/{z}/{y}/{x}
I can't seem to be able to have the url recognised.. Any help please?

Lenz

Add the code below to your onlinemapsources.xml in OM's mapfiles folder.
You can change the name and also the uid (but the uid must be unique).

<onlinemapsource uid="10009001">
    <name>Greece</name>
    <url><![CDATA[https://tiles-eu1.arcgis.com/40tFGWzosjaLJpmn/arcgis/rest/services/OFX_45_v2/MapServer/tile/{$z}/{$y}/{$x}]]></url>
    <website><![CDATA[<a href></a>]]></website>
    <legend></legend>
    <minzoom>1</minzoom>
    <maxzoom>18</maxzoom>
    <projection>MERCATORESFERICA</projection>
    <servers></servers>
    <httpparam name="User-Agent">{om}</httpparam>
    <httpparam name="Referer"></httpparam>
    <cacheable>0</cacheable>
    <downloadable>0</downloadable>
    <maxtilesday>0</maxtilesday>
    <maxthreads>0</maxthreads>
    <xop></xop>
    <yop></yop>
    <zop></zop>
    <qop></qop>
    <sop></sop>
</onlinemapsource>

japetus


cjg

I am trying to add GetLost Online Maps to Oruxmaps via a customised onlinemapsources.xml. On the Get lost web site at: https://www.getlost.com.au/downloads/the-map-table/ they specify:

"The details you'll need inside the settings of some apps, where you add and configure a new map provider, are:
URL: https://live.getlost.com.au/{z}/{x}/{y}.jpg
Zoom levels: 2-18"

I have customised my onlinemapsources.xml with the additional lines:

    <onlinemapsource uid="4">
        <name>Live Get Lost Maps Custom</name>
        <url><![CDATA[https://live.getlost.com.au/{$z}/{$x}/{$y}.jpg]]></url>
        <minzoom>2</minzoom>
        <maxzoom>18</maxzoom>
        <projection>MERCATORESFERICA</projection>
        <httpparam name=""></httpparam>
        <cacheable>1</cacheable>
        <downloadable>1</downloadable>
        <maxtilesday>0</maxtilesday>
        <maxthreads>0</maxthreads>
        <xop></xop>
        <yop></yop>
        <zop></zop>
        <qop></qop>
        <sop></sop>
    </onlinemapsource>

When in Oruxmaps I switch maps and select Online > Layers no entry for Get Lost Maps appears. I get no error messages. So a bit stuck as to how to debug this problem. I can access this online source without problems using other applications such as QGIS.

cjg

Regarding my previous post - SOLVED!
The uid was not unique! I had used a uid=4 as it was my fourth entry in my custom onlinemapsources.xml file. However, the standard onlinemapsources.xml file has a uid=4 used by OpenStreetmap Mapnik. When I changed the uid to a unique number, in this case uid=5, this new online mapsource now works with no problems.