Map of simple features in leaflet that is not coloured.
leaflet_sf(data, pal = NULL, popup = NULL, radius = 1, weight = 2,
opacity = 0.1, stroke = TRUE, title = "[Title]",
legend_digits = 1, legend_labels = "[Feature]", basemap = "light",
map_id = "map")
An sf object of geometry type point/multipoint, linestring/multilinestring or polygon/multipolygon geometry type. Required input.
Character vector of hex codes. Defaults to NULL, which selects a default palette.
HTML strings for use in popup through a character vector. If NULL, defaults to making a leafpop::popupTable of all columns in the sf object.
Radius of points. Defaults to 2.
Stroke border size. Defaults to 2.
The opacity of the fill. Defaults to 0.1. Only applicable to polygons.
TRUE or FALSE of whether to draw a border around the features. Defaults to TRUE.
A title string that will be wrapped into the legend. Defaults to "Title"
Select the appropriate number of decimal places for numeric variable auto legend labels. Defaults to 1.
A vector of legend label values. Defaults to "Feature".
The underlying basemap. Either "light", "dark", "satellite", "street", or "ocean". Defaults to "light". Only applicable where shiny equals FALSE.
The shiny map id for a leaflet map within a shiny app. For standard single-map apps, id "map" should be used. For dual-map apps, "map1" and "map2" should be used. Defaults to "map".
A leaflet object.
# NOT RUN {
leaflet_sf(example_sf_point)
# }
Run the code above in your browser using DataLab