Reputation: 1
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()
}
}
}
Upvotes: 0
Views: 220