1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-30 02:09:37 +02:00

Add support for OpenStreetMap

This patch adds an option to open an item in OpenStreetMap as well as in
Google Maps and Apple Maps.
This commit is contained in:
Lars Kiesow 2025-05-07 21:10:38 +02:00
parent f6097a2d60
commit bbad7b890c
No known key found for this signature in database
GPG key ID: 5DAFE8D9C823CE73

View file

@ -458,8 +458,9 @@
</div> </div>
{/if} {/if}
{#if adventure.longitude && adventure.latitude} {#if adventure.longitude && adventure.latitude}
<div class="flex flex-wrap gap-2 items-center"> <div>
<span>{$t('adventures.open_in_maps')}:</span> {$t('adventures.open_in_maps')}:
<div class="flex flex-wrap gap-2">
<a <a
class="btn btn-neutral text-base btn-sm max-w-32" class="btn btn-neutral text-base btn-sm max-w-32"
href={`https://maps.apple.com/?q=${adventure.latitude},${adventure.longitude}`} href={`https://maps.apple.com/?q=${adventure.latitude},${adventure.longitude}`}
@ -472,6 +473,13 @@
target="_blank" target="_blank"
rel="noopener noreferrer">Google</a rel="noopener noreferrer">Google</a
> >
<a
class="btn btn-neutral text-base btn-sm max-w-32"
href={`https://www.openstreetmap.org/?mlat=${adventure.latitude}&mlon=${adventure.longitude}`}
target="_blank"
rel="noopener noreferrer">OSM</a
>
</div>
</div> </div>
{/if} {/if}
<MapLibre <MapLibre