I have the following code that makes a clicked marker bounce on a Google map.
However, Im not sure how to stop the animation after say 2 seconds. Must be some kind of timer function that I can set?
Here is the code:
google.maps.event.addListener(marker, 'click', function()
{
map.setCenter(marker.getPosition());
map.setZoom(17);
if(marker.getAnimation() != null)
{
marker.setAnimation(null);
}
else
{
marker.setAnimation(google.maps.Animation.BOUNCE);
}
} );
Any suggestions would be great