Hi
The map at
http://www.cs.nott.ac.uk/~gxk/download/mapTwo.html
works as far as it goes.
It reads in an XML file of (essentailly) Lat/Longs, draws a map,
displays driving directions and I also builds up some HTML that I
display below the map.
(It may not work on IE - somebody has said that there is something
wrong with the DTD; which I don't understand at the moment - but it
works on Firefox).
If you look at the XML file, you'll see that I have three records and
I want to display (below the map) the distances between each location
(except where homeCnt == awayCnt).
So I want the display, under the map, to show the distances for
Location 1 to Location 2
Location 1 to Location 3
Location 2 to Location 3
etc.
(and possibly the reverse journey's, but you get the idea).
This is one problem. How do you keep "adding" to message. At the
moment I just get the last journey that is processed.
The other problem is, if I try and do >1 journey, the GDirections that
are issued cancel out the previous one.
I have tried playing around with setTimeout - but this just calls
another function later (and the script keeps running - and calling
GDirections). I have also tried to implement a "sleep" function but
this just hangs the browser.
So, two questions.
1) How can I keep adding to message?
2) How can I make sure that one GDirection has finished beore I call
another one?
I hope that if you change the line
'if(homeCnt == 0 && awayCnt < 2) {'
to contain either 2 (which shows what I want to achieve, but only has
one journey) or 3 (which also works but I just get the last journey)
will show the problem.
Thx
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---