Class: EvStepPoint

bemap.EvStepPoint(options)

new EvStepPoint(options)

BeNomad BeMap JavaScript API - EvStepPoint (v1.5) One charging stop along an EV journey. Built from the v1 `StepPointFront` (`.../service/v1_0_0/.../response/StepPointFront.java`) or, via `fromChargeEvent()`, from a v2 `ChargeEventFront` (`.../service/v2_0_0/.../response/events/ChargeEventFront.java`).
Parameters:
Name Type Description
options Object Parsed JSON entry from the server response.
Source:

Methods

(static) fromChargeEvent(evt, legopt) → {bemap.EvStepPoint}

Build an `EvStepPoint` from a REST **v2.0.0** `CHARGE` event (`ChargeEventFront`). v2 nests the station/provider detail under `pool` (`PoolFront`) and the coordinate under `coord`; the charging figures (battery in/out, charging time, power, cost) are on the event itself. `leg` (optional) carries the preceding `ROUTE` segment's `distance`/`duration`/`consumed` so the v1 getters (`getDistance()`/`getDuration()`/`getConsumed()`) keep returning per-leg data. The complete raw pool is preserved via `getPool()`.
Parameters:
Name Type Attributes Description
evt Object a v2 `CHARGE` event
leg Object <optional>
`{ distance, duration, consumed }` from the preceding ROUTE event
Since:
  • 2.0.0
Source:
Returns:
Type
bemap.EvStepPoint

getPool()

Full v2 `pool` object (all provider/station detail) when built from a v2 CHARGE event. @public @since 2.0.0 @return {Object|null}
Source: