Hi, I am learning about MapKit for SwiftUI, at first I created the MKMapItem
@State private var mapSelection: MKMapItem?
@State var starbucksReserve = MKMapItem(placemark: .init(coordinate: CLLocationCoordinate2D(latitude: 41.894178596474575, longitude: -87.62451598445733)))`
I put that in the Map
Map(position: $cameraPosition,selection: $mapSelection){
Marker("Starbucks Reserve", systemImage: "cup.and.saucer.fill" ,coordinate: starbucksReserve.placemark.coordinate)
}
Even though I have put the selection $mapSelection, my Marker is not selectable. I am not sure why. I tried to fix it by changing mapSelection to Int? and made a tag for Marker, but because I am learning how to use it so I want to make sure why marker cannot be selectable with the first approach?
Thank you