map_init | R Documentation |
Load basin boundaries with default configuration. Note that we could use custom vector tiles instead of raster basemaps with package mapboxapi to build more informative hydrological layers.
Add selected hydrological features across river basins.
Used to toggle 3rd-party contextual layers.
map_init(iso3 = names(ISO3), key = getOption("wa.maptiler")) map_addWMSProvider(map, provider = "FAO", date = Sys.Date()) map_update(map, iso3 = names(ISO3)) map_toggle(map, provider = "FAO", layers = NULL)
iso3 |
3-letter country code to update the map (see ISO3) |
key |
Maptiler API key |
map |
leaflet map |
provider |
name of WMS provider (see LAYERS) |
date |
selected timestamp |
layers |
vector of layer names (see LAYERS) |
leaflet map widget with default layers
updated leaflet map
leaflet map widget with default layers
updated leaflet map
# Default rendering map_init()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.