From 8fbd2eba5ad075ada3c08b71a4f163b86da0621e Mon Sep 17 00:00:00 2001 From: orson Date: Mon, 24 Mar 2025 17:40:05 -0600 Subject: [PATCH] ooops, my bad x4 --- templates/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/index.html b/templates/index.html index 8018384..ccb3c31 100644 --- a/templates/index.html +++ b/templates/index.html @@ -110,7 +110,7 @@ latlng.lat = parseFloat(latlng.lat).toFixed(6); latlng.lng = parseFloat(latlng.lng).toFixed(6); console.warn("Latitud:", latlng.lat, "Longitud:", latlng.lng); - + destination = L.latLng(latlng.lat, latlng.lng); // Calculate the vertical offset (25% of the map's height) let offset = map.getSize().y * 0.25; // Convert the clicked location to container point @@ -121,7 +121,7 @@ let targetLatLng = map.containerPointToLatLng(targetCenterPoint); // Fly to the adjusted center so the marker appears 25% lower from the center - map.flyTo(latlng, 17, { duration: 0.7 }); + map.flyTo(targetLatLng, 17, { duration: 0.7 }); map.once('moveend', function() { user_marker.setLatLng(latlng).bindPopup('').openPopup(); });