here is my v3 code, the alert shows ZERO_RESULTS


function v3address2latlng(address, callback) {
  var geocoder = new google.maps.Geocoder();
  if (geocoder) {
    geocoder.geocode( { 'address': address}, callback);
  }
}

function callback(results, status) {
  alert(status);
  if (status == google.maps.GeocoderStatus.OK) {
    return [results[0].geometry.location.lat(),
results[0].geometry.location.lng()]
  } else {
    return false;
  }
}

address = "61/3 Moo 6 Vichitsongkram Road, Patong Beach, 83120,
Thailand";

v3address2latlng(address, callback);
















On Apr 16, 7:42 pm, julio cesar sanchez hernandez
<[email protected]> wrote:
> I think you need to convert the 0 result to
> results[0].formatted_address
>
> On 9 abr, 05:59, Leonardo Wong <[email protected]> wrote:
>
> >http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=61%2F3+Mo...
>
> > From the link above, I copy the address from Google Map:
> > "61/3 Moo 6 Vichitsongkram Road, Patong Beach, 83120, Thailand"
>
> > With this address, in v2 it return a lat/lng for me, but in v3, it
> > return zero result. Any idea?
>
> > Thanks,
> > Leonardo
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to