Sorry...let me rephrase the questions: 1) I recursively called the loading function for the 5 airports. Even when 5 airport distance/duration returns recursively, they are not shown sometimes (cannot find the exact scenario - its sporadic). Which method (I did not use setTimeout) will ensure that the code will run without any problem? Should I use setTimeout?
2) When an error occurs getting the duration/distane - error 604 is returned. As I am making 5 GDirection calls recursively, after an error the code stops in the error event handler. The resursive call is in the Load event handler, but when error occurs it ends up in Error event handler. How do I continue the code, so that it does not stop but go and fetch the other airports? On Dec 6, 11:46 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Dec 6, 9:42 am, mahmudmia <[EMAIL PROTECTED]> wrote: > > > Thanks. That answers the 3rd. I have to recheck the airport locations > > carefully. > > > Anyone who can help me on 1 & 2? > > #2 doesn't have a question. > #1 is opinion (if it works it is OK). > > > > > > > On Dec 6, 2:10 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > > > > On Dec 5, 11:35 am, mahmudmia <[EMAIL PROTECTED]> wrote: > > > > > Here is my web page link - > > > > >http://98.131.90.6/gmaptest4_ie.aspx > > > > > I have a database of airports, user provides an address, I geocode the > > > > address then find the nearest 5 airports from DB. Then from Google I > > > > get the distance & duration using GDirections. The found 5 airports > > > > are listed below the map and when clicked - the driving directions are > > > > given. > > > > > When you people will run the application you will see that, it runs > > > > OK. But ocassionally the output does not show. My questions - > > > > > 1) I recursively called the loading function for the 5 airports. Is > > > > this OK? Or should I use setTimeout also? > > > > > 2) When an error occurs getting the duration/distane - error 604 is > > > > returned. In that case actually I do want to continue for the other > > > > points. So, instead of 5 airports, there may be 2 correctly returned. > > > > > 3) put address - Rockford, IL, USA. The API could not find duration/ > > > > distance to "Madison, WI: Truax Field" lat="43.14194444" > > > > lng="-89.33694444". But maps.google.com page can. What's the problem? > > > > The coordinates are too far from a road (they are in the middle of the > > > airport). > > > Your coordinates don't > > > work:http://www.geocodezip.com/example_geo2.asp?addr1=Rockford,%20IL,%20US... > > > > But move it closer to a > > > road:http://www.geocodezip.com/example_geo2.asp?addr1=Rockford,%20IL,%20US... > > > and it will. > > > > -- Larry > > > > > Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to Google-Maps-API@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---