我现在有此代码来更新和保存用户在阵列上的位置,如何识别用户是否在收费/高速公路上?
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
let userLocation: CLLocation = locations[0] as CLLocation
userLocationForDirections = locations[0] as CLLocation
manager.startUpdatingLocation()
var userLatitude = (userLocation.coordinate.latitude)
var userLongitude = (userLocation.coordinate.longitude)
userMoves = [userLatitude, userLongitude]
}