gpt4 book ai didi

android - 如何检查标记是否在方向上?

转载 作者:行者123 更新时间:2023-11-29 01:19:41 25 4
gpt4 key购买 nike

我正在使用 Google map 在 Android 中开发一个应用程序,我想检查标记是否在从 A 到 B 的方向?

enter image description here

最佳答案

您可以使用 Google Maps API Utility Library 中的 SphericalUtil.isLocationOnPath 方法那,根据the Javadoc :

Computes whether the given point lies on or near a polyline, within a specified tolerance in meters. The polyline is composed of great circle segments if geodesic is true, and of Rhumb segments otherwise. The polyline is not closed -- the closing segment between the first point and the last point is not included.

关于android - 如何检查标记是否在方向上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37652010/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com