Hi, thanks for your quick answer. You can see my example here<http://www.webconcept-preprod.com/demenagement/distance2.html>. I've tried many ways, I may have used the wrong syntax, for Google doesn't tell much about it. In this example, I can't obtain any alert on an erratic destination address (see if(arr!=''){...}else{alert...}). Same problem if I ask to alert(element.status) : the answer will be 'OK' for a valid address, '' for a wrong one instead of 'NOT_FOUND'. By the way, an erratic origin address will generate an alert whereas an erratic one will not, I don't understand why but perhaps my code is wrong. Concerning the last issue, I do think it should be treated as an invalid address because if the request is about kilometric fees on an online payment site for instance, if the customer enters an invalid address and doesn't verify it, he could find himself paying more. That issue didn't appear in version 2. Also, why should "312, France" be treated as "312 France, 47200 Virazeil, France", and not "312, avenue des Champs-Elysées, Paris" for example ? (by the way, 312 France isn't a valid street address).
Kind regards, Benjamin 2011/5/16 Enoch Lau <[email protected]>: > Hi, thanks for the feedback. > NOT_FOUND and ZERO_RESULTS are element statuses, i.e. they are the potential > status of an individual element of the response not of the entire response. > In other words, it is possible for elements of the matrix to have the status > NOT_FOUND or ZERO_RESULTS, but for the overall response to have the status > of OK. You should therefore check the status of the elements of the matrix > to determine whether the addresses entered can't be located (NOT_FOUND) or > whether there is no route between a pair of addresses (ZERO_RESULTS). > Can you give me an example of a request where the status is the empty string > ""? I can't reproduce it. > If you plug in "312, France" into the Directions Service, it also treats it > as "312 France, 47200 Virazeil, France" - do you believe that this should be > treated as an invalid address? > > -- > 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. > -- 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.
