两个GPS位置之间的距离,并追踪它们之间的路线 [英] Distance between two GPS locations and also trace a route line between them

查看:181
本文介绍了两个GPS位置之间的距离,并追踪它们之间的路线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到两个GPS位置之间的距离,我得到了使用MKReverseGeocoder的方式......现在,我如何追踪这两个位置之间的路径..建议将高度赞赏..
在此先感谢..

i tried to find distance between two GPS locations and i got the way using MKReverseGeocoder... now,how can i trace a path between those two locations.. suggestions will be highly appreciated.. Thanks in advance..

推荐答案

以及距离两个位置的距离只需使用波纹线就可以获得距离

and for distance from two location just use bellow line to get distance

CLLocationDistance distance = [yourCurrentLocation distanceFromLocation:yourDestinationLocation];

这里yourCurrentLocation和yourDestinationLocation是CLLocation变量
,它返回距离(以米为单位)收件人的位置到指定的位置。

here yourCurrentLocation and yourDestinationLocation is CLLocation variable and It Returns the distance (in meters) from the receiver’s location to the specified location.

我希望这对您有所帮助..
:)

i hope this helpful to you.. :)

这篇关于两个GPS位置之间的距离,并追踪它们之间的路线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆