Display of more than one name for streets, hiking paths, etc.

Often a single path has a name, e.g. “Path 1” and at the same time this path is part of a hiking route, e.g. “Route 17”.

Now I wonder, if it is possible to display both names on a garmin map. At the moment, only the name of the path is displayed.

It is possible to display the name of the route in the garmin map or both names?

I’am grateful for any help.

Canario

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.

Canario

Yes, something like that, you can find my style file here:
https://github.com/ligfietser/mkgmap-style-sheets/tree/master/styles/

Great, thank you! This helps a lot (but it is still not easy for me).

In your relations file there is a rule that contains an “/” as operator:
“set iname=‘${iname}/${name}’| ‘${name}’;”

Whole rule:
network=icn
{
apply {
set icn_from_relation=yes;
set iname=‘${iname}/${name}’| ‘${name}’;
set iref=‘${iref}/${ref}’| ‘${ref}’;
}
}

Could you please explain, what this “/” causes or should cause? I couldn’t find it in the style manual.

Thank you in advance.

Canario

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.

Ah, thank you.

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.

Canario

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 :wink:
In the inc/compat_lines you see also a line with

name=* { name '${name}' }

Better ask on the mkgmap dev list.

Better try this:


type=route & route=bicycle 
{
apply 
    {
    set rname='${name}'
    }       
}

Otherwise you don’t have a variable named rname