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

Make it easier to customize RerouteController

Open morethal opened this issue 5 years ago • 4 comments

Right now the RerouteController relies on a lot of internal classes of the NavigationSDK, that way it is pretty hard to change the implementation of the RerouteController.

morethal avatar Feb 09 '21 18:02 morethal

cc @kmadsen for visibility

Guardiola31337 avatar Mar 16 '21 18:03 Guardiola31337

Hi @morethal, happy to see you're using this and have some ideas for how to improve the interface.

Can you share what exactly you're trying to do, please overshare the details 😄

kmadsen avatar Apr 28 '21 20:04 kmadsen

My goal was to write a custom RerouteController to have a custom mechanism to (1) define when a user is off route and to (2) when and how a new route is calculated.

When I tried it, it was really hard, because the internal RerouteController knows a lot about the current state, but that information is really hard to get when extending a class.

I think what I did back then was to implement the RouteProgressObserver (it was called something like that) and the RerouteController. That allowed me to have at least a bit of information, but I think it was still significantly less than what is available in the internal class.

IIRC, something I wasn't able to do was to (1) define when a user is off route.

This is also somewhat related to #3965

morethal avatar Apr 29 '21 07:04 morethal

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 01 '22 17:05 stale[bot]