logo separator

[mkgmap-dev] Style file rule: English name in addition to default name

From Clinton Gladstone clinton.gladstone at googlemail.com on Mon Mar 9 18:46:30 GMT 2009

Hello,

I would like to do something like the following in my points style file:

  place=* & name:en=*  & name:en != name {name '${name} (${name:en})'
| '${name:en}' }

That is, for places which have an English name ('name:en') defined,
and where the English name is not the same as the plain 'name' tag, I
wish to display the English name in parenthesis after the plain name.
For example, I would like to display "München (Munich)" in my map, but
I would also like to simply display "Karlsruhe" instead of the
redundant "Karlsruhe (Karlsruhe)".

I know I can set a default for the name (for example, to have name:en
always take precedence), but this isn't quite what I would like.

Also, I know from the documentation that in theory 'name' "is distinct
from any 'name' tag on the element", so my rule should not work. I
also know that it does not work in practice. :-)

Is there any trick for doing this?

Cheers.



More information about the mkgmap-dev mailing list