diff --git a/src/components/stops/OpenStreetMap.svelte b/src/components/stops/OpenStreetMap.svelte new file mode 100644 index 00000000..1a718cbf --- /dev/null +++ b/src/components/stops/OpenStreetMap.svelte @@ -0,0 +1,638 @@ + + +
+ +
diff --git a/src/components/stops/StopPane.svelte b/src/components/stops/StopPane.svelte index 63fb126c..ae97265d 100644 --- a/src/components/stops/StopPane.svelte +++ b/src/components/stops/StopPane.svelte @@ -6,6 +6,7 @@ import AccordionItem from '$components/containers/AccordionItem.svelte'; import SurveyModal from '$components/surveys/SurveyModal.svelte'; import ServiceAlerts from '$components/service-alerts/ServiceAlerts.svelte'; + import OpenStreetMap from './OpenStreetMap.svelte'; import { onDestroy } from 'svelte'; import '$lib/i18n.js'; import { isLoading, t } from 'svelte-i18n'; @@ -17,9 +18,9 @@ import { filterActiveAlerts } from '$components/service-alerts/serviceAlertsHelper'; /** - * @typedef {Object} Props - * @property {any} stop - * @property {any} [arrivalsAndDeparturesResponse] + * @typedef {Object} + * @property {any} + * @property {any} */ /** @type {Props} */ @@ -167,31 +168,28 @@ }); -{#if $isLoading} -

Loading...

-{:else} -
- {#if loading && isLoading && tripSelected} - - {/if} - - {#if error} -

{error}

- {/if} - {#if arrivalsAndDepartures} -
-
-
-

{stop.name}

-

{$t('stop')} #{stop.id}

- {#if routeShortNames()} -

{$t('routes')}: {routeShortNames().join(', ')}

- {/if} +{#if routeShortNames()} +

{$t('routes')}: {routeShortNames().join(', ')}

+{/if} +
+ {#if $isLoading} +

Loading...

+ {:else} +
+ {#if loading && isLoading && tripSelected} + + {/if} - {#if tripSelected} -
+ {#if error} +

{error}

+ {/if} + {#if arrivalsAndDepartures} + -{/if} + + {#if serviceAlerts} + + {/if} + + {#if showHeroQuestion && currentStopSurvey} + + {/if} + {#if nextSurveyQuestion} + + {/if} + + {#if arrivalsAndDepartures.arrivalsAndDepartures.length === 0} +
+

{$t('no_arrivals_or_departures_in_next_30_minutes')}

+
+ {:else} + {#key arrivalsAndDepartures.stopId} + + {#each arrivalsAndDepartures.arrivalsAndDepartures as arrival} + + {#snippet header()} + + + + {/snippet} + + + {/each} + + {/key} + {/if} +
+ {/if} +
+ {/if} +
+ +