let address += "ул. Ленина, 4,Омск, Россия"
let geocoder = CLGeocoder()
geocoder.geocodeAddressString(address, completionHandler: {(placemarks: [AnyObject]!, error: NSError!) -> Void in
if let err = error { println(err.localizedDescription) }
if DEBUG { println(address) }
if let placemark = placemarks?[0] as? CLPlacemark {
let latitude: CLLocationDegrees = placemark.location.coordinate.latitude
let longitude: CLLocationDegrees = placemark.location.coordinate.longitude
}
})
Решение из : stackoverflow.com
Решение из : stackoverflow.com
Комментариев нет:
Отправить комментарий