Visualize vehicle range
An isoline shows the area an EV can reach from a given point with the energy it has on board. It answers a simple question, how far can this vehicle go from here, and draws the answer as shapes you can place on a map.
Typical uses are a range map around a city, a “can I make it there without charging?” check, or a filter that only shows stations a vehicle can actually reach.
An isoline uses the real road network as its reference. The calculation finds the furthest points the vehicle can reach by road, and the outline connects those points to each other. The result is a filled area, not a line that follows roads, so the stretches between roads, such as forests or fields, can fall inside it. Rivers, mountains, one-way systems and gaps in the network still shape the outline, because they decide how far the roads let the vehicle get.
How it works
Like routes, isolines are calculated asynchronously, following the same async pattern used across the API. Creating and retrieving an isoline happen in separate steps.
- Create an isolineCall the
createIsolinemutation with at least avehicle_idand anorigin. The mutation returns an isolineidright away, which you’ll use in the next step. Optional input such as battery level or weather is covered in customize your isoline. - Open a subscriptionSubscribe to the
isolinesubscription using theidfrom the previous step. While the isoline is being calculated, the status ispending. Use it to drive a loading state in your UI. - Render the resultWhen the
statusresolves todoneorerror, render the matching UI. Adoneisoline contains thepolygonsto draw on the map. - Re-fetch on demandA finished isoline is stored with its complete details. To display it again later, use the
isolinequery with the sameidinstead of opening a new subscription.
Polygons
The result is a list of polygons. Together they describe the reachable area in steps, from close to the origin out to the furthest point the vehicle can drive.
Use polygon_count to choose how many polygons you get, up to a maximum of 20.
- Fewer polygons give you a simple, coarse picture of the vehicle’s reach. They are quicker to draw and easier to read at a glance.
- More polygons give you finer steps between the origin and the maximum range, which is useful for a gradient or a more detailed range map.
Each polygon has an index in its properties to tell them apart, and maximum_distance gives the distance from the origin to the furthest reachable point.
Create your first isoline
A vehicle_id and origin are enough to create an isoline. This example also sets the battery level, the number of polygons and the weather, so you can see how the main options fit together.
The mutation returns the isoline id. Pass it to the isoline subscription to follow the calculation and receive the result:
In this request:
state_of_chargestarts the vehicle at 80% battery. Without it, the isoline uses the vehicle’s full usable battery capacity.polygon_countreturns five polygons, from close to the origin to the maximum range.weatheruses thewinterpreset, which assumes cold conditions and typically gives a smaller reachable area than the default of real-time weather.
Customize your isoline
createIsoline accepts a range of optional input to fine-tune the calculation. More details on each field can be found in the API reference.
| Feature | Description |
|---|---|
| Battery level | Set the starting battery with state_of_charge, as a percentage, kilowatt hours, kilometers or miles. Defaults to the vehicle’s usable battery capacity. |
| Minimum final charge | Keep a reserve with final_state_of_charge. The isoline only includes points the vehicle can reach while staying above it. Defaults to 0. |
| Polygon count | Choose the number of polygons, up to 20. |
| Round trip | Only include points the vehicle can also drive back to the origin from, using round_trip. |
| Quality | Trade precision for speed with quality, set to high or low. |
| Ferry connections | Include ferries with ferry_connections, set to none or single. Ferries increase the calculation time and the number of polygons. |
| Weather | Apply a summer, winter, or actual weather preset, or custom conditions. Defaults to real-time weather data. |
| Season | Assume summer, winter, or current conditions, as a simpler alternative to weather. |
| Vehicle load | Set occupants, total_occupant_weight, and total_cargo_weight to account for the weight the vehicle carries. |
| Climate control | Turn on climate_control, and describe the heat_pump and cabin setup, to include heating and cooling in the consumption. |
Was this content helpful?