logo separator

[mkgmap-dev] highway shields in label occasionally dropped

From Clinton Gladstone clinton.gladstone at googlemail.com on Wed Nov 4 23:39:03 GMT 2009

On Nov 4, 2009, at 11:51, Gert Münzel wrote:

> I found  that at some of the ways (which have a filled REF-field) the
> highway-symbol is dropped and only the content of "REF" is shown.
> some examples(i used r1344). I write "_" instead of "real" spaces just
> to make it easier to read:
> if
> "B" is given the result is "B"
> "B1" instead results in  "~[0x06]B1"     (where ~[0x06] represents the
> highway shield)
> "_B_" surprisingly  ends up in "~[0x06]_B_"
> "BW" results in "BW"
> "BW1" results in "BW1"
> "B_W1" results in "~[0x06]BW1"
> "BW;1 " results in "~[0x06]BW;1"
> "BW_1" results in "~[0x06]BW1"  (ok, afaik intermediate spaces has  
> to be
> removed, otherwise only the first part is visible in highway shield)

Try the attached patch. It should resolve these problems. (Of course  
it could also cause unwanted side-effects.)

The patch simply gets rid of the alpha balancing code, removes ALL  
spaces from the ref, and changes ";" characters to "/" characters.

I added the ; to / change, as multiple refs are often thrown together  
in the one ref and separated by ";" chars, such as "B2;B5". I thought  
"B2/B5" looks nicer, but this might not be what you want in your "BW; 
1" example above. If that's the case, it's easy to remove this too.

If the total number of characters in the ref is greater than 8, a  
shield will still not be added.

Cheers

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cg-sign-v1.patch
Type: application/octet-stream
Size: 967 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20091105/0f143fb4/attachment.obj 


More information about the mkgmap-dev mailing list