这个是高德地图的回调方法
-(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;