Description Usage Arguments Value Author(s) Examples
Find transit routes using Google or Bing's API
1 2 3 4 5 |
x |
A character vector of length>=2, where each element is a (starting, ending, or intermediate) waypoint, or a numeric matrix with columns c('lat','lon') where each row is a waypoint |
verbose |
Provide additional information |
returntype |
What information to return. Currently, the options are "all", "distance", "distanceUnit", "path", "time", and/or "timeUnit". Can be combined, as in returntype=c("time","distance"). |
service |
API to use. Currently the only option is "bing" |
... |
Other items to pass along |
Route information (see the returntype argument)
Ari B. Friedman
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
georoute( c("3817 Spruce St, Philadelphia, PA 19104",
"9000 Rockville Pike, Bethesda, Maryland 20892"), verbose=TRUE )
georoute( c("3817 Spruce St, Philadelphia, PA 19104",
"Tulum, MX","9000 Rockville Pike, Bethesda, Maryland 20892"), returntype="distance" )
georoute( c("3817 Spruce St, Philadelphia, PA 19104",
"9000 Rockville Pike, Bethesda, Maryland 20892"), verbose=TRUE, returntype="path" )
georoute( c("3817 Spruce St, Philadelphia, PA 19104",
"9000 Rockville Pike, Bethesda, Maryland 20892"), verbose=TRUE, returntype="time" )
# Using lat/lon
xmat <- rbind(
geocode( "3817 Spruce St, Philadelphia, PA 19104" ),
geocode( "9000 Rockville Pike, Bethesda, Maryland 20892" )
)
colnames(xmat) <- c( 'lat', 'lon' )
georoute( xmat, verbose=TRUE, returntype = c("distance","distanceUnit") )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.