IOS MapKit引脚不在当前位置

时间:2013-11-02 13:12:38

标签: ios location mapkit

我想用地图视图显示我当前的位置,我的测试设备是Ipad mini(WIFI,IOS7)。

我在委托方法

中将当前位置更新为我的UIMapView
-(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations

{

CLLocation *currentLocation = [locations lastObject];
MyAnnotation *start = [[MyAnnotation alloc] init];
start.coordinate = currentLocation.coordinate;

[_mapView addAnnotation:start];

MKCoordinateRegion region;
region = MKCoordinateRegionMakeWithDistance(currentLocation.coordinate, 100, 100);

[_mapView setRegion:region animated:YES];

}

但我得到的结果如下图所示,我的当前位置是蓝点,但红色针位于另一个地方。我认为引脚应该与我当前的位置匹配,蓝点。但事实并非如此。有人可以告诉我原因,谢谢。

enter image description here

1 个答案:

答案 0 :(得分:0)

原因是GPS不是100%准确,特别是不在建筑物内