1

Inbound https://maps.googleapis.com/maps/api/distancematrix/json?origins=Mount+Monodnak&destinations=Boston+MA

Outbound: https://maps.googleapis.com/maps/api/distancematrix/json?origins=Boston+MA&destinations=Mount+Monadnock

You can see that data is returned on the outbound leg to the mountain but not on the return back. Travel mode needs to be driving.

I Geocoded Mount Monadnock to get the latitude and longitude and tried the nearestRoad api call but that also returned {} Here is the URL with my API key removed (but is required) roads.googleapis.com/v1/nearestRoads?points=42.8610804,-72.1083267&key=

A solution I am considering is to find the lat long bounds of the zip code area and find which point is closest to the destination to calculate distance and duration but that is obviously not ideal.

Any ideas or insight would be much appreciated, thanks.

1
  • Looks like the directions service/distanceMatrix is now asymmetrical. Used to be that only happened when one-way roads were involved.
    – geocodezip
    Commented Nov 14, 2016 at 19:54

0