Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
asahiocean
SZRCAI
Commits
f90915a4
Verified
Commit
f90915a4
authored
Jul 05, 2021
by
asahiocean
🚀
Browse files
CLL2DIsValid = CLLocationCoordinate2DIsValid
parent
1d514cf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
SZRCAI/SZRCAI/Main code/Controllers/ViewController/Delegates/ModelDelegate+ViewController.swift
View file @
f90915a4
...
@@ -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
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment