Created
September 23, 2014 13:52
-
-
Save neiraza/bd8528d374270d3bb5e6 to your computer and use it in GitHub Desktop.
位置情報から住所を検索する
This file contains hidden or 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
- (void)reverseGeocoder:(CLLocation *)location { | |
CLGeocoder *geocoder = [[CLGeocoder alloc] init]; | |
[geocoder reverseGeocodeLocation:location | |
completionHandler:^(NSArray* placemarks, NSError* error) { | |
for (CLPlacemark *placemark in placemarks) { | |
NSLog(@"addressDictionary : %@", [placemark.addressDictionary description]); | |
NSLog(@"name : %@", placemark.name); | |
NSLog(@"thoroughfare : %@", placemark.thoroughfare); | |
NSLog(@"subThoroughfare : %@", placemark.subThoroughfare); | |
NSLog(@"locality : %@", placemark.locality); | |
NSLog(@"subLocality : %@", placemark.subLocality); | |
NSLog(@"administrativeArea : %@", placemark.administrativeArea); | |
NSLog(@"subAdministrativeArea : %@", placemark.subAdministrativeArea); | |
NSLog(@"postalCode : %@", placemark.postalCode); | |
NSLog(@"ISOcountryCode : %@", placemark.ISOcountryCode); | |
NSLog(@"country : %@", placemark.country); | |
NSLog(@"inlandWater : %@", placemark.inlandWater); | |
NSLog(@"ocean : %@", placemark.ocean); | |
NSLog(@"areasOfInterest : %@", placemark.areasOfInterest); | |
} | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment