I am finding current latitude
and longitude
using GPS
(without internet).
Now i want to implement reverse geocoding
using that latitude and longitude through GPS without internet.
I have successfully implemented reverse geocoding with internet connection.
This is my implemented code:-
CLGeocoder * geoCoder = [[CLGeocoder alloc] init];
[geoCoder reverseGeocodeLocation:newLocation completionHandler:^(NSArray *placemarks, NSError *error) {
NSString * location = ([placemarks count] > 0) ? [[placemarks objectAtIndex:0] locality] : @"Not Found";
CLPlacemark *placemark = [placemarks objectAtIndex:0];
NSString *MyAddress = @"";
MyAddress = [[placemark.addressDictionary objectForKey:@"FormattedAddressLines"] componentsJoinedByString:@", "];
NSLog(@"address is %@", MyAddress);
}];
I have searched about this but could not find any solution.
How can i do this?
Thanks.