# legendFor

A layer's legend. For a feed it lists each colour with its words, its
shape and the size it draws; for a tile layer it is the definition's own
legend, drawn as squares, or nothing. The words for an interval are written
in `catalogue`'s language.

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

## Signature

```ts
import { legendFor } from "@mapcairn/core";
 
function legendFor(definition: LayerDefinition, catalogue: MessageCatalogue): Legend;
```

## Parameters

- `definition` (`LayerDefinition`)
- `catalogue` (`MessageCatalogue`)

## Returns

`Legend`

## See also

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

Source: [packages/core/src/layers/style.ts:198](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/layers/style.ts#L198)
