# the leaflet package is required
if (require(leaflet)) {
# Times Square
leaflet_map(40.7566, -73.9863, radius = 1, units = "miles")
# 3 random locations; 5 km circles
leaflet_map(position = rgeo(3), radius = 5, mark = TRUE, color = "red")
# using pipes
rgeo(4, latlim = c(25,50), lonlim = c(-65, -125)) |>
leaflet_map(radius = 5, mark = TRUE, color = "purple")
}
Run the code above in your browser using DataLab