From 189cd0ee6906555760501496866fbb898bf63f72 Mon Sep 17 00:00:00 2001
From: Sean Morley
Date: Sun, 16 Mar 2025 12:35:42 -0400
Subject: [PATCH] feat: Add origin and destination markers with connecting line
for transportation routes
---
.../src/routes/collections/[id]/+page.svelte | 76 +++++++++++++------
1 file changed, 53 insertions(+), 23 deletions(-)
diff --git a/frontend/src/routes/collections/[id]/+page.svelte b/frontend/src/routes/collections/[id]/+page.svelte
index e194d28..a63dbe5 100644
--- a/frontend/src/routes/collections/[id]/+page.svelte
+++ b/frontend/src/routes/collections/[id]/+page.svelte
@@ -17,7 +17,7 @@
import AdventureCard from '$lib/components/AdventureCard.svelte';
import AdventureLink from '$lib/components/AdventureLink.svelte';
import NotFound from '$lib/components/NotFound.svelte';
- import { DefaultMarker, MapLibre, Marker, Popup } from 'svelte-maplibre';
+ import { DefaultMarker, MapLibre, Marker, Popup, LineLayer, GeoJSON } from 'svelte-maplibre';
import TransportationCard from '$lib/components/TransportationCard.svelte';
import NoteCard from '$lib/components/NoteCard.svelte';
import NoteModal from '$lib/components/NoteModal.svelte';
@@ -995,34 +995,15 @@
{/if}
{/each}
{#each transportations as transportation}
- {#if transportation.destination_latitude && transportation.destination_longitude}
-
-
- {getTransportationEmoji(transportation.type)}
-
-
- {transportation.name}
-
- {transportation.type}
-
-
-
- {/if}
- {#if transportation.origin_latitude && transportation.origin_longitude}
+ {#if transportation.origin_latitude && transportation.origin_longitude && transportation.destination_latitude && transportation.destination_longitude}
+
{getTransportationEmoji(transportation.type)}
@@ -1034,8 +1015,57 @@
+
+
+
+
+ {getTransportationEmoji(transportation.type)}
+
+
+ {transportation.name}
+
+ {transportation.type}
+
+
+
+
+
+
+
+
{/if}
{/each}
+
{#each lodging as hotel}
{#if hotel.longitude && hotel.latitude}