Wasn't it Kelson who wrote:
>
>Right.
>
>But I need to use this information around the webpage.
>In this case, how to send the variable "result.Placemark" out the
>function?

You have to call the code that needs result.Placemark from inside the 
callback function.

The reason for that is that GClientGeocoder (and therefore 
rg.reverseGeocode() too) is asynchronous. It sends the request to the 
Google server and returns immediately to the rest of your code. Some 
time later, the reply comes back from the server and that result gets 
passed to the callback function.

I put the openInfoWindow call inside the callback, so that the info 
window doesn't open until after the result.Placemark has been received. 
You need to do the same sort of thing with every bit of code that needs 
that information.

-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to