Android:根据距离和方位查找目标位置

时间:2018-06-29 11:55:46

标签: android dictionary location

对于我的Android应用,我正在寻找Google的API,以获取提供的距离和方位的目的地/终点位置。我尝试了以下2种方法:

1.使用SphericalUtil:

SphericalUtil.computeOffsetOrigin(startLocation, distance, bearing);
  1. 使用OsmDroid:

    GeoPoint startLocation = ...;
    
    startLocation.destinationPoint(distance, bearing);
    

它们适用于较小的距离,但对于大于几公里的距离,它们与Google Earth的值有很大不同。我相信这是由于他们考虑的地球半径不同,因为半径在全球范围内是不一致的。

那么,有没有获取目的地位置的Google Maps API?我相信它将与Google Earth应用程序保持一致。

0 个答案:

没有答案
相关问题