Hi Pamela - thanks for your suggestion. I'd looked at that map code before but wasn't able to puzzle out what the example did. I'll take a closer look at the code and see what I can figure out.
----- Original Message ---- From: pamela (Google Employee) <[EMAIL PROTECTED]> To: Google Maps API <[email protected]> Sent: Thursday, September 4, 2008 1:07:53 PM Subject: Re: Store Locator - Driving distances instead of straight-line distances? Hi Charles- Here's an example of using GDirections to create a list of results plus their distances, it's a small amount of code and may be helpful for you: http://gmaps-samples.googlecode.com/svn/trunk/googlebar/googlebar_directions.html It just uses function closure and its own GDirections instance per call to keep track of what result is for what query. - pamela On Sep 3, 3:48 pm, charlesmayo53 <[EMAIL PROTECTED]> wrote: > Hi all, hoping I can get a bit of help with a store locator map. I've > pretty much taken bits of demo code from the Google site and managed > to cobble together a map which does nearly everything I need it to do, > with the exception that I need to display driving distances from the > map center in the sidebar and markers instead of straight-line > distances. > > I've experimented with GDirections() and have successfully extracted > the driving distances in other versions of the map, but keep getting > tripped up in the asynchronous nature of the API -- the GDirections > methods don't come back in the correct A,B,C order (I'm using > lettered markers and sidebar entries) and visually checking the > returned entries, the sidebar wouldn't be sorted in nearest-to- > farthest order even if they were in A,B,C order. > > My map is at: > > http://tandem.mayodata.com/tdom/phpsqlsearch_map_old.php?jobsite=704 > > Could someone suggest a way to implement the features I need, i.e. > driving distances instead of straight-line, a properly A,B,C ordered > sidebar in nearest to farthest order? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
