View All Peer Mentors on Interactive Map
Coordinators managing large counties or regions need a geographic overview of where peer mentors are located relative to contacts requiring support. This story covers the core map rendering experience: loading peer mentor locations from the backend (via PostGIS spatial queries), rendering map markers with role-appropriate clustering, and providing a smooth pan/zoom experience. The map must respect RLS policies so coordinators only see mentors within their own chapter scope. Peer mentor locations are approximate (municipality-level) by default to preserve privacy, with the precision level governed by location-privacy-config. The map uses the flutter map provider integration with a PostGIS spatial adapter for efficient bounding-box queries.
User Story
Acceptance Criteria
- Given the coordinator opens the map view screen, when the screen loads, then all peer mentors with location consent granted are rendered as map markers within 3 seconds
- Given there are peer mentors without location consent, when the map loads, then those mentors are excluded from the map and a count badge shows how many are hidden
- Given the coordinator pans or zooms the map, when the viewport changes, then markers update dynamically without full reload and maintain their relative geographic positions
- Given the map has loaded, when a peer mentor marker is tapped, then a mentor-info-popup opens showing the mentor's name, certification status, and distance from the selected contact
- Given the coordinator's chapter has more than 20 peer mentors in a dense area, when viewing that area, then markers cluster intelligently to prevent visual overlap, with a count badge on the cluster
- Given the device has no internet connection, when the coordinator opens the map, then a mentor-list-fallback screen is displayed with the same peer mentor data in list format
Business Value
Blindeforbundet explicitly requested geographic map matching as a critical need for operating in large Norwegian counties (fylker). Coordinators currently rely on manual lists and local knowledge to match peer mentors to contacts, which is slow, error-prone, and disadvantages contacts in remote areas. A map view reduces average matching time from minutes to seconds, ensures equitable geographic coverage, and directly improves the quality and speed of peer support delivery. This is a competitive differentiator for the platform that no existing NGO tooling provides.
Components
- Map View Screen ui
- Mentor Map Marker Widget ui
- Mentor Info Popup Card ui
- Mentor List Fallback View ui
- Mentor Location Service service
- Mentor Location Repository data
- Map Provider Integration infrastructure
- PostGIS Spatial Query Adapter infrastructure
- Location Privacy Configuration infrastructure