You can try init(position: Binding<MapCameraPosition>) initializer of Map struct, API Doc
import MapKit
struct MapView: View {
@State private var cameraPosition = MapCameraPosition.region(MKCoordinateRegion(
center: CLLocationCoordinate2D(latitude: 34.011_286, longitude: -116.166_868),
span: MKCoordinateSpan(latitudeDelta: 0.2, longitudeDelta: 0.2)
))
// The error happens here!
var body: some View {
Map(position: $cameraPosition)
}
}
#Preview {
MapView()
}