title: Dynamic plotting using ggmap package in R
body: <p>I am trying to plot my points over the google maps. However, the problem I am facing is I have to set the location points and zoom for every input data file. I tried to use it via variables but its not working. Can anyone help?</p>
  
  <p>Here what I tried:</p>
  
  <pre><code>library(ggmap)
  library(ggplot2)
  lionmap &lt;- get_map(location=c(70.76, 21.038), zoom=12, maptype="hybrid")
  </code></pre>
  
  <p>This code only works for static points. How can I make it dynamic?</p>
  
  <p>Here's the head structure for my dataset:</p>
  
  <pre><code>  lion.id       date     time activity      lat     long  distance
  1       2 05-05-2002 10:45:00  Feeding 21.14169 70.79053   0.00000
  2       2 05-06-2002 10:00:00  Resting 21.14158 70.79314 271.50019
  3       2 05-06-2002 19:22:00  Walking 21.14158 70.79314   0.00000
  4       2 05-06-2002 19:25:00  Walking 21.14164 70.79267  49.43485
  5       2 05-06-2002 19:30:00  Resting 21.14181 70.79222  49.71674
  6       2 05-06-2002 23:15:00  Walking 21.14181 70.79222   0.00000
  
  structure(list(lion.id = c(2L, 2L, 2L, 2L, 2L, 2L), date = c("05-05-2002", 
  "05-06-2002", "05-06-2002", "05-06-2002", "05-06-2002", "05-06-2002"
  ), time = c("10:45:00", "10:00:00", "19:22:00", "19:25:00", "19:30:00", 
  "23:15:00"), activity = c("Feeding", "Resting", "Walking", "Walking", 
  "Resting", "Walking"), lat = c(21.1416944444444, 21.1415833333333, 
  21.1415833333333, 21.1416388888889, 21.1418055555556, 21.1418055555556
  ), long = c(70.7905277777778, 70.7931388888889, 70.7931388888889, 
  70.7926666666667, 70.7922222222222, 70.7922222222222), distance = c(0, 
  271.500188739303, 0, 49.4348465237462, 49.7167383971771, 0)), .Names = c("lion.id", 
  "date", "time", "activity", "lat", "long", "distance"), row.names = c(NA, 
  -6L), class = "data.frame")
  </code></pre>