Hi, I think it would be useful to make formating of primitives configurable (ie modify DefaultNameFormater class). For example we use special tagging for hiking routes in Czech Republic and it would be nice to have these routes displayed differently in relation list view. It's possible to write plugin for it (see #6535), but it seems like overkill in this case.
Idea is to have name templates in tagging preset file that will be used to create primitive display name. Templates are inspired by mkgmap rules, syntax proposal: "House {addr:housename}" - Use string "House " and value of addr:housename tag "?{ 'House number {addr:housenumber} at {addr:street}' | 'House number {addr:housenumber}' }" - use first variant if condition is satisfied (that is both addr:housenumber and addr:street tags exists), second variant otherwise. "?{ admin_level = 2 'NUTS 1' | admin_level = 4 'NUTS 2' | admin_level = 6 'NUTS 3' | '{admin_level}'} - as above, but condition is explicitly defined using search expression. Name templates can be distributed as part of tagging preset file. There is already code that lookup tagging preset for primitive that is used to show presets in Properties dialog. Also there is already infrastructure for sharing presets. It seems to me like practical solution though it's a bit unclean to mix presets and name templates together. Other possibility is use separated files, then searching for appropriate template for primitive would be best done by search/filter expression. Or this is not suitable for core at all and it should be rather provided via plugin. It might useful to make it possible to define custom icon for primitive as well. So what do you think? -- Jiri Klement _______________________________________________ josm-dev mailing list josm-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/josm-dev