diff --git a/web-frontend/src/lib/Map.svelte b/web-frontend/src/lib/Map.svelte index 8094724..fcf6ab0 100644 --- a/web-frontend/src/lib/Map.svelte +++ b/web-frontend/src/lib/Map.svelte @@ -4,6 +4,7 @@ let mapElement; + export let onMapClick = () => {}; export let map; // export const leaflet; @@ -12,6 +13,7 @@ const leaflet = await import('leaflet'); map = leaflet.map(mapElement).setView([51.505, -0.09], 13); + map.on('click', onMapClick); leaflet .tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { diff --git a/web-frontend/src/lib/common.js b/web-frontend/src/lib/common.js index 7f96454..8962149 100644 --- a/web-frontend/src/lib/common.js +++ b/web-frontend/src/lib/common.js @@ -19,6 +19,7 @@ export async function getWasm() { console.error('Error loading wasm module', e); wasmError = e; wasmStatus = WasmStatus.Errored; + throw e; }); return { diff --git a/web-frontend/src/routes/app-lite/+page.svelte b/web-frontend/src/routes/app-lite/+page.svelte new file mode 100644 index 0000000..b0c847b --- /dev/null +++ b/web-frontend/src/routes/app-lite/+page.svelte @@ -0,0 +1 @@ +
{outputValue}
-{#if wasm.status == WasmStatus.Loaded || wasm.status == WasmStatus.NotLoaded} + +{#await init()} +Loading WebAssembly module...
+{:then}Current cursor: {addr} => ({latlng.lat}, {latlng.lng})
Could not start core module
-Error: {wasm.error}.
-Message: {message}.
+ {/if} + ++ You can still use xpin, but you have to go to the lite version of the app +
+