Get location (Latlng) of google map with click event

I need to place a new marker where ever I click. According to the Google map API documentation, I did following.{

'click .map-canvas': function(event){
    var marker = new google.maps.Marker({
        position: event.latLng(),
        map: map


But following error occurs.
“Uncaught TypeError: event.latLng is not a function”

You need to use google.maps.event.addListener instead of the Meteor events

google.maps.event.addListener(, 'click', function(event) {
1 Like

Thanks, it worked with some modifications.