title: How to pass Latitude Longitude from HTML form to Google Maps
body: <p>I want to pass latitude and longitude from user. How I can pass parameters from html form to google map API?
  How to learn complete google map API step by step which start to end. 
  and how to add more then one lat and lng to one map?</p>
  
  <pre><code>  &lt;!DOCTYPE html&gt;
      &lt;html&gt;
      &lt;head&gt;
      &lt;script
      src="http://maps.googleapis.com/maps/api/js"&gt;
      &lt;/script&gt;
  
      &lt;script&gt;
      var lat=51.508742;
      var lng=8.120850;
      var myCenter=new google.maps.LatLng(lat,lng);
  
      function initialize()
      {
      var mapProp = {
        center:myCenter,
        zoom:5,
        mapTypeId:google.maps.MapTypeId.ROADMAP
        };
  
      var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
  
      var marker=new google.maps.Marker({
        position:myCenter,
        });
  
      marker.setMap(map);
      }
  
      google.maps.event.addDomListener(window, 'load', initialize);
      &lt;/script&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
  &lt;form id="form1"&gt;
      &lt;table&gt;
          &lt;tr&gt;
              &lt;td&gt;Enter Latitude:&lt;/td&gt;
              &lt;td&gt;
                  &lt;input type="text" name="lat" value="13.053147716796578" /&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Enter Longitude:&lt;/td&gt;
              &lt;td&gt;
                  &lt;input type="text" name="lng" value="80.2501953125" /&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;
                  &lt;input type="button" value="Submit" /&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
      &lt;div id="googleMap" style="width:500px;height:380px;"&gt;&lt;/div&gt;
  &lt;/form&gt;
  
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>