0

現在の場所を表示するマップ ビューを使用したいのですが、テスト デバイスは 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];

}

しかし、下の写真のような結果が得られます。現在の場所は青いポイントにありますが、赤いピンは別の場所にあります。ピンは私の現在の位置、青い点と一致するはずです。しかし、そうではありませんでした。誰か理由を教えてくれませんか、ありがとう。

ここに画像の説明を入力

4

1 に答える 1

0

その理由は、GPS が 100% 正確ではなく、特に建物内ではないためです。

于 2013-11-02T15:37:57.367 に答える