Reverse geocoding timeouts

189 views
Skip to first unread message

shrdlu_junction

unread,
Nov 28, 2009, 10:11:02 PM11/28/09
to Google Maps JavaScript API v3
I am doing reverse geocoding under V3. When I send the request,
Firefox displays the "script not responding box". If I click
"Continue", it always comes up with the same response. If I click
"stop", the geocoder works and delivers the results. It always seems
to hang in http://maps.gstatic.com/intl/en_au/mapfiles/api-3/22a/main.js
at lines 9, 36 etc.

Thanks for any help. I can post a link if necessary. It was working OK
until about 00:01h Saturday 2009-11-28 UTC.

Thanks

Mike Williams

unread,
Nov 29, 2009, 2:00:24 AM11/29/09
to google-map...@googlegroups.com
"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

Ben Appleton

unread,
Nov 29, 2009, 5:46:54 AM11/29/09
to google-map...@googlegroups.com

Please do post a link.

Thanks
Ben


--

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 google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


Reply all
Reply to author
Forward
0 new messages