title: Not able to return Geocode latLng
body: <p>I've created a function to return latitute and longitude.<br>
  The problem is that <code>alert('outside:')</code> is triggered before <code>geocoder.geocode</code>.</p>
  
  <p>Looking at <a href="https://stackoverflow.com/questions/5585957/get-latlng-from-zip-code-google-maps-api">this similar example</a>, this function should work. </p>
  
  <pre><code> function getLatLng(geocoder, adr) {
      var latLng = '';
      geocoder.geocode({ 
        address: adr}, function(results, status){
          if (status == google.maps.GeocoderStatus.OK &amp;&amp; results.length) {
            latLng = results[0].geometry.location;
            alert('inside: ' + latLng); // This works
          } 
        }
      );
      alert('outside: ' + latLng); // This shows NULL
      return latLng;
   }
  </code></pre>
  
  <p>So what do I need to to in order to return latlng value?</p>