feat: implement location selection interface with EXIF, GPS, and map picker

- Created LocationSelector component with three location input methods:
  * Auto-populate from photo EXIF data
  * Device GPS location capture with accuracy indicator
  * Interactive Leaflet map picker with draggable marker
- Added Ireland coordinate validation (lat: 51.4-55.4, lng: -10.5--5.5)
- Created coordinate utility functions for validation and formatting
- Added LocationSelectorDemo page for testing at /demo/location-selector
- Displays selected location with coordinates, source, and accuracy
- Provides clear error messages for validation failures
- Satisfies requirements 1.1, 1.2, 1.3, 8.2
This commit is contained in:
2025-11-16 16:15:42 +00:00
parent ebdfc797ac
commit e18997ed95
9 changed files with 601 additions and 15 deletions

View File

@@ -1,17 +1,7 @@
// Utility functions for the Beach Litter Mapping Platform
/**
* Validates if coordinates are within Ireland's geographical bounds
*/
export function isValidIrishCoordinates(lat: number, lng: number): boolean {
// Ireland approximate bounds
const MIN_LAT = 51.4;
const MAX_LAT = 55.4;
const MIN_LNG = -10.5;
const MAX_LNG = -5.5;
return lat >= MIN_LAT && lat <= MAX_LAT && lng >= MIN_LNG && lng <= MAX_LNG;
}
// Re-export coordinate utilities
export * from './coordinates';
/**
* Formats a date to ISO 8601 format