这个是高德地图的回调方法
-(void)mapView:(MAMapView )mapView didUpdateUserLocation:(MAUserLocation )userLocation
updatingLocation:(BOOL)updatingLocation
{
if(updatingLocation)
{
self.lat = userLocation.coordinate.latitude;
self.lon = userLocation.coordinate.longitude;
}
[self.locationManager requestLocationWithReGeocode:YES completionBlock:^(CLLocation *location, AMapLocationReGeocode *regeocode, NSError *error) {
if (regeocode)
{
// NSLog(@"reGeocode:%@%@",regeocode, regeocode.formattedAddress);//地理位置
formattedAddress =regeocode.formattedAddress;
NSString *str = regeocode.number;
NSString *address = [regeocode.street stringByAppendingString:str];
label2.text = address;
}
}];
}
최종적으로 해결됨
으아아아이 방법이 필요하지 않음
__weak WaiQinqiandaoViewController *weakSelf = self;