- (void)reGeocodeAction { self.locationManager = [[AMapLocationManager alloc] init]; self.locationManager.delegate = self; NSLog(@"22222"); [self.locationManager setDesiredAccuracy:kCLLocationAccuracyHundredMeters]; [self.locationManager requestLocationWithReGeocode:YES completionBlock:^(CLLocation *location, AMapLocationReGeocode *regeocode, NSError *error) {
if (error) { NSLog(@"locError:{%ld - %@};", (long)error.code, error.localizedDescription);
if (error.code == AMapLocationErrorLocateFailed) { return; } }
NSLog(@"location:%@", location); if (regeocode) { NSLog(@"reGeocode:%@", regeocode.formattedAddress); } }]; }
|