- AutorBeiträge
- August 22, 2024 um 09:21 Uhr #56363EmuxTeilnehmer
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 Emux bearbeitet.
3 Teilnehmer(n) gefällt dieser Beitrag
August 23, 2024 um 16:34 Uhr #56365tartiflette74TeilnehmerGreat! 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!
August 23, 2024 um 17:08 Uhr #56366EmuxTeilnehmerNext 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 developerSeptember 3, 2024 um 18:34 Uhr #56387tartiflette74TeilnehmerFrom 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?
ThanksSeptember 4, 2024 um 09:20 Uhr #56389EmuxTeilnehmerMaybe 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 developerSeptember 4, 2024 um 09:32 Uhr #56390EmuxTeilnehmerLooking 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 - AutorBeiträge
- Sie müssen angemeldet sein, um zu diesem Thema eine Antwort verfassen zu können.