Currently running a little experiment as I dive into VueJS. My main query revolves around how to access the marker object generated through the v-for loop.
<gmap-marker
:key="index"
v-for="(m, index) in markers"
:icon="m.icon"
:position="m.position"
:clickable="true"
:draggable="true"
@click="center=m.position"
></gmap-marker>
I am considering assigning an ID to each of the created markers and then collecting them within an object literal where the ID serves as the key and the marker object as the value. This approach would allow me to reference individual markers using their respective IDs.
Do you think this is the appropriate method to pursue in VueJs?
Many thanks!