title: Get return value of reverse geocode
body: <p>I am iterating through a list of latitudes and longitudes from excel. That works fine, I want to have my codeLatLng function return the street address when I call it in the loop. </p>
  
  <p>The commented code is what I was trying to do inside codeLatLng(). I know I can only do 10 calls to google per second, how would I set my loop up to do this?</p>
  
  <p>Thanks!</p>
  
  <pre><code>        function codeLatLng(input) {
              var latlngStr = input.split(",", 2);
              var lat = parseFloat(latlngStr[0]);
              var lng = parseFloat(latlngStr[1]);
              var latlng = new google.maps.LatLng(lat, lng);
              geocoder.geocode({
                  'latLng' : latlng
              }, function(results, status) {
                  document.getElementById("test").innerHTML = results[0].formatted_address + "&lt;br /&gt;";
                  //return results[0].formatted_address;
              });
          }
  
          function initialize() {
              geocoder = new google.maps.Geocoder();              
          }   
  
          function showmethemoney(){  
              var lat, lng, latlng, loc;
              var Excel = new ActiveXObject("Excel.Application"); 
              Excel.Visible = false;
              Excel.Workbooks.Open($("#file").val()); 
              Excel.Active
              //Excel.ActiveSheet.UsedRange.Rows.Count
              $("#test").append("&lt;b&gt; " + Excel.ActiveSheet.UsedRange.Rows.Count + " rows in file&lt;/b&gt;&lt;br/&gt;");
              //10 for testing purposes. I will be going through the entire document
              for (var i=1; i &lt;= 10; i++) {                   
                  lat = Excel.ActiveSheet.Cells(i,17).Value;
                  lng = Excel.ActiveSheet.Cells(i,18).Value;
                  latlng = lat + "," + lng;
                  //loc = codeLatLng(latlng);         
                  $("#test").append(i + ") " + latlng + " " + loc + "&lt;br/&gt;");                                     
              };  
              Excel.Quit();
          }
  </code></pre>