If you compile your own maps, that is possible with mkgmap, see p12 in the style manual on http://www.mkgmap.org.uk/doc/index.html how to achieve this. I use this to render cycling route names next to the streetnames in my Openfietsmaps.
Thank you very much! That’s exactly what I am looking for.
I guess that you have defined a rule in the relations file with the substitution ${route_ref} and then accessing it in the lines file.
I will give it a try.
The slash sign is just a text divider that shows up when one way has a name and one or more route relations, so for example way X is part of route A and route B, the name will be A / B / X. Instead of a slash sign you can use different symbols, like - or ( ) or whatever you like.
I’ve tried back and forth but I am not able to name/show the names of e.g. a superior bicycle route (relations) and the name of a subordinated track, which is part of the superior route at the same time. Your sample files are a great help, but I still have a hard time to understand what is going on (in particular without a debugger).
The code in my relations file:
type=route & route=bicycle
{
apply
{
set name=‘${rname}’;
}
}
The code in the lines file:
highway=* {name ‘${rname} ${name}’ | ‘${rname}’ }
The variable “rname” is e.g. not recognized at all.
I am able to display the name of the relation or the name of the track, but not both at the same time.
In my style files I use a different type of line for cycling routes so that name is not included in the highway name.
However, highway=* {name ‘${rname} ${name}’ | ‘${rname}’ } should work.
Maybe you have copied also the last line of my lines file, which include ‘inc/compat_lines’;
This is included to make the old style files compatible with newer mkgmap versions, I dont know if this overrules other commands, I have no knowledge what is going on either
In the inc/compat_lines you see also a line with