Verified Commit f90915a4 authored by asahiocean's avatar asahiocean 🚀
Browse files

CLL2DIsValid = CLLocationCoordinate2DIsValid

parent 1d514cf9
...@@ -50,7 +50,8 @@ extension ViewController: ModelDelegate { ...@@ -50,7 +50,8 @@ extension ViewController: ModelDelegate {
} }
func createRouteTo(from: CLLocationCoordinate2D, to: CLLocationCoordinate2D) { func createRouteTo(from: CLLocationCoordinate2D, to: CLLocationCoordinate2D) {
if CLLocationCoordinate2DIsValid(from) && CLLocationCoordinate2DIsValid(to) { let CLL2DIsValid = CLLocationCoordinate2DIsValid
if CLL2DIsValid(from) && CLL2DIsValid(to) {
let directionRequest = MKDirections.Request() let directionRequest = MKDirections.Request()
directionRequest.source = .init(placemark: .init(coordinate: from)) directionRequest.source = .init(placemark: .init(coordinate: from))
directionRequest.destination = .init(placemark: .init(coordinate: to)) directionRequest.destination = .init(placemark: .init(coordinate: to))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment