Skip to main content

LayerKey

A layer's key: one row for each colour, shape or class its style draws, with the same glyph the map uses and the words for it. The Layers section and the map key both draw it, so the two cannot disagree. Renders nothing for a layer whose definition has no key.

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

Signature​

import { LayerKey } from "@mapcairn/map";

function LayerKey(input: LayerKeyProps): JSX.Element | null;

Parameters​

  • { definition, label, testId, layout, }
  • input (LayerKeyProps)

Returns​

JSX.Element | null

Remarks​

The caller names the list, so two lists for one layer can sit on a page with different names.

See also​

Source: packages/map/src/layers/LayerKey.tsx:36