I've changed my code to do some asynchronous testing. Any idea why I'm getting an error instead of a successful load from this code?
Also, how would I go about checking the error that's being thrown by directions.load()? All I get from directions.getStatus() is an [Object object] output when I try to output the difficulty. Thanks again for the help. On Nov 24, 3:19 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Nov 24, 12:35 pm, lwnexgen <[EMAIL PROTECTED]> wrote: > > > Thanks for the help. > > > I updated the code with something I think should work alright. > > > As for the geocoding, the program that does the gathering uses some > > intelligent parsing to reduce the number of times it needs to actually > > go and geocode anything. > > The GDirections object is asynchronous. You can't do this: > map.addOverlay(directions.load(query)); > You need to call it for each query, wait for the response, then call > the next query. You probably will want to not have it automatically > add itself to the map as you will want to (I would expect) adjust the > bounds of the final result to include all the results. > > See the references I posted earlier for the geocoder for ideas on how > to do this. > > -- Larry > > > > > On Nov 24, 2:06 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > > > > On Nov 24, 11:25 am, lwnexgen <[EMAIL PROTECTED]> wrote: > > > > >http://corral.wail.wisc.edu/traffic/index.html > > > > > Sorry, thought I had it on there already. > > > > What have you tried that didn't work? I don't see any calls to > > > GDirections in that code. Beware, you should look at Mike Williams' > > > discussion of geocoding multiple points: > > > Part 17 Geocoding multiple addresseshttp://econym.org.uk/gmap/geomulti.htm > > > and > > > Part 16 Geocoding with error handlinghttp://econym.org.uk/gmap/geo.htm > > > > -- Larry > > > > > Thanks for the time! > > > > > On Nov 24, 1:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > > > wrote: > > > > > > On Nov 24, 9:15 am, lwnexgen <[EMAIL PROTECTED]> wrote: > > > > > > > Hi Guys - > > > > > > > I'm working on doing something similar to the person in this post: > > > > > > >http://groups.google.com/group/Google-Maps-API/browse_thread/thread/8... > > > > > > > My data is dynamically gathered, however, and I need to plot > > > > > > multiple > > > > > > polylines between pairs of coordinates on one map. They need to > > > > > > directly overlay on top of streets, and I also need to be able to > > > > > > control their color. Therefore, I need to export GPolyLines from > > > > > > GDirections. Can anyone help me with a code segment that reads in > > > > > > coordinate pairs and draws lines in between them in this manner? I > > > > > > can't seem to figure out how to draw more than one at a time on a > > > > > > map. > > > > > > > This is what I have so far - it just parses an xml file and plots > > > > > > the > > > > > > pairs of coordinates that I need a polyline laid over. > > > > > > Where is your > > > > > map?http://groups.google.com/group/Google-Maps-API/web/suggested-posting-... > > > > > > -- Larry- Hide quoted text - > > > > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
