write_leaflet: Write a leaflet map to disk

write_leafletR Documentation

Write a leaflet map to disk

Description

Write a leaflet map to disk

Usage

write_leaflet(
  leaflet_map,
  file = NULL,
  ...,
  remove_url = TRUE,
  verbose = getOption("verbose")
)

Arguments

leaflet_map

(object) created with leaflet::leaflet(), leaflet_SFBA(), etc.

file

(character) ending in .html (but see Details)

...

further arguments to mapview::mapshot()

remove_url

(logical) passed to mapview::mapshot() if file doesn't end with .html

verbose

(logical)

Details

This function relies on mapview::mapshot(). If file ends with an extensions other than .html — for example, .png — then mapshot() will try to handle it. But you may need to pass other arguments, like width and height. Also, remove_url is TRUE by default (but you can change that).


BAAQMD/lltools documentation built on June 28, 2022, 12:31 a.m.