A callback function is more-or-less an absoluteley normal function that processes the results of time-consuming code.
Basically, when performing time-consuming actions, you have two choices: a) Performing the action synchronously: The time consuming code will be run inside your main code. While doing this, everything is blocked (this includes the user interface (i.e. the website you are showing)). The user may think the website has crashed and therefore close it. b) Performing the action aynchronously: You could compare it with a program using threads. You call a method that launches a thread. When launching, you give a reference to your *callback*function as a parameter. In this thread the time consuming action will be processed, while the frontend is completely usable. When the thread finishes, the *callback* function you gave before will be called with the results of the processing. The code may be a bit more complicated, but the advantages of asynchronous requests outweigh the additional work. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
