Skip to main content

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​

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​

Source: packages/map/src/layers/mapKeyBlocks.ts:37