new RoutingResponse()
BeNomad BeMap JavaScript API - RoutingResponse
Container for the routes returned by `bemap.RoutingV2.calculate()`. When
the request was a MODE_MATRIX or MODE_ISOCHRONE call, the relevant fields
(`matrix`, `isochrone`) are populated and `routes` may be empty.
- Since:
- 1.5.0
- Source:
Methods
getIsochronePolygon() → {Array.<bemap.Coordinate>|Object|null}
Convenience accessor for the isochrone polygon. The BeMap server encodes
the isochrone area as the `polyline` array of the first route in
`routingRoutes[]` (length / duration are zero in that case). This helper
returns the polyline as an Array ready to feed into a
`bemap.Polygon`, or `null` when no isochrone is present.
Falls back to `this.isochrone` if a future server version exposes the
polygon under a dedicated top-level field.
- Since:
- 1.5.0
- Source:
Returns:
- Type
- Array.<bemap.Coordinate> | Object | null