Skip to content

How to set animation on GMapMarker @click? #13

Answered by dr3tt
dr3tt asked this question in Q&A
Discussion options

You must be logged in to vote

I solved using a ref.

<GMapMarker 
    ref="marker"
    :position="position"
    :clickable="true" 
    @click="() => setAnimation()"
/>

const marker = ref(null);

function setAnimation(){
    marker.value.$markerObject.setAnimation(
        window.google.maps.Animation.BOUNCE
    );
}


Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dr3tt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
good first issue Good for newcomers advise or question Seeking for advise or question
1 participant