"Script not responding" means that *your* code is hogging the browser 
and there's no spare time available to process the geocoder reply. When 
you "Stop" your code loop, the browser gets a chance to process other 
things that have been waiting, such as the geocoder reply.

Perhaps you're doing something like trying to create your own delay 
function by performing an empty loop. Perhaps you learned programming in 
a language that has pre-emptive interrupts, in which that can sometimes 
be a sensible way to manage the application.

Javascript events are not pre-emptive. When an event (such as the 
arrival of a geocoder reply) occurs it's put into a queue. When the 
current code finishes what it's doing, the browser takes the next event 
from the queue and processes it. If your code is performing a hard loop, 
then the events in the queue don't get processed until you manually 
"Stop" it.

-- 
Mike Williams
Gentleman of Leisure

--

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.


Reply via email to