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

Bug: Nothing happens when clicking two layers with the same featureinfoLayer set #2130

Open
MattiasSp opened this issue Jan 21, 2025 · 0 comments
Assignees
Labels
bug May be fixed by a core developer

Comments

@MattiasSp
Copy link
Contributor

Description
When using the featureinfoLayer property on a layer, we might end up with the same layer being queried more than once.

Currently, if a layer is queried an even number of times, the features will be selected and then deselected again ending up with no selection. To the user, nothing at all seems to happen.

To Reproduce

  1. Configure a reference layer reference_layer with "visible": false
  2. Configure two layers to be clicked, layer1 and layer2, with "visible": true
  3. Set "featureinfoLayer": "reference_layer" on layer1 and layer2.
  4. Open the map and click a feature
  5. Nothing happens

Expected behavior
If a layer's info is asked for by multiple visible layers, only one request and only one selection toggle should occur.

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Version 131
@Flodkvist Flodkvist added the bug May be fixed by a core developer label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug May be fixed by a core developer
Projects
None yet
Development

No branches or pull requests

2 participants