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

[Question]: Warning - Many layers next to each other having different filters. #4778

Open
1 task done
aeduard opened this issue Sep 23, 2024 · 2 comments
Open
1 task done
Labels

Comments

@aeduard
Copy link

aeduard commented Sep 23, 2024

What is the question? (in English)

I've read the Help about the checks, and I understand that in many situations it is better to not filter the layer and use the checkboxes. But still, sometimes I want 2 completely new layer from one table, eg. for different popups or other behavior. Or to set visibility differently at map loading.
Right now I can live with this error, as it displays only for admins, but I would like to know the reasoning behind.

Versions, safeguards, check summary etc

Versions :

  • Lizmap Web Client : 3.7.10
  • Lizmap plugin : 4.4.0
  • QGIS Desktop : 3.34.8
  • QGIS Server : 3.34.8
  • Py-QGIS-Server : not used
  • QGIS Server plugin atlasprint : not found
  • QGIS Server plugin lizmap_server : 2.9.4
  • QGIS Server plugin wfsOutputExtension : 1.8.2
List of safeguards :
  • Mode : normal
  • Allow parent folder : no
  • Prevent other drive : yes
  • Prevent PG service : yes
  • Prevent PG Auth DB : yes
  • Force PG user&pass : yes
  • Prevent ECW : yes

Check Lizmap plugin

  • I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed.

Operating system

Ubuntu 22.04

Browsers

Firefox

Browsers version

Firefox 130.0.1 (64-bit)

Relevant log output

No response

@Gustry
Copy link
Member

Gustry commented Sep 24, 2024

Yes, I think we got the discussion with @mdouchin and we have some corner case about this check.

As a "quick workaround", you can do :

l = iface.activeLayer()
l.setCustomProperty("lizmap-plugin-skip-duplicated-layer", "yes")

https://github.com/3liz/lizmap-plugin/blob/d8de1f7516c1563f9faafd22db245de01c4979c4/lizmap/project_checker_tools.py#L328

Side note :

to set visibility differently at map loading.

This would be nice to implement as well, if you want. To read checked categories from the project.

Do you have an idea how to improve this check ?

@aeduard
Copy link
Author

aeduard commented Oct 7, 2024

Thank you for the suggestion regarding the workaround. In my general workflow, I prefer to avoid using too many tables in a database. Instead, I aim to consolidate similar data into a single table. When editing through QGIS or Lizmap, I use filtering within QGIS; otherwise, I create views at the database level.

This would be nice to implement as well, if you want. To read checked categories from the project.
In some cases, definitely, especially for more complex maps. However, it's not an urgent issue for me at the moment.

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

No branches or pull requests

2 participants