For Mapbox: enable the Directions API or Optimization API in your Mapbox account; for HERE: register at developer.here.com and enable the Routing v8 API — both require an API key
When constructing a routing request, include vehicle profile parameters: for HERE's EV routing, supply consumptionModel parameters including batteryCapacityKwh, currentChargeKwh, and maxChargeKwh along with charging station waypoints or let the API add them automatically
Request the route response with isoline (range polygon) data if visualizing reachable area: HERE's Isoline Routing API accepts energy-based range parameters; Mapbox uses a separate isochrone endpoint which is time/distance based and must be adapted for range visualization using estimated consumption
Render the route polyline and isoline polygon on a map canvas using the Mapbox GL JS or HERE Maps JavaScript API; style the isoline polygon with transparency to show the reachable area overlay
Display charging stop suggestions from the route response (HERE can insert charging stops); supplement with Open Charge Map or NREL API data to show charger availability details not in the routing response
Known gotchas
Mapbox's Directions API does not natively support EV consumption modeling as of the knowledge cutoff; range visualization requires computing an isochrone and scaling it by a consumption estimate client-side, which is approximate — HERE's EV routing API has more explicit EV parameters
Isoline/isochrone polygons for range anxiety visualization can be expensive API calls; cache results keyed on origin location and battery level rather than requesting a new polygon on every map interaction
Consumption model parameters (Wh/km at different speeds) must come from vehicle-specific data; generic defaults will produce significantly inaccurate range estimates especially in hilly terrain or extreme temperatures — communicate model uncertainty to users
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp