Map of simple features in leaflet that is not coloured.
leaflet_sf(data, popup_vars_vctr = NULL, pal = NULL, size_point = 2,
size_line = 2, alpha = 0.9, basemap = "light", title = "[Title]",
col_labels_dp = 1, col_labels = "[Feature]", map_id = "map")
An sf object of geometry type point/multipoint, linestring/multilinestring or polygon/multipolygon geometry type. Required input.
Vector of quoted variable names to include in the popup. If NULL, defaults to making a leafpop::popupTable of all columns.
Character vector of hex codes. Defaults to viridis. Use the pals package to find a suitable palette.
Size of points (i.e. radius). Defaults to 2.
Size of lines around features (i.e. weight). Defaults to 2.
The opacity of the fill within features (i.e. fillOpacity). Defaults to 0.9.
The underlying basemap. Either "light", "dark", "satellite", "street", or "ocean". Defaults to "light". Only applicable where shiny equals FALSE.
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 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