This is my SwiftUI test code to draw an interactive polygon on a Map.
To add a new polygon, click the Add button then click the map to add points.
You need at least 3 points to form a polygon.
Click the Add button again to deactivate adding more points.
Tip, it is often easier to just roughly put a number of points on the map, then edit the markers positions by dragging the polygon handles.
To edit a polygon, click the Edit off button, it turns red and becomes Edit on.
Then click the desired polygon handle on the map, it turns green.
Then drag the handle to the desired position.
To exit editing, click on the Edit on button.
To delete the polygon, click the Delete button.
rotation and translation (Turn and Move)