如何找到利用位置管理器返回的轴承值的用户移动方向? [英] How to find the user moving direction using the bearing value returned by location manager?
本文介绍了如何找到利用位置管理器返回的轴承值的用户移动方向?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
LocationObject.getBearing()返回此设备的行进水平方向[0至360度。
LocationObject.getBearing() returns the horizontal direction of travel of this device[0 to 360 degree].
如何计算用户移动方向像北美,南美和所有从该轴承的价值?
How to calculate the user moving direction like North, south and all from this bearing value?
先谢谢了。
推荐答案
从的文档:
返回行程在真北东度的方向。如果hasBearing()是假的,0.0返回。
Returns the direction of travel in degrees East of true North. If hasBearing() is false, 0.0 is returned.
- 因此0为北(和度去顺时针)
- 所以,90是东亚
- 180南
- 270西
这篇关于如何找到利用位置管理器返回的轴承值的用户移动方向?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文