logo separator

[mkgmap-dev] Different length of name dependent on zoom level

From Felix Hartmann extremecarver at googlemail.com on Fri Apr 23 18:11:20 BST 2010

There are some special codes that one can use to have zoom dependent 
length of labels in maps:
"{2" - Non-spacing prefix indicator.
"{3" - Prefix indicator.
"{4" - Non-spacing suffix indicator.
"{5" - Suffix indicator.

So for example we have a road called B51 (from the ref field) and 
Streetname (from the name field). Ideally we could now write in the 
style-file:
{ set name='{3{$ref}{$name}' } however mkgmap does not correctly enact 
this and removes the leading"{" so instead of shortening the name, I end 
up with useless "2", "3", "4" and "5" inside the names.

name: Brucker Ersatzstrasse
ref: 335

rule: {name '{3${ref|highway-symbol:oval:6:4}{5${name}' | 
'${ref|highway-symbol:oval:6:4}' | '${name}'}

i.e. instead of the following label being encoded like this: {3B335 
{5BRUCKER ERSATZSTRASSE
it ends up like this: 3~[0x2f]B335 5BRUCKER ERSATZSTRASSE



More information about the mkgmap-dev mailing list