I’m using animation in google maps to cause a marker to bounce.
How can I change the following code to make it bounce only twice?
markersArray[i].setAnimation(google.maps.Animation.BOUNCE);
EDIT:
Here’s how I did it but as Michal said – it’s a crude solution:
marker.setAnimation(google.maps.Animation.BOUNCE);
setTimeout("marker.setAnimation(null)", 1520);
Currently you cannot control the animation via the API.
A crude way of stopping the animation would be to time exactly how long two bounces last, setTimeout to that value and cancel the animation with marker.setAnimation(null);