Add location from map

This commit is contained in:
Sean Morley
2024-07-24 18:55:40 -04:00
parent 3e328f408a
commit 13590c5c3c
2 changed files with 18 additions and 4 deletions

View File

@@ -43,6 +43,12 @@
visitArray.push(el.region);
});
function clearMarkers() {
newMarker = [];
newLatitude = null;
newLongitude = null;
}
// mapped to the checkbox
let showGEO = true;
@@ -50,9 +56,14 @@
</script>
{#if newMarker.length > 0}
<button type="button" class="btn btn-primary" on:click={() => (createModalOpen = true)}
<button type="button" class="btn btn-primary mb-2" on:click={() => (createModalOpen = true)}
>Add New Adventure at Marker</button
>
<button type="button" class="btn btn-neutral mb-2" on:click={clearMarkers}>Clear Marker</button>
{:else}
<button type="button" class="btn btn-primary mb-2" on:click={() => (createModalOpen = true)}
>Add New Adventure</button
>
{/if}
{#if createModalOpen}