On Apr 12, 9:49 pm, xiangli chen <[email protected]> wrote:
>
> Sorry, I can not give the link which is not allowed by the company.
So you have a Premier licence and could ask your Google support
representative.
> So, I have to show the code.
>
> var geocoder = new GClientGeocoder();
> if (geocoder) {
> geocoder.getLatLng(location, function(point) {//flag =
> true;});}
> document.queryform.submit(); // form
>
> My problem is 'document.queryform.submit();' will be executed before
> finish of function(point). It seems that the program new a new thread
> for implementing function(point).
>
> So, is there any better solution for waiting the finish of
> function(point).
Everything you need to do with geocoder output must go into the
callback function.
geocoder.getLatLng(location, function(point)
{ document.queryform.submit();}
or maybe
function doMyStuff(point) {
// lots of stuff
}
geocoder.getLatLng(location,doMyStuff);
--
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.