title: Using latitude and longitude to pin point a location in google maps
body: <p>I wrote a script to add maps to my website. It is as follows:  </p>
  
  <pre><code>&lt;script&gt;
          function initialize() {
              var mapCanvas = document.getElementById('map');
              var mapOptions = {
                  center: new google.maps.LatLng(12.9583182, 77.6398512),
                  zoom: 8,
                  mapTypeId: google.maps.MapTypeId.ROADMAP
              }
              var map = new google.maps.Map(mapCanvas, mapOptions)
          }
          google.maps.event.addDomListener(window, 'load', initialize);
          &lt;/script&gt;  
  </code></pre>
  
  <p><strong><code>HTML code:</code></strong>  </p>
  
  <pre><code>&lt;script src="https://maps.googleapis.com/maps/api/js"&gt;&lt;/script&gt;
  &lt;div id="map"&gt;
  &lt;/div&gt;  
  </code></pre>
  
  <p><strong><code>css:</code></strong>  </p>
  
  <pre><code> #map{
      width: 500px;
      height: 400px;
  }  
  </code></pre>
  
  <p>I added this code for pin pointing a location: </p>
  
  <pre><code>var map = new google.maps.Map(document.getElementById("map"), mapOptions);
              //give latitude and long
          var myLatlng = new google.maps.LatLng("12.9583182", "77.6398512");
          var marker = new google.maps.Marker({
              position: myLatlng,
              map: map,
              title: "Bangalore" 
          });   
  </code></pre>
  
  <p>But when I used that code, map on my page disappeared. How can I make it to work? </p>