Skip to main content

DirectionsPanel

The directions tool's panel, for the sheet or side panel: the stops (added by tapping the map, at the map centre, from a place search or from the dropped pin, and reordered or removed with buttons), the way of travelling, "Get route", the travel time areas and the result.

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

Signature​

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

function DirectionsPanel(input: DirectionsPanelProps): JSX.Element;

Parameters​

  • { directions, pin, getBias, note, headingLevel, }
  • input (DirectionsPanelProps)

Returns​

JSX.Element

Remarks​

Every action a pointer can do has a button: adding a stop at the map centre stands in for a tap on the map, and Move up, Move down and Remove stand in for any drag. "Add stop at map centre" uses the middle of the part of the map the panel leaves free, which is where the crosshair is drawn. Results and failures are announced by useDirections, so the panel's own text carries no live region. A request is sent only when a button asks for it, and the note under them says what goes where.

See also​

Source: packages/map/src/tools/Directions/DirectionsPanel.tsx:212