1
0
forked from orson/bachemap

ooops, my bad x4

This commit is contained in:
Orson 2025-03-24 17:40:05 -06:00
parent fd45588e19
commit 8fbd2eba5a

View File

@ -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('<button id="pinner-pop">Agregar bache-o-cosa</button>').openPopup();
});