title: How do I get ggmap route data to follow road path
body: <p>I am using the ggmap route function to calculate and visualize hundreds of routes using D.C. Capital Bikeshare data. I am successfully able to do this with one minor problem, the route path doesn't follow roads, particularly curved roads (see screenshot below). Is there a way to tweek my code to all for more detailed paths?</p>
  
  <p><a href="https://i.stack.imgur.com/Idqvl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Idqvl.png" alt="enter image description here"></a></p>
  
  <pre><code>library(tidyverse)
  library(ggmap)
  
  # Example dataset
  feb_14 &lt;- read.csv('https://raw.githubusercontent.com/smitty1788/Personal-Website/master/dl/CaBi_Feb_2017.csv', stringsAsFactors = FALSE)
  
  # Subset first 300 rows, keep start and end Lat/Long strings
  start&lt;-c(feb_14[1:300, 14])
  dest&lt;-c(feb_14[1:300, 15])
  
  # df of individual routes
  routes &lt;- tibble(
    start,
    dest)
  
  # Function to calculate route
  calculationroute &lt;- function(startingpoint, stoppoint) {
    route(from = startingpoint,
          to = stoppoint,
          mode = 'bicycling',
          structure = "route")}
  
  # Calculate route path for all individual trips
  calculatedroutes &lt;- mapply(calculationroute,
                             startingpoint = routes$start,
                             stoppoint = routes$dest,
                             SIMPLIFY = FALSE)
  
  # Unlist and merge in single dataframe
  do.call(rbind.data.frame, lapply(names(calculatedroutes), function(x) {
    cbind.data.frame(route=x, calculatedroutes[[x]], stringsAsFactors=FALSE)
  })) -&gt; long_routes
  
  
  # create map with routes
  basicmap &lt;- get_map(location = 'washingtondc',
                      zoom = 13,
                      maptype = "toner-background",
                      source = "google",
                      color = "bw") 
  basicmap &lt;- ggmap(basicmap)
  
  
  basicmap + geom_path(data=long_routes, 
                       aes(x=lon, y=lat, group=route), color = "red",
                       size=1, alpha = .4, lineend = "round")
  </code></pre>