fix: inverse lat lng

This commit is contained in:
Jean-Baptiste Pasquier 2021-04-14 00:18:42 +02:00
parent 1bb70effa5
commit 994bf92723

View File

@ -25,8 +25,8 @@ window.hubl.geocoord = async (address = false) => {
window.hubl.geocalc = (element) => {
const editionForm = element.parentElement.parentElement.parentElement.parentElement;
window.hubl.geocoord(editionForm.querySelector('input[name="address_line1"]').value + " " + editionForm.querySelector('input[name="address_line2"]').value).then(coords => {
editionForm.querySelector('input[name="lat"]').value = coords[0];
editionForm.querySelector('input[name="lng"]').value = coords[1];
editionForm.querySelector('input[name="lat"]').value = coords[1];
editionForm.querySelector('input[name="lng"]').value = coords[0];
editionForm.querySelector('input[type="submit"]').click();
});
return false;