# mapKeyBlocks

The blocks of the map key: one for each layer that is on and has a key, in
catalogue order. Pure, so the image export can draw the same key the map
shows. The words for an interval are written in `catalogue`'s language.
An empty result means there is no key to show at all.

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

## Signature

```ts
import { mapKeyBlocks } from "@mapcairn/map";
 
function mapKeyBlocks(layers: readonly DataLayerState[], catalogue: MessageCatalogue): readonly MapKeyBlock[];
```

## Parameters

- `layers` (`readonly DataLayerState[]`)
- `catalogue` (`MessageCatalogue`)

## Returns

`readonly MapKeyBlock[]`

## See also

- [`DataLayerState`](https://docs.mapcairn.com/api/map/DataLayerState.md)
- [`MessageCatalogue`](https://docs.mapcairn.com/api/core/MessageCatalogue.md)
- [`MapKeyBlock`](https://docs.mapcairn.com/api/map/MapKeyBlock.md)

Source: [packages/map/src/layers/mapKeyBlocks.ts:37](https://github.com/MapCairn/mapcairn/blob/main/packages/map/src/layers/mapKeyBlocks.ts#L37)
