Shows a leaflet map for the native habitat given a species identifier

am_map_leaflet(
  ras,
  title = "",
  cols = c("#FEB24C", "#FD8D3C", "#FC4E2A", "#E31A1C", "#B10026")
)

Arguments

ras

a raster object, for example from the am_raster function

title

a string to use as legend title, by default blank

cols

a vector with three hex colors to use for a numeric color legend, default: c("#FEB24C", "#FD8D3C", "#FC4E2A", "#E31A1C", "#B10026")

Examples

if (FALSE) { # \dontrun{
# native habitat for blue trevally
ras <- am_raster(am_search_fuzzy("blue trevally")$key)
am_map_leaflet(ras, title = "Blue trevally (p)")

# where do both blue and white trevally occur?
ras <- am_raster(am_search_fuzzy("trevally AND (white OR blue)")$key,
  fun = "count")
am_map_leaflet(ras, title = "Blue and white trevally (n)")
} # }