title: google maps how to add marker if I know the latitude and longitude
body: <p>Before, I was adding the marker on click like this:</p>
  
  <pre><code>google.maps.event.addListener(map, 'click', function(event) {
      marker = new google.maps.Marker({
          position: event.latLng,
          map: map
      });
  </code></pre>
  
  <p>and that was working find, but now I want to add a marker depending on the latitude and longitude not depending on the click event.</p>
  
  <p>I tried this:</p>
  
  <pre><code>if (("#latitude").val() &amp;&amp; (("#longitude").val())){
      marker = new google.maps.marker({
      });
  }
  </code></pre>
  
  <p>but I still don't know what parameter should I pass. Could you help me please?</p>
  
  <p>many thanks</p>