EndStackProps
Props for EndStack. The app passes map state from useMap().
This is an interface exported by @mapcairn/map, checked against version 0.2.0.
Signature
import type { EndStackProps } from "@mapcairn/map";
interface EndStackProps
Properties
bearing
readonly bearing: number;
Map bearing in degrees clockwise from north.
canZoomIn
readonly canZoomIn: boolean;
False at the maximum zoom, which disables the Zoom in button.
canZoomOut
readonly canZoomOut: boolean;
False at the minimum zoom, which disables the Zoom out button.
directions
readonly directions?: EndStackDirections;
The Directions button, between Measure and Locate me. Leave it out and the button is not shown, for a host with no routing service.
drawing
readonly drawing?: boolean;
Draw is on. With onDraw, the stack shows a Draw shapes button between
Measure and Locate me; without it the button is left out.
locating
readonly locating: boolean;
A location request is in progress. Presses are ignored meanwhile.
mapOptionsControls
readonly mapOptionsControls: string;
The id of the sheet or panel that Map options opens.
mapOptionsOpen
readonly mapOptionsOpen: boolean;
The sheet or panel that Map options opens is the open surface. False while Settings is open, and while a pin card or Directions is shown in the sheet.
measuring
readonly measuring: boolean;
Measuring is on.
onDraw
readonly onDraw?: () => void;
Turns drawing on or off. Leaving it out hides the Draw shapes button.
onLocate
readonly onLocate: () => void;
Asks for the person's location. Called only from a press, because the browser may prompt.
onMapOptions
readonly onMapOptions: () => void;
Opens or closes the Map options sheet or panel.
onMeasure
readonly onMeasure: () => void;
Turns measuring on or off.
onResetBearing
readonly onResetBearing: () => void;
Turns the map back to north. The compass button that calls it is shown only while the bearing is not zero.
onSettings
readonly onSettings: () => void;
Opens or closes the settings sheet or panel.
onZoomIn
readonly onZoomIn: () => void;
Zooms the map in one step.
onZoomOut
readonly onZoomOut: () => void;
Zooms the map out one step.
settingsControls
readonly settingsControls: string;
The id of the sheet or panel that Settings opens.
settingsOpen
readonly settingsOpen: boolean;
The settings sheet or panel (Settings and Help) is open.