-
AuthorPosts
-
August 22, 2024 at 09:21 #56363
Emux
ParticipantI 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 developer3 users thanked author for this post.
August 23, 2024 at 16:34 #56365tartiflette74
ParticipantGreat! 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 at 17:08 #56366Emux
ParticipantNext 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 at 18:34 #56387tartiflette74
ParticipantFrom 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 at 09:20 #56389Emux
ParticipantMaybe 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 at 09:32 #56390Emux
ParticipantLooking 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 -
AuthorPosts
- You must be logged in to reply to this topic.