[mkgmap-dev] Minor process-destination issue
From Henning Scholland osm at aighes.de on Fri Dec 28 12:06:33 GMT 2012
Am 28.12.2012 12:57, schrieb Chris66: > 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. Hi Chris, would you like to write a little help in the osm-wiki? Maybe on this page: http://wiki.openstreetmap.org/wiki/Mkgmap/help/options beneath precomp-sea or create a new page? Henning
- Previous message: [mkgmap-dev] Minor process-destination issue
- Next message: [mkgmap-dev] Minor process-destination issue
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list