diff --git a/web-frontend/src/routes/+layout.svelte b/web-frontend/src/routes/+layout.svelte new file mode 100644 index 0000000..04843aa --- /dev/null +++ b/web-frontend/src/routes/+layout.svelte @@ -0,0 +1,2 @@ +hi + diff --git a/web-frontend/src/routes/+page.svelte b/web-frontend/src/routes/+page.svelte index b371574..15c7aad 100644 --- a/web-frontend/src/routes/+page.svelte +++ b/web-frontend/src/routes/+page.svelte @@ -3,13 +3,19 @@ import { onMount, onDestroy } from 'svelte'; import { browser } from '$app/environment'; + // let init = require(this_algorithm-wasm); + let mapElement; let map; - let wasm; + // let wasm; let latlng = { lat: '', lng: '' }; let addr = ''; onMount(async () => { + await init().then(() => { + console.log('Loaded. Example:', address_from_lat_lon(51.505, -0.09)); + }); + if (browser) { const leaflet = await import('leaflet'); @@ -49,17 +55,6 @@

Welcome to SvelteKit

-

- Status: - {#await init()} - Setting up wasm... - {:then} - Ready - {:catch e} - {e} - {/await} -

-

Current cursor: {addr} => ({latlng.lat}, {latlng.lng})