Conversation
| # Add amenities to your route | ||
|
|
||
| I need coffee! The kids need a bathroom break! Feed me or I'll end it all! Common complaints heard whilst driving. With amenity-based-routing, your caffeine/bathroom/food/other needs can be catered too, all whilst you charge your vehicle. | ||
|
|
There was a problem hiding this comment.
I loved this but I would make this a bit less extreme and more focus on a lunch stop.
|
|
||
| ## Steps to take | ||
|
|
||
| 1. Plotting a route starts by executing the `newRoute` mutation. This mutation requires information about the car, origin and destination. After the mutation is finished executing a route `id` will be returned. Here the amenity preferences for the route should be added. |
There was a problem hiding this comment.
In the newRoute mutation you can also add additional requirements such as a scheduled amenity stop.
|
|
||
| /** | ||
| * Example application of how to build a route with the Chargetrip API. | ||
| * Please have a look to Readme file in this repo for more details. |
There was a problem hiding this comment.
how to build a route with a scheduled amen city stop
| */ | ||
| const headers = { | ||
| //Replace this x-client-id and app-id with your own to get access to more cars | ||
| 'x-client-id': '5ed1175bad06853b3aa1e492', |
There was a problem hiding this comment.
vehicles and the complete station database
|
|
||
| /** | ||
| * This project shows you how to fetch a car list and render the car details | ||
| * The project structure contains; |
There was a problem hiding this comment.
This project shows you how create a route with a scheduled amenity stop
lsmienk
left a comment
There was a problem hiding this comment.
Looks good! I think there are a few things we can do to improve the example:
-
The plugs available in the route I get are 0. This can be because of the demo station data. I would suggest removing that line from the example.
-
We now also show all amenities which is great, but I would highlight more that this is a lunch stop.
-
The duration you chose of 2000 seconds is 33 min. This looks a bit random. I would change this to 30 min/ 45 or an hour. So it looks less like the time it takes to charge and more like a lunch stop.
-
At the top of the example you are now just highlighting the duration of trip. This is not the most important part. I would change this to From xxx to xxx. With a xx min lunch stop.
Adds amenity based routing example.