Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancing the conditional rules #2334

Open
yohanboniface opened this issue Dec 3, 2024 · 0 comments
Open

Enhancing the conditional rules #2334

yohanboniface opened this issue Dec 3, 2024 · 0 comments

Comments

@yohanboniface
Copy link
Member

When making maps recently, I'm using a lot the conditional rules, but I'm facing some limitations that make their use less efficient.

  1. allow conditional rules on a layer, instead of only on the map level

    For example, I'm making a map to prepare a multidays trekking, and I want to have a different colour for each day, so visually I can distinguish one leg to the next and previous:

    Image

    So I've added a colour column, with have odd or even as values, and I'm targeting this to define the colour, red or blue. This is easier than setting the colour on the line element itself, first because I can to this all in the table edit view, and specifically because in case I merge two legs I don't have to go through each element (having a dynamic way to compute odd and even and expose it in the rules, like other extended properties (measure…) , would be fantastic for this use).

    But I don't want my other layers to react to this rule, so it's a bit acrobatic now, as it's important to only make positive rules (key=wanted, vs key!=unwanted), and also it's a bit of a mess to have all rules in the same place.

  2. do not stop on the first matching rule

    Still in this example map, I'd like to have two non exclusive rules: one to define the colour of the path, and the other to set the dash array of the line (which in my example means the path is not official, while the continuous line means it's part of the normal trek).

    I can imagine scenarios where one would prefer to keep this "stop at first match" behaviour (eg. when multiple rules), so we may want to add a global switch for a set of rules "First matching rule" / "All rules", but given this feature is still experimental, and a bit hidden, I'd suggest to switch to "All matching" rules and see how it goes.

  3. allow to target multiple properties

    I've seen a few remarks from users to be able to target multiple properties, something like foo=bar && baz=biz, and maybe foo=bar || baz=biz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant