Skip to content

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

@MattiasSp

Description

@MattiasSp

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

Metadata

Metadata

Assignees

Labels

bugMay be fixed by a core developer

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions