fix: inverse lat lng
This commit is contained in:
parent
1bb70effa5
commit
994bf92723
@ -25,8 +25,8 @@ window.hubl.geocoord = async (address = false) => {
|
|||||||
window.hubl.geocalc = (element) => {
|
window.hubl.geocalc = (element) => {
|
||||||
const editionForm = element.parentElement.parentElement.parentElement.parentElement;
|
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 => {
|
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="lat"]').value = coords[1];
|
||||||
editionForm.querySelector('input[name="lng"]').value = coords[1];
|
editionForm.querySelector('input[name="lng"]').value = coords[0];
|
||||||
editionForm.querySelector('input[type="submit"]').click();
|
editionForm.querySelector('input[type="submit"]').click();
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user