Class: EvReachableAreaResponse

bemap.EvReachableAreaResponse(optionsopt)

new EvReachableAreaResponse(optionsopt)

BeNomad BeMap JavaScript API - EvReachableAreaResponse (v1.5) Strongly-typed response from `POST service/evreachablearea/1.0`. Mirrors the server DTO `EvReachableAreaResponse.java` — payload is `{boundingBox, geometry: [{lon, lat}, ...], encodedGeometry}`.
Parameters:
Name Type Attributes Description
options Object <optional>
Source:

Methods

(static) fromJson(json) → {bemap.EvReachableAreaResponse}

Parse the raw JSON response into a strongly-typed `EvReachableAreaResponse`. Lifts the polygon to `bemap.Coordinate` instances and the bounding box to `bemap.BoundingBox` when possible.
Parameters:
Name Type Description
json Object
Source:
Returns:
Type
bemap.EvReachableAreaResponse

getBoundingBox() → {bemap.BoundingBox|null}

`bemap.BoundingBox` covering the polygon, or `null` when absent.
Source:
Returns:
Type
bemap.BoundingBox | null

getEncodedPolygon() → {String|null}

Google-encoded polyline string (when the request asked for `encodedPolyline: true`).
Source:
Returns:
Type
String | null

getPolygon() → {Array.<bemap.Coordinate>}

Polygon vertices as `bemap.Coordinate` instances, ready to feed into `new bemap.Polygon(coords)`.
Source:
Returns:
Type
Array.<bemap.Coordinate>