Geocoder calls are asynchronous. You have to call the code that needs
the result from inside the callback function.
var geocoder = new GClientGeocoder();
geocoder.getLatLng(address,function(point) {
//... code in here gets performed when the reply comes back
//... do stuff here that uses "point"
});
//... code out here gets performed after the request is sent
//... but before the reply comes back
//... so it can't use "point"
For details of the asynchronous concept, see:
http://econym.org.uk/gmap/async.htm
--
Mike Williams
http://econym.org.uk/gmap
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---