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
| Parameter | Type |
|---|---|
camera | CameraView |
Returns
void
setActiveSide
setActiveSide: (
side) =>void
Defined in: react/mapMode.ts:42
Parameters
| Parameter | Type |
|---|---|
side | GeoVisSplitSide |
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
| Parameter | Type |
|---|---|
mode | GeoVisMapMode |
sides? | Partial<GeoVisSplitSides> |
Returns
void
setSide
setSide: (
side,itemId) =>void
Defined in: react/mapMode.ts:45
Parameters
| Parameter | Type |
|---|---|
side | GeoVisSplitSide |
itemId | string | 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.