output_map | R Documentation |
Adds a Leaflet map to a webpage, based on specified or selected inputs.
output_map(shapes = NULL, overlays = NULL, color = NULL,
color_time = NULL, dataview = NULL, id = NULL, click = NULL,
subto = NULL, background_shapes = NULL, options = list(),
overlays_from_measures = TRUE, tiles = list(url =
"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", options = list(maxZoom
= 19)), attribution = list(name = "OpenStreetMap", url =
"https://www.openstreetmap.org/copyright"))
shapes |
A list or list of lists specifying GeoJSON files. Each list should have at least
a |
overlays |
additional layers to add to the map, based on the selected variable; a list or list of
lists with entries at least for |
color |
The name of a variable, or id of a variable selector, to be used to color polygons. |
color_time |
The ID of a selector to specify which timepoint of |
dataview |
The ID of an |
id |
Unique ID for the map. |
click |
The ID of an input to set to a clicked polygon's ID. |
subto |
A vector of output IDs to receive hover events from. |
background_shapes |
The name of a dataset (shapes) to show within a selection, regardless of selected dataset. Useful to show lower-level regions within higher-level regions. |
options |
A list of configuration options, potentially extracted from a saved leaflet object (see Leaflet documentation). |
overlays_from_measures |
Logical; if |
tiles |
A list or list of lists containing provider information (see
leaflet providers; e.g.,
|
attribution |
A list with tile attribution information to be included in a credits section. To add
attributions to the map, include them in |
A character vector of the content to be added.
output_map()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.