title: Dropping marker on event, in google maps
body: <p>I'm trying to make so the marker i hidden until the map is clicked.</p>
  
  <p>If i remove the listener the marker is where it should be, and everything works, when i add it the marker is permanently gone.</p>
  
  <p>I've looked through both the google api and several websites(including this one), my roomate even had a look at it, i just can't seem to get it working. </p>
  
  <p>My understanding is that 'click' in this case is a google specific thing, since browsers handle events like that slightly differently, so maybe the listener is the problem.</p>
  
  <p>Any help is greatly appreciated.</p>
  
  <pre><code>var myCenter=new google.maps.LatLng(55.680313, 12.548468);
  
  function initialize()
  {
  var mapProp = {
  
       center:myCenter,
       zoom:15,
       mapTypeId:google.maps.MapTypeId.ROADMAP
       };
  
  var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
  
  google.maps.event.addListener(map, 'rightclick', function(event) {
  
       var marker=new google.maps.Marker({
  
            position:myCenter,
            animation:google.maps.Animation.DROP
  
            });
  });
  
  marker.setMap(map);
  }
  
  google.maps.event.addDomListener(window, 'load', initialize);
  </code></pre>