logo separator

[mkgmap-dev] Extra leading character after assiging highway shield

From Joris Bo jorisbo at hotmail.com on Fri May 22 20:13:30 BST 2020


In addition to my previous mail,
I think I found the answer myself, when removing the character from the mkgmap:label:1 value (it was )
my highwayshield is gone as well 😊
I guess its just the way things are ‘solved’ by garmin and I better leave it that way?

Kind regards,

Van: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> Namens Joris Bo
Verzonden: vrijdag 22 mei 2020 20:52
Aan: Development list for mkgmap <mkgmap-dev at lists.mkgmap.org.uk>
Onderwerp: [mkgmap-dev] Extra leading character after assiging highway shield


For a long time I  have seen a leading (space like?) character in front of $Ref which is not there in the osm source.

Today I have been chasing the thing trying to finally solve my style-bug, but now I get stuck thinking it looks like the highwayshield assignment is adding it.

I studied the manuals around the addlabel command and the mkgmap:label:1 fields but I’m not sure if it is a known side effect

I think I can easily fix it after the assignment.

I switched to the default style and find the same behavior.

[cid:image002.jpg at 01D6307D.D58189D0]

In the finalize section of lines the highway shields are calculated

The yellow stuf is my debug comment, the green stuf is the default style, the blue stuf is the echotags result

#--------- DEBUG

highway = * {set jba1 = '$(mkgmap:label:1)' ; set jba2 = '$(mkgmap:label:2)' ; set jba3 = '$(ref)'  ; set jba4 = '$(name)' }

              Jba1=empty                        = mkgmap:label:1
             Jba2=empty                        = mkgmap:label:2
jba3=N184                          = $ref
jba3=Luitenant Lippenslaan   = $name

# Display highway shield for mayor roads if they have a ref and make them searchable by their name

(highway=motorway | highway=trunk)     & ref=* {name '${ref|highway-symbol:hbox}'; addlabel '${name}'}

highway=primary                        & ref=* {name '${ref|highway-symbol:box}' ; addlabel '${name}'}

(highway=secondary | highway=tertiary) & ref=* {name '${ref|highway-symbol:oval}'; addlabel '${name}'}

#--------- DEBUG

highway = * {set jbb1 = '$(mkgmap:label:1)' ; set jbb2 = '$(mkgmap:label:2)' ; set jbb3 = '$(ref)'  ; set jbb4 = '$(name)' }


            I pasted a picture because it visualize the hidden character suddenly appear in front of mkgmap:label:1

            [cid:image004.png at 01D6307D.D58189D0]

name=* {name '${name}'}

highway=* & ref=* & highway!=motorway & highway!=trunk & highway!=primary & highway!=secondary & highway!=tertiary

    {addlabel '${ref}'}

highway = * & osmid() = 272407046 {echotags 'looking for prefix'}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20200522/5cdc8e69/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 29655 bytes
Desc: image002.jpg
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20200522/5cdc8e69/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 18032 bytes
Desc: image004.png
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20200522/5cdc8e69/attachment-0001.png>

More information about the mkgmap-dev mailing list