如何获得纬度和经度小数后面的13个数字

时间:2012-04-20 12:18:38

标签: android google-maps gps

我使用以下方法获取当前的纬度&经度:

 locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
            if (locationManager == null) {
                Toast.makeText(LocationsListActivity.this,
                        "Location Manager Not Available", Toast.LENGTH_SHORT)
                        .show();
            }
            location = locationManager
                    .getLastKnownLocation(LocationManager.GPS_PROVIDER);
            if (location == null)
                location = locationManager
                        .getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
            if (location != null) {
                double lat = location.getLatitude();
                    double lng = location.getLongitude(); 

但是我得到的lat和lng的问题只有小数点后面的8个数字(lat:52.51491445,lng:13.39044515) 我想要的是我得到的lat和lng在十进制后面有13个数字。

我该怎么做? 感谢

1 个答案:

答案 0 :(得分:1)

您可以查看标准的setAccurary()方法和setPowerRequirement()方法。