if (FALSE) {
# with no input
data_sf <- editAttributes(zoomto = 'germany')
# a data.frame input
dat <- data.frame(name = c('SiteA', 'SiteB'),
type = factor(
c('park', 'zoo')
, levels = c('park', 'factory', 'zoo', 'warehouse')
),
size = c(35, 45))
data_sf <- editAttributes(dat, zoomto = 'berlin')
# an sf data.frame input
data_sf <- editAttributes(data_sf)
# test zoomto area of interest
zoomto_area <- tmaptools::geocode_OSM('paris')
mapview(st_as_sfc(zoomto_area$bbox))
}
Run the code above in your browser using DataLab