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

layer plugin improve - show each rule of the layer with its symbology #364

Open
patricev opened this issue Feb 13, 2025 · 8 comments
Open

Comments

@patricev
Copy link

Hi community,

I'm sending you a ticket to provide you with user feedback that I may have received regarding the layer management plugin. They expect to have a more faster interaction with the layers and the associated legend.

Summarizing their needs, the improvement could be as described below.

when I setup a layer with rule bases symbology like this :

Image

I would expect (in a perfect world..) to view it like that in qwc2 (in fact like in qgis desktop):

Image

So I can :

  • easily read the legend
  • toggle visibility of each rule of my rule based layer.

I imagine its not a little work, but if done, many users i'm working with would be happy.

Regards

@manisandro
Copy link
Member

@patricev
Copy link
Author

@manisandro

Great, thank you for your answer, we'll test it as soon as we can. Do you have somme screenshots to see what it will look like ?

@manisandro
Copy link
Member

The categories will just appear as regular sublayers in the layertree.

@patricev
Copy link
Author

patricev commented Feb 13, 2025

Ok, then the remaining part of the ticket is : is it planed to show the legend within the layer plugin as a clearly lisible icon (at least for layer with unique style / non ruled based) and not as an image with hover (that contains multiple times the layer name ) ?

actual
Image

wish

Image

Thx

@manisandro
Copy link
Member

You can control this by specifying extraLegendParameters [1] in the theme configuration.

[1] https://qwc-services.github.io/master/configuration/ThemesConfiguration/#manual-theme-configuration

@patricev
Copy link
Author

@manisandro Many thx for those tips. Eager to test it.

@patricev
Copy link
Author

Hi,

I keep you informed of our progress.

The good part :

  • the categorized layer work fine
  • we can modifiy the legend, and the experience is better ; )

But :

  • the categorized layer doesn't work anymore if they are other "bad layers" in the qgis project. In our case, if there is a WMS layer, or a "bad layer" (eg not available in the db), then the categorized layer doesn't work. It seems that the error is line 38. We have to make a try/catch to keep qwc2 working, but the categorization algorithm still doesn't work if we do that : /

Image

  • Also, if we've got a temporal layer , and we want to "categorize" it, then the categorized layers don't heritate of the temporal parameters.

  • Finaly, when we categorize the layers, and that we modifiy the getlegendgraphic , we've got a single symbol in the legend like above. Is there a way to "center" it so that it could be feeled more "clean" for the user ?

Image

Many thx

@manisandro manisandro transferred this issue from qgis/qwc2-demo-app Mar 6, 2025
@manisandro
Copy link
Member

Regarding the legend, you could use the legend service to provide custom legend images. Or play with the extraLegendParameters in the theme configuration.

Regarding the other points, yes the plugin might need some improvements to cover those cases. PRs welcome!

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

No branches or pull requests

2 participants