Android 从lat/lon参数获取位置

Android 从lat/lon参数获取位置,android,ios,cocoa-touch,geolocation,Android,Ios,Cocoa Touch,Geolocation,查看使用手机定位服务的应用程序,据我所知,当前位置以lat/lon返回 最好的方法是什么,将其转变为一个位置和/或找到最近的“邮局”,例如他们所在的位置 我知道您可以将lat/lon传递到google maps API并获取位置,但这是最好的方法还是有更好的方法?请查看方法和getFromLocation尝试以下代码: // create geo point GeoPoint point = new GeoPoint((int) (lattitude * 1E6), (int) (longitu

查看使用手机定位服务的应用程序,据我所知,当前位置以lat/lon返回

最好的方法是什么,将其转变为一个位置和/或找到最近的“邮局”,例如他们所在的位置

我知道您可以将lat/lon传递到google maps API并获取位置,但这是最好的方法还是有更好的方法?

请查看方法和getFromLocation

尝试以下代码:

// create geo point
GeoPoint point = new GeoPoint((int) (lattitude * 1E6), (int) (longitude * 1E6));
// get the MapController object
MapController controller = mapview.getController();
// animate to the desired point
controller.animateTo(point);

你可以使用谷歌[library][1],或者你仍然可以使用你能找到的任何api[1]: