Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CLGeocoder *geocoder = [[CLGeocoder alloc] init];
- CLLocation *loc = [[CLLocation alloc] initWithLatitude:
- 37.712900 longitude:-122.452020];
- [geocoder reverseGeocodeLocation:loc
- completionHandler:^(NSArray *placemarks, NSError *error)
- {
- [self.indicator hide:YES];
- if(placemarks != nil)
- {
- if (placemarks.count == 1)
- {
- CLPlacemark *place = [placemarks objectAtIndex:0];
- NSString *road = [place.addressDictionary objectForKey:@"Thoroughfare"];
- NSLog(@"%@", road);
- // Get road geo points
- }
- }
- else
- {
- [Utilities alertDisplay:APP_NAME message:@"Unable to locate the location"];
- }
- }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement