I am trying to use the mapdist function in R which relies on the Google Geocoding API. There are many pairs of ZIPs for which the mapdist function results in NA values. For instance:
mapdist('19111', '19187')
by using this function you are agreeing to the terms at :
http://code.google.com/apis/maps/documentation/distancematrix/
Information from URL : http://maps.googleapis.com/maps/api/distancematrix/json?origins=19111&destinations=19187&mode=driving&sensor=false
from to km miles minutes hours
1 19111 19187 NA NA NA NA
But when I go into the Google Maps website it easily finds the correct answer which is about 13 miles. Does anyone know why this is happening? For many other pairs of ZIPs the function works perfectly. Thanks.