I’m using the Google Maps DrawingManager in a React application to allow users to draw polygons on a map. I need to keep track of the points as the user is drawing the polygon, not just after the polygon is complete.
I have set up the DrawingManager to handle polygon drawing, but I’m having trouble tracking each point as it is clicked in real-time. The onPolygonComplete event only provides the full array of points after the drawing is finished, but I need to monitor the points dynamically as the polygon is being drawn.
i have tried with refs, on load, insert at but none worked
Arber Testing is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.