-
Notifications
You must be signed in to change notification settings - Fork 41
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
Access to layer inside HoverTooltip #358
Comments
Hi Sebastien, I had no time to dig very deep but I couldn`t think of a way to obtain the layer easily and I also see no downside from forwarding it to the MapOverlay. |
Hi Felix, thanks for the fast reply, that's perfect, I'll create a small PR shortly to address this... Cheers, |
Implemented in #359 |
Ah good catch, just in case you aren`t aware: You can autoclose issues via commit messages in the respective PRs, see e.g. https://github.blog/2013-01-22-closing-issues-via-commit-messages/ :) |
Hi team,
This is more a question than a real issue I think... this one could be for @fschmenger as he's the man behind the excellent Generalized Feature Hover functionality:
I have a case where the same source (a collection of Feature objects) is assigned to multiple layers each having a different styling function and each showing up different data inside an overlay. The data to be shown is associated with the layers, not the features as those layers are dynamic and created on-the-fly. They are not part of the config file.
To avoid creating multiple HoverTooltip components, I could easily extract the data I want to display depending on the hovered layer. However, there currently is no way to know which layer is hovered inside a
MapOverlay
, only the feature.In the code, the
HoverController
receives feature-layer pairs inside itsdisplayTooltip
function but forwards only the feature to theMapOverlay
afterwards. Would you mind if I open a PR where the layer is forwarded next to the feature to theMapOverlay
or is there another way and I missed something ?Thanks in advance,
Sébastien
The text was updated successfully, but these errors were encountered: