【问题标题】:Getting the location from a lat/lon parameter从 lat/lon 参数获取位置
【发布时间】:2012-10-10 08:51:55
【问题描述】:

正在研究使用手机定位服务的应用程序,据我了解,当前位置以纬度/经度返回。

将其转换为位置和/或找到最近的“邮局”(例如他们所在的位置)的最佳方法是什么?

我知道您可以将纬度/经度传递给谷歌地图 API 并获取位置,但这是最好的方法还是有更好的方法?

【问题讨论】:

标签: android ios cocoa-touch geolocation


【解决方案1】:

看看GeoCoder 和方法getFromLocation

【讨论】:

    【解决方案2】:

    试试这个代码:

    // 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);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-20
      • 2018-09-05
      • 1970-01-01
      • 2012-04-22
      相关资源
      最近更新 更多