Direction-Client
DirectionClient is the main class we provided to do route planning, currently our Direction Client support onboard only, cloud only and hybrid calculation via RequestMode.
The Direction Client is a client binding class, which will connect with our embedded or cloud Direction Service.you can create one DirectionClient via Factory method.
- Working with Routing Request:
Routing Request is the data model for route planning. and there are couple must have parameter. including:
- Origination
-
Destination And Other parameters are optional, the detail can be found in the javadoc file.
-
Creating a Task with the request: Create a Task with the request object. and the Task can be executed in two different mode:
-
AsyncMode: The task will execute in SDK's background thread and will callback when route calculation finished.
- SyncMode: The task will execute in current thread, and will also return the result from the callback method provided.