Adding marker on clicked point Google Maps V3

It is a common requirement to add a markers on a clicked point in Google Map. This can be achieved by using ‘click’ event.

google.maps.event.addListener(map, ‘click’, function(event) {  
    var marker = new google.maps.Marker({  
         position: event.latLng, map: map  
     });  
});   
Share