I am new to the RgoogleMaps package and I am trying to include circles to my map with an exact radius. Here is my current code:
library(RgoogleMaps)
data <- read.csv("test.csv", header = TRUE, sep = ",", quote = "\"",
dec = ".", fill = TRUE, comment.char = "")
lat <- data$Latitude
lon <- data$Longitude
PlotOnStaticMap(lat = lat, lon = lon, zoom = 10, maptype ="satellite",
size = c(480, 480), cex = 0.2, pch = 19, col = "red", FUN = points, add = F)
Here for each "coordinate point", i.e. for each point on map comes from "data" dataframe with Latitude and Longitude information, I want to draw a 2 mile radius circle with the "coordinate point" as the center. So if I have 10 rows in data frame with Latitude and Longitude information, I want to draw 10 circles with each row as the center and 2 miles radius. Is it possible to do this? Is there a function for this in RgoogleMaps package? If not is there any other package available which I can do this?
I think of using left lower corner and right upper corner latitudes and longitudes ($BBOX$ll and $BBOX$ur) and combining this information with the size of the map $size 480 480, to figure out what should be the cex value for a point with 2 miles. But I will really appreciate an easier method if there is one.
Thank you.
SO