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

Display only selection for active layer in infowindow #1836

Closed
jokd opened this issue Sep 25, 2023 · 3 comments · Fixed by #1846
Closed

Display only selection for active layer in infowindow #1836

jokd opened this issue Sep 25, 2023 · 3 comments · Fixed by #1846

Comments

@jokd
Copy link
Contributor

jokd commented Sep 25, 2023

Is your feature request related to a problem? Please describe.
It can be hard to see what features belong to a certain layer when selecting features from multiple layers, eg when a layer has "imageFeatureInfoMode": "always" and is always queryable.

Describe the solution you'd like
A setting to only show the infowindows active layer. In case of listLayout: true perhaps only show features in groups that are expanded? Or toggle the groups so that only one can be expanded.

Describe alternatives you've considered
A new selection style for features in layers that are not active in the infowindow.

Additional context
listLayout:false
image

"listLayout": true
image

@jokd
Copy link
Contributor Author

jokd commented Sep 27, 2023

Any opinions on this? Or a preferrable solution? Otherwise I will probably solve this in some way and make it opt-in.

@jokd
Copy link
Contributor Author

jokd commented Sep 29, 2023

I have come up with a solution for this that sets a property for each feature to be considered when styling the layers. That way there are three different styles for a feature; selected, inActiveLayer and highlighted. That way features in a layer that is not active can be styled with nothing and that way invisible.
ezgif com-resize

However the way the different states are handled today is about to be rewritten due to a bug, #1773. I will push my PR but set it as draft.

@jokd
Copy link
Contributor Author

jokd commented Sep 29, 2023

One downside with propsed solution (and the state used today as well) using properties for features is that they will follow along when exporting the layers unless explicitely removed.

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

Successfully merging a pull request may close this issue.

1 participant