Skip to main content

EndStack

The end-stack slot content, a landmark named "Map tools" holding, top to bottom: the compass (only while the map is rotated and the engine can rotate), the "Map controls" group (Map options, Measure, Directions and Draw shapes when the host offers them, Locate me, Settings) and the "Zoom controls" group. The zoom group is never placed anywhere else.

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

Signature​

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

function EndStack(input: EndStackProps): JSX.Element;

Parameters​

  • { bearing, onResetBearing, mapOptionsOpen, mapOptionsControls, onMapOptions, settingsOpen, settingsControls, onSettings, measuring, onMeasure, directions, drawing, onDraw, locating, onLocate, canZoomIn, canZoomOut, onZoomIn, onZoomOut, }
  • input (EndStackProps)

Returns​

JSX.Element

Remarks​

The zoom group follows shouldShowZoomButtons: the user's setting wins; otherwise it shows for a fine pointer unless the height MapChrome measured for the stack is too short. At a zoom limit the button is aria-disabled but stays focusable. Map options, Measure, Directions, Draw shapes and Settings register as focus targets, so closing their surfaces returns focus to them. The stack does not read the map; the app passes its state in.

See also​

Source: packages/map/src/chrome/EndStack/EndStack.tsx:102