Make an interactive map with basemap

oh_map(
  base_opacity = 0.5,
  zoomControl = knitr::is_html_output(),
  attributionControl = knitr::is_html_output(),
  fullScreenControl = knitr::is_html_output(),
  verbose = F
)

Arguments

base_opacity

the opacity of the basemap; default is 0.5

zoomControl

boolean (TRUE or FALSE) for leaflet::leafletOptions() on whether to include zoom; default: TRUE

attributionControl

boolean (TRUE or FALSE) for leaflet::leafletOptions() on whether to include attribution; default: TRUE

fullScreenControl

boolean (TRUE or FALSE) on whether to include leaflet.extras::addFullscreenControl(); default: TRUE

verbose

boolean (TRUE or FALSE) on whether to show debug information; default: FALSE

Value

a leaflet::leaflet() map

Examples

# basic map with defaults
oh_map()
# map zones by area with divergent color scheme around mean oh_map( ply = oh_zones_s1k, fld_val = area_km2, fld_id = zone_name, str_val = "area (km^2)", str_id = "Zone", div_mid = mean(oh_zones$area_km2)) #> Error in oh_map(ply = oh_zones_s1k, fld_val = area_km2, fld_id = zone_name, str_val = "area (km^2)", str_id = "Zone", div_mid = mean(oh_zones$area_km2)): unused arguments (ply = oh_zones_s1k, fld_val = area_km2, fld_id = zone_name, str_val = "area (km^2)", str_id = "Zone", div_mid = mean(oh_zones$area_km2))