Display state of charge on route

To display how the charge of the electric vehicle decreases along the route, or where the vehicle would run out of charge, it is not enough to return consumption per section. For this purpose, it is possible to return consumption per span. By itself, this would return only one span, which you need to couple with another attribute, such as segment references.

curl -X GET \
  https://router.hereapi.com/v8/routes?origin=52.533864,13.357444&spans=consumption,segmentId&transportMode=car&destination=52.512139,13.438468&return=summary,polyline&ev[freeFlowSpeedTable]=0,0.239,27,0.239,45,0.259,60,0.196,75,0.207,90,0.238,100,0.26,110,0.296,120,0.337,130,0.351,250,0.351&ev[trafficSpeedTable]=0,0.349,27,0.319,45,0.329,60,0.266,75,0.287,90,0.318,100,0.33,110,0.335,120,0.35,130,0.36,250,0.36&ev[auxiliaryConsumption]=1.8&ev[ascent]=9&ev[descent]=4.3
...
"spans": [
  {
    "offset": 0,
    "segmentRef": "$0:377893757:$1:192033902#+0.4302040427993527..1",
    "consumption": 0.0552
  },
  {
    "offset": 3,
    "segmentRef": "$0:377894440:$1:658795688#-",
    "consumption": 0.01
  },
...

results matching ""

    No results matching ""