Hi All --
I'm working on an app that allows users to see their hotel's location
and it's distance to 3 local attractions (the stadium, downtown, and
town hall).  I've got my map working fine, looping through the
locations and adding markers, etc.  I'm having issues though, as
google maps processes directions asynchronously I can't figure out a
good way to handle these requests...Any ideas?  I've heard that you
can implement a callback.

Here's a link to the map app:
http://www.statecollege.com/maps/map.php?req=Autoport,%20The&address=1405+S.+Atherton+St.%2C++State+College%2C+Pa%2C+16801&show=1

And here's a snippet of code:
function calcDistance(fromAddress, toAddress) {
        gdir.load("from: " + fromAddress + " to: " + toAddress,
{ "locale": 'en_US' });
        var distance = gdir.getSummaryHtml();
        return distance;
    }

Always returns "undefined".

Thanks,
Chuck

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to Google-Maps-API@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to