logo separator

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

From Joris Bo jorisbo at hotmail.com on Fri May 22 19:52:24 BST 2020

Hi,



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 01D6307A.E3391280]



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:image006.png at 01D6307A.E3391280]

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/53c84853/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 29959 bytes
Desc: image002.jpg
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20200522/53c84853/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 2473 bytes
Desc: image006.png
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20200522/53c84853/attachment-0001.png>


More information about the mkgmap-dev mailing list