CustomRouterRule
The rule setups a local web server which can serve requests from Navigation SDK. Set baseUrl as RouteOptions.baseUrl to make Nav SDK using local web server. Use createNavigationRouterRule to create an instance of the rule.
The local web server forwards requests from Navigation SDK to MapboxNavigationTestRouter and MapboxNavigationTestRouteRefresher provided by the SDK's user. When a user provided components returns a route or an error, the rule converts it to a response for Nav SDK.
The way Nav SDK communicates with local web server is an implementation detail and could be changed in new releases. The local http server is supposed to be used only by Nav SDK and doesn't provide Directions API features which Nav SDK doesn't use.
Functions
Use this method to set handler of route requests sent by the Nav SDK.
Use this method to set handler of route refresh requests sent by the Nav SDK.