Description Usage Arguments Value Author(s) References Examples
Returns the road distance and time from Google Maps between two points in space, origin and destination.
1 | GoogleRoadDist(orilat,orilon,deslat,deslon,mode,apikey,departure_time,arrival_time,transit_mode,transit_routing_preference)
|
orilat |
Latitude coordinate of the origin point in geodesic format. This could be numeric or string. |
orilon |
Longitude coordinate of the origin point in geodesic format. This could be numeric or string. |
deslat |
Latitude coordinate of the destination point in geodesic format. This could be numeric or string. |
deslon |
Longitude coordinate of the destination point in geodesic format. This could be numeric or string. |
mode |
Travel mode in string format as Google requires it. Possible alternatives are:
|
apikey |
Your API Key from https://developers.google.com/places/web-service |
A list with two numeric elements containing distance in miles and minutes of a trip between two points.
Esteban Lopez <lopezoch@illinois.edu>
See the full documentation at https://developers.google.com/maps/documentation/distance-matrix/
1 2 3 4 5 | orilat<-40.110796
orilon<--88.206985
deslat<-40.109909
deslon<--88.227235
mysearch<-GoogleRoadDist(orilat,orilon,deslat,deslon)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.