The CountriesLayer
component renders the interactive country polygons on the map using Leaflet’s GeoJSON
layer. It is responsible for applying visual styles and event handlers based on the current selection state of each country.
This layer visually reflects the application’s selection logic by:
The component is co-located with its test and style files to promote clarity and modularity:
src/
├── Components/
│ └── layers/
│ └── CountriesLayer/
│ ├── CountriesLayer.tsx
│ └── CountriesLayer.test.tsx
│
Basic unit tests mock Leaflet’s behavior and verify that the component renders and responds to selection props and callbacks as expected.