# formatMgrs

Writes a position as an MGRS reference to the metre, with the zone, band
letter, 100 km square and the digits of the easting and northing, for
example "31U CT 12345 67890". The zone carries the documented
exceptions: in band V (56 to 64 degrees north) the zone line moves to
3 degrees east, and in band X (72 to 84 degrees north) zones 31, 33, 35
and 37 are widened to twelve degrees each while zones 32, 34 and 36
cover nothing.

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

## Signature

```ts
import { formatMgrs } from "@mapcairn/core";
 
function formatMgrs(position: LatLng): string | null;
```

## Parameters

- `position` (`LatLng`)

## Returns

`string | null`: The reference, or `null` when the position is not finite or is
 outside the MGRS grid, which is the UTM grid: 80° S to 84° N. A longitude
 outside −180 to 180 is wrapped first.

## See also

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

Source: [packages/core/src/coordinates/mgrs.ts:93](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/coordinates/mgrs.ts#L93)
