Skip to main content

Interface: GeoVisMapModeContextValue

Defined in: react/mapMode.ts:18

Properties​

activeSide​

activeSide: GeoVisSplitSide

Defined in: react/mapMode.ts:41

The side the reader is editing: 'a' on entering the split, then the half the reader clicked. Only drawn while the app builds the sides (split), whose controls edit this side.


enabled​

enabled: boolean

Defined in: react/mapMode.ts:20

Whether the spec offers the mode button and has items to split between.


getCamera​

getCamera: () => CameraView | null

Defined in: react/mapMode.ts:51

The latest camera of the map, single or split — where a side opens, and what a side's spec is rebuilt with, so a spec update never throws the camera back. null before any view reported one.

Returns​

CameraView | null


mode​

mode: GeoVisMapMode

Defined in: react/mapMode.ts:21


options​

options: LayerControlItem[]

Defined in: react/mapMode.ts:29

The control items the sides choose between.


recordCamera​

recordCamera: (camera) => void

Defined in: react/mapMode.ts:53

Records the camera a side moved to, so the single map resumes there.

Parameters​

ParameterType
cameraCameraView

Returns​

void


setActiveSide​

setActiveSide: (side) => void

Defined in: react/mapMode.ts:42

Parameters​

ParameterType
sideGeoVisSplitSide

Returns​

void


setMode​

setMode: (mode, sides?) => void

Defined in: react/mapMode.ts:27

Switches the mode. Entering the split, the sides start over: the left one on the first item switched on in the single map (in control order), the right one on none — unless sides names them, as a shared link does.

Parameters​

ParameterType
modeGeoVisMapMode
sides?Partial<GeoVisSplitSides>

Returns​

void


setSide​

setSide: (side, itemId) => void

Defined in: react/mapMode.ts:45

Parameters​

ParameterType
sideGeoVisSplitSide
itemIdstring | null

Returns​

void


sides​

sides: GeoVisSplitSides

Defined in: react/mapMode.ts:44

The item id each side shows, or null for a side showing none.


split​

split: GeoVisSplitInput | null

Defined in: react/mapMode.ts:35

The sides' specs the app builds, from <GeoVisProvider split>, or null when both sides are cut from the provider's spec. Either way each side shows the one of options its pill chose.