title: How to display map using geocode
body: <p>My Script is </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
   var lat = &lt;%= @town.latitude %&gt;, 
   lon = &lt;%= @town.longitude %&gt;,
   map;
  function initialize() {
    var myOptions = {
    center: new google.maps.LatLng(lat, lon)
  };
     map = new google.maps.Map(document.getElementById('map_canvas'),
      myOptions);
  }
   google.maps.event.addDomListener(window, 'load', initialize);
  </code></pre>
  
  <p></p>
  
  <pre><code>  &lt;script type="text/javascript" src="//maps.google.com/maps?file=api&amp;  v=2.x&amp;key="My api key"&amp;libraries=places"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I can fetch latitude and longitude but my map is not loading.Could anyone help me with this?</p>