google-maps-react
google-maps-react copied to clipboard
How do I return the coordinates of my selected polygon?
Hey guys, I'm using google-maps-react to render an array with several polygons on a map.
When I click on a polygon, I would like it to return all the coordinates for that selected polygon. Can you tell me how I can do that?
Here is a picture of how I am rendering my coordinates on the map:
I would like something else too, if possible, to add a hover event when I hover over each of the polygons. In the same way as this video I found on the internet: https://recordit.co/MciFGBL3b7
Here's my code I put at codesandbox: https://codesandbox.io/s/blissful-herschel-25rsl?file=/src/App.js
Thanks in advance.