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();
});