
Marko Mäkelä schrieb am 10.09.2010 22:12:
I implemented the $(variable_name) syntax some time ago, to get bus route relations translated properly. An excerpt from --style=routes:
[relations file] type=route & ... { apply { set mkgmap:route='$(mkgmap:route),${ref}' | '${ref}' } } [lines file] highway=* & mkgmap:route=* { name '${mkgmap:route}' } [0x1d resolution 16]
Note that in the apply rule, the $(mkgmap:route) is referring to an attribute of the relation member, and the ${ref} is referring to an attribute of the relation.
Thank you very much, that was the information I was mainly looking for. I will add this information also on the style rules page in the Wiki.
What I would like to see is "apply" sorted by some criterion, and the possibility to filter out duplicates, for example, when the same way is part of opposite-direction bus route relations. (Opposing bus routes of the same line can consist of oneway segments as well as shared non-oneway segments. Now I will see "742,742" on the non-oneways and just "742" on the oneways.)
Is there any way to check for the role of the member inside the style rules? Gruss Torsten