mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-24 23:39: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:
parent
f6097a2d60
commit
bbad7b890c
1 changed files with 22 additions and 14 deletions
|
@ -458,20 +458,28 @@
|
|||
</div>
|
||||
{/if}
|
||||
{#if adventure.longitude && adventure.latitude}
|
||||
<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>
|
||||
{$t('adventures.open_in_maps')}:
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<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
|
||||
>
|
||||
<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>
|
||||
{/if}
|
||||
<MapLibre
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue