# Create map widget
map <- make_map()
# Print map widget
map
# Print map with markers
pts <- rbind(
c(-112.049, 43.517),
c(-122.171, 37.456),
c( -77.367, 38.947),
c(-149.803, 61.187),
c( -80.248, 26.080)
)
leaflet::addMarkers(map,
lng = pts[, 1],
lat = pts[, 2]
)
# Print map of satellite imagery with a rectangle in the vicinity of UCLA
make_map(
maps = "Imagery",
collapse = TRUE
) |>
leaflet::addRectangles(
lng1 = -118.456,
lat1 = 34.078,
lng2 = -118.436,
lat2 = 34.062,
fillColor = "transparent"
)
Run the code above in your browser using DataLab