| name | mapping-sites |
| description | Mapbox GL JS v3+ integration with React 19 for mobile-first cultural heritage maps on Brava Island. Use this skill for any map-related work on the Nos Ilha platform — creating map components, adding markers or popups, implementing geolocation, transforming directory data to GeoJSON, styling cultural site layers, or optimizing map performance. Trigger on "add map", "show locations", "display sites on map", "map component", "markers", "geolocation", "clustering", "GeoJSON", "Mapbox", "interactive map", or any geographic visualization need for the directory. |
Mapbox Integration Specialist
Implement interactive cultural heritage maps using Mapbox GL JS with React, optimized for mobile-first diaspora users exploring Brava Island. The primary audience includes diaspora community members accessing the platform from varied devices and connectivity conditions worldwide, so mobile performance and graceful degradation are essential.
Geographic Constraints
All map views are bounded to Brava Island. This prevents users from accidentally panning away and losing context, which is especially important on mobile where accidental gestures are common.
| Parameter | Value |
|---|
| Bounds | lat: 14.80-14.90, lng: -24.75 to -24.65 |
| Center | lat: 14.85, lng: -24.70 |
| MaxBounds | Enabled (prevent panning outside island) |
| Default Zoom | 12 |
Performance Targets
These targets reflect real-world diaspora access patterns — many users connect from mobile devices with limited bandwidth.
| Metric | Target |
|---|
| Map load time | <3 seconds (limited connectivity) |
| Touch success rate | >95% on mobile |
| Tap target size | Min 44x44px |
| Memory usage | <50MB on mobile |
| Clustering threshold | Zoom <14, radius 50px |
Workflows
Map Component Development
- Analyze cultural heritage requirements
- Design mobile-first interface with touch controls
- Implement Mapbox GL JS with React Hook patterns (see
references/REACT_PATTERNS.md)
- Add custom markers and popups with cultural context (see
references/CULTURAL_STYLING.md)
- Configure Brava Island bounds and constraints
- Optimize mobile performance (see
references/PERFORMANCE.md)
- Test touch interactions and low-connectivity scenarios
Geospatial Data Integration
- Transform directory data to GeoJSON with heritage metadata
- Implement geographic clustering for dense site collections
- Add category-based styling per cultural type
- Validate all coordinates within Brava Island bounds — coordinates outside these bounds indicate data errors
- Optimize vector tile loading and caching
Cultural Heritage UX
- Design cultural discovery flows with significance filtering
- Implement navigation (zoom, location search, geolocation)
- Add community context popups with heritage information
- Enable nearby site discovery via geolocation
- Test diaspora access patterns (international users, varied devices)
Critical Files
| File | Purpose |
|---|
apps/web/src/components/ui/interactive-map.tsx | Main map component |
apps/web/src/hooks/useMapbox.ts | Custom Mapbox hook |
apps/web/src/types/mapbox.ts | TypeScript interfaces |
apps/web/src/lib/mapbox-config.ts | Map configuration |
Documentation References
Read these on-demand for implementation details: