<div dir="ltr"><div>Hi, this is an old thread... until this is properly fixed in the index I'd like to share a trick I'm using to generate a gmapsupp.img file where it's convenient to search for a street name in latin countries (I'm a linux user, no mapsource/basecamp).<br>
<br></div>The issue is, in most latin countries streets are named after real people and in OSM are entered with their full name, i.e. something like "Via Wolfgang Amadeus Mozart" (Via means Street): when looking for the street one need to type "Via Wol..." and the issue is usually one knows the most meaningful name of the street - Mozart in this case - rather than the full name. And it is boring to type always "Via..."<br>
<div><br>The below does the job: the most meanigful street word (the last one) is set as first one just in the labels used for address search, i.e.: 'Via Wolfgang Amadeus Mozart' becomes 'Mozart, Via Wolfgang Amadeus' when doing address search while the label displayed on the map remains unchanged:<br>
<br><font size="1"><span style="font-family:courier new,monospace"># Add this in inc/address (just after mkgmap:country has been set)<br># Get the last full word if a \s (whitespace) exist in name<br>( mkgmap:country=ITA | mkgmap:country=FRA | mkgmap:country=CHE) & highway=* & name ~ '.*\s.*' { set last:word='${name|part: :-1}' }<br>
# if the last full word is a roman number - i.e. if a street has been named after a King or a Pope - get the last two words<br>last:word ~ '(I|II|III|IV|V|VI.*|IX|X|XI.*|XV.*|XX.*)' {set last:word='${name|part: >-3}' }<br>
# set 3rd and 4th labels (used for address search only) with the last:word as 1st word<br>last:word=* { set mkgmap:label:3='${last:word}, ${name|part: <-1}';set mkgmap:label:4='${last:word}, ${name|part: <-1}' }</span></font><br>
<br></div><div>Hope it helps!<br></div><div>Enrico<br></div></div>