creating a dependent render.xml

118 views
Skip to first unread message

joost schouppe

unread,
Dec 27, 2014, 8:40:54 PM12/27/14
to osm...@googlegroups.com
I've been trying to modify the new road surface rendering a little. But I can't get anything to work. There is very little information for the newbie (or I didn't find it). I only found the OpenFietsMap.render.xml as a working example (even depends-template.render.xml gives an error). Could someone provide a very simple, working example of a dependent render file?

Here's what I'm trying to do: when planning trips in South America, there are few routes to choose from. So decisions are most easily made at low zoomlevels. When you need to get some distance covered, you want to make sure the road is paved. But in South America, trunk roads are often unpaved. So you need the surface information to be available at these low zoom levels. For myself, I've got it fixed. I created this Overpass query to select the paved important roads, and imported the data to Osmand as a GPX file. But as I'm trying to get more overlanders to use Osmand (and contribute to OSM), I'd like something a bit more userfriendly and pretty.

Jan van Bekkum

unread,
Dec 29, 2014, 3:54:50 PM12/29/14
to osm...@googlegroups.com
Hi Joost,

The biggest one I found is here. I built a small one that shows the track as a thin line and the route as a dotted line (for some reason the line width of the route cannot be changed) to keep the road itself visible. It has been attached, Both are working for me.

Regards,

Jan
GPXR08.render.xml

Harry van der Wolf

unread,
Dec 29, 2014, 5:08:57 PM12/29/14
to osmand
Did you try the strokeWidth="x:y" variable to change the width?

--
You received this message because you are subscribed to the Google Groups "Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jan van Bekkum

unread,
Dec 30, 2014, 2:35:54 AM12/30/14
to osm...@googlegroups.com
Hi Harry,

Yes I did (see below). For some reason it does work for the completed track, but not for the route.

<?xml version="1.0" encoding="utf-8"?>
<renderingStyle name="Route" depends="default" defaultColor="#ffffff" version="1">

     <renderingAttribute name="route">
        <filter pathEffect="4_8" strokeWidth="4" color="#FF0000">
            <filter nightMode="true"/>
        </filter>
    </renderingAttribute>
     <renderingAttribute name="gpx">
        <filter strokeWidth="2" color="#FF0000">
            <filter nightMode="true"/>
        </filter>
    </renderingAttribute>
</renderingStyle>

You received this message because you are subscribed to a topic in the Google Groups "Osmand" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/osmand/2dUkrMRUCUI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to osmand+un...@googlegroups.com.

Jan van Bekkum

unread,
Dec 31, 2014, 2:08:08 AM12/31/14
to osm...@googlegroups.com
Apparently the file I posted before was not fully correct. Attached is the right one.


On Sunday, December 28, 2014 2:40:54 AM UTC+1, joost schouppe wrote:
I've been trying to modify the new road surface rendering a little. But I can't get anything to work. There is very little information for the newbie (or I didn't find it). I only found the OpenFietsMap.render.xml as a working example (even depends-template.render.xml gives an error). Could someone provide a very simple, working example of a dependent render file?

Here's what I'm trying to do: when planning trips in South America, there are few routes to choose from. So decisions are most easily made at low zoom levels. When you need to get some distance covered, you want to make sure the road is paved. But in South America, trunk roads are often unpaved. So you need the surface information to be available at these low zoom levels. For myself, I've got it fixed. I created this Overpass query to select the paved important roads, and imported the data to Osmand as a GPX file. But as I'm trying to get more overlanders to use Osmand (and contribute to OSM), I'd like something a bit more user friendly and pretty.
GPXR08.render.xml
Reply all
Reply to author
Forward
0 new messages