# EndStackProps

Props for [`EndStack`](https://docs.mapcairn.com/api/map/EndStack.md). The app passes map state from `useMap()`.

This is an interface exported by `@mapcairn/map`, checked against version 0.2.0.

## Signature

```ts
import type { EndStackProps } from "@mapcairn/map";
 
interface EndStackProps
```

## Properties

### bearing

```ts
readonly bearing: number;
```

Map bearing in degrees clockwise from north.

### canZoomIn

```ts
readonly canZoomIn: boolean;
```

False at the maximum zoom, which disables the Zoom in button.

### canZoomOut

```ts
readonly canZoomOut: boolean;
```

False at the minimum zoom, which disables the Zoom out button.

### directions

```ts
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

```ts
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

```ts
readonly locating: boolean;
```

A location request is in progress. Presses are ignored meanwhile.

### mapOptionsControls

```ts
readonly mapOptionsControls: string;
```

The id of the sheet or panel that Map options opens.

### mapOptionsOpen

```ts
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

```ts
readonly measuring: boolean;
```

Measuring is on.

### onDraw

```ts
readonly onDraw?: () => void;
```

Turns drawing on or off. Leaving it out hides the Draw shapes button.

### onLocate

```ts
readonly onLocate: () => void;
```

Asks for the person's location. Called only from a press, because the browser may prompt.

### onMapOptions

```ts
readonly onMapOptions: () => void;
```

Opens or closes the Map options sheet or panel.

### onMeasure

```ts
readonly onMeasure: () => void;
```

Turns measuring on or off.

### onResetBearing

```ts
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

```ts
readonly onSettings: () => void;
```

Opens or closes the settings sheet or panel.

### onZoomIn

```ts
readonly onZoomIn: () => void;
```

Zooms the map in one step.

### onZoomOut

```ts
readonly onZoomOut: () => void;
```

Zooms the map out one step.

### settingsControls

```ts
readonly settingsControls: string;
```

The id of the sheet or panel that Settings opens.

### settingsOpen

```ts
readonly settingsOpen: boolean;
```

The settings sheet or panel (Settings and Help) is open.

## See also

- [`EndStackDirections`](https://docs.mapcairn.com/api/map/EndStackDirections.md)

Source: [packages/map/src/chrome/EndStack/EndStack.tsx:36](https://github.com/MapCairn/mapcairn/blob/main/packages/map/src/chrome/EndStack/EndStack.tsx#L36)
