Is there an easy way to take in user input through a tap gesture and place a marker in a Map using MapKit?
I am not very experienced in SwiftUI. The only thing that comes to my mind is creating an overlay, detecting the tap position, converting that into map coordinates using map center and span, and then creating a MapPin for that. Only problem is, because of the overlay I can't pan or zoom the map.
I can add drag gestures to the overlay and then pass the translation to map in the form of map center, but that's too much work.
Is there any better way to do this?