Search:
Login
Preferences
Help/Guide
About Trac
Register
Forgot your password?
Wiki
Timeline
Changelog
Browse Source
View Tickets
New Ticket
Roadmap
Builds
Sonar
Search
Context Navigation
+0
Start Page
Index
History
Editing NameTemplate
Adjust edit area height:
8
12
16
20
24
28
32
36
40
Edit side-by-side
Name templates can be used to define custom formatting for gpx waypoints or osm primitives (for example in the Relations or the Selection lists). = Where to define = Create a text file as described below. Then refer to it from Tagging Presets (F12, Map Settings (3rd item), 3rd tab) = Configuration file = The configuration file can look like this: <?xml version="1.0" encoding="UTF-8"?>[[BR]] <presets>[[BR]] <item name="Public transportation" type="relation"[[BR]] name_template="Bus({operator} {ref} ?{'{from} - {via} - {to}' | '{from} - {to}' | '{from}' | '{to}'})"[[BR]] name_template_filter="type=route route=bus">[[BR]] </item>[[BR]] </presets>[[BR]] = Syntax = * {var} - use value of variable var * ?{condition1 'value1' | condition2 'value2 | 'value3'} - use value1 if condition1 is satisfied, value3 is no condition is satisfied. Condition can be either explicit - the same expression as in search or filters is used - or implicit; the value is used when all variables used inside exist = Samples = ||= Template =||= Tags =||= Result =|| || House number {addr:housenumber} || addr:housenumber=10 || House number 10 || ?{ 'House number {addr:housenumber} at {addr:street}' | 'House number {addr:housenumber}' } || addr:housenumber=10 || House number 10 || || addr:housenumber=10, addr:street=Abbey road || House number 10 at Abbey road || ?{ admin_level = 2 'NUTS 1' | admin_level = 4 'NUTS 2' | admin_level = 6 'NUTS 3' | 'Admin level {admin_level}'} || admin_level=4 || NUTS 2 || || admin_level=5 || Admin level 5 = Available values = For formatting of OSM primitives , the value of any tag can be used. You can use {special:everything} to see what values are available for your gpx waypoints. Some additional variables are available via the special prefix: - {special:everything} prints all available values, available for formatting of both primitives and waypoints. - {special:id} prints the ID of an osm primitive - {special:localName} prints the localized name, that is the value of name:lang for your language if it is available or the value of the name tag if it doesn't.
Note:
See
WikiFormatting
and
TracWiki
for help on editing wiki content.
Change information
Your email or username:
E-mail address and name can be saved in the
Preferences
Comment about this change (optional):
Note:
See
TracWiki
for help on using the wiki.