如何在使用Google Maps API的反应型映射时在地图上找到标记的旋转程度?
我正在尝试使用react-native制作一个像超级应用程序一样的应用程序。我正在使用反应本机地图。我已经使用谷歌地图的方向 api 成功地绘制了方向,并且我已经能够成功地在路径上移动我的汽车标记,但问题是汽车的方向。我想随着道路方向的变化而改变汽车的方向。我长期以来一直在寻找一种方法来做到这一点,但我一无所获。如果有人可以提供帮助,我们将不胜感激。
I am trying to make an uber like app using react-native. I am using react-native-maps. I have successfully mapped the directions using directions api of google maps, and I have been able to move my car marker on the path successfully, but the problem is the direction of the car. I want to change the direction of the car as the direction of the road changes. I have been trying to find a way to do it for a long time, but I have found nothing. If anyone can help, that will be much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

您可以使用以下功能找到两个坐标之间的旋转程度
You can find the the degree of rotation between two coordinates by using the following function