I use a react-google-maps and I want to dynamically highlight a country or a subntaional when user click on the map anywhere in the whole world, so I need to get coordinates to draw a polygon, but can't find any service with api for it. What the best way to achieve this?
Asked
Active
Viewed 307 times
2 Answers
-1
I was also searching for this solution. you can use google charts api for above problem.

Salman
- 1
-
1Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 29 '22 at 06:06
-1
Please use this API.
https://nominatim.openstreetmap.org/search.php?q=US&polygon_geojson=1&format=json
It will return multiPolygon array.

cocoa
- 350
- 1
- 2
- 10