将GeoPoint转换为位置

时间:2010-08-12 22:44:06

标签: android google-maps geolocation

我知道这是一个非常无聊的问题 - 但是在Android平台上将GeoPoint转换为Location的最佳方法是什么。

1 个答案:

答案 0 :(得分:55)

double latitude = geoPoint.getLatitudeE6() / 1E6;
double longitude = geoPoint.getLongitudeE6() / 1E6;

location.setLatitude(latitude);
location.setLongitude(longitude);