# useMeasure

The state of one measurement: the points the user has placed, the mode and
the total, worked out with the core geodesic maths (WGS 84, not flat
pixels).

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

## Signature

```ts
import { useMeasure } from "@mapcairn/map";
 
function useMeasure(units: UnitSystem): UseMeasure;
```

## Description

The total is announced through the app-wide announcer only after the points
have been still for `MEASURE_ANNOUNCE_DELAY_MS`, so adding points in
quick succession or dragging a vertex gives one announcement at the end,
not one per change. Nothing is announced before there is a total.

## Parameters

- `units` (`UnitSystem`): The unit system for the readout and the announcement.

## Returns

`UseMeasure`

## See also

- [`UnitSystem`](https://docs.mapcairn.com/api/core/UnitSystem.md)
- [`UseMeasure`](https://docs.mapcairn.com/api/map/UseMeasure-interface.md)

Source: [packages/map/src/tools/MeasureToolbar/useMeasure.ts:64](https://github.com/MapCairn/mapcairn/blob/main/packages/map/src/tools/MeasureToolbar/useMeasure.ts#L64)
