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:
@@ -458,20 +458,28 @@
|
|||||||
</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')}:
|
||||||
<a
|
<div class="flex flex-wrap gap-2">
|
||||||
class="btn btn-neutral text-base btn-sm max-w-32"
|
<a
|
||||||
href={`https://maps.apple.com/?q=${adventure.latitude},${adventure.longitude}`}
|
class="btn btn-neutral text-base btn-sm max-w-32"
|
||||||
target="_blank"
|
href={`https://maps.apple.com/?q=${adventure.latitude},${adventure.longitude}`}
|
||||||
rel="noopener noreferrer">Apple</a
|
target="_blank"
|
||||||
>
|
rel="noopener noreferrer">Apple</a
|
||||||
<a
|
>
|
||||||
class="btn btn-neutral text-base btn-sm max-w-32"
|
<a
|
||||||
href={`https://maps.google.com/?q=${adventure.latitude},${adventure.longitude}`}
|
class="btn btn-neutral text-base btn-sm max-w-32"
|
||||||
target="_blank"
|
href={`https://maps.google.com/?q=${adventure.latitude},${adventure.longitude}`}
|
||||||
rel="noopener noreferrer">Google</a
|
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>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<MapLibre
|
<MapLibre
|
||||||
|
|||||||
Reference in New Issue
Block a user