On May 9, 12:39 pm, "[email protected]" <[email protected]> wrote: > Sorry about that.http://sburgz.googlepages.com/home > > On May 9, 3:29 pm, "[email protected]" <[email protected]> > wrote: > > > On May 9, 12:15 pm, "[email protected]" <[email protected]> wrote: > > > > How exactly would I implement that into my code? (I'm doing this for > > > an AP Statistics project, and I'm not too familiar with this API yet)
You need to keep a reference to the markers, then use them as inputs to the directions call. My sample had them in an array, if you look at Mike Williams' tutorial you will see a lot of examples of how to do that with a createMarker function. It doesn't have to be done that way, though. > > >http://groups.google.com/group/Google-Maps-API/web/suggested-posting-... > > > > On May 9, 2:06 pm, "[email protected]" <[email protected]> > > > wrote: > > > > > On May 9, 10:59 am, "[email protected]" <[email protected]> wrote: > > > > > > This is what I have so far: > > > > > <snip> > > > > > > I have a loop to randomly generate 2 GMarker points, and I want to > > > > > generate directions between these two points. Is there anyway I can do > > > > > this? > > > > > Yes. Not tested: > > > > var dirQueryString = "from: start@"+gmarkers[0].getLatLng().toUrlValue > > > > (6); > > > > dirQueryString +=" to: end@"+gmarkers[1].getLatLng().toUrlValue > > > > (6) > > > > gdir.load(dirQueryString, dirOpts); > > > > > example (more complex):http://www.geocodezip.com/example_geo2.asp > > > > > -- Larry > > > > > > If not, what can I do to get directions between 2 randomly > > > > > generated points? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
