Closed isabellachen closed 4 years ago
Does this solve the problem? Note, I used the same approach as the geographies example (as you mentioned), but I replaced react-simple-maps v0.12
with v1
. The older version will not be able to do this in the same way.
Yep, its working with the v1 beta version!
I'm having a really hard time achieving a hover on the markers. My first approach was with react-tooltip, based of the example with the hover for the countries. The only difference is that I want the tooltip to be shown when hover over the marker. But hovering over the marker does not trigger update of ReactTooltip.
I then try to get the position of the marker with a ref, but it, being an svg element, does not have an offsetTop. You can check out my attempts in this codesandbox.
Can anyone give me an idea of how I can achieve a tooltip on hover of the marker?
Thanks!