Skip to content

workingDog/MapPoly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Draw a polygon on SwiftUI Map

This is my SwiftUI test code to draw an interactive polygon on a Map.

Usage

Add

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.

Edit

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.

Delete

To delete the polygon, click the Delete button.

Todo

rotation and translation (Turn and Move)

About

An interactive polygon on a SwiftUI Map

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages