mapbox-navigation-android icon indicating copy to clipboard operation
mapbox-navigation-android copied to clipboard

Android Drop-In UI: Customer should be able to modify RouteOptions

Open korshaknn opened this issue 3 years ago • 3 comments

At the moment there is no way to modify RouteOptions used to fetch routes, but customer should be able to do it. some customisation examples:

  • driving profile
  • exclude list
  • include list
  • language (different from locale)
  • account (user)

korshaknn avatar Jul 06 '22 19:07 korshaknn

We already expose an API navigationView.api.setRoutes(options: RouteOptions). This allows end users to inform the Drop-In UI to fetch the route using the options supplied and set it to mapboxNavigation. I guess I am not clear on the exact user flow. Can you describe a step-by-step user flow that makes the requirement more clear?

@korshaknn

abhishek1508 avatar Jul 06 '22 23:07 abhishek1508

@abhishek1508 when we make a long tap on the map, route is fetched, but we can't control options used for the fetching, right? so, we need a way to inject/customise options used on a long tap. And we should be able to change them at runtime before each longtap cc @Zayankovsky

korshaknn avatar Jul 08 '22 08:07 korshaknn

@abhishek1508 btw, at the moment we have the next logic

  • long tap once -> fetch a route to the destination -> coordinates = (origin, destination)
  • long tap twice -> take previous destination ^^ and use it as a waypoint to a new route. coordinates = (origin, destination_step_1, destination)
  • and so on

check the video (there is a bug, we don't move the destination pin to the last waypoint)

https://user-images.githubusercontent.com/14282440/177952549-ae1127f8-1099-40cb-b295-d426ff9efbce.mp4

korshaknn avatar Jul 08 '22 08:07 korshaknn