If I make a request from France to aksdhlaksdhjasd using your script, it 
throws an exception line 56: var dist = element.distance.value;
This is because you should check the status of the element (which is 
NOT_FOUND) before you request the distance, which you're currently not 
doing.

You are currently testing the returned origin and destination addresses 
against the empty string to determine whether a particular address was 
understood or not; instead, you should examine the status of the 
corresponding element - if it is NOT_FOUND, then it means that either of the 
origin or destination for that element was not understood.

If you are concerned that your customers may be entering in addresses that 
are then interpreted to be something other than what they intended, would it 
be possible for you to display the returned origin/destination address and 
confirm with them that that is in fact what they wanted?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to