On May 12, 10:56 pm, eversonl <[email protected]> wrote:
> The var localSearch = new GlocalSearch(); is already defined in teh
> top of the script but I guess thats not the right place for it.

yeah because the requests are asynchronous, all the postcode requests
will be issued before any responses are returned.

LocalSearch has a method to set the callback:
localSearch.setSearchCompleteCallback(), but if there's only a single
localSearch object defined at the top of the program, then the
callback will be set to the last of the anonymous callback functions
that was defined when the final postcode request was issued to the
server (BS308GP, UK).

This final callback function has a particular execution context,
including the item details of the last tweet.

The Google Maps API implementation seems to be better because it
doesn't have this setSearchCompleteCallback method.  Instead it must
maintain a collection of geocode requests and callbacks, and this will
work better with closures.

...

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