Skip to main content

Interface: GeoVisMapModeContextValue

Defined in: react/mapMode.ts:18

Properties​

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:38

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:40

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

Parameters​

ParameterType
cameraCameraView

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:32

Parameters​

ParameterType
sideGeoVisSplitSide
itemIdstring | null

Returns​

void


sides​

sides: GeoVisSplitSides

Defined in: react/mapMode.ts:31

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