This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Problems adding a custom online tiling map

Tags: None
(comma "," separated)
whattheheck
Registered Member
Posts
2
Karma
0
hi,

i love marble (using version 15.08.2 on a up-to-date archlinux system) quite a bit and wanted to use just another osm-derivated map.
Specifically, I try to add in the three flavours of openrailwaymap [0].
Using the marble map creation wizard choosing "Online map providing indexed tiles" I am asked for a Url.
This info can be found at the orm website documenting the API [1].
So I used an url scheme like this:
Code: Select all
http://tiles.openrailwaymap.org/standard/{zoomLevel}/{x}/{y}.png

After adding in a dummy preview picture and some metadata, the map preview as the finished map just yields a black globe turning white while moving.
I just noted, that marble automatically turnes the url to
Code: Select all
http://tiles.openrailwaymap.org/standard/{zoomlevel}/{x}/{y}.png

What am I missing, is this a bug or my fault?

Actually I think this map with its three flavours would make good prefabricated plugins, but i dont know how to do that.

Any help is much appreciated.
Greetings

[0] http://www.openrailwaymap.org/
[1] http://wiki.openstreetmap.org/wiki/Open ... /API#Tiles
User avatar
Earthwings
KDE Developer
Posts
172
Karma
1
OS
Here is a railway.dgml to get started:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<dgml xmlns="http://edu.kde.org/marble/dgml/2.0">
    <document>
        <head>
            <name>OpenRailwayMap</name>
            <license short="ATTRIBUTION MISSING!"><![CDATA[INSERT FROM https://wiki.openstreetmap.org/wiki/OpenRailwayMap/API]]></license>
            <target>earth</target>
            <theme>railway</theme>
            <visible>true</visible>
            <description><![CDATA[A detailed online map of the world's railway infrastructure, built on OpenStreetMap data]]></description>
            <icon pixmap="preview.png"/>
            <zoom>
                <discrete>false</discrete>
                <minimum>900</minimum>
                <maximum>3500</maximum>
            </zoom>
        </head>
        <map bgcolor="#000000" labelColor="#000000">
            <canvas/>
            <target/>
              <layer name="railway" backend="texture">
<!--             
                <texture name="mapnik_data" expire="604800">
                    <sourcedir format="PNG"> earth/openstreetmap </sourcedir>
                    <tileSize width="256" height="256"/>
                    <storageLayout levelZeroColumns="1" levelZeroRows="1" maximumTileLevel="19" mode="OpenStreetMap"/>
                    <projection name="Mercator"/>
                    <downloadUrl protocol="https" host="a.tile.openstreetmap.org" path="/"/>
                    <downloadUrl protocol="https" host="b.tile.openstreetmap.org" path="/"/>
                    <downloadUrl protocol="https" host="c.tile.openstreetmap.org" path="/"/>
                    <downloadPolicy usage="Browse" maximumConnections="20"/>
                    <downloadPolicy usage="Bulk" maximumConnections="2"/>
                </texture>
-->
                <texture name="map" expire="31536000">
                    <sourcedir format="png" expire="31536000">earth/railway</sourcedir>
                    <tileSize width="512" height="512"/>
                    <storageLayout maximumTileLevel="20" levelZeroColumns="1" levelZeroRows="1" mode="Custom"/>
                    <downloadUrl protocol="http" host="a.tiles.openrailwaymap.org" path="/standard/{zoomLevel}/{x}/{y}.png" query=""/>
                    <downloadUrl protocol="http" host="b.tiles.openrailwaymap.org" path="/standard/{zoomLevel}/{x}/{y}.png" query=""/>
                    <downloadUrl protocol="http" host="c.tiles.openrailwaymap.org" path="/standard/{zoomLevel}/{x}/{y}.png" query=""/>
                    <downloadPolicy usage="Browse" maximumConnections="20"/>
                    <downloadPolicy usage="Bulk" maximumConnections="2"/>
                    <projection name="Mercator"/>
<!--             
                    <blending name="AlphaBlending"/>
-->
                </texture>
            </layer>
        </map>
        <settings/>
        <legend/>
    </document>
</dgml>


It looks like this:
Image

When uncommenting the two commented sections you would get a base map below. However the somewhat strange approach they use with files in 512x512 resolution that should be displayed in 256x256 is not really supported in Marble and would lead to a crash currently.
whattheheck
Registered Member
Posts
2
Karma
0
hi Earthwings

thank you for your detailed reply.
from the installed maps i found the earth map directory scheme to be
Code: Select all
/usr/share/marble/data/maps/earth/mapname/mapname.dgml
.
Putting your xml-file there yields a map entry in marble, however it just shows a blank globe at all zoomlevels again. uncommenting the two sections does not help either.
is there any documentation about this xml extensions? maybe that would be a starting point.
updating marble to version 15.08.3 did not help either.

greetings


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], mesutakcan, Sogou [Bot]