# Example 1
results = gmapsdistance("Washington+DC", "New+York+City+NY", "driving")
results
# Example 2
results = gmapsdistance("38.1621328+24.0029257",
"37.9908372+23.7383394",
"walking")
results
# Example 3
origin = c("Washington+DC", "New+York+NY", "Seattle+WA", "Miami+FL")
destination = c("Los+Angeles+CA", "Austin+TX", "Chicago+IL")
results = gmapsdistance(origin, destination, "bicycling")
# Example 4
origin = c("Washington+DC", "New+York+NY", "Seattle+WA", "Miami+FL")
destination = c("Los+Angeles+CA", "Austin+TX", "Chicago+IL")
results = gmapsdistance(origin, destination, "driving", shape = "long")
# Example 5
origin = c("40.431478+-80.0505401", "33.7678359+-84.4906438")
destination = c("43.0995629+-79.0437609", "41.7096483+-86.9093986")
results = gmapsdistance(origin, destination, "bicycling", shape="long")
Run the code above in your browser using DataLab