# routeBounds

The smallest box that holds every line or ring of the features, or `null`
when they hold no position. Takes the short way across the antimeridian, as
[`boundsOfPoints`](https://docs.mapcairn.com/api/core/boundsOfPoints.md) does. Safe for a route of any length.

This is a function exported by `@mapcairn/core`, checked against version 0.2.0.

## Signature

```ts
import { routeBounds } from "@mapcairn/core";
 
function routeBounds(features: readonly (RouteLeg | ReachableAreaFeature)[]): Bounds | null;
```

## Parameters

- `features` (`readonly (RouteLeg | ReachableAreaFeature)[]`)

## Returns

`Bounds | null`

## See also

- [`RouteLeg`](https://docs.mapcairn.com/api/core/RouteLeg.md)
- [`ReachableAreaFeature`](https://docs.mapcairn.com/api/core/ReachableAreaFeature.md)
- [`Bounds`](https://docs.mapcairn.com/api/core/Bounds.md)

Source: [packages/core/src/directions/directions.ts:125](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/directions/directions.ts#L125)
