Learn how to use the atoms components in your Nuxt 3 application.
This module exposes components that are auto-imported by Nuxt 3.
AtomsGmap
Main component that will show the Google Map.
<template> <div class="store-locator-page"> <AtomsGmap :options="mapOptions" /> </div></template>
GoogleMapOptions
AtomsMarker
This component will render a marker in the Google Map instance.
<template> <div class="store-locator-page"> <AtomsGmap :options="mapOptions"> <AtomsMarker v-for="marker in markers" :key="marker.id" :position="{ lat: marker.lat, lng: marker.lon }" /> </AtomsGmap> </div></template>
AtomsGcluster
This component will cluster the markers using Official GoogleClusterer
<template> <div class="store-locator-page"> <AtomsGmap :options="mapOptions" :key="myReactiveKey"> <AtomsGcluster> <AtomsMarker v-for="marker in markers" :key="marker.id" :position="{ lat: marker.lat, lng: marker.lon }" /> </AtomsGcluster> </AtomsGmap> </div></template>
GoogleClusterLabel
GoogleClusterLabel
GoogleClusterLabel
GoogleClusterLabel
GoogleClusterLabel
AtomsGautocomplete
This component will render the Official Google Autocomplete search GoogleAutocomplete
<template> <div class="atoms-autocomplete"> <AtomsGautocomplete @searched="getCoordinates($event)" /> </div></template><script setup lang="ts">const getCoordinates = (searchedObj) => { console.log('searchedObj', searchedObj)}</script>
AtomsGInfoWindow
This component will render the Official Google Info-Window box relative to the marker position. GoogleInfoWindow
It's possible to style the box with custom CSS and using the slots availables
<template> ... <AtomsGInfoWindow :position-x="0" :position-y="90"> <template #content-window> lorem ipsum </template> <template #close-icon-window>close icon</template> </AtomsGInfoWindow> ...</template>