google-maps-react icon indicating copy to clipboard operation
google-maps-react copied to clipboard

How do I return the coordinates of my selected polygon?

Open bernalvinicius opened this issue 5 years ago • 0 comments

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:

Screenshot 2020-08-22 at 22 39 59

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.

bernalvinicius avatar Aug 23 '20 08:08 bernalvinicius