Fix location finding

This commit is contained in:
Austen Adler 2023-03-25 23:07:52 -04:00
parent d14b7b2b1f
commit 4bb5216687
2 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@
});
});
map.on('locationfound', (e) => {
dispatch('locationfound', e.detail);
dispatch('locationfound', e.latlng);
});
// Add the location control

View File

@ -43,8 +43,8 @@
};
const locationfound = (e) => {
console.log('Updating current location event', e);
updateAddr(wasm.call.EncodedAddress.from_coordinate(`${e.latlng.lat}, ${e.latlng.lng}`), false);
console.log('Updating current location event', e.detail);
updateAddr(wasm.call.EncodedAddress.from_coordinate(`${e.detail.lat}, ${e.detail.lng}`), false);
};
const onMapClick = (e) => {