On 14 June 2010 15:01, Disha <[email protected]> wrote: > I am using sample code from > http://blog.sb2.fr/post/2008/11/23/Get-Address-A-to-B-Distance-using-GoogleMaps-with-C.aspx. > > I am testing following address > > > AddressA = "Calle 6 J9, CAGUAS, PR, 00726" > AddressB = "10422 Woodlands Trail, Rowlett, TX, 75089" > > It is not returning anything, How do I handle this?
It's using an undocumented call to /nav: the Directions webservice doesn't do that -- see here http://code.google.com/apis/maps/documentation/directions/#DirectionsRequests Using /nav is against the Terms of Service. The webservice returns a status code which will tell you that it can't find a route between Puerto Rico and Texas: http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GGeoStatusCode.G_GEO_UNKNOWN_DIRECTIONS and any code should check that before trying to use data (like the distance) which isn't there. -- 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.
