This code sample shows how to calculate electricity consumption for a vehicle model on a route from a waypoint A to C. If the battery of the vehicle is insufficient to complete the route, a charging station at waypoint A or B can be specified. Charging at waypoint A can also be beneficial if the initial state of charge is below 100%, to top up the battery before starting the route.
The charging time is a proposal, currently for information only. It is not included in the travel time of the route and the start time of subsequent events is not offset by it.
For detailed information see the Consumption Calculation concept.
This feature is in a preview state, the API is stable, feature changes could be introduced in future.