This class implements the BaseRouteProvider for OpenRouteService. It's not possible to instanciate this class because the class is not exported from the module. Only one instance is created and added to the list of Providers of TravelNotes
The constructor
The icon used in the ProviderToolbarUI. Overload of the base class icon property
The provider name. Overload of the base class name property
A boolean indicating when a provider key is needed for the provider. Overload of the base class providerKeyNeeded property
The provider key. Overload of the base class providerKey property
The title to display in the ProviderToolbarUI button. Overload of the base class title property
The possible transit modes for the provider. Overload of the base class transitModes property Must be a subarray of [ 'bike', 'pedestrian', 'car', 'train', 'line', 'circle' ]
Call the provider, using the waypoints defined in the route and, on success, complete the route with the data from the provider
Name | Type | Description |
---|---|---|
route | Route | The route to witch the data will be added |
The provider key. Will be set by TravelNotes
A reference to the edited route
The round value used by PolylineEncoder
Gives the options and wayPoints for the request body
Gives the request headers
Overload of the base class #getRoute ( ) method
Name | Type | Description |
---|---|---|
onOk | Function | The Promise Success handler |
onError | Function |
Gives the url to call
Parse the response from the provider and add the received itinerary to the route itinerary
Name | Type | Description |
---|---|---|
response | JsonObject | The itinerary received from the provider |
onOk | Function | A function to call when the response is parsed correctly |
onError | Function | A function to call when an error occurs |