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

Corrected InfoClick bug when using MeasureTool afterwards #419

Merged
merged 4 commits into from
Oct 2, 2024

Conversation

sronveaux
Copy link
Collaborator

Since addition of #367, after InfoClick was opened, using some other tools like MeasureTool would break at first click on the map.
This is linked to the fact that the geometry drawn by the measure tool (points and lines) are returned by forEachFeatureAtPixel. However, those aren't linked to any layer which made viewProps fail in this case.

To correct it, features which are not assigned to a layer are not kept by forEachFeatureAtPixel.

This PR also corrects another linked bug where the map click event was not unregistered properly when InfoClick component was closed. This was apparently reported some time ago. So this also fixes #285

Copy link
Collaborator

@chrismayer chrismayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch @sronveaux! Thanks for tackling these 2 problems at once.

Tested and reviewed ➡️ LGTM ➡️ please merge at will 👍

@sronveaux sronveaux merged commit 0f3b4eb into wegue-oss:master Oct 2, 2024
1 check passed
@sronveaux sronveaux deleted the infoclick-mapclick-bug branch October 2, 2024 12:51
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.

InfoClickWin: Unregistering of listeners not working
2 participants