The layers/ directory contains reusable Leaflet components responsible for rendering visual layers on the interactive map. These components are used inside the WorldMap view and control how the map and its data are visually presented.


Purpose

Map layers are modular building blocks that define both the base map style (light or dark) and the data overlay (such as countries). By splitting these concerns into dedicated components, we ensure better readability, flexibility, and reusability.


Included Components

Countries Layer

Renders the interactive GeoJSON overlay of countries, allowing users to click and manage selections. It handles styling for confirmed, pending-added, and pending-removed countries.

Countries Layer

Dark Map

Provides the dark-themed CartoDB tile layer, used when the user activates dark mode.

Dark Map

Light Map

Provides the light-themed CartoDB tile layer, used in the default (light) theme.

Light Map