Hi,

I am trying to create a generic function as below. no error reported,
but no mag shows up either. can somebody help?

Thanks a lot

    function codeAddress(address) {
        geocoder = new google.maps.Geocoder();
        if (geocoder) {
            geocoder.geocode({ 'address': address }, function(results,
status) {
                if (status == google.maps.GeocoderStatus.OK) {
                    return results[0].geometry.location
                }
                else {
                    alert("Geocode was not successful for the
following reason: " + status);
                };
            })
        }
      };

     var latlng = codeAddress('150 Springfield Blvd,Richmond,95037');

   // if i change to below, everything look fine.
    var latlng = new google.maps.LatLng(-34.397, 150.644);

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to