Hi Enrico, if you add the echotags statements as I have proposed you'll find that your style doesn't apply the first rule in lines to https://www.openstreetmap.org/way/304455618 because the rules in relations do not match. Attached is the modified lines file and the output using the command java -jar mkgmap.jar --route --style-file=mystyles\test test.osm 2> log.txt
Gerd ________________________________________ Von: mkgmap-dev <[email protected]> im Auftrag von demon.box <[email protected]> Gesendet: Montag, 27. November 2017 11:29:16 An: [email protected] Betreff: Re: [mkgmap-dev] element type definition as variable Hi Gerd, thanks very much for your attention and patience... ;-) I'm testing this 3 ways: Via Ermanno Margheriti http://www.openstreetmap.org/way/301439666 Via Maniva http://www.openstreetmap.org/way/304137562 Via Trento http://www.openstreetmap.org/way/304455618 This is my only simply style for this test: lines ===== highway=* & name=* & (route_name=* | ref=*) {name '${name}'} [0x09 road_class=0 road_speed=1 resolution 24 continue] highway=* & route_type ~ '.*hiking.*' {name '${route_ref1|highway-symbol:oval} ${route_name}' | '${route_ref1|highway-symbol:oval}' | '${route_name}'} (highway=secondary | highway=secondary_link) & surface=asphalt {name '${ref|highway-symbol:hbox} ${route_name}' | '${ref|highway-symbol:hbox}'} [0x04 road_class=2 road_speed=2 resolution 22 continue] <finalize> name=* {name '${name}'} relations ===== type=route & (route=hiking) { apply { set route_type='$(route_type), ${route}' | '${route}'; set route_ref1='$(route_ref1), ${ref}' | '${ref}'; set route_name='$(route_name) | ${name}' | '${name} (${alt_name})' | '${name}' } } and this is the result with --preserve-element-order option: Via Ermanno Margheriti <http://gis.19327.n8.nabble.com/file/t339261/1.jpg> Via Maniva <http://gis.19327.n8.nabble.com/file/t339261/2.jpg> Via Trento <http://gis.19327.n8.nabble.com/file/t339261/3.jpg> and this is the result without --preserve-element-order option: Via Ermanno Margheriti <http://gis.19327.n8.nabble.com/file/t339261/1b.jpg> Via Maniva <http://gis.19327.n8.nabble.com/file/t339261/2b.jpg> Via Trento <http://gis.19327.n8.nabble.com/file/t339261/3b.jpg> Finally I mean... how can I display the name always for first? THANKS. --enrico -- Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html _______________________________________________ mkgmap-dev mailing list [email protected] http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
lines
Description: lines
Way 301439666 [highway=secondary, name=Via Ermanno Margheriti, oneway=no, ref=SPBS345, route_name=Sentiero Brigata Fiamme Verdi Ermanno Margheriti, route_ref1=7, route_type=hiking, surface=asphalt] h11 Way 301439666 [highway=secondary, mkgmap:label:1=7 Sentiero Brigata Fiamme Verdi Ermanno Margheriti, name=Via Ermanno Margheriti, oneway=no, ref=SPBS345, route_name=Sentiero Brigata Fiamme Verdi Ermanno Margheriti, route_ref1=7, route_type=hiking, surface=asphalt] h12 Way 301439666 [highway=secondary, mkgmap:label:1=7 Sentiero Brigata Fiamme Verdi Ermanno Margheriti, name=Via Ermanno Margheriti, oneway=no, ref=SPBS345, route_name=Sentiero Brigata Fiamme Verdi Ermanno Margheriti, route_ref1=7, route_type=hiking, surface=asphalt] h21 Way 304137562 [highway=secondary, name=Via Maniva, oneway=no, ref=SPBS345, route_name=Sentiero Brigata Fiamme Verdi Ermanno Margheriti, route_ref1=7, route_type=hiking, surface=asphalt] h11 Way 304137562 [highway=secondary, mkgmap:label:1=7 Sentiero Brigata Fiamme Verdi Ermanno Margheriti, name=Via Maniva, oneway=no, ref=SPBS345, route_name=Sentiero Brigata Fiamme Verdi Ermanno Margheriti, route_ref1=7, route_type=hiking, surface=asphalt] h12 Way 304137562 [highway=secondary, mkgmap:label:1=7 Sentiero Brigata Fiamme Verdi Ermanno Margheriti, name=Via Maniva, oneway=no, ref=SPBS345, route_name=Sentiero Brigata Fiamme Verdi Ermanno Margheriti, route_ref1=7, route_type=hiking, surface=asphalt] h21 Way 304455618 [highway=secondary, name=Via Trento, oneway=no, ref=SPBS345, surface=asphalt] h21
_______________________________________________ mkgmap-dev mailing list [email protected] http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
