Minor process-destination issue

Hi, Many destinations are entered with several cities, for example destination=Bonn;Rodenkirchen My Nüvi is displaying only the first entry: "Rechts abfahren nach A 555 (Bonn" The right ")" is missing also in this case. Bug or feature ? Some times ago there was a patch concerning the ";" handling, don't know if this patch was ever committed. The user should be able to decide via style file to display only the first entry or all entries. Do we have a style-function for this? item( ${destination}, 1 ) -> Bonn item( ${destination}, 2 ) -> Rodenkirchen Chris

I have a similar issue with streets named "Main St 16/2". The name is truncated to "Main St 16" in the turn directions. Is it possible to replace all / in the names with some other character using the style sheet? ----- Original Message ----- From: "Chris66" <chris66nrw@gmx.de> To: <mkgmap-dev@lists.mkgmap.org.uk> Sent: Wednesday, November 21, 2012 2:08 AM Subject: [mkgmap-dev] Minor process-destination issue
Hi,
Many destinations are entered with several cities, for example destination=Bonn;Rodenkirchen
My Nüvi is displaying only the first entry:
"Rechts abfahren nach A 555 (Bonn"
The right ")" is missing also in this case.
Bug or feature ?
Some times ago there was a patch concerning the ";" handling, don't know if this patch was ever committed.
The user should be able to decide via style file to display only the first entry or all entries.
Do we have a style-function for this?
item( ${destination}, 1 ) -> Bonn item( ${destination}, 2 ) -> Rodenkirchen
Chris
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
----- No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2221 / Virus Database: 2629/5406 - Release Date: 11/19/12

Am 21.11.2012 10:39, schrieb RocketMan:
I have a similar issue with streets named "Main St 16/2". The name is truncated to "Main St 16" in the turn directions.
Yes, this seems to be the same problem. See: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2009q4/005263.html> so ";" is replaced by "/". Today I've had the case that ref="A 3;A 4" was displayed as "A3/A4" in the highway-shield but as "Drives on A 3" in the routing directions on my nuvi. Chris

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. WanMil

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

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

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
Hi Chris, thanks for the hints. I think I will use that in the mkgmap default style too. Anyhow I am wondering about the exact meaning of the tag display_name. It's not documented and I found only a short piece of code (StyledConverter.java) handling that: String refs = combineRefs(element); // Insert display_name as first ref. // This causes display_name to be displayed in routing // directions, instead of only the ref. String displayName = Label.squashSpaces(element.getTag("display_name")); if (displayName != null) { // substitute '/' for ';' in display_name to avoid it // getting split below displayName = displayName.replace(";","/"); if (refs == null) refs = displayName; else refs = displayName + ";" + refs; } The tag is not documented in the OSM wiki. Throughout europe it is used only 26 times, so I would not call it an official tag. So in mkgmap it should be named mkgmap:display_name instead to document that it is an internal tag. Additionally it can be removed from the builtin-tag-list. If noone opposes I will change that starting with introducing mkgmap:display_name (is there a better name?) but accepting display_name too (giving a warning on stderr). After a while display_name can be removed completely. WanMil
participants (4)
-
Chris66
-
Henning Scholland
-
RocketMan
-
WanMil