Mapbox provides good Navigation SDK for Android, and what I have been trying to do is pass custom lat and lng's to mapbox navigation launcher. But its taking current user location and i would like to pass the custom coordinates . Is that possible?
Asked
Active
Viewed 103 times
1 Answers
1
You need to build a DirectionsRoute
and then eventually give it to the NavigationLauncherOptions.Builder
.
You can build a route with a custom origin instead of the device location.
Also, you can add custom waypoints.
Create a waypoint via the Point
class. Point wayPoint = Point.fromLngLat(longCoordinate, latCoordinate);
Once you get the route from the response, you can eventually give it to the options builder before starting the NavigationLauncher.

langsmith
- 2,529
- 1
- 11
- 13