On Nov 14, 1:19 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
>
> You don't understand the asynchronous nature of GDownloadUrl. See
> Mike Williams' explanation here:
> Part 2 Asynchronous I/Ohttp://econym.org.uk/gmap/async.htm
>
> You need to set thesidebarcontents in the callback function after it
> finishes processing the markers.
>
> What happens if you don't do that is you send off the request for the
> data then execute the line that fills in thesidebar(which doesn't
> have any contents yet). Sometime later the results come back from the
> server, it adds the markers to the map and fills in the side_bar_html
> variable, but it is never used.
>
> See Mike's examples in his tutorial.
Very clear explanation. Thanks, Larry.
I had started with an earlier example that used GXmlHttp with
request.onreadystatechange
var request = GXmlHttp.create();
request.open("GET", "loggerGeocodes.xml", true);
request.onreadystatechange = function() {
if (request.readyState == 4) {
var xmlDoc = GXml.parse(request.responseText);
but then grafted in the GDownloadUrl approach as a replacement and
lost the asynchronicity.
Thanks for the pointer, I will look for examples of how to do this.
I am so used to thinking of server-side work, I have to keep reminding
myself this is happening in the /client client client/...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---