diff --git a/src/components/report/LocationSelector.tsx b/src/components/report/LocationSelector.tsx index 9a2bcb0..d27a010 100644 --- a/src/components/report/LocationSelector.tsx +++ b/src/components/report/LocationSelector.tsx @@ -55,6 +55,7 @@ export function LocationSelector({ photos, onLocationChange, initialLocation }: setSelectedLocation(coords); setLocationSource('exif'); setValidationError(null); + setShowMap(true); // Automatically show map with EXIF location onLocationChange(coords, 'exif'); } else { setValidationError('Photo location is outside Ireland. Please select a location manually.'); @@ -87,8 +88,9 @@ export function LocationSelector({ photos, onLocationChange, initialLocation }: ? [selectedLocation.latitude, selectedLocation.longitude] : defaultCenter; - // Create map instance - const map = L.map(mapRef.current).setView(initialCenter, selectedLocation ? 13 : 7); + // Create map instance with higher zoom for EXIF locations + const initialZoom = selectedLocation && locationSource === 'exif' ? 15 : selectedLocation ? 13 : 7; + const map = L.map(mapRef.current).setView(initialCenter, initialZoom); // Add OpenStreetMap tiles L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { @@ -315,11 +317,23 @@ export function LocationSelector({ photos, onLocationChange, initialLocation }: {/* Map Picker */} {showMap && ( -
-
-

- Click on the map to select a location, or drag the marker to adjust. -

+
+
+
+ + + +
+

+ {locationSource === 'exif' ? 'Location from Photo' : 'Select Location'} +

+

+ {locationSource === 'exif' + ? 'This location was extracted from your photo. You can adjust it by dragging the marker or clicking a new location.' + : 'Click on the map to select a location, or drag the marker to adjust.'} +

+
+