有人熟悉地图吗?
使用地图:苹果原生
我用locationManager:didUpdateLocations: 获取到当前的位置,和地图显示的当前位置不同,有人清楚吗?
我的方法:
#pragma mark - CLLocationManagerDelegate
-(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray<CLLocation *> *)locations
{
[self.locationManager stopUpdatingLocation];
[self.mapView removeAnnotation:self.currentAnno];
//获取当前位置
CLLocation *currentLocation = [locations firstObject];
CLLocationCoordinate2D marsCoor = [Tools marsCoordFromBaiduCoord:currentLocation.coordinate];
self.currentAnno = [[MKPointAnnotation alloc]init];
self.currentAnno.coordinate = marsCoor;
[self.mapView addAnnotation:self.currentAnno];
//NSString *str = [self reverseGeocodeWithCoord:currentLocation.coordinate];
//NSLog(@"didUpdateLocations--%@",str);
}