If I pass in use a non-existent start or end location to
DirectionsService, I don't get a blank result set as expected.
How do I get the service to return to me either ZERO_RESULTS or
INVALID_REQUEST? I am always getting 'OK'.
var dirSvc = new google.maps.DirectionsService();
var request = {
origin: anInvalidLocation, // I used 'nowhereville, OR
destination: aValidCityState, // Using New York, New York
travelMode: google.maps.DirectionsTravelMode.DRIVING
dirSvc.route(request, function(result, status) {
if (status == google.maps.DirectionsStatus.OK) {
// result is always non-empty
}
--
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.