-
|
According to the documentation, a negative rule like static class NegativeRule extends Rule {
...
@Override
public boolean matchesTags(Tag[] tags) {
if (!containsKeys(tags))
return true;
for (Tag tag : tags)
for (String value : values)
if (Utils.equals(value, tag.value))
return !exclusive;
return exclusive;
}
}It is clear that any tags are evaluated, not just the specified one(s). |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
|
@andilem I do not understand, what do you mean? Is the documentation somewhere in the code or the guides wrong? See the render theme documentation with its examples: "A tilde "~" matches if the map element does not have a tag with the specified key." <m e="way" closed="no">
<m k="highway" v="motorway">
<m k="tunnel" v="true|yes">
…
</m>
<m k="tunnel" v="~|no|false">
…
</m>
</m>
</m>Also study the rules in the render themes: <!-- match tunnel-tag that are not 'no' or 'false' -->
<m k="tunnel" v="-|no|false">
<!-- match area-tag that are 'no' or 'false' or not present -->
<m k="area" v="~|no|false">VTM rules should work exactly like the Mapsforge rules that have been in use for a long time. |
Beta Was this translation helpful? Give feedback.
-
|
Yes, the VTM rules work like the Mapsforge rules. <!-- match area-tag that are 'no' or 'false' or not present -->
<m k="area" v="~|no|false">so I expect this rule to match elements with no tag "area", with tag "area"="no" and with tags "area"="false". |
Beta Was this translation helpful? Give feedback.
-
|
https://www.openandromaps.org/en/oam-forums/topic/negative-rule-in-render-themes |
Beta Was this translation helpful? Give feedback.
-
|
I created pull requests in Mapsforge and VTM repositories. See the change and if the negative rule works properly now. |
Beta Was this translation helpful? Give feedback.
I created pull requests in Mapsforge and VTM repositories.
See the change and if the negative rule works properly now.
Mapsforge: mapsforge/mapsforge#1755
VTM: #1270