// function initMap() {
// // Try HTML5 geolocation to get the user's current location
// if (navigator.geolocation) {
// navigator.geolocation.getCurrentPosition(position => {
// const userLocation = {
// lat: position.coords.latitude,
// lng: position.coords.longitude
// };
// // Create the map centered at the user's location
// const map = new google.maps.Map(document.getElementById("map"), {
// zoom: 12,
// center: userLocation
// });
// // Add a marker for the user's location
// new google.maps.Marker({
// position: userLocation,
// map: map,
// title: "You are here!"
// });
// }, () => {
// handleLocationError(true);
// });
// } else {
// // Browser doesn't support Geolocation
// handleLocationError(false);
// }
// }
// function handleLocationError(browserHasGeolocation) {
// const errorMessage = browserHasGeolocation
// ? "Error: The Geolocation service failed."
// : "Error: Your browser doesn't support geolocation.";
// alert(errorMessage);
// }