【发布时间】:2013-04-03 14:56:43
【问题描述】:
您好,我正在开发 GPS ios 应用程序。
我想在 Circle 上显示用户的位置,如图所示。
用户在中心。
我想在正确的方向上显示他朋友的位置。
我已经知道了两个用户的经度和纬度。
但是我怎样才能得到其他用户的方向呢?
是否可以使用方位角?
我通过这段代码得到两次使用之间的距离
CLLocation *locA = [[CLLocation alloc] initWithLatitude:Latitude longitude:Longitude];
CLLocation *locB = [[CLLocation alloc] initWithLatitude:app.lat longitude:app.lag];
CLLocationDistance distance = [locB distanceFromLocation:locA];
感谢您的帮助!!
【问题讨论】:
-
@RDC 我已经有两个位置之间的距离。我想要这个位置之间的方向。
标签: iphone ios gps location angle