mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-23 14:59:36 +02:00
Add location from map
This commit is contained in:
parent
3e328f408a
commit
13590c5c3c
2 changed files with 18 additions and 4 deletions
|
@ -9,8 +9,8 @@
|
|||
|
||||
export let type: string = 'visited';
|
||||
|
||||
export let longitude: number | undefined = undefined;
|
||||
export let latitude: number | undefined = undefined;
|
||||
export let longitude: number | null = null;
|
||||
export let latitude: number | null = null;
|
||||
|
||||
import Wikipedia from '~icons/mdi/wikipedia';
|
||||
import ClipboardList from '~icons/mdi/clipboard-list';
|
||||
|
@ -145,6 +145,8 @@
|
|||
query={newAdventure.name}
|
||||
on:close={() => (isPointModalOpen = false)}
|
||||
on:submit={setLongLat}
|
||||
latitude={newAdventure.latitude || null}
|
||||
longitude={newAdventure.longitude || null}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
|
@ -340,7 +342,8 @@
|
|||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary"
|
||||
on:click={() => (isPointModalOpen = true)}>Define Location</button
|
||||
on:click={() => (isPointModalOpen = true)}
|
||||
>{newAdventure.latitude && newAdventure.longitude ? 'Change' : 'Select'} Location</button
|
||||
>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary mr-4 mt-4">Create</button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue