I am doing a dissertation in which I'm attempting to use google maps to do route matching but first, I need to extract information from gdirections as it's loaded. I can do this fine if I have a button to extract steps after everything's loaded but it would appear that if I try to make it extract information automatically then it all hits the fan.
http://www.cs.kent.ac.uk/projects/eafd2/ The code here is pretty nasty and most of it won't work because I've been overhauling it so as to be useful so lots of the variables and the such no longer exist or have the same function. The important parts for our purposes, however, are in the first few functions. As you should be able to see, the page on loading will automatically load 2 routes, one driving and one walking. It does this perfectly except that I've added the latLngExtractor() step afterwards (without this it loads the routes fine, though that's not really helpful). This step should allow me to grab every step in the route but, near as I can tell, it can't because the route is not yet loaded by the time the browser gets to that point so it's trying to call functions on undefined objects, meaning the browser skips that altogether and then, by the looks of it, doesn't bother loading the second route. I've been using Safari and Firefox in OS X to test this. If anybody could help it would be greatly appreciated, I'm very new to Javascript and the DOM so perhaps I'm missing something obvious --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
