Bounce a pin in google maps once

后端 未结 9 1247
渐次进展
渐次进展 2020-12-13 00:34

I want to bounce a pin on a google map once. The following code will make the marker bounce but it just keeps going...

myPin.setAnimation(google.maps.Animati         


        
9条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-13 01:18

    Just a note: if you're triggering this on multiple markers, you'll want to check to make sure the marker's not currently animating by adding the following code before you call marker.setAnimation( google.maps.Animation.BOUNCE );:

    if( marker.animating ) { return; }

提交回复
热议问题