Hello, I am trying the following.
function getLongLat(address)
{
geocoder = new GClientGeocoder();
if (geocoder) {
return geocoder.getLatLng(address,
function(point) {
if (!point) {
return PointResult(point);
} else {
map.setCenter(point, 16);
return PointResult(point);
}
}
);
}
}
function PointResult(result)
{
return result;
}
But I get an undefined result. After some time I can get a proper
result. How do I get the code to wait for a valid result? I just want
it to return a latitude and logitude based on the given address. I
think this returns the result before the result is availabe from
google.
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---