is it possible, to allow the user updating the marker position like with the MKMarkerAnnotationView.isDraggable attribute available in a MkMapView?
Replies
Did you make any progress with this? I am wondering the same.
-
Unfortunately not. I thinking about having something like an edit mode, where I have the maker fixed at the map center during map movements or I'll stick with the UIKit version of MapKit and hope for iOS 18... or take a look at some of the third party map APIs
Please see my workaround solution here:
-
I am aware, that I can use draggable markers in the UiView API and currently I am using the UIViewRepresentable like you to make use of it in a SwiftUI app. But I hoped that with the new MapKit API for SwiftUI announced at WWDC23 there is a way to have draggable markers natively supported in SwiftUI. Avoiding all the complex coding involved mixing SwiftUI and UIKit.
But from the documentation and the responses here it seems like the markers a fixed in there position.