Specify maximum speed

The vehicle[speedCap] parameter specifies the maximum speed that the vehicle should not or cannot exceed while traveling. The impact of the speed csap depends on the transportMode used:

Transport Mode Speed Cap impact
Scooter Route shape, ETA and consumption
Car, Truck Route ETA and consumption
other not supported

For scooter mode, the default speed is capped to 60 km/h as mentioned in the Scooter routing section. However, the vehicle[speedCap] parameter provides an option to set a higher or lower speed cap value. This can lead to change in route shape and derived properties such as ETA and consumption because of the way the route is calculated.

For car and truck modes, speed caps have a different implication as physical limitations, similar as for scooters, should not exist. In these modes, a speed cap is used, for example, to extend the range of the vehicle by limiting the fuel/energy consumption. This does not impact the shape of the route is but adjusts only the ETA and consumption values for the calculated route.

The following code sample calculates an intra-city route in scooter mode with speed cap at 11.11 m/s (40 km/h).

curl -X GET \
  'https://router.hereapi.com/v8/routes?origin=52.495650,13.276807&destination=52.506097,13.461151&return=polyline,summary,actions,instructions&spans=dynamicSpeedInfo&transportMode=scooter&vehicle[speedCap]=11.11&apikey={YOUR_API_KEY}'
{
  "routes": [
    {
      "id": "7596fd97-2eb6-46e5-9fd3-1556a0ce69b7",
      "sections": [
        {
          "id": "b49e05e3-5d63-41b9-87c4-01ae932f2b3d",
          "type": "vehicle",
          "departure": {
            "time": "2021-03-12T11:47:47+01:00",
            "place": {
              "type": "place",
              "location": {
                "lat": 52.4955597,
                "lng": 13.276929
              },
              "originalLocation": {
                "lat": 52.4956499,
                "lng": 13.276807
              }
            }
          },
          "arrival": {
            "time": "2021-03-12T12:18:46+01:00",
            "place": {
              "type": "place",
              "location": {
                "lat": 52.506095,
                "lng": 13.4611611
              },
              "originalLocation": {
                "lat": 52.506097,
                "lng": 13.4611509
              }
            }
          },
          "summary": {
            "duration": 1859,
            "length": 14553,
            "baseDuration": 1637
          },
          "transport": {
            "mode": "scooter"
          }
        }
      ]
    }
  ]
}

results matching ""

    No results matching ""