diff --git a/web-frontend/src/lib/Map.svelte b/web-frontend/src/lib/Map.svelte index 96d9163..fd21838 100644 --- a/web-frontend/src/lib/Map.svelte +++ b/web-frontend/src/lib/Map.svelte @@ -53,7 +53,7 @@ }); }); map.on('locationfound', (e) => { - dispatch('locationfound', e.detail); + dispatch('locationfound', e.latlng); }); // Add the location control diff --git a/web-frontend/src/routes/app/+page.svelte b/web-frontend/src/routes/app/+page.svelte index 08c7754..a1bd1d7 100644 --- a/web-frontend/src/routes/app/+page.svelte +++ b/web-frontend/src/routes/app/+page.svelte @@ -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) => {