directions.getDistance() returns an Object that has two properties 
.meters and .html.

If you want a number on which you can perform calculations, use
directions.getDistance().meters
(Watch out for that strange spelling of "metres" if you're not American 
yourself.)

If you want to display the information in a localized format that's more 
meaningful to humans, use directions.getDistance().html

You might also consider getting to grips with the concept of 
asynchronous calls and callbacks, so that you could use them to get rid 
of  alert("hi")

-- 
http://econym.googlepages.com/index.htm
The Blackpool Community Church Javascript Team


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to