diff --git a/frontend/src/lib/components/EditAdventure.svelte b/frontend/src/lib/components/EditAdventure.svelte index fb476dc..7d26bd5 100644 --- a/frontend/src/lib/components/EditAdventure.svelte +++ b/frontend/src/lib/components/EditAdventure.svelte @@ -18,6 +18,7 @@ let image: File; import MapMarker from '~icons/mdi/map-marker'; + import Map from '~icons/mdi/map'; import Calendar from '~icons/mdi/calendar'; import Notebook from '~icons/mdi/notebook'; import ClipboardList from '~icons/mdi/clipboard-list'; @@ -110,18 +111,15 @@ isImageFetcherOpen = false; } - function setLongLat(event: CustomEvent<[number, number]>) { + function setLongLat(event: CustomEvent) { console.log(event.detail); - adventureToEdit.latitude = event.detail[1]; - adventureToEdit.longitude = event.detail[0]; isPointModalOpen = false; } {#if isPointModalOpen} (isPointModalOpen = false)} on:submit={setLongLat} query={adventureToEdit.name} @@ -184,6 +182,19 @@ bind:value={adventureToEdit.location} class="input input-bordered w-full max-w-xs mt-1" /> +
+ +

@@ -283,16 +294,6 @@ bind:value={adventureToEdit.longitude} class="input input-bordered w-full max-w-xs mt-1" /> -
- -
{#if adventureToEdit.collection === null}
) { + function setLongLat(event: CustomEvent) { console.log(event.detail); - newAdventure.latitude = event.detail[1]; - newAdventure.longitude = event.detail[0]; isPointModalOpen = false; } @@ -165,8 +170,7 @@ query={newAdventure.name} on:close={() => (isPointModalOpen = false)} on:submit={setLongLat} - latitude={newAdventure.latitude || null} - longitude={newAdventure.longitude || null} + bind:adventure={newAdventure} /> {/if} @@ -238,9 +242,7 @@ />
- Location
+
+ +
diff --git a/frontend/src/lib/components/PointSelectionModal.svelte b/frontend/src/lib/components/PointSelectionModal.svelte index fa1b7d6..ed69c76 100644 --- a/frontend/src/lib/components/PointSelectionModal.svelte +++ b/frontend/src/lib/components/PointSelectionModal.svelte @@ -1,6 +1,6 @@ @@ -120,7 +134,9 @@ markers = [ { lngLat: { lng: Number(place.lon), lat: Number(place.lat) }, - name: place.display_name + location: place.display_name, + name: place.name, + activity_type: place.type } ]; }} diff --git a/frontend/src/routes/map/+page.svelte b/frontend/src/routes/map/+page.svelte index 74029ab..259e54a 100644 --- a/frontend/src/routes/map/+page.svelte +++ b/frontend/src/routes/map/+page.svelte @@ -127,8 +127,8 @@ -
{name}
-

Visited

+
{name}
+

Visited

{/if} @@ -149,8 +149,8 @@ -
{name}
-

Planned

+
{name}
+

Planned

{/if}