Hello, I can’t seem to call this function anywhere in my code. I get this error: Function declares an opaque return type, but has no return statements in its body from which to infer an underlying type when I place it like this:
var body: some View {
findLocations()
VStack {
MapView(myValue: myValue)
Spacer()
func findLocations() {
let myCount = myLocations.count
// if myCount <= 1 {return mapView}
for myLocation in myLocations {
if (myLocation.date! >= WeeklySpan(increment: myValue) && myCount >= 1 ){
detailArray.append(myLocation.detail!)
coordArray.append([myLocation.latitude, myLocation.longitude])
}
}
}