Display of different pins custom on map SwiftUi (error extra argument)

224 Views Asked by At

I'm trying to display custom pins on my map, only an error appears "extra arguments at postions #7, #8 in call. If anyone can help me I would be grateful! (I'm new to swift)

var body: some View {
   
    VStack {
    if locationManager.location != nil {
        Map(coordinateRegion: $region, interactionModes: .all,  showsUserLocation: true, userTrackingMode: nil, annotationItems: pins,
            annotationContent: { pin in
                MapAnnotation(coordinate: pin.coordinate,
                              content: {
                                PinButtonView(pin: pin)
                              })

            }, annotationItems: pins2,
            annotationContent: { pin in
                MapAnnotation(coordinate: pin.coordinate,
                              content: {
                    PinButtonView2(pin2: pin)
                              })
            }).edgesIgnoringSafeArea(.all)
    } else {
        Text("On te localise BG... attend 2s")
    }
    }
        .onAppear {
            setCurrentLocation()
        }
    
}

}

0

There are 0 best solutions below