Convert GeoPoint to Location

筅森魡賤 提交于 2019-11-27 05:46:32

问题


I know this is a very noobish question -- but what is the best way to convert a GeoPoint to a Location on the Android platform.


回答1:


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

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


来源:https://stackoverflow.com/questions/3472603/convert-geopoint-to-location

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!