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> |
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 |
Returns:
getBoundingBox() → {bemap.BoundingBox|null}
`bemap.BoundingBox` covering the polygon, or `null` when absent.
Returns:
- Type
- bemap.BoundingBox | null
getEncodedPolygon() → {String|null}
Google-encoded polyline string (when the request asked for
`encodedPolyline: true`).
Returns:
- Type
- String | null
getPolygon() → {Array.<bemap.Coordinate>}
Polygon vertices as `bemap.Coordinate` instances, ready to feed into
`new bemap.Polygon(coords)`.
Returns:
- Type
- Array.<bemap.Coordinate>