计算从起点到终点的纬度和经度 [英] Calculation for latitude and longitude from start to destination point
问题描述
您好我是android开发新手。
我在大学项目中,它基于需要在两点之间找到经纬度列表的位置。
给定起始位置为12.990143,80.215784,目标位置为12.992595,80.217618。
在过去的几天里,我搜索谷歌,我发现很多链接,以找到位置和中点之间的距离。我无法找到解决我的问题的方法。
请为这个问题提出一些解决方案。我正在努力寻找解决方案。
在此先感谢
您可以使用 SphericalUtil.interpolate 方法例如,您可以找到一个 LatLng $ / $> c $ c>即在你的出发位置和目的地之间的距离的1/5处做
LatLng origin = new经纬度(12.990143,80.215784);
LatLng目的地=新LatLng(12.992595,80.217618);
LatLng结果= SphericalUtil.interpolate(origin,destination,0.2);
Hi I am new to android development.
I am on college project its based on location which is need to find list of latitude and longitude in between two points. Given Starting position is 12.990143,80.215784 and destination position is 12.992595,80.217618.
Over the past days i search the google, i found so many links to find distance between locations and mid point. I cant able to find solution for my problem.
Please suggest some solution for this problem. I am struggling over days to find solution for this.
Thanks in advance
You can use the SphericalUtil.interpolate
method from the Google Maps API Utility Library.
For example you can find a LatLng
that is at 1/5 of the distance between your starting position and your destination by doing
LatLng origin = new LatLng(12.990143,80.215784);
LatLng destination = new LatLng(12.992595,80.217618);
LatLng result = SphericalUtil.interpolate(origin, destination, 0.2);
这篇关于计算从起点到终点的纬度和经度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!