Team AMD- Location-Activated Search for Record Discovery
Description
This MR introduces a comprehensive location-based search and visualization system, primarily implemented across LocationRecordsFinder.tsx and the newly created LocationToggle.tsx . The update allows users to search for records by proximity, visualize them on an interactive map, and seamlessly toggle this functionality.
Type of Change:
-
Bug Fix -
Feature Development -
Documentation
Key Changes:
- LocationToggle.tsx (New Component):
- Functionality: Created a dedicated component to enable/disable location-based search.
- UI/UX: Features a toggle switch that expands to show location selection controls, current coordinates, and a "Fetch Records" button.
- Feedback: Provides visual indicators for loading states and search status (e.g., "Records loaded on map").
LocationRecordsFinder.tsx (Major Updates):
- Integration: Incorporated LocationToggle as the primary control for initiating searches.
- Map Interaction: Implemented logic to popup the records map only after a location is selected, preventing UI clutter.
- Visualization: logic to fetch and display up to 20 records, marking each with a red pin on the map.
- Layout Fixes: Resolved Z-index and layout issues to prevent the results map from overlapping the initial location-picker map.
Testing:
-
Tested on desktop -
Tested on mobile -
Tested in different browsers
Checklist:
-
Code follows project style guidelines -
Self-review completed -
No console errors -
TypeScript types are correct
Edited by mondyagu abhilash





