How to capture latitudes and longitudes when I add a marker with a radius circle #448
-
Hello people, I hope you are feeling very well, I wanted to tell you about the situation I am in, at this moment I am working with the react google maps library and I have the following situation, I want to implement in the map that every time the user By clicking on the map in a specific place, a marker or pin is painted, and a circle is shown around it, as we see in the following example: https://visgl.github.io/react-google- maps/examples/geometry. I am faced with what I need, depending on the application I am developing, to be able to send the geo zones or geo fences of the marker that I am adding to a backend, that is, when a user places the marker I can capture the zone of the marker, but depending on the example I pass Previously, nowhere are the latitudes and longitudes of the circle, since the circle is being painted in specific latitudes and longitudes, I don't know if it is clear with my example, I hope you can help me, any example of my code that you need for a possible I will help, I will be willing to show it |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If you need a circle in the form of a polygon, so you have the coordinates along the outside perimeter, you can use a library like turf to compute the points from the center-point and a radius: https://turfjs.org/docs/api/circle |
Beta Was this translation helpful? Give feedback.
If you need a circle in the form of a polygon, so you have the coordinates along the outside perimeter, you can use a library like turf to compute the points from the center-point and a radius: https://turfjs.org/docs/api/circle