npm install
npm run dev
We utilize signals for efficient state management across components.
- Accessing state: Use
STATE_VAR.value
- Setting state: Assign with
STATE_VAR.value = ...
- Reacting to changes: Use
effect(() => { ... })
to perform actions when a signal changes
Signal Name | Location | Description |
---|---|---|
map |
MapPage.tsx | mapboxgl.Map object for managing sources and layers |
selectedDataset |
MapPage.tsx | Currently selected dataset |
profileSettings |
MapPage.tsx | Settings and data for the profile |
isProfileExpanded |
MapPage.tsx | Boolean indicating if the profile should be shown |
A dataset object contains many attributes:
-
Views:
- An array of
View
objects - Each
View
contains:name
: Identifier for the viewinit
: Function that sets up sources and layers- Returns a cleanup function to remove sources and layers when no longer needed
- An array of
-
CurrentView:
- String referencing the currently selected view for the dataset