Reputation: 748
I use Mapbox in my Android app and need to show directions from point A to point B on the map.
I am aware of the Directions API provided by Mapbox. But i can't use it in my app since including 'com.mapbox.mapboxsdk:mapbox-android-directions:1.0.0@aar' it in the gradle file conflicts with another dependency in my app (Different versions of retrofit).
So i am forced to use the API approach. I make a url GET request such as -
However, parsing the json response and plotting the route is difficult. Is there a better way to accomplish this?
Thanks!
Upvotes: 0
Views: 782
Reputation: 3168
mapbox-android-directions
has now been deprecated. Use Mapbox Android Services instead. You can also use the latest Mapbox Android SDK beta.3 which includes this library as a dependency. Once included, you can use this example to get directions.
Upvotes: 0