title: How to get latlng value of a city using geocoder in google maps api?
body: <p>I need to get a latlng value of a city using the following code ... but i get result as "latlng value is undefined " my code is </p>
  
  <pre><code>geocoder.geocode( {'address': acity}, function(results, status) {
               if (status == google.maps.GeocoderStatus.OK) {
                   latlng1 = new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng());
                }
          });
  </code></pre>
  
  <p>Update : If i display lat and lng values separately its been displayed , If made them assigned to latlng1 "latlng1 is undefined" its showing </p>