+
+
);
}
-
-
diff --git a/resq/frontend/src/components/Geolocation.js b/resq/frontend/src/components/Geolocation.js
new file mode 100644
index 00000000..6dc5bbb1
--- /dev/null
+++ b/resq/frontend/src/components/Geolocation.js
@@ -0,0 +1,18 @@
+// geocode.js
+import axios from 'axios';
+
+const GOOGLE_API_KEY = "AIzaSyCehlfJwJ-V_xOWZ9JK3s0rcjkV2ga0DVg";
+
+// Function to perform reverse geocoding
+const reverseGeocode = async (latitude, longitude) => {
+ try {
+ const response = await axios.get(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${latitude},${longitude}&key=AIzaSyCehlfJwJ-V_xOWZ9JK3s0rcjkV2ga0DVg`);
+ const cityName = response.data.results[0]?.formatted_address || 'Unknown Location';
+ return cityName;
+ } catch (error) {
+ console.error('Error fetching location name:', error);
+ return 'Unknown Location';
+ }
+};
+
+export default reverseGeocode;
\ No newline at end of file
diff --git a/resq/frontend/src/components/MapIcons.js b/resq/frontend/src/components/MapIcons.js
index 8d13d09f..abf5e5a6 100644
--- a/resq/frontend/src/components/MapIcons.js
+++ b/resq/frontend/src/components/MapIcons.js
@@ -1,11 +1,13 @@
-import {Cancel, LocalFireDepartment, LocalHospital} from "@mui/icons-material";
+import {Cancel, Home, LocalFireDepartment, LocalHospital, SoupKitchen} from "@mui/icons-material";
import * as React from "react";
export const AnnotationIcon = ({icon, color}) =>
({
Fire:
,
Health:
,
- "Road Closure":
+ "Road Closure":
,
+ Shelter:
,
+ Food:
})[icon]
export const MarkerIcon = ({color}) => (