Skip to main content

LayersSection

The Layers section of the sheet and side panel, drawn entirely from the layer definitions: a switch per layer with its data cost, and while a layer is on, its status, controls, legend, disclaimer and the list of what loaded. The open feature's card sits at the top. When the catalogue is loading, has failed, is empty or skipped definitions, it says so (see CatalogueStatus). Renders nothing for a host whose layers were there from the start and are none.

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

Signature​

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

function LayersSection(input: LayersSectionProps): JSX.Element | null;

Parameters​

  • { layers, headingLevel, headingRef, formatters, onShowOnMap, showTurnOffAll, intro, }
  • input (LayersSectionProps)

Returns​

JSX.Element | null

Remarks​

A tap on the map asks for the card to take focus (layers.focusPending); the focus moves after the sheet's own focus effects, so the card heading wins over the section heading.

See also​

Source: packages/map/src/layers/LayersSection.tsx:184