Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to show bounce effect on google map marker

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 446
    Comment on it

    Hello Reader's if you are integrating the google map with marker showing your address, Then you can also make the marker with bounce effect. Lets see my code as below:-

    <!DOCTYPE html>
    <html>
    <head>
    <script
    src="http://maps.googleapis.com/maps/api/js">
    </script>
    
    <script>
    var myCenter=new google.maps.LatLng(51.508742,-0.120850);
    var marker;
    
    function initialize()
    {
    var mapProp = {
      center:myCenter,
      zoom:5,
      mapTypeId:google.maps.MapTypeId.ROADMAP
      };
    
    var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
    
    var marker=new google.maps.Marker({
      position:myCenter,
      animation:google.maps.Animation.BOUNCE
      });
    
    marker.setMap(map);
    }
    
    google.maps.event.addDomListener(window, 'load', initialize);
    </script>
    </head>
    
    <body>
    <div id="googleMap" style="width:500px;height:380px;"></div>
    </body>
    </html>
    

    Now when this map will load on broser the place. London will be show highlighted by animated marker.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: