Created
July 20, 2017 13:05
-
-
Save keitaoouchi/0f5ff509980c09bf5694ff8189b894fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func reverseGeocoding(location: CLLocation) { | |
let geocoder = CLGeocoder() | |
geocoder.reverseGeocodeLocation(location) { (placemarks, _) -> Void in | |
guard let placemarks = placemarks, !placemarks.isEmpty else { return } | |
if let placemark = placemarks.first { | |
log.debug(placemark) | |
} | |
} | |
/* | |
Optional(渋谷2丁目21番12号, 〒150-0002, 東京都渋谷区, 渋谷2丁目21番12号 @ <+35.65911670,+139.70329530> +/- 100.00m, region CLCircularRegion (identifier:'<+35.65911670,+139.70329530> radius 70.87', center:<+35.65911670,+139.70329530>, radius:70.87m)) | |
*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment