Returns interactive map with Seascapes as image tiles (not data) from web map server (wms).

map_ss_wms(
  ss_info,
  ply = NULL,
  date = max(get_ss_dates(ss_info)),
  ss_var = "CLASS",
  ply_color = "blue",
  ply_opacity = 0.2,
  basemap_style = "gbif-geyser"
)

Arguments

ss_info

SeaScape ERDDAP info object, as returned by get_ss_info)

ply

optional polygon as spatial feature sf, as returned by get_url_ply or bbox_to_ply, to use for initial extent of map and optionally plot (see ply_color).

date

date of seascape variable to map. Defaults to most recent date available from ss_info, eg Date("2020-11-15").

ss_var

SeaScape variable. One of "CLASS" (default) or "P" for probability.

ply_color

polygon color. To not plot polygon and just use for initial extent of map set ply_color = NA. Default: "blue".

ply_opacity

transparency of polygon Default: 0.2.

basemap_style

any style available from GBIF background tiles. Defaults to "gbif-geyser".

Value

Leaflet leaflet interactive map widget

Details

So far this uses the GBIF background tiles since the ERDDAP WMS only displays in geographic project (EPSG = 4326).

Examples

ss_info <- get_ss_info()

# map most recent Seascape
map_ss_wms(ss_info)