Closed alexkirillovtech closed 3 years ago
Hi @EnderKir,
Out of the box react-simple-maps does not return the cursor geographic coordinates, but here is an example of how to get the geographic coordinates of the cursor on click.
https://codesandbox.io/s/get-cursor-coordinates-on-click-1-6zqp3?file=/src/MapChart.js
Note that this is a starting point for a solution and currently only works if you are not using ZoomableGroup
. From what I see in your code, you don't seem to be using ZoomableGroup, so this should be ok :)
Hope this solves your problem...
@zimrick Thanks a lot !!!!
Hi, I want to set a Marker on the map where user clicked, may someone help?
My MapChart -
And in console I got a geo.proretries object like :
But I don't know how to get coordinates from this info. Thanks!