Hook up route lines to toggle

This commit is contained in:
Garth Vander Houwen 2023-04-25 21:51:57 -07:00
parent 8c01abacce
commit b22cbcbff3

View file

@ -197,6 +197,13 @@ struct MapViewSwiftUI: UIViewRepresentable {
lineIndex = 0
}
}
} else {
// Remove all existing PolyLine Overlays
for overlay in mapView.overlays {
if overlay is MKPolyline {
mapView.removeOverlay(overlay)
}
}
}
//DispatchQueue.main.async {