[英]Mapbox Directions API Android not working
I started using the Mapbox Directions API for my app, and I was about to check just if it works.我开始为我的应用程序使用 Mapbox Directions API,我正准备检查它是否有效。 I went through Antonio Zugaldia's blog which there he explains how to show directions with easy steps.我浏览了 Antonio Zugaldia 的博客,他在那里解释了如何通过简单的步骤显示方向。 ( https://www.mapbox.com/blog/android-directions-library/ ) ( https://www.mapbox.com/blog/android-directions-library/ )
So I started implemeting all the code and I tried running the app, but that didn't work out.所以我开始实现所有代码并尝试运行该应用程序,但没有成功。 I debug the app and saw that the flow broke in this line:我调试应用程序并看到流程在这一行中断:
Response<DirectionsResponse> response = client.execute();
when I debug this line, I saw it fell down in OkHttpCall.java
class in method name:当我调试这一行时,我看到它在方法名称中的OkHttpCall.java
类中掉了下来:
public Response<T> execute() throws IOException
on the last line which was:在最后一行是:
return parseResponse(rawCall.execute());
So how can I make directions work easily?那么我怎样才能让路线更轻松呢?
Thanks for the question and sorry for the trouble.感谢您的提问,很抱歉给您带来麻烦。 For all our services, including the Directions API, we're now using Mapbox Android Services which is much more powerful than the original library.对于我们所有的服务,包括 Directions API,我们现在使用的是 Mapbox Android 服务,它比原始库强大得多。 We have documentation on how to install it here, and full example for Directions here.我们在此处提供了有关如何安装它的文档,并在此处提供了完整的方向示例。 Hope this helps.希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.