Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试根据与磁北或真北相关的 GPS 坐标来确定目标位置的方向。根据我的手机当前所在的位置,由 Android 定位服务确定,我如何知道目标位置在哪个方向?
谢谢
您应该使用方法Location.bearingTo()
例如
bearing = currentLocation.bearingTo(targetLocation);