1
0
forked from orson/bachemap

ooops, my bad, the final fix

This commit is contained in:
Orson 2025-03-24 17:41:42 -06:00
parent 8fbd2eba5a
commit af52eb6e54

View File

@ -120,11 +120,14 @@
// Convert the adjusted point back to geographical coordinates // Convert the adjusted point back to geographical coordinates
let targetLatLng = map.containerPointToLatLng(targetCenterPoint); let targetLatLng = map.containerPointToLatLng(targetCenterPoint);
user_marker.setLatLng(latlng).bindPopup('<button id="pinner-pop">Agregar bache-o-cosa</button>').openPopup();
// Fly to the adjusted center so the marker appears 25% lower from the center // Fly to the adjusted center so the marker appears 25% lower from the center
map.flyTo(targetLatLng, 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(); // map.once('moveend', function() {
});
// });
user_radial.remove(); user_radial.remove();
}); });
// }); // });