Betrachte 6 Beiträge - 1 bis 6 (von insgesamt 6)
  • Autor
    Beiträge
  • #56363
    Avatar-FotoEmux
    Teilnehmer

    I implemented the exclusive / except negation rule in Mapsforge themes.
    See the render theme documentation.

    A minus sign „-“ excludes the other values after „|“. It never works alone.

    <!– match tunnel-tag that are not 'no' or 'false' –>
    <rule k="tunnel" v="-|no|false">
    

    It will be available in the next Mapsforge version.


    Cruiser and Mapsforge developer

    • Dieses Thema wurde vor vor 2 Wochen, 3 Tage von Avatar-FotoEmux bearbeitet.
    3 Teilnehmer(n) gefällt dieser Beitrag
    #56365
    tartiflette74
    Teilnehmer

    Great! What will be the the first version number of Mapsforge with this feature? How to check which Mapsforge version is used by a given version of Locus? (any chance it will come to Locus classic?) Thanks!

    #56366
    Avatar-FotoEmux
    Teilnehmer

    Next Mapsforge 0.22.0 will include it.

    Cruiser 5 (Beta) already uses it with the new Motorider theme that is also included in Mapsforge.


    Cruiser and Mapsforge developer

    #56387
    tartiflette74
    Teilnehmer

    From the source code comments, it seems that

    <rule k="tunnel" v="-|no|false">

    matches tunnel tags that are either missing, or neither ’no‘ nor ‚false‘; to only match tags that are present, two embedded rules are required:

    <rule k="tunnel"><rule k="tunnel" v="-|no|false">

    . Is this correct?
    Thanks

    #56389
    Avatar-FotoEmux
    Teilnehmer

    @tartiflette74

    Maybe the source code comment is not written correctly.
    See also how it is described in the render theme documentation.

    More important are real tests. Have you tried and seen anything strange?
    Any particular example that needs improvement?


    Cruiser and Mapsforge developer

    #56390
    Avatar-FotoEmux
    Teilnehmer

    Looking at the VTM themes where we already use this rule, indeed for the described behavior we use 2 nested rules.
    An example is here.

    Copying here the source code comment:
    „‚except negation‘ matches when KEY is present, none items of VALUE is present.
    (can be emulated by <rule k=“a“><rule k=a v=“-|b|c“>…</rule></rule>)“


    Cruiser and Mapsforge developer

Betrachte 6 Beiträge - 1 bis 6 (von insgesamt 6)
  • Sie müssen angemeldet sein, um zu diesem Thema eine Antwort verfassen zu können.