Open in Apple Maps or Google Maps

This patch provides the additional option to open a location in Google
maps as an alternative to Apple Maps.
This commit is contained in:
Lars Kiesow
2025-04-27 17:42:51 +02:00
parent 56bbbb0ffb
commit f6097a2d60

View File

@@ -458,12 +458,21 @@
</div>
{/if}
{#if adventure.longitude && adventure.latitude}
<a
class="btn btn-neutral btn-sm max-w-32"
href={`https://maps.apple.com/?q=${adventure.latitude},${adventure.longitude}`}
target="_blank"
rel="noopener noreferrer">{$t('adventures.open_in_maps')}</a
>
<div class="flex flex-wrap gap-2 items-center">
<span>{$t('adventures.open_in_maps')}:</span>
<a
class="btn btn-neutral text-base btn-sm max-w-32"
href={`https://maps.apple.com/?q=${adventure.latitude},${adventure.longitude}`}
target="_blank"
rel="noopener noreferrer">Apple</a
>
<a
class="btn btn-neutral text-base btn-sm max-w-32"
href={`https://maps.google.com/?q=${adventure.latitude},${adventure.longitude}`}
target="_blank"
rel="noopener noreferrer">Google</a
>
</div>
{/if}
<MapLibre
style="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json"