0

在 iOS 中,当使用 CLLocationManager 获取设备的坐标时,纬度和经度在点后以小数点后六位给出。我看到了一个应用程序,它可以为您提供小数点后 13 位的坐标。这怎么可能?更改 requiredAccuracy 属性没有帮助。

4

2 回答 2

0

地球表面的一个等级约为 111 公里。111*10^-6是0.000111km,即11cm。大多数 GPS 接收器的精度为 10m。某些程序可能显示 13 位小数的事实并不意味着该程序真的以这种精度测量了坐标。所以,6位数绰绰有余。

于 2012-10-21T13:23:14.213 回答
0

但是如果你想尝试更长的纬度和经度,只需改变你的浮点数。即,这将是小数点后 10 位。错误仍然会显示 +/- 5m。玩得开心。

if (currentLocation != nil) {
    _latitudeLabel.text = [NSString stringWithFormat:@"%.10f", currentLocation.coordinate.longitude];
    _LongitudeLabel.text = [NSString stringWithFormat:@"%.10f", currentLocation.coordinate.latitude];
}
于 2017-08-19T20:19:11.813 回答