セクションあたりの消費量を計算

このリクエストは 、概要のセクションの電気自動車によるエネルギー消費量を返します。

curl -X GET \
  'https://router.hereapi.com/v8/routes?origin=52.533864,13.357444&transportMode=car&destination=52.512139,13.438468&return=summary&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&apikey={YOUR_API_KEY}'

レスポンスには、 kWh 単位でエネルギー消費量が指定されます。

{
  "routes": [
    {
      "id": "441cb1bb-02c0-4d56-a579-f199506fc781",
      "sections": [
        {
          "id": "fb5d1478-8794-4150-8f01-e5126fbe5c8a",
          "type": "vehicle",
          "departure": {
            "place": {
              "type": "place",
              "location": {
                "lat": 52.5343033,
                "lng": 13.3588567,
                "elv": 81
              },
              "originalLocation": {
                "lat": 52.533864,
                "lng": 13.357444
              }
            }
          },
          "arrival": {
            "place": {
              "type": "place",
              "location": {
                "lat": 52.5121573,
                "lng": 13.4384088,
                "elv": 76
              },
              "originalLocation": {
                "lat": 52.512139,
                "lng": 13.438468
              }
            }
          },
          "summary": {
            "duration": 1314,
            "length": 7431,
            "consumption": 3.9096,
            "baseDuration": 1026
          },
          "transport": {
            "mode": "car"
          }
        }
      ]
    }
  ]
}

」に一致する結果は 件です

    」に一致する結果はありません