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

fix: Adding layers to map without overlays #2097

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jokd
Copy link
Contributor

@jokd jokd commented Dec 6, 2024

Fixes #2095

@Grammostola
Copy link
Contributor

I'm having difficulties reproducing the issue.
If I
-Create a map with groups but no layers except background layers
-Add a layer with the API or Layermanager plugin

Then what appears are the groups. (A map with groups beside "background" (and root) shows no groups if no layers are present. The groups appear when layers are added and disappear when layers go missing again. This appears the same with your proposed change. )

What am I missing?

@jokd
Copy link
Contributor Author

jokd commented Dec 11, 2024

I'm having difficulties reproducing the issue. If I -Create a map with groups but no layers except background layers -Add a layer with the API or Layermanager plugin

Then what appears are the groups. (A map with groups beside "background" (and root) shows no groups if no layers are present. The groups appear when layers are added and disappear when layers go missing again. This appears the same with your proposed change. )

What am I missing?

Looked at my config and the legend option "visibleLayersControl": true is apparently needed to mess it up.

@Grammostola
Copy link
Contributor

Right, that and reproducing it in the correct version (current Origo master) made the reported issue reproducible (the groups show initially then disappear when a layer is added and the added layer isn't seen either in the legend. Hitting the visible layers control button twice seemingly remedies the situation. )

I'm not getting this PR to run so well. Unless "visibleLayersViewActive": true (it defaults to false) it crashes on start. If "visibleLayersViewActive": true then the groups aren't visible on start, they do appear after a layer is added but then the legend looks a bit glitchy.

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

Successfully merging this pull request may close these issues.

Error when adding layers to map without overlays
2 participants