# Calculate consumption based isoline routing

A consumption-based isoline can be requested to visualize the appropriate range available for a given consumption value, for both electric and fuel-based vehicles.

## Electric vehicles

Electric vehicles have a limited reachable range based on their current battery charge and factors affecting the rate of energy consumed, such as road slope or auxiliary power usage. Therefore, it is useful to visualize the appropriate range to avoid running out of energy before reaching a charging point.

A consumption based isoline for an electric vehicle, can be requested using range[type]=consumption and providing range[values] in Wh. Since vehicles have unique consumption parameters, they are to be specified in the request for an accurate range to be calculated. The consumption parameters for electric vehicles are to be specified in the ev namespace, as presented in the example request below. For more information, see Consumption model.

curl -X GET \
'https://isoline.router.hereapi.com/v8/isolines?origin=52.532988,13.352852&range[type]=consumption&range[values]=20000&transportMode=car&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[ascent]=9&ev[descent]=4.3&ev[auxiliaryConsumption]=1.8'


## Fuel-based vehicles

Note: This feature is currently a Beta version.

A consumption based isoline for an fuel-based vehicle, can be requested using range[type]=consumption and providing range[values] in different units based on fuel[type]. The different units for range[values] are:

Vehicle Type Unit
Diesel, Petrol & LPG milliliters (ml)
CNG grams (gm)

Since fuel-based vehicles can have different consumption parameters based on fuel-type (petrol, diesel, etc.) and other factors, the consumption parameters are to be specified in the request for an accurate range calculation. The consumption parameters for fuel-based vehicles are to be specified in the fuel namespace, refer to the example request below for details. For more information, see Consumption model.

# Isoline Request
curl -X GET \

// Isoline Response
{
"departure": {
"time": "2023-04-21T11:42:47+00:00",
"place": {
"type": "place",
"location": {
"lat": 52.5362,
"lng": 13.39129
},
"originalLocation": {
"lat": 52.536214,
"lng": 13.3912609
}
}
},
"isolines": [
{
"range": {
"type": "consumption",
"value": 10000,
"consumptionType": "diesel"
},
"polygons": [
{
"outer": "BGolptkD2u7sYAojrC2uV-rgC-rgC2uV-rgC1uVo9qBn9qBq9qBA0uV-rgCAk1rF2uV-rgCo9qBq9qB2uV-rgC1uV-rgCn9qBo9qBAq9qB-rgC0uVy61CA-rgC2uV0uV-rgCzuV-rgCp9qBo9qBzuV-rgC0uV-rgC83gE83gE2uV-rgC1uV-rgCn9qBq9qB1uV-rgCA-ktNzuV8rgC9rgC2uVx61CA9rgC0uV1uV-rgCAy61CzuV-rgCp9qBq9qBn9qB83gEp9qBAp9qBp9qBn9qBAp9qBq9qB9rgC0uVx61CA9rgC2uVp9qB83gEp9qBAx61Cz61CzuV9rgCAx61C1uV9rgCli4Oli4OzuV9rgCAx61C0uV9rgCq9qBp9qB0uV9rgCAx61C2uV9rgCo9qBp9qBAp9qBty2Gty2GzuV9rgC0uV9rgCy61Cx61C83gEp9qB2uV9rgC1uV9rgCn9qBp9qB1uV7rgC2uV9rgCo9qBp9qBq9qB73gE-rgCzuV-rgC0uVq9qBq9qBo9qBA83gE73gE-rgC1uVy61CA-rgCzuVq9qB73gE-rgCzuV-rgCq3K0uV-lgBA001B"
}
]
}
]
}