Oh, I should also mention that I am working in a new folder. www.harfordhackerspace.org/membermap3 contains the latest code that I need help with.
On Jul 14, 8:12 pm, "Harford Hackerspace (Squintz)" <[email protected]> wrote: > I still don't understand what I need to do. I tried creating an array > to hold multiple gdirection objects but I ran into a problem with the > callback. How do I tell the callback which gdirection object to > reference. For example: > > function onDirectionsLoad() { > var status = gdir.getStatus(); > var bounds = gdir.getBounds(); > var distance = parseInt(gdir.getDistance().meters / 1609); > var duration = parseFloat(gdir.getDuration().seconds / 3600).toFixed > (2); > var polyline = gdir.getPolyline(); > shortenAndShow(polyline); > getDirections(); > > } > > I'm getting an error when trying to call the getStatus() method which > says Object does not support this method or property. My thoughts are > because the object does not actually exist. I should be calling gdir > [index].getStatus(). > > On Jul 12, 8:39 pm, Rossko <[email protected]> wrote: > > > > > > I'm using Firebug to trace what is happening and for some reason it > > > seems that gdir.load never fires off the event listener: > > > You're using a single global gdir instance in a loop. > > GDirections is asynchronous > > http://econym.org.uk/gmap/async.htm > > Each time you kick off a new request it tramples on the previous one. > > http://econym.org.uk/gmap/geomulti.htm (pitfalls)- 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 -~----------~----~----~----~------~----~------~--~---
