据我所知,Mapbox SDK (RouteUtils.java) 使用精度 6 来解码折线,这会影响 Mapbox 导航。将精度为 6 的 DiresctionsRoute
传递给 startNavigation(directionsRoute)
时,每个导航监听器都能完美运行。但是当添加精度为 5 的 DirectionsRoute
时(因为它是 OSRM.V5 的默认精度)。没有听众正常工作。我该如何解决这个问题。
NOTE: We're using OSRM.V5 in our server so it always returns route with precision of 5. And we aren't intended to use Mapbox's
getRoute()
as it's restricted at some point fro free users.
最佳答案
您可以在 OSRM 中使用 geometries=polyline6
选项,但它需要 5.8.0 版本
API 引用 http://project-osrm.org/docs/v5.7.0/api/#route-service
关于android - 如何将 Mapbox 折线解码精度更改为 5?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45042426/