
Am 22.11.2012 16:05, schrieb WanMil:
Do we have a style-function for this?
item( ${destination}, 1 ) -> Bonn item( ${destination}, 2 ) -> Rodenkirchen
No we don't and it will not be so easy to implement that because the functions do not have any parameters yet at the moment. So it's a big change.
But the style system has a regular expression substitution: ${destination|subst:;=> } So everything behind subst: (in this case ";") is replaced with the string after the => (in this case " "). Maybe the ; must be escaped but generally it should work.
Hi, I'm now using these rules: # Set the routing direction highway=motorway & ref=* & destination=* { add display_name = '${ref|subst: =>}(${destination|subst:;=> |subst:/=> })' } highway=trunk & ref=* & destination=* { add display_name = '${ref|subst: =>}(${destination|subst:;=> |subst:/=> })' } So chars '/' and ';' are replaced by space. Also I shorten the ref (A 1 -> A1) to save one character. Now, more than one destination city is displayed on my Nuvi Navi. Note that I removed the motorway_link and trunk_link. They have no highway-symbol-shield and so display_name is not working for them. Chris