-
AuthorPosts
-
November 12, 2025 at 09:36 #58499
EmuxParticipantThis works the same way in both Mapsforge and VTM.
Can render theme creators check this discussion and see if Mapsforge needs changes?
Have you seen any problems with the negative rule?
The code for “matchesTags” in negative rule:
– Mapsforge negative rule
– VTM negative rule
Cruiser and Mapsforge developerNovember 12, 2025 at 09:40 #58500
EmuxParticipantNovember 12, 2025 at 13:05 #58501
JohnPercyParticipantAFAIK in Mapsforge,
1. The “~” rule works as intended and as documented
2. The “false” rule will match on any key having the value of “false” which is the case with any other Mapsforge test.
This is an annoyance rather than a useful feature.Voluntary and Velocity themes - https://voluntary.nichesite.org
1 user thanked author for this post.
November 12, 2025 at 14:57 #58502
JohnPercyParticipantOAM maps transform area=no to area=area_no for just this reason (re example given in GitHub discussion)
Voluntary and Velocity themes - https://voluntary.nichesite.org
1 user thanked author for this post.
November 12, 2025 at 19:07 #58503
TobiasKeymasterThanks John! Yes, usually we call it the “common value bug”, and since we’ve been using the workaround (example above) it’s no real issue anymore. Emux, you even talk about it here:
https://www.openandromaps.org/oam-forums/topic/mapsforge-0-5-0#post-3532Developer of Elevate mapstyle
-
This reply was modified 5 months, 1 week ago by
Tobias.
November 14, 2025 at 08:26 #58505
EmuxParticipantI mean do we need changes in Mapsforge code to improve this situation?
– Now it seems that the rule matches when the key is not present or any key has the value “false”.
– While it should match when the key is not present or the specified key has the value “false”?
Cruiser and Mapsforge developerNovember 14, 2025 at 09:36 #58506
JohnPercyParticipantTo be clear, it is exactly the same for *any* key-value pair.
For example, a test on foot=”yes” will match if *any* key for that map item has the value “yes”. The value is not tied to its key but to the map item and thus to *all* keys for that map item.
It is clearly a bug, but one that OAM has worked around satisfactorily. If you correct the bug, it needs to be corrected for all key-value pairs and then map themes will have to be changed extensively.Voluntary and Velocity themes - https://voluntary.nichesite.org
November 14, 2025 at 09:58 #58507
EmuxParticipantThe report was about the negative rule and checking its code could lead to an improvement.
The positive rule already checks the specified key.
Map library is open source, if anyone can also find any improvements in the positive rule code, I can check it.
– Mapsforge positive rule code
Cruiser and Mapsforge developerNovember 14, 2025 at 10:48 #58508
JohnPercyParticipantSorry, I forgot that particular (positive) issue had been dealt with.
As I understand it, the issue now in question is for a test including ~ and other values. A test without ~, for example foot=no, is covered by the positive rule code.
If so, I think the Mapsforge negative code should be amended and I don’t think it would affect my themes.Voluntary and Velocity themes - https://voluntary.nichesite.org
1 user thanked author for this post.
November 14, 2025 at 20:35 #58511
TobiasKeymaster– While it should match when the key is not present or the specified key has the value „false“?
That should be the expected behavior. Any key can be matched with k=”*“ and v=”false”, so in my logic k=”k” and v=”false” should only match k=false.
Fixing this in mapsforge shouldn’t break current themes and the OAM workaround, but is a good idea anyway.Developer of Elevate mapstyle
3 users thanked author for this post.
-
This reply was modified 5 months, 1 week ago by
-
AuthorPosts
- You must be logged in to reply to this topic.