Search code examples
google-mapsgoogle-maps-markersjquery-gmap3

Implementing bouncing markers in an embedded google map


I'm working on getting a bouncing marker into Google maps embedded on my page.

Here's the code right now:

$("#venue-map").gmap3({
 map:{
    options:{
     center:[28.500169, 77.161950],
     zoom:13,
     mapTypeId: google.maps.MapTypeId.ROADMAP,
     mapTypeControl: false,
     navigationControl: true,
     scrollwheel: false,
     streetViewControl: false
    }
  },
   marker:{
   latLng:[28.500169, 77.161950],
   animation: google.maps.Animation.BOUNCE
   }




});

I don't seem to be able to get the bouncing cursor up and running correctly. any help would be appreciated!


Solution

  • The options derived from the genuine google.maps.Marker you must pass to the options-member:

       marker:{
        latLng   :[28.500169, 77.161950],
        options  :{animation: google.maps.Animation.BOUNCE}
       }