Map of simple features in leaflet that is not coloured.
leaf_sf(
data,
popup = TRUE,
popup_vars_vctr = NULL,
popup_numeric_format = function(x) prettyNum(x, big.mark = "", scientific = FALSE),
popup_vars_rename = snakecase::to_sentence_case,
pal = pal_viridis_mix(1),
size_point = 2,
size_line = 2,
alpha_point = NULL,
alpha_line = NULL,
alpha_fill = NULL,
basemap = "light",
layer_id_var = NULL,
group_id = NULL,
map_id = "leaf"
)
An sf object of geometry type point/multipoint, linestring/multilinestring or polygon/multipolygon geometry type. Required input.
TRUE or FALSE of whether to have a popup.
Vector of quoted variable names to include in the popup. If NULL, defaults to making a leafpop::popupTable of all columns.
A function to format all numeric variables within the popup column. Defaults to non-scientific. Use function(x) x to leave as is.
Function to rename column names for the popup. Defaults to snakecase::to_sentence_case. Use function(x) x to leave column names untransformed.
Character vector of hex codes.
Size of points (i.e. radius). Defaults to 2.
Size of lines around features (i.e. weight). Defaults to 2.
The opacity of the points.
The opacity of the outline.
The opacity of the fill.
The underlying basemap. Either "light", "dark", "satellite", "street", or "ocean". Defaults to "light". Only applicable where shiny equals FALSE.
Unquoted variable to be used in shiny, so that in the event where a feature is clicked on, the value of this is returned for that feature (e.g. input$map_marker_click$id).
The id name for the sf group.
The map id for the leaflet map. Defaults to "leaf".
A leaflet object.
if (FALSE) {
leaf_sf(example_point)
leaf_sf(example_polygon)
}